Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2014
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1.  
  2. function eventEmotePlayed(playerName,id)
  3.     local xp=tfm.get.room.playerList[playerName].x
  4.     local yp=tfm.get.room.playerList[playerName].y
  5.     if id==3 then
  6.     drawCircle({{x=xp,y=yp},{x=xp+50,y=yp+50},5})
  7.     end
  8. end
  9.  
  10. function drawCircle(arg)
  11.  local point1,point2,particle=arg[1],arg[2],arg[3]
  12.  r=sqrt(pow((point1.x-point2.x),2)+pow((point1.y-point2.y),2))
  13.  res=1-r*pow(10,-2)
  14.  if(res<0.1)then res =0.04 end
  15.  for i=0,2*math.pi,res do
  16.   tfm.exec.displayParticle(particle,point1.x+r*cos(i),point1.y+r*sin(i),random(-1,1),random(-1,1),0,0)
  17.  end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement