Help with using wildcards in triggers

Posted by Salmonrose80 on Thu 16 Jun 2011 04:12 PM — 3 posts, 15,137 views.

#0
Hi,
I'm new with MUSHclient and I do not know anything about programming. So please bear with me when I ask a noob question.

My goal: set a trigger to report % of a spell to my teammate when he pages me.

Trigger: report spell *
Send:
spell %1

Example: if my teammate page me and say 'report spell sloth', I will do 'spell sloth' which show the following in the MUD

Level Spell Pct Cost Spell Pct Cost
===============================================================================
Lvl 29: sloth 73% 30 mana


I know I need more then the one-liner spell %1 to achieve the above goal. But I can't even get 'spell %1' to work. Please help.

It would be great if you can also show me a code/script (or whatever it is supposed to call) to do the above. Thanks alot.
USA Global Moderator #1
It looks to me like you're being bitten by this:

https://code.google.com/p/aardwolfclientpackage/wiki/Triggers#I_tried_making_a_trigger_but_it_isn%27t_firing._The_pattern_i

MUSHclient's trigger patterns are implicitly anchored on both ends unless you specify otherwise in the pattern. So a pattern of 'report spell *' will not match on "Soandso pages you 'report spell foo'.

But it's hard to say unless you copy/paste exact examples of the text coming from the MUD when your friend pages you and exact information about the trigger you've tried to set up. See here:

http://mushclient.com/forum/bbshowpost.php?bbsubject_id=11162
Amended on Thu 16 Jun 2011 04:48 PM by Fiendish
#2
Thanks for the link. There is a lot of info (good info) on there and it will take me a long while to absorb all those.

Actual output as following.

When I teammate pages me, I see:

GingerGirl tells you 'report spell sloth'


Command spell sloth show me:

Level Spell Pct Cost Spell Pct Cost
===============================================================================
Lvl 29: sloth 79% 30 mana


I want to be able to page my teammate back and report my spell %, example, tell GingerGirl sloth 79%

How can I do this? Thanks again.
Note: There are a lot of options for triggers like 'Send to' can be 'World', 'Execute', 'Script' etc. And options to toggle 'Regular Expression'. I read the help file about those and tried many combination of these options, yet, nothing works for me so far.