Skip to content

Commit

Permalink
Small fixes to npc modules.lua (otland#3331)
Browse files Browse the repository at this point in the history
  • Loading branch information
Evil Puncker authored Feb 18, 2021
1 parent 0da61fc commit 0c4164e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions data/npc/lib/npcsystem/modules.lua
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ if Modules == nil then
if player:isPremium() or not shop_premium[cid] then
if not player:removeTotalMoney(cost) then
npcHandler:say("You do not have enough money!", cid)
elseif player:isPzLocked(cid) then
elseif player:isPzLocked() then
npcHandler:say("Get out of there with this blood.", cid)
else
npcHandler:say("It was a pleasure doing business with you.", cid)
Expand All @@ -471,7 +471,7 @@ if Modules == nil then
return false
end
local parentParameters = node:getParent():getParameters()
local parseInfo = { [TAG_PLAYERNAME] = Player(cid):getName() }
local parseInfo = {[TAG_PLAYERNAME] = Player(cid):getName()}
local msg = module.npcHandler:parseMessage(module.npcHandler:getMessage(MESSAGE_DECLINE), parseInfo)
module.npcHandler:say(msg, cid)
module.npcHandler:resetNpc(cid)
Expand Down Expand Up @@ -1060,13 +1060,13 @@ if Modules == nil then
end

if itemWindow[1] == nil then
local parseInfo = { [TAG_PLAYERNAME] = Player(cid):getName() }
local parseInfo = {[TAG_PLAYERNAME] = Player(cid):getName()}
local msg = module.npcHandler:parseMessage(module.npcHandler:getMessage(MESSAGE_NOSHOP), parseInfo)
module.npcHandler:say(msg, cid)
return true
end

local parseInfo = { [TAG_PLAYERNAME] = Player(cid):getName() }
local parseInfo = {[TAG_PLAYERNAME] = Player(cid):getName()}
local msg = module.npcHandler:parseMessage(module.npcHandler:getMessage(MESSAGE_SENDTRADE), parseInfo)
openShopWindow(cid, itemWindow,
function(cid, itemid, subType, amount, ignoreCap, inBackpacks) module.npcHandler:onBuy(cid, itemid, subType, amount, ignoreCap, inBackpacks) end,
Expand Down Expand Up @@ -1267,7 +1267,7 @@ if Modules == nil then
function VoiceModule:callbackOnThink()
if self.lastVoice < os.time() then
self.lastVoice = os.time() + self.timeout
if math.random(100) <= self.chance then
if math.random(100) <= self.chance then
local voice = self.voices[math.random(self.voiceCount)]
Npc():say(voice.text, voice.talktype)
end
Expand Down

0 comments on commit 0c4164e

Please sign in to comment.