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

effect advance level

szajker123

New Member
Joined
May 12, 2012
Messages
195
Reaction score
0
Hi, I need a script because I played once on such a server, and it was so that when you got promoted to a higher level or the skills it was the result;/ and in need of such a script or has anyone might know where to get, where the paste, and what and how? TFS 0.3.7 / client 8.54
I tried to do something about http://otland.net/f16/lvlup-nice-effects-125056/ but does not work, and several others tried, but neither one did not work
I'm sorry but I use a translator and can be what I wrote not to understand
Add Rep points for help me
 
creaturescripts/advance.lua

Code:
local config = {
    [0] = { "Fist skill UP", 31}, 
    [1] = { "Club skill UP", 31}, 
    [2] = { "Sword skill UP", 31}, 
    [3] = { "Axe skill UP", 31}, 
    [4] = { "Distance skill UP", 31}, 
    [5] = { "Shield skill UP", 31}, 
    [6] = { "Fishing skill UP", 31},
    [7] = { "Magic level UP", 31}, 
    [8] = { "Level UP", 30} 
}


function onAdvance(cid, skill, oldlevel, newlevel)

local pos = getPlayerPosition(cid)
local effectPositions = {
{x = pos.x, y = pos.y - 3, z = pos.z},
{x = pos.x, y = pos.y + 3, z = pos.z},
{x = pos.x - 3, y = pos.y, z = pos.z},
{x = pos.x + 3, y = pos.y, z = pos.z},
{x = pos.x - 2, y = pos.y - 2, z = pos.z},
{x = pos.x + 2, y = pos.y - 2, z = pos.z},
{x = pos.x + 2, y = pos.y + 2, z = pos.z},
{x = pos.x - 2, y = pos.y + 2, z = pos.z}
}

        
    for type, variable in pairs(config) do
        if skill == type then
            doCreatureSay(cid, ""..variable[1].." ["..newlevel.."]", TALKTYPE_ORANGE_1)
	for _, ePos in ipairs(effectPositions) do
		doSendDistanceShoot(pos, ePos, CONST_ANI_SMALLHOLY)
		doSendMagicEffect(ePos, CONST_ME_HOLYAREA)
            end

            
        end
    end    
return TRUE
end

creaturescripts.xml

Code:
<event type="advance" name="advance" script="advance.lua"/>

creaturescripts/login.lua:

Code:
registerCreatureEvent(cid, "advance")

Good Luck.
 
You don't created correctly the advance.lua, make shure that is in creaturescripts/scripts and is called "advance". in lua format.
 
Back
Top