I am not POSITIVE that this isn't already added, in some form, but... a client lag system. Basically, you call the proc cntlag, and it temporarily lags the client from any input (but they can still see server output, such as battle messages and chat) for the specified time, similar to sleep. Maybe you can use sleep for this in some way I don't know about? If anyone has any info on this particular topic, please respond :P
Polatrite, Assassin of the Sun
ID:137184
Jan 28 2002, 4:29 pm
|
|
Jan 28 2002, 4:33 pm
|
|
There's a movement delay code in the FAQ.
|
In response to Nadrew
|
|
Not just movement delay, EVERYTHING delay.
|
In response to Polatrite
|
|
tick_lag
|
In response to Nadrew
|
|
I still do not think you quite understand what I am talking about, so let me clarify this a little better.
Your in a battle, and you cast a spell, this spell so drains you, that you can't do _ANYTHING_ else for 3 seconds. After the three seconds is up, whatever command you tried to do (queued), are then executed. Another example: an implementor(IMP, GM) decides that he needs to freeze you up for a few seconds so he can ban you, because you've been acting like a moron and spamming *cough cough*. They use the addlag imp command, freeze you for 10 seconds, while they manage to dish out whatever punishments they feel necessary. |
In response to Polatrite
|
|
Polatrite wrote:
They use the addlag imp command, freeze you for 10 seconds, while they manage to dish out whatever punishments they feel necessary. Yep, I could find uses for this as well. Heh, I actually wrote up a tiny demo of how to simulate lag... it involved creating tens and tens of objects on the dude and then deleting them. Of course, it lagged the whole server, but that's beside the point. ;) |
In response to Polatrite
|
|
*nod* You dont even have to use sleep or spawn for this. Just a timer var.
For instance: (and dont cut / paste, cuz Im doin this offa the top of my head and I havent touched dreammaker for about a month or so >:P ) mob var/actiontimer verb/Dowhateveritisyou'redoing If world.time >= actiontimer then usr << "You've done whatever it is your doing!" usr << "... But you'll be tired for 3 seconds!" actiontimer = world.time + 3 else usr << "You're still tired!" Should get the general idea across @.@ Personally I think a lot of cases where sleep and spawn are normally used would be much better served with a timer comparison like this.. couple extra lines of code maybe, but Im assuming sleep and spawn run in loops, and get a lot of players running a lot of loops and it could really slow down the system ^^;;; Hope its helpfull. Elorien |
In response to Elorien
|
|
Lol.... I already have a system like this... oh well, I take it such a feature is NOT added, and I do hope that Dantom (yes, you guys) will add such a thing within the next version! Nifty nifty.
|
In response to Polatrite
|
|
Why build it in when you can code it, I hope you're not that lazy.
|
In response to Nadrew
|
|
If it's really worth doing, isn't it worth making easier?
Note: this is a quote, not nessissarily my personal opinion. I beleive I heard it from Deadron. -LoW |