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

converter tfs 1.2

Mateus Robeerto

Excellent OT User
Joined
Jun 5, 2016
Messages
1,335
Solutions
71
Reaction score
691
Location
ლ(ಠ益ಠლ)
Can someone convert to TFS 1.2?

Code:
function onAdvance(cid, skill, oldlevel, newlevel, pos)

if skill == SKILL__LEVEL then
doSendAnimatedText(getCreaturePosition(cid), "Level Up!", 28)
 
addEvent(doSendMagicEffect, 1 * 100, getCreaturePosition(cid), 29)
addEvent(doSendMagicEffect, 1 * 200, getCreaturePosition(cid), 28)
addEvent(doSendMagicEffect, 1 * 300, getCreaturePosition(cid), 29)
addEvent(doSendMagicEffect, 1 * 400, getCreaturePosition(cid), 28)
addEvent(doSendMagicEffect, 1 * 500, getCreaturePosition(cid), 29)
addEvent(doSendMagicEffect, 1 * 600, getCreaturePosition(cid), 28)

doSendMagicEffect(getCreaturePosition(cid), 29)

end
return true
end
 
You can uncomment the sendAnimatedText if your source has it.
Lua:
local effects = {29, 28, 29, 28, 29, 28}

function onAdvance(player, skill, oldLevel, newLevel)
    if skill ~= SKILL_LEVEL then
        return true
    end
    local playerPos = player:getPosition()
    -- Game.sendAnimatedText("Level Up!", playerPos, TEXTCOLOR_LIGHTGREEN)
    player:say("Level Up!", TALKTYPE_MONSTER_SAY)
    for i = 1, #effects do
        addEvent(Position.sendMagicEffect, 1 * (i * 100), playerPos, effects[i])
    end
    playerPos:sendMagicEffect(CONST_ME_FIREWORK_YELLOW)
    return true
end
 
Last edited:
I already put login.lua and nothing happens
You have to register it in login.lua player:registerEvent("yourNameHere")
Post automatically merged:

I already put login.lua and nothing happens
I'm sorry, now it worked.. I noticed that I put it in creativescript.xml... it was wrong.. I had to change it and it worked, thank you very much...

<event type="advance" name="lvlup" event="script" value="efeitoup.lua"/>
for this <event type="advance" name="lvlup" script="efeitoup.lua"/>

it's solved!
 
Back
Top