Thread: Chown Command
View Single Post
Old 03-23-2003, 07:12 PM   #10
Verboden Faction
 
Posts: n/a
Actually, I figured it out. I run on rom24b6, here is what I used.

[code] void do_chown(CHAR_DATA *ch, char *argument)
{
CHAR_DATA *victim;
OBJ_DATA *obj;
char arg1[MIL];
char buf[MSL];
buf[0] = '\0';
bool found = FALSE;



argument = one_argument(argument,arg1);

if(IS_NULLSTR(arg1)){
send_to_char("chown <player> <item>\n\r", ch);
return;
}

if((victim = get_char_room(ch,arg1)) == NULL){
send_to_char("There is no such person.\n\r", ch);
return;
}

for(obj = victim->carrying; obj; obj = obj->next_content ){
if ( is_name( argument, obj->name )
&& can_see_obj( ch, obj ))
{
found = TRUE;
break;
}
}

if(!found){
send_to_char("They don't have that.\n\r", ch);
return;
}



obj_from_char( obj );
obj_to_char( obj, ch );
sprintf(buf, "You summon %s from %s.\n\r", obj->short_descr, victim->name);
send_to_char(buf, ch);
sprintf(buf,"You feel a light wind as %s floats into the hands of %s.\n\r",obj->short_descr,ch->name);
send_to_char(buf, victim);
return;
}
[/quote]
  Reply With Quote