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

Exp scroll depend on levels

rox666

Active Member
Joined
May 19, 2011
Messages
702
Reaction score
26
Location
why would i tell you
hello, today i gonna release a script "exp scroll" wich giving lvls

Lua:
-- SCRIPT BY KERN +CREDITS OTLAND--
local config = {
funnyEffect = "YES", 
minimumLevel = 50,
maximumLevel = 380, -- for infinite type math.huge
}
local addExp = {
[{config.minimumLevel, 100}] = 2500000,
[{100, 200}] = 5000000,
[{200, 300}] = 7500000,
[{300, 400}] = 10000000,
[{400, 500}] = 15000000,
[{500, 600}] = 20000000,
[{600, 1000}] = 30000000,
[{1000, 2000}] = 45000000,
[{2000, 2500}] = 125000000,
[{2500, 7500}] = 150000000,
[{7500, 10000}] = 200000000,
[{10000, 20000}] = 250000000,
[{20000, config.maximumLevel}] = 300000000
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
    local effect = math.random(CONST_ME_FIREWORK_YELLOW,CONST_ME_FIREWORK_BLUE) 

    if level < config.minimumLevel then
        doPlayerSendCancel(cid, "You need to be at least "..config.minimumLevel.." to use a scroll.")
        return FALSE 
    end
    
    if level >= config.maximumLevel then
        doPlayerSendCancel(cid, "Your level is too high for using a scroll.")
        return FALSE 
    end

    for k, v in pairs(addExp) do 
        if level >= k[1] and level < k[2] then 
            doPlayerAddExp(cid, v)
            doPlayerSendTextMessage(cid, 22, "Experience Scroll Gave You " .. v .." experience!")
            doRemoveItem(item.uid, 1)
            break 
        end 
    end  

        if config.funnyEffect == "YES" then
    local playerexp = addExp
        local pos = getPlayerPosition(cid)
        local positions = {
                {x=pos.x+1,y=pos.y-1,z=pos.z},
                {x=pos.x-1,y=pos.y-1,z=pos.z},
                {x=pos.x+1,y=pos.y+1,z=pos.z},
                {x=pos.x-1,y=pos.y+1,z=pos.z},
                {x=pos.x+1,y=pos.y,z=pos.z},
                {x=pos.x-1,y=pos.y,z=pos.z},
                {x=pos.x,y=pos.y+1,z=pos.z},
                {x=pos.x,y=pos.y-1,z=pos.z}
        }

        for i = 1, table.getn(positions) do
    
            doSendAnimatedText(getThingPos(cid), playerexp, TEXTCOLOR_RED) 
            doSendMagicEffect(positions[i],effect)
        end
    end
    return TRUE 
end


this script i found on otland long ago so u can see max level 300 after level 300 if u try to use the scroll it wont work :D dont forget rep++ if work

XML:
 <action itemid="7722" event="script" value="other/expscroll.lua"/>
CREDITS OTLAND
 
hello, today i gonna release a script "exp scroll" wich giving lvls

Lua:
-- SCRIPT BY KERN +CREDITS OTLAND--
local config = {
funnyEffect = "YES", 
minimumLevel = 50,
maximumLevel = 380, -- for infinite type math.huge
}
local addExp = {
[{config.minimumLevel, 100}] = 2500000,
[{100, 200}] = 5000000,
[{200, 300}] = 7500000,
[{300, 400}] = 10000000,
[{400, 500}] = 15000000,
[{500, 600}] = 20000000,
[{600, 1000}] = 30000000,
[{1000, 2000}] = 45000000,
[{2000, 2500}] = 125000000,
[{2500, 7500}] = 150000000,
[{7500, 10000}] = 200000000,
[{10000, 20000}] = 250000000,
[{20000, config.maximumLevel}] = 300000000
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
    local effect = math.random(CONST_ME_FIREWORK_YELLOW,CONST_ME_FIREWORK_BLUE) 

    if level < config.minimumLevel then
        doPlayerSendCancel(cid, "You need to be at least "..config.minimumLevel.." to use a scroll.")
        return FALSE 
    end
    
    if level >= config.maximumLevel then
        doPlayerSendCancel(cid, "Your level is too high for using a scroll.")
        return FALSE 
    end

    for k, v in pairs(addExp) do 
        if level >= k[1] and level < k[2] then 
            doPlayerAddExp(cid, v)
            doPlayerSendTextMessage(cid, 22, "Experience Scroll Gave You " .. v .." experience!")
            doRemoveItem(item.uid, 1)
            break 
        end 
    end  

        if config.funnyEffect == "YES" then
    local playerexp = addExp
        local pos = getPlayerPosition(cid)
        local positions = {
                {x=pos.x+1,y=pos.y-1,z=pos.z},
                {x=pos.x-1,y=pos.y-1,z=pos.z},
                {x=pos.x+1,y=pos.y+1,z=pos.z},
                {x=pos.x-1,y=pos.y+1,z=pos.z},
                {x=pos.x+1,y=pos.y,z=pos.z},
                {x=pos.x-1,y=pos.y,z=pos.z},
                {x=pos.x,y=pos.y+1,z=pos.z},
                {x=pos.x,y=pos.y-1,z=pos.z}
        }

        for i = 1, table.getn(positions) do
    
            doSendAnimatedText(getThingPos(cid), playerexp, TEXTCOLOR_RED) 
            doSendMagicEffect(positions[i],effect)
        end
    end
    return TRUE 
end[code=lua]


this script i found on otland long ago so u can see max level 300 after level 300 if u try to use the scroll it wont work :D dont forget rep++ if work

[code=xml] <action itemid="7722" event="script" value="other/expscroll.lua"/>  [code=xml] CREDITS OTLAND[/QUOTE]
Please put right values.
[code=lua]-- SCRIPT BY KERN +CREDITS OTLAND--
local config = {
funnyEffect = "YES", 
minimumLevel = 50,
maximumLevel = 380, -- for infinite type math.huge
}
local addExp = {
[{config.minimumLevel, 100}] = 2500000,
[{100, 200}] = 5000000,
[{200, 300}] = 7500000,
[{300, 400}] = 10000000,
[{400, 500}] = 15000000,
[{500, 600}] = 20000000,
[{600, 1000}] = 30000000,
[{1000, 2000}] = 45000000,
[{2000, 2500}] = 125000000,
[{2500, 7500}] = 150000000,
[{7500, 10000}] = 200000000,
[{10000, 20000}] = 250000000,
[{20000, config.maximumLevel}] = 300000000
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
    local effect = math.random(CONST_ME_FIREWORK_YELLOW,CONST_ME_FIREWORK_BLUE) 

    if level < config.minimumLevel then
        doPlayerSendCancel(cid, "You need to be at least "..config.minimumLevel.." to use a scroll.")
        return FALSE 
    end
    
    if level >= config.maximumLevel then
        doPlayerSendCancel(cid, "Your level is too high for using a scroll.")
        return FALSE 
    end

    for k, v in pairs(addExp) do 
        if level >= k[1] and level < k[2] then 
            doPlayerAddExp(cid, v)
            doPlayerSendTextMessage(cid, 22, "Experience Scroll Gave You " .. v .." experience!")
            doRemoveItem(item.uid, 1)
            break 
        end 
    end  

        if config.funnyEffect == "YES" then
    local playerexp = addExp
        local pos = getPlayerPosition(cid)
        local positions = {
                {x=pos.x+1,y=pos.y-1,z=pos.z},
                {x=pos.x-1,y=pos.y-1,z=pos.z},
                {x=pos.x+1,y=pos.y+1,z=pos.z},
                {x=pos.x-1,y=pos.y+1,z=pos.z},
                {x=pos.x+1,y=pos.y,z=pos.z},
                {x=pos.x-1,y=pos.y,z=pos.z},
                {x=pos.x,y=pos.y+1,z=pos.z},
                {x=pos.x,y=pos.y-1,z=pos.z}
        }

        for i = 1, table.getn(positions) do
    
            doSendAnimatedText(getThingPos(cid), playerexp, TEXTCOLOR_RED) 
            doSendMagicEffect(positions[i],effect)
        end
    end
    return TRUE 
end
XML:
 <action itemid="7722" event="script" value="other/expscroll.lua"/>
 
Last edited:
Only looks very unnecessery use stages instead
 
Back
Top