Re: [CODE][Newbie]for loops and perform_give

From: Alvoria MUD (
Date: 12/22/96

On Sun, 22 Dec 1996, Peter Hartman wrote:
> ok two questions actually.
> First:
> this is pretty inefficient:
> for (p=0; p<50; p++)
>  p++; 
> all i wanna do is make the talker pause a little before saying her next
> sentence.  Any ideas on a more efficient way?  Thanks.

Well, if you're referring to that talking spec_proc I made... um.. it's
not possible (well, not easily possible.) The loop you have above will
stall the entire mud, which is not something you want to do :P. The
problem is that the mud runs on a loop, constantly checking all the
connections for I/O, updating zones, etc...; and that spec_procs
themselves are called only once every 8-10 sec... (I don't remember the
stock value cause I changed mine..). Technically you could work something
up where you have a static linked list of 'conversations' the talker has
to process (probably better to attach them to the mob itself rather than 1
huge list) and add stuff for multi-line responses.

> secondly:
> Havent looked that hard but i can't find the function to have a mobile
> give something to someone.  Thanks for any help there.

There is no 1 function to do that, you could write your own though
by using these commands... (ch being the char, and obj being the obj.)
Of course, you'd probably want to check if the obj is equipped, etc...
on the mob.

obj_to_char(obj, ch);

Alvoria MUD -- "I delayed clans... and the players made their own.. hrmpf"
  Address   -- telnet://
  Homepage  --
  Host Site --

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

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