Boa tarde, gostaria de um script que fizesse um NPC aparecer com uma exclamação (ou outro efeito) em cima dele caso o player tenha determinado storage ou level.
(efeito visível apenas para o player que estiver o storage)
Muito Obrigado.
Base KPDO.
Segue script que estou usando de base.
Citarlocal keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)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() endlocal npcpos = {x=1053,y=1215,z=7}
local level = 30function thinkCallback(cid)
local msgs = {
'texto1',
'texto2',
'texto3',
'texto4',
}if math.random(1,10) == 1 then
selfSay(msgs[math.random(1,#msgs)])
end
return true
endfunction greetCallback(cid)
if getPlayerLevel(cid) > 30 then
doSendMagicEffect(getThingPos(cid),12)
selfSay('Quest liberada.',cid)
else
doSendMagicEffect(getThingPos(cid),12)
selfSay('Voce nao tem level para adquirir quests comigo.',cid)
end
return false
end
npcHandler:setCallback(CALLBACK_ONTHINK, thinkCallback)
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:addModule(FocusModule:new())