Postado Janeiro 25, 2019 6 anos 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 Janeiro 25, 2019 6 anos por BilauX (veja o histórico de edições)
Postado Janeiro 28, 2019 6 anos 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 Janeiro 28, 2019 6 anos 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 Janeiro 28, 2019 6 anos 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 Janeiro 28, 2019 6 anos 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.