Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xml=''
- function dist(x1,y1,x2,y2)
- local d=math.sqrt((x2-x1)^2+(y2-y1)^2)
- return d/100
- end
- function eventSummoningEnd(name,id,x,y,angle,vx,vy)
- if id==0 then
- if angle<90 or angle>270 and angle~=0 then g=(dist(x,y,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y))
- elseif angle>90 or angle<270 and angle~=0 then g=-(dist(x,y,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y))
- elseif angle==0 then g=10*dist(x,y,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y)
- end
- if angle>180 then w=math.tan(angle)*(dist(x,y,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y))
- elseif angle<180 and angle>0 then w=-math.tan(angle)*dist(x,y,tfm.get.room.playerList[name].x,tfm.get.room.playerList[name].y)
- elseif angle==0 or angle==180 then w=0
- end
- tfm.exec.newGame(xml:gsub('/><Z>','G="'..w..','..g..'" /><Z>'))
- end
- end
- function eventNewGame()
- xml=tfm.get.room.xmlMapInfo.xml
- end
- tfm.exec.newGame('#0')
- tfm.exec.setShaman('Itchyboy')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement