Ark KB+M Macro Key script

This script allows those of us with KB+M to quickly access the second half of our hotbar without holding L1 (which is different for all of us) this script is customizable and easy to set up
Version3
AuthorHype Kickz
Publish DateWed, 6 Sep 2017 - 00:59
Last UpdateWed, 20 Sep 2017 - 01:48
Downloads116
RATE


1

1

Release Notes: DOESNT WORK WITH CONTROLLER Reworked script all your previous set ups should still work you can now use toggles
Code: Select all
/*
 
SCRIPT SUMMARY
      open This script is made for KB+M   
      this script is customizable for KB+M
      if you open up the "main" portion if not already opened
      you will see that above every "if" is a line of text that says
      L1+"blah blah"the L1+"blah blah" is the quivalent to you Holding L1 and
      pressing one of the 6 hotbar buttons, in MaxAimDI plugin on the bottum
      there should be blank openings that are labeled ACCX, ACCY etc etc....
      just like in every line that contains "if" in the "main" portion of this
      script each button in the bottum of the MaxAim corresponds to a button in
      this script EX: if you bind "M" to "ACCX" when in ark if u press "M" the
      script will excute holding down L1 and pressing Square
 
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
 
QUICK SETUP GUIDE
 
      ACCX Binded to L1+SQUARE
      ACCY Binded to L1+TRIANGLE
      ACCZ Binded to L1+CIRCLE
      GYROX Binded to L1+X/CROSS
      GYROY Binded to L1+D-LEFT
      GYROZ Binded to L1+D-RIGHT
 
 
      When toggle is set to "ON" you can press just Circle, Square, etc... to a
      access the second part of your hotbar
 
      see lines (92-98) for toggle controls
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
 
VERSION HISTORY
    Version 1
       -- Compatable with Ark V1.39 and below
       -- Customizable
       -- Quick SetUp Guide included
    Version 2
       -- Console Definitions added for additional Customization
       -- LED function added for future installation of Controller LED
            customization
    Version 3
       -- Script re-worked
       -- Script now contains toggle buttons
       -- Now works with controller
       -- LED function lights removed do to bug will be added back
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
 
AUTHORS NOTES
        This script works with controller and KB+M
 
 
 
*/

 
 
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
 
//DO NOT TOUCH BELOW LINES(65-85)UNLESS YOU KNOW WHAT YOUR DOING
define HOME          = 0;      // XB1_XBOX    XB360_XBOX   PS4_PS           PS3_PS
define SHARE         = 1;      // XB1_VIEW    XB360_BACK   PS4_SHARE        PS3_SELECT
define OPTIONS       = 2;      // XB1_MENU    XB360_START  PS4_OPTIONS      PS3_START
define R1            = 3;      // XB1_RB      XB360_RB     PS4_R1           PS3_R1
define SHOOT         = 4;      // XB1_RT      XB360_RT     PS4_R2           PS3_R2
define R3            = 5;      // XB1_RS      XB360_RS     PS4_R3           PS3_R3
define L1            = 6;      // XB1_LB      XB360_LB     PS4_L1           PS3_L1
define L2            = 7;      // XB1_LT      XB360_LT     PS4_L2           PS3_L2
define L3            = 8;      // XB1_LS      XB360_LS     PS4_L3           PS3_L3
define RX            = 9;      // XB1_RX      XB360_RX     PS4_RX           PS3_RX
define RY            = 10;     // XB1_RY      XB360_RY     PS4_RY           PS3_RY
define LX            = 11;     // XB1_LX      XB360_LX     PS4_LX           PS3_LX
define LY            = 12;     // XB1_LY      XB360_LY     PS4_LY           PS3_LY
define UP            = 13;     // XB1_UP      XB360_UP     PS4_UP           PS3_UP
define DOWN          = 14;     // XB1_DOWN    XB360_DOWN   PS4_DOWN         PS3_DOWN
define LEFT          = 15;     // XB1_LEFT    XB360_LEFT   PS4_LEFT         PS3_LEFT
define RIGHT         = 16;     // XB1_RIGHT   XB360_RIGHT  PS4_RIGHT        PS3_RIGHT
define TRIANGLE      = 17;     // XB1_Y       XB360_Y      PS4_TRIANGLE     PS3_TRIANGLE
define CIRCLE        = 18;     // XB1_B       XB360_B      PS4_CIRCLE       PS3_CIRCLE
define CROSS         = 19;     // XB1_A       XB360_A      PS4_CROSS        PS3_CROSS
define SQUARE        = 20;     // XB1_X       XB360_X      PS4_SQUARE       PS3_SQUARE
 
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
 
 
 
//Change 0 to 1 if you want to use 2 buttons to turn toggles on and off
    define DoubleToggles = 0;
 
    define DoubleTogglesOn = PS4_TOUCHX;
    define DoubleTogglesOff = PS4_TOUCHY;
    //If you want to change the toggle button change from PS4_TOUCHY to desired
    //button
    define SingleButtonToggle = PS4_TOUCHY;
 
 
    int FireMode;
    int HoldTime, RestTime;
 
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
init {
    FireMode = 1;
}
 
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
main {
 
    if(event_press(PS4_ACCX)) {
        combo_run(h1h);
        combo_run(h1p);
        }
 
    if(event_press(PS4_ACCY)) {
        combo_run(h2h);
        combo_run(h2p);
        }
 
    if(event_press(PS4_ACCZ)) {
        combo_run(h3h);
        combo_run(h3p);
        }
 
    if(event_press(PS4_GYROX)) {
        combo_run(h4h);
        combo_run(h4p);
        }
 
    if(event_press(PS4_GYROY)) {
        combo_run(h5h);
        combo_run(h5p);
        }
 
    if(event_press(PS4_GYROZ)) {
        combo_run(h6h);
        combo_run(h6p);
        }
 
 
    if(DoubleToggles) {
 
        if(event_press(DoubleTogglesOn)) { FireMode = 2; }
        else if(event_press(DoubleTogglesOff)) { FireMode = 1; }
        block(DoubleTogglesOn, 100)
 
        if(get_val(SQUARE) && FireMode == 2) { combo_run(l1s) }
        else if(get_val(SQUARE) && FireMode == 1) { combo_stop(l1s) }
 
        if(get_val(TRIANGLE) && FireMode == 2) {combo_run(l1t) }
        else if(get_val(TRIANGLE) && FireMode == 1) {combo_stop(l1t) }
 
        if(get_val(CIRCLE) && FireMode == 2) {combo_run(l1c) }
        else if(get_val(CIRCLE) && FireMode == 1) {combo_stop(l1c) }
 
        if(get_val(CROSS) && FireMode == 2) {combo_run(l1c2) }
        else if(get_val(CROSS) && FireMode == 1) {combo_stop(l1c2) }
 
        if(get_val(LEFT) && FireMode == 2) {combo_run(l1dl) }
        else if(get_val(LEFT) && FireMode == 1) {combo_stop(l1dl) }
 
        if(get_val(RIGHT) && FireMode == 2) {combo_run(l1dr) }
        else if(get_val(RIGHT) && FireMode == 1) {combo_stop(l1dr) }
        }
 
    else if(!DoubleToggles) {
        if(event_press(SingleButtonToggle) && FireMode == 1) { FireMode = 2; }
        else if(event_press(SingleButtonToggle) && FireMode == 2) { FireMode = 1; }
 
        if(get_val(SQUARE) && FireMode == 2) { combo_run(l1s) }
        else if(get_val(SQUARE) && FireMode == 1) { combo_stop(l1s) }
 
        if(get_val(TRIANGLE) && FireMode == 2) {combo_run(l1t) }
        else if(get_val(TRIANGLE) && FireMode == 1) {combo_stop(l1t) }
 
        if(get_val(CIRCLE) && FireMode == 2) {combo_run(l1c) }
        else if(get_val(CIRCLE) && FireMode == 1) {combo_stop(l1c) }
 
        if(get_val(CROSS) && FireMode == 2) {combo_run(l1c2) }
        else if(get_val(CROSS) && FireMode == 1) {combo_stop(l1c2) }
 
        if(get_val(LEFT) && FireMode == 2) {combo_run(l1dl) }
        else if(get_val(LEFT) && FireMode == 1) {combo_stop(l1dl) }
 
        if(get_val(RIGHT) && FireMode == 2) {combo_run(l1dr) }
        else if(get_val(RIGHT) && FireMode == 1) {combo_stop(l1dr) }
        }
 
 
}
 
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
 
combo l1s {
    set_val(PS4_L1, 100);
    wait(25);
    set_val(PS4_L1, 0);
    wait(10);
    set_val(PS4_L1, 0);
 
    wait(40);
 
    set_val(PS4_SQUARE, 0);
    wait(50);
    set_val(PS4_SQUARE, 100);
    wait(40);
    set_val(PS4_SQUARE, 100);
 
}
 
combo h1h {
    set_val(PS4_L1, 100);
    wait(500);
    set_val(PS4_L1, 0);
    wait(10);
    set_val(PS4_L1, 0);
}
combo h1p {
    set_val(PS4_SQUARE, 0);
    wait(100);
    set_val(PS4_SQUARE, 100);
    wait(40);
    set_val(PS4_SQUARE, 100);
}
 
combo l1t {
    set_val(PS4_L1, 100);
    wait(25);
    set_val(PS4_L1, 0);
    wait(10);
    set_val(PS4_L1, 0);
 
    wait(40);
 
    set_val(TRIANGLE, 0);
    wait(50);
    set_val(TRIANGLE, 100);
    wait(40);
    set_val(TRIANGLE, 100);
 
}
 
combo h2h {
    set_val(PS4_L1, 100);
    wait(500);
    set_val(PS4_L1, 0);
    wait(10);
    set_val(PS4_L1, 0);
}
combo h2p {
    set_val(TRIANGLE, 0);
    wait(100);
    set_val(TRIANGLE, 100);
    wait(40);
    set_val(TRIANGLE, 100);
}
 
combo l1c {
    set_val(PS4_L1, 100);
    wait(25);
    set_val(PS4_L1, 0);
    wait(10);
    set_val(PS4_L1, 0);
 
    wait(40);
 
    set_val(CIRCLE, 0);
    wait(50);
    set_val(CIRCLE, 100);
    wait(40);
    set_val(CIRCLE, 100);
 
}
 
combo h3h {
    set_val(PS4_L1, 100);
    wait(500);
    set_val(PS4_L1, 0);
    wait(10);
    set_val(PS4_L1, 0);
}
combo h3p {
    set_val(TRIANGLE, 0);
    wait(100);
    set_val(TRIANGLE, 100);
    wait(40);
    set_val(TRIANGLE, 100);
}
 
combo h4p {
    set_val(PS4_CROSS, 0);
    wait(100);
    set_val(PS4_CROSS, 100);
    wait(40);
    set_val(PS4_CROSS, 100);
}
 
combo h5h {
    set_val(PS4_L1, 100);
    wait(500);
    set_val(PS4_L1, 0);
    wait(10);
    set_val(PS4_L1, 0);
}
combo h5p {
    set_val(PS4_LEFT, 0);
    wait(100);
    set_val(PS4_LEFT, 100);
    wait(40);
    set_val(PS4_LEFT, 100);
}
combo h6h {
    set_val(PS4_L1, 100);
    wait(500);
    set_val(PS4_L1, 0);
    wait(10);
    set_val(PS4_L1, 0);
}
combo h6p {
    set_val(PS4_RIGHT, 0);
    wait(100);
    set_val(PS4_RIGHT, 100);
    wait(40);
    set_val(PS4_RIGHT, 100);
}
 
combo l1c2 {
    set_val(PS4_L1, 100);
    wait(25);
    set_val(PS4_L1, 0);
    wait(10);
    set_val(PS4_L1, 0);
 
    wait(40);
 
    set_val(CROSS, 0);
    wait(50);
    set_val(CROSS, 100);
    wait(40);
    set_val(CROSS, 100);
 
}
 
combo h4h {
    set_val(PS4_L1, 100);
    wait(500);
    set_val(PS4_L1, 0);
    wait(10);
    set_val(PS4_L1, 0);
}
 
combo l1dl {
    set_val(PS4_L1, 100);
    wait(25);
    set_val(PS4_L1, 0);
    wait(10);
    set_val(PS4_L1, 0);
 
    wait(40);
 
    set_val(LEFT, 0);
    wait(50);
    set_val(LEFT, 100);
    wait(40);
    set_val(LEFT, 100);
 
}
 
combo l1dr {
    set_val(PS4_L1, 100);
    wait(25);
    set_val(PS4_L1, 0);
    wait(10);
    set_val(PS4_L1, 0);
 
    wait(40);
 
    set_val(RIGHT, 0);
    wait(50);
    set_val(RIGHT, 100);
    wait(40);
    set_val(RIGHT, 100);
 
}