Amon_PRC8/_module/nss/boatlever6.nss

95 lines
3.0 KiB
Plaintext
Raw Permalink Normal View History

2025-04-03 19:00:46 -04:00
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(iBleft >= 1)
{
DestroyObject(GetObjectByTag("BoatRoomBoat"));
location lLocation1 = GetLocation(GetWaypointByTag("brbear2"));
location lLocation2 = GetLocation(GetWaypointByTag("brtrainer2"));
location lLocation3 = GetLocation(GetWaypointByTag("boat2"));
DestroyObject(GetObjectByTag("BoatRoomA"));
DestroyObject(GetObjectByTag("BoatRoomBoat"));
CreateObject(OBJECT_TYPE_CREATURE, "BoatRoomA2", lLocation1, FALSE);
CreateObject(OBJECT_TYPE_PLACEABLE, "BoatRoomBoat", lLocation3, FALSE);
SetLocalInt(GetModule(), "br_bear_left", (GetLocalInt(GetModule(), "br_bear_left") -1));
SetLocalInt(GetModule(), "br_bear_rgt", (GetLocalInt(GetModule(), "br_bear_rgt") +1));
SetLocalInt(GetModule(), "boatside", 1);
if (iBleft > iTleft)
{
ExecuteScript("killallzone", OBJECT_SELF);'
}
if (iBright > iTright)
{
ExecuteScript("killallzone", OBJECT_SELF);'
}
if ((iBright == 3)||(iTright == 3))
{
ExecuteScript("Mg_Rw_Boat", OBJECT_SELF);'
}
}
}
if(iSide == 1)
{
if(iBright >= 1)
{
DestroyObject(GetObjectByTag("BoatRoomBoat"));
location lLocation1 = GetLocation(GetWaypointByTag("brbear1"));
location lLocation2 = GetLocation(GetWaypointByTag("brtrainer1"));
location lLocation3 = GetLocation(GetWaypointByTag("boat1"));
DestroyObject(GetObjectByTag("BoatRoomA2"));
DestroyObject(GetObjectByTag("BoatRoomBoat"));
CreateObject(OBJECT_TYPE_CREATURE, "BoatRoomA", lLocation1, FALSE);
CreateObject(OBJECT_TYPE_PLACEABLE, "BoatRoomBoat", lLocation3, FALSE);
SetLocalInt(GetModule(), "br_bear_left", (GetLocalInt(GetModule(), "br_bear_left") +1));
SetLocalInt(GetModule(), "br_bear_rgt", (GetLocalInt(GetModule(), "br_bear_rgt") -1));
SetLocalInt(GetModule(), "boatside", 1);
if (iBleft > iTleft)
{
ExecuteScript("killallzone", OBJECT_SELF);'
}
if (iBright > iTright)
{
ExecuteScript("killallzone", OBJECT_SELF);'
}
}
if ((iBright == 3)||(iTright == 3))
{
ExecuteScript("Mg_Rw_Boat", OBJECT_SELF);'
}
}
}