Amon_PRC8/_module/nss/boatlever5.nss
Jaysyn904 c5cffc37af Initial Commit
Initial Commit [v1.01]
2025-04-03 19:00:46 -04:00

95 lines
3.1 KiB
Plaintext

void main()
{
int iSide= GetLocalInt(GetModule(), "boatside");
int iBleft= GetLocalInt(GetModule(), "br_bear_left");
int iBright= GetLocalInt(GetModule(), "br_bear_rgt");
int iTleft= GetLocalInt(GetModule(), "br_train_left");
int iTright= GetLocalInt(GetModule(), "br_train_rgt");
ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE,3.0);
DelayCommand(2.0, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
if(iSide == 0)
{
if(iTleft >= 1)
{
DestroyObject(GetObjectByTag("BoatRoomBoat"));
location lLocation1 = GetLocation(GetWaypointByTag("brbear2"));
location lLocation2 = GetLocation(GetWaypointByTag("brtrainer2"));
location lLocation3 = GetLocation(GetWaypointByTag("brboat2"));
DestroyObject(GetObjectByTag("BoatRoomB"));
DestroyObject(GetObjectByTag("BoatRoomBoat"));
CreateObject(OBJECT_TYPE_CREATURE, "BoatRoomB2", lLocation2, FALSE);
CreateObject(OBJECT_TYPE_PLACEABLE, "BoatRoomBoat", lLocation3, FALSE);
SetLocalInt(GetModule(), "br_train_left", (GetLocalInt(GetModule(), "br_train_left") -1));
SetLocalInt(GetModule(), "br_train_rgt", (GetLocalInt(GetModule(), "br_train_rgt") +1));
SetLocalInt(GetModule(), "boatside", 1);
}}
if(iSide == 1)
{
if(iTright >= 1)
{
DestroyObject(GetObjectByTag("BoatRoomBoat"));
location lLocation1 = GetLocation(GetWaypointByTag("brbear1"));
location lLocation2 = GetLocation(GetWaypointByTag("brtrainer1"));
location lLocation3 = GetLocation(GetWaypointByTag("brboat1"));
DestroyObject(GetObjectByTag("BoatRoomB2"));
DestroyObject(GetObjectByTag("BoatRoomBoat"));
CreateObject(OBJECT_TYPE_CREATURE, "BoatRoomB", lLocation2, FALSE);
CreateObject(OBJECT_TYPE_PLACEABLE, "BoatRoomBoat", lLocation3, FALSE);
SetLocalInt(GetModule(), "br_train_left", (GetLocalInt(GetModule(), "br_train_left") +1));
SetLocalInt(GetModule(), "br_train_rgt", (GetLocalInt(GetModule(), "br_train_rgt") -1));
SetLocalInt(GetModule(), "boatside", 0);
}}
int iBleft2= GetLocalInt(GetModule(), "br_bear_left");
int iBright2= GetLocalInt(GetModule(), "br_bear_rgt");
int iTleft2= GetLocalInt(GetModule(), "br_train_left");
int iTright2= GetLocalInt(GetModule(), "br_train_rgt");
if (iTleft2 > 0)
{
if (iBleft2 > iTleft2)
{
ExecuteScript("killallzone", OBJECT_SELF);'
}
}
if (iTright2 > 0)
{
if (iBright2 > iTright2)
{
ExecuteScript("killallzone", OBJECT_SELF);'
}
}
if (iBright2 == 3)
{
if(iTright2 == 3)
{
ExecuteScript("Mg_Rw_Boat", OBJECT_SELF);'
}
}
}