Hello Pleasse edited mz script :
ID Proffesion : 5,6,9,10
Script :
EDIT FOR REP ++
ID Proffesion : 5,6,9,10
Script :
LUA:
local config = {
funnyEffect = "YES", -- Effect (YES/NO)
minimumLevel = 1,
maximumLevel = math.huge, -- for infinite type math.huge
}
local addMana = {
[{config.minimumLevel, 1}] = 3000,
[{1, 1999}] = 3000,
[{2000, config.maximumLevel}] = 3000,
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local level = getPlayerLevel(cid)
local effect = 36
if level < config.minimumLevel then
doPlayerSendCancel(cid, "Musisz mieć conajmniej "..config.minimumLevel.." aby uzyc manarune.")
return FALSE
end
if level >= config.maximumLevel then
doPlayerSendCancel(cid, "Twoj Poziom jest zbyt duzy.")
return FALSE
end
for k, v in pairs(addMana) do
if level >= k[1] and level < k[2] then
doPlayerAddMana(cid, v)
break
end
end
if config.funnyEffect == "YES" then
local pos = getPlayerPosition(cid)
local positions = {
{x=pos.x,y=pos.y,z=pos.z},
}
for i = 1, table.getn(positions) do
doSendMagicEffect(positions[i],effect)
end
end
return TRUE
end
EDIT FOR REP ++
Last edited by a moderator: