Show Show Posted August 3, 2021 Report Share Posted August 3, 2021 Sempre vejo o pessoal reclamando dos summons do global que "bugam" o bot, dentre algumas outras coisas. Fiz algumas modificações no macro de auto ataque que já existia: 1 - Opção de Follow no target. 2 - Pausa o cavebot enquanto estiver atacando e retoma quando não mais estiver. 3 - Controle do intervalo de distância dos monstros, ignorando aqueles fora desse intervalo. 4 - Configuração de duas magias de ataque de acordo com a porcentagem de mana do personagem. Qualquer problema ou dúvida pode mandar mensagem ingame para: Heeey, Jhon Snowy, Drurian ou kalastaja. De preferência fala pelo discord (dimerism#5429) que caso esteja afk quando ver respondo. Lembrando que o código deve ser colocado em Ingame macro editor. Spoiler local monsterList = {} local whitelistMonsters = {"emberwing", "skullfrost", "groovebeast", "thundergiant","pet mercenary","pet archer","pet witchdoctor", "pet mage", "pet blaze" , "pet wolf", "pet dog"} macro(100, "Atk Closest Target", function() if g_game.isAttacking() then return end for _,mob in ipairs(getSpectators(posz())) do distancia = getDistanceBetween(pos(), mob:getPosition()) if mob:isMonster() and not table.find(whitelistMonsters, mob:getName():lower()) and distancia >=distMin and distancia <=distMax then table.insert(monsterList, {monster = mob, distance = getDistanceBetween(pos(), mob:getPosition())}) end end table.sort(monsterList, function(a,b) return a.distance < b.distance end) if not g_game.isAttacking() and monsterList[1] then g_game.attack(monsterList[1].monster) end monsterList = {} end) macro(100, "Auto Follow", function() g_game.setChaseMode(1) end) macro(300, "Auto Pause CaveBot", function() if g_game.isAttacking() then CaveBot.setOn(false) else CaveBot.setOn(true) end end) UI.Separator() UI.Label("Distância para ataque") distMin = 1 distMax = 8 function Distancia(parent) local panelName = "distancia" if not parent then parent = panel end local ui = g_ui.createWidget("DualScrollPanel", parent) ui:setId(panelName) if not storage[panelName] then storage[panelName] = { min = 1, max = 100, text = 'exura' } end ui.title:setOn(storage[panelName].enabled) ui.title.onClick = function(widget) storage[panelName].enabled = not storage[panelName].enabled widget:setOn(storage[panelName].enabled) end local updateText = function() ui.title:setText("distância >= " .. math.floor(storage[panelName].min*8/100) .. " e <= " .. math.floor(storage[panelName].max*8/100) .. ' sqms') end local repeatTime ui.scroll1.onValueChange = function(scroll, value) storage[panelName].min = value updateText() end ui.scroll2.onValueChange = function(scroll, value) storage[panelName].max = value updateText() end ui.text.onTextChange = function(widget, text) storage[panelName].text = "" updateText() end ui.scroll1:setValue(storage[panelName].min) ui.scroll2:setValue(storage[panelName].max) macro(1000, function() if storage[panelName].enabled then distMin = math.floor(storage[panelName].min*8/100) distMax = math.floor(storage[panelName].max*8/100) end end) end Distancia() UI.Separator() UI.Label("Magias") function Magia1(parent) local panelName = "magiaUm" if not parent then parent = panel end local ui = g_ui.createWidget("DualScrollPanel", parent) ui:setId(panelName) if not storage[panelName] then storage[panelName] = { min = 10, max = 80, text = 'exura' } end ui.title:setOn(storage[panelName].enabled) ui.title.onClick = function(widget) storage[panelName].enabled = not storage[panelName].enabled widget:setOn(storage[panelName].enabled) end local updateText = function() ui.title:setText("mana >= " .. storage[panelName].min .. "% e <= " .. storage[panelName].max .. "%") end local repeatTime ui.scroll1.onValueChange = function(scroll, value) storage[panelName].min = value updateText() end ui.scroll2.onValueChange = function(scroll, value) storage[panelName].max = value updateText() end ui.text.onTextChange = function(widget, text) storage[panelName].text = text updateText() end ui.scroll1:setValue(storage[panelName].min) ui.scroll2:setValue(storage[panelName].max) ui.text:setText(storage[panelName].text) macro(1000, function() if storage[panelName].enabled and manapercent() >= storage[panelName].min and manapercent() <= storage[panelName].max then say(storage[panelName].text) end end) end Magia1() function Magia2(parent) local panelName = "MagiaDois" if not parent then parent = panel end local ui = g_ui.createWidget("DualScrollPanel", parent) ui:setId(panelName) if not storage[panelName] then storage[panelName] = { min = 10, max = 80, text = 'exura' } end ui.title:setOn(storage[panelName].enabled) ui.title.onClick = function(widget) storage[panelName].enabled = not storage[panelName].enabled widget:setOn(storage[panelName].enabled) end local updateText = function() ui.title:setText("mana >= " .. storage[panelName].min .. "% e <= " .. storage[panelName].max .. "%") end local repeatTime ui.scroll1.onValueChange = function(scroll, value) storage[panelName].min = value updateText() end ui.scroll2.onValueChange = function(scroll, value) storage[panelName].max = value updateText() end ui.text.onTextChange = function(widget, text) storage[panelName].text = text updateText() end ui.scroll1:setValue(storage[panelName].min) ui.scroll2:setValue(storage[panelName].max) ui.text:setText(storage[panelName].text) macro(1000, function() if storage[panelName].enabled and manapercent() >= storage[panelName].min and manapercent() <= storage[panelName].max then say(storage[panelName].text) end end) end Magia2() 7 Quote Link to comment Share on other sites More sharing options...
Cadwallow Posted August 5, 2021 Report Share Posted August 5, 2021 Carai mano, ficou show! Obrigado pelo trabalho! Quote Link to comment Share on other sites More sharing options...
MeLkZeRa Posted August 5, 2021 Report Share Posted August 5, 2021 Boa Meu Rl Otimo Trampo <3 Quote Link to comment Share on other sites More sharing options...
Faramir Posted August 5, 2021 Report Share Posted August 5, 2021 mto bom mano !! tomei liberdade de editar seu post só pra não ficar mto grande e já colocar com highlight Lua pra melhor visualização Quote Link to comment Share on other sites More sharing options...
Show Show Posted August 5, 2021 Author Report Share Posted August 5, 2021 4 horas atrás, Faramir disse: mto bom mano !! tomei liberdade de editar seu post só pra não ficar mto grande e já colocar com highlight Lua pra melhor visualização Pô, legal! Não sabia dessas opções. Vou usar daqui pra frente. Valeu! 1 Quote Link to comment Share on other sites More sharing options...
Smokeppurp Posted August 6, 2021 Report Share Posted August 6, 2021 O raca é muito bom SLk!!! parabéns mano!! Quote Link to comment Share on other sites More sharing options...
Coldzera Posted August 6, 2021 Report Share Posted August 6, 2021 @Show Show sou meio leigo com essas coisas, então queria tirar uma dúvida. O script "Atk Closest Target" é para que o pet fique próximo ao mestre e que ele não fique saindo da tela dele? Ou não? Não entendi muito bem a funcionalidade. Quote Link to comment Share on other sites More sharing options...
Show Show Posted August 7, 2021 Author Report Share Posted August 7, 2021 11 horas atrás, Coldzera disse: @Show Show sou meio leigo com essas coisas, então queria tirar uma dúvida. O script "Atk Closest Target" é para que o pet fique próximo ao mestre e que ele não fique saindo da tela dele? Ou não? Não entendi muito bem a funcionalidade. O personagem vai atacar o monstro mais próximo dele (dentro da faixa especificada) e ignorar pets e summons especiais. A principal funcionalidade é não precisar configurar vários monstros diferentes dentro do Target ou escrever " * " e o bot ficar atacando os pets. Quote Link to comment Share on other sites More sharing options...
Dudu :P Posted August 7, 2021 Report Share Posted August 7, 2021 Que foda. Quote Link to comment Share on other sites More sharing options...
Show Show Posted August 15, 2021 Author Report Share Posted August 15, 2021 Fiz uma atualização na parte de magias do macro. Antes o personagem soltaria as magias de acordo com a quantia de mana do char, independente de estar atacando algum monstro ou não. Como nem todos upam assim, coloquei um botão a mais "On Target" que quando ativo, condiciona o uso das magias a estar atacando algum monstro. Spoiler local monsterList = {} local whitelistMonsters = {"emberwing", "skullfrost", "groovebeast", "thundergiant","pet mercenary","pet archer","pet witchdoctor", "pet mage", "pet blaze" , "pet wolf", "pet dog"} macro(100, "Atk Closest Target", function() if g_game.isAttacking() then return end for _,mob in ipairs(getSpectators(posz())) do distancia = getDistanceBetween(pos(), mob:getPosition()) if mob:isMonster() and not table.find(whitelistMonsters, mob:getName():lower()) and distancia >=distMin and distancia <=distMax then table.insert(monsterList, {monster = mob, distance = getDistanceBetween(pos(), mob:getPosition())}) end end table.sort(monsterList, function(a,b) return a.distance < b.distance end) if not g_game.isAttacking() and monsterList[1] then g_game.attack(monsterList[1].monster) end monsterList = {} end) macro(100, "Auto Follow", function() g_game.setChaseMode(1) end) macro(300, "Auto Pause CaveBot", function() if g_game.isAttacking() then CaveBot.setOn(false) else CaveBot.setOn(true) end end) UI.Separator() UI.Label("Distância para ataque") distMin = 1 distMax = 8 function Distancia(parent) local panelName = "distancia" if not parent then parent = panel end local ui = g_ui.createWidget("DualScrollPanel", parent) ui:setId(panelName) if not storage[panelName] then storage[panelName] = { min = 1, max = 100, text = 'exura' } end ui.title:setOn(storage[panelName].enabled) ui.title.onClick = function(widget) storage[panelName].enabled = not storage[panelName].enabled widget:setOn(storage[panelName].enabled) end local updateText = function() ui.title:setText("distância >= " .. math.floor(storage[panelName].min*8/100) .. " e <= " .. math.floor(storage[panelName].max*8/100) .. ' sqms') end local repeatTime ui.scroll1.onValueChange = function(scroll, value) storage[panelName].min = value updateText() end ui.scroll2.onValueChange = function(scroll, value) storage[panelName].max = value updateText() end ui.text.onTextChange = function(widget, text) storage[panelName].text = "" updateText() end ui.scroll1:setValue(storage[panelName].min) ui.scroll2:setValue(storage[panelName].max) macro(1000, function() if storage[panelName].enabled then distMin = math.floor(storage[panelName].min*8/100) distMax = math.floor(storage[panelName].max*8/100) end end) end Distancia() UI.Separator() UI.Label("Magias") onTarget = macro(10000, "On Target", function() end) function Magia1(parent) local panelName = "magiaUm" if not parent then parent = panel end local ui = g_ui.createWidget("DualScrollPanel", parent) ui:setId(panelName) if not storage[panelName] then storage[panelName] = { min = 10, max = 80, text = 'exura' } end ui.title:setOn(storage[panelName].enabled) ui.title.onClick = function(widget) storage[panelName].enabled = not storage[panelName].enabled widget:setOn(storage[panelName].enabled) end local updateText = function() ui.title:setText("mana >= " .. storage[panelName].min .. "% e <= " .. storage[panelName].max .. "%") end local repeatTime ui.scroll1.onValueChange = function(scroll, value) storage[panelName].min = value updateText() end ui.scroll2.onValueChange = function(scroll, value) storage[panelName].max = value updateText() end ui.text.onTextChange = function(widget, text) storage[panelName].text = text updateText() end ui.scroll1:setValue(storage[panelName].min) ui.scroll2:setValue(storage[panelName].max) ui.text:setText(storage[panelName].text) macro(1000, function() if storage[panelName].enabled and manapercent() >= storage[panelName].min and manapercent() <= storage[panelName].max then if onTarget.isOn() and g_game.isAttacking() then say(storage[panelName].text) elseif onTarget.isOff() then say(storage[panelName].text) end end end) end Magia1() function Magia2(parent) local panelName = "MagiaDois" if not parent then parent = panel end local ui = g_ui.createWidget("DualScrollPanel", parent) ui:setId(panelName) if not storage[panelName] then storage[panelName] = { min = 10, max = 80, text = 'exura' } end ui.title:setOn(storage[panelName].enabled) ui.title.onClick = function(widget) storage[panelName].enabled = not storage[panelName].enabled widget:setOn(storage[panelName].enabled) end local updateText = function() ui.title:setText("mana >= " .. storage[panelName].min .. "% e <= " .. storage[panelName].max .. "%") end local repeatTime ui.scroll1.onValueChange = function(scroll, value) storage[panelName].min = value updateText() end ui.scroll2.onValueChange = function(scroll, value) storage[panelName].max = value updateText() end ui.text.onTextChange = function(widget, text) storage[panelName].text = text updateText() end ui.scroll1:setValue(storage[panelName].min) ui.scroll2:setValue(storage[panelName].max) ui.text:setText(storage[panelName].text) macro(1000, function() if storage[panelName].enabled and manapercent() >= storage[panelName].min and manapercent() <= storage[panelName].max then if onTarget.isOn() and g_game.isAttacking() then say(storage[panelName].text) elseif onTarget.isOff() then say(storage[panelName].text) end end end) end Magia2() Quote Link to comment Share on other sites More sharing options...
Cadwallow Posted August 15, 2021 Report Share Posted August 15, 2021 manoooooooo que irado esses macros que voce tá fazendo!!! Obrigado pela colaboração. Será que seria viável voce fazer um apanhado de seus macros, por tudo num tpopico (só os links mesmo) pra eu poder mover eles pro Super Listão? Quote Link to comment Share on other sites More sharing options...
MeLkZeRa Posted August 15, 2021 Report Share Posted August 15, 2021 1 hora atrás, Cadwallow disse: manoooooooo que irado esses macros que voce tá fazendo!!! Obrigado pela colaboração. Será que seria viável voce fazer um apanhado de seus macros, por tudo num tpopico (só os links mesmo) pra eu poder mover eles pro Super Listão? NAOOOOOOOOOOOOOOOOOOOOOO maioria dos macro deles sou eu quer uso n vemmmmm!!! @Show Show Seu trampo ta ficando ttopiiiii rl amassaaaaaaaaa Quote Link to comment Share on other sites More sharing options...
Show Show Posted August 17, 2021 Author Report Share Posted August 17, 2021 Em 15/08/2021 at 17:24, Cadwallow disse: manoooooooo que irado esses macros que voce tá fazendo!!! Obrigado pela colaboração. Será que seria viável voce fazer um apanhado de seus macros, por tudo num tpopico (só os links mesmo) pra eu poder mover eles pro Super Listão? Posso sim. Você tem alguma sugestão de quais macros seriam interessantes pra lista? Qualquer coisa a gente pode trocar uma ideia pelo discord ou ingame mesmo. Quote Link to comment Share on other sites More sharing options...
Show Show Posted August 17, 2021 Author Report Share Posted August 17, 2021 Em 15/08/2021 at 19:05, MeLkSz disse: NAOOOOOOOOOOOOOOOOOOOOOO maioria dos macro deles sou eu quer uso n vemmmmm!!! @Show Show Seu trampo ta ficando ttopiiiii rl amassaaaaaaaaa Valeu @MeLkSz! kkkkkkkk Quote Link to comment Share on other sites More sharing options...
Cadwallow Posted August 21, 2021 Report Share Posted August 21, 2021 On 8/16/2021 at 9:45 PM, Show Show said: Posso sim. Você tem alguma sugestão de quais macros seriam interessantes pra lista? Qualquer coisa a gente pode trocar uma ideia pelo discord ou ingame mesmo. Eu acho que adicionar o maximo que vc puder (sem querer parecer abusado mas ja parecendo kkkk), seria o ideal. Nao se sabe o que uma pessoa pode estar atras. Quote Link to comment Share on other sites More sharing options...
BIBIL Posted August 21, 2021 Report Share Posted August 21, 2021 Alguem Tem Script Para Remover Pet Quando Tiver PK Na Tela ?? Para OTC Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.