Skip to content

Commit 7afbd7c

Browse files
Squashed commit of the following:
commit 19bf3e1 Author: Eduardo Dantas <[email protected]> Date: Mon Apr 28 22:54:12 2025 -0300 fix: server startup loop on "Running with x threads" step (opentibiabr#3509) Add dispatcher start validation and loading monitoring This fixes a loop in the server start (breaks on "Running with 16 threads." step) Dispatcher: • Added promise/future in init() to ensure dispatcher thread is fully started before proceeding. • Added 5s timeout when waiting for dispatcher initialization. CanaryServer • Replaced blocking wait() on LoaderStatus with an active wait loop. • Added soft warning logs every 2 minutes during startup. • Added a 10 minutes startup timeout with graceful shutdown on failure. • Minor cleanup in load order and improved robustness of server start sequence. Overall: server startup is now safer, with better feedback if the process is slow or stuck. commit 5bdbc20 Author: gabrielgg98 <[email protected]> Date: Mon Apr 28 20:13:28 2025 -0300 fix: remove duplicated buy house command (opentibiabr#3476) commit 830b126 Author: Ricardo Queiroz (Kaky) <[email protected]> Date: Mon Apr 28 09:22:33 2025 -0300 fix: incorrect NPC interaction handling in The Djinn War Quest (opentibiabr#3508) Revert the system check modified in PR opentibiabr#3471 that incorrectly identified whether the player followed the Efreet or Marid path, preventing proper NPC interaction. Ensure players aligned with Efreet cannot talk to Marid NPCs and vice-versa. Also, fix an issue where players, even after completing the quest, could only greet NPCs using "DJANNI'HAH". Add a quest completion check before the existing greeting checks, allowing greetings like "hi" or "hello" after finishing the quest. commit 288b00a Author: Eduardo Dantas <[email protected]> Date: Fri Apr 25 23:00:41 2025 -0300 fix: loot factor generate random value (opentibiabr#3181) Currently, the factor is not really random, this corrects this problem. commit c3ea4b3 Author: Júlio César Ueti <[email protected]> Date: Fri Apr 25 02:20:45 2025 -0300 fix: djinn freequest (opentibiabr#3471) To speak with djiins, you need to complete a few quests. Namely: "The Djinn War - Efreet Faction" and "The Djinn War - Marid Faction". Even though they show up as "completed" when freequests runs, you are still unable to talk to them using their special word "Djanni'hah". They laugh, saying it's ALMOST correct, then stop talking to you. Changing the storageValue for the start quests to 0 fixes the issue. commit 2193160 Author: mdbeng <[email protected]> Date: Wed Apr 23 13:04:17 2025 -0400 fix: pvp zone no loss (opentibiabr#3353) This change will prevent players from losing skills or dropping items when dieing in pvp zone, currently theres nothing involving pvp zone besides the old pvp arena which hopefully will be updated to tibia drome so this fix its something to have in mind. commit 2c5bf72 Author: Samuel Gomes <[email protected]> Date: Wed Apr 23 02:09:40 2025 -0300 fix: kilmaresh ladders (opentibiabr#3437) Ladders in Issavi (ids 31129 and 31130) are not steppable but clickable instead. This only fixes that. commit 44b8e7f Author: Samuel Gomes <[email protected]> Date: Wed Apr 23 02:07:59 2025 -0300 fix: toolgear lua log error (opentibiabr#3465) This solves the log error associated with the use of toolgears. [error] Lua Script Error Detected --------------------------------------- Interface: Scripts Interface Script ID: /home/samuk/canary-base/canary/data/scripts/actions/tools/toolgear.lua:callback Error Description: ...ry/data-otservbr-global/scripts/lib/register_actions.lua:675: attempt to call method 'getActionId' (a nil value) stack traceback: [C]: in function 'getActionId' ...ry/data-otservbr-global/scripts/lib/register_actions.lua:675: in function 'onUsePick' ...nary-base/canary/data/scripts/actions/tools/toolgear.lua:7: in function <...nary-base/canary/data/scripts/actions/tools/toolgear.lua:3> --------------------------------------- [error] Lua Script Error Detected --------------------------------------- Interface: Scripts Interface Script ID: /home/samuk/canary-base/canary/data/scripts/actions/tools/toolgear.lua:callback Error Description: ...ry/data-otservbr-global/scripts/lib/register_actions.lua:949: attempt to call method 'getId' (a nil value) stack traceback: [C]: in function 'getId' ...ry/data-otservbr-global/scripts/lib/register_actions.lua:949: in function 'onUseSpoon' ...nary-base/canary/data/scripts/actions/tools/toolgear.lua:10: in function <...nary-base/canary/data/scripts/actions/tools/toolgear.lua:3> commit 25065c4 Author: Eduardo Dantas <[email protected]> Date: Wed Apr 23 01:51:22 2025 -0300 fix: wrap/unwrap owner bug for on use items (opentibiabr#3474) Items that were "used" and transformed into others lost their store attribute when wrapping/unwrapping and could no longer be moved to the inbox store. commit 124ee9e Author: Eduardo Dantas <[email protected]> Date: Wed Apr 23 01:51:07 2025 -0300 fix: mana drain on analyzer (opentibiabr#3473) Show mana drain on input analyzer commit 032f012 Author: Leilani A. <[email protected]> Date: Wed Apr 23 01:49:17 2025 -0300 fix: player bypassing SQM restrictions when pushed (opentibiabr#3480) Fix opentibiabr#3475 commit d3b437e Author: Eduardo Dantas <[email protected]> Date: Wed Apr 23 00:24:42 2025 -0300 build: update to recent vcpkg to fix compilation (opentibiabr#3503) Update ThreadPool and magic_enum includes for vcpkg compatibility - Adapt ThreadPool implementation to the updated BS::thread_pool v5.0.0 interface: - Changed inheritance from `BS::thread_pool` to `BS::thread_pool<BS::tp::none>`. - Updated magic_enum include directives following recent vcpkg changes: - Changed from `<magic_enum.hpp>` to `<magic_enum/magic_enum.hpp>`. These updates resolve compilation issues arising after recent vcpkg dependency updates. commit b0a6920 Author: LeoTK <[email protected]> Date: Tue Apr 22 22:59:50 2025 -0300 fix: check value purchase exp boost (opentibiabr#3501) Related to pr: opentibiabr#3496 commit 559b18d Author: Sorairei <[email protected]> Date: Tue Apr 22 10:55:25 2025 -0600 fix the lootmonger remotely trade. (opentibiabr#3482) Fix the npc lootmonger where players can shop remotely from anywhere. Fixes opentibiabr#3481 commit c082f58 Author: LeoTK <[email protected]> Date: Tue Apr 22 13:54:50 2025 -0300 feat: talkaction playericon (opentibiabr#3488) This new command is to add an icon to the player, it also has a counter function to use the command, follow the examples: /playericon 1, 10 -- this way it will apply icon 1 with the counter at 10 and it will decrease every second after reaching 0, it will be removed after 10 seconds. /playericon 1, 10, up -- this way the counter will start at 0 and will go up to 10 after 10 seconds, it will remove the icon. commit 4fc4406 Author: Francisco Amaral <[email protected]> Date: Tue Apr 22 11:54:53 2025 -0300 fix: suspicious device wrong id (opentibiabr#3492) commit f9322d2 Author: LeoTK <[email protected]> Date: Tue Apr 22 11:48:36 2025 -0300 fix: gamestore exp price (opentibiabr#3496) By making this modification it will work and visually the correct amount of expboost will be charged. commit c3bafd8 Author: Felipe <[email protected]> Date: Fri Apr 18 17:45:12 2025 -0300 fix: add taint experience boost for Soul War monsters (opentibiabr#3494) # Description This PR introduces a fix and enhancement for the experience boost system related to the Soul War quest. Specifically, it ensures that the taint level of the player is correctly factored into the experience calculation when defeating monsters listed in the SoulWarQuest.bagYouDesireMonsters. ## Behaviour ### **Actual** The taint level boost was not applied correctly in some cases. Experience calculation did not account for edge cases where the taint level or boost map might be undefined. ### **Expected** The taint level boost is applied consistently and correctly. Experience calculation handles edge cases gracefully. ## Type of change - [x] New feature (non-breaking change which adds functionality) ## How Has This Been Tested - [x] Hunt any SoulWar monster and see the EXP increasing with different taint levels. ## Checklist - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my own code - [x] I checked the PR checks reports - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works
1 parent 7ae9cb3 commit 7afbd7c

27 files changed

Lines changed: 345 additions & 168 deletions

File tree

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
cmake_minimum_required(VERSION 3.22 FATAL_ERROR)
22

3-
# CMAKE
4-
# apt install build-essential git
5-
# git clone https://github.com/Kitware/CMake/; cd CMake
6-
# ./bootstrap && make && sudo make install
7-
83
# VCPKG
94
# cmake -DCMAKE_TOOLCHAIN_FILE=/opt/workspace/vcpkg/scripts/buildsystems/vcpkg.cmake ..
105
# Needed libs are in file vcpkg.json

data-otservbr-global/lib/quests/soul_war.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ SoulWarQuest = {
2323
[34007] = 0.10, -- 10% for the smallest pool
2424
},
2525

26+
taintExperienceBoostMap = { -- Experience Boost per taint (In percentage %)
27+
[1] = { boost = 4.5 },
28+
[2] = { boost = 9.2 },
29+
[3] = { boost = 14.1 },
30+
[4] = { boost = 19.2 },
31+
[5] = { boost = 24.6 },
32+
},
33+
2634
timeToIncreaseCrueltyDefense = 15, -- In seconds, it will increase every 15 seconds if don't use mortal essence in greedy maw
2735
useGreedMawCooldown = 30, -- In seconds
2836
goshnarsCrueltyDefenseChange = 2, -- Defense change, the amount that will decrease or increase defense, the defense cannot decrease more than the monster's original defense amount

data-otservbr-global/npc/alesar.lua

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,22 @@ local function greetCallback(npc, creature, message)
9595
local player = Player(creature)
9696
local playerId = player:getId()
9797

98-
if not MsgContains(message, "djanni'hah") then
99-
npcHandler:say("Shove off, little one! Humans are not welcome here, |PLAYERNAME|!", npc, creature)
100-
endConversationWithDelay(npcHandler, npc, creature)
101-
return false
102-
end
98+
--Checks if the player has completed the quest
99+
if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03) ~= 3 then
100+
if not MsgContains(message, "djanni'hah") then
101+
npcHandler:say("Shove off, little one! Humans are not welcome here, |PLAYERNAME|!", npc, creature)
102+
endConversationWithDelay(npcHandler, npc, creature)
103+
return false
104+
end
103105

104-
if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Start) == 1 then
105-
npcHandler:say({
106-
"Hahahaha! ...",
107-
"|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!",
108-
}, npc, creature)
109-
endConversationWithDelay(npcHandler, npc, creature)
110-
return false
106+
if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Start) == 1 then
107+
npcHandler:say({
108+
"Hahahaha! ...",
109+
"|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!",
110+
}, npc, creature)
111+
endConversationWithDelay(npcHandler, npc, creature)
112+
return false
113+
end
111114
end
112115

113116
npcHandler:say("What do you want from me, |PLAYERNAME|?", npc, creature)

data-otservbr-global/npc/gnomus.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,39 +254,39 @@ local function creatureSayCallback(npc, creature, type, message)
254254
npcHandler:setTopic(playerId, 1)
255255
end
256256
elseif MsgContains(message, "gnomes") and npcHandler:getTopic(playerId) == 56 then
257-
if player:getItemCount(30888) >= amount[playerId] then
257+
if player:getItemCount(27653) >= amount[playerId] then
258258
npcHandler:say("Done.", npc, creature)
259259
if amount[playerId] > 1 then
260260
plural = plural .. "s"
261261
end
262262
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You earned " .. amount[playerId] .. " point" .. plural .. " on the gnomes mission.")
263-
player:removeItem(30888, amount[playerId])
263+
player:removeItem(27653, amount[playerId])
264264
player:setStorageValue(Storage.Quest.U11_50.DangerousDepths.Gnomes.Points, player:getStorageValue(Storage.Quest.U11_50.DangerousDepths.Gnomes.Points) + amount[playerId])
265265
else
266266
npcHandler:say("You don't have enough suspicious devices.", npc, creature)
267267
npcHandler:setTopic(playerId, 1)
268268
end
269269
elseif MsgContains(message, "dwarves") and npcHandler:getTopic(playerId) == 56 then
270-
if player:getItemCount(30888) >= amount[playerId] then
270+
if player:getItemCount(27653) >= amount[playerId] then
271271
npcHandler:say("Done.", npc, creature)
272272
if amount[playerId] > 1 then
273273
plural = plural .. "s"
274274
end
275275
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You earned " .. amount[playerId] .. " point" .. plural .. " on the dwarves mission.")
276-
player:removeItem(30888, amount[playerId])
276+
player:removeItem(27653, amount[playerId])
277277
player:setStorageValue(Storage.Quest.U11_50.DangerousDepths.Dwarves.Points, player:getStorageValue(Storage.Quest.U11_50.DangerousDepths.Dwarves.Points) + amount[playerId])
278278
else
279279
npcHandler:say("You don't have enough suspicious devices.", npc, creature)
280280
npcHandler:setTopic(playerId, 1)
281281
end
282282
elseif MsgContains(message, "scouts") and npcHandler:getTopic(playerId) == 56 then
283-
if player:getItemCount(30888) >= amount[playerId] then
283+
if player:getItemCount(27653) >= amount[playerId] then
284284
npcHandler:say("Done.", npc, creature)
285285
if amount[playerId] > 1 then
286286
plural = plural .. "s"
287287
end
288288
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You earned " .. amount[playerId] .. " point" .. plural .. " on the scouts mission.")
289-
player:removeItem(30888, amount[playerId])
289+
player:removeItem(27653, amount[playerId])
290290
player:setStorageValue(Storage.Quest.U11_50.DangerousDepths.Scouts.Points, player:getStorageValue(Storage.Quest.U11_50.DangerousDepths.Scouts.Points) + amount[playerId])
291291
else
292292
npcHandler:say("You don't have enough suspicious devices.", npc, creature)

data-otservbr-global/npc/haroun.lua

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,22 @@ local function greetCallback(npc, creature, message)
5555
local player = Player(creature)
5656
local playerId = player:getId()
5757

58-
if not MsgContains(message, "djanni'hah") then
59-
npcHandler:say("Whoa! A human! This is no place for you, |PLAYERNAME|. Go and play somewhere else.", npc, creature)
60-
endConversationWithDelay(npcHandler, npc, creature)
61-
return false
62-
end
58+
--Checks if the player has completed the quest
59+
if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03) ~= 3 then
60+
if not MsgContains(message, "djanni'hah") then
61+
npcHandler:say("Whoa! A human! This is no place for you, |PLAYERNAME|. Go and play somewhere else.", npc, creature)
62+
endConversationWithDelay(npcHandler, npc, creature)
63+
return false
64+
end
6365

64-
if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start) == 1 then
65-
npcHandler:say({
66-
"Hahahaha! ...",
67-
"|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!",
68-
}, npc, creature)
69-
endConversationWithDelay(npcHandler, npc, creature)
70-
return false
66+
if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start) == 1 then
67+
npcHandler:say({
68+
"Hahahaha! ...",
69+
"|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!",
70+
}, npc, creature)
71+
endConversationWithDelay(npcHandler, npc, creature)
72+
return false
73+
end
7174
end
7275

7376
npcHandler:say("Be greeted, human |PLAYERNAME|. How can a humble djinn be of service?", npc, creature)

data-otservbr-global/npc/klom_stonecutter.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,39 +177,39 @@ local function creatureSayCallback(npc, creature, type, message)
177177
npcHandler:setTopic(playerId, 1)
178178
end
179179
elseif MsgContains(message, "gnomes") and npcHandler:getTopic(playerId) == 56 then
180-
if player:getItemCount(30888) >= count[playerId] then
180+
if player:getItemCount(27653) >= count[playerId] then
181181
npcHandler:say("Done.", npc, creature)
182182
if count[playerId] > 1 then
183183
plural = plural .. "s"
184184
end
185185
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You earned " .. count[playerId] .. " point" .. plural .. " on the gnomes mission.")
186-
player:removeItem(30888, count[playerId])
186+
player:removeItem(27653, count[playerId])
187187
player:setStorageValue(Storage.Quest.U11_50.DangerousDepths.Gnomes.Points, player:getStorageValue(Storage.Quest.U11_50.DangerousDepths.Gnomes.Points) + count[playerId])
188188
else
189189
npcHandler:say("You don't have enough suspicious devices.", npc, creature)
190190
npcHandler:setTopic(playerId, 1)
191191
end
192192
elseif MsgContains(message, "dwarves") and npcHandler:getTopic(playerId) == 56 then
193-
if player:getItemCount(30888) >= count[playerId] then
193+
if player:getItemCount(27653) >= count[playerId] then
194194
npcHandler:say("Done.", npc, creature)
195195
if count[playerId] > 1 then
196196
plural = plural .. "s"
197197
end
198198
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You earned " .. count[playerId] .. " point" .. plural .. " on the dwarves mission.")
199-
player:removeItem(30888, count[playerId])
199+
player:removeItem(27653, count[playerId])
200200
player:setStorageValue(Storage.Quest.U11_50.DangerousDepths.Dwarves.Points, player:getStorageValue(Storage.Quest.U11_50.DangerousDepths.Dwarves.Points) + count[playerId])
201201
else
202202
npcHandler:say("You don't have enough suspicious devices.", npc, creature)
203203
npcHandler:setTopic(playerId, 1)
204204
end
205205
elseif MsgContains(message, "scouts") and npcHandler:getTopic(playerId) == 56 then
206-
if player:getItemCount(30888) >= count[playerId] then
206+
if player:getItemCount(27653) >= count[playerId] then
207207
npcHandler:say("Done.", npc, creature)
208208
if count[playerId] > 1 then
209209
plural = plural .. "s"
210210
end
211211
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You earned " .. count[playerId] .. " point" .. plural .. " on the scouts mission.")
212-
player:removeItem(30888, count[playerId])
212+
player:removeItem(27653, count[playerId])
213213
player:setStorageValue(Storage.Quest.U11_50.DangerousDepths.Scouts.Points, player:getStorageValue(Storage.Quest.U11_50.DangerousDepths.Scouts.Points) + count[playerId])
214214
else
215215
npcHandler:say("You don't have enough suspicious devices.", npc, creature)

data-otservbr-global/npc/lardoc_bashsmite.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -183,39 +183,39 @@ local function creatureSayCallback(npc, creature, type, message)
183183
npcHandler:setTopic(playerId, 1)
184184
end
185185
elseif MsgContains(message, "gnomes") and npcHandler:getTopic(playerId) == 56 then
186-
if player:getItemCount(30888) >= amount[playerId] then
186+
if player:getItemCount(27653) >= amount[playerId] then
187187
npcHandler:say("Done.", npc, creature)
188188
if amount[playerId] > 1 then
189189
plural = plural .. "s"
190190
end
191191
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You earned " .. amount[playerId] .. " point" .. plural .. " on the gnomes mission.")
192-
player:removeItem(30888, amount[playerId])
192+
player:removeItem(27653, amount[playerId])
193193
player:setStorageValue(Storage.Quest.U11_50.DangerousDepths.Gnomes.Points, player:getStorageValue(Storage.Quest.U11_50.DangerousDepths.Gnomes.Points) + amount[playerId])
194194
else
195195
npcHandler:say("You don't have enough suspicious devices.", npc, creature)
196196
npcHandler:setTopic(playerId, 1)
197197
end
198198
elseif MsgContains(message, "dwarves") and npcHandler:getTopic(playerId) == 56 then
199-
if player:getItemCount(30888) >= amount[playerId] then
199+
if player:getItemCount(27653) >= amount[playerId] then
200200
npcHandler:say("Done.", npc, creature)
201201
if amount[playerId] > 1 then
202202
plural = plural .. "s"
203203
end
204204
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You earned " .. amount[playerId] .. " point" .. plural .. " on the dwarves mission.")
205-
player:removeItem(30888, amount[playerId])
205+
player:removeItem(27653, amount[playerId])
206206
player:setStorageValue(Storage.Quest.U11_50.DangerousDepths.Dwarves.Points, player:getStorageValue(Storage.Quest.U11_50.DangerousDepths.Dwarves.Points) + amount[playerId])
207207
else
208208
npcHandler:say("You don't have enough suspicious devices.", npc, creature)
209209
npcHandler:setTopic(playerId, 1)
210210
end
211211
elseif MsgContains(message, "scouts") and npcHandler:getTopic(playerId) == 56 then
212-
if player:getItemCount(30888) >= amount[playerId] then
212+
if player:getItemCount(27653) >= amount[playerId] then
213213
npcHandler:say("Done.", npc, creature)
214214
if amount[playerId] > 1 then
215215
plural = plural .. "s"
216216
end
217217
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You earned " .. amount[playerId] .. " point" .. plural .. " on the scouts mission.")
218-
player:removeItem(30888, amount[playerId])
218+
player:removeItem(27653, amount[playerId])
219219
player:setStorageValue(Storage.Quest.U11_50.DangerousDepths.Scouts.Points, player:getStorageValue(Storage.Quest.U11_50.DangerousDepths.Scouts.Points) + amount[playerId])
220220
else
221221
npcHandler:say("You don't have enough suspicious devices.", npc, creature)

data-otservbr-global/npc/nah_bob.lua

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,22 @@ local function greetCallback(npc, creature, message)
5555
local player = Player(creature)
5656
local playerId = player:getId()
5757

58-
if not MsgContains(message, "djanni'hah") then
59-
npcHandler:say("Whoa! A human! This is no place for you, |PLAYERNAME|. Go and play somewhere else.", npc, creature)
60-
endConversationWithDelay(npcHandler, npc, creature)
61-
return false
62-
end
58+
--Checks if the player has completed the quest
59+
if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Mission03) ~= 3 then
60+
if not MsgContains(message, "djanni'hah") then
61+
npcHandler:say("Whoa! A human! This is no place for you, |PLAYERNAME|. Go and play somewhere else.", npc, creature)
62+
endConversationWithDelay(npcHandler, npc, creature)
63+
return false
64+
end
6365

64-
if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start) == 1 then
65-
npcHandler:say({
66-
"Hahahaha! ...",
67-
"|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!",
68-
}, npc, creature)
69-
endConversationWithDelay(npcHandler, npc, creature)
70-
return false
66+
if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Start) == 1 then
67+
npcHandler:say({
68+
"Hahahaha! ...",
69+
"|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!",
70+
}, npc, creature)
71+
endConversationWithDelay(npcHandler, npc, creature)
72+
return false
73+
end
7174
end
7275

7376
npcHandler:say("<Sighs> Another {customer}! I've only just sat down! What is it, |PLAYERNAME|?", npc, creature)

data-otservbr-global/npc/the_lootmonger.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
5555
npcConfig.shop = LootShopConfig
5656

5757
local function creatureSayCallback(npc, player, type, message)
58+
if not npcHandler:checkInteraction(npc, player) then
59+
return false
60+
end
5861
local categoryTable = LootShopConfigTable[message:lower()]
5962
if MsgContains(message, "shop options") then
6063
npcHandler:say("I sell a selection of " .. GetFormattedShopCategoryNames(LootShopConfigTable), npc, player)

data-otservbr-global/npc/yaman.lua

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,22 @@ local function greetCallback(npc, creature, message)
5555
local player = Player(creature)
5656
local playerId = player:getId()
5757

58-
if not MsgContains(message, "djanni'hah") then
59-
npcHandler:say("Shove off, little one! Humans are not welcome here, |PLAYERNAME|!", npc, creature)
60-
endConversationWithDelay(npcHandler, npc, creature)
61-
return false
62-
end
58+
--Checks if the player has completed the quest
59+
if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.EfreetFaction.Mission03) ~= 3 then
60+
if not MsgContains(message, "djanni'hah") then
61+
npcHandler:say("Shove off, little one! Humans are not welcome here, |PLAYERNAME|!", npc, creature)
62+
endConversationWithDelay(npcHandler, npc, creature)
63+
return false
64+
end
6365

64-
if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Start) == 1 then
65-
npcHandler:say({
66-
"Hahahaha! ...",
67-
"|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!",
68-
}, npc, creature)
69-
endConversationWithDelay(npcHandler, npc, creature)
70-
return false
66+
if player:getStorageValue(Storage.Quest.U7_4.DjinnWar.MaridFaction.Start) == 1 then
67+
npcHandler:say({
68+
"Hahahaha! ...",
69+
"|PLAYERNAME|, that almost sounded like the word of greeting. Humans - cute they are!",
70+
}, npc, creature)
71+
endConversationWithDelay(npcHandler, npc, creature)
72+
return false
73+
end
7174
end
7275

7376
npcHandler:say("Be greeted, human |PLAYERNAME|. How can a humble djinn be of service?", npc, creature)

0 commit comments

Comments
 (0)