i searched for script in forum and i got problem, i use tfs 0.3.6pl1 and When i set nodmgtopartymembers true then PvP at server change to Non-Pvp, not only in party, for all players at server pvp is set to non.
Can anyone fix it?
http://otland.net/f82/no-damage-guildmates-no-damage-party-members-139041/
Can anyone fix it?
http://otland.net/f82/no-damage-guildmates-no-damage-party-members-139041/
/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.