Click here to buy some Tibia gold in our shop

Results 1 to 6 of 6

Thread: Cavebot isTrue issue

  1. #1
    Join Date
    Jul 2011
    Posts
    130

    Unhappy Cavebot isTrue issue

    (not sure if it belongs to "Support" or "Script Factory", please move it if placed wrong)
    hoping i could get some help with my cavebot script, i use BlackD Proxy 24.5, Tibia 7.6, and
    i have this line:
    IfTrue ($countitems:53 0C$#number<=# 4) Goto needtoStop1
    and it ALWAYS jump to needtoStop1
    (afaik) That is the ONLY way to get to needtoStop1 (its at the bottom of the script, and every other path leads to an unconditional "jump back")
    and $countitems:53 0C$ == 16
    why does it jump to needtoStop1 ?

    full script:

    setMeleeKill Evil Morder
    SetMaxAttackTimeMs 40000
    onGMpause
    setRetryAttacks
    setNoFollow
    setLootDistance 99
    #setBot LootAll=1
    :caveloop
    #check SDs
    IfTrue ($countitems:53 0C$#number<=# 4) Goto needtoStop1
    #it always jumps even when $countitems:53 0C# is 16
    :<place
    move 367,313,6
    IfTrue ($hpofhex-id:{$hex-lastattackedid$}$#number>=#3) Goto <place
    :2.5
    move 363,305,6
    IfTrue ($hpofhex-id:{$hex-lastattackedid$}$#number>=#3) Goto 2.5
    :^place
    move 376,305,6
    IfTrue ($hpofhex-id:{$hex-lastattackedid$}$#number>=#3) Goto ^place
    gotoScriptLine $nlineoflabel:caveloop$
    :needtoStop1
    setLootOff
    resetLoot
    resetKill
    :needtoStop
    move 375,309,6
    sayMessage {$countitems:53 0C$}BLEHAS
    #says 16BLEHAS and exits
    Last edited by Hans Henrik; 07-13-2012 at 17:58.
    to get my attention, send me a PM/mail.

  2. #2
    Join Date
    Jul 2011
    Posts
    130

    Default

    tried to debug it, changed a few things, and found out that its actually jumping on a Move x y z command

    The following code will make the char say
    18:39 Gal: 1
    18:39 Gal: 16BLEHAS
    18:39 Cavebot script finished!
    code:
    SetMaxAttackTimeMs 40000
    onGMpause
    setRetryAttacks
    setNoFollow
    setLootDistance 99
    #setBot LootAll=1
    setMeleeKill Evil Morder
    :caveloop
    #check SDs
    IfTrue ($countitems:53 0C$#number<=#4) Goto $nlineoflabel:needtoStop1$
    :leftplace
    sayMessage 1
    move 367,313,6
    sayMessage 2
    IfTrue ($hpofhex-id:{$hex-lastattackedid$}$#number>=#3) Goto $nlineoflabel:leftplace$
    :2.5
    move 363,305,6
    IfTrue ($hpofhex-id:{$hex-lastattackedid$}$#number>=#3) Goto $nlineoflabel:2.5$
    :upplace
    move 376,305,6
    IfTrue ($hpofhex-id:{$hex-lastattackedid$}$#number>=#3) Goto $nlineoflabel:upplace$
    gotoScriptLine $nlineoflabel:caveloop$
    :needtoStop1
    setLootOff
    resetLoot
    resetKill
    :needtoStop
    move 375,309,6
    sayMessage {$countitems:53 0C$}BLEHAS
    Last edited by Hans Henrik; 07-13-2012 at 18:46.
    to get my attention, send me a PM/mail.

  3. #3

    Default

    Wierd script....Dont know what the problem is with it....What is the script for and what is an Evil Morder!?

  4. #4
    Join Date
    Jul 2011
    Posts
    130

    Default

    (note that it is a OT)
    it is a VERY dangerous monster that will kill me unless i stand at an exact spot.
    i need the cavebot to stand at that exact spot until it kills, and then find the next monster,
    stand in an exact spot and kill it, and go to next.. etc
    having that said, it is great EXP!
    if i don't stand exactly where the fucker cant hit me, i will die in seconds. that's why i use
    IfTrue ($hpofhex-id:{$hex-lastattackedid$}$#number>=#3) Goto $nlineoflabel:upplace$
    (i cant move as long as the mob has at least 3% hp or more left.)
    Last edited by Hans Henrik; 07-14-2012 at 14:00.
    to get my attention, send me a PM/mail.

  5. #5

    Default

    I had a simular problem with a creature in an OT in the end i just got a cond to replace amulet's and bought ton's of stone skin amulet's. Don't know if that would benifit you mind.

  6. #6
    Join Date
    Aug 2006
    Location
    Spain
    Posts
    1,296

    Default

    answer to first post:
    the problem is you are using bad syntax there.
    IfTrue ($countitems:53 0C$#number<=# 4) Goto needtoStop1

    the correct syntax to reference the line of the label in this case...
    IfTrue ($countitems:53 0C$#number<=# 4) Goto $nlineoflabel:needtoStop1$

    I am the admin. To contact me, send me an email to daniel@blackdtools.com
    Don't send pms to me! I rarely read pms. Just email me instead!

Tags for this Thread

Posting Permissions

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