mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-14 14:44:55 +02:00
introduce POI until entrance until the DL spawn
This commit is contained in:
33
data/actions/scripts/pits_of_inferno/oil.lua
Normal file
33
data/actions/scripts/pits_of_inferno/oil.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
local bridgePosition = Position(32801, 32336, 11)
|
||||
|
||||
local function revertBridge()
|
||||
Tile(bridgePosition):getItemById(409):transform(622)
|
||||
end
|
||||
|
||||
local function revertLever(position)
|
||||
local leverItem = Tile(position):getItemById(2773)
|
||||
if leverItem then
|
||||
leverItem:transform(2772)
|
||||
end
|
||||
end
|
||||
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
if item.itemid ~= 2772 then
|
||||
return false
|
||||
end
|
||||
|
||||
if not Tile(Position(32795, 32337, 11)):getItemById(2886, FLUID_OIL) then
|
||||
player:say('The lever is creaking and rusty.', TALKTYPE_MONSTER_SAY)
|
||||
return true
|
||||
end
|
||||
|
||||
local water = Tile(bridgePosition):getItemById(622)
|
||||
if water then
|
||||
water:transform(409)
|
||||
addEvent(revertBridge, 10 * 60 * 1000)
|
||||
end
|
||||
|
||||
item:transform(2773)
|
||||
addEvent(revertLever, 10 * 60 * 1000, toPosition)
|
||||
return true
|
||||
end
|
Reference in New Issue
Block a user