Reply to this subject
Start a new subject
 
Refresh page
| Posted by |
David Berthiaume
(202 posts) bio
|
| Date |
Tue 12 Apr 2005 05:52 AM (UTC) [ quote
] |
| 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) [ quote
] |
| 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) [ quote
] |
| 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.
2,161 views.
Reply to this subject
Start a new subject
 
Refresh page
top
Comments to:
Gammon Software support
Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )