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

Windows How i can make maximum level on pvpenfo???

Gothric

New Member
Joined
Feb 6, 2010
Messages
264
Reaction score
1
Already I have been using this script
function onLogin(cid)
local rebalanceStor = getPlayerStorageValue(cid, 37457)

if rebalanceStor == -1 and getPlayerLevel(cid) >= 150 then
doPlayerAddExperience(cid, (getExperienceForLevel(150) - getPlayerExperience(cid)))
setPlayerStorageValue(cid, 37457, 1)

elseif rebalanceStor == -1 and getPlayerLevel(cid) < 80 then
doPlayerAddExperience(cid, (getExperienceForLevel(80) - getPlayerExperience(cid)))
setPlayerStorageValue(cid, 37457, 1)

else setPlayerStorageValue(cid, 37457, 1)

end
return TRUE
end


it really work but i must change storage value every time i restart my server becouse it doesnt work :/

maybe u have another script to set max lvl?? its pvpenfo so i must got it.

Maybe i can set it in config.lua??

Help me please.

_______________________________________________
Sorry for my <english> mistakes. I am from Poland <3
 
it doesnt work :D
but i think that i know what is wrong..

this script change max lvl only after login and only one time :s

so i set it and i log in and it work

but i play and i can get more exp than 150 lvl :S

so propably i have wrong scrpt :s

please give me another one :// or tell me how i can fix it in config lua maybe
 
Code:
function onLogin(cid)
	if getPlayerLevel(cid) >= 150 then
		doPlayerAddExperience(cid, (getExperienceForLevel(150) - getPlayerExperience(cid)))
	elseif getPlayerLevel(cid) < 80 then
		doPlayerAddExperience(cid, (getExperienceForLevel(80) - getPlayerExperience(cid)))
	end
	return true
end
Other than that, you could try using function onAdvance(...) + return false
 
Cykotitan it works only when player log in :p but if he go fight lvl grow up :/
but if he relog he get 150 its better than my first script

thanks but i am waiting for another script which will fix max 150 lvl
 
Code:
function onAdvance(cid, skill, oldlevel, newlevel)
	if skill == SKILL__LEVEL and newlevel > 150 then
		return false
	end
return true
end
I guess that should work
 
maxlevel.lua:
Code:
function onAdvance(cid)
	if getPlayerLevel(cid) >= 150 then
		doPlayerAddExperience(cid, (getExperienceForLevel(150) - getPlayerExperience(cid)))
	end
	return true
end
minlevel.lua:
Code:
function onLogin(cid)
	if getPlayerLevel(cid) < 80 then
		doPlayerAddExperience(cid, (getExperienceForLevel(80) - getPlayerExperience(cid)))
	end
	return true
end
add to creaturescripts.xml:
Code:
<event type="advance" name="maxlevel" event="script" value="maxlevel.lua"/>
<event type="login" name="minlevel" event="script" value="minlevel.lua"/>

and add this to scripts/login.lua:
Code:
	registerCreatureEvent(cid, "minlvl")
	registerCreatureEvent(cid, "maxlvl")

If I'm not to drunk this should do the trick.
 
@coiler
[21/03/2010 22:25:03] [Error - LuaScriptInterface::loadFile] cannot open data/creaturescripts/scripts/maxlevel.lua: No such file or directory
[21/03/2010 22:25:03] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/maxlevel.lua)
[21/03/2010 22:25:03] cannot open data/creaturescripts/scripts/maxlevel.lua: No such file or directory



22:25 You advanced from Level 150 to Level 165.

:/ doesnt work
 
ops wait


y y

doesnt work :///

22:32 You advanced from Level 150 to Level 165.


_______________
@edit

i did it :D
coiler thank you but u make really little mistake

i wrote
registerCreatureEvent(cid, "maxlvl")

not maxlvl but maxlevel :D and it work thank you
 
Last edited:
lool people there is a bug :S

22:54 You advanced from Level 150 to Level 152.
22:54 You were downgraded from Level 152 to Level 150.

players stay at level 150 but hp and mana grow up ...

how i can change it? i want that mana will not change
 
Try this one instead..
Code:
function onAdvance(cid, skill, oldlevel, newlevel)
	if skill == SKILL__LEVEL and newlevel > 150 then
		return false
	end
return true
end
Code:
<event type="advance" name="maxlvl" event="script" value="maxlvl.lua"/>
 
Back
Top