17 Aug, 2015, arholly wrote in the 1st comment:
Votes: 0
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 (!CMD_IS("slice") && !CMD_IS("open") && !CMD_IS("pick") && !CMD_IS("unlock"))
{
return 0;
}

skip_spaces(&argument);

if (!*argument)
return 0;

if ((CMD_IS("open") || CMD_IS("pick") || CMD_IS("unlock")) && !is_abbrev(argument, "chest"))
{
return 0;
}

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;
}

level = MIN(level, 30);
award_lockbox_treasure(ch, level);
obj_from_room(lb);
extract_obj(lb);
lb = obj = NULL;
lockboxes–;
return 1;
}
17 Aug, 2015, Tijer wrote in the 2nd comment:
Votes: 0
double check you have nothing in inventory with the keyword chest.. as thats usually checked first before room!
17 Aug, 2015, arholly wrote in the 3rd comment:
Votes: 0
Ummm…Dang. I feel utterly dumb right now. Thanks.
0.0/3