Vote for Our Mud on TMC!











help > hooks > pre steal item
---

Hook Name         : pre_steal_item

Called From       : /bin/skills/_steal.c
                    /bin/skills/_rob.c
                    /bin/skills/_mug.c
                    /bin/skills/_sleight.c
                    /bin/songs/_entice.c
                    
Resolution Method : HOOK_OR

Sample Header     :

     int my_pre_steal_item(string tag, object ob, object item, object stealer,
                           object victim)

Arguments :

tag     - "pre_steal_item"
ob      - ???
item    - The item being stolen.
stealer - The living object stealing the item.
victim  - The living object holding the item.

Return Value : 1 to intercept the steal, 0 to allow it

Description :

When one living thing attempts to steal an item from another living thing
(whether npc's or players), this hook is called.  The call is made before
the item is moved.

If 1 is returned, the steal is disallowed, and no messages are displayed,
so you should take care of that yourself.  If 0 is returned, the steal is
allowed.

See also:

post_steal_item, pre_give_item, post_give_item

---

Last modified : 2-23-03, Demonic