Fiz rapidin aqui, nem testei...
local config = {
level_Direto = "sim", -- Se for por level direto bote sim.
add_Level = 2, -- Aqui você coloca o quando que vai adicionar de level no player, se ewstiver n vai ser por experiencia
add_Exp = 500, -- Aqui você coloca a quantidade de experiencia o player vai ganhar
uniqueid_Bau = 5033, -- Aqui vai o uniqueid do bau
}
function onUse(cid, item, frompos, item2, topos)
local cd = exhaustion.get(cid, 88726)
if not cd then
cd = 0
end
if cd > 0 then
doPlayerSendCancel(cid, "Desculpa, espere 24hrs para usar denovo.")
return true
end
if item.uid == config.uniqueid_Bau then
if config.level_Direto == "sim" or config.level_Direto == "SIM" then
doPlayerSetSkill(cid, SKILL__LEVEL, getPlayerLevel(cid) + config.add_Level)
doPlayerSendTextMessage(cid, 27, "Você ganhou "..config.add_Level..", agora seu level é "..getPlayerLevel(cid)..")
doSendMagicEffect(getThingPos(cid), 25)
exhaustion.set(cid, 88726, 60 * 1000 * 60 * 24)
else
doPlayerAddExp(cid, config.add_Exp)
doSendAnimatedText(getThingPos(cid), ""..config.add_Exp.."", math.random(25, 100))
doPlayerSendTextMessage(cid, 27, "Você ganhou "..config.add_Exp.." de experiencia.)
doSendMagicEffect(getThingPos(cid), 25)
exhaustion.set(cid, 88726, 60 * 1000 * 60 * 24)
end
end
return true
end
function doPlayerSetSkill(cid, skill, amount)
local pid = getPlayerGUID(cid)
doRemoveCreature(cid,true)
db.executeQuery("UPDATE `player_skills` SET `value` = ".. amount .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. skill ..";")
return TRUE
end





info
Grupo: Visconde
Registrado: 17/09/10
Posts: 252
Reputação: +9
Alguem Ae Poderia Me Ajudar Me Passando 1 Script De 1 Bau De Xp, Que Possa Usar A Cáda 24h....
Pode Ser de Experience, ou Que Dê Lvl Direto....
aguardando....