This is with V6
Here is what I added:
into find_replacement():dg_scripts.c - in the object section:
else if (!str_cmp(field, "worn_by"))
{
if(o->worn_by != NULL)
{
log("worn: %s",GET_NAME(o->worn_by));
sprintf(str,"%c%ld",UID_CHAR, GET_ID(o->worn_by));
}
else
{
strcpy(str,"");
}
}
else if (!str_cmp(field, "carried_by"))
{
if(o->carried_by != NULL)
{
log("carr: %s",GET_NAME(o->carried_by));
sprintf(str,"%c%ld",UID_CHAR, GET_ID(o->carried_by));
}
else
{
strcpy(str,"");
}
}
My builders wanted random trigger that could see who had the item and
where.
the script used to test this is:
Name: 'Regen_ring', VNum: [33218], RNum: [ 585]
Trigger Intended Assignment: Objects
Trigger Type: Random , Numeric Arg: 100, Arg list: None
a ring of regeneration [33202]
Commands:
set worn %self.worn_by%
%echo% ring worn by %worn.name%
set carried %self.carried_by%
%echo% ring carried by %carried.name%
for a player, (even when the obj is on the ground) I get:
>
Ring worn by Masque
Ring carried by Masque
May 5 09:43:09 :: carr: Masque
Mobs get:
> give ring dmi
You give a ring of regeneration to Dmitri.
>
Ring worn by Dmitri
Ring carried by
May 5 09:44:14 :: carr: Dmitri
> fo dmi wear ring
Okay.
Dmitri slides a ring of regeneration on to his right ring finger.
>
Ring worn by
Ring carried by Dmitri
May 5 09:44:27 :: worn: Dmitri
*BOGGLE*
The log statements are working correctly. This is all I get when I am
carrying the item:
May 5 09:34:29 :: carr: Masque
Can you seen what I am doing wrong? or is something really strange
going on in the dg-scripts?
--Angus
"Mark A. Heilpern" <heilpern@mindspring.com> on 05/04/99 06:51:43 PM
I've just uploaded pl7 and pl7a. Pl7 is for use with
bpl14 muds (or older), and pl7a will patch cleanly
into a bpl15 mud. Both of these have Oasis in them,
so if you've already got Oasis, be prepared for reject
files. (There is also a pl6->pl7 patch.)
Download from:
http://www.mindspring.com/~heilpern/dg_scripts/downloads.html
Read about what's new at:
http://www.mindspring.com/~heilpern/dg_scripts/what_s_new.html
As always, bug reports to me.
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST