If you like this site and you like coffee, why not buy me one. Because I love it

Click to buy coffe
avatar
Untitled

Guest 107 24th Sep, 2022

MARKUP 5.77 KB
                                           
                         local manaPercent = 100 macro(7000, "utama",  function()   if (manapercent() <= manaPercent) then     say 'utamo vita'   end end)

local healingSpell = '!mr' local manaPercent = 100 macro(100, "!mr",  function()   if (manapercent() <= manaPercent) then     say(healingSpell)    end end)

--Description: A macro to follow players through stairs, doors, ladders, sewer gates and some other things.
--A message error appears on the log, but other than that everything seems to run well... save for the eventual hiccups.
--ATTENTION: It might not work if multiple "use objects" that lead to different paths are near eachother.

Follow = macro(1000,"Follow",function()

nome = storage.followLeader
end)

UI.Label("Follow Player:")
addTextEdit("playerToFollow", storage.followLeader or "Drozdo", function(widget, text)
    storage.followLeader = text
    target = tostring(text)
end)

nome = storage.followLeader
pos_p = player:getPosition()

p = getCreatureByName(nome)

onCreaturePositionChange(function(creature, newPos, oldPos)
    if Follow.isOn() then
   
        if creature:getName()==player:getName() and getCreatureByName(nome) == nil and newPos.z>oldPos.z then
       
            say('exani tera')
            for i = -1,1 do
              for j = -1,1 do
           
                local useTile = g_map.getTile({x=posx()+i,y=posy()+j,z=posz()})
                 g_game.use(useTile:getTopUseThing())
               
           
              end
            end
        end
        if creature:getName()==nome then
         
           
            if newPos==nil then
               
               
                lastPos = oldPos
               
                schedule(200,function()
                 autoWalk(oldPos)
                end)
               
                schedule(1000,function()
                    for i = -1,1 do
                      for j = -1,1 do
                   
                        local useTile = g_map.getTile({x=posx()+i,y=posy()+j,z=posz()})
                        g_game.use(useTile:getTopUseThing())
                       
                   
                      end
                    end
                end)
           
           
            end
           
            if oldPos.z == newPos.z then
                   
                schedule(300,function()
                 local useTile = g_map.getTile({x=oldPos.x,y=oldPos.y,z=oldPos.z})
                 topThing = useTile:getTopThing()
               
                 if not useTile:isWalkable() then
                   use(topThing)
                 end
               
                end)
           
           
                autoWalk({x=oldPos.x,y=oldPos.y,z=oldPos.z})
            else
           
                lastPos = oldPos
                autoWalk(oldPos)
                for i = 1,6 do
                    schedule(i*200,function()
                      autoWalk(oldPos)
                   
                      if getDistanceBetween(pos(), oldPos) == 0 and (posz()>newPos.z and getCreatureByName(nome) == nil) then
                        say('exani tera')
                      end
                    end)
                end
                local useTile = g_map.getTile({x=newPos.x,y=newPos.y-1,z=oldPos.z})
                 g_game.use(useTile:getTopUseThing())
                           
           
            end
         
       
        end
   
    end
end)
local hpPercent = 99
macro(50, "faster healing",  function()
  if (hppercent() <= hpPercent) then
  say(storage.HealText)
end
end)
addTextEdit("HealText", storage.HealText or "!uh", function(widget, text)
storage.HealText = text
end)local attacker
local targetTime

local attackPK = macro(100, "Attack PK", nil, function()
  if attacker then
    if attacker:getPosition() and attacker:getPosition().z == posz() then
      if g_game.isAttacking() then
        if g_game.getAttackingCreature():getName() ~= attacker:getName() then
          g_game.attack(attacker)
        end
      else
        g_game.attack(attacker)
      end
    end
  else
    if not g_game.isAttacking() then
      TargetBot.setOn()
      CaveBot.setOn()
    end
  end
  if targetTime then
    if now - targetTime > 2500 then
      attacker = nil
    end
  end
end)

onMissle(function(missle)
  if attackPK.isOn() then
    local src = missle:getSource()
    if src.z ~= posz() then
      return
    end
    local shooterTile = g_map.getTile(src)
    if shooterTile then
      local creatures = shooterTile:getCreatures()
      if creatures[1] then
        if creatures[1]:isPlayer() then
          local destination = missle:getDestination()
          if posx() == destination.x and posy() == destination.y then
            if player:getName() ~= creatures[1]:getName() then
              if creatures[1]:getSkull() ~= 0 and attacker ~= creatures[1] then
                attacker = creatures[1]
                targetTime = now
                TargetBot.setOff()
                CaveBot.setOff()
              end
            end
          end
        end
      end
    end
  end
end)
local percent = 10 local idRing = 3007 local m = macro(1, "Auto Ring", function() end) onCreatureHealthPercentChange(function(creature, healthPercent) if m:isOff() then return end if healthPercent > percent and getFinger() then g_game.move(getFinger(), {x = 65535,y = SlotBack, z = 0}); elseif  healthPercent < percent then g_game.move(findItem(idRing), {x = 65535,y = SlotFinger,z = 0}); end end)
                      
                                       
To share this paste please copy this url and send to your friends
RAW Paste Data
Recent Pastes
Ta strona używa plików cookie w celu usprawnienia i ułatwienia dostępu do serwisu oraz prowadzenia danych statystycznych. Dalsze korzystanie z tej witryny oznacza akceptację tego stanu rzeczy.
Wykorzystywanie plików Cookie
Jak wyłączyć cookies?
ROZUMIEM