MEU OT É >>>8.60<<<
Alguém aquí tem um script que, quando upa, aparece um efeito ???
MEU OT É >>>8.60<<<
Alguém aquí tem um script que, quando upa, aparece um efeito ???
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/