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
➜ This should be easy
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| David Berthiaume
(202 posts) Bio
|
Date
| Tue 12 Apr 2005 05:52 AM (UTC) |
Message
| But I can't figure it out.
I want to write a script, that when I type: flip
It'll then emote me pulling a coin out, and flipping it. While the coin is in the air, it'll make me randomly call out heads or tails, then randomly pick heads or tails.
I'd like to space this out, so that it does something like this:
Character pulls out a shiny coin and flips it into the air.
Character says '<heads or tails>'
Character catches the flipping coin and displays, <heads or tails>.
I'd prefer to write this in VB if possible. Thanks. I am not even sure where to start. Oh yeah, and I'd like it to be an alias that executes the script. | Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #1 on Tue 12 Apr 2005 08:18 AM (UTC) |
Message
| This will work:
<aliases>
<alias
match="flip"
enabled="y"
send_to="12"
sequence="100"
>
<send>send "emote Pulls out a coin."
Randomize
If (Rnd >=.5) THEN
DoAfter 1,"emote calls heads."
Else
DoAfter 1,"emote calls tails."
End If
If (Rnd >=.5) THEN
DoAfter 3,"emote catches the coin and displays heads."
Else
DoAfter 3,"emote catches the coin and displays tails."
End If</send>
</alias>
</aliases>
Randomize Seeds the generator, Rnd returns x where 0<=x<1 (normally you do something like Int(rnd*6)+1 for a die, but since we dont need a number, this gives us 50% on both sides of the coin.
And obviously, you can change the doafter times and the exact wording. |
~Flannel
Messiah of Rose
Eternity's Trials.
Clones are people two. | Top |
|
Posted by
| David Berthiaume
(202 posts) Bio
|
Date
| Reply #2 on Wed 13 Apr 2005 02:33 AM (UTC) |
Message
| That. Is perfect... I was thinking of something a little different though. But that easily accomplishes what it is I want to do. | 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,902 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top