Guest User

Untitled

a guest
May 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. local spell = "exori"
  2. local timeLimit = 60 -- seconds
  3. local status = {pos=Self.Position(), time=os.time()}
  4.  
  5. local function checkMovement()
  6.        
  7.         local curPos, curTime = Self.Position(), os.time()
  8.  
  9.         if(status.pos == newPos)then -- positions haven't changed
  10.                 if(os.difftime(status.time, os.time()) > timeLimit) then -- time limit is up and the positions are the same
  11.                         Self.Say(Spell) -- fuck shit up
  12.                 end
  13.         else -- they have changed
  14.                 status.pos, status.time = curPos, curTime
  15.         end
  16.        
  17.         -- rinse, wash, repeat
  18.         sleep(random(500, 1000))
  19.         checkMovement()
  20. end
Add Comment
Please, Sign In to add comment