Hi I'm having trouble writing a trigger

Posted by Kayze on Tue 18 Jul 2023 03:57 AM — 9 posts, 18,916 views.

#0
It's been about 15 years since I used mushclient and I used to have a lot of triggers for the game I play Dark Legacy. I'm trying to write a trigger for a treasure map falling on the floor


Example : A childish treasure map falls on to the floor.

There are childish, simple, stained, and tattered and I'm trying to make it so my character picks it up but I'm really rusty and I've tried variations of

A * treasure map falls on to the floor. - Trigger line

but I cannot figure out the rest I've read all the tutorials and watched a couple of videos and I apologize in advance and appreciate any help, thank you


-Kayze
Australia Forum Administrator #1
It's not clear what exactly is going wrong. Can you please paste the entire trigger here?

Template:copying
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
#2
A * treasure map falls on to the floor.

is the line I'm using. The trigger line would be: A simple treasure map falls on to the floor. But there are variables simple/tattered/cryptic/ancient/childish etc and I'm not sure how to write the trigger for a variable

Like I could write a trigger for each kind of map, the send would be: Take map, put map maps(my bag). I was asking if I could get the correct syntax for the trigger for it being variable. If that helps. Like what I would write as the trigger line and the send is what I was asking for.


When I fish from a well in my game, if I catch a treasure map it falls on to the floor, I want to take that map automatically using the trigger and put it in my bag labeled "MAPS"
Amended on Tue 18 Jul 2023 06:58 PM by Kayze
Australia Forum Administrator #3
Please follow my link above and post the actual trigger. It should have XML stuff in it.
#4

<triggers>
  <trigger
   enabled="y"
   group="Fishing"
   match="A * treasure map falls on to the floor."
   sequence="100"
  >
  <send>take map 
put map MAPS</send>
  </trigger>
</triggers>
Amended on Tue 18 Jul 2023 10:00 PM by Nick Gammon
Australia Forum Administrator #5
That looks OK. What is going wrong? Is it not matching?

Please copy and paste an actual example of lines from the MUD that sbould match it.
#6
Yeah it's not working I dont know why one of my friends said to write it: Take %1

Actual lines:
5376hp 3301m 3191mv>
A simple treasure map falls onto the floor.
A childish treasure map falls onto the floor.
5376hp 3301m 3191mv>
Australia Forum Administrator #7
Your trigger has "falls on to the floor" - the MUD sends "falls onto the floor". There is a difference.
#8
Omg lol.. ty man, and ty for making musshclient, I've used it since my early 20s(I'm 40) :)