Não Testei, se der certo Fala ae.
local ConfiG = {
item = {
{2160, 100},
{2152, 30},
},
outfitm = 1168, -- Outfit Masculina
outfitf = 1111, --Outfit Feminina
addons = 3,
vocation = 4,
}
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, typea, msg)
if(not npcHandler:isFocused(cid)) then
return false
end
local msg = msg:lower()
local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid
if msgcontains(msg, 'volcanic') and (getPlayerStorageValue(cid, 72371) < 1) then
for _, v in pairs(ConfiG.item) do
if (getPlayerItemCount(cid, v[1]) < v[2]) then
local msg = ""
msg = msg .. ", " .. v[2] .. " ".. getItemNameById(v[1]) .. (v[2] > 1 and "s" or "")
else
return selfSay("Você não tem ".. msg:sub(3, #msg) .. ".", cid)
end
end
selfSay("Parabens Voce agora e um Volcanic Master!", cid)
setPlayerStorageValue(cid, 72371, 1)
doPlayerAddItem(cid,12401,1)
if getPlayerSex(cid) == 1 then
doPlayerAddOutfit(cid, ConfiG.outfitm, ConfiG.addons)
else
doPlayerAddOutfit(cid, ConfiG.outfitf, ConfiG.addons)
end
doPlayerSetVocation(cid, ConfiG.vocation)
end
return true
end
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())
Espero ter Ajudado.










info
Grupo: Visconde
Registrado: 05/06/11
Posts: 298
Reputação: +65
Seguinte pra ele reconheçer male female use assim
Quanto ao item o que ele deveria retirar?
De qualeur geito use assim:
Editado Fevereiro 27 por jeffe000