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

Gammon Software Solutions forum

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

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Tips and tricks
. . -> [Subject]  Need trigger help
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Need trigger help
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please)
Maximum of 6000 characters. Text only please, no HTML.
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Nick Gammon   Australia  (19,188 posts)  [Biography] bio   Forum Administrator
Date Sat 10 Sep 2011 11:57 PM (UTC)  quote  ]
Message
Have you looked at this video about making an inventory alias?

http://www.gammon.com.au/forum/?id=9965

That shows the idea of capturing multiple lines.

If that doesn't help, please post what you have done already.

Forum users don't mind helping people get their scripts to work, but generally don't want to just write them "from scratch".

- Nick Gammon

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

Posted by Kaeltsw   (6 posts)  [Biography] bio
Date Sat 10 Sep 2011 06:32 PM (UTC)  quote  ]
Message
I am sorry man, I have kept at it but I just am struggling with the whole lua scripting and such I really could use the help and am struggling to understand the other files and everything i have even gone to the net to learn more of how ta work with lua and well, its not helping. I really can use your help. can you please show me how the coding would look?
[Go to top] top

Posted by Kaeltsw   (6 posts)  [Biography] bio
Date Wed 07 Sep 2011 12:44 AM (UTC)  quote  ]
Message
Well, I tried to do it but, for some reason i basically some how managed to make it so my trigger breaks the prog, not litterally but it is an infinite loop of runtime errors. So, um, sadly I will need to look to the brains and ask if you would be willing to write the script for me. I have zero scripting and or programing skills lolz.
[Go to top] top

Posted by Nick Gammon   Australia  (19,188 posts)  [Biography] bio   Forum Administrator
Date Tue 06 Sep 2011 08:47 PM (UTC)  quote  ]
Message
First read up on capturing multiple lines:

Template:faq=37 Please read the MUSHclient FAQ - point 37.


You would need something like that to capture each group member. You could make a table before starting, eg.


group = {}


Then for each trigger add that person's name to the table, eg.


table.insert (group, "%1")  -- where %1 is the name


Now when you get to the end of the group list (whatever you see at that point) you work through the table getting each name out, eg.


for k, v in pairs (group) do
  Send ("retie " .. v)
end -- for


There would be other ways, but this should get you started.

- Nick Gammon

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

Posted by Kaeltsw   (6 posts)  [Biography] bio
Date Tue 06 Sep 2011 03:08 PM (UTC)  quote  ]
Message
Hmm ok, sounds good. I have another question I am wanting to make an alias/trigger thing so that if I type retie in my command line it would retie any spells on everyone in my group normally i have ta type retie *person* and do that per person but I was hoping you know a way to alias or trigger it? the group displays as the following:



>Enguerrand's group:
Edmon hp:100% endur: 99% xp to level: 1040
Raal hp:100% endur: 99% xp to level: 1957
Pauly hp: 96% endur: 99% xp to level: 180
Arcanum hp:100% endur: 99% xp to level: 809
Enguerrand hp:100% endur: 99% xp to level: 1564



thast what I get every time I type group, and I am wanting it so that an alias will make a trigger do the retie work for the whole group, so it might have ta type group, then copy each name and then put it into the retie command but i just cammot make it work. Please help.
[Go to top] top

Posted by Nick Gammon   Australia  (19,188 posts)  [Biography] bio   Forum Administrator
Date Sat 03 Sep 2011 09:27 PM (UTC)  quote  ]
Message
Quite right.

I should point out that for two triggers with the same trigger sequence number the evaluation order is not defined.

Thus you should set them both to "keep evaluating" or, one day, adding a totally different trigger might change the evaluation order.

Or, give one a lower sequence number (eg. the logging one) and only mark that as "keep evaluating" so this problem doesn't bite you again in the future.

- Nick Gammon

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

Posted by Kaeltsw   (6 posts)  [Biography] bio
Date Sat 03 Sep 2011 08:53 PM (UTC)  quote  ]
Message
Yup,that did it, thanks.
[Go to top] top

Posted by Ircria   (24 posts)  [Biography] bio
Date Sat 03 Sep 2011 08:26 PM (UTC)  quote  ]
Message
If I understand the problem right, checking Keep Evaluating in either both or the first(working) trigger should fix this. This option allows other triggers to parse the same line of text after it's been matched once already.
[Go to top] top

Posted by Kaeltsw   (6 posts)  [Biography] bio
Date Sat 03 Sep 2011 08:19 PM (UTC)  quote  ]
Message
I have a capture trigger that captures the chat done in groups. the trigger line is "* tells the group '*'."
then it is %0 and send to notepad append. This works great, though I also am trying to make a trigger where "(Anyone) tells the group 'enter'." then it is ent sent to world.(Anyone) would be the name of person in group, though when I try to do this it will not work. I am wanting to basically run two triggers, one that is already working, the trigger to capture chat which appends to a notepad, am happy with that, but I also want one that will respond to tells the group 'enter'. want it to ent and I am not sure if I am explaining this properly or not, please help.
[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.


1,957 views.

[New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]