Please check out Serenity : The Firefly MUSH !

Member Discussions

terms



[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]


1. Dynamical delays Wed May 12, 2004 [6:10 AM]
ranka
rainer_roomet@hotmail.com
member since: Apr 24, 2004
Reply
I want to add dynamical delays into my MUD. It means when player insert one or two times same command then didn't get any delay. But if he start spamming same command (insert three or more times same command) then he got delay. It's good for killing things. Just like player types 'kill *an Orc*' and orc moves out from room comes text: 'They aren't here.' and player didn't get any delays. But if he spamm 'kill *an Orc' more than two times then he got delay.

Anyone have some ideas ?
Sorry for english.

The Lost Lands of Arion
telnet://irc.nohik.ee on port 4242


-- Ranka


2. RE: Dynamical delays Wed May 12, 2004 [8:43 AM]
Genghis
Email not supplied
member since: Mar 24, 2000
In Reply To
Reply
if (command == last command)
++command counter;
else
last command = command;

if (command counter > 3)
WAIT_STATE( ch, X );

Keyboard missing. Think F1 to continue.


3. RE: Dynamical delays Thu May 13, 2004 [7:33 PM]
muir
Email not supplied
member since: Sep 14, 2003
In Reply To
Reply
You left out an important bit:

if (command == last_command)
{
  ++same_command_counter;
}

else
{
  last_command = command;
  same_command_counter = 0
}

if (same_command_counter > 3)
...

.


4. RE: Dynamical delays Fri May 14, 2004 [7:59 AM]
Genghis
Email not supplied
member since: Mar 24, 2000
In Reply To
Reply
Ooops, hehe, that'll teach me for writing pseudocode while I'm feeding a baby.

g
Keyboard missing. Think F1 to continue.




[Previous] [Next] [Post] [Reply] [Topics] [Summary] [Search]