finish quest part of inq

This commit is contained in:
ErikasKontenis
2022-04-18 18:50:47 +03:00
parent 661759508d
commit 3f4956b3b9
32 changed files with 1155 additions and 78 deletions

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 = 33091, y = 31781, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33091, y = 31781, z = 15}, 11)
end
function onAddItem(item, tileitem, position)
doRelocate(item:getPosition(),{x = 33091, y = 31781, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33091, y = 31781, 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 = 33061, y = 31752, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33061, y = 31752, z = 15}, 11)
end
function onAddItem(item, tileitem, position)
doRelocate(item:getPosition(),{x = 33061, y = 31752, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33061, y = 31752, 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 = 33149, y = 31782, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33149, y = 31782, z = 15}, 11)
end
function onAddItem(item, tileitem, position)
doRelocate(item:getPosition(),{x = 33149, y = 31782, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33149, y = 31782, 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 = 33090, y = 31759, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33090, y = 31759, z = 15}, 11)
end
function onAddItem(item, tileitem, position)
doRelocate(item:getPosition(),{x = 33090, y = 31759, z = 15})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33090, y = 31759, 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 = 33192, y = 31686, z = 14})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33192, y = 31686, z = 14}, 11)
end
function onAddItem(item, tileitem, position)
doRelocate(item:getPosition(),{x = 33192, y = 31686, z = 14})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33192, y = 31686, z = 14}, 11)
end

View File

@@ -0,0 +1,38 @@
local throneStorages = {
17679,
17680,
17681,
17682,
17683,
17684,
17685
}
local function hasTouchedOneThrone(player)
for i = 1, #throneStorages do
if player:getStorageValue(throneStorages[i]) == 1 then
return true
end
end
return false
end
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
if not hasTouchedOneThrone(player) or player:getLevel() < 100 or player:getStorageValue(12160) < 20 then
player:teleportTo(fromPosition)
position:sendMagicEffect(CONST_ME_TELEPORT)
fromPosition:sendMagicEffect(CONST_ME_TELEPORT)
return true
end
local destination = Position(33168, 31683, 15)
player:teleportTo(destination)
position:sendMagicEffect(CONST_ME_TELEPORT)
destination:sendMagicEffect(CONST_ME_TELEPORT)
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 = 33192, y = 31686, z = 14})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33192, y = 31686, z = 14}, 11)
end
function onAddItem(item, tileitem, position)
doRelocate(item:getPosition(),{x = 33192, y = 31686, z = 14})
item:getPosition():sendMagicEffect(11)
Game.sendMagicEffect({x = 33192, y = 31686, z = 14}, 11)
end

View File

@@ -0,0 +1,68 @@
local teleports = {
[2150] = {text = 'Entering Ushuriel\'s ward.', newPos = Position(33158, 31728, 11), storage = 0, alwaysSetStorage = true}, -- to ushuriel ward
[2151] = {text = 'Entering the Crystal Caves.', bossStorage = 200, newPos = Position(33069, 31782, 13), storage = 1}, -- from ushuriel ward
[2152] = {text = 'Escaping back to the Retreat.', newPos = Position(33165, 31709, 14)}, -- from crystal caves
[2153] = {text = 'Entering the Crystal Caves.', newPos = Position(33069, 31782, 13), storage = 1}, -- to crystal caves
[2154] = {text = 'Entering the Sunken Caves.', newPos = Position(33169, 31755, 13)}, -- to sunken caves
[2155] = {text = 'Entering the Mirror Maze of Madness.', newPos = Position(33065, 31772, 10)}, -- from sunken caves
[2156] = {text = 'Entering Zugurosh\'s ward.', newPos = Position(33124, 31692, 11)}, -- to zugurosh ward
[2157] = {text = 'Entering the Blood Halls.', bossStorage = 201, newPos = Position(33372, 31613, 14), storage = 2}, -- from zugurosh ward
[2158] = {text = 'Escaping back to the Retreat.', newPos = Position(33165, 31709, 14)}, -- from blood halls
[2159] = {text = 'Entering the Blood Halls.', newPos = Position(33372, 31613, 14), storage = 2}, -- to blood halls
[2160] = {text = 'Entering the Foundry.', newPos = Position(33356, 31589, 11)}, -- to foundry
[2161] = {text = 'Entering Madareth\'s ward.', newPos = Position(33197, 31767, 11)}, -- to madareth ward
[2162] = {text = 'Entering the Vats.', bossStorage = 202, newPos = Position(33153, 31782, 12), storage = 3}, -- from madareth ward
[2163] = {text = 'Escaping back to the Retreat.', newPos = Position(33165, 31709, 14)}, -- from vats
[2164] = {text = 'Entering the Vats.', newPos = Position(33153, 31782, 12), storage = 3}, -- to vats
[2165] = {text = 'Entering the Battlefield.', newPos = Position(33250, 31632, 13)}, -- to battlefield
[2166] = {text = 'Entering the Vats.', newPos = Position(33233, 31758, 12)}, -- from battlefield
[2167] = {text = 'Entering the Demon Forge.', newPos = Position(33232, 31733, 11)}, -- to brothers ward
[2168] = {text = 'Entering the Arcanum.', bossStorage = 203, newPos = Position(33038, 31753, 15), storage = 4}, -- from demon forge
[2169] = {text = 'Escaping back to the Retreat.', newPos = Position(33165, 31709, 14)}, -- from arcanum
[2170] = {text = 'Entering the Arcanum.', newPos = Position(33038, 31753, 15), storage = 4}, -- to arcanum
[2171] = {text = 'Entering the Soul Wells.', newPos = Position(33093, 31575, 11)}, -- to soul wells
[2172] = {text = 'Entering the Arcanum.', newPos = Position(33186, 31759, 15)}, -- from soul wells
[2173] = {text = 'Entering the Annihilon\'s ward.', newPos = Position(33197, 31703, 11)}, -- to annihilon ward
[2174] = {text = 'Entering the Hive.', bossStorage = 204, newPos = Position(33199, 31686, 12), storage = 5}, -- from annihilon ward
[2175] = {text = 'Escaping back to the Retreat.', newPos = Position(33165, 31709, 14)}, -- from hive
[2176] = {text = 'Entering the Hive.', newPos = Position(33199, 31686, 12), storage = 5}, -- to hive
[2177] = {text = 'Entering the Hellgorak\'s ward.', newPos = Position(33104, 31734, 11)}, -- to hellgorak ward
[2178] = {text = 'Entering the Shadow Nexus. Abandon all Hope.', bossStorage = 205, newPos = Position(33110, 31682, 12), storage = 6}, -- from hellgorak ward
[2179] = {text = 'Escaping back to the Retreat.', newPos = Position(33165, 31709, 14)}, -- from shadow nexus
[2180] = {text = 'Entering the Blood Halls.', newPos = Position(33357, 31589, 12)} -- from foundry to blood halls
}
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
local teleport = teleports[item:getMovementId()]
if teleport.alwaysSetStorage and player:getStorageValue(12176) < teleport.storage then
player:setStorageValue(12176, teleport.storage)
end
if teleport.bossStorage then
if Game.getStorageValue(teleport.bossStorage) and Game.getStorageValue(teleport.bossStorage) >= 2 then
if player:getStorageValue(12176) < teleport.storage then
player:setStorageValue(12176, teleport.storage)
end
else
player:teleportTo(Position(33165, 31709, 14))
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:say('Escaping back to the Retreat.', TALKTYPE_MONSTER_SAY)
return true
end
elseif teleport.storage and player:getStorageValue(12176) < teleport.storage then
player:teleportTo(fromPosition)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:say('You don\'t have enough energy to enter this portal', TALKTYPE_MONSTER_SAY)
return true
end
player:teleportTo(teleport.newPos)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:say(teleport.text, TALKTYPE_MONSTER_SAY)
return true
end

View File

@@ -77,6 +77,10 @@ local list = {
[5691] = {x = 1, y = 0, z = 1},
[5731] = {x = 0, y = 0, z = 1},
[5763] = {x = 0, y = 0, z = 1},
[6127] = {x = 0, y = -1, z = 1},
[6128] = {x = 0, y = 1, z = 1},
[6129] = {x = 0, y = -1, z = 1},
[6130] = {x = 0, y = 1, z = 1},
[6172] = {x = 0, y = 0, z = 1},
[6173] = {x = 0, y = 0, z = 1},
}