MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame^] | 1 | /* Neue std/post |
| 2 | (C) 1993 by Loco |
| 3 | */ |
| 4 | #pragma strong_types |
| 5 | #pragma save_types |
| 6 | #pragma range_check |
| 7 | #pragma no_clone |
| 8 | #pragma pedantic |
| 9 | |
| 10 | inherit "/std/room"; |
| 11 | |
| 12 | #include "/mail/post.h" |
| 13 | #include <properties.h> |
| 14 | #include <rooms.h> |
| 15 | |
| 16 | void create() { |
| 17 | int i; |
| 18 | (::create()); |
| 19 | SetProp(P_INT_SHORT,"Postamt"); |
| 20 | SetProp(P_INT_LONG,"\ |
| 21 | Dies ist ein Testpostamt.\n\ |
| 22 | Von hier aus kannst Du Briefe an Deine Mitspieler schicken und Briefe von\n\ |
| 23 | ihnen lesen. Wenn Du das willst, tippe 'post' oder 'mail',\n\ |
| 24 | bzw. 'mail <spieler>'.\n"); |
| 25 | SetProp( P_LIGHT, 1 ); |
| 26 | AddCmd("post","do_mail"); |
| 27 | AddCmd("mail","do_mail"); |
| 28 | SetProp(P_INDOORS,1); |
| 29 | for (i=0;i<NRCABINS;++i) AddItem(MAILCABIN,REFRESH_REMOVE); |
| 30 | AddItem(COUNTER,REFRESH_REMOVE); |
| 31 | } |
| 32 | |
| 33 | int do_mail(string str) { |
| 34 | object mailer; |
| 35 | if (this_interactive()!=this_player()) return 0; |
| 36 | mailer=clone_object(MAILER); |
| 37 | mailer->SetOfficeName(short()); |
| 38 | mailer->do_mail(str); |
| 39 | return 1; |
| 40 | } |
| 41 | |
| 42 | |