Skip to content
Haru edited this page Oct 19, 2016 · 1 revision

Syntax

  • delitem <item></item>, <amount></amount>[,];
  • delitem <"item name">, <amount></amount>[,];

Description

This command will take a specified amount of given item from the invoking 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

 delitem 502, 10;  // Orange_Potion

Removes 10 Orange Poitions from currently attached character.

 delitem 617, 0, 2000110;  // Old_Violet_Box

Removes 1 Old Violet Box from an online player on account 2000110.

Category:Script Command

Clone this wiki locally