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

ml advance

Quickshot

Member
Joined
Nov 8, 2008
Messages
595
Reaction score
8
hey... can someone make me a creaturescript that when you level up in ml you get a msg and a cool effect im using v0.2.9(mystic spirit) of course you get rep ++ thanks in advance
 
Lua:
function onAdvance(cid, skill, oldlevel, newlevel)
   if skill == 7 then
      doSendAnimatedText(getPlayerPosition(cid), "MLVL +1 !", 200)
      doSendMagicEffect(getPlayerPosition(cid), 28)
   end
return true
end
 
add in login.lua
Lua:
registerCreatureEvent(cid, "mlvladvance")

and in creaturescripts.xml
XML:
<event type="advance" name="mlvladvance" event="script" value="mlvladvance.lua"/>
 
#up kkk.

HERE MAN --- TESTED WITH 0.2.9, IF DON'T WORK, YOU'RE DO SOMETHING WRONG. ;)

XML:
	<event type="advance" name="Advanced" script="advanced.lua"/>
Lua:
--Script made by Pitufo/Haifurer/ edited by S¥Ơ'яan..***
local config = {
    [0] = { "Fist'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [1] = { "Club'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [2] = { "Sword'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [3] = { "Axe'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [4] = { "Distance'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [5] = { "Shield'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [6] = { "Fishing'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [7] = { "Magic'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [8] = { "Level'UP!", 30} -- 30 = variable[2]  -- Animation effect
}
function onAdvance(cid, skill, oldlevel, newlevel)
local p = getPlayerPosition(cid)

    addEvent(doSendMagicEffect, 100, p, 27)
    addEvent(doSendMagicEffect, 500, p, 30)
    addEvent(doSendMagicEffect, 900, p, 28)
	addEvent(doSendMagicEffect, 1300, p, 29)
	addEvent(doSendMagicEffect, 1600, p, 27)
        
    for type, variable in pairs(config) do
        if skill == type then
    doCreatureSay(cid, ""..variable[1].." ["..newlevel.."]", TALKTYPE_ORANGE_1)
    end            
        end
return TRUE
end

complete onAdvance thing.
 
this is what i have and it isnt working for ml

creaturescripts.xml
XML:
<event type="advance" name="Advanced" script="advance.lua"/>
login.lua
Code:
  registerCreatureEvent(cid, "advance")
advance.lua
Lua:
local config = {
    [0] = { "Fist'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [1] = { "Club'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [2] = { "Sword'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [3] = { "Axe'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [4] = { "Distance'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [5] = { "Shield'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [6] = { "Fishing'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [7] = { "Magic'UP!", 30}, -- 30 = variable[2]  -- Animation effect
    [8] = { "Level'UP!", 30} -- 30 = variable[2]  -- Animation effect
}
function onAdvance(cid, skill, oldlevel, newlevel)
local p = getPlayerPosition(cid)
 
    addEvent(doSendMagicEffect, 100, p, 27)
    addEvent(doSendMagicEffect, 500, p, 30)
    addEvent(doSendMagicEffect, 900, p, 28)
	addEvent(doSendMagicEffect, 1300, p, 29)
	addEvent(doSendMagicEffect, 1600, p, 27)
 
    for type, variable in pairs(config) do
        if skill == type then
    doCreatureSay(cid, ""..variable[1].." ["..newlevel.."]", TALKTYPE_ORANGE_1)
    end            
        end
return TRUE
end

everything is working except ml. and Qbee yours isnt working either :/
 
Last edited:
Not the script's fault, it's the developers' fault. If you want it fixed you have to compile it or wait for the next release.

player.cpp, under this:
[cpp] sendTextMessage(MSG_EVENT_ADVANCE, MaglvMsg);[/cpp]
Add:
[cpp] g_creatureEvents->playerAdvance(this, MAGLEVEL, magLevel-1, magLevel);[/cpp]
 
Back
Top