def process_event(item, event): if event == 'equip' and 'ON_EQUIP' in item['flags']: scripting.execute(item['flags']['ON_EQUIP'], item_uid=item['uid']) elif event == 'activate' and 'ON_ACTIVATE' in item['flags']: scripting.execute(item['flags']['ON_ACTIVATE'], item_uid=item['uid']) elif event == 'deactivate' and 'ON_DEACTIVATE' in item['flags']: scripting.execute(item['flags']['ON_DEACTIVATE'], item_uid=item['uid']) elif event == 'stop' and 'ON_STOP' in item['flags']: scripting.execute(item['flags']['ON_STOP'], item_uid=item['uid']) elif event == 'collide' and 'ON_COLLIDE_WITH' in item['flags']: scripting.execute(item['flags']['ON_COLLIDE_WITH'], item_uid=item['uid'])
def dismantle_item(life, item_id): _item = lfe.get_inventory_item(life, item_id) scripting.execute(_item['flags']['CANDISMANTLE'], owner=life, item_uid=item_id)