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

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Trigger Issue (lusternia)
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Trigger Issue (lusternia)

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


Posted by Acekj   (7 posts)  [Biography] bio
Date Wed 10 Aug 2016 01:14 PM (UTC)

Amended on Wed 10 Aug 2016 08:31 PM (UTC) by Nick Gammon

Message
Hi all, wondering if someone could help me with this:

I've made a set of triggers in MushClient to basically rotate my influencing prompts for mobs. However, the system seems to have trouble picking up the lines that trigger the changes.

---

e.g. "You compliment" sends to script:
world.setvariable "infatt" , "admiration"

"You confide in" sends to script
world.setvariable "infatt" , "praise"

"You sing the praises" sends to script
world.setvariable "infatt" , "compliments"

then I keep hitting the alias which sends "influence @target with @infatt"

Now when I engage with mobs, it seems like it's only picking up the triggers sometimes, but not all the time. Is there something I need to change about the initial trigger line (like adding in (*.?) or ^??

Appreciate any help with this, thanks!

===

further e.g. from logs:


influence centaur with admiration
You confide in a centaur hunter how much you admire his dazzling mental and 
***CHANGING INF TO PRAISE***
physical skills.
A centaur hunter nods in agreement but avoids eye contact, looking somewhat 
embarrassed.
He pauses briefly as though considering what you said.
4260h, 3930m, 4314e, 10p, 17560en, 17560w x-

You have recovered equilibrium.
4260h, 3930m, 4314e, 10p, 17560en, 17560w ex-
influence centaur with praise
You sing the praises ((supposed to trigger here but didn't)) of the heroic exploits of a centaur hunter, recounting his 
many incredible adventures.
A centaur hunter nods in agreement but avoids eye contact, looking somewhat 
embarrassed.
He pauses briefly as though considering what you said.
4260h, 3930m, 3952e, 10p, 17560en, 17560w x-

You have recovered equilibrium.
4260h, 3930m, 3952e, 10p, 17560en, 17560w ex-
influence centaur with compliments
You compliment ((supposed to trigger here but didn't)) a centaur hunter on his outstanding intellect and physique.
A centaur hunter nods in agreement but avoids eye contact, looking somewhat 
embarrassed.
He pauses briefly as though considering what you said.
4260h, 3930m, 3653e, 10p, 17560en, 17560w x-

You have recovered equilibrium.
4260h, 3930m, 3653e, 10p, 17560en, 17560w ex-
influence centaur with admiration
You confide in a centaur hunter how much you admire his dazzling mental and 
***CHANGING INF TO PRAISE***
physical skills.
A centaur hunter puffs up his chest and a crazy gleam enters his eyes as he 
vigorously agrees with you that his intelligence and strength far surpass anyone
else's.


[EDIT] Code tags added.
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Wed 10 Aug 2016 08:30 PM (UTC)

Amended on Wed 10 Aug 2016 08:32 PM (UTC) by Nick Gammon

Message
Please post the actual triggers and aliases you are using:

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.


Also post the actual log output (not interspersed with your comments) so we can test against it.

- Nick Gammon

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

Posted by Acekj   (7 posts)  [Biography] bio
Date Reply #2 on Thu 11 Aug 2016 01:58 PM (UTC)
Message
Hi, sorry about that, and thanks for the pasting tips!

I did a few more tests and all the other influencing triggers seem to work against test mobs (for now).

Please find the triggers and output below for your reference:

 <triggers>
  <trigger
   custom_colour="5"
   enabled="y"
   expand_variables="y"
   group="InfluencingEmpower"
   ignore_case="y"
   make_underline="y"
   match="has a brave soul."
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>world.setvariable "infatt" , "compliments"
world.note "BRAVE: EMPOWER|WEAKEN"</send>
  </trigger>


  <trigger
   custom_colour="11"
   enabled="y"
   expand_variables="y"
   group="InfluencingEmpower"
   ignore_case="y"
   match="You compliment"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>world.setvariable "infatt" , "admiration"
world.note "***CHANGING INF TO ADMIRATION***"</send>
  </trigger>


  <trigger
   custom_colour="11"
   enabled="y"
   expand_variables="y"
   group="InfluencingEmpower"
   ignore_case="y"
   match="You confide in"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>world.setvariable "infatt" , "praise"
world.note "***CHANGING INF TO PRAISE***"</send>
  </trigger>
</triggers>


Example log:

influence lady with compliments
You compliment an elfen lady on her outstanding intellect and physique.
An elfen lady keeps asking herself why she considered giving so much away, and 
pays you no attention.
4260h, 3930m, 6669e, 10p, 17560en, 17560w x-

You have recovered equilibrium.
4260h, 3930m, 6807e, 10p, 17560en, 17560w ex-
influence lady with admiration
You confide in an elfen lady how much you admire her dazzling mental and 
***CHANGING INF TO PRAISE***
physical skills.
An elfen lady keeps asking herself why she considered giving so much away, and 
pays you no attention.
4260h, 3930m, 6807e, 10p, 17560en, 17560w x-

You have recovered equilibrium.
4260h, 3930m, 6807e, 10p, 17560en, 17560w ex-
influence lady with praise
You sing the praises of the heroic exploits of an elfen lady, recounting her 
***CHANGING INF TO COMPLIMENTS***
many incredible adventures.
An elfen lady keeps asking herself why she considered giving so much away, and 
pays you no attention.
4260h, 3930m, 6807e, 10p, 17560en, 17560w x-

You have recovered equilibrium.
4260h, 3930m, 6900e, 10p, 17560en, 17560w ex-
influence lady with compliments
You compliment an elfen lady on her outstanding intellect and physique.
An elfen lady keeps asking herself why she considered giving so much away, and 
pays you no attention.
4260h, 3930m, 6900e, 10p, 17560en, 17560w x-

You have recovered equilibrium.
4260h, 3930m, 6900e, 10p, 17560en, 17560w ex-


 analyze centaur
A centaur hunter has a brave soul. He is currently laidback.
BRAVE: EMPOWER|WEAKEN
4260h, 3930m, 6570e, 10p, 17560en, 17560w x-

You have recovered equilibrium.
4260h, 3930m, 6570e, 10p, 17560en, 17560w ex-

influence centaur with compliments
You compliment a centaur hunter on his outstanding intellect and physique.
A centaur hunter nods in agreement but avoids eye contact, looking somewhat 
embarrassed.
He pauses briefly as though considering what you said.
4260h, 3930m, 6284e, 10p, 17560en, 17560w x-

You have recovered equilibrium.
4260h, 3930m, 6284e, 10p, 17560en, 17560w ex-
influence centaur with compliments
You compliment a centaur hunter on his outstanding intellect and physique.
A centaur hunter nods in agreement but avoids eye contact, looking somewhat 
embarrassed.
He pauses briefly as though considering what you said.
4260h, 3930m, 5998e, 10p, 17560en, 17560w x-

You have recovered equilibrium.
4260h, 3930m, 5998e, 10p, 17560en, 17560w ex-

A centaur hunter demands of you, "What am I supposed to think of that?"
Your ego drains as you consider your response.
4260h, 3930m, 5782e, 10p, 17560en, 17560w ex-
influence centaur with admiration
You confide in a centaur hunter how much you admire his dazzling mental and 
***CHANGING INF TO PRAISE***
physical skills.
A centaur hunter nods in agreement but avoids eye contact, looking somewhat 
embarrassed.
He pauses briefly as though considering what you said.
4260h, 3930m, 5465e, 10p, 17560en, 17560w x-

You have recovered equilibrium.
4260h, 3930m, 5465e, 10p, 17560en, 17560w ex-
influence centaur with praise
You sing the praises of the heroic exploits of a centaur hunter, recounting his 
***CHANGING INF TO COMPLIMENTS***
many incredible adventures.
A centaur hunter nods in agreement but avoids eye contact, looking somewhat 
embarrassed.
He pauses briefly as though considering what you said.
4260h, 3930m, 5224e, 10p, 17560en, 17560w x-

You have recovered equilibrium.
4260h, 3930m, 5355e, 10p, 17560en, 17560w ex-
influence centaur with compliments
You compliment a centaur hunter on his outstanding intellect and physique.
A centaur hunter nods in agreement but avoids eye contact, looking somewhat 
embarrassed.
He pauses briefly as though considering what you said.
4260h, 3930m, 5099e, 10p, 17560en, 17560w x-

You have recovered equilibrium.
4260h, 3930m, 5099e, 10p, 17560en, 17560w ex-
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #3 on Thu 11 Aug 2016 08:47 PM (UTC)
Message
It seems to be working for me. In fact yours matched more than mine, in particular:


You sing the praises of the heroic exploits of a centaur hunter, recounting his 
***CHANGING INF TO COMPLIMENTS***
many incredible adventures.


Did you leave out one of the triggers?

Template:version Please help us by advising the version of MUSHclient you are using. Use the Help menu -> About MUSHclient.

- Nick Gammon

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

Posted by Acekj   (7 posts)  [Biography] bio
Date Reply #4 on Fri 12 Aug 2016 04:09 PM (UTC)

Amended on Fri 12 Aug 2016 04:15 PM (UTC) by Acekj

Message
Hi Nick, yes I did miss out a trigger there. I've done a few more tests and it really seems the Compliments -> Admiration -> Praise -> Compliments loop is the one with an issue.

I'm currently using Version 4.94

Not sure if its clashing with any one of my other triggers or I need to change the phrase which triggers it?

Could you also help to advise on what the difference is between a normal trigger line and a multi-trigger line, please?

Thank you for your help in advance again, sorry for the constant questions!

Please find another excerpt of all my influencing triggers and the test logs below:

(sorry I can't paste them all here as it exceeds the forum characters limit. Please find a link here:

https://docs.google.com/document/d/1hy_qqaNr-3ZVKHiXw_1_M_E3K836Y_JbAqujhuuq7Ns/edit?usp=sharing)
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #5 on Sat 13 Aug 2016 12:21 AM (UTC)
Message
A multi-line trigger invokes a multi-line regular expression checked on the last x lines (where x is the number of lines you specify). They aren't fabulously useful, but can sometimes be used where you are looking for a certain phrase that is usually split over two lines.

- Nick Gammon

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

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #6 on Sat 13 Aug 2016 12:23 AM (UTC)
Message
I tried your triggers and test data and it looked OK. Can you specify which one doesn't work?

I test with Ctrl+Shift+F12 (which you can too). I pasted the entire log into it, and saw quite a few matches. See which ones you think are not matching when you do that.

- Nick Gammon

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

Posted by Acekj   (7 posts)  [Biography] bio
Date Reply #7 on Sat 13 Aug 2016 01:43 AM (UTC)
Message
Hi Nick,

Thanks so much for your help!! I did a bunch of testing using the ctrl+shift+f12 function and I looked through the triggers and there were some overlapping ones afterall on the exact same phrases which was causing them not to map!

Silly mistake, issue resolved thank you!!

Would you be able to point me to which docs I should begin reading first from the quicklinks at the bottom of this page to learn more about how to script around the system and about Lua? (I'm playing around with a free system for the game and would like to pick up the basics about scripting here to enhance it further. Feeling a little behind not knowing what a 'regular expression' is besides knowing it has to be ticked for most triggers to function)
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #8 on Sat 13 Aug 2016 04:23 AM (UTC)
Message
A good starting point is my page on regexps:

Template:regexp Regular expressions
  • Regular expressions (as used in triggers and aliases) are documented on the Regular expression tips forum page.
  • Also see how Lua string matching patterns work, as documented on the Lua string.find page.



Also see my tutorials in the "Getting Started" part of this forum:

http://www.gammon.com.au/forum/bbshowpost.php?bbtopic_id=120

There are some videos there which walk through some of the basics.

You could also read the documentation pages in general:

http://www.gammon.com.au/scripts/doc.php

- Nick Gammon

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

Posted by Acekj   (7 posts)  [Biography] bio
Date Reply #9 on Sun 14 Aug 2016 10:41 AM (UTC)
Message
Perfect, thanks again!
[Go to top] top

Posted by Acekj   (7 posts)  [Biography] bio
Date Reply #10 on Thu 18 Aug 2016 04:28 PM (UTC)
Message
Hi all, just checking but I have a new issue with a further set of triggers:



<triggers>
  <trigger
   enabled="y"
   expand_variables="y"
   group="InfluenceEnd"
   match="is so caught up in admiring (himself|herself) that"
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>world.setvariable "infauto" , "0"
world.enabletrigger "autoinfluence", "0"
world.note "***Influence Mode Off***"</send>
  </trigger>

  <trigger
   custom_colour="5"
   enabled="y"
   expand_variables="y"
   group="InfluencingEmpower"
   ignore_case="y"
   make_underline="y"
   match="has a brave soul\."
   regexp="y"
   send_to="12"
   sequence="100"
  >
  <send>world.setvariable "infatt" , "compliments"
world.note "BRAVE: EMPOWER|WEAKEN"</send>
  </trigger>
</triggers>




These are basically to stop the auto-influencing triggers and also to solve for what the appropriate influencing attacks are for a certain mob.

Issue is, both trigger vs one mob, but not another, and I can't figure out why?



analyze centaur
A centaur hunter has a brave soul. He has an inflated sense of himself.
BRAVE: EMPOWER|WEAKEN
4380h, 3795m, 7100e, 10p, 18080en, 18080w x-

You have recovered equilibrium.
4380h, 3795m, 7100e, 10p, 18080en, 18080w ex-
influence centaur with compliments
You compliment a centaur hunter on his outstanding intellect and physique.
***CHANGING INF TO ADMIRATION***
A centaur hunter is so caught up in admiring himself that he barely notices you.
***Influence Mode Off***
4380h, 3795m, 7100e, 10p, 18080en, 18080w x-





4380h, 3965m, 3172e, 10p, 18080en, 18080w ex-
You sing the praises of the heroic exploits of a frost hag, recounting her many 
***CHANGING INF TO COMPLIMENTS***
incredible adventures.
A frost hag is so caught up in admiring herself that she barely notices you.
4380h, 3965m, 3172e, 10p, 18080en, 18080w x-

You have recovered equilibrium.
influence hag with compliments
4380h, 3965m, 3172e, 10p, 18080en, 18080w ex-
You compliment a frost hag on her outstanding intellect and physique.
***CHANGING INF TO ADMIRATION***
A frost hag is so caught up in admiring herself that she barely notices you.
4380h, 3965m, 3172e, 10p, 18080en, 18080w x-
***Influence Mode Off***

You have recovered equilibrium.
4380h, 3965m, 3172e, 10p, 18080en, 18080w ex-
analyze hag
A frost hag has a brave soul. She has an inflated sense of herself.
4380h, 3965m, 6367e, 10p, 18080en, 18080w x-
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #11 on Fri 19 Aug 2016 06:57 AM (UTC)
Message
Maybe another trigger is firing. Please use Game menu -> Trace to see what is happening.

- Nick Gammon

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

Posted by Acekj   (7 posts)  [Biography] bio
Date Reply #12 on Fri 19 Aug 2016 02:58 PM (UTC)

Amended on Fri 19 Aug 2016 03:00 PM (UTC) by Acekj

Message
thanks, solved! another query:

what's the difference between this:

 
sub TestRoutine (a, b, c)

end sub



and

 
sub TestRoutine 

end sub



I'm looking through a script already there and can't figure out what the (a, b, c) changes?
[Go to top] top

Posted by Nick Gammon   Australia  (21,322 posts)  [Biography] bio   Forum Administrator
Date Reply #13 on Fri 19 Aug 2016 10:24 PM (UTC)
Message
I strongly advise you to change to Lua rather than VBscript. It is much easier to use in many ways, and there are quite a few extra functions in MUSHclient targetted at Lua alone.

To answer your question, trigger and alias scripts expect three arguments: name, matching_line, wildcards. That would be the (a, b, c) in your example.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[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,201 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 FutureQuest]