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

Enfo script need help please.

piter134

New Member
Joined
Feb 8, 2010
Messages
6
Reaction score
0
I need 2 scripts for enfo:

1. When you start playing on enfo you have 120 lv when you get better lv then 120 and you will die you are downgrounded to 120lv
but you dont lose your mlv and skills.

2.All items you have on you even this from item shop you dont lose it when you relog or die you still have it on your self.

PLZ tell me where should i put this scripts into.
 
I did it but there is 2 bugs when you kill few people and then you died you lose only 1 lv but i want that if you die you are downgrounded to 120 and second bug its that if you get full set and you die you lose it but corpse are empty i want that if you die you still have it.
 
Data > Creature scripts > Scripts

levellock.lua

LUA:
function onLogin(cid)

	if getPlayerLevel(cid) > 120 then
	doPlayerAddExperience(cid, (getExperienceForLevel(120) - getPlayerExperience(cid)))
end
return TRUE
end

LUA:
<event type="login" name="Lowlevellock" event="script" value="levellock.lua"/>
 
ooo sry i allready have this script in my TFS but it dont work. I only had 120lv but when i get better lv then 120 when i die i lose only 1 lv
 
what you need is onPrepareDeath not onLogin, here try this, it's the same one
that colum69 did, but it is made for onPrepareDeath:
Code:
function onPrepareDeath(cid)
	if getPlayerLevel(cid) > 120 then
        doPlayerAddExperience(cid, (getExperienceForLevel(120) - getPlayerExperience(cid)))
	end
return true
end
 
Back
Top