Yeah, I know, which is why I corrected my initial, since he didn't have the
victim pointer.

His problem is that the object is called "the corpse of Dude", so he makes a
scalp, and has a scalp as "a scalp of the corpse of Dude". Basically, he'll
need to use str_replace in an empty string to replace "the corpse of" to ""
from the target object, in this case the corpse, which he -will- have a
pointer of, so now he has "Dude" as the string, and he can use that to
replace that in a sprintf.

Like I said, I didn't read the initial post well enough, so I had to
correct.

----- Original Message -----
From: "Dale" <[EMAIL PROTECTED]>
To: "Matthew Martin" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Monday, April 26, 2004 9:58 AM
Subject: Re: scalp command for scalping PC corpses


> Honestly don't listen to this idea,
> free_string(victim->name)......................... Um right so your going
to
> free the name value of the victim, why exactly?.
>
> Acctuly thinking now the easyest way to do this would be.
>
> char *name;
>
> name = &obj->short_descr[13];
>
> Just make sure that you do something like sprintf(buf, "the scale of blah
> %s", name);
>
> BEFORE you extract the corpse object other wise it wouldn't be good to
keep
> that name pointing to that spot of the objects short description.
>
> ----- Original Message -----
> From: "Matthew Martin" <[EMAIL PROTECTED]>
> To: "Rainer Roomet" <[EMAIL PROTECTED]>; <[email protected]>
> Sent: Monday, April 26, 2004 7:45 AM
> Subject: Re: scalp command for scalping PC corpses
>
>
> > OBJ_DATA *scalp;
> > char buf[MSL]; (or 20, we have MSL defined as max string length)
> > // If you have mem issues, uncomment the next line
> > //free_string(victim->name)
> > sprintf(buf, "the scalp of %s", victim->name);
> > scalp->short_descr = str_dup(buf);
> >
> >
> > -Crypt
> >
> > ----- Original Message -----
> > From: "Rainer Roomet" <[EMAIL PROTECTED]>
> > To: <[email protected]>
> > Sent: Monday, April 26, 2004 9:30 AM
> > Subject: scalp command for scalping PC corpses
> >
> >
> > > I want to add scalp command for scalping PC corpses. I can do it but i
> > have
> > > one problem.
> > > For example:
> > > if in room is corpse named:
> > > ---------------------------------
> > > The corpse of Test is lying here.
> > > scalp corpse
> > > You start scalping corpse of Test balalalalal....
> > > And then you got scalp, and scalp name have to be same what is corpse
> > name;
> > > for example
> > >
> > > the scalp of Test
> > > ------------------------------------------------------
> > > But when i scalp corpse, then scalp name is "the scalp of Ranka"; My
> name
> > is
> > > ranka who scalping corpse.
> > >
> > > Anyone can tell me how i can change scalp name to victim->corpse name
?
> > >
> > >
> > > P.S. artifact works perfectly for now; Thanks for everyone.
> > >
> > > _________________________________________________________________
> > > Add photos to your messages with MSN 8. Get 2 months FREE*.
> > > http://join.msn.com/?page=features/featuredemail
> > >
> > >
> > > --
> > > ROM mailing list
> > > [email protected]
> > > http://www.rom.org/cgi-bin/mailman/listinfo/rom
> > >
> >
> > --
> > ROM mailing list
> > [email protected]
> > http://www.rom.org/cgi-bin/mailman/listinfo/rom
> >
>
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>

Reply via email to