A
/ \ _ Play Now Nemesis on
| | | | _______ _ _ _______ _______ _ _______
| |\ | | | ____| | \ / | | ____| / ____| | | / ____|
/-------/-------------------------------------------------------------------,
O= Home <=XX| About News Pics Adventurers Wizards Download Connect >
\-------\-------------------------------------------------------------------'
| | \ | | |____ | | | | | |____ ___ \ \ | | ___ \ \
| | \_| |_______| |_| |_| |_______| |_______/ |_| |_______/
\ /
V
Documentation Area
Document Path: /doc/monster/use_equipment
Lfun: use_equipment - make a monster use a weapon or armour
Synopsis:
void use_equipment(object ob)
Description:
The use_equipment routine makes the monster wield weapons resp.
wear armours. If the given object has a lfun weapon_class and
a lfun armour_class, the object will be wielded or worn resp.
the monster trys to wear the armour. If another armour of the
same type is alreay worn, it will fail. If there is another
weapon wielded before, this will be unwielded. Both - wield an
wear - is done via the efun 'command'.
It is used by pick_any_obj - see 'man monster/pick_any_obj' and
'man monster/set_random_pick'. But it also can be used in
combination with notify_item_enter etc.
Return value:
none
Examples:
object knife = clone_object("lib/obj/knife3");
use_equipment(knife);
Note:
use_equipment was extracted from pic_any_obj on Mar 1st 2016.
See also:
This page was generated in LPC
Imprint / Impressum