Efeitos Ao Upar Lvl Ou Skill.

lugk123
em Scripts

lugk123

;]
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 12/09/12Posts: 59

MEU OT É >>>8.60<<<

Alguém aquí tem um script que, quando upa, aparece um efeito ???

tumblr_m3orkn8ORA1rn2llbo1_400.gif

Janmix

avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 27/10/08Posts: 152

TESTA ESSA AI:

Crie um arquivo no Creaturescripts/scripts chamado advance.lua e cole:

local config = {
[0] = { "Fist UP", 30}, -- 30 = variable[2] -- Animation effect
[1] = { "Club UP", 30}, -- 30 = variable[2] -- Animation effect
[2] = { "Sword UP", 30}, -- 30 = variable[2] -- Animation effect
[3] = { "Axe UP", 30}, -- 30 = variable[2] -- Animation effect
[4] = { "Distance UP", 30}, -- 30 = variable[2] -- Animation effect
[5] = { "Shield UP", 30}, -- 30 = variable[2] -- Animation effect
[6] = { "Fishing UP", 30}, -- 30 = variable[2] -- Animation effect
[7] = { "Magic 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 - 1, z = pos.z},
{x = pos.x, y = pos.y + 1, z = pos.z},
{x = pos.x - 1, y = pos.y, z = pos.z},
{x = pos.x + 1, y = pos.y, z = pos.z},
{x = pos.x - 1, y = pos.y - 1, z = pos.z},
{x = pos.x + 1, y = pos.y - 1, z = pos.z},
{x = pos.x + 1, y = pos.y + 1, z = pos.z},
{x = pos.x - 1, y = pos.y + 1, 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_FIREWORK_BLUE)
end
end
end
return TRUE
end

 

No Login.lua coloque:

registerCreatureEvent(cid, "Playeradvance")

 

e no creaturescripts.xml coloque essa tag:

<event type="advance" name="Playeradvance" event="script" value="advance.lua"/>

 

e depois é bom pesquisar um pouco:

http://www.xtibia.com/forum/topic/195100-efeitos-ao-upar-level-ou-skills/