UI.Label("-------Aoe_Spell_Target-------"):setColor("#FFA500") addTextEdit("AoeSpell", storage.aoeSpell, function(widget, text) storage.aoeSpell = text end) local singleSpell = "exori frigo" macro(100, "Safe UE TARGET", function() if not g_game.isAttacking() then return end if getMonsters(7, false) ~= 0 and getPlayers(7, false) == 0 then say(storage.aoeSpell) elseif getPlayers(7, false) ~= 0 then say(singleSpell) end end) macro(100, "Spam UE TARGET", function() if not g_game.isAttacking() then return end if getMonsters(7, false) ~= 0 then say(storage.aoeSpell) end end) UI.Separator() UI.Label("-------Aoe_Spell_Spam-------"):setColor("#FFA500") addTextEdit("AoeSpellSpam", storage.AoeSpellSpam, function(widget, text) storage.AoeSpellSpam = text end) -- UE BEZ TARGET macro(100, "Spam UE - NO TARGET", function() if getMonsters(4, false) ~= 0 then say(storage.AoeSpellSpam) end end) UI.Separator() UI.Separator() UI.Label("-------------BASIC-------------"):setColor("#FFA500") UI.Label("----------MP %----------"):setColor("#00FF00") addTextEdit("manaPercent", storage.manaPercent, function(widget, text) storage.manaPercent = text end) macro(100, "Manas", function() local level = g_game.getLocalPlayer():getLevel() local manaPotion = 268 local strongManaPotion = 237 local greatManaPotion = 238 if (manapercent() <= tonumber(storage.manaPercent) and level > 8 and level < 100) then usewith(manaPotion, player) elseif (manapercent() <= tonumber(storage.manaPercent) and level >= 100 and level < 300) then usewith(strongManaPotion, player) elseif (manapercent() <= tonumber(storage.manaPercent) and level >= 300) then usewith(greatManaPotion, player) end end) UI.Separator() local lastCast = 0 macro(250, "Manashield", function() if not hasManaShield() or (now - lastCast) > 90000 then say("Utamo Vita") lastCast = now end end) macro(100, "Healing", function() local level = g_game.getLocalPlayer():getLevel() local healingSpellLowLevel = "exura" local healingSpellHighLevel = "exura vita" local hpPercent = 90 if (hppercent() <= hpPercent and level > 8 and level < 30) then say(healingSpellLowLevel) elseif (hppercent() <= hpPercent and level >= 30) then say(healingSpellHighLevel) end end) macro(100, "Haste", function() local level = g_game.getLocalPlayer():getLevel() local hasteLowLevel = "utani gran hur" local hasteHighLevel = "mega hur" if (not hasHaste() and level > 20 and level < 200) then say(hasteLowLevel) elseif (not hasHaste() and level > 200) then say(hasteHighLevel) end end) -- TASK MAX, TASK LEVEL local wait = false macro(100, "Task Commands", function() if wait then return end say("!task maxpoints") schedule(10000, function() say("!task level") end) schedule(20000, function() wait = false end) wait = true end) local targetID = nil -- escape when attacking will reset hold target onKeyPress(function(keys) if keys == "Escape" and targetID then targetID = nil end end) macro(100, "ReAttack", function() -- if attacking then save it as target, but check pos z in case of marking by mistake on other floor if target() and target():getPosition().z == posz() and not target():isNpc() then targetID = target():getId() elseif not target() then -- there is no saved data, do nothing if not targetID then return end -- look for target for i, spec in ipairs(getSpectators()) do local sameFloor = spec:getPosition().z == posz() local oldTarget = spec:getId() == targetID if sameFloor and oldTarget then attack(spec) end end end end) UI.Separator() UI.Separator() UI.Label("---------------EXP--------------"):setColor("#FFA500") -- POT FRIENDS macro(100, "Mana on Friends", function() local friends = string.split(storage.friendNameh, "\n") for i, spec in pairs(getSpectators()) do if table.contains(friends, spec:getName(), true) then if (manapercent() >= 90) and getDistanceBetween(pos(), spec:getPosition()) < 2 then useWith(tonumber(storage.manauh), spec) delay(tonumber(storage.delaymana)) end end end end) UI.Button("Friend List Mana Potion", function(newText) UI.MultilineEditorWindow(storage.friendNameh or "", {title="Friend List ManaUH", description="Friend list UH\nExample:\nPlayer1\nPlayer2\nPlayer3"}, function(text) storage.friendNameh = text end) end) UI.Label("Potion ID") UI.TextEdit(storage.manauh or "238", function(widget, text) storage.manauh = text end) UI.Label("Potion Use Delay") UI.TextEdit(storage.delaymana or "1000", function(widget, text) storage.delaymana = text end) local Objects = {435, 1948} local Doors = {7727, 8265, 1629, 1632, 5129, 5120, 8266, 7728} followName = "Name" if not storage[followName] then storage[followName] = { player = 'name'} end local toFollowPos = {} UI.Separator() UI.Label("Auto Follow") followTE = UI.TextEdit(storage[followName].player or "name", function(widget, newText) storage[followName].player = newText end) local followChange = macro(200, "Follow Change", function() end) local followMacro = macro(20, "Follow", function() local position = pos() local target = getCreatureByName(storage[followName].player) if target then local tpos = target:getPosition() toFollowPos[tpos.z] = tpos end if not player:isWalking() and target and (getDistanceBetween(pos(), target:getPosition()) >2) then for i,interact in ipairs(Doors) do if (player:getDirection() == 1 or player:getDirection() == 3) then for x=-1,2,2 do position["x"] = posx() + x position["y"] = posy() for y=-1,3,2 do if g_map.getTile(position) then for u,item in ipairs(g_map.getTile(position):getItems()) do if item:getId() == interact then g_game.use(item) return end end position["y"] = posy()+y end end end end position = pos() if (player:getDirection() == 0 or player:getDirection() == 2) then for y=-1,2,2 do position["x"] = posx() position["y"] = posy()+y for x=-1,3,2 do for u,item in ipairs(g_map.getTile(position):getItems()) do if item:getId() == interact then g_game.use(item) return end end position["x"] = posx()+x end end end position = pos() end elseif not player:isWalking() and not target and toFollowPos[posz()] then for i,interact in ipairs(Objects) do for x=-1,2,1 do for y=-1,2,1 do position["x"] = toFollowPos[posz()].x + x position["y"] = toFollowPos[posz()].y + y if getDistanceBetween(pos(), position) <= 8 and g_map.getTile(position) then for u,item in ipairs(g_map.getTile(position):getItems()) do if item:getId() == interact then g_game.use(item) delay(500) end end end end end end end local p = toFollowPos[posz()] if not p then return end if autoWalk(p, 20, { ignoreNonPathable = true, precision = 1 }) then delay(100) end end) UI.Separator() onPlayerPositionChange(function(newPos, oldPos) if followChange:isOff() then return end if (g_game.isFollowing()) then tfollow = g_game.getFollowingCreature() if tfollow then if tfollow:getName() ~= storage[followName].player then followTE:setText(tfollow:getName()) storage[followName].player = tfollow:getName() end end end end) onCreaturePositionChange(function(creature, newPos, oldPos) if creature:getName() == storage[followName].player and newPos then toFollowPos[newPos.z] = newPos end end) UI.Separator() UI.Separator() onPlayerPositionChange(function(newPos, oldPos) if followChange:isOff() then return end if g_game.isFollowing() then local tfollow = g_game.getFollowingCreature() if tfollow and tfollow:getName() ~= storage[followName].player then followTE:setText(tfollow:getName()) storage[followName].player = tfollow:getName() end end end) onCreaturePositionChange(function(creature, newPos, oldPos) if creature:getName() == storage[followName].player and newPos then toFollowPos[newPos.z] = newPos end end) macro(1000,"Auto Accept Party",function() if player:getShield() > 2 then return end -- already in a party for s, spec in pairs(getSpectators(false)) do if spec:getShield() == 1 then g_game.partyJoin(spec:getId()) delay(1000) end end end) local text = "pt" local wait = 1 -- minutes macro(100,"Party Request",function() local spectators = getSpectators(pos(), false) if player:getShield() > 2 then return end for i, spec in pairs(spectators) do if (spec:getName() == "ERIC CANTONA") then say(text) delay(10000) end end end) local friendName = "ERIC CANTONA" onScreen= macro(100,"WrocDoEkaAczki50Lewa", function() local spectators = getSpectators(pos(), false) for i, spec in pairs(spectators) do if spec:getName() == friendName then if getDistanceBetween(pos(), spec:getPosition()) < 7 then return CaveBot.setOff() end end end return CaveBot.setOn() end) local max = 7-- trigger target when reach monster count -- local min = 1 -- target off when when reach min monster count -- macro(10, "LURE MONSTERS", function() if getMonsters(6) >= max then TargetBot.setOn() else if getMonsters(4) <= min then TargetBot.setOff() end end end) UI.Label("MPStop %") addTextEdit("manaPercentSTOP", storage.manaPercentStop, function(widget, text) storage.manaPercentStop = text end) macro(100, "StopCaveMana", function() if (manapercent() <= tonumber(storage.manaPercentStop)) then CaveBot.setOff() else CaveBot.setOn() end end) UI.Separator() UI.Separator() UI.Label("------------INNE------------"):setColor("#FFA500") -- HOTKEY TOGGLE CAVEBOT singlehotkey("delete", "SwitchCaveBot", function() if CaveBot.isOff() or TargetBot.isOff() then CaveBot.setOn() TargetBot.setOn() elseif CaveBot.isOn() or TargetBot.isOn() then CaveBot.setOff() TargetBot.setOff() end end) local hardcodedItems = {3031, 3035} macro(100, "AntyPush" ,function() local tile = g_map.getTile(player:getPosition()) if not tile then return end local topItem = tile:getTopUseThing() if topItem and topItem:isStackable() then topItem = topItem:getId() else topItem = 0 end local candidates = {} for _, item in pairs(hardcodedItems) do if item >= 100 and item ~= topItem and findItem(item) then table.insert(candidates, item) end end if #candidates == 0 then return end local lastItem = storage.lastAntiPushItem or 1 if lastItem > #candidates then lastItem = 1 end local item = findItem(candidates[lastItem]) g_game.move(item, player:getPosition(), 2) storage.lastAntiPushItem = lastItem + 1 end) -- TRON EVENT local fragtext = "Wejscie na Tron Event zostalo otwarte! Czekamy na 6 graczy. Teleport do eventu jest na 1 pietrze depo!" local tronEvent = macro(100, "JoinTronEvent", function() end) onTextMessage(function(mode, text) if tronEvent.isOff() then return end if text:lower():find(fragtext) then walk(0) end end) macro(10000, "ExpTokeny", function() useWith(11455, player) end) macro(100, "SPAM MR ACZEK", function() local level = g_game.getLocalPlayer():getLevel() local manarune = 3157 if (manapercent() <= 100) then usewith (manarune, player) end end) UI.Separator() UI.Separator() onTextMessage(function(mode,text) if mode~=20 then return end local itemName = {"Magician's Legs", "magician"} if string.find(text, "Loot of") then for _, lootName in pairs(itemName) do if string.find(text, lootName) then playAlarm() end end end end) -------------------------------------------------------------------------- local panelName = "ssa" if not storage[panelName] then storage[panelName] = { checkBox1 = false, checkBox2 = false } end local ui = setupUI([[ TestPanel < UIWidget image-source: /images/ui/window_headless image-border: 5 padding: 3 height: 45 CheckBox id: check1 anchors.top: parent.top anchors.left: parent.left margin-left: 5 margin-top: 5 UIWidget anchors.top: parent.top anchors.left: check1.right !text: tr('ssa: 0-Spam, 1-LowMana') margin-left: 5 margin-top: 4 CheckBox id: check2 anchors.top: prev.bottom anchors.left: parent.left margin-left: 5 margin-top: 5 margin-bottom: 5 UIWidget anchors.top: parent.top anchors.left: check2.right !text: tr('mr: 0-Spam, 1-LowMana') margin-left: 5 margin-top: 20 Panel id: test height: 35 padding: 3 ]]) local label = UI.createWidget("TestPanel", ui.test) ----------------------------------------------------------------- label.check1:setChecked(storage[panelName].checkBox1) label.check2:setChecked(storage[panelName].checkBox2) label.check1.onClick = function(widget) storage[panelName].checkBox1 = not storage[panelName].checkBox1 widget:setChecked(storage[panelName].checkBox1) end label.check2.onClick = function(widget) storage[panelName].checkBox2 = not storage[panelName].checkBox2 widget:setChecked(storage[panelName].checkBox2) end ---------------------------------------------------------------- macro(100, "SSA", function() if manapercent() <= 30 and label.check1:isChecked() then moveToSlot(3081, SlotNeck) return true elseif manapercent() > 50 and label.check1:isChecked() then moveToSlot(3013, SlotNeck) elseif not label.check1:isChecked() then moveToSlot(3081, SlotNeck) return true end end) macro(100, "MRing", function() if manapercent() <= 25 and label.check2:isChecked() then moveToSlot(3048, SlotFinger) return true elseif manapercent() > 50 and label.check2:isChecked() then moveToSlot(6539, SlotFinger) elseif not label.check2:isChecked() then moveToSlot(3048, SlotFinger) return true end end) -- local ui = setupUI([[ Panel width: 300 height:300 Label id: targetLabel x: 205 y: 110 font: verdana-11px-rounded Label id: caveLabel x: 205 y: 125 font: verdana-11px-rounded ]], g_ui.getRootWidget()) local function getTargetBotStatus() return TargetBot.isOn() and "ON" or TargetBot.isOff() and "OFF" end local function getCaveBotStatus() return CaveBot.isOn() and "ON" or CaveBot.isOff() and "OFF" end local function getColorFromStatus(status) return status == "ON" and "green" or status == "OFF" and "red" end macro(100, function() local targetStatus = getTargetBotStatus() local caveStatus = getCaveBotStatus() local targetColor = getColorFromStatus(targetStatus) local caveColor = getColorFromStatus(caveStatus) ui.targetLabel:setColoredText({"Target: ", "white", targetStatus, targetColor}) ui.caveLabel:setColoredText({"Cavebot: ", "white", caveStatus, caveColor}) end) setDefaultTab("Main") local mkPanelname = "monsterKill" if not storage[mkPanelname] then storage[mkPanelname] = { min = false, lastKills = 0 } end local monsterKill = setupUI([[ Panel margin-top:2 height: 135 Button id: resetList anchors.left: parent.left anchors.top: parent.top width: 20 height: 17 margin-top: 2 margin-left: 3 text: ! color: red tooltip: Reset Data Button id: showList anchors.right: parent.right anchors.top: parent.top width: 20 height: 17 margin-top: 2 margin-right: 3 text: - color: red Label id: title text: Monster Kills text-align: center anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right height: 20 Label id: lastKillLabel text: Last 10 min kills: 0 text-align: center anchors.top: title.bottom anchors.left: parent.left anchors.right: parent.right height: 15 margin-top: 3 color: yellow ScrollablePanel id: content image-source: /images/ui/menubox image-border: 4 image-border-top: 17 anchors.top: lastKillLabel.bottom anchors.left: parent.left anchors.right: parent.right margin-top: 5 height: 88 padding: 3 vertical-scrollbar: mkScroll layout: type: verticalBox BotSmallScrollBar id: mkScroll anchors.top: content.top anchors.bottom: content.bottom anchors.right: content.right margin-top: 2 margin-bottom: 5 margin-right: 5 ]], parent) monsterKill:setId(mkPanelname) killList = {} local lbls = {} local function toggleWin(load) if load then monsterKill:setHeight(40) monsterKill.showList:setText("+") monsterKill.showList:setColor("green") else monsterKill:setHeight(135) monsterKill.showList:setText("-") monsterKill.showList:setColor("red") end end function refreshMK() if #lbls > 0 and (#killList == #lbls) then local i = 1 for k, v in pairs(killList) do lbls[i].name:setText(k .. ':') lbls[i].count:setText("x"..v) i = i + 1 end else for _, child in pairs(monsterKill.content:getChildren()) do child:destroy() end for k, v in pairs(killList) do lbls[k] = g_ui.loadUIFromString([[ Panel height: 16 margin-left: 2 Label id: name text: anchors.top: parent.top anchors.left: parent.left margin-top: 2 text-auto-resize: true font: verdana-11px-bold Label id: count text: anchors.top: name.top anchors.right: parent.right margin-right: 15 text-auto-resize: true color: orange font: verdana-11px-bold ]], monsterKill.content) if lbls[k] then lbls[k].name:setText(k .. ':') lbls[k].count:setText("x"..v) end end end end refreshMK() toggleWin(storage[mkPanelname].min) monsterKill.showList.onClick = function(widget) storage[mkPanelname].min = (monsterKill:getHeight() == 135) toggleWin(storage[mkPanelname].min) end -- Funkcja do resetowania licznika i zapisywania ostatniej sumy local function resetCounter() local totalKills = 0 for _, count in pairs(killList) do totalKills = totalKills + count end storage[mkPanelname].lastKills = totalKills -- Zapisujemy sume monsterKill.lastKillLabel:setText("Last 10 min kills: " .. totalKills) killList = {} refreshMK() warn("Licznik zresetowany. Zabite w ostatnich 10 minutach: " .. totalKills) end monsterKill.resetList.onClick = function(widget) resetCounter() end -- Automatyczne resetowanie co 10 minut (600 sekund) macro(600000, "Reset Monster Kill Counter", function() resetCounter() end) function checkKill(mode, text) local mobName = nil local reg = { "Loot of a (.*):", "Loot of an (.*):", "Loot of the (.*):","Loot of (.*):" } for x = 1, #reg do _, _, mobName = string.find(text, reg[x]) if mobName then if killList[mobName] then killList[mobName] = killList[mobName] + 1 else killList[mobName] = 1 end refreshMK() break end end end onTalk(function(name, level, mode, text, channelId, pos) if channelId == 11 then checkKill(mode, text) end end) onTextMessage(function(mode, text) checkKill(mode, text) end) function getKills(mobName) if killList[mobName] then return killList[mobName] end return nil end function getDumpAllKills() for k, v in pairs(killList) do warn(v .. "x " .. k) end end UI.Separator() UI.Label("-------COMBO LEADER-------") setDefaultTab("Main") local panelName = "CL" if not storage[panelName] then storage[panelName] = { checkBoxSD = false, checkBoxSpell = false } end local ui = setupUI([[ CLPANEL < UIWidget image-source: /images/ui/window_headless image-border: 5 padding: 3 height: 45 CheckBox id: checkSD anchors.top: parent.top anchors.left: parent.left margin-left: 5 margin-top: 5 UIWidget anchors.top: parent.top anchors.left: checkSD.right !text: tr('SD') margin-left: 5 margin-top: 4 CheckBox id: checkSpell anchors.top: prev.bottom anchors.left: parent.left margin-left: 5 margin-top: 5 margin-bottom: 5 UIWidget anchors.top: parent.top anchors.left: checkSpell.right !text: tr('SPELL') margin-left: 5 margin-top: 20 Panel id: CL height: 35 padding: 3 ]]) local label = UI.createWidget("CLPANEL", ui.CL) UI.Separator() UI.Label("Spell:"):setColor("#FFA500") addTextEdit("SpellCL", storage.spellCL, function(widget, text) storage.spellCL = text end) UI.Separator() -- Synchronizacja z przechowywanymi wartoociami label:getChildById("checkSD"):setChecked(storage[panelName].checkBoxSD) label:getChildById("checkSpell"):setChecked(storage[panelName].checkBoxSpell) -- Obs3uga zdarzen dla checkboxów label:getChildById("checkSD").onClick = function(widget) local state = not widget:isChecked() widget:setChecked(state) storage[panelName].checkBoxSD = state if state then label:getChildById("checkSpell"):setChecked(false) storage[panelName].checkBoxSpell = false end end label:getChildById("checkSpell").onClick = function(widget) local state = not widget:isChecked() widget:setChecked(state) storage[panelName].checkBoxSpell = state if state then label:getChildById("checkSD"):setChecked(false) storage[panelName].checkBoxSD = false end end UI.Label("Leader:"):setColor("#c934eb") addTextEdit("leader", storage.comboLeader or "Player name", function(widget, text) storage.comboLeader = text end) addSeparator() -- Makro i logika local m = macro(1000, "Enable combo", function() end) onMissle(function(missle) if m.isOff() then return end local src = missle:getSource() if src.z ~= posz() then return end local from = g_map.getTile(src) local to = g_map.getTile(missle:getDestination()) if not from or not to then return end local fromCreatures = from:getCreatures() local toCreatures = to:getCreatures() if #fromCreatures ~= 1 or #toCreatures ~= 1 then return end local c1 = fromCreatures[1] local t1 = toCreatures[1] if c1:getName():lower() == storage.comboLeader:lower() then if label:getChildById("checkSD"):isChecked() then if not g_game.isAttacking() then g_game.attack(t1) end useWith(3155, t1) elseif label:getChildById("checkSpell"):isChecked() then if not g_game.isAttacking() then g_game.attack(t1) end say(storage.spellCL) end end end)