[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
247
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
247
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