Ir para conteúdo

Featured Replies

Postado

boa tarde, tem como acrescentar no script, pra ter uma variação de acordo com magic level ??

 

local min, max = 25000,25000 --Ataque mínimo e ataque máximo

local w = {
    [1] = {ef = 47, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
}

function onUseWeapon(cid, var)
        local effect = getPlayerStorageValue(cid, 4561)
        local target = getCreatureTarget(cid)
        
        if target ~= 0 then
                local wx = w[effect] or w[math.random(#w)]
                doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
                addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
        end
        return true
end

 

Editado por BilauX (veja o histórico de edições)

Resolvido por Mathias Kenfi

Ir para solução
  • Respostas 14
  • Visualizações 850
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • Mathias Kenfi
    Mathias Kenfi

    local w = {     [1] = {ef = 47, sh = 35, dmg = COMBAT_ENERGYDAMAGE}, } function onUseWeapon(cid, var)         local ml = (getPlayerMagLevel(cid)*25000/100)         local min, max = (25000

  • muito obrigado, boa tarde, ótimo dia para vc...   @Joaovettor com skill o escalonamento ficaria como ??

Postado
Em 25/01/2019 em 13:32, BilauX disse:

boa tarde, tem como acrescentar no script, pra ter uma variação de acordo com magic level ??

 


local min, max = 25000,25000 --Ataque mínimo e ataque máximo

local w = {
    [1] = {ef = 47, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
}

function onUseWeapon(cid, var)
        local effect = getPlayerStorageValue(cid, 4561)
        local target = getCreatureTarget(cid)
        
        if target ~= 0 then
                local wx = w[effect] or w[math.random(#w)]
                doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
                addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
        end
        return true
end

 

 

local magic = getPlayerMagLevel(cid) -- Não mexa
local dano = (magic * 25000/100) -- Aqui é a porcentagem que de 25000, se seu Magic Level é 25, irá retornar 25% de 25000
local min, max = (25000+dano),(25000+dano) -- Aqui irá somar o valor anterior ou seja, (25000+% de 25000)

local w = {
    [1] = {ef = 47, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
}

function onUseWeapon(cid, var)
        local effect = getPlayerStorageValue(cid, 4561)
        local target = getCreatureTarget(cid)
        
        if target ~= 0 then
                local wx = w[effect] or w[math.random(#w)]
                doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
                addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
        end
        return true
end

Postado
  • Autor
[10:9:08.508] [Error - Weapon Interface] 
[10:9:08.508] data/weapons/scripts/super vara.lua
[10:9:08.508] Description: 
[10:9:08.508] data/weapons/scripts/super vara.lua:2: attempt to perform arithmetic on local 'magic' (a boolean value)
[10:9:08.508] [Warning - Event::loadScript] Cannot load script (data/weapons/scripts/super vara.lua)

 

7 horas atrás, Joaovettor disse:

local magic = getPlayerMagLevel(cid) -- Não mexa
local dano = (magic * 25000/100) -- Aqui é a porcentagem que de 25000, se seu Magic Level é 25, irá retornar 25% de 25000
local min, max = (25000+dano),(25000+dano) -- Aqui irá somar o valor anterior ou seja, (25000+% de 25000)

local w = {
    [1] = {ef = 47, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
}

function onUseWeapon(cid, var)
        local effect = getPlayerStorageValue(cid, 4561)
        local target = getCreatureTarget(cid)
        
        if target ~= 0 then
                local wx = w[effect] or w[math.random(#w)]
                doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
                addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
        end
        return true
end

 

 

Postado
3 horas atrás, BilauX disse:

[10:9:08.508] [Error - Weapon Interface] 
[10:9:08.508] data/weapons/scripts/super vara.lua
[10:9:08.508] Description: 
[10:9:08.508] data/weapons/scripts/super vara.lua:2: attempt to perform arithmetic on local 'magic' (a boolean value)
[10:9:08.508] [Warning - Event::loadScript] Cannot load script (data/weapons/scripts/super vara.lua)

 

 

 

local dano = (getPlayerMagLevel(cid) * 25000/100) -- Aqui é a porcentagem que de 25000, se seu Magic Level é 25, irá retornar 25% de 25000
local min, max = (25000+dano),(25000+dano) -- Aqui irá somar o valor anterior ou seja, (25000+% de 25000)

local w = {
    [1] = {ef = 47, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
}

function onUseWeapon(cid, var)
        local effect = getPlayerStorageValue(cid, 4561)
        local target = getCreatureTarget(cid)
        
        if target ~= 0 then
                local wx = w[effect] or w[math.random(#w)]
                doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
                addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
        end
        return true
end

Postado
  • Autor
[16:18:21.443] [Error - Weapon Interface] 
[16:18:21.443] data/weapons/scripts/super vara.lua
[16:18:21.443] Description: 
[16:18:21.443] data/weapons/scripts/super vara.lua:1: attempt to perform arithmetic on a boolean value
[16:18:21.443] [Warning - Event::loadScript] Cannot load script (data/weapons/scripts/super vara.lua)

 

2 horas atrás, Joaovettor disse:

local dano = (getPlayerMagLevel(cid) * 25000/100) -- Aqui é a porcentagem que de 25000, se seu Magic Level é 25, irá retornar 25% de 25000
local min, max = (25000+dano),(25000+dano) -- Aqui irá somar o valor anterior ou seja, (25000+% de 25000)

local w = {
    [1] = {ef = 47, sh = 35, dmg = COMBAT_ENERGYDAMAGE},
}

function onUseWeapon(cid, var)
        local effect = getPlayerStorageValue(cid, 4561)
        local target = getCreatureTarget(cid)
        
        if target ~= 0 then
                local wx = w[effect] or w[math.random(#w)]
                doSendDistanceShoot(getThingPos(cid), getThingPos(target), wx.sh)
                addEvent(doAreaCombatHealth, 100, cid, wx.dmg, getThingPos(target), 0, -min, -max, wx.ef)
        end
        return true
end

 

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo