Results 1 to 4 of 4

Thread: Help with action

  1. #1
    Normal User
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    Help with action

    Code:
    local Monsters = {"Frost Dragon", "Frost Dragon Hatchling"}
    
    if target.name == unpack(Monsters) and target.hpperc <= 60 then
    setattackmode("Chase/Offensive")
    setsettings("Settings\\Targeting\\Monsters\\Category A\\ListSettings\\Setting0\\Stance", "No movement")
    setsettings("Settings\\Targeting\\Monsters\\Category A\\ListSettings\\Setting0\\Distance", "0")
    end
    I keep getting an error ; trying to compare string with number. I don't know how to change the target.hpperc to anything else so it would work.

    @ Edit

    The error occurs only when the Monster is on screen

  2. #2
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    955 Post(s)
    Reputation
    586
    Rep Power
    10
    Code:
    hpperc
    longenough

  3. #3
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    815
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    344 Post(s)
    Reputation
    462
    Rep Power
    10
    target.hpperc doesnt exist.

    It is target.hppc

    PHP Code:
    local Monsters = {"Frost Dragon""Frost Dragon Hatchling"}

    if 
    target.name == unpack(Monsters) and target.hppc <= 60 
    then
        setattackmode
    ("Chase/Offensive")
        
    setsettings("Settings\\Targeting\\Monsters\\Category A\\ListSettings\\Setting0\\Stance""No movement")
        
    setsettings("Settings\\Targeting\\Monsters\\Category A\\ListSettings\\Setting0\\Distance""0")
    end 


    ------------------------------------Latest Releases:------------------------------------
    Vocations:
    Darashia Lions Rock
    Oramond Seacrest Serpents X1

    For a better iBot!

    (◣_◢)

  4. #4
    Normal User
    Join Date
    May 2012
    Posts
    47
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    Then http://www.tibiaibot.com/forum/showt...ibot+functions list has errors in it

    Well, thanks anyways.
    Last edited by Sargo; 10-20-2012 at 10:21 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
  •