Hello.. as usual i need help with script
i found this script but its only working all the time i want it with commands so if not use command they will be dmg..
like you can see its not my script just want it re edited..
//Volitar
i found this script but its only working all the time i want it with commands so if not use command they will be dmg..
/data/config.lua
Lua:noDamageToGuildMates = true -- if true then no damage, if false then damage noDamageToPartyMembers = true -- if true then no damage, if false then damage
/creaturescripts/scripts/partyAndGuildProtection.lua
Lua: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
/creaturescripts/creaturescripts.xml
XML:<event type="combat" name="partyAndGuildProtection" event="script" value="partyAndGuildProtection.lua"/>
/creaturescripts/scripts/login.lua
Lua:registerCreatureEvent(cid, "partyAndGuildProtection")
Simply, when config values are set to true then players with the same guild or in the same party can't deal damage to eachother.
like you can see its not my script just want it re edited..
//Volitar