ghettobird
LUA newbie
Hello otlanders, it's me again, this time i bring you a script useful when your server has a lot of players,
QUESTION:so how does this work?
ANSWER: if your level is 50 or less (you can edit the levels of course) and i click on a door with x uniqueid (u set the unique id through rme) i will get teleported to x position, if i'm higher than level 50 (or the level you put in the script) i will get a msg saying "you cannot enter because you are higher than level 50.
Ok so let's get to work!
actions/scripts
I hope you like it, post errors
eace:
thanks to ninja for reminding me to close brackets ^_^
QUESTION:so how does this work?
ANSWER: if your level is 50 or less (you can edit the levels of course) and i click on a door with x uniqueid (u set the unique id through rme) i will get teleported to x position, if i'm higher than level 50 (or the level you put in the script) i will get a msg saying "you cannot enter because you are higher than level 50.
Ok so let's get to work!
actions/scripts
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if (getPlayerLevel(cid) <= 50) then
doTeleportThing(cid, {x=1000,y=1000,z=7})
doCreatureSay(cid, "LOW LEVEL TELEPORT", TALKTYPE_RED)
else
doPlayerSendCancel(cid, "You are higher than level 50.")
end
return true
end
I hope you like it, post errors
thanks to ninja for reminding me to close brackets ^_^
Last edited: