• 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!

(Need Script) No attack with certain level of diference

armitxe

New Member
Joined
Feb 15, 2009
Messages
65
Reaction score
1
Hello everyone...

I'm hosting a WAR OT, but i got the problem that the players level up very faster by one or other way... i tried changing the experiece, etc... but still the problem...

So i want to know if you guys please can help me with this script:

I want a script that makes that when there's a certain diference in the level of the players they can't attack each other...

For example: The script works with 400 level

So one level 100 can't attack a level 500 and a level 500 can't ttack a player of level 100...

If you guys can help me with that i really will be grateful!

Thanks!

Greetings!
 
Thank you very much, both!

But guys, remember.. i'm noob :/

So the script would be like this?
Code:
function onCombat(cid, target)
	if isPlayer(target) then
			    return isPlayer(target) and (math.abs((getPlayerLevel(cid) - getPlayerLevel(target))) < 400) or true
			end
		else
			return false, doPlayerSendCancel(cid, "You cannot attack this player.")
		end
	end
	return true
end
 
Back
Top