local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}
function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end
function creatureSayCallback(cid, type, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid
local mana,heal = 20,30 ---Quanto de mana ele ganha,Quanto de health ele ganha
if (msgcontains(msg, 'yes') or msgcontains(msg, 'yes')) then
if getPlayerStorageValue(cid, 7222) > 0 then
npcHandler:say("Você ja pegou seu poder adicional", cid)
return true
end
npcHandler:say("Você recebeu o power", cid)
doCreatureAddHealth(cid, heal)
doCreatureAddMana(cid, mana)
setPlayerStorageValue(cid, 7222, 1)
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())