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

stairs from certain level TFS 0.3.6

Solution
i want if you need to go up stairs you should have certain level
TFS 0.3.6
I dont know if stair is the best choice, maybe u can put a door and limit, but can try with movements, like this bellow. Maybe u need to put this uniqueid on the tile, not stair. Just try:

movements/scripts/leveltile.lua

LUA:
function onStepIn(cid, item, position, fromPosition)
 
level = xxx
if getPlayerLevel(cid) < level then
doTeleportThing(cid, fromPosition, true)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
doPlayerSendCancel(cid,"Only level " .. level .. " can pass here.")
end
return TRUE
end

movements.xml
XML:
<movevent type="StepIn" uniqueid="13550" event="script" value="leveltile.lua"/>

And u need to put this uniqueid in map...
i want if you need to go up stairs you should have certain level
TFS 0.3.6
I dont know if stair is the best choice, maybe u can put a door and limit, but can try with movements, like this bellow. Maybe u need to put this uniqueid on the tile, not stair. Just try:

movements/scripts/leveltile.lua

LUA:
function onStepIn(cid, item, position, fromPosition)
 
level = xxx
if getPlayerLevel(cid) < level then
doTeleportThing(cid, fromPosition, true)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
doPlayerSendCancel(cid,"Only level " .. level .. " can pass here.")
end
return TRUE
end

movements.xml
XML:
<movevent type="StepIn" uniqueid="13550" event="script" value="leveltile.lua"/>

And u need to put this uniqueid in map editor, on stair. And remember to change
LUA:
level = xxx
to your desired level.
 
Last edited:
Solution
oh
I dont know if stair is the best choice, maybe u can put a door and limit, but can try with movements, like this:

movements/scripts

LUA:
function onStepIn(cid, item, position, fromPosition)
 
level = xxx
if getPlayerLevel(cid) < level then
doTeleportThing(cid, fromPosition, true)
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
doPlayerSendCancel(cid,"Only level " .. level .. " can pass here.")
end
return TRUE
end

movements.xml
XML:
<movevent type="StepIn" uniqueid="13550" event="script" value="pisolevel.lua"/>

And u need to put this uniqueid in map editor, on stair. And remember to change
LUA:
level = xxx
to your desired level.
thankyou so much bror <3
but i need this msg (Only level " .. level .. " can pass here.it) in the middle of screen
1657822254554.png
 
oh

thankyou so much bror <3
but i need this msg (Only level " .. level .. " can pass here.it) in the middle of screen
View attachment 69285
this is what
LUA:
doPlayerSendCancel(cid,"Only level " .. level .. " can pass here.")
do.
Post automatically merged:

Oh, understood, u want the message in the middle of screen, change:

LUA:
doPlayerSendCancel(cid,"Only level " .. level .. " can pass here.")
to
LUA:
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Only level " .. level .. " can pass here.")
 
i want if you need to go up stairs you should have certain level
TFS 0.3.6
There must be a ladder, there is no second floor above it
The action id must be written on it from rme
It will be written in the text where this staircase leads xyz
in movments xml \/
LUA:
<movevent event="StepIn" actionid="xxxxx" script="theladder.lua" />
script\/
Code:
function onStepIn(cid, item, pos)
mad = {x=1000,y=1000,z=7}
target = {x=255,y=1436,z=7}
reqlevel = 1000
level = getPlayerLevel(cid)

if level < reqlevel then
doTeleportThing(cid, madness)
doSendMagicEffect(madness, 10)
doPlayerSendTextMessage(cid, 25, "Mad-Rpg: Sorry You Must Be Level 1000 or Higher To Enter This Place")
else
doTeleportThing(cid, target)
doSendMagicEffect(target, 10)
doPlayerSay(cid, "Mad-Rpg: Welcome On Hunting {2} 1000 Place", TALKTYPE_ORANGE_1)
end
end
You can use it to magic forcefield too
 
this is what
LUA:
doPlayerSendCancel(cid,"Only level " .. level .. " can pass here.")
do.
Post automatically merged:

Oh, understood, u want the message in the middle of screen, change:

LUA:
doPlayerSendCancel(cid,"Only level " .. level .. " can pass here.")
to
LUA:
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Only level " .. level .. " can pass here.")
TY BRO WORKED NOW
 
You shouldn't create more than 1 thread asking for the same request, 1 thread is enough.
3. Duplicate Content:
- Use only one thread to post about your problem. Creating more threads or posts about the same problem is seen as spam. If you don't get a reply on your thread, wait 24 hours to post again to show you still need help.
 
You shouldn't create more than 1 thread asking for the same request, 1 thread is enough.

ok sorry i didn't know :)
 
Back
Top