• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

easy autoloot system

Robotics

Banned User
Joined
Sep 24, 2024
Messages
25
Reaction score
20
g_things.loadOtb('things/1098/items.otb')
you need to do this at client init and add your items.otb


in game interfacte add
LUA:
  if g_game.getFeature(GameBot) and useThing and useThing:isItem() then
    menu:addSeparator()
    local useThingId = useThing:getServerId()

    -- Add option to Add to Autoloot
    menu:addOption("Add to Autoloot", function()
        g_game.talk("!autoloot add," .. useThingId)
    end)

    -- Add option to Remove from Autoloot
    menu:addOption("Remove from Autoloot", function()
        g_game.talk("!autoloot remove," .. useThingId)
    end)
 
   end

and replace that:

LUA:
  if g_game.getFeature(GameBot) and useThing and useThing:isItem() then
    menu:addSeparator()
    local useThingId = useThing:getId()
    if useThing:getSubType() > 1 then
      menu:addOption("ID: " .. useThingId .. " SubType: " .. g_game..setClipboardText(useThingId), function() end)
    else
      menu:addOption("ID: " .. useThingId, function() g_game.setClipboardText(useThingId) end)
    end
  end

then add autoloot system from otland that uses talkaction :)

1727335674164.webp

1727335681090.webp

1727335689986.webp

that should save you 100 euro from buying broken module from someone here :)
Post automatically merged:

modules/client/client.lua
put the items.otb there

LUA:
function onGameStart()
g_logger.info("Loading Items..")
    g_things.loadOtb('items.otb')
 
  local player = g_game.getLocalPlayer()
  if not player then return end
  g_window.setTitle(g_app.getName() .. " - " .. player:getName())
end

the reason to use items.otb is to send serverID instead of clientId to the game.

if your distro uses cid==sid then just rename the getServerId to getId and dont put items.otb on launch and at all.



should be compatible.
Post automatically merged:

LUA:
  if g_game.getFeature(GameBot) and useThing and useThing:isItem() then
    menu:addSeparator()
    local useThingId = useThing:getServerId()

    -- Add option to Add to Autoloot
    menu:addOption("Add to Autoloot", function()
        g_game.talk("!autoloot add," .. useThingId)
    end)

    -- Add option to Remove from Autoloot
    menu:addOption("Remove from Autoloot", function()
        g_game.talk("!autoloot remove," .. useThingId)
    end)
    
    -- Add option to Remove from Autoloot
    menu:addOption("Show Autoloot list", function()
        g_game.talk("!autoloot show")
    end)
    
    -- Add option to Remove from Autoloot
    menu:addOption("Clear Autoloot list", function()
        g_game.talk("!autoloot clear")
    end)
    
   end

v2

1727336420449.webp
 
Last edited:
g_things.loadOtb('things/1098/items.otb')
you need to do this at client init and add your items.otb


in game interfacte add
LUA:
  if g_game.getFeature(GameBot) and useThing and useThing:isItem() then
    menu:addSeparator()
    local useThingId = useThing:getServerId()

    -- Add option to Add to Autoloot
    menu:addOption("Add to Autoloot", function()
        g_game.talk("!autoloot add," .. useThingId)
    end)

    -- Add option to Remove from Autoloot
    menu:addOption("Remove from Autoloot", function()
        g_game.talk("!autoloot remove," .. useThingId)
    end)
 
   end

and replace that:

LUA:
  if g_game.getFeature(GameBot) and useThing and useThing:isItem() then
    menu:addSeparator()
    local useThingId = useThing:getId()
    if useThing:getSubType() > 1 then
      menu:addOption("ID: " .. useThingId .. " SubType: " .. g_game..setClipboardText(useThingId), function() end)
    else
      menu:addOption("ID: " .. useThingId, function() g_game.setClipboardText(useThingId) end)
    end
  end

then add autoloot system from otland that uses talkaction :)

View attachment 87335

View attachment 87336

View attachment 87337

that should save you 100 euro from buying broken module from someone here :)
Post automatically merged:

modules/client/client.lua
put the items.otb there

LUA:
function onGameStart()
g_logger.info("Loading Items..")
    g_things.loadOtb('items.otb')
 
  local player = g_game.getLocalPlayer()
  if not player then return end
  g_window.setTitle(g_app.getName() .. " - " .. player:getName())
end

the reason to use items.otb is to send serverID instead of clientId to the game.

if your distro uses cid==sid then just rename the getServerId to getId and dont put items.otb on launch and at all.



should be compatible.
Post automatically merged:

LUA:
  if g_game.getFeature(GameBot) and useThing and useThing:isItem() then
    menu:addSeparator()
    local useThingId = useThing:getServerId()

    -- Add option to Add to Autoloot
    menu:addOption("Add to Autoloot", function()
        g_game.talk("!autoloot add," .. useThingId)
    end)

    -- Add option to Remove from Autoloot
    menu:addOption("Remove from Autoloot", function()
        g_game.talk("!autoloot remove," .. useThingId)
    end)
   
    -- Add option to Remove from Autoloot
    menu:addOption("Show Autoloot list", function()
        g_game.talk("!autoloot show")
    end)
   
    -- Add option to Remove from Autoloot
    menu:addOption("Clear Autoloot list", function()
        g_game.talk("!autoloot clear")
    end)
   
   end

v2

View attachment 87338
Very thanks man!
 
Back
Top