Hey what's up, I've got this script to scroll through a list of things I have in my inventory (corpses), record the numbers of them, then do spam offer (corpse) searching through an array. Here's my code:
Which works fine and dandy, except if I have a lot of corpses, like 20 or so corpses, in which it'll offer up 15 or so corpses, then stop. And I'll have to send something through. Here's the output on the next post:
Quote:
<aliases>
<alias
script="corpse_start"
match="^offer\:all$"
enabled="y"
group="script-offer"
regexp="y"
ignore_case="y"
keep_evaluating="y"
sequence="100"
>
</alias>
</aliases>
<triggers>
<trigger
custom_colour="17"
group="script-offer"
keep_evaluating="y"
match="^\"(.*?)\"(\s+)the corpse of"
name="corpse_trigger"
regexp="y"
script="corpse_add"
sequence="100"
other_text_colour="gray"
other_back_colour="white"
>
</trigger>
<trigger
group="script-offer"
keep_evaluating="y"
match="^You are wearing\:$"
name="offer_prompt"
regexp="y"
script="corpse_offer"
sequence="100"
>
</trigger>
</triggers>
Dim Corpses()
Redim Corpses(0)
Sub Corpse_start (a,b,wildcard)
World.Send "config pagelength 250"
World.Send "ii corpse"
World.EnableTrigger "corpse_trigger", TRUE
World.EnableTrigger "offer_prompt", TRUE
End Sub
Sub Corpse_add (a,b,wildcard)
ub = ubound(Corpses)
If ub = 0 and isempty(Corpses) then
Corpses(0) = wildcard(1)
Else
redim Preserve Corpses(ub+1)
Corpses(ub+1) = wildcard(1)
End If
End Sub
Sub Corpse_offer (a,b,wildcard)
World.ColourNote "black", "white", "-Offering corpses-"
ub = ubound(corpses)
For i = 1 to ub step 1
World.Send "offer " & Corpses(i)
Next
World.EnableTrigger "corpse_trigger", FALSE
World.EnableTrigger "offer_prompt", FALSE
World.Send "config pagelength 20"
redim Preserve Corpses(0)
End SubWhich works fine and dandy, except if I have a lot of corpses, like 20 or so corpses, in which it'll offer up 15 or so corpses, then stop. And I'll have to send something through. Here's the output on the next post: