Ir para conteúdo

Featured Replies

Postado

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 por mateusmoretti (veja o histórico de edições)

  • Respostas 5
  • Visualizações 1.5k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • @NathanAmaro   Apt   Bpt   Cpt   Dpt   tags     <event type="attack" name="apt" event="script" value="apt.lua"/>     <event ty

  • 1 year later...
Postado

@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 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.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo