99% poi quest done. Missing bureaucrats npcs, maybe some exit tps and quest log

This commit is contained in:
ErikasKontenis
2020-05-05 17:24:05 +03:00
parent 92998c466c
commit 99ea898868
33 changed files with 1429 additions and 461 deletions

View File

@@ -0,0 +1,22 @@
local config = {
[16772] = Position(32754, 32365, 15),
[16773] = Position(32725, 32381, 15),
[16774] = Position(32827, 32241, 12),
[50082] = Position(32745, 32394, 14),
[50083] = Position(32745, 32394, 14)
}
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
local targetPosition = config[item:getMovementId()]
if not targetPosition then
return true
end
player:teleportTo(targetPosition)
return true
end

View File

@@ -0,0 +1,16 @@
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
doRelocate(item:getPosition(),{x = 32745, y = 32387, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 32745, y = 32387, z = 15}, 11)
end
function onAddItem(item, tileitem, position)
doRelocate(item:getPosition(),{x = 32745, y = 32387, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 32745, y = 32387, z = 15}, 11)
end

View File

@@ -0,0 +1,16 @@
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
doRelocate(item:getPosition(),{x = 32767, y = 32366, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 32767, y = 32366, z = 15}, 11)
end
function onAddItem(item, tileitem, position)
doRelocate(item:getPosition(),{x = 32767, y = 32366, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 32767, y = 32366, z = 15}, 11)
end

View File

@@ -0,0 +1,16 @@
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
doRelocate(item:getPosition(),{x = 32818, y = 32344, z = 13})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 32818, y = 32344, z = 13}, 11)
end
function onAddItem(item, tileitem, position)
doRelocate(item:getPosition(),{x = 32818, y = 32344, z = 13})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 32818, y = 32344, z = 13}, 11)
end

View File

@@ -0,0 +1,22 @@
local cStorages = {
[2090] = 17679, -- ThroneInfernatil
[2091] = 17680, -- ThroneTafariel
[2092] = 17681, -- ThroneVerminor
[2093] = 17682, -- ThroneApocalypse
[2094] = 17683, -- ThroneBazir
[2095] = 17684, -- ThroneAshfalor
[2096] = 17685 -- ThronePumin
}
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
if player:getStorageValue(cStorages[item:getMovementId()]) ~= 1 then
player:teleportTo(fromPosition)
player:say('You\'ve not absorbed energy from this throne.', TALKTYPE_MONSTER_SAY)
end
return true
end

View 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

View File

@@ -0,0 +1,45 @@
local config = {
[17660] = Position(32835, 32275, 9), -- exit
[17661] = Position(32856, 32353, 15), -- Verminor Enter
[17662] = Position(32848, 32230, 15), -- Infernatil Enter
[17663] = Position(32767, 32227, 15), -- Tafariel Enter
[17664] = Position(32856, 32278, 15), -- Apocalypse Enter
[17665] = Position(32733, 32297, 15), -- Pumin Enter
[17666] = Position(32806, 32328, 15), -- Bazir Enter
[17667] = Position(32835, 32262, 15), -- Ashfalor Enter
[17668] = Position(32830, 32252, 10), -- reward room Enter
[17669] = Position(32821, 32244, 12), -- Verminor Exit
[17670] = Position(32821, 32241, 12), -- Infernatil Exit
[17671] = Position(32821, 32238, 12), -- Tafariel Exit
[17672] = Position(32824, 32237, 12), -- Apocalypse Exit
[17673] = Position(32827, 32238, 12), -- Pumin Exit
[17674] = Position(32827, 32241, 12), -- Bazir Exit
[17675] = Position(32827, 32244, 12), -- Ashfalor Exit
[17676] = Position(32824, 32232, 12), -- reward room Exit
[17677] = Position(32829, 32243, 11), -- chest room enter
[17678] = Position(32826, 32248, 10) -- chest room exit
}
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
if player:getStorageValue(17510) ~= 1 then
player:setStorageValue(17510, 1)
return true
end
local targetPosition = config[item:getMovementId()]
doRelocate(item:getPosition(), targetPosition)
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect(targetPosition, 11)
end
function onAddItem(item, tileitem, position)
local targetPosition = config[tileitem:getMovementId()]
doRelocate(item:getPosition(),targetPosition)
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect(targetPosition, 11)
end

View File

@@ -0,0 +1,29 @@
local ladderPosition = Position(32854, 32321, 11)
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
local ladderItem = Tile(ladderPosition):getItemById(5542)
if not ladderItem then
Game.createItem(5542, 1, ladderPosition)
player:say('You hear a rumbling from far away.', TALKTYPE_MONSTER_SAY, false, player)
end
return true
end
function onStepOut(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
local ladderItem = Tile(ladderPosition):getItemById(5542)
if ladderItem then
ladderItem:remove()
player:say('You hear a rumbling from far away.', TALKTYPE_MONSTER_SAY, false, player)
end
return true
end

View File

@@ -0,0 +1,17 @@
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
if 1 == 1 then
-- TODO: if player:getStorageValue(Storage.PitsOfInferno.Pumin) > 8 then
player:teleportTo(Position(32786, 32308, 15))
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
else
player:teleportTo(fromPosition)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'To enter Pumin\'s domain you must gain permission from the bureaucrats.')
end
return true
end

View File

@@ -0,0 +1,16 @@
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
doRelocate(item:getPosition(),{x = 32732, y = 32266, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 32732, y = 32266, z = 15}, 11)
end
function onAddItem(item, tileitem, position)
doRelocate(item:getPosition(),{x = 32732, y = 32266, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 32732, y = 32266, z = 15}, 11)
end

View File

@@ -0,0 +1,22 @@
local stonePosition = Position(32826, 32274, 11)
function removeStone()
local stoneItem = Tile(stonePosition):getItemById(1772)
if stoneItem then
stoneItem:remove()
stonePosition:sendMagicEffect(CONST_ME_POFF)
end
end
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
player:teleportTo(Position(32826, 32273, 12))
player:getPosition():sendMagicEffect(CONST_ME_EXPLOSIONAREA)
Game.createItem(1772, 1, stonePosition)
addEvent(removeStone, 10 * 1000)
return true
end

View File

@@ -0,0 +1,32 @@
local config = {
[2080] = {storage = 17679, text = 'You have touched Infernatil\'s throne and absorbed some of his spirit.', effect = CONST_ME_FIREAREA, toPosition = Position(32909, 32211, 15)},
[2081] = {storage = 17680, text = 'You have touched Tafariel\'s throne and absorbed some of his spirit.', effect = CONST_ME_MORTAREA, toPosition = Position(32761, 32243, 15)},
[2082] = {storage = 17681, text = 'You have touched Verminor\'s throne and absorbed some of his spirit.', effect = CONST_ME_POISONAREA, toPosition = Position(32840, 32327, 15)},
[2083] = {storage = 17682, text = 'You have touched Apocalypse\'s throne and absorbed some of his spirit.', effect = CONST_ME_EXPLOSIONAREA, toPosition = Position(32875, 32267, 15)},
[2084] = {storage = 17683, text = 'You have touched Bazir\'s throne and absorbed some of his spirit.', effect = CONST_ME_MAGIC_GREEN, toPosition = Position(32745, 32385, 15)},
[2085] = {storage = 17684, text = 'You have touched Ashfalor\'s throne and absorbed some of his spirit.', effect = CONST_ME_FIREAREA, toPosition = Position(32839, 32310, 15)},
[2086] = {storage = 17685, text = 'You have touched Pumin\'s throne and absorbed some of his spirit.', effect = CONST_ME_MORTAREA, toPosition = Position(32785, 32279, 15)}
}
function onStepIn(creature, item, position, fromPosition)
if not creature:isPlayer() then
return true
end
local throne = config[item:getMovementId()]
if not throne then
return true
end
local cStorage = throne.storage
if creature:getStorageValue(cStorage) ~= 1 then
creature:setStorageValue(cStorage, 1)
creature:getPosition():sendMagicEffect(throne.effect)
creature:say(throne.text, TALKTYPE_MONSTER_SAY)
else
creature:teleportTo(throne.toPosition)
creature:getPosition():sendMagicEffect(CONST_ME_MORTAREA)
creature:say('Begone!', TALKTYPE_MONSTER_SAY)
end
return true
end

View File

@@ -0,0 +1,42 @@
local config = {
[28810] = Position(32838, 32304, 9),
[28811] = Position(32839, 32320, 9),
[28812] = Position(32844, 32310, 9),
[28813] = Position(32847, 32307, 9),
[28814] = Position(32856, 32306, 9),
[28815] = Position(32827, 32308, 9),
[28816] = Position(32840, 32317, 9),
[28817] = Position(32855, 32296, 9),
[28818] = Position(32857, 32307, 9),
[28819] = Position(32856, 32289, 9),
[28820] = Position(32843, 32313, 9),
[28821] = Position(32861, 32320, 9),
[28822] = Position(32841, 32323, 9),
[28823] = Position(32847, 32287, 9),
[28824] = Position(32854, 32323, 9),
[28825] = Position(32855, 32304, 9),
[28826] = Position(32841, 32323, 9),
[28827] = Position(32861, 32317, 9),
[28828] = Position(32827, 32314, 9),
[28829] = Position(32858, 32296, 9),
[28830] = Position(32861, 32301, 9),
[28831] = Position(32855, 32321, 9),
[28832] = Position(32855, 32320, 9),
[28833] = Position(32855, 32318, 9),
[28834] = Position(32855, 32319, 9)
}
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
local targetPosition = config[item:getMovementId()]
if not targetPosition then
return true
end
player:teleportTo(targetPosition)
return true
end

View File

@@ -0,0 +1,11 @@
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
position.z = position.z + 1
player:teleportTo(position)
position:sendMagicEffect(CONST_ME_EXPLOSIONAREA)
return true
end