Signup Now
Results 1 to 9 of 9
  1. #1
    Free User
    Join Date
    Aug 2014
    Posts
    41
    Reputation
    10
    Rep Power
    0

    Force Refill Action

    Hello, anyone can help me?
    Im doing a script that place are 4 floors and i need do a action will check the $posz then go to stair for up and on this action continue check the $posz for up again until leave cave
    Is that clear?

    An example:
    local MPLEAVE =  getuseroption("minmana")
    local MPMANE = getuseroption("mananame")

    local HPLEAVE = getuseroption("minhp")
    local HPNAME = getuseroption("hpname")

    local CAP = getuseroption("mincap")

    if $wptsection == 'HUNT' and $posz == 8 then
    if itemcount(MPNAME) < tonumber(MPLEAVE) or itemcount(HPNAME) < tonumber(HPLEAVE) or $cap < tonumber(CAP)
    then
    gotolabel('LEAVE')
    elseif $posz == 9 then
    gotolabel('UPSTAIRS')
    elseif $posz == 10 then
    gotolabel('UPAGAIN')
    end


    Thats possible?
    thanks in advance
    Last edited by Hinter; 08-28-2014 at 08:40 PM.

  2. #2
    Free User
    Join Date
    Aug 2014
    Posts
    41
    Reputation
    10
    Rep Power
    0
    anyone?

  3. #3
    Free User
    Join Date
    Aug 2014
    Posts
    41
    Reputation
    10
    Rep Power
    0
    bump.

  4. #4
    Free User Borges's Avatar
    Join Date
    Feb 2014
    Location
    Brazil
    Posts
    1,469
    Reputation
    205
    Rep Power
    25
    @Hinter You forget
     auto(100)
    Last edited by Borges; 08-28-2014 at 06:14 PM.
    Helped you? REP+

  5. #5
    Free User
    Join Date
    Aug 2014
    Posts
    41
    Reputation
    10
    Rep Power
    0
    Its in my action already, but still dont work. Bot only go to label LEAVE even if im on posz 9, 10 or either 11

    Here is the cavebot scripter:

    auto(200)
    if $wptsection == "HUNT" and $posz == 8 and itemcount(getuseroption("mananame")) <= tonumber(getuseroption('minmana'))
    or itemcount(getuseroption("hpname")) <= tonumber(getuseroption("minhp"))
    or $cap <= tonumber(getuseroption("mincap")) then
    gotolabel('LEAVE')
    elseif $wptsection == "HUNT" and $posz == 9 and itemcount(getuseroption("mananame")) <= tonumber(getuseroption('minmana'))
    or itemcount(getuseroption("hpname")) <= tonumber(getuseroption("minhp"))
    or $cap <= tonumber(getuseroption("mincap")) then
    gotolabel('UPFLOOR1')
    elseif $wptsection == "HUNT" and $posz == 10 and itemcount(getuseroption("mananame")) <= tonumber(getuseroption('minmana'))
    or itemcount(getuseroption("hpname")) <= tonumber(getuseroption("minhp"))
    or $cap <= tonumber(getuseroption("mincap")) then
    gotolabel('UPFLOOR2')
    elseif $wptsection == "HUNT" and $posz == 11 and $lastlabel == "T" and itemcount(getuseroption("mananame")) <= tonumber(getuseroption('minmana'))
    or itemcount(getuseroption("hpname")) <= tonumber(getuseroption("minhp"))
    or $cap <= tonumber(getuseroption("mincap")) then
    gotolabel('UPFLOOR3')
    elseif $wptsection == "HUNT" and $posz == 11 and $lastlabel == "DOOR" and itemcount(getuseroption("mananame")) <= tonumber(getuseroption('minmana'))
    or itemcount(getuseroption("hpname")) <= tonumber(getuseroption("minhp"))
    or $cap <= tonumber(getuseroption("mincap")) then
    gotolabel('DOOR1')
    end
    Last edited by Hinter; 08-28-2014 at 08:38 PM.

  6. #6
    Free User Cezarus's Avatar
    Join Date
    Jul 2014
    Location
    Proland
    Posts
    57
    Reputation
    14
    Rep Power
    20
    You need change this:
    MPLEAVE = getuseroption("minmana")

    to this:

    MPLEAVE = tonumber(getuseroption("minmana"))

    same with cap, HP etc,
    when u want to take something by "getuseroption" and u want to use it as number, u must add: tonumber(getuseroption
    Seminari
    [FREE] Port Hope Coryms for ek (90-120 exp/h 16-22 k gold/h)
    http://forums.tibiawindbot.com/attac...2&d=1409228006
    Sort your loot even in depot!
    http://forums.tibiawindbot.com/showt...-even-in-depot!

  7. #7
    Free User
    Join Date
    Aug 2014
    Posts
    41
    Reputation
    10
    Rep Power
    0
    Ye, I do that, look at post above you, but still dont work, he keep go to label LEAVE only even if im on any posz different of this .

  8. #8
    Free User Cezarus's Avatar
    Join Date
    Jul 2014
    Location
    Proland
    Posts
    57
    Reputation
    14
    Rep Power
    20
    @Hinter


    try this:


    auto(200)

    function needToDoResupply()
    local xManaName = getuseroption("mananame")
    local xManaMin = tonumber(getuseroption('minmana'))
    local xHealthName = getuseroption("hpname")
    local xHealthMin = tonumber(getuseroption("minhp"))
    local xCapMin = tonumber(getuseroption("mincap"))
    if ($cap <= xCapMin or itemcount(xManaName) <= xManaMin or itemcount(xHealthName) <= xHealthMin) then
    return true
    else
    return false
    end
    end

    if $wptsection == "HUNT" and $posz == 8 and needToDoResupply() then
    gotolabel('LEAVE')
    elseif $wptsection == "HUNT" and $posz == 9 and needToDoResupply() then
    gotolabel('UPFLOOR1')
    elseif $wptsection == "HUNT" and $posz == 10 and needToDoResupply() then
    gotolabel('UPFLOOR2')
    elseif $wptsection == "HUNT" and $posz == 11 and $lastlabel == "T" and needToDoResupply() then
    gotolabel('UPFLOOR3')
    elseif $wptsection == "HUNT" and $posz == 11 and $lastlabel == "DOOR" and needToDoResupply() then
    gotolabel('DOOR1')
    end
    Seminari
    [FREE] Port Hope Coryms for ek (90-120 exp/h 16-22 k gold/h)
    http://forums.tibiawindbot.com/attac...2&d=1409228006
    Sort your loot even in depot!
    http://forums.tibiawindbot.com/showt...-even-in-depot!

  9. #9
    Free User
    Join Date
    Aug 2014
    Posts
    41
    Reputation
    10
    Rep Power
    0
    @Cezarus

    Thank you , that works fine

 

 

Posting Permissions

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