local name = {"" .. name .. ""}
local amount = {}
local levels = {
[8] = {15},
[9] = {25}
}
function onAdvance(cid, skill, oldLevel, newLevel)
for k,v in ipairs(levels) do
if getPlayerLevel(cid) == k[newLevel] and getPlayerMagLevel(cid)[skill] >= v and getInstantSpellInfo(cid, name) then
doPlayerAddSpentMana(cid, 0)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You cannot gain more magic experience in your current level.")
else
doPlayerAddSpentMana(cid, amount)
end
end
end
[04/12/2011 18:12:14] [Error - CreatureScript Interface]
[04/12/2011 18:12:14] data/creaturescripts/scripts/ml.lua
[04/12/2011 18:12:14] Description:
[04/12/2011 18:12:14] data/creaturescripts/scripts/ml.lua:1: attempt to concatenate global 'name' (a nil value)
[04/12/2011 18:12:14] [Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/ml.lua)