Posted April 24Apr 24 comment_576132 Coloque em uma BP somente os Flawless +0. O Char vai colocar no sqm sul do char um flaw e irá refina-lo até o nível que você definir de +1 a +7. Após conseguir refinar o flawless, ele vai jogar o flaw para um de 7 sqms atrás do char de acordo com o nível de refinamento do cristal. Obs.: Não coloque nenhum flawless que não seja +0 na BP aberta, pois o macro poderá usar o item para refinar o flawless que está no chão. Vídeo com demonstração: https://www.youtube.com/watch?v=7nArfJjS_iY timeRefineFlaw = now flagRefineFlaw = macro(500,"Refine Flaws",function() flagCanUseRefineFlaw = true tile = g_map.getTile({x=posx(),y=posy()+1,z=posz()}) if not tile:isWalkable() then flagCanUseRefineFlaw = false end for k= -4,2 do tile = g_map.getTile({x=posx()+k,y=posy()-1,z=posz()}) if not tile:isWalkable() then flagCanUseRefineFlaw = false end end if not flagCanUseRefineFlaw then if (now-timeRefineFlaw)>10000 then say("Vá para uma área onde a linha de trás e da frente do boneco estejam livres.") timeRefineFlaw = now end return end tile = g_map.getTile({x=posx(),y=posy()+1,z=posz()}) if tile:getTopLookThing():getId() == 942 then flawChao = tile:getTopThing() g_game.look(flawChao) else flawBackpack = findItem(942) g_game.move(flawBackpack, {x=posx(),y = posy()+1, z= posz()}, 1) end end) onTextMessage(function(mode, text) if flagRefineFlaw.isOn() then if distMax == 0 then elseif string.find(text:lower(), "you see a flawless ice crystal") and not string.find(text, "+" .. tostring(distMax)) and not string.find(text, "Using") then tile = g_map.getTile({x=posx(),y=posy()+1,z=posz()}) if tile:getTopLookThing():getId() == 942 then flawChao = tile:getTopThing() useWith(942,flawChao) end elseif string.find(text:lower(), "you see a flawless ice crystal") and string.find(text, "+" .. tostring(distMax)) then tile = g_map.getTile({x=posx(),y=posy()+1,z=posz()}) flawChao = tile:getTopThing() g_game.move(flawChao, {x=posx()+distMax-5,y = posy()-1, z= posz()}, 1) elseif not string.find(text:lower(), "you see a flawless ice crystal") and not string.find(text:lower(), "using") and string.find(text:lower(), "flawless ice crystal") then tile = g_map.getTile({x=posx(),y=posy()+1,z=posz()}) g_game.move(tile:getTopLookThing(), {x = 65535, y=SlotBack, z=0}, tile:getTopLookThing():getCount()) elseif string.find(text:lower(), "you see") and not string.find(text:lower(), "flawless ice crystal") then flawBackpack = findItem(942) g_game.move(flawBackpack, {x=posx(),y = posy()+1, z= posz()}, 1) end end end) UI.Separator() UI.Label("Refine do Flaw:") distMin = 1 distMax = 7 function RefinaFlaw(parent) local panelName = "refinaFlaw" 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 = 7, 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("Refine >= +" .. math.floor(storage[panelName].min*7/100) .. " e <= +" .. math.floor(storage[panelName].max*7/100)) 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*7/100) distMax = math.floor(storage[panelName].max*7/100) end end) end RefinaFlaw()
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.