andypsylon
be be
on request:
http://otland.net/f132/can-someone-make-script-please-rep-i-need-fast-145817/
in
data\creaturescripts\creaturescripts.xml
insert:
in
data\creaturescripts\scripts\login.lua
insert:
create
data\creaturescripts\scripts\advance_mlevel.lua
and insert:
tested on tfs 0.3.6 and 0.4
http://otland.net/f132/can-someone-make-script-please-rep-i-need-fast-145817/
in
data\creaturescripts\creaturescripts.xml
insert:
XML:
<event type="advance" name="advanceMlevel" event="script" value="advance_mlevel.lua"/>
data\creaturescripts\scripts\login.lua
insert:
Lua:
-- ver. 2.1 2011-12-07
-- author tfs, otland.net/members/andypsylon
local c = {
-- {lvl, mlvl}
{10, 25},
{15, 30},
{20, 35}
}
for _, v in ipairs(c) do
if(getPlayerLevel(cid) <= v[1]) then
if getPlayerMagLevel(cid) >= v[2] then
doPlayerSetRate(cid, SKILL__MAGLEVEL, 0)
break
end
end
end
registerCreatureEvent(cid, "advanceMlevel")
data\creaturescripts\scripts\advance_mlevel.lua
and insert:
Lua:
-- ver. 2.2 2011-12-07
-- author tfs, otland.net/members/andypsylon
local c = {
-- {lvl, mlvl}
{10, 25},
{15, 30},
{20, 35}
}
function onAdvance(cid, skill, oldLevel, newLevel)
if skill == SKILL__MAGLEVEL or skill == SKILL__LEVEL then
for _, v in ipairs(c) do
if getPlayerLevel(cid) <= v[1] then
if getPlayerMagLevel(cid) >= v[2] then
return doPlayerSetRate(cid, SKILL__MAGLEVEL, 0) and true
else
return doPlayerSetRate(cid, SKILL__MAGLEVEL, 1) and true
end
else
doPlayerSetRate(cid, SKILL__MAGLEVEL, 1)
end
end
end
return true
end
tested on tfs 0.3.6 and 0.4
Last edited: