Postado Qui maio 08, 2014 9:45 am
Eae galera esse scripts claro todo mundo ja viu mas eu vim trazer aki achei no meu nto então o que ele faz você ver que tem servidor que quando upa mostra um efeito subindo do exp que foi adicionado ao player então vamos la em creaturescripts/scripts/ copie um arquivo.lua e renomei para advance e cole o seguinte codigo dentro
--Script made by Pitufo/Haifurer, edited by luan mello!
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 skill UP", 30}, -- 30 = variable[2] -- Animation effect
[5] = { "Shield skill UP", 30}, -- 30 = variable[2] -- Animation effect
[6] = { "Fishing skill UP", 30}, -- 30 = variable[2] -- Animation effect
[7] = { "Magic level 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 effectPositions = {
{x = pos.x, y = pos.y - 3, z = pos.z},
{x = pos.x, y = pos.y + 3, z = pos.z},
{x = pos.x - 3, y = pos.y, z = pos.z},
{x = pos.x + 3, y = pos.y, z = pos.z},
{x = pos.x - 2, y = pos.y - 2, z = pos.z},
{x = pos.x + 2, y = pos.y - 2, z = pos.z},
{x = pos.x + 2, y = pos.y + 2, z = pos.z},
{x = pos.x - 2, y = pos.y + 2, z = pos.z}
}
for type, variable in pairs(config) do
if skill == type then
doCreatureSay(cid, ""..variable[1].." ["..newlevel.."]", TALKTYPE_ORANGE_1)
for _, ePos in ipairs(effectPositions) do
doSendDistanceShoot(pos, ePos, CONST_ANI_SMALLHOLY)
doSendMagicEffect(ePos, CONST_ME_HOLYAREA)
end
end
end
return TRUE
end
agora em login registre
registerCreatureEvent(cid, "advance")
e em creaturescripts.xml adicione
<event type="advance" name="advance" event="script" value="advance.lua"/>
--Script made by Pitufo/Haifurer, edited by luan mello!
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 skill UP", 30}, -- 30 = variable[2] -- Animation effect
[5] = { "Shield skill UP", 30}, -- 30 = variable[2] -- Animation effect
[6] = { "Fishing skill UP", 30}, -- 30 = variable[2] -- Animation effect
[7] = { "Magic level 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 effectPositions = {
{x = pos.x, y = pos.y - 3, z = pos.z},
{x = pos.x, y = pos.y + 3, z = pos.z},
{x = pos.x - 3, y = pos.y, z = pos.z},
{x = pos.x + 3, y = pos.y, z = pos.z},
{x = pos.x - 2, y = pos.y - 2, z = pos.z},
{x = pos.x + 2, y = pos.y - 2, z = pos.z},
{x = pos.x + 2, y = pos.y + 2, z = pos.z},
{x = pos.x - 2, y = pos.y + 2, z = pos.z}
}
for type, variable in pairs(config) do
if skill == type then
doCreatureSay(cid, ""..variable[1].." ["..newlevel.."]", TALKTYPE_ORANGE_1)
for _, ePos in ipairs(effectPositions) do
doSendDistanceShoot(pos, ePos, CONST_ANI_SMALLHOLY)
doSendMagicEffect(ePos, CONST_ME_HOLYAREA)
end
end
end
return TRUE
end
agora em login registre
registerCreatureEvent(cid, "advance")
e em creaturescripts.xml adicione
<event type="advance" name="advance" event="script" value="advance.lua"/>