Ir para conteúdo

Featured Replies

Postado

Olá Camaradagem do TK. 

Venho disponibilizar um sistema muito útil para servidores fiéis ao Tibia(CipSoft).

Ele consiste em não atacar membros da party, ótimo para quest, pvp e hunt's.

Não posso afirmar se funcionará em todos os servidores, testado somente em 10.1.

 

config.lua

noDamageToPartyMembers = true

data/creaturescripts/creaturescripts.xml

<event type="combat" name="partyAndGuildProtection" event="script" value="partyAndGuildProtection.lua"/>

data/creaturescripts/scripts/partyAndGuildProtection.lua

function onCombat(cid, target)
if(isInParty(target)) then
if(getConfigValue("noDamageToPartyMembers")) then
if(isInParty(cid)) then
return false
end
end
end
return true
end

 
data/creaturescripts/scripts/login.lua
registerCreatureEvent(cid, "partyAndGuildProtection")
 
Créditos ao Global 10.1 por conter partyAndGuildProtection.lua, porém contia bugs e não atacava nem player.
Créditos a mim por fixar esse problema e disponibilizar.
 
partyAndGuildProtection.lua bugado do servidor.

function onCombat(cid, target)
if(isPlayer(cid) and isPlayer(target)) then
if(getConfigValue("noDamageToGuildMates")) then
if(getPlayerGuildId(cid) == getPlayerGuildId(target)) then
return false
end
end
if(getConfigValue("noDamageToPartyMembers")) then
if(getPlayerParty(cid) == getPlayerParty(target)) then
return false
end
end
end
 
return true
end

Editado por shumagora (veja o histórico de edições)

  • Respostas 11
  • Visualizações 7.9k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • nao testei, mas se alguem quiser testar, tente assim function onCombat(cid, target) if isPlayer(target) == TRUE then if ((isInParty(target) and isInParty(cid)) and (getPlayerParty(cid) == getPlayer

  • 2 weeks later...
Postado

Cara até funcionou adicionei em meu server de WAR mais tem um pequeno bug,as vezes os players não conseguem se atacar mesmo não estando em PT buga tudo,alguns podem se atacar alguns não etc e tal..

Espero um Fixed desse script pois to precisando =D

Postado
  • Autor

não é exatamente um bug, mas não era pra fica assim. 

ex: voce tá em uma party com alguém e atacam alguem que não tem party com ninguém, da pra matar normalmente.

porém se seu time ta de party, e os outro mlk ta em party no outro time, não da pra ataca ngm que estiver na party ambas as partes.

 

até agora não consegui resolver,

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.6k

Informação Importante

Confirmação de Termo