SO

Efeito Quando Upar Skills

Por SoulDark, 05 de mar. de 2011 em Archived

2
1.1k
SoulDarkS
05 de março de 2011 às 09:46

Oi Galera :D, eu comecei no Fórum ontem e já to enchendo o saco pakas, eu sei !

mas quem puder ajuuda aii plx >_<

eu to querendo colocar um Efeito pra quando upar skill (todas) sendo Fist/distance/club/axe/magic level/sword...

 

com o seguinte efeito

 

CONST_ME_FIREWORK_BLUE (/z 30)

Quem puder ajudar ai , agradeço!!

VodkartV
05 de março de 2011 às 10:09

advance.lua

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
	doSendMagicEffect(ePos, 30)
           end


       end
   end    
return TRUE
end

 

creaturescript

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

 

login.lua

registerCreatureEvent(cid, "playeradvance")