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
➜ Script help
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| LindZ
(7 posts) Bio
|
Date
| Fri 22 Nov 2002 01:39 PM (UTC) |
Message
| Hey there people. I have a script in mind. I know what I want it to do but not how to write it (Still getting to grips with scripting :). Wondered if anyone could point me in the right direction. I have an attack combo that I am working on. The first attack (attack A) bounces me into an adjacent location of my choosing. The second attack (attack B) then returns me to the location from which I executed the original attack.
So what I am looking for is a script that would execute the exits command which would bring up the text:
"You see exits leading a, b, and c."
Maybe use a wildcard on the first exit (say it is east), execute the attack A and specify that direction (east).
Then wait for me to regain my balance at which point this text will appear:
"You have recovered balance on all limbs."
Then execute the attack B which would remember the direction of my opponent (west of me).
The only porblem with this is that the exits text and the balance text are quite common so the triggers for them would have to switch on (probably trigger on the attack A command) and then switch off after the second attack (probably trigger on the attack B command). Any ideas as to how I could do this?
Any advice/suggestions would be highly appreciated.
Thanks for now,
LindZ. | Top |
|
Posted by
| Jeffrey F. Pia
(49 posts) Bio
|
Date
| Reply #1 on Fri 22 Nov 2002 09:03 PM (UTC) |
Message
|
One idea would be to have a trigger fire on the exits text and send %1 to a variable (say we call it AtkDir):
<trigger
enabled="y"
match="^You see exits leading (.+), .*/.$"
regexp="y"
name="AtkDir"
send_to="9"
sequence="100"
>
<send>%1</send>
</trigger>
Then have an alias for your attack sequence that used that variable:
<alias
match="Atk"
enabled="y"
expand_variables="y"
ignore_case="y"
>
<send>Attack @AtkDir
</alias>
Finally have one more trigger that fires when you regain your balance and calls a script to determine the direction opposite of your initial attack and send off your second attack:
<trigger
enabled="y"
match="You have recovered balance on all limbs."
name="AtkDir2"
script="AtkDir2"
sequence="100"
>
</trigger>
Sub AtkDir2(a, b, c)
Select Case UCase(World.GetVariable(AtkDir))
Case "NORTH"
World.Send "Attack2 South"
Case "SOUTH"
World.Send "Attack2 North"
Case "WEST"
World.Send "Attack2 East"
Case "EAST"
World.Send "Attack2 West"
End Select
End Sub
I'm coding this off the top of my head as I don't have the client installed here at work, and the syntax may be off a tad. Hopefully it is enought to point you in the right direction. | 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.
10,897 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top