/* written by: Tarl 29-4-94 * assistance with the no drop was rendered by Worzel * this is a prototype playtesters badge * Version 2, changed so that no functions have to be * called onto this item * altered by: * reason: * */ inherit "/obj/armour"; void setup() { set_name( "badge" ); set_short( "Badge" ); set_main_plural( "badges" ); set_long( "This is the badge of a playtester. It has the "+ "picture of a hedgehog engraved on it. Under the hedgehog "+ "there is an inscription. The badge is made from gold and "+ "enchanted silver. It appears to be worth a lot but you "+ "feel that it would be wrong to sell such a special item.\n"); set_read_mess( "This item allows you to use mail without "+ "being at a postoffice, to restore yourself to life "+ "and provides information on how to file bug and typo "+ "reports.\nAvailable commands are :\n"+ "'mail' 'mail <name>' 'information' 'ress' and 'let_drop'.\n" ); set_value( 0 ); set_weight( 0 ); set_type( "amulet" ); set_max_cond( 1000 ); set_cond( 1000 ); set_lowest_cond( 100 ); set_damage_chance( 1 ); } void init() { add_action( "do_ress", "ress" ); add_action( "do_mail", "mail" ); add_action( "do_information", "information" ); add_action( "help", "help", 1 ); add_action( "do_let_drop", "let_drop" ); reset_drop(); ::init(); } int do_let_drop() { if( this_player()->query_creator() == 0 ) return 0; this_object()->set_drop(); return 1; } int do_mail( string str ) { return( int ) "/obj/handlers/mail_track"->mail( str ); } int do_ress() { if( this_player()->query_property( "noregen" ) ) { notify_fail("Death tells you: HOLD ON, I'M NOT FINISHED WITH YOU YET.\n"); return 0; } if( !this_player()->query_property( "dead" ) ) { notify_fail("You are not dead ... yet.\n"); return 0; } this_player()->remove_ghost(); this_player()->set_hp( this_player()->query_max_hp() ); return 1; } int do_information() { write("To file a report, first ensure that if possible "+ "you are in the location where the error has occured. "+ "Secondly ensure that you are entering the correct type "+ "of report.\n\nTo file a typing error the command is "+ "'typo <string>' where string is the text indicating the "+ "typo.\n\nThere are two ways to enter a bug report. The "+ "first is to type 'bug' then enter the relevant text "+ "regarding the bug giving as much detail as possible or "+ "the second (which is prefered) is \n'bug [command/spell"+ "/object/room] [name of the command/spell/object]'\nthen "+ "enter the text pertaining to the bug, giving as much "+ "detail as possible.\nFor more information and examples "+ "type 'help typo' and 'help bug'\n" ); return 1; } int help( string str ) { switch( str ) { case "badge" : write( "This is the playtester's badge. It allows you "+ "to use 'mail' when you are not in a post office, it "+ "also allows you to 'ress' yourself and to find out "+ "'information' about entering bug and typo reports. Read "+ "the badge to find out about the commands available or "+ "type 'help <command>' for further information about "+ "a particular command.\n" ); return 1; break; case "ress" : write( "This command allows you to restore yourself to "+ "life after you have dies. It will also fully heal you. "+ "However it will not give you an extra-life so you will "+ "still die normally. It is suggested that care is taken "+ "when attempting to retrieve items from your corpse as "+ "whatever killed you may still be in the area.\n" ); return 1; break; case "information" : write( "This command will give you some details on how to "+ "file a bug or typo report. For furthur information type "+ "'help bug' and/or 'help typo'.\n" ); return 1; break; case "let_drop" : write( "This will allow the item to dropable. However this "+ "command is only open to creators.\n" ); return 1; break; default : return 0; break; } }