/* /verbs/items/press.c * from the Nightmare V Object Library * press OBJ * press STR on OBJ * created by Descartes of Borg 960114 */ #include <lib.h> #include "include/press.h" inherit LIB_VERB; static void create() { verb::create(); SetVerb("press"); SetRules("OBJ", "STR on OBJ"); SetSynonyms("push", "poke", "prod"); SetErrorMessage("Press what? Or press what on what?"); SetHelp("Syntax: <press OBJECT>\n" " <press THING on OBJECT>\n\n" "Allows you to press an object, or perhaps a thing on the " "object. For example, you might want to " "\"press the button on the wall\", or simply \"press button\".\n\n" "Synonyms: poke, prod, push"); } mixed can_press_obj(object ob) { return 1; } mixed can_press_str_on_obj(object ob) { return 1; } mixed do_press_obj(object ob, string obid) { return do_press_str_on_obj(obid, ob, 0, 0); } mixed do_press_str_on_obj(string str, object ob, string str_again, string obid) { if( obid ) obid = remove_article(lower_case(obid)); return (mixed)ob->eventPress(this_player(), remove_article(lower_case(str)), obid); }