• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

CreatureEvent Players cannot have a lower level than level 8

ghettobird

LUA newbie
Joined
Aug 17, 2013
Messages
679
Reaction score
132
Location
OTland
Hello otlanders, i made a new script and i thought maybe people would like it, so well let's start

creaturescripts/scripts
Lua:
 function onLogin(cid)

	if getPlayerLevel(cid) < 8 then
	doPlayerAddExperience(cid, (getExperienceForLevel(8) - getPlayerExperience(cid)))
end
return TRUE
end

now you have to register it to login.lua, i think your capable of doing that without me spoonfeeding it to you, anyways i hope you like it ! :peace:
 
Approved

Maybe servers wars use this :)

Lua:
 function onLogin(cid)
 
	if getPlayerLevel(cid) < 100 then
	doPlayerAddExperience(cid, (getExperienceForLevel(100) - getPlayerExperience(cid)))
end
return TRUE
end
 
I named the script in creaturescript/scripts level8.lua then did this in login.lua
Lua:
	registerCreatureEvent(cid, "level8")
Does not work for me on 0.3.7 Crying damson 8.60.. Unless i did that wrong xD lol Help please, im trying to learn! xD
 
I named the script in creaturescript/scripts level8.lua then did this in login.lua
Lua:
	registerCreatureEvent(cid, "level8")
Does not work for me on 0.3.7 Crying damson 8.60.. Unless i did that wrong xD lol Help please, im trying to learn! xD

in creaturescripts.xml

Lua:
<event type="login" name="level8" event="script" value="level8.lua"/>

and just post what u did in login.lua ^_^
 
fyi guys, login and logout creaturescripts do not need to be registered
 
Back
Top