Hello: So, I have this special and it's not working correctly and I cannot figure out why. What is happening is that the item is in the room that has the special assigned to it, but when I go to pick or open the chest, it tells me:
Quote
[ 3248] Entrance to the Crafting Halls [ NO_MOB INDOORS HOUSE_CRASH ] [ Inside ] This area serves as both entrance to the crafting halls below, and as a shop for the selling and buying of crafting resources. There is a large staircase leading down to the crafting areas beneath the city floor on the western side of the room, and the eastern half is dedicated to the shop, with lines of crates and shelves designed to store the many different kinds of crafting commodities found throughout the Realms. Obvious Exits: south - [ 3103] Commoner's Quarter. down - [ 3249] A Hallway in the Luskan Crafting Halls. [64098] A lost orphan is here looking for shelter. (See orphan command) [64097] A locked treasure chest is here, hidden behind some debris. (See chest command) [3044] (+) Gholus, the crafting resource vendor stands here behind the counter.
155 Hp 1170 Sp > pick chest That is not a treasure chest and cannot be opened.
What am I missing here? Any help would be appreciated.
SPECIAL(lockbox) { struct obj_data *lb = (struct obj_data *) me; struct obj_data *obj = NULL; char buffer[200]={'\0'}; int roll = skill_roll(ch, SKILL_DISABLE_DEVICE); int level = MAX(1, roll - 14);
if (lb != (obj = get_obj_in_list_vis(ch, argument, NULL, world[IN_ROOM(ch)].contents))) { send_to_char(ch, "That is not a treasure chest and cannot be opened.\r\n"); return 1; }
if (!lb) return 0;
if (roll < 15) { sprintf(buffer, "As you try to open the treasure chest, the trap activates and an explosion is heard, with black smoke escaping the seams of the chest."); act(buffer, FALSE, ch, 0, 0, TO_CHAR); sprintf(buffer, "As $n tries to open the treasure chest, the trap activates and an explosion is heard, with black smoke escaping the seams of the chest."); act(buffer, FALSE, ch, 0, 0, TO_ROOM); obj_from_room(lb); extract_obj(lb); lb = obj = NULL; lockboxes–; return 1; }
So, I have this special and it's not working correctly and I cannot figure out why. What is happening is that the item is in the room that has the special assigned to it, but when I go to pick or open the chest, it tells me:
This area serves as both entrance to the crafting halls below, and as a shop
for the selling and buying of crafting resources. There is a large staircase
leading down to the crafting areas beneath the city floor on the western side of
the room, and the eastern half is dedicated to the shop, with lines of crates
and shelves designed to store the many different kinds of crafting commodities
found throughout the Realms.
Obvious Exits:
south - [ 3103] Commoner's Quarter.
down - [ 3249] A Hallway in the Luskan Crafting Halls.
[64098] A lost orphan is here looking for shelter. (See orphan command)
[64097] A locked treasure chest is here, hidden behind some debris. (See chest command)
[3044] (+) Gholus, the crafting resource vendor stands here behind the counter.
155 Hp 1170 Sp >
pick chest
That is not a treasure chest and cannot be opened.
What am I missing here? Any help would be appreciated.