Everyone who has never used our Bots before, can test each one for 2 days without any limitation.
The trial is given automatically when you login on the Bot, but in some cases it wouldn't work (security reasons).
If this happens, send me a private message and i will be checking the failed trials manually and adding it for those who didn't get it.
We are looking for resellers who may accept payment methods different from ours, including classictibia's cash, realesta's cash, mastercores' cash, etc. Interested? Click here at anytime.



Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Humanizer script
#1
Would it be possible to make a script which sometimes randomly pushes items which are on the floor to a random other position?

Like, when I'm hunting manually, out of boredom I tend to randomly move items i come across on the floor. Mostly corpses of monsters.
For example, I am hunting dwarf guards, and I want a script which with a certain random value throws a dead body some SQM away.

Like:
local itemIDs = {3294, 2853, 3049}

local function getRandomOffset()
    return math.random(-3, 3)
end

-- Main loop
while true do
        for _, itemId in ipairs(itemIDs) do
        local nearbyItem = finditemonground(itemId)
        if nearbyItem then
            -- Calculate random offsets for target coordinates
            local offsetX, offsetY = getRandomOffset(), getRandomOffset()

            -- Calculate the target position
            local targetX, targetY, targetZ = posx() + offsetX, posy() + offsetY, posz()

            -- Move the item to the target position
            if ground(targetX, targetY, targetZ) == 1 then
                moveitem(itemId, targetX, targetY, targetZ)
            end
        end
    end

    -- Adjust the probability of moving an item by changing the range of the random value
    if math.random(1, 100) <= 50 then 
        wait(1000, 10000)
    end
end

But this isn't working.
I'm sure you know what I mean and can come up with something brilliant again.

Best would be if i sometimes quickly throw something when walking past that specific item
Reply

#2
Hello.

Try something like this.
This script will randomly work (50% chance on every run), it will check if the top item of tiles around is listed and move it on some random place.
local ITEMS_IDS = {3294, 2853, 3049}

if math.random(1, 100) <= 50 and connected() then
    local playerX, playerY, playerZ = posx(), posy(), posz()
    local tiles = gettiles()
    for _, tile in ipairs(tiles) do
        if math.abs(tile.posx - playerX) <= 1 and math.abs(tile.posy - playerY) <= 1 and tile.posz == playerZ and table.find(ITEMS_IDS, tile.topitem.id) ~= nil then
            moveitems(tile.topitem.id, ground(tile.posx + math.random(-3, 3), tile.posy + math.random(-3, 3), tile.posz), ground(tile.posx, tile.posy, tile.posz))
            break
        end
    end
end
Reply

#3
Works, thanks
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016