Skip to content

Commit

Permalink
Merge branch 'main' into Tibia-Quests-Review-7.26-to-7.92
Browse files Browse the repository at this point in the history
  • Loading branch information
majestyotbr authored Jul 25, 2024
2 parents 742bda8 + e30b0af commit d4876a7
Show file tree
Hide file tree
Showing 20 changed files with 177 additions and 86 deletions.
6 changes: 3 additions & 3 deletions data-otservbr-global/lib/core/quests.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3586,16 +3586,16 @@ if not Quests then
storageId = Storage.Postman.Mission07,
missionId = 10258,
startValue = 1,
endValue = 8,
endValue = 9,
states = {
[1] = "Kevin wants you to bring him the measurements of Benjamin, Lokur, Dove, Liane, Chrystal and Olrik.",
[2] = "You have received the measurements from 1 of 6 post officers.",
[3] = "You have received the measurements from 2 of 6 post officers.",
[4] = "You have received the measurements from 3 of 6 post officers.",
[5] = "You have received the measurements from 4 of 6 post officers.",
[6] = "You have received the measurements from 5 of 6 post officers.",
[7] = "You have received all measurements, report back to Kevin!",
[8] = "You have reported back that you have completed the mission.",
[8] = "You have received all measurements, report back to Kevin!",
[9] = "You have reported back that you have completed the mission.",
},
},
[8] = {
Expand Down
8 changes: 4 additions & 4 deletions data-otservbr-global/npc/kevin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ local function creatureSayCallback(npc, creature, type, message)
elseif player:getStorageValue(Storage.Postman.Mission05) == 3 then
npcHandler:say("Splendid, I knew we could trust you. I would like to ask for your help in another matter. Are you interested?", npc, creature)
npcHandler:setTopic(playerId, 16)
elseif player:getStorageValue(Storage.Postman.Mission07) == 7 then
elseif player:getStorageValue(Storage.Postman.Mission07) == 8 then
npcHandler:say("Once more you have impressed me! Are you willing to do another job?", npc, creature)
npcHandler:setTopic(playerId, 21)
elseif player:getStorageValue(Storage.Postman.Mission06) >= 1 and player:getStorageValue(Storage.Postman.Mission06) < 10 then
Expand Down Expand Up @@ -127,10 +127,10 @@ local function creatureSayCallback(npc, creature, type, message)
elseif player:getStorageValue(Storage.Postman.Rank) == 4 or player:getStorageValue(Storage.Postman.Rank) == 3 and player:getStorageValue(Storage.Postman.Mission09) == 0 then
npcHandler:say("So are you ready for another mission?", npc, creature)
npcHandler:setTopic(playerId, 25)
elseif player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 3 then
elseif player:getStorageValue(Storage.Postman.Mission07) < 1 and player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 3 then
npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature)
npcHandler:setTopic(playerId, 19)
elseif player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 2 then
elseif player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.Mission06) == 13 and player:getStorageValue(Storage.Postman.Rank) == 2 then
npcHandler:say("Excellent! Another job well done! Would you accept another mission?", npc, creature)
npcHandler:setTopic(playerId, 28)
elseif player:getStorageValue(Storage.Postman.Mission04) == 2 and player:getStorageValue(Storage.Postman.Rank) == 2 then
Expand Down Expand Up @@ -263,7 +263,7 @@ local function creatureSayCallback(npc, creature, type, message)
npcHandler:setTopic(playerId, 22)
elseif npcHandler:getTopic(playerId) == 22 then
npcHandler:say("Find out about his whereabouts and retrieve him or at least his posthorn. He was looking for a new underground passage that is rumoured to be found underneath the troll-infested Mountain east of Thais.", npc, creature)
player:setStorageValue(Storage.Postman.Mission07, 8)
player:setStorageValue(Storage.Postman.Mission07, 9)
player:setStorageValue(Storage.Postman.Mission08, 1)
npcHandler:setTopic(playerId, 0)
elseif npcHandler:getTopic(playerId) == 23 then
Expand Down
4 changes: 2 additions & 2 deletions data-otservbr-global/npc/kroox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ local function creatureSayCallback(npc, creature, type, message)
player:setStorageValue(Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackNpc, 2)
player:setStorageValue(Storage.Quest.U7_5.SamsOldBackpack.SamsOldBackpackDoor, 1)
end
elseif MsgContains(message, "measurements") then
if player:getStorageValue(Storage.Postman.Mission07) >= 1 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then
elseif message == "lokurs measurements" then
if player:getStorageValue(Storage.Postman.Mission07) >= 7 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then
npcHandler:say("Hm, well I guess its ok to tell you ... <tells you about Lokurs measurements> ", npc, creature)
player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1)
player:setStorageValue(Storage.Postman.MeasurementsKroox, 1)
Expand Down
8 changes: 8 additions & 0 deletions data-otservbr-global/npc/lokur.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ local function creatureSayCallback(npc, creature, type, message)
elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) > 0 then
npcHandler:say("No then.", npc, creature)
npcHandler:setTopic(playerId, 0)
elseif MsgContains(message, "measurements") then
if player:getStorageValue(Storage.Postman.Mission07) >= 6 and player:getStorageValue(Storage.Postman.MeasurementsKroox) ~= 1 then
npcHandler:say("Come on, I have no clue what they are. Better ask my armorer Kroox for such nonsense.Go and ask him for good ol' Lokurs measurements, he'll know.", npc, creature)
player:setStorageValue(Storage.Postman.Mission07, player:getStorageValue(Storage.Postman.Mission07) + 1)
else
npcHandler:say("...", npc, creature)
npcHandler:setTopic(playerId, 0)
end
end

return true
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/markwin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ local function greetCallback(npc, creature)
position:sendMagicEffect(CONST_ME_TELEPORT)
end
end
npcHandler:say("No! The hornless have reached my city! BODYGUARDS TO ME!", npc, creature)
return false
elseif player:getStorageValue(Storage.MarkwinGreeting) == 1 then
npcHandler:setMessage(MESSAGE_GREET, "Well ... you defeated my guards! Now everything is over! I guess I will have to answer your questions now.")
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/npc/talphion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ local function creatureSayCallback(npc, creature, type, message)
npcHandler:say("CHESS? I DONT PLAY CHESS!", npc, creature)
npcHandler:setTopic(playerId, 3)
elseif npcHandler:getTopic(playerId) == 3 then
npcHandler:say("A PATTERN IN THIS MESS?? HEY DON'T INSULT MY MACHINEHALL!", npc, creature)
npcHandler:say("A PATTERN IN THIS MESS?? HEY DON'T INSULT MY MACHINE HALL!", npc, creature)
npcHandler:setTopic(playerId, 4)
elseif npcHandler:getTopic(playerId) == 4 then
npcHandler:say("AH YES! I WORKED ON THE DRESS PATTERN FOR THOSE UNIFORMS. STAINLESS TROUSERES, STEAM DRIVEN BOOTS! ANOTHERMARVEL TO BEHOLD! I'LL SENT A COPY TO KEVIN IMEDIATELY!", npc, creature)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
local teleportTileBack = MoveEvent()

function teleportTileBack.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end

-- UIDs específicos do tile
local specificUIDs = { 25034, 25035, 25036, 25037 }

-- Posições específicas
local specificPositions = {
{ x = 32486, y = 31927, z = 7 },
{ x = 32487, y = 31927, z = 7 },
{ x = 32486, y = 31928, z = 7 },
{ x = 32487, y = 31928, z = 7 },
}

-- Posição de teletransporte
local teleportPosition = { x = 32566, y = 31959, z = 1 }

-- Verifica se a posição, o UID e o itemID coincidem
for _, pos in ipairs(specificPositions) do
if position.x == pos.x and position.y == pos.y and position.z == pos.z and item:getId() == 599 and table.contains(specificUIDs, item.uid) then
player:teleportTo(teleportPosition)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
break
end
end

return true
end

-- Registra o evento para os UIDs específicos
teleportTileBack:uid(25034, 25035, 25036, 25037)
teleportTileBack:register()

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
local positions = {
{ x = 32563, y = 31957, z = 1 },
{ x = 32565, y = 31957, z = 1 },
{ x = 32567, y = 31957, z = 1 },
{ x = 32569, y = 31957, z = 1 },
}

local sacrificeSkulls = MoveEvent()

function sacrificeSkulls.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end

for i = 1, #positions do
local tile = Tile(positions[i])
if not tile or not tile:getItemById(3114) then
return true
end
end

if player:getStorageValue(FirstParadoxAcess) < 1 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "One of the toxic salt seas in Krailos carries fresh and clean water again. The ogres' water supply is ensured for now")
player:setStorageValue(FirstParadoxAcess, 1)
end

for i = 1, #positions do
local skull = Tile(positions[i]):getItemById(3114)
if skull then
Game.createItem(105, 1, positions[i])
skull:remove(1)
end
end

player:teleportTo({ x = 32479, y = 31923, z = 7 })
return true
end

sacrificeSkulls:uid(25012)
sacrificeSkulls:register()
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
local teleportTile = MoveEvent()

function teleportTile.onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end

local specificUIDs = { 25031, 25032 }

local specificPositions = {
{ x = 32477, y = 31905, z = 7 },
{ x = 32476, y = 31906, z = 7 },
}

local teleportPosition = { x = 32478, y = 31908, z = 7 }

for _, pos in ipairs(specificPositions) do
if position.x == pos.x and position.y == pos.y and position.z == pos.z and item:getId() == 599 and table.contains(specificUIDs, item.uid) then
player:teleportTo(teleportPosition)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
break
end
end

return true
end

teleportTile:uid(25031, 25032)
teleportTile:register()
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
local trap_in_the_tree = MoveEvent()

local trapPositions = {
{ x = 32497, y = 31889, z = 07 },
{ x = 32499, y = 31890, z = 07 },
{ x = 32497, y = 31890, z = 07 },
{ x = 32498, y = 31890, z = 07 },
{ x = 32496, y = 31890, z = 07 },
{ x = 32494, y = 31888, z = 07 },
{ x = 32502, y = 31890, z = 07 },
}

function trap_in_the_tree.onStepIn(creature, item, toPosition, fromPosition)
if creature:isPlayer() and Tile({ x = 32502, y = 31890, z = 07 }):getThingCount() == 2 then
doTargetCombatHealth(0, creature, COMBAT_EARTHDAMAGE, -200, -200)
for _, pos in ipairs(trapPositions) do
Game.createItem(2121, 1, pos)
end
end
end

trap_in_the_tree:uid(25011)
trap_in_the_tree:register()
29 changes: 27 additions & 2 deletions data-otservbr-global/startup/tables/tile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1106,8 +1106,8 @@ TileUnique = {
},
-- The paradox tower quest
[25011] = {
itemId = 354,
itemPos = { x = 32497, y = 31889, z = 7 },
itemId = 353,
itemPos = { x = 32497, y = 31888, z = 7 },
},
[25012] = {
itemId = 10145,
Expand Down Expand Up @@ -1203,6 +1203,31 @@ TileUnique = {
itemId = 431,
itemPos = { x = 32468, y = 32119, z = 14 },
},
-- The Paradox Tower Quest
[25031] = {
itemId = 599,
itemPos = { x = 32477, y = 31905, z = 7 },
},
[25032] = {
itemId = 599,
itemPos = { x = 32476, y = 31906, z = 7 },
},
[25034] = {
itemId = 599,
itemPos = { x = 32486, y = 31927, z = 7 },
},
[25035] = {
itemId = 599,
itemPos = { x = 32487, y = 31927, z = 7 },
},
[25036] = {
itemId = 599,
itemPos = { x = 32486, y = 31928, z = 7 },
},
[25037] = {
itemId = 599,
itemPos = { x = 32487, y = 31928, z = 7 },
},
-- Remove/create item on stepIn
-- Reserved uniques range from 29001/30000

Expand Down

0 comments on commit d4876a7

Please sign in to comment.