Skip to content

Commit eb01e5f

Browse files
committed
fix: storages, npcs, dialogs, quest stages and more
Took some fixes from canary, credits to their team. Mortimer and Angus are fixed in another PR.
1 parent 8639980 commit eb01e5f

39 files changed

Lines changed: 385 additions & 44 deletions

data-global/lib/core/storages.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ Storage = {
615615
Casks = 40620,
616616
HolyApeHair = 40621,
617617
SnakeDestroyer = 40622,
618-
ShamanOufit = 40623,
618+
ShamanOutfit = 40623,
619619
TheLargeAmphoras1 = 40624,
620620
TheLargeAmphoras2 = 40625,
621621
TheLargeAmphoras3 = 40626,

data-global/npc/a_fluffy_squirrel.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ npcHandler:setMessage(MESSAGE_FAREWELL, "Chh...")
7373
npcHandler:setMessage(MESSAGE_WALKAWAY, "Chh...")
7474
npcHandler:setMessage(MESSAGE_SENDTRADE, "Chchch. Chh! <you're not sure, but it seems that squirrel wants to trade your valuable acorns for useless stones that it found and considered uneatable>")
7575

76+
keywordHandler:addKeyword({ "chchch" }, StdModule.say, { npcHandler = npcHandler, text = "Chhhhhhhhhhh!" })
77+
7678
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
7779

7880
-- Dialog options (interactive icons in the NPC conversation window)

data-global/npc/ajax.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,14 @@ end
197197

198198
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
199199
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
200+
201+
keywordHandler:addKeyword({ "outfit" }, StdModule.say, { npcHandler = npcHandler, text = "Eh?" })
202+
keywordHandler:addKeyword({ "addon" }, StdModule.say, { npcHandler = npcHandler, text = "Go away." })
203+
keywordHandler:addKeyword({ "job" }, StdModule.say, { npcHandler = npcHandler, text = "No time for such stupid thing." })
204+
keywordHandler:addKeyword({ "name" }, StdModule.say, { npcHandler = npcHandler, text = "Ajax." })
205+
keywordHandler:addKeyword({ "bron" }, StdModule.say, { npcHandler = npcHandler, text = "Me no talk about him." })
206+
keywordHandler:addKeyword({ "weapon" }, StdModule.say, { npcHandler = npcHandler, text = "Me like shiny weapons." })
207+
200208
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
201209

202210
-- npcType registering the npcConfig table

data-global/npc/anderson.lua

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,20 @@ keywordHandler:addKeyword({ "captain" }, StdModule.say, {
100100
npcHandler:setMessage(MESSAGE_GREET, "Ahoi, young man |PLAYERNAME| and welcome to the Nordic Tibia Ferries. If you need a {passage}, let me know.")
101101
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye. You are welcome.")
102102

103-
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
103+
keywordHandler:addKeyword({ "ferries" }, StdModule.say, { npcHandler = npcHandler, text = "Our ferries are strong enough to stand the high waves of the Nordic Ocean." })
104+
keywordHandler:addKeyword({ "ferry" }, StdModule.say, { npcHandler = npcHandler, text = "Our ferries are strong enough to stand the high waves of the Nordic Ocean." })
105+
keywordHandler:addKeyword({ "ice islands" }, StdModule.say, { npcHandler = npcHandler, text = "We serve the routes to Senja, Folda, and Vega, and back to Tibia." })
106+
keywordHandler:addKeyword({ "senja" }, StdModule.say, { npcHandler = npcHandler, text = "This island is Senja." })
107+
keywordHandler:addKeyword({ "name" }, StdModule.say, { npcHandler = npcHandler, text = "My name is Anderson from the Nordic Tibia Ferries." })
108+
keywordHandler:addKeyword({ "anderson" }, StdModule.say, { npcHandler = npcHandler, text = "The four of us are the captains of the Nordic Tibia Ferries." })
109+
keywordHandler:addKeyword({ "carlson" }, StdModule.say, { npcHandler = npcHandler, text = "The four of us are the captains of the Nordic Tibia Ferries." })
110+
keywordHandler:addKeyword({ "nielson" }, StdModule.say, { npcHandler = npcHandler, text = "The four of us are the captains of the Nordic Tibia Ferries." })
111+
keywordHandler:addKeyword({ "svenson" }, StdModule.say, { npcHandler = npcHandler, text = "The four of us are the captains of the Nordic Tibia Ferries." })
104112

105-
-- npcType registering the npcConfig table
113+
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
106114

107115
-- Dialog options (interactive icons in the NPC conversation window)
108116
npcType:addDialogOptions("passage", "bye")
109117

118+
-- npcType registering the npcConfig table
110119
npcType:register(npcConfig)

data-global/npc/aneus.lua

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,28 @@ end
130130
npcHandler:setMessage(MESSAGE_GREET, "Greetings adventurer |PLAYERNAME|. What leads you to me?")
131131
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and take care of you!")
132132
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
133+
134+
keywordHandler:addKeyword({ "name" }, StdModule.say, { npcHandler = npcHandler, text = "My name is Aneus, the storyteller." })
135+
keywordHandler:addKeyword({ "job" }, StdModule.say, { npcHandler = npcHandler, text = "I'm a storyteller." })
136+
keywordHandler:addKeyword({ "carlin" }, StdModule.say, { npcHandler = npcHandler, text = "The story of Carlin is closely related to the story of the Fields of Glory. If you are interested in details, ask me about the story." })
137+
keywordHandler:addKeyword({ "thais" }, StdModule.say, { npcHandler = npcHandler, text = "Thais is an ancient city. It has its origin in a hamlet called Tradespot. To learn more about its growth and rise, ask someone else. I don't know this story." })
138+
keywordHandler:addKeyword({ "ab'dendriel" }, StdModule.say, { npcHandler = npcHandler, text = "The elves love stories. I learnt a lot while I lived in their city for a while. You should travel there and talk to the elves, too, and don't forget to visit their library." })
139+
keywordHandler:addKeyword({ "library" }, StdModule.say, { npcHandler = npcHandler, text = "Most cities have small libraries filled with treasures in the form of stories. The biggest library is located in the White Raven Monastery." })
140+
keywordHandler:addKeyword({ "white raven monastery" }, StdModule.say, { npcHandler = npcHandler, text = "The White Raven Monastery houses the biggest library in the known world. The monks there are a bit reclusive, though, and the Isle of the Kings is somewhat difficult to reach." })
141+
keywordHandler:addKeyword({ "isle of the kings" }, StdModule.say, { npcHandler = npcHandler, text = "The Isle of the Kings is the burial place of the Thaian nobility. For many centuries each king and many nobles have been buried there." })
142+
keywordHandler:addKeyword({ "bruno" }, StdModule.say, { npcHandler = npcHandler, text = "I don't know much about him. I only know that he's selling fish in the village." })
143+
keywordHandler:addKeyword({ "marlene" }, StdModule.say, { npcHandler = npcHandler, text = "A lovely woman. Still, I give you a hint: Better stay away from her! <grins>" })
144+
keywordHandler:addKeyword({ "graubart" }, StdModule.say, { npcHandler = npcHandler, text = "I don't know much about him. He sails much and he has seen nearly the whole world." })
145+
keywordHandler:addKeyword({ "dwarves" }, StdModule.say, { npcHandler = npcHandler, text = "The dwarfs have a rich history and like to tell about it. Actually some dwarfs are so old that they experienced many events in history themselves." })
146+
keywordHandler:addKeyword({ "gods" }, StdModule.say, { npcHandler = npcHandler, text = "The gods had great influence on humanity and other races. There are many stories related to them ... In fact, there are so many stories that it won't be sufficient to talk to some people, you will also have to research many books to learn about them." })
147+
keywordHandler:addKeyword({ "ferumbras" }, StdModule.say, { npcHandler = npcHandler, text = "The stories about him are stories of grief, revenge and destruction. You can hear them almost everywhere. My story deals with similar topics but with other people." })
148+
keywordHandler:addKeyword({ "excalibug" }, StdModule.say, { npcHandler = npcHandler, text = "This is a story for another day." })
149+
keywordHandler:addKeyword({ "fields of glory" }, StdModule.say, { npcHandler = npcHandler, text = "Ok, sit down and listen. Back in the early days, one of the ancestors of our king Tibianus III wanted to build the best city in whole Tibia." })
150+
keywordHandler:addKeyword({ "ancestors" }, StdModule.say, { npcHandler = npcHandler, text = "Please forgive me. I forgot his name. I'm getting old." })
151+
keywordHandler:addKeyword({ "work harder" }, StdModule.say, { npcHandler = npcHandler, text = "The soldiers treated them like slaves." })
152+
keywordHandler:addKeyword({ "slaves" }, StdModule.say, { npcHandler = npcHandler, text = "You don't know what a slave is? I really hope that you will never have to make this experience." })
153+
keywordHandler:addKeyword({ "struck" }, StdModule.say, { npcHandler = npcHandler, text = "The soldiers of the Red Legion went to the island by night. The orcs were not prepared and the Red Legion killed hundreds of orcs with nearly no loss. ... Afterwards, they walked back to the castle." })
154+
133155
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
134156

135157
-- npcType registering the npcConfig table

data-global/npc/augustin.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBac
179179
end
180180
-- On sell npc shop message
181181
npcType.onSellItem = function(npc, player, itemId, subtype, amount, ignore, name, totalCost)
182-
player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("Sold %ix %s for %i gold.", amount, name, totalCost))
182+
player:sendTextMessage(MESSAGE_TRADE, string.format("Sold %ix %s for %i gold.", amount, name, totalCost))
183183
end
184184
-- On check npc shop message (look item)
185185
npcType.onCheckItem = function(npc, player, clientId, subType) end

data-global/npc/bozo.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,6 @@ local function creatureSayCallback(npc, creature, type, message)
676676
npcHandler:setTopic(playerId, 2)
677677
elseif npcHandler:getTopic(playerId) == 2 then
678678
player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questline, 1)
679-
player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Questlog, 1)
680679
player:setStorageValue(Storage.Quest.U8_1.WhatAFoolishQuest.Mission1, 1)
681680
npcHandler:say({
682681
"What a foolish decision! You are indeed a worthy candidate! But let's talk about business ...",

data-global/npc/brengus.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ npcConfig.shop = {
160160
{ itemName = "tarsal arrow", clientId = 14251, buy = 6 },
161161
{ itemName = "throwing knife", clientId = 3298, buy = 25 },
162162
{ itemName = "throwing star", clientId = 3287, buy = 42 },
163-
{ itemName = "tribal mask", clientId = 3403, buy = 250 },
163+
{ itemName = "tribal mask", clientId = 3403, sell = 250 },
164164
{ itemName = "tusk shield", clientId = 3443, sell = 850 },
165165
{ itemName = "two handed sword", clientId = 3265, buy = 950 },
166166
{ itemName = "viking helmet", clientId = 3367, buy = 265 },

data-global/npc/bron.lua

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,19 @@ npcHandler:setCallback(CALLBACK_GREET, greetCallback)
191191
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
192192
npcHandler:setMessage(MESSAGE_FAREWELL, "Take care, |PLAYERNAME|!")
193193
npcHandler:setMessage(MESSAGE_WALKAWAY, "Take care!")
194+
195+
keywordHandler:addKeyword({ "name" }, StdModule.say, { npcHandler = npcHandler, text = "My name is Bron. Pleased to meet you, |PLAYERNAME|." })
196+
keywordHandler:addKeyword({ "job" }, StdModule.say, { npcHandler = npcHandler, text = "I am a barbarian. Me and my brother are the only ones in this region, as far as I know." })
197+
keywordHandler:addKeyword({ "hut" }, StdModule.say, { npcHandler = npcHandler, text = "I am a barbarian. Me and my brother are the only ones in this region, as far as I know." })
198+
keywordHandler:addKeyword({ "cyclops" }, StdModule.say, { npcHandler = npcHandler, text = "Ajax simply won't understand the advantages of a well-regulated lifestyle. We have actually tried to live together, but we start to fight after a few minutes." })
199+
keywordHandler:addKeyword({ "ajax" }, StdModule.say, { npcHandler = npcHandler, text = "Ah, sigh. It is hard to believe that this illiterate savage is my one and only brother." })
200+
keywordHandler:addKeyword({ "savage" }, StdModule.say, { npcHandler = npcHandler, text = "Ajax simply won't understand the advantages of a well-regulated lifestyle. We have actually tried to live together, but we start to fight after a few minutes." })
201+
keywordHandler:addKeyword({ "blood" }, StdModule.say, { npcHandler = npcHandler, text = "Where? Where? I hope my carpet is not ruined. Last time Ajax was here he left a horrible mess." })
202+
keywordHandler:addKeyword({ "mess" }, StdModule.say, { npcHandler = npcHandler, text = "I really don't want to think about it anymore." })
203+
keywordHandler:addKeyword({ "opinion" }, StdModule.say, { npcHandler = npcHandler, text = "We always have different opinions on all sorts of matters. Such as interior decoration. Or violence." })
204+
keywordHandler:addKeyword({ "decoration" }, StdModule.say, { npcHandler = npcHandler, text = "Nice furniture, isn't it?" })
205+
keywordHandler:addKeyword({ "warrior's sweat" }, StdModule.say, { npcHandler = npcHandler, text = "Were you able to get hold of a flask with pure warrior's sweat?" })
206+
194207
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
195208

196209
-- npcType registering the npcConfig table

data-global/npc/bruno.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ keywordHandler:addKeyword({ "graubart" }, StdModule.say, { npcHandler = npcHandl
6161
npcHandler:setMessage(MESSAGE_GREET, "Ahoi, |PLAYERNAME|. You want to buy some fresh fish?")
6262
npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and come again!")
6363
npcHandler:setMessage(MESSAGE_SENDTRADE, "Buy all the fish you want. It's fresh and healthy, promised.")
64+
65+
keywordHandler:addKeyword({ "aneus" }, StdModule.say, { npcHandler = npcHandler, text = "Hmm, I don't know him very well. But he has a very nice story to tell." })
66+
6467
npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true)
6568

6669
-- npcType registering the npcConfig table

0 commit comments

Comments
 (0)