Please, help.

Posted by Manakra on Sun 29 Aug 2004 09:12 AM — 4 posts, 17,046 views.

#0
I am trying to program a tracking trigger set, heres how it would work.

I would type Target <whoever>, such as Target Rabbit.

then whenever Targetted creature moves north,west,south,east,up,down, (and the other cardinals, like northwest), the client would follow them by typing that exact creature moves

so if Target Rabbit moves north, I would move north with it

Also, any trigger I have put in very recently, wont activate
Amended on Sun 29 Aug 2004 09:13 AM by Manakra
USA #1
Trigger: * moves *
Send: Keep blank
Label: Follow
Script: Target

VBScripting file needed.

Dim creature as string

Sub Target(a,b,c)
if creature = c(1) then
world.send c(2)
end if
end sub

Alias: Target *
Label: SetTarget
Script: SetTarget

In the scripting file:
Sub SetTarget(a,b,c)
creature = c(1)
end sub
#2
Thats perfect (I think, havent tested it yet) for what I am doing, but it doesnt answer me second question. I need to know why none of my newer triggers are activating. Like, I put a trigger in when I first got mushclient, and its still working, but my newer ones wont work.

Also, thanks for the very very quick response.

Also, I did not know what you meant by Dim Creature as string, I am literally, in all senses, new.

One more thing, could you be a bit more specific on where to put what, how to save what (such as triggers/scripts), etc
Love, Manakra.
Amended on Sun 29 Aug 2004 08:24 PM by Manakra
USA #3
Try this instead:

<aliases>
  <alias
   match="^target (.*?)$"
   enabled="y"
   echo_alias="y"
   variable="TargetCreature"
   regexp="y"
   send_to="9"
   ignore_case="y"
   sequence="100"
  >
  <send>%1</send>
  </alias>
</aliases>

<triggers>
  <trigger
   custom_colour="6"
   enabled="y"
   ignore_case="y"
   match="^@targetcreature moves (.*?)$"
   regexp="y"
   sequence="100"
  >
  <send>%1</send>
  </trigger>
</triggers>

Copy between <aliases> and </aliases> and click "paste" in the aliases dialog. Do the same with the trigger (copy between <triggers> and </triggers>

Also, if your trigger doesnt change the color of it, it isnt matching. Probably because theres a period at the end, or whatnot. If it tries to send a period (or does anything else weird/wrong), let us know, since we can fix it. Its just hard to make a trigger without specificities.