×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Script] Portal Gun!
[Script] Portal Gun!
Bebekiremsul
« Citoyen »
1396201080000
    • Bebekiremsul#0000
    • Profil
    • Derniers messages
#1
  0
P O R T A L G U N !

Güncellendi. Portalları şimdi anında en yakın yada uzak duvara ışınlayın. Izstas yardımıyla ışın çizgilerine bakılabilecek.

http://paste.forummice.com/view/cf652480


Kod a dit :
tfm.exec.disableAutoScore(false)
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoNewGame(true)
grounds = {}
tm = os.time()
tfm.exec.newGame("@4694243")


function eventNewPlayer(name)
system.bindMouse(name, true)
tfm.exec.respawnPlayer(name)
end

for name in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

function eventNewGame()
width = tonumber(tfm.get.room.xmlMapInfo.xml:match('<P[^/]+L="([^"]+)"[^/]+/>'))
if not width then
width = 800
end
height = tonumber(tfm.get.room.xmlMapInfo.xml:match('<P[^/]+H="([^"]+)"[^/]+/>'))
if not height then
height = 400
end
grounds = {}
for ground in tfm.get.room.xmlMapInfo.xml:gmatch("<S[^/]+/>") do
local pos = #grounds+1
grounds[pos] = {}
grounds[pos].X = tonumber(ground:match('X="([^"]+)"'))
grounds[pos].Y = tonumber(ground:match('Y="([^"]+)"'))
grounds[pos].L = tonumber(ground:match('L="([^"]+)"'))
grounds[pos].H = tonumber(ground:match('H="([^"]+)"'))
grounds[pos].T = tonumber(ground:match('T="([^"]+)"'))
end
end

function eventMouse(name, x2, y2)
if os.time() >= tm + 1000 then
local player = tfm.get.room.playerList[name]
local deltaX = x2 - player.x
local deltaY = y2 - player.y
local normalizer = math.sqrt(math.pow(deltaX, 2) + math.pow(deltaY, 2))
deltaX = deltaX / normalizer
deltaY = deltaY / normalizer
for t = 0, math.huge, math.min(math.abs(5 / deltaX), math.abs(5 / deltaY)) do
x = player.x + deltaX * t
y = player.y + deltaY * t
if x < 0 or x > width or y < 0 or y > height then
break
end
for i,ground in ipairs(grounds) do
if x > ground.X - ground.L/2 and x < ground.X + ground.L/2 and y > ground.Y - ground.H/2 and y < ground.Y + ground.H/2 and ground.T ~= (8 or 9) then
brk = true
break
end
end
if brk then
brk = false
if not prtl then
tfm.exec.addShamanObject(26, player.x + deltaX * (t - 15), player.y + deltaY * (t - 15))
prtl = true
else
tfm.exec.addShamanObject(27, player.x + deltaX * (t - 15), player.y + deltaY * (t - 15))
prtl = false
end
break
end
if not prtl then
tfm.exec.displayParticle(9, x , y, 0, 0, 0, 0)
else
tfm.exec.displayParticle(2, x , y, 0, 0, 0, 0)
end
end
tm = os.time()
end
end

function eventPlayerDied(name)
tfm.exec.respawnPlayer(name)
end

eventPlayerWon = eventPlayerDied

Konu EN forumundan alınıp çevrilmiştir.

EN konusu:
Topic-507327

ES Konusu: Topic-556153
Barsems
« Citoyen »
1396201320000
    • Barsems#0000
    • Profil
    • Derniers messages
#2
  0
Kodu paste.moupl.eu ya atsaydın pastebin Türkiye'de engelli.(1.yorum)
Mickeydown
« Citoyen »
1396201440000
    • Mickeydown#0000
    • Profil
    • Derniers messages
    • Tribu
#3
  0
http://paste.forummice.com/ Buraya da atabilirsin kodu.
Barsems
« Citoyen »
1396201440000
    • Barsems#0000
    • Profil
    • Derniers messages
#4
  0
Mickeydown a dit :
http://paste.forummice.com/

Yada buraya at yani.
Bebekiremsul
« Citoyen »
1396201680000
    • Bebekiremsul#0000
    • Profil
    • Derniers messages
#5
  0
Mickeydown a dit :
http://paste.forummice.com/ Buraya da atabilirsin kodu.

Teşekkür Ederim
Mickeydown
« Citoyen »
1396202220000
    • Mickeydown#0000
    • Profil
    • Derniers messages
    • Tribu
#6
  0
Bebekiremsul a dit :

Teşekkür Ederim

Önemli Değil :)
Kovalere
« Citoyen »
1396257000000
    • Kovalere#0000
    • Profil
    • Derniers messages
#7
  0
Bende Diyorum icimden bu kodu bence baska birisinden almısdır diye En Den Almış :D
Botcampkasar
« Citoyen »
1396375140000
    • Botcampkasar#0000
    • Profil
    • Derniers messages
    • Tribu
#8
  0
iyide sadece bir tane map var
bn yapıcam kendim için istersen 4-5 tane map yapıyım konu düzenle
Dfgmbkrstgke
« Citoyen »
1397338200000
    • Dfgmbkrstgke#9591
    • Profil
    • Derniers messages
#9
  0
en sevdiğim oyun :p
Vaporous
« Citoyen »
1397375820000
    • Vaporous#0999
    • Profil
    • Derniers messages
    • Tribu
#10
  0
Kod kopyalanabiliyor ancak ;
Kopyalayamayanlar için verdiğin link kırkı:


http://i.imgur.com/vrjxXS3.png
Oguzhandkr
« Citoyen »
1397376000000
    • Oguzhandkr#0000
    • Profil
    • Derniers messages
    • Tribu
#11
  0
Kaaaooooss a dit :
Kod kopyalanabiliyor ancak ;
Kopyalayamayanlar için verdiğin link kırkı:

Sende hata vardır. http://prntscr.com/39jb7f
Vaporous
« Citoyen »
1397378760000
    • Vaporous#0999
    • Profil
    • Derniers messages
    • Tribu
#12
  0
Oguzhandkr a dit :


Sende hata vardır. http://prntscr.com/39jb7f

Pardon,
Makaraci
« Citoyen »
1402326240000
    • Makaraci#2499
    • Profil
    • Derniers messages
#13
  0
Forum Mice Kapandı... :/ En güzel bulduğum forumdu.
Egecanege
« Citoyen »
1402488660000
    • Egecanege#0000
    • Profil
    • Derniers messages
    • Tribu
#14
  0
Kodu değiştirdim! Artık yeni map açılmıyor olduğunuz mapta portal gun oynayabiliyorsunuz.
a dit :
tfm.exec.disableAutoScore(false)
tfm.exec.disableAutoShaman(true)
tfm.exec.disableAutoNewGame(true)
grounds = {}
tm = os.time()


function eventNewPlayer(name)
system.bindMouse(name, true)
tfm.exec.respawnPlayer(name)
end

for name in pairs(tfm.get.room.playerList) do
eventNewPlayer(name)
end

function eventNewGame()
width = tonumber(tfm.get.room.xmlMapInfo.xml:match('&lt;P[^/]+L="([^"]+)"[^/]+/&gt;'))
if not width then
width = 800
end
height = tonumber(tfm.get.room.xmlMapInfo.xml:match('&lt;P[^/]+H="([^"]+)"[^/]+/&gt;'))
if not height then
height = 400
end
grounds = {}
for ground in tfm.get.room.xmlMapInfo.xml:gmatch("&lt;S[^/]+/&gt;") do
local pos = #grounds+1
grounds[pos] = {}
grounds[pos].X = tonumber(ground:match('X="([^"]+)"'))
grounds[pos].Y = tonumber(ground:match('Y="([^"]+)"'))
grounds[pos].L = tonumber(ground:match('L="([^"]+)"'))
grounds[pos].H = tonumber(ground:match('H="([^"]+)"'))
grounds[pos].T = tonumber(ground:match('T="([^"]+)"'))
end
end

function eventMouse(name, x2, y2)
if os.time() &gt;= tm + 1000 then
local player = tfm.get.room.playerList[name]
local deltaX = x2 - player.x
local deltaY = y2 - player.y
local normalizer = math.sqrt(math.pow(deltaX, 2) + math.pow(deltaY, 2))
deltaX = deltaX / normalizer
deltaY = deltaY / normalizer
for t = 0, math.huge, math.min(math.abs(5 / deltaX), math.abs(5 / deltaY)) do
x = player.x + deltaX * t
y = player.y + deltaY * t
if x &lt; 0 or x &gt; width or y &lt; 0 or y &gt; height then
break
end
for i,ground in ipairs(grounds) do
if x &gt; ground.X - ground.L/2 and x &lt; ground.X + ground.L/2 and y &gt; ground.Y - ground.H/2 and y &lt; ground.Y + ground.H/2 and ground.T ~= (8 or 9) then
brk = true
break
end
end
if brk then
brk = false
if not prtl then
tfm.exec.addShamanObject(26, player.x + deltaX * (t - 15), player.y + deltaY * (t - 15))
prtl = true
else
tfm.exec.addShamanObject(27, player.x + deltaX * (t - 15), player.y + deltaY * (t - 15))
prtl = false
end
break
end
if not prtl then
tfm.exec.displayParticle(9, x , y, 0, 0, 0, 0)
else
tfm.exec.displayParticle(2, x , y, 0, 0, 0, 0)
end
end
tm = os.time()
end
end

function eventPlayerDied(name)
tfm.exec.respawnPlayer(name)
end

eventPlayerWon = eventPlayerDied

:)
Koruhan
« Citoyen »
1402496640000
    • Koruhan#8953
    • Profil
    • Derniers messages
    • Tribu
#15
  0
Forum kapalı değil.Herhalde DNS yüzünden
Barsemsbot
« Citoyen »
1402497900000
    • Barsemsbot#0000
    • Profil
    • Derniers messages
    • Tribu
#16
  0
Erikyiyempnp a dit :
Forum kapalı değil.Herhalde DNS yüzünden

Forummice kapalı idi ama mckeydown ve mickeydown sayfası olmuş.
Makaraci
« Citoyen »
1402511700000
    • Makaraci#2499
    • Profil
    • Derniers messages
#17
  0
Egecanege a dit :
Kodu değiştirdim! Artık yeni map açılmıyor olduğunuz mapta portal gun oynayabiliyorsunuz.
:)

## Init Error : [string "Egehaegeha.lua"]:39: 'then' expected
## [Egehaegeha] Lua script loaded in 0 ms (4000 max)
___________
Hatalı :/
Koruhan
« Citoyen »
1402514400000
    • Koruhan#8953
    • Profil
    • Derniers messages
    • Tribu
#18
  0
Egehaegeha a dit :


## Init Error : [string "Egehaegeha.lua"]:39: 'then' expected
## [Egehaegeha] Lua script loaded in 0 ms (4000 max)
___________
Hatalı :/

then kodunda hata var değiştir.
  • Forums
  • /
  • Transformice
  • /
  • Modules
  • /
  • [Script] Portal Gun!
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27