Ir para conteúdo
  • 0

Como Coloco Efeito No Experiencia Scroll ?


Pergunta

efeito area tipo um quadrado " mais uma efeito area um pouco menor do que magia " xD

 

local config = {

funnyEffect = "yes",

minimumLevel = 50,

maximumLevel = 99999, -- for infinite type math.huge

}

local addExp = {

[{config.minimumLevel, 100}] = 2500000,

[{100, 200}] = 5000000,

[{200, 300}] = 7500000,

[{300, 400}] = 15000000,

[{400, 500}] = 20000000,

[{500, 600}] = 30000000,

[{600, 1000}] = 40000000,

[{1000, 2000}] = 50000000,

[{2000, 2500}] = 450000000,

[{2500, 7500}] = 450000000,

[{7500, 10000}] = 450000000,

[{10000, 20000}] = 450000000,

[{20000, config.maximumLevel}] = 450000000

}

function onUse(cid, item, fromPosition, itemEx, toPosition)

local level = getPlayerLevel(cid)

local effect = math.random(CONST_ME_FIREWORK_YELLOW,CONST_ME_FIREWORK_BLUE)

 

if level < config.minimumLevel then

doPlayerSendCancel(cid, "You need to be at least "..config.minimumLevel.." to use a scroll.")

return FALSE

end

 

if level >= config.maximumLevel then

doPlayerSendCancel(cid, "Your level is too high for using a scroll.")

return FALSE

end

 

for k, v in pairs(addExp) do

if level >= k[1] and level < k[2] then

doPlayerAddExp(cid, v)

doPlayerSendTextMessage(cid, 22, "Experience Scroll Gave You " .. v .." experience!")

doRemoveItem(item.uid, 1)

break

end

end

 

if config.funnyEffect == "YES" then

local playerexp = addExp

local pos = getPlayerPosition(cid)

local positions = {

{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},

{x=pos.x+1,y=pos.y,z=pos.z},

{x=pos.x-1,y=pos.y,z=pos.z},

{x=pos.x,y=pos.y+1,z=pos.z},

{x=pos.x,y=pos.y-1,z=pos.z}

}

 

for i = 1, table.getn(positions) do

 

doSendAnimatedText(getThingPos(cid), playerexp, TEXTCOLOR_RED)

doSendMagicEffect(positions,effect)

end

end

return TRUE

end

Link para o comentário
https://xtibia.com/forum/topic/198550-como-coloco-efeito-no-experiencia-scroll/
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...