From 2c70b43cb7c5cfd53be5a7767a72f1fd34fd7a6f Mon Sep 17 00:00:00 2001 From: "Leilani A." <168607226+kaleohanopahala@users.noreply.github.com> Date: Tue, 31 Dec 2024 10:08:13 -0300 Subject: [PATCH] Update thorgrin.lua Fix issue #2999 Missing Keywords. --- data-otservbr-global/npc/thorgrin.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data-otservbr-global/npc/thorgrin.lua b/data-otservbr-global/npc/thorgrin.lua index 976c404af57..48eba7866bd 100644 --- a/data-otservbr-global/npc/thorgrin.lua +++ b/data-otservbr-global/npc/thorgrin.lua @@ -52,15 +52,15 @@ npcType.onCloseChannel = function(npc, creature) end -- Travel -local function addTravelKeyword(keyword, cost, destination) - local travelKeyword = keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = "Do you seek a ride to " .. keyword:titleCase() .. " for |TRAVELCOST|?", cost = cost, discount = "postman" }) - travelKeyword:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, premium = false, cost = cost, discount = "postman", destination = destination }) - travelKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Then not.", reset = true }) +local function addTravelKeyword(keyword, cost, destination, text, action, discount) + local travelKeyword = keywordHandler:addKeyword({ keyword }, StdModule.say, { npcHandler = npcHandler, text = text or "Do you seek a ride to " .. keyword:titleCase() .. " for |TRAVELCOST|?", cost = cost, discount = discount or "postman" }) + travelKeyword:addChildKeyword({ "yes" }, StdModule.travel, { npcHandler = npcHandler, premium = false, cost = cost, discount = discount or "postman", destination = destination, text = "Full steam ahead!" }, nil, action) + travelKeyword:addChildKeyword({ "no" }, StdModule.say, { npcHandler = npcHandler, text = "Then not", reset = true }) end addTravelKeyword("kazordoon", 210, Position(32659, 31957, 15)) addTravelKeyword("cormaya", 110, Position(33310, 31988, 15)) -addTravelKeyword("gnomprona", { "Would you like to travel to Gnomprona for |TRAVELCOST|?", "Full steam ahead!", "Then not." }, 200, "postman", Position(33516, 32856, 14)) +addTravelKeyword("gnomprona", 200, Position(33516, 32856, 14), "Would you like to travel to Gnomprona for |TRAVELCOST|?", nil, "postman") keywordHandler:addKeyword({ "passage" }, StdModule.say, { npcHandler = npcHandler, text = "Do you want me take you to {Cormaya}, {Kazordoon} or {Gnomprona}?" })