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
➜ General
➜ trigger with variable
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Lxhd
(27 posts) Bio
|
Date
| Sat 15 Jun 2013 06:30 AM (UTC) |
Message
| I made a trigger as "(@myid)get some money!", and also set the trigger option of "Expand Variables" on. I also set a variable "myid" in mushclient as "jamie|edwin".But the trigger didn't work in mush when the output got the sentence,such as "jamie get some money".Would you please help me find some kind of solution? thanks. | Top |
|
Posted by
| Fiendish
USA (2,536 posts) Bio
Global Moderator |
Date
| Reply #1 on Sat 15 Jun 2013 06:53 AM (UTC) |
Message
| Show actual mud output, please. Copy/paste a page of what the server sends you that includes the line you want to capture. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #2 on Sun 16 Jun 2013 09:40 AM (UTC) |
Message
| Also show this trigger:
 |
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
|
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Lxhd
(27 posts) Bio
|
Date
| Reply #3 on Mon 17 Jun 2013 06:02 AM (UTC) |
Message
| this is the trigger:
</trigger>
<trigger
custom_colour="7"
enabled="y"
expand_variables="y"
group="cap"
make_underline="y"
match="^( |>)*【jmlz】Hua yu\(Hua yu\):@playercn finished the jumi task and get \S+$"
name="jiumi"
regexp="y"
script="cap_log"
sequence="100"
>
this is the variable:
<variable name="playercn">(lxhd|jamie|james|edwin)</variable>
I just want to make a trigger with a variable to math the similar sentence occured with different id's name.But, unfortunately, the trigger didn't work. Thanks in advance. | Top |
|
Posted by
| Fiendish
USA (2,536 posts) Bio
Global Moderator |
Date
| Reply #4 on Tue 18 Jun 2013 01:33 PM (UTC) |
Message
| Show the actual mud output, please. |
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Randomcho
China (9 posts) Bio
|
Date
| Reply #5 on Fri 05 Jul 2013 01:36 PM (UTC) Amended on Fri 05 Jul 2013 01:54 PM (UTC) by Randomcho
|
Message
| 哈哈,楼主是大唐西游记的九迷机器吧?
你的问题
1.首先你确定变量是是lua的variable,还是mushclient的variable.
2.还有的就是你的id的格式是id1|id2|id3是不?也就是说你的变量出来是个正则表达式(id1|id2|id3).这样你想id1 id2 id3 都能用这个触发.
其实你可以这么做.
第一种:你可以用SetVariable("playcn",WorldName()),这种方法要求你world的name要保证使这个角色的name.
第二种我没试过:我觉得因该是
idlist = "id1|id2|id3"
SetVariable("playcn","("..idlist..")")
第三种最简单
Hua yu\(Hua yu\):(.+) finished the jumi task and get \S+$
function xxxx(name,line,wildcards)
local t = {"id1","id2","id3"}
if ismember(wildcards[1],t) then
Execute("what u want do")
end
end
function ismember(name, t) --it can put in global.lua
local ret = nil;
local t1;
if type(t) == "table" then
t1 = t;
else
t1 = utils.split(t,"|");
end
for i=1,#t1 do
if name == t1[i] then
ret = i;
return ret;
end
end
return ret;
end
| Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #6 on Sun 07 Jul 2013 07:07 AM (UTC) |
Message
|
Lxhd said:
this is the trigger:
</trigger>
<trigger
custom_colour="7"
enabled="y"
expand_variables="y"
group="cap"
make_underline="y"
match="^( |>)*【jmlz】Hua yu\(Hua yu\):@playercn finished the jumi task and get \S+$"
name="jiumi"
regexp="y"
script="cap_log"
sequence="100"
>
this is the variable:
<variable name="playercn">(lxhd|jamie|james|edwin)</variable>.
 |
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
|
|
- 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.
25,611 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top