Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUSHclient
➜ Tips and tricks
➜ Need trigger help
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Kaeltsw
(6 posts) Bio
|
| Date
| Sat 03 Sep 2011 08:19 PM (UTC) |
| 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. | | Top |
|
| Posted by
| Ircria
(24 posts) Bio
|
| Date
| Reply #1 on Sat 03 Sep 2011 08:26 PM (UTC) |
| 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. | | Top |
|
| Posted by
| Kaeltsw
(6 posts) Bio
|
| Date
| Reply #2 on Sat 03 Sep 2011 08:53 PM (UTC) |
| Message
| | Yup,that did it, thanks. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #3 on Sat 03 Sep 2011 09:27 PM (UTC) |
| 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 | | Top |
|
| Posted by
| Kaeltsw
(6 posts) Bio
|
| Date
| Reply #4 on Tue 06 Sep 2011 03:08 PM (UTC) |
| 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. | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #5 on Tue 06 Sep 2011 08:47 PM (UTC) |
| Message
| First read up on capturing multiple lines:
You would need something like that to capture each group member. You could make a table before starting, eg.
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 | | Top |
|
| Posted by
| Kaeltsw
(6 posts) Bio
|
| Date
| Reply #6 on Wed 07 Sep 2011 12:44 AM (UTC) |
| 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. | | Top |
|
| Posted by
| Kaeltsw
(6 posts) Bio
|
| Date
| Reply #7 on Sat 10 Sep 2011 06:32 PM (UTC) |
| 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? | | Top |
|
| Posted by
| Nick Gammon
Australia (23,165 posts) Bio
Forum Administrator |
| Date
| Reply #8 on Sat 10 Sep 2011 11:57 PM (UTC) |
| 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 | | 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.
33,171 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top