Signup Now
Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Engine States

  1. #1
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28

    Engine States

    Engine States


    Description

    Allows you to quickly enable/disable bot core functions, such as cavebot, targeting, etc.


    Screenshot




    Code

    init start
    -- local SCRIPT_VERSION = '1.0.0'

    local header, closeButton, closed, moving
    local cursorPosition = {}
    local engines = {'Cavebot', 'Looting', 'Targeting', 'Spell Healer', 'Potion Healer', 'Condition Healer', 'Mana Trainer'}

    filterinput(false, true, false, false)

    function inputevents(e)
    if e.type == IEVENT_LMOUSEUP then
    if e.elementid == closeButton then
    closed = true
    return
    end

    for _, v in ipairs(engines) do
    if e.elementid == v.shape then
    toggle(v.name:gsub(' ', '') .. '/Enabled')
    return
    end
    end
    elseif e.elementid == header then
    if e.type == IEVENT_MMOUSEDOWN then
    moving = true
    cursorPosition.x = $cursor.x
    cursorPosition.y = $cursor.y
    return
    elseif e.type == IEVENT_MMOUSEUP then
    moving = false
    return
    end
    end
    end

    -- Taken from Sirmate's MMH
    local blueGradient = {0.0, color(36, 68, 105, 20), 0.23, color(39, 73, 114, 20), 0.76, color(21, 39, 60, 20)}
    local blackGradient = {0.0, color(75, 75, 75, 20), 0.23, color(45, 45, 45, 20), 0.76, color(19, 19, 19, 20)}
    local redGradient = {0.0, color(136, 35, 12, 20), 0.23, color(139, 37, 13, 20), 0.76, color(92, 6, 6, 20)}
    local greenGradient = {0.0, color(65, 96, 12, 20), 0.23, color(67, 99, 13, 20), 0.76, color(36, 52, 6, 20)}

    for k, v in ipairs(engines) do
    engines[k] = {
    name = v,
    shape = nil
    }
    end

    setposition($clientwin.right - 424, $worldwin.top + 300)
    setfontstyle('Tahoma', 8, 75, 0xFFFFFF, 1, 0x000000)
    setfillstyle('gradient', 'linear', 2, 0, 0, 0, 21)
    setbordercolor(color(0, 0, 0, 50))
    setantialiasing(true)
    init end

    auto(100)
    if moving then
    auto(10)
    local curPosition = getposition()
    setposition(
    curPosition.x + ($cursor.x - cursorPosition.x),
    curPosition.y + ($cursor.y - cursorPosition.y)
    )
    cursorPosition.x = $cursor.x
    cursorPosition.y = $cursor.y
    end
    if closed then
    return
    end



    addgradcolors(table.unpack(blueGradient))
    header = addshape('roundrect', 0, 0, 150, 20, 3, 3)
    addtext('ENGINE STATES', 24, 3)

    addgradcolors(table.unpack(blackGradient))
    closeButton = addshape('roundrect', 130, 0, 20, 20, 3, 3)
    addtext('X', 137, 3)

    local isEnabled
    for k, v in ipairs(engines) do
    addgradcolors(table.unpack(blackGradient))
    addshape('roundrect', 0, k * 23, 150, 20, 3, 3)
    addtext(v.name, 6, k * 23 + 3)

    isEnabled = get(v.name:gsub(' ', '') .. '/Enabled') == 'yes'
    addgradcolors(table.unpack(tern(isEnabled, greenGradient, redGradient)))
    engines[k].shape = addshape('roundrect', 120, k * 23, 30, 20, 3, 3)
    addtext(tern(isEnabled, 'ON', 'OFF'), 126 + tern(isEnabled, 2, 0), k * 23 + 3)
    end

    Git
    Last edited by Raphael; 04-26-2014 at 09:17 PM.

  2. #2
    Moderator sirmate's Avatar
    Join Date
    Dec 2013
    Location
    Poland
    Posts
    42
    Reputation
    37
    Rep Power
    0
    Looks nice. Good job, waiting for more stuff
    (๏̯͡๏ )

  3. #3
    Wind Powered
    Join Date
    Dec 2013
    Location
    dvscripts.com
    Posts
    7,105
    Reputation
    433
    Rep Power
    39
    error in HUD script EngineStates:
    [" toggle(v.name:gsub(' ', '') .. '/E..."]:EngineStates:17 attempt to call global 'toggle' (a nil value)


    its showing this error
    Regards

  4. #4
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by Dworak View Post
    error in HUD script EngineStates:
    [" toggle(v.name:gsub(' ', '') .. '/E..."]:EngineStates:17 attempt to call global 'toggle' (a nil value)


    its showing this error
    Regards
    Please read the requirements.

  5. #5
    Wind Powered
    Join Date
    Dec 2013
    Location
    dvscripts.com
    Posts
    7,105
    Reputation
    433
    Rep Power
    39
    Ahh sorry i was think its with Wind Instalation but there was older version of your Lib, i Downloaded new and all is ok, Great ;-)

  6. #6
    Free User L!p3's Avatar
    Join Date
    Dec 2013
    Location
    Brazil
    Posts
    52
    Reputation
    21
    Rep Power
    21
    Can you do something like this to add waypoints?


    It's fucking ugly, just to show the idea.

    You can select the randoms 1,2,3 and also the directions.

  7. #7
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by L!p3 View Post
    Can you do something like this to add waypoints?


    It's fucking ugly, just to show the idea.

    You can select the randoms 1,2,3 and also the directions.
    I have something better coming.

  8. #8
    Moderator SuNe's Avatar
    Join Date
    Dec 2013
    Location
    Sweden
    Posts
    2,881
    Reputation
    186
    Rep Power
    27
    Quote Originally Posted by Raphael View Post
    I have something better coming.
    Want we cant wait! ;p
    กิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิ ิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิ ิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิ ิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิ ิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิ ิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิ ิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิ ิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิก ิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิ ิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิ ิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิ ิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิ ิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิ ิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิ ิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิ ิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิ ิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิ ิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิ ิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิ ิิิิิิิิิิิิิิิิกิิิิิิิิิิิิิิิิิิิิกิิิิิิิิิิิิ ิิิิิิิิ

  9. #9
    Free User Tinicius's Avatar
    Join Date
    Dec 2013
    Posts
    135
    Reputation
    20
    Rep Power
    21
    can't move it with right click? :c

  10. #10
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    Quote Originally Posted by Tinicius View Post
    can't move it with right click? :c
    Middle click.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •