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
➜ someone help! I dunno how to script
someone help! I dunno how to script
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Excalibur
(4 posts) Bio
|
Date
| Sun 02 Mar 2003 10:03 PM (UTC) |
Message
| I'm looking for a way to eaisly tally backstabs, trips, throws, and steals on the mud I play (Darklord). I basically just want the total # of stabs, trips, throws, and steals i hit/miss. Since I have no clue how to script, and assuming none of you play darklord, I'll be as basic as I can and help as much as possible, and hopefully someone can help me out?
Here is some MUD output for backstab (we have multiple messages):
message #1:
A Citizen of the Republic shudders as you bury Stealth up to the hilt in his back.
message #2:
The Pleb makes a strange gurgling noise as you stab him in the back.
message #3:
The Pleb screams in pain as you stab him in the back.
message #4:
You try to stab the Pleb, but nearly cut your own finger.
Here is some MUD output for trip (not many of these):
message #1:
You manage to trip your victim!
message #2:
Damn! You clumsily fail your trip and fall down yourself.
Here is some MUD output for throw:
message #1:
You miss by a yard!
message #2:
Three-prong dagger hits a Citizen of the Republic right in the abdomen.
(but it can hit multiple places, such as right arm, left arm, right thigh, left thigh, right food, left foot, right leg, left leg, nose, face)
Here is some MUD output for steal:
message #1:
You failed to get any gold... (meaning they had no gold)
message #2:
You have been noticed!
message #3
Bingo! You stole XXXXX gold coins.
Well, If you need anything else to work with, just ask. Some one please help me set some decent counters! THANKS!!!
| Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #1 on Tue 04 Mar 2003 02:14 AM (UTC) |
Message
| I would make some triggers that match the messages, replacing the variable bits with an asterisk, eg.
* shudders as you bury * up to the hilt in * back.
* makes a strange gurgling noise as you stab * in the back.
* screams in pain as you stab * in the back.
(and so on)
Each of these could call the same script, for instance in VBscript:
sub onbackstab (name, line, wildcards)
dim count
count = CInt (world.GetVariable ("stabs"))
count = count + 1
world.SetVariable "stabs", count
world.SetStatus count & " backstabs"
end sub
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Excalibur
(4 posts) Bio
|
Date
| Reply #2 on Tue 04 Mar 2003 02:21 AM (UTC) |
Message
| Sorry to be such a burden but, I really have no idea what im doing what so ever. You lost me after "each of these could call up a VBscript" *Cry* | Top |
|
Posted by
| Krenath
USA (76 posts) Bio
|
Date
| Reply #3 on Thu 06 Mar 2003 10:35 PM (UTC) |
Message
|
Save the following text in the MUSHclient script file. (control-shift-H) will usually bring it up. Just paste this at the bottom and save (control-S)
sub onbackstab (name, line, wildcards)
dim count
count = CInt (world.GetVariable ("stabs"))
count = count + 1
world.SetVariable "stabs", count
world.SetStatus count & " backstabs"
end sub
Now go make triggers for each of the following patterns, but in the "Script:" box, type onbackstab. You don't need to put anything in the "Send:" box
* shudders as you bury * up to the hilt in * back.
* makes a strange gurgling noise as you stab * in the back.
* screams in pain as you stab * in the back.
Each time a trigger matching one of the above patterns is called, it'll run the subroutine you pasted into the MUSHclient scriptfile. It'll update the count of backstabs and print the total in the status bar as "15 backstabs"
|
- Krenath from
bDv TrekMUSH
ATS TrekMUSH
TNG TrekMUSE
TOS TrekMUSE | 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.
14,368 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top