Hans Henrik
07-13-2012, 18:56
(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
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