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
Unequip Ring and Disable Ring Equiper in PZ
#1
Is it possible to have a script where in PZ unequip ring and disable Ring Equiper?
And outside pz enable ring equipper

Thank you!
Reply

#2
Hello.

I'm not close to depot atm, but I'm almost sure that RetroCores client doesn't gives information about protection zone. So Bot is not able to detect when you are on a protection zone.
However, i could make that happen based in your position if you like. So you add pzone positions or outside pz position then the script check for your current position... Just let me know.
Reply

#3
|Only Registered members can see download links. | Click here to buy subscription or here to register.

That would work, thank you mate!
Reply

#4
Hello.

I've adapted the following script to work like you need:
|Only Registered members can see download links. | Click here to buy subscription or here to register.


Both scripts below will check if you are at on of the specified positions then use setsettings(path, false) to disable every tool you added to "TOOLS" table, for example: 'Tools/Ring Equipper/Enabled', which is the "path" to enable/disable Ring Equipper. If you are not on any of the specified positions then it will use setsettings(path, true) to enable every tool you added to "TOOLS" table.


This script uses locations with range, very similar to Cavebot, which can make your life easier if you know how to use it. You could even use HUDs -> Show waypoints and create waypoints then just insert the wpt coordinates and range to the script. So you would actually see where exactly it would work.
local LOCATIONS = {
    { X = 32956, RangeX = 3, Y = 32075, RangeY = 3 } -- This will check if you are on X = 32956, 32957 or 32958 AND Y = 32075, 32076 or 32077.
    { X = 32956, RangeX = 1, Y = 32075, RangeY = 1 } -- If you wanna check for a specific SQM use RangeX and RangeY = 0.
}
local TOOLS = { -- Tools to disable when you are inside pzone and enable when you are out of pzone.
    'Tools/Ring Equipper/Enabled'
}

if connected() then
    local player_x = posx()
    local player_y = posy()
    local player_z = posz()

    local flag = false
    for _, temple_location in ipairs(LOCATIONS) do
        if (player_x >= temple_location.X and player_x <= (temple_location.X + temple_location.RangeX - 1)) and (player_y >= temple_location.Y and player_y <= (temple_location.Y + temple_location.RangeY - 1)) and player_z == temple_location.Z then
            flag = true
            break
        end
    end

    if flag then
        for _, setting in ipairs(TOOLS) do
            if getsettings(setting) == true then
                setsettings(setting, false)
            end
        end
    else
        for _, setting in ipairs(TOOLS) do
            if getsettings(setting) == false then
                setsettings(setting, true)
            end
        end
    end
end

This script does the same, except it don't use ranges. So you would need to add every single sqm.
local LOCATIONS = {
    { X = 32957, Y = 32076, Z = 7 },
    { X = 32958, Y = 32076, Z = 7 },
    { X = 32956, Y = 32076, Z = 7 },
    { X = 32957, Y = 32075, Z = 7 },
    { X = 32957, Y = 32077, Z = 7 },
    { X = 32956, Y = 32075, Z = 7 },
    { X = 32958, Y = 32077, Z = 7 },
    { X = 32958, Y = 32075, Z = 7 },
    { X = 32956, Y = 32077, Z = 7 },
}

local TOOLS = { -- Tools to disable when you are inside pzone and enable when you are out of pzone.
    'Tools/Ring Equipper/Enabled'
}

if connected() then
    local player_x = posx()
    local player_y = posy()
    local player_z = posz()

    local flag = false
    for _, temple_location in ipairs(LOCATIONS) do
        if player_x == temple_location.X and player_y == temple_location.Y and player_z == temple_location.Z then
            flag = true
            break
        end
    end

    if flag then
        for _, setting in ipairs(TOOLS) do
            if getsettings(setting) == true then
                setsettings(setting, false)
            end
        end
    else
        for _, setting in ipairs(TOOLS) do
            if getsettings(setting) == false then
                setsettings(setting, true)
            end
        end
    end
end
Reply



Forum Jump:



Forum software by © MyBB Theme © iAndrew 2016