Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: many npc fixes (quests/traders/etc) #1550

Merged
merged 1 commit into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions data-otservbr-global/npc/ariella.lua
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,14 @@ local function creatureSayCallback(npc, creature, type, message)
npcHandler:say("Are you here to bring me the 100 pieces of bread that I requested?", npc, creature)
npcHandler:setTopic(playerId, 3)
elseif player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 10 then
npcHandler:say(
{
"The sailors always tell tales about the famous beer of Carlin. \
npcHandler:say({
"The sailors always tell tales about the famous beer of Carlin. \z
You must know, alcohol is forbidden in that city. ...",
"The beer is served in a secret whisper bar anyway. \
"The beer is served in a secret whisper bar anyway. \z
Bring me a sample of the whisper beer, NOT the usual beer but whisper beer. I hope you are listening."
},
npc, creature)
}, npc, creature)
player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 11)
elseif player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 12 then
elseif player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 12 or player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 11 then
npcHandler:say("Did you get a sample of the whisper beer from Carlin?", npc, creature)
npcHandler:setTopic(playerId, 4)
end
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/npc/aruda.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ npcConfig.walkRadius = 2

npcConfig.outfit = {
lookType = 140,
lookHead = 77,
lookHead = 96,
lookBody = 81,
lookLegs = 79,
lookFeet = 95,
Expand Down
1 change: 1 addition & 0 deletions data-otservbr-global/npc/brengus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ npcConfig.shop = {
{ itemName = "tarsal arrow", clientId = 14251, buy = 6 },
{ itemName = "throwing knife", clientId = 3298, buy = 25 },
{ itemName = "throwing star", clientId = 3287, buy = 42 },
{ itemName = "tribal mask", clientId = 3403, buy = 250 },
{ itemName = "tusk shield", clientId = 3443, sell = 850 },
{ itemName = "two handed sword", clientId = 3265, buy = 950 },
{ itemName = "viking helmet", clientId = 3367, buy = 265 },
Expand Down
20 changes: 10 additions & 10 deletions data-otservbr-global/npc/bron.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ local function creatureSayCallback(npc, creature, type, message)
end
elseif (MsgContains(message, "cloth")) then
if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 7 then
npcHandler:say("Have you really managed to fulfil the task and brought me 50 pieces of red cloth and 50 pieces of green cloth?", npc, creature)
npcHandler:say("Have you really managed to fulfil the task and brought me 25 pieces of red cloth and 25 pieces of green cloth?", npc, creature)
npcHandler:setTopic(playerId, 8)
end
elseif (MsgContains(message, "silk")) then
if player:getStorageValue(Storage.OutfitQuest.BarbarianAddon) == 8 then
npcHandler:say("Oh, did you bring 10 rolls of spider silk yarn for me?", npc, creature)
npcHandler:say("Oh, did you bring 5 rolls of spider silk yarn for me?", npc, creature)
npcHandler:setTopic(playerId, 9)
end
elseif (MsgContains(message, "sweat")) then
Expand Down Expand Up @@ -143,26 +143,26 @@ local function creatureSayCallback(npc, creature, type, message)
elseif (npcHandler:getTopic(playerId) == 6) then
npcHandler:say({
"Great! You see, I really would love to sew a nice shirt for him. I just need a few things for that, so please listen closely: ...",
"He loves green and red, so I will need about 50 pieces of red cloth - like the material heroes make their capes of - and 50 pieces of the green cloth Djinns like. ...",
"Secondly, I need about 10 rolls of spider silk yarn. I think mermaids can yarn silk of large spiders to create a smooth thread. ...",
"He loves green and red, so I will need about 25 pieces of red cloth - like the material heroes make their capes of - and 25 pieces of the green cloth Djinns like. ...",
"Secondly, I need about 5 rolls of spider silk yarn. I think mermaids can yarn silk of large spiders to create a smooth thread. ...",
"The only remaining thing needed would be a bottle of warrior's sweat to spray it over the shirt... he just loves this smell. ...",
"Have you understood everything I told you and are willing to handle this task?"
}, npc, creature)
npcHandler:setTopic(playerId, 7)
elseif (npcHandler:getTopic(playerId) == 7) then
npcHandler:say("Thank you, my friend! Come back to me once you have collected 50 pieces of red cloth and 50 pieces of green cloth.", npc, creature)
npcHandler:say("Thank you, my friend! Come back to me once you have collected 25 pieces of red cloth and 25 pieces of green cloth.", npc, creature)
player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 7)
npcHandler:setTopic(playerId, 0)
elseif (npcHandler:getTopic(playerId) == 8) then
if player:getItemCount(5910) >= 50 and player:getItemCount(5911) >= 50 then
npcHandler:say("Terrific! I will start to trim it while you gather 10 rolls of spider silk. I'm sure that Ajax will love it.", npc, creature)
player:removeItem(5910, 50)
player:removeItem(5911, 50)
if player:getItemCount(5910) >= 25 and player:getItemCount(5911) >= 25 then
npcHandler:say("Terrific! I will start to trim it while you gather 5 rolls of spider silk. I'm sure that Ajax will love it.", npc, creature)
player:removeItem(5910, 25)
player:removeItem(5911, 25)
player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 8)
npcHandler:setTopic(playerId, 0)
end
elseif (npcHandler:getTopic(playerId) == 9) then
if player:removeItem(5886, 10) then
if player:removeItem(5886, 5) then
npcHandler:say("I'm impressed! You really managed to get spider silk yarn for me! I will immediately start to work on this shirt. Please don't forget to bring me warrior's sweat!", npc, creature)
player:setStorageValue(Storage.OutfitQuest.BarbarianAddon, 9)
npcHandler:setTopic(playerId, 0)
Expand Down
2 changes: 2 additions & 0 deletions data-otservbr-global/npc/cael.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ local tomes = Storage.Quest.U8_54.TheNewFrontier.TomeofKnowledge
npcConfig.shop = {
{ itemName = "didgeridoo", clientId = 2965, buy = 5000, storageKey = tomes, storageValue = 6 },
{ itemName = "war drum", clientId = 2966, buy = 1000, storageKey = tomes, storageValue = 6 },
{ itemName = "Dragon Statue Kit", clientId = 10216, buy = 2500, storageKey = tomes, storageValue = 11 },
{ itemName = "Dragon Throne Kit", clientId = 10288, buy = 5000, storageKey = tomes, storageValue = 12 },
}
-- On buy npc shop message
npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost)
Expand Down
4 changes: 2 additions & 2 deletions data-otservbr-global/npc/captain_dreadnought.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ local towns = {
}
}

local defaultTown = TOWNS_LIST.VENORE
local defaultTown = TOWNS_LIST.THAIS
local townNames = { all = "", free = "", premium = "" }

-- Function to build town names strings and adds additional data to sailable/premium towns about
Expand Down Expand Up @@ -322,7 +322,7 @@ keywordHandler:addKeyword({ "ship" }, StdModule.say,
{
npcHandler = npcHandler,
text = "She's pretty, isn't she? Will ship you safely to any port. Though a young landlubber such as you should \z
consider to travel to Venore first. The travel is for free. Just once though! You have to ask for a {passage}."
consider to travel to Thais first. The travel is for free. Just once though! You have to ask for a {passage}."
})
keywordHandler:addKeyword({ "mainland" }, StdModule.say,
{
Expand Down
1 change: 0 additions & 1 deletion data-otservbr-global/npc/captain_fearless.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ addTravelKeyword('svargrond', 150, Position(32341, 31108, 6))
addTravelKeyword('liberty bay', 180, Position(32285, 32892, 6))
addTravelKeyword('yalahar', 185, Position(32816, 31272, 6), function(player) return player:getStorageValue(Storage.SearoutesAroundYalahar.Venore) ~= 1 and player:getStorageValue(Storage.SearoutesAroundYalahar.TownsCounter) < 5 end)
addTravelKeyword('ankrahmun', 150, Position(33092, 32883, 6))
addTravelKeyword('travora', 1000, Position(32055, 32368, 6))
addTravelKeyword('issavi', 130, Position(33900, 31463, 6))

-- Darashia
Expand Down
1 change: 0 additions & 1 deletion data-otservbr-global/npc/captain_gulliver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ end

addTravelKeyword('thais', 150, Position(32311, 32210, 6))
addTravelKeyword('krailos', 180, Position(33493, 31712, 6))
addTravelKeyword('travora', 1000, Position(32055, 32368, 6))
addTravelKeyword('issavi', 130, Position(33902, 31462, 6))

-- Kick
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/npc/captain_jack_rat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ local function creatureSayCallback(npc, creature, type, message)
end

if MsgContains(message, "sail") and player:getStorageValue(Storage.Quest.U12_60.APiratesTail.TentuglyKilled) == 1 then
npcHandler:say("There are two different routes. The dangerous one will be available once a day and it is likely that a seemonster will attack the ship once again. ...", npc, creature)
npcHandler:say("There are two different routes. The dangerous one will be available once a day and it is likely that a seemonster will attack the ship once again. And a {safe} route that we can take directly there.", npc, creature)
npcHandler:setTopic(playerId, 1)
elseif MsgContains(message, "safe") and npcHandler:getTopic(playerId) == 1 then
npcHandler:say("Do you want to take the safe route?", npc, creature)
Expand Down
26 changes: 13 additions & 13 deletions data-otservbr-global/npc/chondur.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,18 @@ end
notReadyKeyword(
'outfit',
{
"Hum? Sorry, but I don't sense enough spiritual wisdom in you to even allow \
"Hum? Sorry, but I don't sense enough spiritual wisdom in you to even allow \z
you to touch the mask and staff I'm wearing... yet. ...",
'I know of a really wise ape healer, though, who might be able to bless you with shamanic energy. \
'I know of a really wise ape healer, though, who might be able to bless you with shamanic energy. \z
You should become his apprentice first if you desire to become mine.'
}
)
notReadyKeyword(
'addon',
{
"Hum? Sorry, but I don't sense enough spiritual wisdom in you to even allow \
"Hum? Sorry, but I don't sense enough spiritual wisdom in you to even allow \z
you to touch the mask and staff I'm wearing... yet. ...",
'I know of a really wise ape healer, though, who might be able to bless you with shamanic energy. \
'I know of a really wise ape healer, though, who might be able to bless you with shamanic energy. \z
You should become his apprentice first if you desire to become mine.'
}
)
Expand Down Expand Up @@ -196,14 +196,14 @@ end
-- Staff
addTaskKeyword(
{
"If you fulfil a task for me, I'll grant you a staff like the one I'm wearing. \
"If you fulfil a task for me, I'll grant you a staff like the one I'm wearing. \z
Do you want to hear the requirements?",
{
'Deep in the Tiquandian jungle a monster lurks which is seldom seen. \
'Deep in the Tiquandian jungle a monster lurks which is seldom seen. \z
It is the revenge of the jungle against humankind. ...',
'This monster, if slain, carries a rare root called Mandrake. If you find it, bring it to me. \
'This monster, if slain, carries a rare root called Mandrake. If you find it, bring it to me. \z
Also, gather 5 of the voodoo dolls used by the mysterious dworc voodoomasters. ...',
'If you manage to fulfil this task, I will grant you your own staff. \
'If you manage to fulfil this task, I will grant you your own staff. \z
Have you understood everything and are ready for this test?'
},
"Good! Come back once you've found a mandrake and collected 5 dworcish voodoo dolls."
Expand All @@ -215,15 +215,15 @@ addTaskKeyword(
-- Mask
addTaskKeyword(
{
"You have successfully passed the first task. \
If you can fulfil my second task, I'll grant you a mask like the one I'm wearing. \
"You have successfully passed the first task. \z
If you can fulfil my second task, I'll grant you a mask like the one I'm wearing. \z
Do you want to hear the requirements?",
{
"The dworcs of Tiquanda like to wear certain tribal masks which I'd like to take a look at. \
"The dworcs of Tiquanda like to wear certain tribal masks which I'd like to take a look at. \z
Please bring me 5 of these masks. ...",
"Secondly, the high ape magicians of Banuta use banana staffs. \
"Secondly, the high ape magicians of Banuta use banana staffs. \z
I'd love to learn more about theses staffs, so please bring me 5 of them, too. ...",
"If you manage to fulfil this task, I'll grant you your own mask. \
"If you manage to fulfil this task, I'll grant you your own mask. \z
Have you understood everything and are you ready for this test?"
},
'Good! Come back once you have collected 5 tribal masks and 5 banana staffs.'
Expand Down
34 changes: 15 additions & 19 deletions data-otservbr-global/npc/duncan.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ local function creatureSayCallback(npc, creature, type, message)

if table.contains({ 'outfit', 'addon' }, message) and player:getStorageValue(Storage.OutfitQuest.PirateBaseOutfit) == 1 then
npcHandler:say(
"You're talking about my sabre? Well, even though you earned our trust, \
"You're talking about my sabre? Well, even though you earned our trust, \z
you'd have to fulfill a task first before you are granted to wear such a sabre.",
creature)
npc, creature)
elseif MsgContains(message, 'mission') then
if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 6 then
npcHandler:say(
'I need a new quality atlas for our captains. Only one of the best will do it. \
I heard the explorers society sells the best, but only to members of a certain rank. \
'I need a new quality atlas for our captains. Only one of the best will do it. \z
I heard the explorers society sells the best, but only to members of a certain rank. \z
You will have to get this rank or ask a high ranking member to buy it for you.',
creature)
npc, creature)
player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 7)
npcHandler:setTopic(playerId, 0)
elseif player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 7 then
Expand All @@ -82,10 +82,9 @@ local function creatureSayCallback(npc, creature, type, message)
player:getStorageValue(Storage.TheShatteredIsles.TortoiseEggNargorDoor) < 0
then
npcHandler:say(
'You did some impressive things. I think people here start considering you as one of us. \
But these are dire times and everyone of us is expected to give his best and even exceed himself. \
Do you think you can handle that?',
creature)
'You did some impressive things. I think people here start considering you as one of us. \z
But these are dire times and everyone of us is expected to give his best and even exceed himself. \z
Do you think you can handle that?', npc, creature)
npcHandler:setTopic(playerId, 7)
elseif player:getStorageValue(Storage.TheShatteredIsles.TortoiseEggNargorDoor) == 1 then
npcHandler:say('Did you rescue one of those poor soon-to-be baby tortoises from Nargor?', npc, creature)
Expand All @@ -95,7 +94,7 @@ local function creatureSayCallback(npc, creature, type, message)
if player:getStorageValue(storage) < 1 then
npcHandler:say(
"Are you up to the task which I'm going to give you and willing to prove you're worthy of wearing such a sabre?",
creature)
npc, creature)
npcHandler:setTopic(playerId, 1)
end
elseif MsgContains(message, 'eye patches') then
Expand All @@ -115,14 +114,12 @@ local function creatureSayCallback(npc, creature, type, message)
end
elseif MsgContains(message, 'yes') then
if npcHandler:getTopic(playerId) == 1 then
npcHandler:say(
{
'Listen, the task is not that hard. Simply prove that you are with us and not with the \
npcHandler:say({
'Listen, the task is not that hard. Simply prove that you are with us and not with the \z
pirates from Nargor by bringingme some of their belongings. ...',
'Bring me 100 of their eye patches, 100 of their peg legs and 100 of their hooks, in that order. ...',
'Have you understood everything I told you and are willing to handle this task?'
},
creature)
'Bring me 100 of their eye patches, 100 of their peg legs and 100 of their hooks, in that order. ...',
'Have you understood everything I told you and are willing to handle this task?'
}, npc, creature)
npcHandler:setTopic(playerId, 2)
elseif npcHandler:getTopic(playerId) == 2 then
player:setStorageValue(storage, 1)
Expand Down Expand Up @@ -178,8 +175,7 @@ local function creatureSayCallback(npc, creature, type, message)
This is the opportunity to save a tortoise from a gruesome fate! ...',
'I will ask Sebastian to bring you there. \
Travel to Nargor, find their tortoise eggs and bring me at least one of them.'
},
creature)
}, npc, creature)
player:setStorageValue(Storage.TheShatteredIsles.TortoiseEggNargorDoor, 1)
npcHandler:setTopic(playerId, 0)
end
Expand Down
4 changes: 2 additions & 2 deletions data-otservbr-global/npc/eremo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ local function creatureSayCallback(npc, creature, type, message)
if player:getItemCount(3506) > 0 then
if player:removeItem(3506, 1) then
npcHandler:say(
'A letter from that youngster Morgan? I believed him dead since years. \
'A letter from that youngster Morgan? I believed him dead since years. \z
These news are good news indeed. Thank you very much, my friend.',
creature)
npc, creature)
player:setStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven, 5)
end
end
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/npc/fiona.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ npcConfig.shop = {
{ itemName = "demon horn", clientId = 5954, sell = 1000 },
{ itemName = "demonic skeletal hand", clientId = 9647, sell = 80 },
{ itemName = "dragon priests wandtip", clientId = 10444, sell = 175 },
{ itemName = "dragons tail", clientId = 11457, sell = 100 },
{ itemName = "dragon's tail", clientId = 11457, sell = 100 },
{ itemName = "draken sulphur", clientId = 11658, sell = 550 },
{ itemName = "elder bonelord tentacle", clientId = 10276, sell = 150 },
{ itemName = "elven astral observer", clientId = 11465, sell = 90 },
Expand Down
1 change: 0 additions & 1 deletion data-otservbr-global/npc/haroun.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ npcConfig.shop = {
{ itemName = "stone skin amulet", clientId = 3081, buy = 5000, sell = 500, count = 5 },
{ itemName = "sword ring", clientId = 3091, buy = 500, sell = 100 },
{ itemName = "wand of cosmic energy", clientId = 3073, sell = 2000 },
{ itemName = "wand of cosmic energy", clientId = 3073, sell = 2000 },
{ itemName = "wand of decay", clientId = 3072, sell = 1000 },
{ itemName = "wand of defiance", clientId = 16096, sell = 6500 },
{ itemName = "wand of draconia", clientId = 8093, sell = 1500 },
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/npc/inigo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ local function creatureSayCallback(npc, creature, type, message)
end
end
elseif MsgContains(message, "rookgaard") and player:getLevel() <= 9 then
if Player.getAccountStorage(player, accountId, Storage.Dawnport.Mainland, true) == 1 then
if Player.getAccountStorage(player, Storage.Dawnport.Mainland, true) == 1 then
npcHandler:say("Hmmm. Long time I visited that isle. Not very exciting place. \z
Why do you ask? Do you wish to go there?", npc, creature)
npcHandler:setTopic(playerId, 1)
Expand Down
18 changes: 8 additions & 10 deletions data-otservbr-global/npc/morgan.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,19 @@ local function creatureSayCallback(npc, creature, type, message)
npcHandler:say(
'Ahh. So Duncan sent you, eh? You must have done something really impressive. \
Okay, take this fine sabre from me, mate.',
creature)
npc, creature)
end
elseif MsgContains(message, 'mission') then
if player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 3 then
npcHandler:say(
{
'Hm, if you are that eager to work I have an idea how you could help me out. \
npcHandler:say({
'Hm, if you are that eager to work I have an idea how you could help me out. \z
A distant relative of mine, the old sage Eremo lives on the isle Cormaya, near Edron. ...',
"He has not heard from me since ages. He might assume that I am dead. \
Since I don't want him to get into trouble for receiving a letter from a \
"He has not heard from me since ages. He might assume that I am dead. \z
Since I don't want him to get into trouble for receiving a letter from a \z
pirate I ask you to deliver it personally. ...",
"Of course it's a long journey but you asked for it. \
You will have to prove us your worth. Are you up to that?"
},
creature)
"Of course it's a long journey but you asked for it. \z
You will have to prove us your worth. Are you up to that?",
}, npc, creature)
npcHandler:setTopic(playerId, 2)
elseif player:getStorageValue(Storage.TheShatteredIsles.ReputationInSabrehaven) == 5 then
npcHandler:say('Thank you for delivering my letter to Eremo. I have no more missions for you.', npc, creature)
Expand Down
Loading