Results 1 to 2 of 2

Thread: attacking same monster...

  1. #1
    Normal User
    Join Date
    Jun 2012
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    8
    Rep Power
    0

    attacking same monster...

    i need hotkey that will play alarm after attacking same monster for 1min...


    thanks

  2. #2
    Normal User
    Join Date
    Jun 2012
    Location
    Sweden
    Posts
    1,671
    Mentioned
    18 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    8 Post(s)
    Reputation
    132
    Rep Power
    9
    Code:
    local LAST_CREATURE_ID, STARTED_ATTACK = 0, 0
    
    while (true) do
    	if (LAST_CREATURE_ID ~= target.id) then
    		LAST_CREATURE_ID, STARTED_ATTACK = target.id, timems
    	elseif (timems - STARTED_ATTACK >= 60000) then
    		playsound("alert.wav")
    		break
    	end
    	
    	wait(100)
    end
    Credits to sirmate

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •