Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Routine: Item Action

ricochet1k edited this page Sep 13, 2012 · 4 revisions

Syntax: {entity}effect.(drop|give|take)item.{item}[.{quantity}]

Description: Does something with the specified item type to the specified entity. The Give and Take actions only work on entities with inventories.

Note: Take only removes items from the inventory, and Drop creates one out of thin air. If you want to remove it from their inventory AND drop it, you must use 2 routines, like in the example below.

Example:

Damage: #Make rich players lose some loot when hit for more than 2 hearts.
    - 'if target.group.Bourgeoise and damage > 4 and target.hasallitems.gold_ore':
        - 'targeteffect.dropitem.gold_ore'
        - 'targeteffect.takeitem.gold_ore'

See also: Group, Integer Variable References, Has Items

Clone this wiki locally