[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  VBscript
. . -> [Subject]  Counting down

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Counting down
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Xinphinity   USA  (26 posts)  [Biography] bio
Date Tue 09 Apr 2002 11:42 PM (UTC)  quote  ]
Message
Well dont do it for me, it was no big deal and a big help.

;)

~Xin
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Tue 09 Apr 2002 10:47 PM (UTC)  quote  ]
Message
Ah that will teach me to code without testing first. :)

I'll amend the post.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Xinphinity   USA  (26 posts)  [Biography] bio
Date Tue 09 Apr 2002 03:39 PM (UTC)  quote  ]
Message
Nick that was just what I needed.

Except, *bops you*,
it's World.EnableTimer "timer", TRUE|FALSE!!
The code you posted crashed the Client...;)

No big deal the code was still just what i needed.


Thanks much.

~Xin
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Tue 09 Apr 2002 12:24 AM (UTC)  quote  ]

Amended on Tue 09 Apr 2002 10:48 PM (UTC) by Nick Gammon

Message
You can use world.setstatus to put messages on the status line. This might be helpful here.

I would add a timer, that fires every second. This timer would query a variable (time to go), and draw on the status line. Then when the variable became negative, you would disable the timer.

eg.


dim secs
  secs = world.getvariable ("seconds")
  secs = secs - 1
  if secs < 0 then  
    world.setstatus "Done" 
    world.enabletimer "thistimer", false ' disable timer
  else
    world.setstatus "Time to go = " & secs & " seconds"
    world.setvariable "seconds", secs
  end if

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Magnum   Canada  (580 posts)  [Biography] bio
Date Mon 08 Apr 2002 11:16 PM (UTC)  quote  ]
Message
From the main mushclient page, click on the link to 'all functions'. It's on the left side, near the bottom.

On the next page, click the link to list them all alphabetically.

Check out World.AddTimer and World.Note. There are some related timer functions that will be listed when you check out AddTimer.

The tools lie there for you to learn about and use. ...or you could wait for someone to write the script here for you. I don't have time right now.

Get my plugins here: http://www.magnumsworld.com/muds/

Constantly proving I don't know what I am doing...
Magnum.
[Go to top] top

Posted by Xinphinity   USA  (26 posts)  [Biography] bio
Date Mon 08 Apr 2002 08:17 PM (UTC)  quote  ]
Message
Me again.

Okay here is the scenario. I get a message that says -

Roundtime: 6 seconds.

I know i can get, and am getting the numeric 6 into a var, but what I want to do is output to the screen in a countdown either

Roundtime: 6...5....4....3...2...1 Done.

Or, ick,
RoundTime: 6
5
4
3
2
1
Done

Any ideas or suggestions on this one?

~Xin
[Go to top] 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,129 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]