Author |
Message |
GBob Guest
Offline
|
Posted: Fri Oct 03, 2003 10:19 pm Post subject: One thing Im confused about... |
 |
|
|
|
In mervbot:
I dont understand how time things, I mean, for example:
How do I do something every X seconds?
How do I do something X seconds after command !Y?
Some more I forgot, but any help would be great...[/list] |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Fri Oct 03, 2003 11:13 pm Post subject: |
 |
|
|
|
Writing a dll?
In spawn.cpp look for EVENT_Tick, it triggers every second. There's also countdown[n], which decreases every second, so that's how you do #2.
Yay, I love it when the bot has built in features like this!  _________________ This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him. |
|
Back to top |
|
 |
GBob Guest
Offline
|
Posted: Fri Oct 03, 2003 11:24 pm Post subject: |
 |
|
|
|
Okay, I got that part. Now, for the second: I was thinking I could set a timer to X seconds on !Y, but that would reset the timer each time someone did !Y, I need it for each person who does it.... |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sat Oct 04, 2003 10:37 pm Post subject: |
 |
|
|
|
Set up a big countdown array? :-/ |
|
Back to top |
|
 |
k0zy Server Help Squatter

Gender: Joined: Jan 11 2003 Posts: 571 Location: Germany Offline
|
Posted: Sun Oct 05, 2003 3:49 am Post subject: |
 |
|
|
|
or "tag" the player using set_tag and get_tag |
|
Back to top |
|
 |
Cyan~Fire I'll count you!

Age:37 Gender: Joined: Jul 14 2003 Posts: 4608 Location: A Dream Offline
|
Posted: Sun Oct 05, 2003 12:23 pm Post subject: |
 |
|
|
|
And do a get_tag for every player in EVENT_Tick? I think that might be even more ineffecient. |
|
Back to top |
|
 |
k0zy Server Help Squatter

Gender: Joined: Jan 11 2003 Posts: 571 Location: Germany Offline
|
Posted: Sun Oct 05, 2003 1:39 pm Post subject: |
 |
|
|
|
I didn't say it's more efficent... Maybe it is, maybe not.
But i consider tagging as more secure and clean.
Because, when u define a huge countdown array...
Let's say countdown[50], what if there are suddenly more then 50 ppl in one arena? And if there are only 20, not even half of the array is used.
Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole.... |
|
Back to top |
|
 |
|