Okay, I have a semi-final script here. The problem is is that there is a syntax error around SPC on line 5. I am also wondering how to make the GUI refresh every second.
Edit: I also need to know how to edit zombies player type or items on each wave.
function Slayer_MinigameSO::onReset(%this)
{
%wave = 1;
commandToAll('centerPrint', "<font:impact:50><color:f420eb>The first wave has begun!",5);
commandToAll('bottomPrint', "<color:f420eb>Wave: <color:ffffff>" SPC %wave "<color:1818ba>You are a <color:FFFFFF>"SPC%client.getTeam().name) "<color:f420eb>Wave Time Remaining: <color:ffffff>" SPC %time;
%time = 240
serTimer2(%time, %wave, %client);
function serTimer2(%time, %wave, %client)
{
if (%time <= 0)
{
%wave = 2;
commandToAll('centerPrint', "<font:impact:50><color:f420eb>The second wave has begun!",5);
commandToAll('bottomPrint', "<color:f420eb>Wave: <color:ffffff>" SPC %wave "<color:1818ba>You are a <color:FFFFFF>" SPC %client.getTeam().name);
%time = 240
serTimer3(%time, %wave, %client);
}
}
else
{
%time--;
$TimerSchedule = schedule(1000, 0, "serTimer", %time);
}
function serTimer3(%time, %wave, %client)
{
if (%time <= 0)
{
%wave = 3;
commandToAll('centerPrint', "<font:impact:50><color:f420eb>The third wave has begun!",5);
commandToAll('bottomPrint', "<color:f420eb>Wave: <color:ffffff>" SPC %wave "<color:1818ba>You are a <color:FFFFFF>" SPC %client.getTeam().name);
%time = 240
serTimer4(%time, %wave, %client);
}
}
else
{
%time--;
$TimerSchedule = schedule(1000, 0, "serTimer", %time);
}
function serTimer4(%time, %wave, %client)
{
if (%time <= 0)
{
%wave = 4;
commandToAll('centerPrint', "<font:impact:50><color:f420eb>The forth wave has begun!",5);
commandToAll('bottomPrint', "<color:f420eb>Wave: <color:ffffff>" SPC %wave "<color:1818ba>You are a <color:FFFFFF>" SPC %client.getTeam().name);
%time = 240
serTimer5(%time, %wave, %client);
}
}
else
{
%time--;
$TimerSchedule = schedule(1000, 0, "serTimer", %time);
}
function serTimer5(%time, %wave, %client)
{
if (%time <= 0)
{
%wave = 5;
commandToAll('centerPrint', "<font:impact:50><color:f420eb>The fifth and final wave has begun!",5);
commandToAll('bottomPrint', "<color:f420eb>Wave: <color:ffffff>" SPC %wave "<color:1818ba>You are a <color:FFFFFF>" SPC %client.getTeam().name);
%time = 240
serTimer6(%time, %wave, %client);
}
}
else
{
%time--;
$TimerSchedule = schedule(1000, 0, "serTimer", %time);
}
function serTimer6(%time, %wave, %client)
{
if (%time <= 0)
{
%wave = 5;
commandToAll('centerPrint', "<font:impact:50><color:f420eb>The Survivors have Won!",5);
}
}
else
{
%time--;
$TimerSchedule = schedule(1000, 0, "serTimer", %time);
}
}