Register forum user name Search FAQ

Gammon Forum

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.
 Entire forum ➜ MUSHclient ➜ General ➜ Do nothing or do something what am i doing?

Do nothing or do something what am i doing?

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


Posted by TruckDriver22   Denmark  (22 posts)  Bio
Date Wed 17 Jun 2009 11:21 PM (UTC)
Message
This is my trigger now?

seq 100
^([[:alpha:]]+) is battling

group_table = group_table or {}
for i,v in pairs(group_table) do
if i == "%1" then
Send("join battle")
end


What i want is if 2 of the same people in my group_table are in the same line i don't want any action to take place but i cant seem to write it correctly. How do i make this trigger only go off if it matches and if it doesn't match then allow my other trigger to go off?

^([[:alpha:]]+) (is battlign) ([[:alpha:]]+)$

group_table = group_table or {}
for i,v in pairs(group_table) do
if i == "%1" then
for i,v in pairs(group_table) do
if i == "%3" then
end
end
end
end
or
for i,v in pairs(group_table) do
if i == "%1" then
Send("join battle")
end


Click bang... GAME OVER!
Top

Posted by WillFa   USA  (525 posts)  Bio
Date Reply #1 on Wed 17 Jun 2009 11:28 PM (UTC)
Message

if group_table["%1"] and not group_table["%3"] then
  Send "join battle"
end


does what you want, I think.

Top

Posted by TruckDriver22   Denmark  (22 posts)  Bio
Date Reply #2 on Thu 18 Jun 2009 12:27 AM (UTC)
Message
Yes that was it thanks now it works perfectly

Click bang... GAME OVER!
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.


12,937 views.

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

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.