• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

PVP-Enforced Scripts FIX

pawlacz741

New Member
Joined
Jan 23, 2009
Messages
90
Reaction score
2
Hello

Can somebody fix mine scripts?

First script It's lvl blocking its working but when i get 370 lvl i get blocked and I'm don't get more exp It's ok. But when i died and get 365 lvl I'm don't getting exp.

Can somebody fix mine script to only working when ppl have 370 lvl?

function onAdvance(cid, skill, oldLevel, newLevel)

if(newLevel > 370 and skill == SKILL_LEVEL) then
return false
end
return true
end

Seond is lvl goingdown allways to 150 lvl when you die.


function onDeath(cid, corpse, deathList)

if(isPlayer(cid) == false) then
return true
end

if(getPlayerExperience(cid) > 54042300) then
doPlayerAddExperience(cid, -(getPlayerExperience(cid)-54042300))
elseif(getPlayerExperience(cid) < 54042300) then
doPlayerAddExperience(cid, (54042300-getPlayerExperience(cid)))
end
return true
end


Fix please
 
#2nd
Code:
function onDeath(cid, corpse, deathList)
	if getPlayerExperience(cid) ~= getExperienceForLevel(150) then
		doPlayerAddExperience(cid, getExperienceForLevel(150) - getPlayerExperience(cid))
	end
	return true
end
 
Thx for help but its not working
Look I'm have that

On login.lua
registerCreatureEvent(cid, "Spada")
On spada.lua <folder script>
function onDeath(cid, corpse, deathList)
if getPlayerExperience(cid) ~= getExperienceForLevel(150) then
doPlayerAddExperience(cid, getExperienceForLevel(150) - getPlayerExperience(cid))
end
return true
end

creaturescripts.xml
<event type="death" name="spada" event="script" value="spada.lua"/>
And now when I'm die script do nothing 0 errors on console and I'm don't lost all lvl
 
~~Refrest~~

Nobody know how to fix it?

@Edit

or can somebody make this script?

When we die we lost lvl to 150.
 
Last edited:
Back
Top