This is fairly easy:

Go look at the drop command for the mud for dropping a item to the ground.
You would simply replace the call to obj_to_room with obj_to_char....

Basically you would need to do the following:

check to see you have a valid entry for victim and the object
See if the player is online and gain access to their char information or
execute your database entry commands to gain access to the database.

Check security either by the stock trust, or where I have a security system
setup.

cycle through the objects the char has.. make sure you do obj_next_content
and not obj_next.
you may wanna store it and change it inside the for loop and not as part of
the for loop as if you
actually remove something the loop will break

for ( obj = ch->carrying; obj; obj = obj_next )
    obj_next = obj->obj_next_content;

then see if the object's name matches the obj's name
 basically use is_name for this...

if so
obj_from_char
obj_to_char
print appropiate messages
set some sort of boolean to know you found it.

----
unless get out of the loop, check the boolean to see if you found it, and
then print a message if they didn't find the object.

Pretty simple function

Steven Radziul
Redkoala Mud Creator








----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, July 03, 2003 5:49 PM
Subject: need help with putting a command together


> My idea is for a command called confinscate. Pretty straight forward,
forces a players item or object to be removed from them, going straight to
the immortal that typed the command.
>
> example Syntax:
> confinscate <item name> <character name>
> the character see's
> Atm has confinscated <item name> from you.
> or if the imm is wizi
> <Item name> has been confinscated from you.
>
>
> thanks for any help or any starting code you can help me work up.
>
> __________________________________________________________________
> McAfee VirusScan Online from the Netscape Network.
> Comprehensive protection for your entire computer. Get your free trial
today!
> http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397
>
> Get AOL Instant Messenger 5.1 free of charge.  Download Now!
> http://aim.aol.com/aimnew/Aim/register.adp?promo=380455
>
> -- 
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom


Reply via email to