• Sign up for September Mapping Competition! The prize includes Otland Premium time.
  • 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!

[Creature Script] Level Difference Protection

FeragonOnline

Im Bored!
Joined
Jan 19, 2010
Messages
98
Best answers
0
Reaction score
1
Location
USA
Hello, i need a good script to protec the newbies in my server
because the rest are P.A.

Thanks
 
Last edited:

Fallen

Freelancer
Joined
Aug 21, 2009
Messages
3,713
Best answers
0
Reaction score
246
Location
Egypt
like this{?}
Code:
function onCombat(cid, target)
	if isPlayer(cid) and isPlayer(target) and getPlayerLevel(cid) >= getPlayerLevel(target) then return false end
	return true
end
 

Fallen

Freelancer
Joined
Aug 21, 2009
Messages
3,713
Best answers
0
Reaction score
246
Location
Egypt
maybe this then;
Code:
function onPrepareDeath(cid, deathList)
	if isCreature(cid) and isPlayer(deathList[1]) then
		if getPlayerLevel(deathList[1]) <= 20 then
			doTeleportThing(deathList[1], getTownTemplePosition(getPlayerTown(deathList[1])))
			doCreatureAddHealth(deathList[1], getCreatureMaxHealth(deathList[1]), true)
			doCreatureAddMana(deathList[1], getCreatureMaxMana(deathList[1]), true)
			doRemoveCondition(deathList[1], CONDITION_INFIGHT)
		end
	end
	return false
end
 
Top