Trinitis
09-13-2003, 07:50 PM
Ok, so porcell gave me this script to help me count items in a container..but he said I'd have to fiddle with it cause it counts everything twice..well, yes it does. Figured someone here might be able to tell me whats going on, cause I've been fighting with it all bloody day.
-The Script-
#Count Items in Container
if_1 goto Start
echo Useage: .count container "full item name here"
exit
Start:
counter set 0
save %1
shift
goto Check
Check:
put prep 416
waitfor Your spell
put cast at my %s
put mana
CheckNext:
echo 1
match AddOne %1
match Done Mana Points:
matchwait
Addone:
echo 2
counter add 1
goto CheckNext
Done:
echo 3
echo
echo Counter is %c
exit
(Note : I added the echo 1, echo 2, and echo 3 trying to debug it..)
When the script runs, it does this.
.count pouch ruby
[Press the ESCape key to abort script.]
prep 416
[Script]>You gesture and invoke the powers of the elements for the Piercing Gaze spell...
Your spell is ready.
cast at my pouch
mana
1
[Script]>Violetgypsy put an enruned monir trunk in a battered iron box that is on the ground.
[Script]>
You gesture at an elegant black silk gem pouch.
You gaze at the pouch and see. . .
An elegant black silk gem pouch which contains:
A spiked onyx scarab (in)
A sky-blue glaes scarab (in)
An emerald (in)
A spiked onyx scarab (in)
A small white pearl (in)
A pink sapphire (in)
A star sapphire (in)
A violet sapphire (in)
A star sapphire (in)
A star sapphire (in)
2
1
A star ruby (in)
2
1
2
1
A star ruby (in)
2
1
Cast Roundtime 3 Seconds.
[Script]>
3
Counter is 4
[Script finished!]
Mana Points: 246 remaining: 226
Any of you scriptoids have any ideas? :P
-Adredrin
-The Script-
#Count Items in Container
if_1 goto Start
echo Useage: .count container "full item name here"
exit
Start:
counter set 0
save %1
shift
goto Check
Check:
put prep 416
waitfor Your spell
put cast at my %s
put mana
CheckNext:
echo 1
match AddOne %1
match Done Mana Points:
matchwait
Addone:
echo 2
counter add 1
goto CheckNext
Done:
echo 3
echo
echo Counter is %c
exit
(Note : I added the echo 1, echo 2, and echo 3 trying to debug it..)
When the script runs, it does this.
.count pouch ruby
[Press the ESCape key to abort script.]
prep 416
[Script]>You gesture and invoke the powers of the elements for the Piercing Gaze spell...
Your spell is ready.
cast at my pouch
mana
1
[Script]>Violetgypsy put an enruned monir trunk in a battered iron box that is on the ground.
[Script]>
You gesture at an elegant black silk gem pouch.
You gaze at the pouch and see. . .
An elegant black silk gem pouch which contains:
A spiked onyx scarab (in)
A sky-blue glaes scarab (in)
An emerald (in)
A spiked onyx scarab (in)
A small white pearl (in)
A pink sapphire (in)
A star sapphire (in)
A violet sapphire (in)
A star sapphire (in)
A star sapphire (in)
2
1
A star ruby (in)
2
1
2
1
A star ruby (in)
2
1
Cast Roundtime 3 Seconds.
[Script]>
3
Counter is 4
[Script finished!]
Mana Points: 246 remaining: 226
Any of you scriptoids have any ideas? :P
-Adredrin