Here is all the relevant info:
Original working door itemdesc info:
Code: Select all
Door 0x06af
{
Desc wooden door
xmod +1
ymod -1
script door
Weight 1
doortype wood
}
Code: Select all
Door 0x106af
{
Name woodendoor99
Graphic 0x06af
Script :doors:door
WalkOnScript teleporter
xmod +1
ymod -1
doortype wood
weight 1
}
Code: Select all
use uo;
use os;
use cfgfile;
include ":doors:doors";
include "include/attributes";
program use_door(chr, door)
var doordesc, dooroptions, configuration, refresh, flowoption, closelocked, house, hs, ss, sign, item, stuff;
var friend;
if(GetObjProperty(door, "#inuse"))
return;
endif
// The following added to prevent doors "opening while in a backpack - Yukiko 01-Aug-2006
stuff := EnumerateItemsInContainer( chr.backpack );
foreach item in stuff
if (item == door)
return;
endif
endforeach
SetObjProperty(door, "#inuse", 1);
doordesc := ReadConfigFile("itemdesc");
dooroptions := ReadConfigFile("door");
configuration := FindConfigElem(dooroptions, "doors");
flowoption := lower(GetConfigString(configuration, "OpenFromInside"));
closelocked := lower(GetConfigString(configuration, "CloseLocked"));
if((chr.multi) && (!GetObjProperty(door, "Flow")) && (flowoption != "no"))
run_script_to_completion(":doors:setFlow", chr.multi);
endif
// if(IsLocked(chr, door, flowoption, closelocked))
if(IsLocked(chr, door))
PrintTextAbovePrivate(door, "That is locked.", chr);
else
if(GetObjProperty( door, "WhenOpened" ))
start_script(":doors:closeDoor", door);
else
detach();
start_script(":doors:openDoor", door);
foreach potentialdoor in ListObjectsInBox((door.x-1),(door.y-1),(door.z),(door.x+1),(door.y+1),(door.z))
if(!potentialdoor.hp)
var doortype := doordesc[potentialdoor.objtype].doortype;
if((doortype) && (door != potentialdoor))
if((!potentialdoor.locked) && (!GetObjProperty(potentialdoor, "WhenOpened")))
start_script(":doors:openDoor", potentialdoor);
endif
endif
endif
endforeach
endif
endif
EraseObjProperty(door, "#inuse");
endprogram
The confusing part is that my doors.src file specifically uses the next graphic as the 'open door' graphic which works fine for the original working door but the custom door, which uses the same graphic, opens on the wrong side. That and the fact I can't walk on the square to get through the door.
Any insight into this would be helpful.