mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-14 14:44:55 +02:00
99% poi quest done. Missing bureaucrats npcs, maybe some exit tps and quest log
This commit is contained in:
42
data/movements/scripts/pits_of_inferno/drawbridge.lua
Normal file
42
data/movements/scripts/pits_of_inferno/drawbridge.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
local bridgePosition = Position(32851, 32309, 11)
|
||||
local relocatePosition = Position(32852, 32310, 11)
|
||||
local dirtIds = {4797, 4799}
|
||||
|
||||
function onStepIn(creature, item, position, fromPosition)
|
||||
if not creature:isPlayer() then
|
||||
return true
|
||||
end
|
||||
|
||||
local tile = Tile(bridgePosition)
|
||||
local lavaItem = tile:getItemById(727)
|
||||
if lavaItem then
|
||||
lavaItem:transform(1771)
|
||||
|
||||
local dirtItem
|
||||
for i = 1, #dirtIds do
|
||||
dirtItem = tile:getItemById(dirtIds[i])
|
||||
if dirtItem then
|
||||
dirtItem:remove()
|
||||
end
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
function onStepOut(creature, item, position, fromPosition)
|
||||
if not creature:isPlayer() then
|
||||
return true
|
||||
end
|
||||
|
||||
local tile = Tile(bridgePosition)
|
||||
local bridgeItem = tile:getItemById(1771)
|
||||
if bridgeItem then
|
||||
tile:relocateTo(relocatePosition)
|
||||
bridgeItem:transform(727)
|
||||
|
||||
for i = 1, #dirtIds do
|
||||
Game.createItem(dirtIds[i], 1, bridgePosition)
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
Reference in New Issue
Block a user