Here you can change website language:

Autor Wątek: ZAMIANA CC/GN/DC  (Przeczytany 20920 razy)

0 użytkowników i 1 Gość przegląda ten wątek.

Strażnik Teksasu

ZAMIANA CC/GN/DC
« dnia: 12 Listopad 2019, 21:40:11 »
Wiele osób pyta o tenże skrypt:

Gold na platynki:
auto 200 listas 'Change GC' | stackitems | if [ $itemcount.3031>= 100 ] equipbelt 3031 | if [ $beltslot.id == 3031 && $beltslot.count == 100] useitem 3031

Platynki na CC:
auto 200 listas 'Change PC' | stackitems | if [ $itemcount.3035>= 100 ] equipbelt 3035 | if [ $beltslot.id == 3035 && $beltslot.count == 100] useitem 3035

CC na GN:
 auto 200 listas 'Change cc' | stackitems | if [ $itemcount.3043>= 100 ] equipbelt 3043 | if [ $beltslot.id == 3043 && $beltslot.count == 100] useitem 3043

GN na DC:
 auto 200 listas 'Change GN' | stackitems | if [ $itemcount.3040>= 100 ] equipbelt 3040 | if [ $beltslot.id == 3040 && $beltslot.count == 100] useitem 3040

Mam nadzieję, że chociaż jednej osobie pomogłem. :)
« Ostatnia zmiana: 07 Wrzesień 2020, 17:21:08 wysłana przez Reksio »
 
Osoby które lubią ten post: Krzyż, Bajamor, Dembibot

Krzyż

  • Zasłużony
  • Dziadyga
  • *
  • Wiadomości: 74
  • Polubień: 61
  • Reputacja: 11
  • Gdzie Jest Krzyż!
    • Zobacz profil
Odp: Zamiana GN na DC
« Odpowiedź #1 dnia: 12 Listopad 2019, 23:09:14 »
Dobry poradnik, ale bym dodał odrazu gold na platynki, platynki na cc, cc na gn, żeby było wszystko w jednym miejscu.
 
Osoby które lubią ten post: Strażnik Teksasu

Kalio

  • Przybysz
  • *
  • Wiadomości: 2
  • Reputacja: 0
    • Zobacz profil
Odp: ZAMIANA CC/GN/DC
« Odpowiedź #2 dnia: 28 Listopad 2020, 15:31:25 »
Siemanko, a w bocie na kliencie jak ustawic? Jest wgl. taka mozliwosc?;p
 

Dembibot

Odp: ZAMIANA CC/GN/DC
« Odpowiedź #3 dnia: 05 Luty 2021, 06:36:50 »
 8) siemano jest opcją w bocie wchodzimy do gry w Bota tam jest w opcjach ścieżka do folderu z botem wchodzimy edytujemy tools.Lua I znajdujemy skrypt exchange money kopiujemy I wklejamy po nim zmieniając IP przedmiotów na 3043 I 3040 na pulpicie wychodzimy z notatnika I podmieniamy tools. Lua na zapisany plik.dzieki temu zyskujemy przycisk w bocie możemy wlaczac I wyłączać. Pamietajcie by wyłaczyc klienta zanim edytujemy plik  :)
« Ostatnia zmiana: 05 Luty 2021, 06:39:23 wysłana przez Dembibot »
 
Osoby które lubią ten post: kakmak

sir metka

Odp: ZAMIANA CC/GN/DC
« Odpowiedź #4 dnia: 11 Marzec 2021, 11:39:17 »
-- tools tab
setDefaultTab("Tools")

-- allows to test/edit bot lua scripts ingame, you can have multiple scripts like this, just change storage.ingame_lua
UI.Button("Ingame macro editor", function(newText)
  UI.MultilineEditorWindow(storage.ingame_macros or "", {title="Macro editor", description="You can add your custom macros (or any other lua code) here"}, function(text)
    storage.ingame_macros = text
    reload()
  end)
end)
UI.Button("Ingame hotkey editor", function(newText)
  UI.MultilineEditorWindow(storage.ingame_hotkeys or "", {title="Hotkeys editor", description="You can add your custom hotkeys/singlehotkeys here"}, function(text)
    storage.ingame_hotkeys = text
    reload()
  end)
end)

UI.Separator()

for _, scripts in ipairs({storage.ingame_macros, storage.ingame_hotkeys}) do
  if type(scripts) == "string" and scripts:len() > 3 then
    local status, result = pcall(function()
      assert(load(scripts, "ingame_editor"))()
    end)
    if not status then
      error("Ingame edior error:\n" .. result)
    end
  end
end

UI.Separator()

UI.Button("Zoom In map [ctrl + =]", function() zoomIn() end)
UI.Button("Zoom Out map [ctrl + -]", function() zoomOut() end)

UI.Separator()

local moneyIds = {3043, 3040} -- gold coin, platinium coin
macro(1000, "Exchange money", function()
  local containers = g_game.getContainers()
  for index, container in pairs(containers) do
    if not container.lootContainer then -- ignore monster containers
      for i, item in ipairs(container:getItems()) do
        if item:getCount() == 100 then
          for m, moneyId in ipairs(moneyIds) do
            if item:getId() == moneyId then
              return g_game.use(item)           
            end
          end
        end
      end
    end
  end
end)

macro(1000, "Stack items", function()
  local containers = g_game.getContainers()
  local toStack = {}
  for index, container in pairs(containers) do
    if not container.lootContainer then -- ignore monster containers
      for i, item in ipairs(container:getItems()) do
        if item:isStackable() and item:getCount() < 100 then
          local stackWith = toStack[item:getId()]
          if stackWith then
            g_game.move(item, stackWith[1], math.min(stackWith[2], item:getCount()))
            return
          end
          toStack[item:getId()] = {container:getSlotPosition(i - 1), 100 - item:getCount()}
        end
      end
    end
  end
end)

macro(10000, "Anti Kick",  function()
  local dir = player:getDirection()
  turn((dir + 1) % 4)
  turn(dir)
end)

UI.Separator()
UI.Label("Drop items:")
if type(storage.dropItems) ~= "table" then
  storage.dropItems = {283, 284, 285}
end

local foodContainer = UI.Container(function(widget, items)
  storage.dropItems = items
end, true)
foodContainer:setHeight(35)
foodContainer:setItems(storage.dropItems)

macro(5000, "drop items", function()
  if not storage.dropItems[1] then return end
  if TargetBot and TargetBot.isActive() then return end -- pause when attacking
  for _, container in pairs(g_game.getContainers()) do
    for __, item in ipairs(container:getItems()) do
      for i, dropItem in ipairs(storage.dropItems) do
        if item:getId() == dropItem.id then
          if item:isStackable() then
            return g_game.move(item, player:getPosition(), item:getCount())
          else
            return g_game.move(item, player:getPosition(), dropItem.count) -- count is also subtype
          end
        end
      end
    end
  end
end)

UI.Separator()

UI.Label("Mana training")
if type(storage.manaTrain) ~= "table" then
  storage.manaTrain = {on=false, title="MP%", text="utevo lux", min=80, max=100}
end

local manatrainmacro = macro(1000, function()
  if TargetBot and TargetBot.isActive() then return end -- pause when attacking
  local mana = math.min(100, math.floor(100 * (player:getMana() / player:getMaxMana())))
  if storage.manaTrain.max >= mana and mana >= storage.manaTrain.min then
    say(storage.manaTrain.text)
  end
end)
manatrainmacro.setOn(storage.manaTrain.on)

UI.DualScrollPanel(storage.manaTrain, function(widget, newParams)
  storage.manaTrain = newParams
  manatrainmacro.setOn(storage.manaTrain.on)
end)

UI.Separator()

macro(60000, "Send message on trade", function()
  local trade = getChannelId("advertising")
  if not trade then
    trade = getChannelId("trade")
  end
  if trade and storage.autoTradeMessage:len() > 0 then   
    sayChannel(trade, storage.autoTradeMessage)
  end
end)
UI.TextEdit(storage.autoTradeMessage or "I'm using OTClientV8!", function(widget, text)   
  storage.autoTradeMessage = text
end)

UI.Separator()
 
Osoby które lubią ten post: savio

savio

  • Przybysz
  • *
  • Wiadomości: 1
  • Reputacja: 0
    • Zobacz profil
Odp: ZAMIANA CC/GN/DC
« Odpowiedź #5 dnia: 21 Maj 2021, 22:37:47 »
-- tools tab
setDefaultTab("Tools")

-- allows to test/edit bot lua scripts ingame, you can have multiple scripts like this, just change storage.ingame_lua
UI.Button("Ingame macro editor", function(newText)
  UI.MultilineEditorWindow(storage.ingame_macros or "", {title="Macro editor", description="You can add your custom macros (or any other lua code) here"}, function(text)
    storage.ingame_macros = text
    reload()
  end)
end)
UI.Button("Ingame hotkey editor", function(newText)
  UI.MultilineEditorWindow(storage.ingame_hotkeys or "", {title="Hotkeys editor", description="You can add your custom hotkeys/singlehotkeys here"}, function(text)
    storage.ingame_hotkeys = text
    reload()
  end)
end)

UI.Separator()

for _, scripts in ipairs({storage.ingame_macros, storage.ingame_hotkeys}) do
  if type(scripts) == "string" and scripts:len() > 3 then
    local status, result = pcall(function()
      assert(load(scripts, "ingame_editor"))()
    end)
    if not status then
      error("Ingame edior error:\n" .. result)
    end
  end
end

UI.Separator()

UI.Button("Zoom In map [ctrl + =]", function() zoomIn() end)
UI.Button("Zoom Out map [ctrl + -]", function() zoomOut() end)

UI.Separator()

local moneyIds = {3043, 3040} -- gold coin, platinium coin
macro(1000, "Exchange money", function()
  local containers = g_game.getContainers()
  for index, container in pairs(containers) do
    if not container.lootContainer then -- ignore monster containers
      for i, item in ipairs(container:getItems()) do
        if item:getCount() == 100 then
          for m, moneyId in ipairs(moneyIds) do
            if item:getId() == moneyId then
              return g_game.use(item)           
            end
          end
        end
      end
    end
  end
end)

macro(1000, "Stack items", function()
  local containers = g_game.getContainers()
  local toStack = {}
  for index, container in pairs(containers) do
    if not container.lootContainer then -- ignore monster containers
      for i, item in ipairs(container:getItems()) do
        if item:isStackable() and item:getCount() < 100 then
          local stackWith = toStack[item:getId()]
          if stackWith then
            g_game.move(item, stackWith[1], math.min(stackWith[2], item:getCount()))
            return
          end
          toStack[item:getId()] = {container:getSlotPosition(i - 1), 100 - item:getCount()}
        end
      end
    end
  end
end)

macro(10000, "Anti Kick",  function()
  local dir = player:getDirection()
  turn((dir + 1) % 4)
  turn(dir)
end)

UI.Separator()
UI.Label("Drop items:")
if type(storage.dropItems) ~= "table" then
  storage.dropItems = {283, 284, 285}
end

local foodContainer = UI.Container(function(widget, items)
  storage.dropItems = items
end, true)
foodContainer:setHeight(35)
foodContainer:setItems(storage.dropItems)

macro(5000, "drop items", function()
  if not storage.dropItems[1] then return end
  if TargetBot and TargetBot.isActive() then return end -- pause when attacking
  for _, container in pairs(g_game.getContainers()) do
    for __, item in ipairs(container:getItems()) do
      for i, dropItem in ipairs(storage.dropItems) do
        if item:getId() == dropItem.id then
          if item:isStackable() then
            return g_game.move(item, player:getPosition(), item:getCount())
          else
            return g_game.move(item, player:getPosition(), dropItem.count) -- count is also subtype
          end
        end
      end
    end
  end
end)

UI.Separator()

UI.Label("Mana training")
if type(storage.manaTrain) ~= "table" then
  storage.manaTrain = {on=false, title="MP%", text="utevo lux", min=80, max=100}
end

local manatrainmacro = macro(1000, function()
  if TargetBot and TargetBot.isActive() then return end -- pause when attacking
  local mana = math.min(100, math.floor(100 * (player:getMana() / player:getMaxMana())))
  if storage.manaTrain.max >= mana and mana >= storage.manaTrain.min then
    say(storage.manaTrain.text)
  end
end)
manatrainmacro.setOn(storage.manaTrain.on)

UI.DualScrollPanel(storage.manaTrain, function(widget, newParams)
  storage.manaTrain = newParams
  manatrainmacro.setOn(storage.manaTrain.on)
end)

UI.Separator()

macro(60000, "Send message on trade", function()
  local trade = getChannelId("advertising")
  if not trade then
    trade = getChannelId("trade")
  end
  if trade and storage.autoTradeMessage:len() > 0 then   
    sayChannel(trade, storage.autoTradeMessage)
  end
end)
UI.TextEdit(storage.autoTradeMessage or "I'm using OTClientV8!", function(widget, text)   
  storage.autoTradeMessage = text
end)

UI.Separator()
 

Maoci

  • Przybysz
  • *
  • Wiadomości: 2
  • Reputacja: 0
    • Zobacz profil
Odp: ZAMIANA CC/GN/DC
« Odpowiedź #6 dnia: 21 Sierpień 2021, 03:32:40 »
Add this to vbot.lua // Dodaj to do vbot.lua

-- Count items without taking equipment in account // Only open backpacks
function itemAmountNoEQ(id)
    local totalItemCount = 0
    for _, container in pairs(getContainers()) do
        if not container:getName():lower():find("depot") and not container:getName():lower():find("your inbox") then
            for _, item in ipairs(container:getItems()) do
                totalItemCount = item:getId() == id and totalItemCount +
                                     item:getCount() or totalItemCount
            end
        end
    end
    return totalItemCount -- return total amount of items in backpack
end

Add this to ingame scripts or somewhere so it will be executed "ONCE" // Dodaj to do "ingame scripts" lub gdzieś gdzie bedzie to wykonane tylko "RAZ"
-- macro to auto replace currency per 100 ms
macro(100, "Auto Currency Replacer", function()
  local itemCounter = {}
  itemCounter[3031] = itemAmountNoEQ(3031) -- gold coins
  itemCounter[3035] = itemAmountNoEQ(3035) -- platinum coins
  itemCounter[3043] = itemAmountNoEQ(3043) -- crystal coins
  itemCounter[3042] = itemAmountNoEQ(3042) -- scara coin (propably not used in this server - but whatever)
  itemCounter[3040] = itemAmountNoEQ(3040) -- gold nugget
-- to add more coins do as examples above :)

  local skipCrystal = false;
  for i, container in pairs(getContainers()) do
    for j, item in ipairs(container:getItems()) do
      if itemCounter[item:getId()] then
        if item:getCount() == 100 then
          if(not item:getId() == 3043) then -- it its not crystal coins do as always
            g_game.use(item)
          else -- its crystal coins
            if(itemCounter[item:getId()] > 100) then -- if total amount of coins from open bags is greater then 100 proceed
              if(skipCrystal) then -- always skip first crystal that is 100 (used to pay for staff somewhere i leaved this code)
                g_game.use(item)
              else
                skipCrystal = true
              end
            end
          end
        end
      end
    end
  end
end)

Hope i help :) // Mam nadzieje że pomogłem :)
 

Maly Lulus

Odp: ZAMIANA CC/GN/DC
« Odpowiedź #7 dnia: 12 Listopad 2022, 18:49:50 »
Ale w telefonie oczywiście się nie da nic ustawić
Maly Lulus