Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local area = 100
- angle = area*area
- for name, player in pairs(tfm.get.room.playerList) do
- system.bindMouse(name,true)
- end
- a = 0
- b = 0
- function eventMouse(name,x,y)
- local x_mouse = tfm.get.room.playerList[name].x - x
- local y_mouse = tfm.get.room.playerList[name].y - y
- a = x
- b = y
- local distance_to_shaman = x_mouse*x_mouse + y_mouse*y_mouse
- if distance_to_shaman < angle then
- tfm.exec.addShamanObject(2, x, y)
- end
- end
- function eventLoop()
- particulaa = {"1"}
- for name, player in pairs(tfm.get.room.playerList) do
- local x, y, r = tfm.get.room.playerList[name].x, tfm.get.room.playerList[name].y, 100
- for i = 1,360 do
- local angle = i * math.pi / 180
- local ptx, pty = x + r * math.cos( angle ), y + r * math.sin( angle )
- tfm.exec.displayParticle(particulaa[math.random(#particulaa)],ptx,pty,0,0,0,0,name)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment