|
|
|
|
@ -25,47 +25,50 @@ if (!connected)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
connected = 0
|
|
|
|
|
instance_destroy()
|
|
|
|
|
popup_text("Failed to connect")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (global.event[103] > 0)
|
|
|
|
|
if (connected)
|
|
|
|
|
{
|
|
|
|
|
if (global.event[103] > 0)
|
|
|
|
|
global.event[103] = floor(global.event[103])
|
|
|
|
|
if (global.event[303] > 0)
|
|
|
|
|
if (global.event[303] > 0)
|
|
|
|
|
phase = 0
|
|
|
|
|
if (global.event[172] != 3)
|
|
|
|
|
if (global.event[172] != 3)
|
|
|
|
|
global.event[172] = 3
|
|
|
|
|
if (global.gamemode > 1 || global.saxmode)
|
|
|
|
|
{
|
|
|
|
|
if (global.gamemode > 1 || global.saxmode)
|
|
|
|
|
{
|
|
|
|
|
if (global.gamemode == 1)
|
|
|
|
|
global.gamemode = 2
|
|
|
|
|
if (global.lavastate < 7)
|
|
|
|
|
global.lavastate = 7
|
|
|
|
|
}
|
|
|
|
|
if (room == rm_death)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (room == rm_death)
|
|
|
|
|
{
|
|
|
|
|
phase = 0
|
|
|
|
|
queenHealth = (global.mod_queenHstart + (global.mtanks * 10))
|
|
|
|
|
}
|
|
|
|
|
if ((room == rm_a4b02 || room == rm_a4b03 || room == rm_a4b04 || room == rm_a4b05 || room == rm_a4b06 || room == rm_a4b07 || room == rm_a4b08 || room == rm_a4b09 || room == rm_a4b10 || room == rm_a4b11 || room == rm_a4b12 || room == rm_a4b13 || room == rm_a4b14 || room == rm_a4b15 || room == rm_a4b16 || room == rm_a4b17 || room == rm_a4b18 || room == rm_a4b19) && global.event[203] > 0 && global.event[203] < 9 && (!instance_exists(oA4EscapeControl)))
|
|
|
|
|
}
|
|
|
|
|
if ((room == rm_a4b02 || room == rm_a4b03 || room == rm_a4b04 || room == rm_a4b05 || room == rm_a4b06 || room == rm_a4b07 || room == rm_a4b08 || room == rm_a4b09 || room == rm_a4b10 || room == rm_a4b11 || room == rm_a4b12 || room == rm_a4b13 || room == rm_a4b14 || room == rm_a4b15 || room == rm_a4b16 || room == rm_a4b17 || room == rm_a4b18 || room == rm_a4b19) && global.event[203] > 0 && global.event[203] < 9 && (!instance_exists(oA4EscapeControl)))
|
|
|
|
|
instance_create(x, y, oA4EscapeControl)
|
|
|
|
|
if (room == rm_a4b01 && global.event[203] == 9 && instance_exists(oA4EscapeControl))
|
|
|
|
|
{
|
|
|
|
|
if (room == rm_a4b01 && global.event[203] == 9 && instance_exists(oA4EscapeControl))
|
|
|
|
|
{
|
|
|
|
|
with (oA4EscapeControl)
|
|
|
|
|
event_user(0)
|
|
|
|
|
}
|
|
|
|
|
if (global.event[203] == 9 && sfx_isplaying(sndA4AlarmLoop))
|
|
|
|
|
}
|
|
|
|
|
if (global.event[203] == 9 && sfx_isplaying(sndA4AlarmLoop))
|
|
|
|
|
sfx_stop(sndA4AlarmLoop)
|
|
|
|
|
if ((!instance_exists(oQueen)) && global.event[303] == 0)
|
|
|
|
|
{
|
|
|
|
|
if ((!instance_exists(oQueen)) && global.event[303] == 0)
|
|
|
|
|
{
|
|
|
|
|
if (!queenHealthResetQueued)
|
|
|
|
|
{
|
|
|
|
|
queenHealthResetQueued = 1
|
|
|
|
|
alarm[1] = 5
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (instance_exists(oQueen) && (!is_undefined(oQueen.phase)))
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (instance_exists(oQueen) && (!is_undefined(oQueen.phase)))
|
|
|
|
|
{
|
|
|
|
|
if (global.event[303] > 0 && (!queenDead))
|
|
|
|
|
{
|
|
|
|
|
with (oQueen)
|
|
|
|
|
@ -92,42 +95,42 @@ if (instance_exists(oQueen) && (!is_undefined(oQueen.phase)))
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if keyboard_check_pressed(vk_f2)
|
|
|
|
|
}
|
|
|
|
|
if keyboard_check_pressed(vk_f2)
|
|
|
|
|
instance_destroy()
|
|
|
|
|
if keyboard_check_pressed(vk_f3)
|
|
|
|
|
if keyboard_check_pressed(vk_f3)
|
|
|
|
|
popup_text_ext(string(oControl.seed), 300)
|
|
|
|
|
if keyboard_check_pressed(vk_f4)
|
|
|
|
|
{
|
|
|
|
|
if keyboard_check_pressed(vk_f4)
|
|
|
|
|
{
|
|
|
|
|
if (oControl.showname == "disabled")
|
|
|
|
|
oControl.showname = "enabled"
|
|
|
|
|
if (oControl.showname == "enabled")
|
|
|
|
|
oControl.showname = "disabled"
|
|
|
|
|
}
|
|
|
|
|
if instance_exists(oCharacter)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if instance_exists(oCharacter)
|
|
|
|
|
{
|
|
|
|
|
posX = global.mapposx
|
|
|
|
|
posY = global.mapposy
|
|
|
|
|
}
|
|
|
|
|
if ((room == rm_a4b02 || room == rm_a4b03 || room == rm_a4b04 || room == rm_a4b05 || room == rm_a4b06 || room == rm_a4b07 || room == rm_a4b08 || room == rm_a4b09 || room == rm_a4b10 || room == rm_a4b11 || room == rm_a4b12 || room == rm_a4b13 || room == rm_a4b14 || room == rm_a4b15 || room == rm_a4b16 || room == rm_a4b17 || room == rm_a4b18 || room == rm_a4b19) && global.event[203] == 9 && (!teleport))
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if ((room == rm_a4b02 || room == rm_a4b03 || room == rm_a4b04 || room == rm_a4b05 || room == rm_a4b06 || room == rm_a4b07 || room == rm_a4b08 || room == rm_a4b09 || room == rm_a4b10 || room == rm_a4b11 || room == rm_a4b12 || room == rm_a4b13 || room == rm_a4b14 || room == rm_a4b15 || room == rm_a4b16 || room == rm_a4b17 || room == rm_a4b18 || room == rm_a4b19) && global.event[203] == 9 && (!teleport))
|
|
|
|
|
{
|
|
|
|
|
teleport = 1
|
|
|
|
|
global.targetx = 624
|
|
|
|
|
global.targety = 144
|
|
|
|
|
room_change(216, 1)
|
|
|
|
|
}
|
|
|
|
|
if (instance_exists(oCharacter) && (oCharacter.state == oCharacter.SAVINGFX || oCharacter.state == oCharacter.SAVINGSHIPFX || oCharacter.state == oCharacter.SAVINGSHIP))
|
|
|
|
|
}
|
|
|
|
|
if (instance_exists(oCharacter) && (oCharacter.state == oCharacter.SAVINGFX || oCharacter.state == oCharacter.SAVINGSHIPFX || oCharacter.state == oCharacter.SAVINGSHIP))
|
|
|
|
|
refill_heath_ammo()
|
|
|
|
|
if (oControl.mod_monstersextremecheck == 1 && oControl.mod_monstersextreme == 0 && global.event[302] > 0)
|
|
|
|
|
if (oControl.mod_monstersextremecheck == 1 && oControl.mod_monstersextreme == 0 && global.event[302] > 0)
|
|
|
|
|
oControl.mod_monstersextreme = 1
|
|
|
|
|
else if (oControl.mod_monstersextremecheck == 0 && oControl.mod_monstersextreme == 1)
|
|
|
|
|
else if (oControl.mod_monstersextremecheck == 0 && oControl.mod_monstersextreme == 1)
|
|
|
|
|
oControl.mod_monstersextreme = 0
|
|
|
|
|
if (global.log[21] > 0 && global.event[309] == 0)
|
|
|
|
|
if (global.log[21] > 0 && global.event[309] == 0)
|
|
|
|
|
global.event[309] = 1
|
|
|
|
|
if (global.event[309] == 1 && global.log[21] < 1)
|
|
|
|
|
if (global.event[309] == 1 && global.log[21] < 1)
|
|
|
|
|
global.log[21] = 1
|
|
|
|
|
if (time == 0 && connected && instance_exists(id))
|
|
|
|
|
{
|
|
|
|
|
if (time == 0 && connected && instance_exists(id))
|
|
|
|
|
{
|
|
|
|
|
if (ds_list_size(global.idList) > 0)
|
|
|
|
|
{
|
|
|
|
|
checkListID = ds_list_create()
|
|
|
|
|
@ -167,9 +170,9 @@ if (time == 0 && connected && instance_exists(id))
|
|
|
|
|
ds_list_destroy(checkListID)
|
|
|
|
|
}
|
|
|
|
|
time = 60
|
|
|
|
|
}
|
|
|
|
|
if (maxpbombsTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (maxpbombsTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
if (global.maxpbombsPrev != global.maxpbombs)
|
|
|
|
|
{
|
|
|
|
|
buffer_delete(buffer)
|
|
|
|
|
@ -197,9 +200,9 @@ if (maxpbombsTimer == 0 && connected)
|
|
|
|
|
maxpbombsChanged = 0
|
|
|
|
|
maxpbombsTimer = 75
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (maxhealthTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (maxhealthTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
if (global.maxhealthPrev != global.maxhealth)
|
|
|
|
|
{
|
|
|
|
|
buffer_delete(buffer)
|
|
|
|
|
@ -227,9 +230,9 @@ if (maxhealthTimer == 0 && connected)
|
|
|
|
|
maxhealthChanged = 0
|
|
|
|
|
maxhealthTimer = 75
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (etanksTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (etanksTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
if (global.etanksPrev != global.etanks)
|
|
|
|
|
{
|
|
|
|
|
buffer_delete(buffer)
|
|
|
|
|
@ -257,9 +260,9 @@ if (etanksTimer == 0 && connected)
|
|
|
|
|
etanksChanged = 0
|
|
|
|
|
etanksTimer = 75
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (mtanksTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (mtanksTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
if (global.mtanksPrev != global.mtanks)
|
|
|
|
|
{
|
|
|
|
|
buffer_delete(buffer)
|
|
|
|
|
@ -287,9 +290,9 @@ if (mtanksTimer == 0 && connected)
|
|
|
|
|
mtanksChanged = 0
|
|
|
|
|
mtanksTimer = 75
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (stanksTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (stanksTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
if (global.stanksPrev != global.stanks)
|
|
|
|
|
{
|
|
|
|
|
buffer_delete(buffer)
|
|
|
|
|
@ -317,9 +320,9 @@ if (stanksTimer == 0 && connected)
|
|
|
|
|
stanksChanged = 0
|
|
|
|
|
stanksTimer = 75
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (ptanksTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (ptanksTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
if (global.ptanksPrev != global.ptanks)
|
|
|
|
|
{
|
|
|
|
|
buffer_delete(buffer)
|
|
|
|
|
@ -347,9 +350,9 @@ if (ptanksTimer == 0 && connected)
|
|
|
|
|
ptanksChanged = 0
|
|
|
|
|
ptanksTimer = 75
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (healthTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (healthTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
if (global.playerhealthPrev != global.playerhealth)
|
|
|
|
|
{
|
|
|
|
|
buffer_delete(buffer)
|
|
|
|
|
@ -377,9 +380,9 @@ if (healthTimer == 0 && connected)
|
|
|
|
|
healthChanged = 0
|
|
|
|
|
healthTimer = 75
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (missilesTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (missilesTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
if (global.missilesPrev != global.missiles)
|
|
|
|
|
{
|
|
|
|
|
buffer_delete(buffer)
|
|
|
|
|
@ -407,9 +410,9 @@ if (missilesTimer == 0 && connected)
|
|
|
|
|
missilesChanged = 0
|
|
|
|
|
missilesTimer = 75
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (smissilesTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (smissilesTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
if (global.smissilesPrev != global.smissiles)
|
|
|
|
|
{
|
|
|
|
|
buffer_delete(buffer)
|
|
|
|
|
@ -437,9 +440,9 @@ if (smissilesTimer == 0 && connected)
|
|
|
|
|
smissilesChanged = 0
|
|
|
|
|
smissilesTimer = 75
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (pbombsTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (pbombsTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
if (global.pbombsPrev != global.pbombs)
|
|
|
|
|
{
|
|
|
|
|
buffer_delete(buffer)
|
|
|
|
|
@ -467,20 +470,20 @@ if (pbombsTimer == 0 && connected)
|
|
|
|
|
pbombsChanged = 0
|
|
|
|
|
pbombsTimer = 75
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if teleport
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if teleport
|
|
|
|
|
{
|
|
|
|
|
teleportTimer--
|
|
|
|
|
if (teleportTimer <= 0)
|
|
|
|
|
{
|
|
|
|
|
teleport = 0
|
|
|
|
|
teleportTimer = 60
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (disconnectTimer <= 0)
|
|
|
|
|
}
|
|
|
|
|
if (disconnectTimer <= 0)
|
|
|
|
|
instance_destroy()
|
|
|
|
|
if (pingTimer <= 0)
|
|
|
|
|
{
|
|
|
|
|
if (pingTimer <= 0)
|
|
|
|
|
{
|
|
|
|
|
pingTimer = 5
|
|
|
|
|
buffer_delete(buffer)
|
|
|
|
|
size = 1024
|
|
|
|
|
@ -498,9 +501,9 @@ if (pingTimer <= 0)
|
|
|
|
|
buffer_write(buffer, buffer_u32, current_time)
|
|
|
|
|
buffer_write(buffer, buffer_u16, global.ping)
|
|
|
|
|
result = network_send_packet(socket, buffer, buffer_tell(buffer))
|
|
|
|
|
}
|
|
|
|
|
if (resetTimer == 0)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (resetTimer == 0)
|
|
|
|
|
{
|
|
|
|
|
buffer_delete(buffer)
|
|
|
|
|
size = 1024
|
|
|
|
|
type = buffer_grow
|
|
|
|
|
@ -515,9 +518,9 @@ if (resetTimer == 0)
|
|
|
|
|
buffer_write(buffer, buffer_u8, 20)
|
|
|
|
|
buffer_write(buffer, buffer_u8, global.clientID)
|
|
|
|
|
result = network_send_packet(socket, buffer, buffer_tell(buffer))
|
|
|
|
|
}
|
|
|
|
|
if (currentItemsTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (currentItemsTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
currentItemsTimer = 120
|
|
|
|
|
buffer_delete(buffer)
|
|
|
|
|
size = 1024
|
|
|
|
|
@ -553,9 +556,9 @@ if (currentItemsTimer == 0 && connected)
|
|
|
|
|
buffer_write(buffer, buffer_u8, global.sbeam)
|
|
|
|
|
buffer_write(buffer, buffer_u8, global.cbeam)
|
|
|
|
|
result = network_send_packet(socket, buffer, buffer_tell(buffer))
|
|
|
|
|
}
|
|
|
|
|
if (beginReceiveTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (beginReceiveTimer == 0 && connected)
|
|
|
|
|
{
|
|
|
|
|
alarm[0] = 5
|
|
|
|
|
alarm[2] = 5
|
|
|
|
|
alarm[3] = 5
|
|
|
|
|
@ -567,29 +570,29 @@ if (beginReceiveTimer == 0 && connected)
|
|
|
|
|
alarm[9] = 5
|
|
|
|
|
alarm[10] = 3
|
|
|
|
|
alarm[11] = 20
|
|
|
|
|
}
|
|
|
|
|
time--
|
|
|
|
|
maxpbombsTimer--
|
|
|
|
|
maxhealthTimer--
|
|
|
|
|
etanksTimer--
|
|
|
|
|
mtanksTimer--
|
|
|
|
|
stanksTimer--
|
|
|
|
|
ptanksTimer--
|
|
|
|
|
healthTimer--
|
|
|
|
|
missilesTimer--
|
|
|
|
|
smissilesTimer--
|
|
|
|
|
pbombsTimer--
|
|
|
|
|
disconnectTimer--
|
|
|
|
|
pingTimer--
|
|
|
|
|
currentItemsTimer--
|
|
|
|
|
if global.receiving
|
|
|
|
|
}
|
|
|
|
|
time--
|
|
|
|
|
maxpbombsTimer--
|
|
|
|
|
maxhealthTimer--
|
|
|
|
|
etanksTimer--
|
|
|
|
|
mtanksTimer--
|
|
|
|
|
stanksTimer--
|
|
|
|
|
ptanksTimer--
|
|
|
|
|
healthTimer--
|
|
|
|
|
missilesTimer--
|
|
|
|
|
smissilesTimer--
|
|
|
|
|
pbombsTimer--
|
|
|
|
|
disconnectTimer--
|
|
|
|
|
pingTimer--
|
|
|
|
|
currentItemsTimer--
|
|
|
|
|
if global.receiving
|
|
|
|
|
beginReceiveTimer--
|
|
|
|
|
if (resetTimer > -1)
|
|
|
|
|
if (resetTimer > -1)
|
|
|
|
|
resetTimer--
|
|
|
|
|
if (beginReceiveTimer < -1)
|
|
|
|
|
if (beginReceiveTimer < -1)
|
|
|
|
|
beginReceiveTimer = -1
|
|
|
|
|
if instance_exists(id)
|
|
|
|
|
{
|
|
|
|
|
if instance_exists(id)
|
|
|
|
|
{
|
|
|
|
|
if (ds_list_size(roomListData) > 0)
|
|
|
|
|
{
|
|
|
|
|
for (h = 0; h < ds_list_size(roomListData); h++)
|
|
|
|
|
@ -621,9 +624,9 @@ if instance_exists(id)
|
|
|
|
|
}
|
|
|
|
|
else if (ds_list_size(global.hatchlingList) > 0)
|
|
|
|
|
ds_list_clear(global.hatchlingList)
|
|
|
|
|
}
|
|
|
|
|
switch syncedDifficulty
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
switch syncedDifficulty
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
if (global.saxmode && (!global.sax))
|
|
|
|
|
{
|
|
|
|
|
@ -713,12 +716,12 @@ switch syncedDifficulty
|
|
|
|
|
oControl.mod_diffmult = 4
|
|
|
|
|
}
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (oControl.mod_monstersextremecheck != elm)
|
|
|
|
|
if (oControl.mod_monstersextremecheck != elm)
|
|
|
|
|
oControl.mod_monstersextremecheck = elm
|
|
|
|
|
if (((!global.ingame) || (!global.opshowhud)) && global.saxmode)
|
|
|
|
|
{
|
|
|
|
|
if (((!global.ingame) || (!global.opshowhud)) && global.saxmode)
|
|
|
|
|
{
|
|
|
|
|
lowestDist = 1000
|
|
|
|
|
enemyCount = 0
|
|
|
|
|
for (i = 0; i < ds_list_size(oClient.posData); i++)
|
|
|
|
|
@ -793,9 +796,9 @@ if (((!global.ingame) || (!global.opshowhud)) && global.saxmode)
|
|
|
|
|
global.scannerSprite = 1880
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (connected && room == rm_a1h01 && global.event[51] == 0 && global.log[21] > 0 && global.sax && global.saxmode)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
if (connected && room == rm_a1h01 && global.event[51] == 0 && global.log[21] > 0 && global.sax && global.saxmode)
|
|
|
|
|
{
|
|
|
|
|
playerInBossRoom = 0
|
|
|
|
|
if (ds_list_size(oClient.posData) > 0)
|
|
|
|
|
{
|
|
|
|
|
@ -814,4 +817,5 @@ if (connected && room == rm_a1h01 && global.event[51] == 0 && global.log[21] > 0
|
|
|
|
|
global.targety = 160
|
|
|
|
|
room_change(35, 1)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|