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
➜ One trigger, two different functions?
One trigger, two different functions?
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| forral
USA (79 posts) Bio
|
Date
| Tue 16 Feb 2010 05:54 PM (UTC) |
Message
| Hey all
I am trying to modify a script I had written for portal to adapt to mush. Very simply, its just capturing various lines of string and outputing the result to a notepad window while sailing, to keep track of ships sunk, gold-ingots recovered, etc.
My issue arises when I have the trigger:
The *(ship) to your *(direction) seems to have changed direction to intercept you.
I want this 1 trigger to have 2 different commands associated with it:
1)ship rigging combat
ship target attacker
ship speed slow
2) world.AppendToNotepad "Sailing Log", "Under attack from the %1 by a %2" + vbcrlf
The world.AppendtoNotepad would be sent to script, obviously, whereas the other one would be sent to the world itself.
Is this possible? I tried having duplicate triggers but it does #1, not #2. I tried putting the #2 code into the trigger but that sends to world, which isn't what I need.
Any advice on this is greatly appreciated
Sincerely,
Forral | Top |
|
Posted by
| Twisol
USA (2,257 posts) Bio
|
Date
| Reply #1 on Tue 16 Feb 2010 06:17 PM (UTC) |
Message
| Send to Script, and use Send("command") to send the commands in (1) to the MUD.
world.Send "ship rigging combat"
world.Send "ship target attacker"
world.Send "ship speed slow"
world.AppendToNotepad "Sailing Log", "Under attack from the %1 by a %2" + vbcrlf
MUSHclient would be pretty pathetic if it couldn't send commands from a script. :D |
'Soludra' on Achaea
Blog: http://jonathan.com/
GitHub: http://github.com/Twisol | Top |
|
Posted by
| Worstje
Netherlands (899 posts) Bio
|
Date
| Reply #2 on Tue 16 Feb 2010 07:07 PM (UTC) |
Message
| You can also have two different triggers, for example because you need to put them in different plugins or want to enable/disable them seperately. Make sure they both have 'Keep Evaluating' set on, that way the first won't block the second from firing. Using the Sequence box you can additionally specify the order in which they fire, a lower number will fire first. By default they'll have the same value, meaning the first one to fire is not strictly defined (but usually the same one). | 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.
13,541 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top