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
➜ VBscript
➜ Absolute Beginners Guide to a Simple Timer
Absolute Beginners Guide to a Simple Timer
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Smurfette
(5 posts) Bio
|
Date
| Fri 20 May 2005 03:52 PM (UTC) |
Message
| Okay fellas, smart people, and scholars. I have a very simple question which has confused me and I just can't seem to get what I'm doing. I've a very amatuer VBscript writer, but I don't know how to go about doing this:
I want a script that watches for this text from the MUD:
You begin casting a mighty
When the script sees that text, it begins a counter that counts off 30 seconds.
At the end of the thirty seconds, it prints a local echo of:
YOU'RE NOW ABLE TO CAST MIGHTY AGAIN (in bold red text)
This way, I can see when I am able to use this spell again, and nothing extra is sent TO the mud.
As I said, I know it's a very simple process, but I don't know exactly how to script it, and I'm not sure how to put this into the MUSHClient to make it work.
Thanks so much to anyone who can help. I've searched on this problem but other similar solutions are much more complicated!
-Smurfette
| Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #1 on Fri 20 May 2005 08:42 PM (UTC) |
Message
| Im assuming that after mighty comes other stuff?
Like, You begin casting a mighty (potato) or whatever?
Or at the very least a period? What's the exact text from the server?
<triggers>
<trigger
enabled="y"
match="You begin casting a mighty *"
send_to="12"
sequence="100"
>
<send>DoAfterSpecial 30, "ColourNote ""red"", ""black"",""YOU'RE NOW ABLE TO CAST MIGHTY AGAIN"" ", 12</send>
</trigger>
</triggers>
That'll do it (provided things match).
No (real) scripting involved, just the ColourNote (and that just dictates the syntax). |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Smurfette
(5 posts) Bio
|
Date
| Reply #2 on Fri 20 May 2005 09:01 PM (UTC) |
Message
| okay, I was a bit vague. actually, this would be the exact input it would look for:
You begin casting stoneskin.
30 seconds after that, I want it to tell me locally that I can cast it again in bold red.
Also, I understand how the script you wrote works, but I don't understand how it gets enabled. Do I save this as a VBS file and load in into the scripts section or what? Sorry for such silly questions!
- Smurfette
| Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #3 on Fri 20 May 2005 10:04 PM (UTC) |
Message
| That's not a script. That's a trigger.
Copy between (including) <triggers> and </triggers> and then go to the trigger dialog (thats the one with the table/grid of the trigger things) and click the paste button (on the right side) and that should paste itself in there.
You'll can do the whole variable thing.
Change the match text (in the trigger, after it's pasted) to:
You begin casting *.
and then change the send text (that's the stuff that you see, to:
YOU'RE NOW ABLE TO CAST %1 AGAIN.
|
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Smurfette
(5 posts) Bio
|
Date
| Reply #4 on Fri 20 May 2005 10:22 PM (UTC) |
Message
| * Sigh *
I guess I'm not doing something right, cause it's still not working. When I do just what you say to do, it tells me:
Send-to-script cannot execute because scripting is not enabled.
So, I go into the trigger and change the "send to:" to "output".
Now, as soon as the the trigger sees the correct words come up, it INSTANTLY pastes into the output:
DoAfterSpecial 30, "ColourNote ""red"", ""black"",""YOU'RE NOW ABLE TO CAST Bedroom stoneskin"" ", 12
There is no timer working, it's instantanious, and there seems to be no reading of this code. Am I a hopeless case, or is there something very obvious I'm missing. by the way, I got the variable thing working, which is nice! Now i just need the timer thingie operating correctly.
-Smurfette | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #5 on Fri 20 May 2005 11:49 PM (UTC) |
Message
| You need to enable your script (and change it back).
Game > configure > scripting
Check the 'enable scripting' box. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| Smurfette
(5 posts) Bio
|
Date
| Reply #6 on Sat 21 May 2005 12:11 AM (UTC) |
Message
| It works!!!! Thank you Thank you Thank you!
-Smurfette | Top |
|
Posted by
| Smurfette
(5 posts) Bio
|
Date
| Reply #7 on Tue 31 May 2005 04:32 AM (UTC) |
Message
| Okay, I'm having great fun with all these, but I have a new problem. Here's what my trigger is looking for:
Your are completely digested.
Then, the trigger goes "You can eat now" 1 second after that.
I want there to be a message stating "Digested for 1 minute now" to occur after 60 seconds, also.
When I try to make two triggers off the same text, usually only the first one works. When I put the commands in the same trigger, they ALL go off at the same time, every time each of the times has been reached. (if that doesn't make sense, don't worry about it!)
Needless to say, I want to be able to make a trigger execute two or even three specific local echos. Can you help with this? Thankss!!
-Smurfette | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #8 on Tue 31 May 2005 04:47 AM (UTC) |
Message
| You'll need to use multiple DoAfters, like this:
<triggers>
<trigger
enabled="y"
match="You are completely digested."
send_to="12"
sequence="100"
>
<send>DoAfterSpecial 1, "ColourNote ""red"", ""black"",""You can eat now"" ", 12
DoAfterSpecial 60, "ColourNote ""red"", ""black"",""Digested for 1 minute"" ", 12</send>
</trigger>
</triggers>
That does two different DoAfter's each with their own time, and their own message.
Except, you may need to change the match text, since well, I wasn't sure if the 'Your are' was a typo or not. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | 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,595 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top