villelagui
C++ Programmer
So, i have all bless npcs on my server, the bless system changes the price depending on the level, till this point it's working great, but the npc always says the wrong price but charges the right one, wanted to know if i can make a math with the basecost + (value per level starting from 30 ending on 120 and raising 200gp each level) just like the script:
in the code you can see the prices are all right, but the npc SAY action is saying the wrong value everytime.
I know it might seem preety simples but i don't have much experience in LUA scripting... sooooo, any help is welcome!
Lua:
local node1 = keywordHandler:addKeyword({'first bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Here in the whiteflower temple you may receive the blessing of spiritual shielding. But we must ask of you to sacrifice 2000 gold. Are you still interested?'})
node1:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, number = 4, premium = true, baseCost = 2000, levelCost = 200, startLevel = 30, endLevel = 120})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Oh. You do not have enough money.'})
in the code you can see the prices are all right, but the npc SAY action is saying the wrong value everytime.
I know it might seem preety simples but i don't have much experience in LUA scripting... sooooo, any help is welcome!