Postado Julho 29, 2013 11 anos Este é um post popular. Nome do Sistema ou Script: No damage in Parties.Nome do Autor: GriloServidor Testado e/ou Versão do Tibia: 8.6Descrição e/ou Informações Adicionais: -- Scripts e Como Instalar: 1. Abra o arquivo creaturescripts.xml, localizado em data/creaturescripts e adicione as seguintes tags abaixo: <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"/> 2. Abra o arquivo login.lua, localizado em data/creaturescripts/scripts. Adicione as seguintes funções abaixo antes de return true. registerCreatureEvent(cid, "Apt") registerCreatureEvent(cid, "Bpt") registerCreatureEvent(cid, "Cpt") registerCreatureEvent(cid, "Dpt") 3. Agora crie quatro arquivos de nomes Apt, Bpt, Cpt, Dpt e de extensões LUA. Cole os conteúdos, respectivamente, em cada um deles: 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 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 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 function onCombat(cid, target) if isPlayer(cid) and isInParty(cid) and getPlayerParty(cid) == getPlayerParty(target) then return false else return true end end Editado Julho 29, 2013 11 anos por KekezitoLHP (veja o histórico de edições)
Postado Julho 29, 2013 11 anos caraca não fazia ideia que dava pra fazer isso, obrigado por trazer esse conteúdo, com certeza vou usar.
Postado Julho 20, 2014 10 anos Bom mesmo e eu estava querendo um faz tempo que não desse alguns errinhos chatos como outros membros de outras partys nao poderem atacar uma party diferente. Esse ai tá perfeito, só tenque tirar os erros de log que da no servidor dai fica ótimo!
Postado Julho 23, 2014 10 anos Só precisa tirar os erros que dá na print né. Player not fond... é possível?
Postado Julho 26, 2014 10 anos z Editado Junho 15, 2015 9 anos por Danves (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.