Postado Agosto 27, 2016 8 anos Autor 22 hours ago, MaTTch said: Em creaturescripts: function onCombat(cid, target) if(isPlayer(target) and getPlayerModes(cid).secure == SECUREMODE_ON) then return false end return true end O que eu coloco no arquivo creaturescripts.xml? Eu tentei isso, mas não deu certo: <event type="combat" name="areaspell" event="script" value="areaspell.lua"/> Edit: Eu consegui implantar esse sistema, mas quando alguém entra em pvp e está com o modo seguro, ele não ataca com magia de área (ele deveria atacar). Editado Agosto 27, 2016 8 anos por Sleet (veja o histórico de edições)
Postado Agosto 27, 2016 8 anos Spoiler local c = { skulls = {SKULL_NONE, SKULL_GREEN}, -- tipos de skull em que o modo seguro funcionara ignorePVPE = true, -- modo seguro funcionara mesmo em PVP-Enforced? (true / false) ignoreArena = false -- modo seguro funcionara mesmo em arenas? (true / false) } function onCombat(cid, target) if(c.ignorePVPE or getWorldType() ~= WORLDTYPE_HARDCORE) then if(isPlayer(target) and getPlayerModes(cid).secure == SECUREMODE_ON) then if(c.ignoreArena or not getTileInfo(getThingPos(target)).hardcore) then if(isInArray(getCreatureSkullType(cid), c.skulls)) then return false end end end end return true end
Postado Agosto 28, 2016 8 anos Autor 4 hours ago, MaTTch said: Hide contents local c = { skulls = {SKULL_NONE, SKULL_GREEN}, -- tipos de skull em que o modo seguro funcionara ignorePVPE = true, -- modo seguro funcionara mesmo em PVP-Enforced? (true / false) ignoreArena = false -- modo seguro funcionara mesmo em arenas? (true / false) } function onCombat(cid, target) if(c.ignorePVPE or getWorldType() ~= WORLDTYPE_HARDCORE) then if(isPlayer(target) and getPlayerModes(cid).secure == SECUREMODE_ON) then if(c.ignoreArena or not getTileInfo(getThingPos(target)).hardcore) then if(isInArray(getCreatureSkullType(cid), c.skulls)) then return false end end end end return true end Putz, um belíssimo script, mas agora voltou à estaca zero... Os jogadores atacam outros mesmo estando no modo seguro.
Postado Agosto 29, 2016 8 anos Spoiler local c = { skulls = {SKULL_NONE, SKULL_GREEN}, -- tipos de skull em que o modo seguro funcionara ignorePVPE = true, -- modo seguro funcionara mesmo em PVP-Enforced? (true / false) ignoreArena = false -- modo seguro funcionara mesmo em arenas? (true / false) } function onCombat(cid, target) if(c.ignorePVPE or getWorldType() ~= WORLDTYPE_HARDCORE) then if(isPlayer(target) and getPlayerModes(cid).secure == SECUREMODE_ON) then if(c.ignoreArena or not getTileInfo(getThingPos(target)).hardcore) then if(isInArray(c.skulls, getCreatureSkullType(cid))) then return false end end end end return true end Editado Agosto 29, 2016 8 anos por MaTTch (veja o histórico de edições)
Postado Agosto 29, 2016 8 anos Em 26/08/2016 ás 13:03, MaTTch disse: Em creaturescripts: function onCombat(cid, target) if(isPlayer(target) and getPlayerModes(cid).secure == SECUREMODE_ON) then return false end return true end pode ajudar num script O rei de seu proprio destino é aquele que luta pela gloria do amanhã! Discord : ZoR#9373
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.