delitem()
¶
Warning
This page may contain outdated information, incompatible with the current version of Hercules and its coding standards.
Syntax¶
Description¶
This command will take a specified amount of given item from the invoking character character. The items are destroyed - there is no way an NPC can simply own and have an inventory of items, other than by destroying and recreating them when needed.
Before items are deleted, the script should check, if the player has given amount of items. If there are not enough items, they are deleted anyway, but the script is terminated with an error then, to prevent exploits. If the specified item does not exist, nothing will be deleted, but the script is terminated with an error as well.
If account id
is given, the items are deleted from the character, which is currently online on that account instead. If the player is not online, the script terminates.
Examples¶
Info
Removes 10 Orange Poitions from currently attached character.
Info
Removes 1 Old Violet Box from an online player on account 2000110.