Results 1 to 9 of 9

Thread: Close client if playerattack

  1. #1

    Join Date
    Jul 2012
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    14
    Rep Power
    5

    Close client if playerattack

    Hello, I'd like an action that heals up to full hp and xlogs if player attack. Since the alarm way to do it doesn't work, or didn't work last time. I know if a lvl 8 attacks it will trigger it, but it's ok for me. I'd do it myself, but I got no idea.

    Thanks before hand!

  2. #2
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Alarms work the same way. Just test it before going afk.

  3. #3
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Alarms work the same way. Just test it before going afk.



    Code:
    if underattack("p") then
    	while hppc < 95 do
    		cast("exura vita")
    	end
    	closetibia()
    end

  4. #4
    Normal User
    Join Date
    May 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Quote Originally Posted by pink_panther View Post
    Alarms work the same way. Just test it before going afk.



    Code:
    if underattack("p") then
    	while hppc < 95 do
    		cast("exura vita")
    	end
    	closetibia()
    end
    How do i could set exit client when someone else would be attacking me?

  5. #5
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Quote Originally Posted by memefu View Post
    How do i could set exit client when someone else would be attacking me?
    Thats what it does.... are you high?

    If someone attacks you, it casts "Exura Vita" then closes.

  6. #6
    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
    You should add an [ilua]updateworld()[/ilua] in the while loop or it will keep repeating the loop as the hppc variable doesnt update automatically, unless Jo added it and I totally missed it.

  7. #7
    Normal User
    Join Date
    May 2012
    Posts
    9
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Quote Originally Posted by pink_panther View Post
    Thats what it does.... are you high?

    If someone attacks you, it casts "Exura Vita" then closes.

    dunno what i was think about... lol thank you for aswer me.


    ps. i just love ur scripts. XD

  8. #8
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Quote Originally Posted by soder View Post
    You should add an [ilua]updateworld()[/ilua] in the while loop or it will keep repeating the loop as the hppc variable doesnt update automatically, unless Jo added it and I totally missed it.
    IT does if the script ends, which it does...

  9. #9
    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
    Try it urself

    while hppc < 95 do
    print(hppc) wait(500)
    end

    You will see the variable never updates in debug log.
    Last edited by soder; 09-10-2013 at 04:50 AM.

Posting Permissions

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