Code: Select all
#include "zcommon.acs"
script "LightRide" ENTER // addr = 8, flags=0000
{
int local0;
int goto_block;
switch (goto_block) {
case 0:
if ((PlayerNumber() == 0)) {
local0 = 0;
goto_block = 2; restart;
} else {
goto_block = 3; restart;
}
case 2:
if ((local0 < 9999)) {
if(GetSectorLightLevel(local0) > 148) {Light_LowerByValue(local0, GetSectorLightLevel(local0) / 1.4);}
Light_LowerByValue(local0, 24);
SetFogDensity(local0,56);
local0++;
goto_block = 2; restart;
} else {
goto_block = 3; restart;
}
case 3:
Terminate;
}
}