Skip to content
This repository has been archived by the owner on May 23, 2021. It is now read-only.

Commit

Permalink
fix(NPC): bankers not changing gold/platinum/crystal
Browse files Browse the repository at this point in the history
  • Loading branch information
wizardlink committed Mar 2, 2021
1 parent 8ecbb52 commit a7d9c04
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data/npc/scripts/bank.lua
Original file line number Diff line number Diff line change
Expand Up @@ -628,12 +628,14 @@ local function creatureSayCallback(cid, type, msg)
npcHandler:say('Well, can I help you with something else?', cid)
end
npcHandler.topic[cid] = 0
elseif msgcontains(msg, 'change') then
-- Has to be handled like this, since, a keyword would prevent previous code from being ran
npcHandler:say('There are three different coin types in Global Bank: 100 gold coins equal 1 platinum coin, 100 platinum coins equal 1 crystal coin. So if you\'d like to change 100 gold into 1 platinum, simply say \'{change gold}\' and then \'1 platinum\'.', cid)
end
return true
end

keywordHandler:addKeyword({'money'}, StdModule.say, {npcHandler = npcHandler, text = 'We can {change} money for you. You can also access your {bank account}.'})
keywordHandler:addKeyword({'change'}, StdModule.say, {npcHandler = npcHandler, text = 'There are three different coin types in Global Bank: 100 gold coins equal 1 platinum coin, 100 platinum coins equal 1 crystal coin. So if you\'d like to change 100 gold into 1 platinum, simply say \'{change gold}\' and then \'1 platinum\'.'})
keywordHandler:addKeyword({'bank'}, StdModule.say, {npcHandler = npcHandler, text = 'We can {change} money for you. You can also access your {bank account}.'})
keywordHandler:addKeyword({'advanced'}, StdModule.say, {npcHandler = npcHandler, text = 'Your bank account will be used automatically when you want to {rent} a house or place an offer on an item on the {market}. Let me know if you want to know about how either one works.'})
keywordHandler:addKeyword({'help'}, StdModule.say, {npcHandler = npcHandler, text = 'You can check the {balance} of your bank account, {deposit} money or {withdraw} it. You can also {transfer} money to other characters, provided that they have a vocation.'})
Expand Down

0 comments on commit a7d9c04

Please sign in to comment.