huckler
02-03-2011, 20:26
Semi complex script I made. It hunts the sewers under thais for money and eats cheese from rats. 1.5k exp/h on a lvl 11 pally using spears.
The starting point of the script: Go down the sewer grate immediately to the left of Thais depot.
I also made a custom set of conditions that, when you run out of spears, it switches to a specifed weapon until you have more spears, at which time it will switch back to spears. Currently the backup weapon is a Morning Star (D2 0C).
It buys 6 spears from Galuna and then goes back to hunting. If you change the amount of spears, make sure it is divisible by 3, otherwise the script will be caught in an endless loop.
rats.txt
setChaoticMovesON
fastExiva _spearid = CD 0C
# How many spears do you have?
fastExiva _spears = 6
# How much does 1 spear cost?
fastExiva _idcost = 9
setBot AutoEatFood=1
setBot OldLootMode=1
setLoot CD 0C
setLoot D7 0B
setAny
setMeleeKill rat
setMeleeKill cave rat
setMeleeKill spider
setMeleeKill bat
onGMpause
setFollow
setLootDistance 3
setChaoticMovesON
IfTrue ($countitems:{$_spearid$}$#number<#$_spears$) Goto $nlineoflabel:refill$
move 32339,32226,8
move 32329,32215,8
move 32337,32214,8
move 32340,32214,8
move 32349,32214,8
move 32356,32214,8
move 32368,32211,8
move 32368,32195,8
move 32368,32190,8
move 32351,32190,8
move 32338,32189,8
move 32368,32189,8
move 32369,32198,8
move 32368,32213,8
move 32389,32214,8
move 32416,32214,8
move 32422,32220,8
move 32424,32233,8
move 32425,32252,8
move 32405,32256,8
move 32397,32256,8
move 32385,32252,8
move 32378,32252,8
move 32363,32251,8
move 32352,32251,8
move 32339,32250,8
move 32339,32270,8
move 32338,32264,8
move 32336,32248,8
move 32315,32248,8
move 32307,32249,8
move 32302,32255,8
move 32304,32249,8
move 32327,32248,8
move 32337,32248,8
move 32339,32228,8
move 32339,32226,8
gotoScriptLine 0
:refill
setChaoticMovesOFF
fastExiva _spears = $numericalexp:{$_spears$}-{$countitems:{$_spearid$}$}$
fastExiva _spearcost = $numericalexp:{$_spears$}*{$_idcost$}$
useItem 32339,32226,8
move 32339,32229,7
saymessage hi
waitX 2
sayInTrade deposit all
waitX 1
sayInTrade yes
waitx 1
sayInTrade withdraw $_spearcost$
waitX 1
sayInTrade yes
waitx 1
#IfFewItemsGoto D7 0B,$_spearcost$,$nlineoflabel:huntLoop$
move 32338,32233,7
move 32338,32242,7
move 32342,32248,7
move 32349,32246,7
move 32350,32245,6
move 32345,32245,6
move 32343,32244,6
saymessage hi
waitx 2
fastExiva > 96 04 $hex-tibiastr:trade$
waitx 2
fastExiva > 07 00 7A $_spearid$ 00 $numbertohex2:{$numericalexp:{$_spears$}/3$}$ 00
fastExiva > 07 00 7A $_spearid$ 00 $numbertohex2:{$numericalexp:{$_spears$}/3$}$ 00
fastExiva > 07 00 7A $_spearid$ 00 $numbertohex2:{$numericalexp:{$_spears$}/3$}$ 00
waitx 1
move 32350,32245,6
move 32350,32247,7
move 32344,32247,7
move 32339,32249,7
move 32338,32243,7
move 32338,32232,7
move 32338,32227,7
move 32339,32226,8
gotoScriptLine 0
conditions.txt
Replace D2 0C with the ID of your backup weapon. Make sure it is in an open backpack.
$countitems:CD 0C$
#number=#
0
200
5000
0
exiva #D2 0C 06
$myhppercent$
#number<=#
60
200
5000
0
exiva #D2 0C 06
$myhppercent$
#number<=#
60
200
5000
0
exiva #CD 0C 0A
$countitems:CD 0C$
#number>#
0
200
5000
0
exiva #CD 0C 06
$myhppercent$
#number>#
60
200
15000
1
exiva > 0F 00 78 FF FF 0A 00 00 CD 0C 00 FF FF 03 00 00 99
I've let it run for a couple hours and it works fine, made around 700gp in an hour. Not too bad for a lvl 11 haha.
The starting point of the script: Go down the sewer grate immediately to the left of Thais depot.
I also made a custom set of conditions that, when you run out of spears, it switches to a specifed weapon until you have more spears, at which time it will switch back to spears. Currently the backup weapon is a Morning Star (D2 0C).
It buys 6 spears from Galuna and then goes back to hunting. If you change the amount of spears, make sure it is divisible by 3, otherwise the script will be caught in an endless loop.
rats.txt
setChaoticMovesON
fastExiva _spearid = CD 0C
# How many spears do you have?
fastExiva _spears = 6
# How much does 1 spear cost?
fastExiva _idcost = 9
setBot AutoEatFood=1
setBot OldLootMode=1
setLoot CD 0C
setLoot D7 0B
setAny
setMeleeKill rat
setMeleeKill cave rat
setMeleeKill spider
setMeleeKill bat
onGMpause
setFollow
setLootDistance 3
setChaoticMovesON
IfTrue ($countitems:{$_spearid$}$#number<#$_spears$) Goto $nlineoflabel:refill$
move 32339,32226,8
move 32329,32215,8
move 32337,32214,8
move 32340,32214,8
move 32349,32214,8
move 32356,32214,8
move 32368,32211,8
move 32368,32195,8
move 32368,32190,8
move 32351,32190,8
move 32338,32189,8
move 32368,32189,8
move 32369,32198,8
move 32368,32213,8
move 32389,32214,8
move 32416,32214,8
move 32422,32220,8
move 32424,32233,8
move 32425,32252,8
move 32405,32256,8
move 32397,32256,8
move 32385,32252,8
move 32378,32252,8
move 32363,32251,8
move 32352,32251,8
move 32339,32250,8
move 32339,32270,8
move 32338,32264,8
move 32336,32248,8
move 32315,32248,8
move 32307,32249,8
move 32302,32255,8
move 32304,32249,8
move 32327,32248,8
move 32337,32248,8
move 32339,32228,8
move 32339,32226,8
gotoScriptLine 0
:refill
setChaoticMovesOFF
fastExiva _spears = $numericalexp:{$_spears$}-{$countitems:{$_spearid$}$}$
fastExiva _spearcost = $numericalexp:{$_spears$}*{$_idcost$}$
useItem 32339,32226,8
move 32339,32229,7
saymessage hi
waitX 2
sayInTrade deposit all
waitX 1
sayInTrade yes
waitx 1
sayInTrade withdraw $_spearcost$
waitX 1
sayInTrade yes
waitx 1
#IfFewItemsGoto D7 0B,$_spearcost$,$nlineoflabel:huntLoop$
move 32338,32233,7
move 32338,32242,7
move 32342,32248,7
move 32349,32246,7
move 32350,32245,6
move 32345,32245,6
move 32343,32244,6
saymessage hi
waitx 2
fastExiva > 96 04 $hex-tibiastr:trade$
waitx 2
fastExiva > 07 00 7A $_spearid$ 00 $numbertohex2:{$numericalexp:{$_spears$}/3$}$ 00
fastExiva > 07 00 7A $_spearid$ 00 $numbertohex2:{$numericalexp:{$_spears$}/3$}$ 00
fastExiva > 07 00 7A $_spearid$ 00 $numbertohex2:{$numericalexp:{$_spears$}/3$}$ 00
waitx 1
move 32350,32245,6
move 32350,32247,7
move 32344,32247,7
move 32339,32249,7
move 32338,32243,7
move 32338,32232,7
move 32338,32227,7
move 32339,32226,8
gotoScriptLine 0
conditions.txt
Replace D2 0C with the ID of your backup weapon. Make sure it is in an open backpack.
$countitems:CD 0C$
#number=#
0
200
5000
0
exiva #D2 0C 06
$myhppercent$
#number<=#
60
200
5000
0
exiva #D2 0C 06
$myhppercent$
#number<=#
60
200
5000
0
exiva #CD 0C 0A
$countitems:CD 0C$
#number>#
0
200
5000
0
exiva #CD 0C 06
$myhppercent$
#number>#
60
200
15000
1
exiva > 0F 00 78 FF FF 0A 00 00 CD 0C 00 FF FF 03 00 00 99
I've let it run for a couple hours and it works fine, made around 700gp in an hour. Not too bad for a lvl 11 haha.