97 lines
3.4 KiB
Plaintext
97 lines
3.4 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(iBleft >= 2)
|
|
{
|
|
DestroyObject(GetObjectByTag("BoatRoomBoat"));
|
|
|
|
location lLocation1 = GetLocation(GetWaypointByTag("brbear2"));
|
|
location lLocation2 = GetLocation(GetWaypointByTag("brtrainer2"));
|
|
location lLocation3 = GetLocation(GetWaypointByTag("brboat2"));
|
|
|
|
DestroyObject(GetObjectByTag("BoatRoomA"));
|
|
DelayCommand(0.3, DestroyObject(GetObjectByTag("BoatRoomA")));
|
|
DestroyObject(GetObjectByTag("BoatRoomBoat"));
|
|
|
|
CreateObject(OBJECT_TYPE_CREATURE, "BoatRoomA2", lLocation1, FALSE);
|
|
CreateObject(OBJECT_TYPE_CREATURE, "BoatRoomA2", lLocation1, FALSE);
|
|
CreateObject(OBJECT_TYPE_PLACEABLE, "BoatRoomBoat", lLocation3, FALSE);
|
|
|
|
SetLocalInt(GetModule(), "br_bear_left", (GetLocalInt(GetModule(), "br_bear_left") -2));
|
|
SetLocalInt(GetModule(), "br_bear_rgt", (GetLocalInt(GetModule(), "br_bear_rgt") +2));
|
|
SetLocalInt(GetModule(), "boatside", 1);
|
|
|
|
}}
|
|
|
|
|
|
|
|
if(iSide == 1)
|
|
{
|
|
if(iBright >= 2)
|
|
{
|
|
|
|
|
|
DestroyObject(GetObjectByTag("BoatRoomBoat"));
|
|
|
|
location lLocation1 = GetLocation(GetWaypointByTag("brbear1"));
|
|
location lLocation2 = GetLocation(GetWaypointByTag("brtrainer1"));
|
|
location lLocation3 = GetLocation(GetWaypointByTag("brboat1"));
|
|
|
|
DestroyObject(GetObjectByTag("BoatRoomA2"));
|
|
DelayCommand(0.3, DestroyObject(GetObjectByTag("BoatRoomA2")));
|
|
DestroyObject(GetObjectByTag("BoatRoomBoat"));
|
|
|
|
CreateObject(OBJECT_TYPE_CREATURE, "BoatRoomA", lLocation1, FALSE);
|
|
CreateObject(OBJECT_TYPE_CREATURE, "BoatRoomA", lLocation1, FALSE);
|
|
CreateObject(OBJECT_TYPE_PLACEABLE, "BoatRoomBoat", lLocation3, FALSE);
|
|
|
|
|
|
|
|
SetLocalInt(GetModule(), "br_bear_left", (GetLocalInt(GetModule(), "br_bear_left") +2));
|
|
SetLocalInt(GetModule(), "br_bear_rgt", (GetLocalInt(GetModule(), "br_bear_rgt") -2));
|
|
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);'
|
|
}
|
|
}
|
|
}
|
|
|