Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Elfbot -> OTCv8 Bot scripts
#1
Big Grin 
here are some scripts used in elfbot, I didn't attack because most of them are possible through the bot itself without the need for a script.

time ring when hasted:

Code:
macro(100, "Time-ring if haste", function()
  local ring = getFinger()
  if ring then
    if hasHaste() and ring:getId() ~= 3053 then
      if findItem(3053) then
        g_game.move(findItem(3053), {x=65535, y=SlotFinger, z=0}, 1)
      end
    elseif not hasHaste() and ring:getId() == 3090 then
      g_game.move(ring, {x=65535, y=SlotBack, z=0}, 1)
    end
  else
    if hasHaste() then
      if findItem(3053) then
        g_game.move(findItem(3053), {x=65535, y=SlotFinger, z=0}, 1)
      end
    end
  end
end)

Play alarm when boss on screen:

Code:
onCreatureAppear(function(creature)
  if bossAlarm.isOn() then
    if creature:getName():lower() == "demodras" then
      playAlarm()
    end
  end
end)

Mwall infront of player when pressing hotkey shift+f10 (can be changed to any key):

Code:
local key = "shift+f10" -- Hotkey to shoot mwall
local mwallId = 3180 -- Mwall ID
local squaresThreshold = 2 -- Amount of tiles to shoot infront of player

singlehotkey(key, "Mwall target", function()
  local target = g_game.getAttackingCreature()
  if target then
    local targetPos = target:getPosition()
    local targetDir = target:getDirection()
    local mwallTile
    if targetDir == 0 then -- north
      targetPos.y = targetPos.y - squaresThreshold
      mwallTile = g_map.getTile(targetPos)
      useWith(mwallId, mwallTile:getTopUseThing())
    elseif targetDir == 1 then -- east
      targetPos.x = targetPos.x + squaresThreshold
      mwallTile = g_map.getTile(targetPos)
      useWith(mwallId, mwallTile:getTopUseThing())
    elseif targetDir == 2 then -- south
      targetPos.y = targetPos.y + squaresThreshold
      mwallTile = g_map.getTile(targetPos)
      useWith(mwallId, mwallTile:getTopUseThing())
    elseif targetDir == 3 then -- west
      targetPos.x = targetPos.x - squaresThreshold
      mwallTile = g_map.getTile(targetPos)
      useWith(mwallId, mwallTile:getTopUseThing())
    end
  end
end)


Sio friend, you input name and hp % in the text fields:

Code:
macro(100, "Sio Friend", function()
  local friend = getPlayerByName(storage.healFriend)   
  if friend and friend:getHealthPercent() < tonumber(storage.healFriendPercent) then
      say("Exura Sio \"" .. storage.healFriend)
      delay(1000)
  end
end)
addLabel("sioname", "Player name:")
addTextEdit("healfriend", storage.healFriend or "", function(widget, text)   
  storage.healFriend = text
end)
addLabel("siopercent", "Heal Below %:")
addTextEdit("healfriendpercent", storage.healFriendPercent or "", function(widget, text)   
  storage.healFriendPercent = text
end)

Drop empty pots:

Code:
local emptyPotIDs = {283, 284, 285}
macro(500, "Drop Empty Pot", function()
  for _, container in pairs(g_game.getContainers()) do
    for i, item in ipairs(container:getItems()) do
      if table.find(emptyPotIDs, item:getId()) then
        g_game.move(item, pos(), item:getCount())
      end
    end
  end
end)

Credits: Frosty
[-] The following 2 users Like marcoshps11's post:
  • pedrozmg, royalmichael
Reply
#2
thanks for these mate !
Would love to see more of these kind of scripts
Reply
#3
Do you have script for alarm when player/gm on screen?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)