<event type="advance" name="advance" script="advance.lua"/>
<event type="advance" name="advance" event="script" value="advance.lua"/>
It work for me in 0.3.3 lol..
You guys just have to change in creaturescript.xml
Code:<event type="advance" name="advance" script="advance.lua"/>
to
Code:<event type="advance" name="advance" event="script" value="advance.lua"/>
works fine on TFS0.31 + 0.32. Just read the thread and figure it out. I did.
edit: actually, here.
Login.lua (in creature scripts)
PHP:function onLogin(cid) local loss = getConfigValue('deathLostPercent') if(loss ~= nil) then for i = PLAYERLOSS_EXPERIENCE, PLAYERLOSS_ITEMS do doPlayerSetLossPercent(cid, i, getConfigValue('deathLostPercent')) end end registerCreatureEvent(cid, "GuildMotd") registerCreatureEvent(cid, "PlayerDeath") registerCreatureEvent(cid, "advance") return TRUE end
advance.lua (in creaturescripts)
PHP:--Script made by Pitufo/Haifurer! local config = { [0] = { "Fist skill Up", 30}, -- 30 = variable[2] -- Animation effect [1] = { "Club skill Up", 30}, -- 30 = variable[2] -- Animation effect [2] = { "Sword skill Up", 30}, -- 30 = variable[2] -- Animation effect [3] = { "Axe skill Up", 30}, -- 30 = variable[2] -- Animation effect [4] = { "Distance Up", 30}, -- 30 = variable[2] -- Animation effect [5] = { "Shielding 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 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 type, variable in pairs(config) do if skill == type then doCreatureSay(cid, ""..variable[1].."", TALKTYPE_ORANGE_1) for i = 1, table.maxn(positions) do doSendMagicEffect(positions[i],variable[2]) end end end return TRUE end
creaturescripts.xml (in creaturescripts, obviously.)
PHP:<event type="advance" name="advance" script="advance.lua"/>
Enjoy. Hardly, very slightly edited to make it work for you kids. I take no credit.
But rep is nice too.
function onAdvance(cid, skill, oldLevel, newLevel)
doCreatureSay(cid, SKILLS[skill]:gsub("%a", string.upper, 1) .. " UP [" .. newLevel .. "]", TALKTYPE_ORANGE_1)
return TRUE
end
Are you a fucking nazi??Code:--Script made by Pitufo/Haifurer!