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

Gate Of Experience!!

Amiroslo

Excellent OT User
Joined
Jul 28, 2009
Messages
6,768
Solutions
5
Reaction score
769
How To change Gate of Experience level to level i want to player pass
ex: press on door u get! "You need level 20000...
For high xp
 
Last edited:
change the value in your [config.lua

500 to 5000

maximumDoorLevel = 5000

in actions/scripts add level_door.lua[/B]!
Lua:
function onUse(cid, item, frompos, item2, topos)

local cfg = {
         level = 5000
}      
if getPlayerLevel(cid) <= cfg.level then
            pos = getPlayerPosition(cid)
            if pos.x == topos.x then
               if pos.y < topos.y then
                  pos.y = topos.y + 1
               else
                  pos.y = topos.y - 1
               end
            elseif pos.y == topos.y then
                   if pos.x < topos.x then
                      pos.x = topos.x + 1
                   else
                      pos.x = topos.x - 1
                   end
            else
                doPlayerSendTextMessage(cid,22,"stay in the front.")
            return true
            end
            doTeleportThing(cid,pos)
            doSendMagicEffect(topos,12)
         else
             doPlayerPopupFYI(cid, "You dont have level " .. cfg.level .. " to enter.")
         end
         return true
end

and add this in actions.xml

Lua:
<action actionid="35000" event="script" value="level_door.lua"/>
 
yeah but how if i want lvl 10k?

If you want to make a gate of experience for such level, you need a custom actionID. I mean, no more "1100" or that, because the maximum action ID that can be set is 65535, so the higher level would be 5535 = 5k~ not 10k

You can try by putting a movement action in a floor tile that checks the player level and if the level is lower to 10k, then he will be teleported back, if not, he can pass through there. Just an idea.
 
Nice

If you want to make a gate of experience for such level, you need a custom actionID. I mean, no more "1100" or that, because the maximum action ID that can be set is 65535, so the higher level would be 5535 = 5k~ not 10k

You can try by putting a movement action in a floor tile that checks the player level and if the level is lower to 10k, then he will be teleported back, if not, he can pass through there. Just an idea.

But wich Floor idea is this
and where can i find it?
 
Lua:
local config = {
	level = 20000
}
  function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) > config.level then
            pos = getPlayerPosition(cid)
            if pos.x == topos.x then
               if pos.y < topos.y then
                  pos.y = topos.y + 1
               else
                  pos.y = topos.y - 1
               end
            elseif pos.y == topos.y then
                   if pos.x < topos.x then
                      pos.x = topos.x + 1
                   else
                      pos.x = topos.x - 1
                   end
            else
                doPlayerSendTextMessage(cid,22,"Stand in front of the door.")
            return true
            end
            doTeleportThing(cid,pos)
            doSendMagicEffect(topos,12)
         else
            doPlayerSendTextMessage(cid,22,'You do not have enought level!')
         end
         return true
end
This is action script, not movement.
 
is it for 1 door
bec i have almost 20-30 doors xD
for different lvls
+i didnt get it much

Edit this line
Code:
        level = 20000
And make scripts for every door :huh:
Or just give action ID xxxx
and in actions.xml just add
AID = 1111 = door.lua
AID = 2222 = door.lua
etc.
etc.
 
hey, can i give u the lvls and u make for me them?
then say to me step by step...
like where to put
what should i do
and ill give u rep++++
and if u want u can get a GM in my server xD
all done just this xD and monster
cmooooon
 
For map, Just rightclick on the door (properties then write ur aid there. (aid - Action ID )


Or if your gonna do it ingame just do /attr aid 1000 for lvl 0
/attr aid 1000 for lvl 0
/attr aid 2100 for lvl 2k
/attr aid 3100 for lvl 3k
/attr aid 4100 for lvl 4k
/attr aid 5100 for lvl 5k
/attr aid 6100 for lvl 6k
/attr aid 7100 for lvl 7k
/attr aid 8100 for lvl 8k
/attr aid 9100 for lvl 9k


Hope you understand. :p
 
Door action ID = 2232
In actions.xml add
Code:
 	<action actionid="2232" script="10kdoor.lua" />
10kdoor.lua
Code:
  local config = {
        level = 10000 --How much level they need
}
  function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) > config.level then
            pos = getPlayerPosition(cid)
            if pos.x == topos.x then
               if pos.y < topos.y then
                  pos.y = topos.y + 1
               else
                  pos.y = topos.y - 1
               end
            elseif pos.y == topos.y then
                   if pos.x < topos.x then
                      pos.x = topos.x + 1
                   else
                      pos.x = topos.x - 1
                   end
            else
                doPlayerSendTextMessage(cid,22,"Stand in front of the door.")
            return true
            end
            doTeleportThing(cid,pos)
            doSendMagicEffect(topos,12)
         else
            doPlayerSendTextMessage(cid,22,'You do not have enought level!')
         end
         return true
end
 
Back
Top