• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Requesting function for not attacking players in same party

I am trying to make playing and questing with others more important on my server, in order to do that i need to find a way to have no pvp when players are in party.
i think it can be done, especially when i saw thishttp://otland.net/f163/dont-attack-non-skulled-players-36025/

thanks in advance

Well as Epic stated you could do it by using green skulls as a reference, try chris's script (link you posted) but change:

Lua:
function onPlayerAttack(cid, target)
	if getCreatureSkullType(cid) == 4 and getCreatureSkullType(target) == 0 then
		doPlayerSendCancel(cid, "You cannot attack non skulled players.")
		return FALSE
	end
	return TRUE
end

To:

Lua:
function onPlayerAttack(cid, target)
	if getCreatureSkullType(cid) == 2 and getCreatureSkullType(target) == 2 then
		doPlayerSendCancel(cid, "You cannot attack players from your party.")
		return FALSE
	end
	return TRUE
end

(2 is green skull)

At least the players shouldnt be able to "attack" the other team members, but not sure about the spells though. That's probably done playing around with onAttack.

Anyways if nothing works, here's an old code that requires editing sources but its supposed to work for spells and everything, but Im not sure how outdated it might be:

http://otland.net/f35/8-31-party-attack-protection-23142/

Good luck.
 
Back
Top