Re: Object damage code...

From: Zizazat Lazuras (zizazat@INAV.NET)
Date: 08/23/97


> > if (IS_NPC(tmp_char) || !IS_NPC(tmp_char))
> >    return;
>
> Oh yeah, that will work. :)

(This is someone else's code...) But when I was looking at that statement,
it looks kinda pointless to me...but it was part of a posted correction
from the author.


> if (GET_OBJ_TSLOTS(tmp_object) == 101)
>   sprintf(buf, "This looks indestructable!\r\n");
> else if (GET_OBJ_TSLOTS(tmp_object) <= 10)
>   sprintf(buf, "This looks in extremely poor condition.\r\n");
> else if (GET_OBJ_TSLOTS(tmp_object) <= 20)
>   sprintf(buf, "This looks in poor condition.\r\n");
> ...
> send_to_char(buf);
> return;

Ok, I see where you are going with this and will give it a try.

> OR
>
> You can make a 'const char *mesg' and just do:
> mesg = "This looks indestructible\r\n";
>
> then:
> send_to_char(mesg);
>
> That'll save the time of copying the constant string into the variable.

This I am less clear on, but I have some ideas about what you are saying.
I think if I get it working the other way first I may come back to this.
;)

--Ziz, NetShamen
Eternal Empire MUD
empire.zonenet.net 2000


     +------------------------------------------------------------+
     | 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/08/00 PST