mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-06-14 13:04:27 +02:00
99% poi quest done. Missing bureaucrats npcs, maybe some exit tps and quest log
This commit is contained in:
parent
92998c466c
commit
99ea898868
@ -1 +1 @@
|
||||
next: 17657
|
||||
next: 17696
|
@ -88,6 +88,15 @@
|
||||
<!-- Pits of Inferno -->
|
||||
<action actionid="17642" script="pits_of_inferno/oil.lua" />
|
||||
<action fromaid="17653" toaid="17656" script="pits_of_inferno/hall_of_the_four_ways.lua" />
|
||||
<action fromaid="2050" toaid="2065" script="pits_of_inferno/levers.lua" />
|
||||
<action fromaid="3301" toaid="3302" script="pits_of_inferno/ladderLevers.lua" />
|
||||
<action actionid="50160" script="pits_of_inferno/mazeStone.lua" />
|
||||
<action actionid="3300" script="pits_of_inferno/stoneLever.lua" />
|
||||
<action actionid="3304" script="pits_of_inferno/trapLever.lua" />
|
||||
<action actionid="50106" script="pits_of_inferno/fireThroneLever.lua" />
|
||||
<action fromaid="50095" toaid="50104" script="pits_of_inferno/bazirWrongLevers.lua" />
|
||||
<action actionid="50105" script="pits_of_inferno/bazirMazeLever.lua" />
|
||||
<action fromaid="39511" toaid="39512" script="pits_of_inferno/bazirMirror.lua" />
|
||||
|
||||
<!-- Serpentine Tower -->
|
||||
<action actionid="17597" script="serpentine_tower/release_fire_elemental.lua" />
|
||||
|
11
data/actions/scripts/pits_of_inferno/bazirMazeLever.lua
Normal file
11
data/actions/scripts/pits_of_inferno/bazirMazeLever.lua
Normal file
@ -0,0 +1,11 @@
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
local portal = Tile(Position(32816, 32345, 13)):getItemById(1949)
|
||||
if not portal then
|
||||
local item = Game.createItem(1949, 1, Position(32816, 32345, 13))
|
||||
item:setMovementId(17686)
|
||||
else
|
||||
portal:remove()
|
||||
end
|
||||
item:transform(item.itemid == 2772 and 2773 or 2772)
|
||||
return true
|
||||
end
|
30
data/actions/scripts/pits_of_inferno/bazirMirror.lua
Normal file
30
data/actions/scripts/pits_of_inferno/bazirMirror.lua
Normal file
@ -0,0 +1,30 @@
|
||||
local config = {
|
||||
[39511] = {
|
||||
fromPosition = Position(32739, 32392, 14),
|
||||
toPosition = Position(32739, 32391, 14)
|
||||
},
|
||||
[39512] = {
|
||||
teleportPlayer = true,
|
||||
fromPosition = Position(32739, 32391, 14),
|
||||
toPosition = Position(32739, 32392, 14)
|
||||
}
|
||||
}
|
||||
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
local useItem = config[item:getActionId()]
|
||||
if not useItem then
|
||||
return true
|
||||
end
|
||||
|
||||
if useItem.teleportPlayer then
|
||||
player:teleportTo(Position(32712, 32392, 13))
|
||||
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
|
||||
player:say('Beauty has to be rewarded! Muahahaha!', TALKTYPE_MONSTER_SAY)
|
||||
end
|
||||
|
||||
local tapestry = Tile(useItem.fromPosition):getItemById(6433)
|
||||
if tapestry then
|
||||
tapestry:moveTo(useItem.toPosition)
|
||||
end
|
||||
return true
|
||||
end
|
@ -0,0 +1,8 @@
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
if item.itemid == 2772 then
|
||||
player:teleportTo(Position(32806, 32328, 15))
|
||||
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
|
||||
item:transform(2773)
|
||||
end
|
||||
return true
|
||||
end
|
20
data/actions/scripts/pits_of_inferno/fireThroneLever.lua
Normal file
20
data/actions/scripts/pits_of_inferno/fireThroneLever.lua
Normal file
@ -0,0 +1,20 @@
|
||||
local lava = {
|
||||
Position(32912, 32209, 15),
|
||||
Position(32913, 32209, 15),
|
||||
Position(32912, 32210, 15),
|
||||
Position(32913, 32210, 15)
|
||||
}
|
||||
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
local lavaTile
|
||||
for i = 1, #lava do
|
||||
lavaTile = Tile(lava[i]):getGround()
|
||||
if lavaTile and isInArray({410, 727}, lavaTile.itemid) then
|
||||
lavaTile:transform(lavaTile.itemid == 727 and 410 or 727)
|
||||
lava[i]:sendMagicEffect(CONST_ME_POFF)
|
||||
end
|
||||
end
|
||||
|
||||
item:transform(item.itemid == 2772 and 2773 or 2772)
|
||||
return true
|
||||
end
|
30
data/actions/scripts/pits_of_inferno/ladderLevers.lua
Normal file
30
data/actions/scripts/pits_of_inferno/ladderLevers.lua
Normal file
@ -0,0 +1,30 @@
|
||||
local pos = { Position(32861, 32305, 11), Position(32860, 32313, 11) }
|
||||
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
if item:getId() ~= 2772 then
|
||||
return false
|
||||
end
|
||||
|
||||
item:transform(2773)
|
||||
|
||||
if item:getActionId() == 3301 then
|
||||
local lava = Tile(pos[1]):getItemById(727)
|
||||
if lava then
|
||||
lava:transform(1771)
|
||||
end
|
||||
|
||||
local dirtId, dirtItem = { 4797, 4799 }
|
||||
for i = 1, #dirtId do
|
||||
dirtItem = Tile(pos[1]):getItemById(dirtId[i])
|
||||
if dirtItem then
|
||||
dirtItem:remove()
|
||||
end
|
||||
end
|
||||
elseif item:getActionId() == 3302 then
|
||||
local item = Tile(pos[2]):getItemById(389)
|
||||
if item then
|
||||
item:remove()
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
62
data/actions/scripts/pits_of_inferno/levers.lua
Normal file
62
data/actions/scripts/pits_of_inferno/levers.lua
Normal file
@ -0,0 +1,62 @@
|
||||
local text = {
|
||||
[1] = 'first', [2] = 'second', [3] = 'third', [4] = 'fourth', [5] = 'fifth',
|
||||
[6] = 'sixth', [7] = 'seventh', [8] = 'eighth', [9] = 'ninth', [10] = 'tenth',
|
||||
[11] = 'eleventh', [12] = 'twelfth', [13] = 'thirteenth', [14] = 'fourteenth', [15] = 'fifteenth'
|
||||
}
|
||||
|
||||
local stonePositions = {
|
||||
Position(32851, 32333, 12),
|
||||
Position(32852, 32333, 12)
|
||||
}
|
||||
|
||||
local function createStones()
|
||||
for i = 1, #stonePositions do
|
||||
Game.createItem(1791, 1, stonePositions[i])
|
||||
end
|
||||
|
||||
setGlobalStorageValue(17657, 0)
|
||||
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:getId() ~= 2772 then
|
||||
return false
|
||||
end
|
||||
|
||||
local leverCount = math.max(0, getGlobalStorageValue(17657))
|
||||
if item:getActionId() > 2049 and item:getActionId() < 2065 then
|
||||
local number = item:getActionId() - 2049
|
||||
if leverCount + 1 ~= number then
|
||||
return false
|
||||
end
|
||||
|
||||
setGlobalStorageValue(17657, number)
|
||||
player:say('You flipped the ' .. text[number] .. ' lever. Hurry up and find the next one!', TALKTYPE_MONSTER_SAY, false, player, toPosition)
|
||||
elseif item:getActionId() == 2065 then
|
||||
if leverCount ~= 15 then
|
||||
player:say('The final lever won\'t budge... yet.', TALKTYPE_MONSTER_SAY)
|
||||
return true
|
||||
end
|
||||
|
||||
local stone
|
||||
for i = 1, #stonePositions do
|
||||
stone = Tile(stonePositions[i]):getItemById(1791)
|
||||
if stone then
|
||||
stone:remove()
|
||||
stonePositions[i]:sendMagicEffect(CONST_ME_EXPLOSIONAREA)
|
||||
end
|
||||
end
|
||||
|
||||
addEvent(createStones, 15 * 60 * 1000)
|
||||
end
|
||||
|
||||
item:transform(2773)
|
||||
addEvent(revertLever, 15 * 60 * 1000, toPosition)
|
||||
return true
|
||||
end
|
16
data/actions/scripts/pits_of_inferno/mazeStone.lua
Normal file
16
data/actions/scripts/pits_of_inferno/mazeStone.lua
Normal file
@ -0,0 +1,16 @@
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
if item.itemid == 2773 then
|
||||
return false
|
||||
end
|
||||
|
||||
toPosition.x = toPosition.x - 1
|
||||
toPosition.y = toPosition.y + 1
|
||||
|
||||
local stone = Tile(toPosition):getItemById(1791)
|
||||
if stone then
|
||||
stone:remove()
|
||||
end
|
||||
|
||||
item:transform(2773)
|
||||
return true
|
||||
end
|
12
data/actions/scripts/pits_of_inferno/stoneLever.lua
Normal file
12
data/actions/scripts/pits_of_inferno/stoneLever.lua
Normal file
@ -0,0 +1,12 @@
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
if item.itemid == 2772 then
|
||||
local stonePosition = Position(32849, 32282, 10)
|
||||
local stoneItem = Tile(stonePosition):getItemById(1791)
|
||||
if stoneItem then
|
||||
stoneItem:remove()
|
||||
stonePosition:sendMagicEffect(CONST_ME_EXPLOSIONAREA)
|
||||
item:transform(2773)
|
||||
end
|
||||
end
|
||||
return true
|
||||
end
|
14
data/actions/scripts/pits_of_inferno/trapLever.lua
Normal file
14
data/actions/scripts/pits_of_inferno/trapLever.lua
Normal file
@ -0,0 +1,14 @@
|
||||
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
||||
|
||||
item:transform(item.itemid == 2772 and 2773 or 2772)
|
||||
|
||||
if item.itemid ~= 2772 then
|
||||
return true
|
||||
end
|
||||
|
||||
local stoneItem = Tile(Position(32826, 32274, 11)):getItemById(1772)
|
||||
if stoneItem then
|
||||
stoneItem:remove()
|
||||
end
|
||||
return true
|
||||
end
|
@ -91,4 +91,5 @@ function onStartup()
|
||||
end
|
||||
|
||||
spawnRashid()
|
||||
setGlobalStorageValue(17657, 0) -- reset POI levers
|
||||
end
|
||||
|
@ -14689,8 +14689,8 @@ Attributes = {Weight=2300}
|
||||
|
||||
TypeID = 3253
|
||||
Name = "a backpack of holding"
|
||||
Flags = {Take}
|
||||
Attributes = {Weight=10}
|
||||
Flags = {Container,Take}
|
||||
Attributes = {Capacity=24,Weight=1500,SlotType=BACKPACK}
|
||||
|
||||
TypeID = 3254
|
||||
Name = "a roc feather"
|
||||
@ -29614,7 +29614,7 @@ TypeID = 6527
|
||||
Name = "the avenger"
|
||||
Description = "This holy blade was forged of shattered dreams"
|
||||
Flags = {MultiUse,Take,Weapon}
|
||||
Attributes = {Weight=6400,SlotType=TWOHANDED,WeaponType=SWORD,Attack=38,Defense=50}
|
||||
Attributes = {Weight=6400,SlotType=TWOHANDED,WeaponType=SWORD,Attack=50,Defense=38}
|
||||
|
||||
TypeID = 6528
|
||||
Name = "an infernal bolt"
|
||||
|
38
data/monster/790/demon (goblin).xml
Normal file
38
data/monster/790/demon (goblin).xml
Normal file
@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<monster name="Demon" nameDescription="a demon" race="blood" experience="25" speed="150" manacost="0">
|
||||
<health now="50" max="50" />
|
||||
<look type="35" corpse="5995" />
|
||||
<targetchange interval="1000" chance="0" />
|
||||
<targetstrategy nearest="100" weakest="0" mostdamage="0" random="0" />
|
||||
<flags>
|
||||
<flag summonable="0" />
|
||||
<flag attackable="1" />
|
||||
<flag hostile="1" />
|
||||
<flag illusionable="0" />
|
||||
<flag convinceable="0" />
|
||||
<flag pushable="0" />
|
||||
<flag canpushitems="1" />
|
||||
<flag canpushcreatures="1" />
|
||||
<flag targetdistance="1" />
|
||||
<flag runonhealth="15" />
|
||||
</flags>
|
||||
<attacks skill="10" attack="10">
|
||||
<attack name="physical" interval="2000" chance="10" range="7" min="0" max="-25">
|
||||
<attribute key="shootEffect" value="smallstone" />
|
||||
</attack>
|
||||
</attacks>
|
||||
<defenses armor="10" defense="10" />
|
||||
<loot>
|
||||
<item id="3115" countmax="1" chance="120" /> <!-- a bone -->
|
||||
<item id="3337" countmax="1" chance="50" /> <!-- a bone club -->
|
||||
<item id="3267" countmax="1" chance="180" /> <!-- a dagger -->
|
||||
<item id="3578" countmax="1" chance="130" /> <!-- a fish -->
|
||||
<item id="3031" countmax="9" chance="500" /> <!-- a gold coin -->
|
||||
<item id="3361" countmax="1" chance="75" /> <!-- a leather armor -->
|
||||
<item id="3355" countmax="1" chance="100" /> <!-- a leather helmet -->
|
||||
<item id="3120" countmax="1" chance="70" /> <!-- a moldy cheese -->
|
||||
<item id="3294" countmax="1" chance="90" /> <!-- a short sword -->
|
||||
<item id="3462" countmax="1" chance="100" /> <!-- a small axe -->
|
||||
<item id="1781" countmax="3" chance="300" /> <!-- a small stone -->
|
||||
</loot>
|
||||
</monster>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF - 8"?>
|
||||
<monster name="flamethrower" nameDescription="a flamethrower" race="undead" experience="18" speed="0" manacost="0">
|
||||
<health now="100" max="100" />
|
||||
<look typeex="0" />
|
||||
<look typeex="2190" />
|
||||
<targetchange interval="1000" chance="0" />
|
||||
<targetstrategy nearest="100" weakest="0" mostdamage="0" random="0" />
|
||||
<flags>
|
||||
|
@ -241,4 +241,5 @@
|
||||
<monster name="the plasmother" file="790/the plasmother.xml" />
|
||||
<monster name="undead dragon" file="790/undead dragon.xml" />
|
||||
<monster name="wyvern" file="790/wyvern.xml" />
|
||||
<monster name="Demon (Goblin)" file="790/demon (goblin).xml" />
|
||||
</monsters>
|
@ -397,6 +397,28 @@
|
||||
|
||||
<!-- Pits of Inferno -->
|
||||
<movevent event="StepIn" frommovementid="17640" tomovementid="17641" script="pits_of_inferno/holy_tible_tile.lua" />
|
||||
<movevent event="StepIn" movementid="4002" script="pits_of_inferno/drawbridge.lua" />
|
||||
<movevent event="StepOut" movementid="4002" script="pits_of_inferno/drawbridge.lua" />
|
||||
<movevent event="StepIn" movementid="2002" script="pits_of_inferno/ladder.lua" />
|
||||
<movevent event="StepOut" movementid="2002" script="pits_of_inferno/ladder.lua" />
|
||||
<movevent event="StepIn" frommovementid="28810" tomovementid="28834" script="pits_of_inferno/tileTeleports.lua" />
|
||||
<movevent event="StepIn" frommovementid="7799" tomovementid="7801" script="pits_of_inferno/trap.lua" />
|
||||
<movevent event="StepIn" movementid="3303" script="pits_of_inferno/secondTrap.lua" />
|
||||
<movevent event="StepIn" frommovementid="17660" tomovementid="17678" script="pits_of_inferno/final_room_teleports.lua" />
|
||||
<movevent event="AddItem" frommovementid="17660" tomovementid="17678" tileitem="1" script="pits_of_inferno/final_room_teleports.lua" />
|
||||
<movevent event="StepIn" frommovementid="2090" tomovementid="2096" script="pits_of_inferno/checkThrones.lua" />
|
||||
<movevent event="StepIn" frommovementid="2080" tomovementid="2086" script="pits_of_inferno/thrones.lua" />
|
||||
<movevent event="StepIn" movementid="17686" script="pits_of_inferno/bazir_maze_lever_teleport.lua" />
|
||||
<movevent event="AddItem" movementid="17686" tileitem="1" script="pits_of_inferno/bazir_maze_lever_teleport.lua" />
|
||||
<movevent event="StepIn" movementid="17687" script="pits_of_inferno/bazir_maze_lever_teleport_back.lua" />
|
||||
<movevent event="AddItem" movementid="17687" tileitem="1" script="pits_of_inferno/bazir_maze_lever_teleport_back.lua" />
|
||||
<movevent event="StepIn" frommovementid="16772" tomovementid="16774" script="pits_of_inferno/bazirTiles.lua" />
|
||||
<movevent event="StepIn" frommovementid="50082" tomovementid="50083" script="pits_of_inferno/bazirTiles.lua" />
|
||||
<movevent event="AddItem" movementid="17688" tileitem="1" script="pits_of_inferno/bazir_final_room_teleport.lua" />
|
||||
<movevent event="StepIn" movementid="17688" script="pits_of_inferno/bazir_final_room_teleport.lua" />
|
||||
<movevent event="StepIn" movementid="50087" script="pits_of_inferno/puminTeleport.lua" />
|
||||
<movevent event="StepIn" movementid="17689" script="pits_of_inferno/pumin_throne_room_teleport_back.lua" />
|
||||
<movevent event="AddItem" movementid="17689" tileitem="1" script="pits_of_inferno/pumin_throne_room_teleport_back.lua" />
|
||||
|
||||
<!-- Serpentine Tower -->
|
||||
<movevent event="StepIn" frommovementid="17602" tomovementid="17603" script="serpentine_tower/final_tile.lua" />
|
||||
|
22
data/movements/scripts/pits_of_inferno/bazirTiles.lua
Normal file
22
data/movements/scripts/pits_of_inferno/bazirTiles.lua
Normal 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
|
@ -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
|
@ -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
|
@ -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
|
22
data/movements/scripts/pits_of_inferno/checkThrones.lua
Normal file
22
data/movements/scripts/pits_of_inferno/checkThrones.lua
Normal 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
|
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
|
@ -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
|
29
data/movements/scripts/pits_of_inferno/ladder.lua
Normal file
29
data/movements/scripts/pits_of_inferno/ladder.lua
Normal 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
|
17
data/movements/scripts/pits_of_inferno/puminTeleport.lua
Normal file
17
data/movements/scripts/pits_of_inferno/puminTeleport.lua
Normal 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
|
@ -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
|
22
data/movements/scripts/pits_of_inferno/secondTrap.lua
Normal file
22
data/movements/scripts/pits_of_inferno/secondTrap.lua
Normal 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
|
32
data/movements/scripts/pits_of_inferno/thrones.lua
Normal file
32
data/movements/scripts/pits_of_inferno/thrones.lua
Normal 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
|
42
data/movements/scripts/pits_of_inferno/tileTeleports.lua
Normal file
42
data/movements/scripts/pits_of_inferno/tileTeleports.lua
Normal 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
|
11
data/movements/scripts/pits_of_inferno/trap.lua
Normal file
11
data/movements/scripts/pits_of_inferno/trap.lua
Normal 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
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user