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
-- Conversa Jogador/NPC
local storage = 506 -- Aqui bote a storage q vai usar
local exp = 10000 -- Aqui bote a exp
if(msgcontains(msg, 'help') and getStor(cid, storage) >= 1) then
if getStor(cid, 305) >= 1 then selfSay('You a realyd my missiom.') return true end
doSendAnimatedText(getThingPos(cid), ""..exp.."")
doPlayerAddExp(cid, exp)
setStor(cid, 305, 1)
else
selfSay('Sorry you need a quest for reward.')
return true
end
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
function setStor(cid, sto, value)
return setPlayerStorageValue(cid, sto, value)
end
function getStor(cid, value)
return getPlayerStorageValue(cid, value)
end
Fale "help" e ganhe a exp, se tiver a storage..




info
Grupo: Cavaleiro
Registrado: 26/10/08
Posts: 152
Reputação: +10
Queria um npc que desse vamos supor 100000 de exp ao player que tive-se a storage 4124, 2
e desse ao player storage 4124, 3
o player nao iria precisar entregar nada só ter a storage 4124, 2 para ganhar a experiencia.