podia ter um comando pra desliga e ligar ....
- Fórum
- OTServ
- Recursos
- Scripting
- Globalevents e Spells
- Não atacar guild
TA
creatureevent
Não atacar guild
Por TaaG, 15 de nov. de 2015 em Globalevents e Spells
guild
attack
players
system
sistema
2
1.9k
Por TaaG, 15 de nov. de 2015 em Globalevents e Spells
info
Grupo: Artesão
Registrado: 19/11/12
Posts: 113
Reputação: +63
O script consiste em não deixar que players da mesma guild se ataquem (se matem).
creaturescripts.xml (data/creaturescripts):
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