Postado Fevereiro 4, 2017 8 anos Galera, coloquei um sistema no meu ot que funciona da seguinte maneira: Se 5 amigos entrarem em Party, os 5 da party nao consegue atacar 1 ao outro! so que ta dando muito erro na distro Spoiler [Error - CreatureScript Interface] data/creaturescripts/scripts/Dpt.lua:onCombat Description: (luaGetPlayerParty) Player not found [Error - CreatureScript Interface] data/creaturescripts/scripts/Apt.lua:onAttack Description: (luaGetPlayerParty) Player not found [Error - CreatureScript Interface] data/creaturescripts/scripts/Dpt.lua:onCombat Description: (luaGetPlayerParty) Player not found Apt Spoiler function onAttack(cid, target) if isPlayer(cid) and isInParty(cid) and getPlayerParty(cid) == getPlayerParty(target) then doPlayerSendCancel(cid, "You can not attack your party members") return false else return true end end Bpt Spoiler function onCast(cid, target) if isPlayer(cid) and isInParty(cid) and getPlayerParty(cid) == getPlayerParty(target) then doPlayerSendCancel(cid, "You can not use spells or runes in your party members") return false else return true end end Cpt Spoiler function onAreaCombat(cid, tileItem, tilePosition, isAggressive) if isPlayer(cid) and isInParty(cid) and getPlayerParty(cid) == getPlayerParty(tileItem) then return false else return true end end Dpt Spoiler function onCombat(cid, target) if isPlayer(cid) and isInParty(cid) and getPlayerParty(cid) == getPlayerParty(target) then return false else return true end end Peguei esse scripts Editado Fevereiro 4, 2017 8 anos por mateusmoretti (veja o histórico de edições)
Postado Junho 19, 2018 6 anos Desculpe reviver o tópico, mas para evitar criar outro, estou com o mesmo problema no mesmo script, alguém pode ajuda? Oi
Postado Junho 19, 2018 6 anos @NathanAmaro Apt Spoiler function onAttack(cid, target) if isPlayer(cid) and isInParty(cid) and isPlayer(target) and isInParty(target) and getPlayerParty(cid) == getPlayerParty(target) then doPlayerSendCancel(cid, "You can not attack your party members") return false else return true end end Bpt Spoiler function onCast(cid, target) if isPlayer(cid) and isInParty(cid) and isPlayer(target) and isInParty(target) and getPlayerParty(cid) == getPlayerParty(target) then doPlayerSendCancel(cid, "You can not attack your party members") return false else return true end end Cpt Spoiler function onAreaCombat(cid, tileItem, tilePosition, isAggressive) if isPlayer(cid) and isInParty(cid) and isPlayer(target) and isInParty(target) and getPlayerParty(cid) == getPlayerParty(target) then doPlayerSendCancel(cid, "You can not attack your party members") return false else return true end end Dpt Spoiler function onCombat(cid, target) if isPlayer(cid) and isInParty(cid) and isPlayer(target) and isInParty(target) and getPlayerParty(cid) == getPlayerParty(target) then doPlayerSendCancel(cid, "You can not attack your party members") return false else return true end end tags <event type="attack" name="apt" event="script" value="apt.lua"/> <event type="cast" name="bpt" event="script" value="bpt.lua"/> <event type="areacombat" name="cpt" event="script" value="cpt.lua"/> <event type="combat" name="dpt" event="script" value="dpt.lua"/> quem ajeitou p/ mim foi vodkart, os creditos é dele Editado Junho 19, 2018 6 anos por poko360 (veja o histórico de edições)
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.