function StdModule.bless(cid, message, keywords, parameters, node)
local npcHandler = parameters.npcHandler
if npcHandler == nil then
error("StdModule.bless called without any npcHandler instance.")
end
if not npcHandler:isFocused(cid) then
return false
end
local player = Player(cid)
local parseInfo = {[TAG_BLESSCOST] = getBlessingsCost(player:getLevel()), [TAG_PVPBLESSCOST] = getPvpBlessingCost(player:getLevel())}
if player:hasBlessing(parameters.bless) then
npcHandler:say("You already possess this blessing.", cid)
elseif parameters.bless == 4 and player:getStorageValue(Storage.KawillBlessing) ~= 1 then
npcHandler:say("You need the blessing of the great geomancer first.", cid)
elseif parameters.bless == 1 then
npcHandler:say("This blessing is disabled.", cid)
elseif not player:removeMoneyNpc(type(parameters.cost) == "string" and npcHandler
arseMessage(parameters.cost, parseInfo) or parameters.cost) then
npcHandler:say("Oh. You do not have enough money.", cid)
else
npcHandler:say(parameters.text or "You have been blessed by one of the five gods!", cid)
if parameters.bless == 4 then
player:setStorageValue(Storage.KawillBlessing, 0)
end
player:addBlessing(parameters.bless)
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE)
end
npcHandler:resetNpc(cid)
return true
end
With the current text, the Bless NPC asks if I want to buy the blessing, but when I say yes, he says nothing, and nothing happends
and when I remove "Npc" from "removeMoneyNpc"
The Bless NPC tell me I dont have enough gold.
Also when I tried your link, the same happends as when I use "removeMoneyNpc"
Any idea?