Log in

View Full Version : Need Help with potion buyer to my script



badek
07-30-2015, 00:36
fastExiva _potionid = ED 00 #strongManaPotion
fastExiva _manas = 200
fastExiva _idcost = 80
setBot AutoEatFood=1
setLoot D7 0B
setLoot C3 25
setLoot EF 00
setLoot DA 1D
setLoot 7F 1F
setLoot FE 0D
setLoot F9 0D
setLoot DB 1D
setLoot 94 1F
setMeleeKill carrion worm
setMeleeKill rotworm
setMeleeKill bog raider
setSpellKill bog raider,exori con,3
setAvoidFront bog raider
IfTrue ($countitems:{$_manapotionid$}$#number<#45) Goto $nlineoflabel:refill$
:toexp
move 33203,31842,7
move 33216,31841,7
move 33223,31832,7
move 33238,31823,7
move 33244,31801,7
move 33249,31783,7
move 33277,31780,7
move 33294,31775,7
move 33302,31782,7
move 33305,31784,8
move 33317,31776,8
move 33320,31772,8
move 33323,31770,9
move 33327,31777,9
move 33322,31760,9
move 33320,31762,10
move 33321,31779,10
move 33315,31794,10
move 33320,31804,11
move 33324,31806,12
move 33330,31809,12
:exp
move 33333,31809,13
move 33333,31801,13
move 33331,31795,13
move 33331,31788,13
move 33329,31783,13
move 33326,31777,13
move 33325,31771,13
move 33325,31767,13
move 33330,31765,13
move 33334,31762,13
move 33338,31761,13
move 33352,31756,13
move 33352,31756,13
move 33350,31762,13
move 33352,31755,13
move 33352,31748,13
move 33352,31743,13
move 33356,31740,13
move 33352,31746,13
move 33352,31754,13
move 33352,31761,13
move 33346,31761,13
move 33339,31761,13
move 33334,31762,13
move 33330,31765,13
move 33325,31769,13
move 33325,31776,13
move 33328,31782,13
move 33330,31789,13
move 33330,31794,13
move 33331,31801,13
move 33333,31809,13
sayInTrade exana pox
move 33329,31809,12
waitX 10
fastExiva _manapotionid = ED 00
IfTrue ($countitems:{$_manapotionid$}$#number<#45) Goto $nlineoflabel:refill$
gotoScriptLine $nlineoflabel:exp$
:refill
setLootOff
move 33324,31807,12
move 33321,31804,11
move 33317,31801,10
move 33315,31789,10
move 33321,31775,10
move 33320,31763,10
move 33319,31761,9
move 33319,31777,9
move 33326,31768,9
move 33318,31776,8
move 33305,31785,8
move 33302,31778,7
move 33282,31779,7
move 33252,31788,7
move 33242,31814,7
move 33255,31839,7
fastExiva _manas = 200
fastExiva _idcost = 80
fastExiva _mana = $numericalexp:{$_manas$}-{$countitems:{$_manapotionid$}$}$
fastExiva _manacost = $numericalexp:{$_mana$}*{$_idcost$}$
saymessage hi
waitx 2
fastExiva > 96 04 $hex-tibiastr:vial$
waitx 2
fastExiva > 96 04 $hex-tibiastr:yes$
waitx 1
fastExiva > 96 04 $hex-tibiastr:yes$
fastExiva > 96 04 $hex-tibiastr:yes$
waitx 2
fastExiva > 96 04 $hex-tibiastr:trade$
waitx 2
fastExiva > 07 00 7A $_manapotionid$ 00 $numbertohex2:{$numericalexp:{$_mana$}/4$}$ 00
fastExiva > 07 00 7A $_manapotionid$ 00 $numbertohex2:{$numericalexp:{$_mana$}/4$}$ 00
fastExiva > 07 00 7A $_manapotionid$ 00 $numbertohex2:{$numericalexp:{$_mana$}/4$}$ 00
fastExiva > 07 00 7A $_manapotionid$ 00 $numbertohex2:{$numericalexp:{$_mana$}/4$}$ 00
move 33255,31840,6
move 33255,31839,7
gotoScriptLine $nlineoflabel:toexp$

Town Edron NPC Sandra tibia 10.77

http://www.blackdtools.net/showthread.php?33080-Tutorial-Efficient-potionbuying manapotion script used here