.Informações
Versão testada: 8.60 TFS: 0.4 / 0.3.6 Função: Ao sair de uma zona de proteção, caso o player esteja sem bless, ele manda uma mensagem na tela avisando que está sem bless.
.Em "Data/creaturescripts/scripts", copie e cole um arquivo.LUA e renomeie para checkBless.lua, apague tudo e cole:
function onThink(cid, lastExecution, thinkInterval) if(getTilePzInfo(getCreaturePosition(cid))) == false and getPlayerStorageValue(cid, 23333) <= 0 then for b = 1,5 do if getPlayerBlessing(cid, b) == false then setPlayerStorageValue(cid, 23333, 1) return doPlayerSendTextMessage(cid, 22, "Você não tem todas as bless, tome cuidado.") end end elseif (getTilePzInfo(getCreaturePosition(cid))) == true and getPlayerStorageValue(cid, 23333) == 1 then setPlayerStorageValue(cid, 23333, -1) end return true end
.Em "Data/creaturescripts", abra o creaturescripts.xml e adicione:
<event type="think" name="checkBless" event="script" value="checkBless.lua"/>
.Novamente em "Data/creaturescripts/scripts", abra o arquivo login.lua e adicione:
registerCreatureEvent(cid, "checkBless")
Créditos: ScythePanthom and wakon