[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Hi I'm having trouble writing a trigger

Hi I'm having trouble writing a trigger

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Kayze   (5 posts)  [Biography] bio
Date Tue 18 Jul 2023 03:57 AM (UTC)
Message
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
[Go to top] top

Posted by Nick Gammon   Australia  (22,966 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Tue 18 Jul 2023 07:39 AM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Kayze   (5 posts)  [Biography] bio
Date Reply #2 on Tue 18 Jul 2023 06:51 PM (UTC)

Amended on Tue 18 Jul 2023 06:58 PM (UTC) by Kayze

Message
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"
[Go to top] top

Posted by Nick Gammon   Australia  (22,966 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Tue 18 Jul 2023 08:16 PM (UTC)
Message
Please follow my link above and post the actual trigger. It should have XML stuff in it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Kayze   (5 posts)  [Biography] bio
Date Reply #4 on Tue 18 Jul 2023 09:23 PM (UTC)

Amended on Tue 18 Jul 2023 10:00 PM (UTC) by Nick Gammon

Message

<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>
[Go to top] top

Posted by Nick Gammon   Australia  (22,966 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Tue 18 Jul 2023 10:01 PM (UTC)
Message
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.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Kayze   (5 posts)  [Biography] bio
Date Reply #6 on Wed 19 Jul 2023 12:41 AM (UTC)
Message
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>
[Go to top] top

Posted by Nick Gammon   Australia  (22,966 posts)  [Biography] bio   Forum Administrator
Date Reply #7 on Wed 19 Jul 2023 12:56 AM (UTC)
Message
Your trigger has "falls on to the floor" - the MUD sends "falls onto the floor". There is a difference.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Kayze   (5 posts)  [Biography] bio
Date Reply #8 on Wed 19 Jul 2023 01:27 AM (UTC)
Message
Omg lol.. ty man, and ty for making musshclient, I've used it since my early 20s(I'm 40) :)
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


3,315 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]