Ir para conteúdo

TaaG

Posts Recomendados

O script consiste em não deixar que players da mesma guild se ataquem (se matem).

 

creaturescripts.xml (data/creaturescripts):

<event type="attack" name="attackguild" script="attackguild.lua"/>

attackguild.lua (data/creaturescripts/scripts):

 

 

 

function onAttack(cid, target)

if isPlayer(target) and getPlayerGuildId(cid) == getPlayerGuildId(target) then
local storageId = 101

if getPlayerStorageValue(cid, storageId) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You choose not to attack and not to be attacked by guild members.")
doCreatureSetSkullType(cid, 0)
return false
elseif getPlayerStorageValue(target, storageId) == 1 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your target choose to not to attack and not to be attacked by guild members.")
doCreatureSetSkullType(cid, 0)
return false
end
end

return true
end

 

 

 

 

 

Link para o comentário
Compartilhar em outros sites

  • 4 months later...
×
×
  • Criar Novo...