Well I figured out how to make the lever, ropes and platform work all at once. There appears to be an error in doors.cpp.
default doors.cpp
Code:
void Doors::ForceOpen(Mob *sender)
{
EQApplicationPacket* outapp = new EQApplicationPacket(OP_MoveDoor, sizeof(MoveDoor_Struct));
MoveDoor_Struct* md=(MoveDoor_Struct*)outapp->pBuffer;
md->doorid = door_id;
md->action = OPEN_DOOR;
entity_list.QueueClients(sender,outapp,false);
safe_delete(outapp);
if(!isopen) {
close_timer.Start();
isopen=true;
}
else {
close_timer.Disable();
isopen=false;
}
}
void Doors::ForceClose(Mob *sender)
{
EQApplicationPacket* outapp = new EQApplicationPacket(OP_MoveDoor, sizeof(MoveDoor_Struct));
MoveDoor_Struct* md=(MoveDoor_Struct*)outapp->pBuffer;
md->doorid = door_id;
md->action = OPEN_DOOR;
entity_list.QueueClients(sender,outapp,false);
safe_delete(outapp);
if(!isopen) {
close_timer.Start();
isopen=true;
}
else {
close_timer.Disable();
isopen=false;
}
}
The above sections are identical which is why Doors::ForceClose() doesn't work properly.
Now changing md->action = OPEN_DOOR; to md->action = CLOSE_DOOR; as it is below allows Doors::ForceClose() to work a little better
changed doors.cpp
Code:
void Doors::ForceOpen(Mob *sender)
{
EQApplicationPacket* outapp = new EQApplicationPacket(OP_MoveDoor, sizeof(MoveDoor_Struct));
MoveDoor_Struct* md=(MoveDoor_Struct*)outapp->pBuffer;
md->doorid = door_id;
md->action = OPEN_DOOR;
entity_list.QueueClients(sender,outapp,false);
safe_delete(outapp);
if(!isopen) {
close_timer.Start();
isopen=true;
}
else {
close_timer.Disable();
isopen=false;
}
}
void Doors::ForceClose(Mob *sender)
{
EQApplicationPacket* outapp = new EQApplicationPacket(OP_MoveDoor, sizeof(MoveDoor_Struct));
MoveDoor_Struct* md=(MoveDoor_Struct*)outapp->pBuffer;
md->doorid = door_id;
md->action = CLOSE_DOOR;
entity_list.QueueClients(sender,outapp,false);
safe_delete(outapp);
if(!isopen) {
close_timer.Start();
isopen=true;
}
else {
close_timer.Disable();
isopen=false;
}
}
That single change didn't completely fix the problem. I think the isopen() and the associated timers are causing a weird bounce effect when used with opentype 40. I changed the database to use opentype 58 so that a click is required to open and close the lever and then the lift and ropes worked as they should have but obviously the lever is frozen in place.
If anyone can see a better way to fix the odd bounce effect besides changing opentype I am all for it otherwise I will keep looking for a better solution.