Log in

View Full Version : Script will not function as it should. Please Help



Arkemis
11-12-2014, 19:22
Everything is working fine, except my character will not leave when he runs out of potions. No matter what i do i cannot get ny of my scripts to leave when they are supposed to, he just ignores if true commands.



fastExiva _manapotionid = EE 00
fastExiva _manas = 1400
fastExiva _idcost = 120
setMeleeKill Deepling Tyrant
setMeleeKill Deepling Guard
setMeleeKill Deepling Warrior
setMeleeKill Deepling Elite
setMeleeKill Deepling Spellsinger
setSpellKill Deepling Tyrant,exevo gran mas vis,2
setSpellKill Deepling Guard,exevo gran mas vis,2
setSpellKill Deepling Warrior,exevo gran mas vis,2
setSpellKill Deepling Elite,exevo gran mas vis,2
setSpellKill Deepling Spellsinger,exevo gran mas vis,2
setLootOn
setLoot E3 0B
setLoot 24 0D
setLoot 26 0D
setLoot 5C 0D
setLoot 56 0D
move 617,636,9
move 615,658,9
IfTrue (($countitems:{$_manapotionid$}$#number<#300) Goto 47
move 632,660,9
move 631,672,9
IfTrue (($countitems:{$_manapotionid$}$#number<#300) Goto 47
move 615,674,9
waitX 1
fastExiva >65
move 617,673,8
move 630,677,8
IfTrue (($countitems:{$_manapotionid$}$#number<#300) Goto 43
move 630,664,8
move 615,660,8
IfTrue (($countitems:{$_manapotionid$}$#number<#300) Goto 43
move 615,672,8
waitX 1
fastExiva >67
move 630,671,9
IfTrue (($countitems:{$_manapotionid$}$#number<#300) Goto 47
move 636,648,9
gotoscriptline 0
:refill
move 615,672,8
waitX 1
fastExiva >67
move 630,671,9
move 637,645,9
fastExiva >66
move 640,635,8
move 640,628,8
waitX 1
useItem 640,627,8
move 640,622,8
waitX 1
fastExiva >65
move 793,937,7
waitX 1
fastExiva >66
move 338,31365,9
move 314,31356,9
move 308,31357,9
waitX 1
fastExiva >65
move 308,31353,8
waitX 1
putLootOnDepot
waitX 1
move 308,31355,8
waitX 1
fastExiva >67
move 313,31354,9
fastExiva _mana = $numericalexp:{$_manas$}-{$countitems:{$_manapotionid$}$}$
fastExiva _manacost = $numericalexp:{$_mana$}*{$_idcost$}$
saymessage hi
waitX 2
sayInTrade deposit all
waitX 1
sayInTrade yes
waitx 1
sayInTrade withdraw $_manacost$
waitX 1
sayInTrade yes
waitx 1
move 306,31354,9
move 305,31354,9
waitX 1
saymessage hi
waitx 2
sayInTrade trade
waitx 2
sayMessage exiva buy:EE 00:1300
waitx 1
sayMessage exiva buy:58 0C:5
waitX 1
move 321,31356,9
move 349,31377,9
move 363,31387,9
fastExiva >67
waitX 1
move 793,938,7
move 793,935,7
move 794,927,7
move 794,923,7
waitX 1
fastExiva >65
waitX 1
move 640,623,8
move 640,626,8
move 640,626,8
waitX 1
useItem 640,627,8
waitX 1
move 640,635,8
move 639,645,8
waitX 1
fastExiva >68
gotoscriptline 0

oclipper
11-12-2014, 19:50
use label and goto label

try to do it:

fastExiva _manapotionid = EE 00
fastExiva _count1 = $countitems:{$_goldid$}
IfTrue ($_count1$#number<#300) Goto $nlineoflabel:label$ <--- use goto "label", ur string is missing ")"

:label <--- this is how declare label

Arkemis
11-13-2014, 04:39
use label and goto label

try to do it:

fastExiva _manapotionid = EE 00
fastExiva _count1 = $countitems:{$_goldid$}
IfTrue ($_count1$#number<#300) Goto $nlineoflabel:label$ <--- use goto "label", ur string is missing ")"

:label <--- this is how declare label

I changed to line of label which is how i used to have it...

am i supposed to change the "count1" to 1400 and the "goldid" to 120?

where is it missing ")" ?

this is revised script, how should it look?

fastExiva _manapotionid = EE 00
fastExiva _manas = 1400
fastExiva _idcost = 120
setMeleeKill Deepling Tyrant
setMeleeKill Deepling Guard
setMeleeKill Deepling Warrior
setMeleeKill Deepling Elite
setMeleeKill Deepling Spellsinger
setSpellKill Deepling Tyrant,exevo gran mas vis,2
setSpellKill Deepling Guard,exevo gran mas vis,2
setSpellKill Deepling Warrior,exevo gran mas vis,2
setSpellKill Deepling Elite,exevo gran mas vis,2
setSpellKill Deepling Spellsinger,exevo gran mas vis,2
setLootOn
setLoot E3 0B
setLoot 24 0D
setLoot 26 0D
setLoot 5C 0D
setLoot 56 0D
move 617,636,9
move 615,658,9
IfTrue (($countitems:{$_manapotionid$}$#number<#300) Goto $nlineoflabel:refill2$
move 632,660,9
move 631,672,9
IfTrue (($countitems:{$_manapotionid$}$#number<#300) Goto $nlineoflabel:refill2$
move 615,674,9
waitX 1
fastExiva >65
move 617,673,8
move 630,677,8
IfTrue (($countitems:{$_manapotionid$}$#number<#300) Goto $nlineoflabel:refill$
move 630,664,8
move 615,660,8
IfTrue (($countitems:{$_manapotionid$}$#number<#300) Goto $nlineoflabel:refill$
move 615,672,8
waitX 1
fastExiva >67
move 630,671,9
IfTrue (($countitems:{$_manapotionid$}$#number<#300) Goto $nlineoflabel:refill2$
move 636,648,9
gotoscriptline 0
:refill
move 615,672,8
waitX 1
fastExiva >67
move 630,671,9
:refill2
move 637,645,9
fastExiva >66
move 640,635,8
move 640,628,8
waitX 1
useItem 640,627,8
move 640,622,8
waitX 1
fastExiva >65
move 793,937,7
waitX 1
fastExiva >66
move 338,31365,9
move 314,31356,9
move 308,31357,9
waitX 1
fastExiva >65
move 308,31353,8
waitX 1
putLootOnDepot
waitX 1
move 308,31355,8
waitX 1
fastExiva >67
move 313,31354,9
fastExiva _mana = $numericalexp:{$_manas$}-{$countitems:{$_manapotionid$}$}$
fastExiva _manacost = $numericalexp:{$_mana$}*{$_idcost$}$
saymessage hi
waitX 2
sayInTrade deposit all
waitX 1
sayInTrade yes
waitx 1
sayInTrade withdraw $_manacost$
waitX 1
sayInTrade yes
waitx 1
move 306,31354,9
move 305,31354,9
waitX 1
saymessage hi
waitx 2
sayInTrade trade
waitx 2
sayMessage exiva buy:EE 00:1300
waitx 1
sayMessage exiva buy:58 0C:5
waitX 1
move 321,31356,9
move 349,31377,9
move 363,31387,9
fastExiva >67
waitX 1
move 793,938,7
move 793,935,7
move 794,927,7
move 794,923,7
waitX 1
fastExiva >65
waitX 1
move 640,623,8
move 640,626,8
move 640,626,8
waitX 1
useItem 640,627,8
waitX 1
move 640,635,8
move 639,645,8
waitX 1
fastExiva >68
gotoscriptline 0

oclipper
11-13-2014, 10:19
look at this:

IfTrue (($countitems:{$_manapotionid$}$#number<#300) Goto $nlineoflabel:refill2$

Why two "(" on the left and one ")" in the right ?