Trigger/alias help needed

Posted by Victory on Wed 12 Jun 2002 05:34 AM — 8 posts, 27,865 views.

USA #0
i've tried, i can't script, thats final! anyone willing to help me make this work?
the farsight trigger i need..

need it to turn on when i type fs

cast "farsight"

need it to match
You can momentarily see in all directions..

trigger on
*Baron Dude* <some place>

send
gtell *Baron Dude <place>

and then turn itself off.

any help is appriciated..
-Vic
Australia Forum Administrator #1
The first part is easy, the alias:


<aliases>
  <alias
   match="fs"
   enabled="y"
  >
  <send>cast &quot;farsight&quot;</send>
  </alias>
</aliases>


Quote:

need it to match

You can momentarily see in all directions


What do you want to do when that matches? Turn on detection of Baron Dude?

Now for the triggers:


<triggers>
  <trigger
   custom_colour="1"
   match="^\*Baron Dude\* (.*?)$"
   name="BaronDudeTrigger"
   regexp="y"
   script="OnBaronDudeTrigger"
   sequence="100"
  >
  <send>gtell *Baron Dude* %1</send>
  </trigger>
  <trigger
   custom_colour="2"
   enabled="y"
   match="You can momentarily see in all directions"
   name="FarSiteTrigger"
   regexp="y"
   script="OnFarSiteTrigger"
   sequence="100"
  >
  </trigger>
</triggers>


And a bit of scripting to make it work ...


sub OnBaronDudeTrigger (sName, sLine, wildcards)
  world.enabletrigger "BaronDudeTrigger", vbFalse
end sub

sub OnFarSiteTrigger (sName, sLine, wildcards)
  world.enabletrigger "BaronDudeTrigger", vbTrue
end sub
Australia Forum Administrator #2
And just to give you an idea of how that will look when plugins work, here is the same thing as a plugin ...


<muclient>
<plugin 
  name="Baron_Dude"
  author="Nick Gammon"
  language="vbscript"
  purpose = "Find that Baron Dude"
  id = "5ba4633a105829f800796d53"
  >
</plugin>

<aliases>
  <alias
   match="fs"
   enabled="y"
  >
  <send>cast &quot;farsight&quot;</send>
  </alias>
</aliases>

<triggers>
  <trigger
   custom_colour="1"
   match="^\*Baron Dude\* (.*?)$"
   name="BaronDudeTrigger"
   regexp="y"
   script="OnBaronDudeTrigger"
   sequence="100"
  >
  <send>gtell *Baron Dude* %1</send>
  </trigger>
  <trigger
   custom_colour="2"
   enabled="y"
   match="You can momentarily see in all directions"
   name="FarSiteTrigger"
   regexp="y"
   script="OnFarSiteTrigger"
   sequence="100"
  >
  </trigger>
</triggers>

<script>
sub OnBaronDudeTrigger (sName, sLine, wildcards)
  world.enabletrigger "BaronDudeTrigger", vbFalse
end sub

sub OnFarSiteTrigger (sName, sLine, wildcards)
  world.enabletrigger "BaronDudeTrigger", vbTrue
end sub
</script>

</muclient>
USA #3
thanks, but something is wrong..

You can momentarily see in all directions..
*Baron Beaver* Entrance to the Training Tower
gtell {RNAME:{Y *Baron Beaver* Tower Entrance to the Training* Tower

*Lord Michelangelo* Main Street of Cairn
*Duke Yang* Entrance to the Training Tower
*Duke Booyah* Entrance to the Training Tower

doesn't do them all, any ideas?
USA #4
it'll do the other names also, but it only does the first on in the output, such as that one was *Baron Beaver*, next time around it does *Duke Yang* and so on, but it will not send all the names..
Australia Forum Administrator #5
When you said:

trigger on
*Baron Dude* <some place>

I thought you only wanted that guy. Maybe if you said:

*<some person>* <some place>

Anyway, change the name to a wildcard, and to stop it only doing the first, remove the script reference (which was turning off the trigger), like this:


<triggers>
  <trigger
   custom_colour="1"
   match="^\*(.*?)\* (.*?)$"
   regexp="y"
   sequence="100"
  >
  <send>gtell *%1* %2</send>
  </trigger>
</triggers>
#6
i have a hunt comand that hunts multiple enemies and creatures

ex: You see tracks of *Baron Whoever* leading west from here.

to

gtell tracks of *Baron Whoever* > west (or whatever direction)

but i dont want to pick up creatures that dont have astricks around them
USA #7
Yo Victory do you play AoW cause that looks really fimalliar