Trigger calling script to send multiple things

Posted by Jcet on Sat 10 Nov 2001 07:12 PM — 4 posts, 17,220 views.

USA #0
I cant get a trigger to work...... or atleast send it multiple times
trigger:
"( *) * is here."
script:
sub OnIG (Triggername, triggerline, arrWildCards)
Dim Sense
world.SetVariable "itemget", sense (Ubound (sense))
world.send "get " + world.getvariable ("itemget")
End Sub

i need the trigger to send the line depending on the number in the first wildcard... IE

(28) a Scouter is here.

i need it to split the first wild card(28) and send the like 28 times

if u cant understand what im sayin(I hardly do) then ill try to make it easier to understand.
Australia Forum Administrator #1
First question, does the trigger fire at all? You can tell this by getting it to colour the trigger line, and if it turns a different colour (say, red), then you know it fired.

If not, you might need to get rid of that space after the first bracket. ie. make it:


(*) * is here.


As for the script, I would do it a bit differently, like this:


sub OnIG (Triggername, triggerline, arrWildCards) 
Dim i
  For i = 1 to arrWildCards (1)
   World.Send "get " & arrWildCards (2)
  next
End Sub

USA #2
No you see, i need to combine those, the trigger works by itself
but i need it to multiply by how many is there, but it also needs to split it

ie
( 3) Android Eightteen's Pearl Necklace is here.

it wont match on to the whole name, you have to get get eighteen, or necklace
i need it too split it, AND multiply it
and the space thats there, ya ur right i should take it out cos thats where the second digit goes if there is one
USA #3
sub OnIG (Triggername, triggerline, arrWildCards)
Dim Sense
Sense = split (arrWildCards (2))
world.SetVariable "itemget", Sense (ubound (Sense))
Dim i
For i = 1 to arrWildCards (1)
World.Send "get " + world.getvariable ("itemget")
next
End Sub

turns out thats how u do what i just asked, toyed with it and got it to work 5 mins after i just posted ;)