Skip to content

Commit

Permalink
fix: access to warzone 4, 5, 6 (#1777)
Browse files Browse the repository at this point in the history
If statement in access to warzone 4, 5, 6 was wrong.
  • Loading branch information
sebbesiren authored Nov 4, 2023
1 parent 33deb5d commit 8f769c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 8f769c1

Please sign in to comment.