DROP(L) NAME drop - prevent an object from being dropped SYNOPSIS int drop(int silent); RETURN VALUE A non-zero value means an object cannot be dropped. A zero value or the absense of this function means the object can be dropped freely. LOCATION Possible in any object that can be carried. DESCRIPTION Whenever a player attempts to drop an object, the local function 'drop' is called in that object. A non-zero return means the object will not be dropped. A non-zero argument should mean to not print any messages. NOTES It is senseless to define this in objects which cannot be taken. When a player quits, all non-droppable objects are destructed. Non-droppable objects should not have weights. You can print out messages saying 'The doll won't let you drop her' and such in the drop() function, but be sure to only print them out when no arguments are passed (to comply with the 'silent' convention). Normal non-droppable objects include guild and club objects, wizard tools, 'disease' objects, etc. Do not refer to 'this_player()' within the drop function. This can cause bugs when this_player() returns 0 or someone else. You might instead use environment(). SEE ALSO query_auto_load(L), get(L)
Help topics available:
You are guest number 78 since February 2020.
This file was last modified: June 2000.