Re: [Newbie] [CODE]

From: John Woods (JWoodsIII@AOL.COM)
Date: 07/14/98


In a message dated 98-07-14 12:10:33 EDT, siv@CYBERENET.NET writes:

<< why don't you post that code?

 [code snipped]
 >                         next_d = d->next;
 >                         log("Checking to make sure RT >= 0.");
 >                         if (GET_RT(d->character) < 0) GET_RT(d->character)
= 0;
 >                         log("Subracting 1 from RT");
 >                         if (GET_RT(d->character) > 0) GET_RT(d->character)
-= 1;

 well..let me ask this: what are you trying to do? from what i can infer,
 you are trying to have a combat system that will use calculated speed
 rather than standard 2 second rounds..if this is the case, i'd
 suggest using the dg_event system to create events that will call the
 hit() func (or whatever)..it would be much less CPU intensive (no
 decrementation of a roundtime var)..i did this a while ago using events
 based on the dg system (extracted from the dg src, not the patch that is
 now available), but didn't like the feel of event based combat.. >>

I'm running a check on certain commands... ie do_kill, I might do this...
if (GET_RT(ch) < 0)
  GET_RT(ch) = 0;
else if (GET_RT(ch) == 0) {
 ...do_kill code...

The point is to regulate commands while someone's in roundtime. IE, someone
cast's a spell on something (offensive or non-offensive, whichever --ie
doesn't have to start a fight), and they can't type other offensive or
movement commands for x seconds. Get it?

I try to post help more than code, because I'm endeavoring to create a
completely original MUD (except for DG events, Regen, Color, and
Abbreviations). But if I post code it won't be original anymore. Hell, if I
didn't care about originality, I'd be glad to just ftp my MUD to
ftp.circlemud.org! Sorry guys. :-P

Thanx,
-Elrelet


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST