From 8f769c1bda425b7e1b9e24b0b914e6c62f11ccf2 Mon Sep 17 00:00:00 2001 From: sebbesiren <35768829+sebbesiren@users.noreply.github.com> Date: Sat, 4 Nov 2023 23:26:21 +0100 Subject: [PATCH] fix: access to warzone 4, 5, 6 (#1777) If statement in access to warzone 4, 5, 6 was wrong. --- .../actions/quests/dangerous_depth/crude_lava_pump.lua | 6 +++--- .../movements/quests/dangerous_depth/warzone_entrance.lua | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/data-otservbr-global/scripts/actions/quests/dangerous_depth/crude_lava_pump.lua b/data-otservbr-global/scripts/actions/quests/dangerous_depth/crude_lava_pump.lua index 2346433c49b..64875337f37 100644 --- a/data-otservbr-global/scripts/actions/quests/dangerous_depth/crude_lava_pump.lua +++ b/data-otservbr-global/scripts/actions/quests/dangerous_depth/crude_lava_pump.lua @@ -15,7 +15,7 @@ function dangerousDepthPump.onUse(player, item) for _, spectator in pairs(spectators) do if spectator:isPlayer() then local playerSpectator = spectator - if playerSpectator:getStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneVI) < 1 then + if playerSpectator:getStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneVI) ~= 1 then playerSpectator:setStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneVI, 1) end end @@ -33,7 +33,7 @@ function dangerousDepthPump.onUse(player, item) for _, spectator in pairs(spectators) do if spectator:isPlayer() then local playerSpectator = spectator - if playerSpectator:getStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneV) < 1 then + if playerSpectator:getStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneV) ~= 1 then playerSpectator:setStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneV, 1) end end @@ -51,7 +51,7 @@ function dangerousDepthPump.onUse(player, item) for _, spectator in pairs(spectators) do if spectator:isPlayer() then local playerSpectator = spectator - if playerSpectator:getStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneIV) < 1 then + if playerSpectator:getStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneIV) ~= 1 then playerSpectator:setStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneIV, 1) end end diff --git a/data-otservbr-global/scripts/movements/quests/dangerous_depth/warzone_entrance.lua b/data-otservbr-global/scripts/movements/quests/dangerous_depth/warzone_entrance.lua index 0d6b38fcdd8..83120868640 100644 --- a/data-otservbr-global/scripts/movements/quests/dangerous_depth/warzone_entrance.lua +++ b/data-otservbr-global/scripts/movements/quests/dangerous_depth/warzone_entrance.lua @@ -14,7 +14,7 @@ function warzoneEntrance.onStepIn(creature, item, position, fromPosition, toPosi player:setStorageValue(Storage.DangerousDepths.Access.TimerWarzoneVI, os.time() + 8 * 60 * 60) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Entering the warzone (you can enter freely for 8 hours from now).") player:teleportTo(warzoneVI) - elseif player:getStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneVI) < 1 and player:getStorageValue(Storage.DangerousDepths.Access.TimerWarzoneVI) <= os.time() then + elseif player:getStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneVI) ~= 1 and player:getStorageValue(Storage.DangerousDepths.Access.TimerWarzoneVI) <= os.time() then player:teleportTo(Position(fromPosition.x + 1, fromPosition.y, fromPosition.z)) player:sendTextMessage( MESSAGE_EVENT_ADVANCE, @@ -34,7 +34,7 @@ function warzoneEntrance.onStepIn(creature, item, position, fromPosition, toPosi player:setStorageValue(Storage.DangerousDepths.Access.TimerWarzoneV, os.time() + 8 * 60 * 60) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Entering the warzone (you can enter freely for 8 hours from now).") player:teleportTo(warzoneV) - elseif player:getStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneV) < 1 and player:getStorageValue(Storage.DangerousDepths.Access.TimerWarzoneV) <= os.time() then + elseif player:getStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneV) ~= 1 and player:getStorageValue(Storage.DangerousDepths.Access.TimerWarzoneV) <= os.time() then player:teleportTo(Position(fromPosition.x, fromPosition.y + 1, fromPosition.z)) player:sendTextMessage( MESSAGE_EVENT_ADVANCE, @@ -54,7 +54,7 @@ function warzoneEntrance.onStepIn(creature, item, position, fromPosition, toPosi player:setStorageValue(Storage.DangerousDepths.Access.TimerWarzoneIV, os.time() + 8 * 60 * 60) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Entering the warzone (you can enter freely for 8 hours from now).") player:teleportTo(warzoneIV) - elseif player:getStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneIV) < 1 and player:getStorageValue(Storage.DangerousDepths.Access.TimerWarzoneIV) <= os.time() then + elseif player:getStorageValue(Storage.DangerousDepths.Access.LavaPumpWarzoneIV) ~= 1 and player:getStorageValue(Storage.DangerousDepths.Access.TimerWarzoneIV) <= os.time() then player:teleportTo(Position(fromPosition.x, fromPosition.y + 1, fromPosition.z)) player:sendTextMessage( MESSAGE_EVENT_ADVANCE,