Jump to content

Request Script


Zelek

Recommended Posts

13 hours ago, Xanav said:

Need script for transform on db OTS, and anty kick for 4 hours.

How do you know if you transformed tho?

Currently there is no option to check creature's outfit so my second guess would be that max hp increases?

if not g_game.isOnline() then return end
local transformUntilMaxHP = 2000 -- will cast the spell until character's max hp is atleast this amount
local player = g_game.getLocalPlayer()
if player:getMaxHealth() <= transformUntilMaxHP then
  g_game.talk("transform")
  sleep(900, 1100)
end
auto(100)

To prevent being kicked you can load the script "Anti-Idle" that is included in the bot by default.

Link to comment
Share on other sites

41 minutes ago, Bartek said:

Script for dbl use "furie" or "F4"  if 95 rage or 1 time to 5-10 sec

local player = g_game.getLocalPlayer()
if player:getSoul() <= 95 then
  g_game.talk("furie")
  sleep(900, 1100)
end
auto(100)

 

Link to comment
Share on other sites

Quote

local coinIds = {3031}
local containers = g_game.getContainers()
for v, container in pairs(containers) do
    if container:getItemsCount() > 0 then
        local containerItems = container:getItems()
        for j, item in pairs(containerItems) do
            for _, coinId in pairs(coinIds) do
                if coinId == item:getId() and item:getCount() == 100 then
                    g_game.useItem(item)
                    break
                end
            end
        end
    end
end
auto(200)

This script is bugged, when bot try to change to coin just log off from game. Return Of The Saiyans

Link to comment
Share on other sites

9 minutes ago, Kurwiererererer said:

This script is bugged, when bot try to change to coin just log off from game. Return Of The Saiyans

How is that a script request? Also it does work, probably the server you are playing at just have very strict limit of packets per second and you just have to increase the delay in the script.

Link to comment
Share on other sites

3 minutes ago, Zelek said:

How is that a script request? Also it does work, probably the server you are playing at just have very strict limit of packets per second and you just have to increase the delay in the script.

So... I request gold changer for Return Of The Saiyans. I changed (auto) from 200 to 20000 and 10000. Still DCs.

Link to comment
Share on other sites

1 hour ago, aline said:

could you make a script for me?
use  magic when you have 4 monsters glued to the character?

if #g_game.getMonstersAround(1) >= 4 and g_game.isAttacking() then
  g_game.sendKey("F1")
end
auto(100)

 

Link to comment
Share on other sites

13 hours ago, Xanav said:

Need anty kick for timer, like 15 minutes and turn. 

 

local config = {
  timeToTurn = 15 * 60 * 1000, -- 15 minutes
  directions = { Direction.North, Direction.South, Direction.West, Direction.East }
}

if not g_game.isOnline() then
  return
end
local currentDir = g_game.getLocalPlayer():getDirection()
repeat
  local newDir = config.directions[math.random(1, #config.directions)]
  g_game.turn(newDir)
  sleep(1000)
until (g_game.getLocalPlayer():getDirection() ~= currentDir)
auto(config.timeToTurn)

 

Link to comment
Share on other sites

11 hours ago, Karma1 said:

I would like to make a request for dropping a specific item on a desired position to make like an loot bag u know? would appreciate if its possible

local itemsToDrop = {3316, 4276} -- populate this table with items IDs you would like to drop
local containers = g_game.getContainers()
local player = g_game.getLocalPlayer()

local function getItemsCount()
  local count = 0
  for v, k in pairs(itemsToDrop) do
    count = count + player:getItemsCount(k)
  end
  return count
end

repeat
  for i = 1, getItemsCount() do
    for v, k in pairs(itemsToDrop) do
      g_game.move(k, player:getPosition(), 100)
      sleep(100)
    end
  end
until getItemsCount() == 0

 

Add it as waypoint action in the place where you would like to drop the items

  • Like 1
Link to comment
Share on other sites

7 hours ago, wildbrood said:

Hey Zelek, how can I make the following scripts and some Questions:

 

Use a Skill when I have 2 or 3 Mobs near me. 

Also, how to use skill on the bot. I didn't find a way to use the hotkeys.

 

Link to comment
Share on other sites

On 10/20/2020 at 6:31 PM, kolos189 said:

moving items to chosen bp 

auto(500)
local itemIDs = {23876} -- populate this table with items IDs you would like to move to the specified backpack
local backpackToMove = "reward backpack"
local containers = g_game.getContainers()

local function findContainer()
    for _, container in pairs(containers) do
        if container:getName() == backpackToMove then
            return container
        end
    end
end
local containerToMove = findContainer()
if not containerToMove then return end

for i = 1, #containers do
    local items = containers[i]:getItems()
    for _, item in pairs(items) do
        if table.find(itemIDs, item:getId()) then
            g_game.move(item:getId(), containerToMove:getSlotPosition(math.max(0, #items-1)), item:getCount())
            return
        end
    end
end

 

Link to comment
Share on other sites

*Is It possible to make a script for RoTs as there is Excaviation spots on the ground everywhere if i make a script making it running all surface. I have a shovel that i would like it to use on this spots when it scans around me while running the map. Sorry if i wrote in a complicated way but hope u understand.

Link to comment
Share on other sites

53 minutes ago, Karma1 said:

*Is It possible to make a script for RoTs as there is Excaviation spots on the ground everywhere if i make a script making it running all surface. I have a shovel that i would like it to use on this spots when it scans around me while running the map. Sorry if i wrote in a complicated way but hope u understand.

Anything related to reading the map (sqms, items on the ground etc) isn't currently possible.

I'm planning to add it in the future releases (not beta).

  • Like 1
Link to comment
Share on other sites

14 hours ago, dragusioo said:

Need script for healing with 3 other potions, first potion is using when i have 81% hp to 60% 

next potion its for 60% and lower

and next its mana potion if mana lower than 50% and health above 60%

Can't you just set it up in the built-in healer?

Link to comment
Share on other sites

5 hours ago, kolos189 said:

Hey i need a script to refill ammo in hand if its possible. 

Ammo id 7368

if not g_game.isOnline() then return end
local leftSlot = 6
local rightSlot = 5
g_game.move(7368, {x=65535, y=leftSlot, z=0}, 100)
auto(5000)

Currently there is no way to read player's equipment to know when the weapon is gone, so it's best to just move the items every x amount of time.

I'll be adding it in the future versions.

  • Thanks 1
Link to comment
Share on other sites

×
×
  • Create New...