|
help > hooks > pre give coins --- Hook Name : pre_give_coins Called From : /bin/living/give.c Resolution Method : HOOK_OR Sample Header : int my_pre_give_coins(string tag, object ob, object who, int amt, int receiver) Arguments : tag - "pre_give_coins" ob - The object this hook was called in, can either be the giver or receiver who - The other living object involved with the give amt - The number of coins (will be greater than 0) receiver - 0 if "ob" is doing the giving, 1 if "who" is doing the giving Return Value : 1 to intercept the give, 0 to allow it Description : When one living thing attempts to give coins to another living thing (whether npc's or players), this hook is called twice. The first call is made in the one attempting to give the coins, and "ob" will be the giver, and "who" will be the receiver. The second call is made in the one attempting to receive the coins, and "ob" is the receiver, and "who" is the giver. If 1 is returned, the give is disallowed, and no messages are displayed, so you should take care of that yourself. If 0 is returned, the move is allowed (unless someone else had a give hook that returns 1). See also: post_give_coins, pre_give_item, post_give_item --- Last modified : 2-5-01, Megaboz |
|