Merentha Website
- Overview
- About LPC Coding
- Header Files
- The Problem Sets
- Rooms
- Normal Rooms
- Monster Rooms
- Search Rooms
- Exit Rooms
- Door Rooms
- Monsters
- Normal Monster
- Random/Emote Monster
- Patrol/Talking Monster
- Skills/Interactive Monster
- Armour
- A Vest
- A Ring
- Cursed Armour
- Weapons
- Normal Staff
- Two Handed Sword
- Special Attack Weapon
- Cursed Weapon
- Talkin Weapon
- Lights
- A Match
- A Torch
- A Lantern
- Bags
- A Normal Bag
- A Backpack (wearable)
- An Expanding Bag
- Misc Objects
- A Leaf
- A Sea Shell
- A Key
- A Snowball
|
// Petrarch
#include
inherit ARMOUR;
inherit STORAGE;
void create() {
storage::create();
armour::create();
set_name("backpack");
set_id( ({ "pack", "backpack" }) );
set_adjectives( ({ "large", "canvas", "a" }) );
set_short("a large canvas backpack");
set_long("This is a crudely made canvas pack. It has thick straps, and is quite spacious.");
set_mass(3);
set_value(50);
set_type("backpack");
set_max_encumbrance(150);
set_prevent_put("You cannot put this in there!");
set_limbs(({"torso"}));
set_ac(1);
add_property("no steal", 1);
set_material(({"cloth","leather"}));
}
void init() {
armour::init();
storage::init();
}
string query_short() {
if(query_worn()) return storage::query_short()+" (worn)";
else return storage::query_short();
}
// A bug reported by Hannibal,
// A worn bag could be transfered to another player and casue
// problems in the wearing code for both players.
// So I edited the _give.c command to check, if any item is marked
// as 'wierd' it will require that the player remove the item if
// it is worn before it will allow them to give it away.
// So this function is needed
int wierd_move() {
if(!query_worn()) return 0;
message("info", "You must remove the pack before handing it over.",
environment());
return 1;
}
|