Postado Setembro 11, 2017 7 anos Um alerta ao player quando morrer, dizendo que ele esta sem bless. Só exibe uma vez depois que loga de uma morte (mais sempre que morre né, dã) [WARNING] You are not fully blessed! If you die, you might lose equipment. Editado Setembro 11, 2017 7 anos por jNo (veja o histórico de edições) (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Setembro 13, 2017 7 anos local freeBlessMaxLevel = 150 function onLogin(cid) if not isPlayer(cid) then return true end if(getPlayerLevel(cid) <= freeBlessMaxLevel and not getPlayerBlessing(cid,1)) then for b=1, 5 do doPlayerAddBlessing(cid, b) end doCreatureSay(cid, 'Voce tem bless gratuita, porque seu level é menor que 150', TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPosition(cid), CONST_ME_HOLYDAMAGE) elseif(getPlayerBlessing(cid,1)) then doCreatureSay(cid, 'Você já tem bless!', TALKTYPE_ORANGE_1) else doCreatureSay(cid, 'Você não tem bless. Digite !bless cuidado pode dar exausted', TALKTYPE_ORANGE_1) end return true end
Postado Setembro 13, 2017 7 anos Autor 1 hora atrás, Antipush disse: local freeBlessMaxLevel = 150 function onLogin(cid) if not isPlayer(cid) then return true end if(getPlayerLevel(cid) <= freeBlessMaxLevel and not getPlayerBlessing(cid,1)) then for b=1, 5 do doPlayerAddBlessing(cid, b) end doCreatureSay(cid, 'Voce tem bless gratuita, porque seu level é menor que 150', TALKTYPE_ORANGE_1) doSendMagicEffect(getThingPosition(cid), CONST_ME_HOLYDAMAGE) elseif(getPlayerBlessing(cid,1)) then doCreatureSay(cid, 'Você já tem bless!', TALKTYPE_ORANGE_1) else doCreatureSay(cid, 'Você não tem bless. Digite !bless cuidado pode dar exausted', TALKTYPE_ORANGE_1) end return true end Não é isso, quero apenas que dê o alerta ao morrer e perder a bless. (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Postado Setembro 14, 2017 7 anos Solução Em creaturescripts/scripts, crie um arquivo: blessmsg.lua Spoiler function onDeath(cid, corpse, deathList) if not isPlayer(cid) then return true end setPlayerStorageValue(cid, 23771, 1) return true end function onLogin(cid) if getPlayerStorageValue(cid, 23771) == 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[WARNING] You are not fully blessed! If you die, you might lose equipament.") setPlayerStorageValue(cid, 23771, -1) end return true end No login.lua: registerCreatureEvent(cid, "BlessMsg") No creaturescripts.xml: <event type="login" name="msgbless" event="script" value="blessmsg.lua"/> <event type="death" name="BlessMsg" event="script" value="blessmsg.lua"/> Contato: Email: [email protected] Discord: Dwarfer#2715
Postado Setembro 14, 2017 7 anos Autor 3 horas atrás, Dwarfer disse: Em creaturescripts/scripts, crie um arquivo: blessmsg.lua Ocultar conteúdo function onDeath(cid, corpse, deathList) if not isPlayer(cid) then return true end setPlayerStorageValue(cid, 23771, 1) return true end function onLogin(cid) if getPlayerStorageValue(cid, 23771) == 1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "[WARNING] You are not fully blessed! If you die, you might lose equipament.") setPlayerStorageValue(cid, 23771, -1) end return true end No login.lua: registerCreatureEvent(cid, "BlessMsg") No creaturescripts.xml: <event type="login" name="msgbless" event="script" value="blessmsg.lua"/> <event type="death" name="BlessMsg" event="script" value="blessmsg.lua"/> Valeu, é isso mesmo! (1º) | [8.60] - Galaxy Server - Download (2º) | [8.60] - Glorious Server - Download (3º) | [8.60] - Epic Server - Download
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.