Crimson Wizard wrote:
>
> Got it working today, thanks to those that helped. I'll continue to work
> on this.. right now I know it works for items in inv, but I make no
> gaurantee about anything else.
**** I made it work for objs worn as well. If that is what you wanted (
I didn't read the other posts, sorry)
ACMD(do_chown)
{
struct char_data *victim;
struct obj_data *obj;
int i, k = 0;
two_arguments(argument, buf, buf2);
if (!*buf)
send_to_char("Syntax: chown <object> <character>.\r\n", ch);
else if (!(victim = get_char_vis(ch, buf2)))
send_to_char("No one by that name here.\r\n", ch);
else if (victim == ch)
send_to_char("Are you sure you're feeling ok?\r\n", ch);
else if (GET_LEVEL(victim) >= GET_LEVEL(ch))
send_to_char("That's really not such a good idea.\r\n", ch);
else if (!*buf2)
send_to_char("Syntax: chown <object> <character>.\r\n", ch);
else {
for (i = 0; i < NUM_WEARS; i++) {
if (GET_EQ(victim, i) && CAN_SEE_OBJ(ch, GET_EQ(victim, i)) &&
isname(buf, GET_EQ(victim, i)->name)) {
obj_to_char(unequip_char(victim, i), victim);
k = 1;
}
}
if (!(obj = get_obj_in_list_vis(victim, buf, victim->carrying)))
if (!k && !(obj = get_obj_in_list_vis(victim, buf, victim->carrying))) {
send_to_char("The player does not have that object.\r\n", ch);
return;
}
act("$n makes a magical gesture and $p flies from $N to
$m.",FALSE,ch,obj,
victim,TO_NOTVICT);
act("$n makes a magical gesture and $p flies away from you to
$m.",FALSE,ch,
obj,victim,TO_VICT);
act("You make a magical gesture and $p flies away from $N to
you.",FALSE,ch,
obj, victim,TO_CHAR);
obj_from_char(obj);
obj_to_char(obj, ch);
}
}
+------------------------------------------------------------+
| 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