• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

lvl 500 = animation

Coca Cola

New Member
Joined
Apr 10, 2010
Messages
164
Reaction score
0
can somebody make a script that when player get level 500 he receives an animation ? like when you make !x 29 and show a effect, that effect will be around the player

ty,cya
 
here, add to your creaturescripts/scripts/advance.lua
before last 'return true'

LUA:
    if skill == SKILL__LEVEL and newLevel == 500 then
        local p = getPlayerPosition(cid)
        local positions = { 
            [1] = { pos= {x=p.x+1,y=p.y,z=p.z}, delay = 100, delay2 = 900},
            [2] = { pos= {x=p.x+1,y=p.y+1,z=p.z}, delay = 200, delay2 = 980},
            [3] = { pos= {x=p.x,y=p.y+1,z=p.z}, delay = 300, delay2 = 1060},
            [4] = { pos= {x=p.x-1,y=p.y+1,z=p.z}, delay = 400, delay2 = 1140},
            [5] = { pos= {x=p.x-1,y=p.y,z=p.z}, delay = 500, delay2 = 1220},
            [6] = { pos= {x=p.x-1,y=p.y-1,z=p.z}, delay = 600, delay2 = 1300},
            [7] = { pos= {x=p.x,y=p.y-1,z=p.z}, delay = 700, delay2 = 1380},
            [8] = { pos= {x=p.x+1,y=p.y-1,z=p.z}, delay = 800, delay2 = 1460} } 
        
        for i = 1, 8 do
            addEvent(doSendDistanceShoot, positions[i].delay, positions[i].pos, p, 37)
            addEvent(doSendDistanceShoot, positions[i].delay2, positions[i].pos, p, 37)
        end 
        addEvent(doSendMagicEffect, 900, p, 49)
        doSendAnimatedText(p, '+LEVEL['..newlevel..']', math.random(255))
        doPlayerSave(cid, true)
    end
 
take a look

Code:
local config = {
	savePlayersOnAdvance = true
}

function onAdvance(cid, skill, oldLevel, newLevel)
	if(config.savePlayersOnAdvance) then
		doPlayerSave(cid, true)
	end
    if skill == SKILL__LEVEL and newLevel ==  500 then
        local p = getPlayerPosition(cid)
        local positions = {
            [1] = { pos= {x=p.x+1,y=p.y,z=p.z}, delay = 100, delay2 = 900},
            [2] = { pos= {x=p.x+1,y=p.y+1,z=p.z}, delay = 200, delay2 = 980},
            [3] = { pos= {x=p.x,y=p.y+1,z=p.z}, delay = 300, delay2 = 1060},
            [4] = { pos= {x=p.x-1,y=p.y+1,z=p.z}, delay = 400, delay2 = 1140},
            [5] = { pos= {x=p.x-1,y=p.y,z=p.z}, delay = 500, delay2 = 1220},
            [6] = { pos= {x=p.x-1,y=p.y-1,z=p.z}, delay = 600, delay2 = 1300},
            [7] = { pos= {x=p.x,y=p.y-1,z=p.z}, delay = 700, delay2 = 1380},
            [8] = { pos= {x=p.x+1,y=p.y-1,z=p.z}, delay = 800, delay2 = 1460} }
       
        for i = 1, 8 do
            addEvent(doSendDistanceShoot, positions[i].delay, positions[i].pos, p, 37)
            addEvent(doSendDistanceShoot, positions[i].delay2, positions[i].pos, p, 37)
        end
        addEvent(doSendMagicEffect, 900, p, 49)
        doSendAnimatedText(p, '+LEVEL['..newlevel..']', math.random(255))
        doPlayerSave(cid, true)
    end

	return true
end
 
you restarted the ot/ reload the creaturescripts? and advanced a char to lvl 500 to test? 'cause it ought to work
 
cybershot
your script works but the animation i want is any lvl 500+ gets an "aurea" around the player. like player = x and y the effects

yyyyyyy
yyyxyyy
yyyyyyy
 
Back
Top