Help with a hunting trigger.

Posted by Layston on Sun 07 May 2006 09:22 PM — 4 posts, 14,826 views.

#0
I haven't been able to figure this out yet, but in Aardwolf there's a skill that allows you to hunt for mobs, and this is how it works:

Send: Hunt dog
Receive: 'The monstruous dog is West from here.'

This is kinda how it looks like. What I did is to write a trigger will go to the direction specified by the line and and the hunt the dog, but it won't send 'dog' only, it would send 'monstruous dog' Wich the client wouldn't recognize.

Wouldn't it be possible that after the direction that is sent, it could repeat the mob name I sent?

Layston - Aardwolf
Australia Forum Administrator #1
Well without actually sitting down and writing it, I would do something like this:

  1. Make an alias: hunt *

    This would remember what you are hunting and save it as a variable (dog in your case).
  2. Make a trigger: The * is * from here.

    When this matches you use the saved word (dog) rather than whatever matched the wildcard.
#2
I'm sorry, but I'm kinda new to Mush...

How can you save the name I putted in the Alias and send it to the trigger wich is going to do the next action and then use the variable I used to hunt to send the command again?

Sorry, I'm kinda confused here...
Australia Forum Administrator #3
Here - this is using Lua:


<aliases>
  <alias
   match="hunt *"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>
hunted = "%1"
Send ("%0")</send>
  </alias>
</aliases>


<triggers>
  <trigger
   enabled="y"
   match="The * is * from here."
   send_to="12"
   sequence="100"
  >
  <send>
Send ("%2")
Send ("hunt " .. hunted)</send>
  </trigger>
</triggers>



The alias saves what you are hunting in the (Lua) variable "hunted".

The trigger sends the direction (eg. West) and then sends "hunt " followed by whatever was in the hunted variable.