I'm sure this is a dumb trigger question...

Posted by Shenennigans on Sun 02 Aug 2020 02:20 PM — 3 posts, 13,697 views.

#0
A little preface: I haven't played a MUD in ~20 years and suddenly remembered they were a thing. Downloaded MUSHclient and am playing Realms of Despair. I know next to nothing about scripting/MUDing/SMAUG/clients lol. I read the documentation first, but I'm clearly misinterpreting something.

So, I'm trying to make a trigger that picks up my weapon when disarmed and wields it. The text looks like "The crab guard DISARMS your hammer!". I set the trigger for "DISARMS your *", then in Send:
get %1
wield %1

It doesn't seem to do anything at all. Send to: is set to world, no match conditions, enabled. Not sure what I'm doing wrong.
#1
Ok I've kinda/sorta got it. I found this post https://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=4543
that straightened me mostly out. I have to manually set the weapon variable since the weapon is "an oar" and to get it you have to just say "oar". Not sure how to get rid of the "an" in a way that would work for other weapons that don't have that, say just "hammer" or something. Not super important though, whenever I change weapons just update my variable.
Australia Forum Administrator #2
It's strange that it didn't do anything at all. Try showing the whole thing:

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.


Quote:

I set the trigger for "DISARMS your *", then in Send:
get %1


That won't match: "The crab guard DISARMS your hammer!"

It needs to be more like:


* DISARMS your *!


The trick is to take an example message, and put asterisks where the variable stuff is. Then of course your weapon is %2 and not %1.