Code: Select all
bool GumUse1;
Script 61 (void)
{
If (GumUse2 == TRUE)
{
print(s:"");
}
else if(checkinventory("outofsight") >= 1 && checkinventory("money") >= 1250 )
{
takeinventory("OutOfSight",999);
takeinventory("money",1250);
THINGSOUND(21, "sound/GUMBUY", 127);
Delay(40);
acs_execute(66, 0, 0, 0, 0);
GumActive2 = 1;
ThingSound(21, "sound/GUMDISP", 127);
ACS_Terminate(68,0);
}
else if(checkinventory("LightsOn") >= 1 && checkinventory("money") >= 1250 )
{
takeinventory("LightsOn",999);
takeinventory("money",1250);
THINGSOUND(21, "sound/GUMBUY", 127);
Delay(40);
acs_execute(66, 0, 0, 0, 0);
GumActive2 = 1;
ThingSound(21, "sound/GUMDISP", 127);
ACS_Terminate(68,0);
}
else if (checkinventory("money") >= 500)
{
ACS_Execute(Random(710, 740), 0,0,0,0);
takeinventory("money",500);
THINGSOUND(40, "sound/GUMBUY", 127);
Delay(40);
acs_execute(62, 0, 0, 0, 0);
GumActive1 = 1;
ThingSound(40, "sound/GUMDISP", 127);
ACS_Terminate(64,0);
}
}
int newRand2 = 1;
script 66 (void)
{
newRand2 = Random(1, 17);
GumUse2 = True;//Ensure that the player can not use the PowerGum Machine while a gumball is dispensed
delay(35);
Thing_SpawnFacing(22, randomGum[newRand2], 1, 993);
GumActive2 = 0;
Acs_Execute(67,0,0,0,0);
}
Script 67 (void)
{
Thing_Activate(21);
ThingSound(22, "sound/PWRGMCLK", 127);
Delay(10);
Thing_Deactivate(21);
Delay(10);
Thing_Activate(21);
ThingSound(22, "sound/PWRGMCLK", 127);
Delay(10);
Thing_Deactivate(21);
Delay(10);
Thing_Activate(21);
ThingSound(22, "sound/PWRGMCLK", 127);
Delay(10);
Thing_Deactivate(21);
Delay(10);
Thing_Activate(21);
ThingSound(22, "sound/PWRGMCLK", 127);
Delay(10);
Thing_Deactivate(21);
Delay(10);
Thing_Activate(21);
ThingSound(22, "sound/PWRGMCLK", 127);
Delay(10);
Thing_Deactivate(21);
Delay(10);
Thing_Activate(21);
ThingSound(22, "sound/PWRGMCLK", 127);
Delay(10);
Thing_Deactivate(21);
Delay(10);
Thing_Activate(21);
ThingSound(22, "sound/PWRGMCLK", 127);
Delay(10);
Thing_Deactivate(21);
Delay(10);
Thing_Activate(21);
ThingSound(22, "sound/PWRGMCLK", 127);
Delay(10);
Thing_Deactivate(21);
Delay(10);
Thing_Activate(21);
ThingSound(22, "sound/PWRGMCLK", 127);
Delay(10);
Thing_Deactivate(21);
Delay(10);
Thing_Activate(21);
ThingSound(22, "sound/PWRGMCLK", 127);
Delay(10);
Thing_Activate(21);
Thing_remove(993);
Thing_remove(60);
delay(40);
Thing_remove(60);
ACS_Execute(68,0,0,0,0);
GumUse2 = FALSE;
}
Script 68 (void)
{
Thing_remove(60);
Thing_Activate(21);
ThingSound(21, "sound/GUMFLASH", 127);
Delay(20);
Thing_remove(60);
Thing_Deactivate(21);
Delay(20);
RESTART;
}