start a script for me Please

Gtuner IV general support. Operation, questions, updates, feature request.

Re: start a script for me Please

Postby Scopeloc » Wed Jan 16, 2019 4:12 am

Thank you. I like it the lights are great
User avatar
Scopeloc
Master Sergeant
Master Sergeant
 
Posts: 35
Joined: Wed Dec 19, 2018 6:22 am

Re: start a script for me Please

Postby bonefisher » Wed Jan 16, 2019 4:13 am

:smile0517:
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: start a script for me Please

Postby Scopeloc » Wed Jan 16, 2019 4:32 am

I have two Xim4 and I have very few problems with them .... Is it worth it to get the Apex in your opinion?
User avatar
Scopeloc
Master Sergeant
Master Sergeant
 
Posts: 35
Joined: Wed Dec 19, 2018 6:22 am

Re: start a script for me Please

Postby Scopeloc » Wed Jan 16, 2019 4:34 am

One more question then I will stop. can you make the file with auto spot?
User avatar
Scopeloc
Master Sergeant
Master Sergeant
 
Posts: 35
Joined: Wed Dec 19, 2018 6:22 am

Re: start a script for me Please

Postby bonefisher » Wed Jan 16, 2019 4:40 am

Scopeloc wrote:One more question then I will stop. can you make the file with auto spot?

Battlefield One"?
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: start a script for me Please

Postby bonefisher » Wed Jan 16, 2019 5:07 am

Code: Select all
 
#pragma METAINFO("QuickChangeFirePlusAntiRecoil", 1, 0, "bonefisher")
 
#define float  fix32
 
#define MODE_0          0
#define MODE_1          1
#define MODE_2          2
#define MODE_3          3
#define MODE_4          4
 
uint8 mode = 0;
uint32 hold_trigger;
uint32 release_trigger;
 
uint8 bUseAntiRecoil;
float ARecoil_H_ADS;// Change horizontal force add negative if needed.
float ARecoil_V_ADS;//Change vertical pull force
float ARecoil_H_HIP;// Change horizontal force add negative if needed.
float ARecoil_V_HIP;//Change vertical pull force
uint16 ARecoilDelay;//Change delay after trigger is pulled to engage anti-recoil.
 
//Percent of anti ARecoil to always apply regardless of aim movement
float MinARecoilPercent = 18.0;
float StickNoise = 6.00;
 
int Spot_Minimum = 40;// Change spot times.
int Spot_Maximum = 80;
bool spot = TRUE;     // Make FALSE to turn off.
int Spot_Time    = 0;
int Spot_Wait    = 0;
int change;
int t;
 
init
{
    set_mode(MODE_0);
    Spot_Time = Spot_Minimum;
}
 
main {
    inhibit(BUTTON_1, 200);//Tap under 200ms to change. Hold over 200ms for normal button action.
    if(event_release(BUTTON_1) && time_active(BUTTON_1) < 200)
    {
        if(mode == MODE_0) set_mode(MODE_1);
        else if(mode == MODE_1) set_mode(MODE_2);
        else if(mode == MODE_2) set_mode(MODE_3);
        else if(mode == MODE_3) set_mode(MODE_4);
        else if(mode == MODE_4) set_mode(MODE_0);
    }
 
    switch(mode) {
        case MODE_0: {
        if(!Rapidfire && is_active(BUTTON_5)) {
        set_val(BUTTON_5, 100.0);
        bUseAntiRecoil = 1;
        ARecoil_H_ADS =  0.0;
        ARecoil_V_ADS = 20.0;
        ARecoil_H_HIP =  0.0;
        ARecoil_V_HIP = 18.0;
        ARecoilDelay =   50;
    }
        } break;
        case MODE_1: {
        if(!Rapidfire && is_active(BUTTON_5)) {
        hold_trigger = (uint32) 40.000;
        release_trigger = (uint32) 40.000;
        bUseAntiRecoil = 2;
        ARecoil_H_ADS =  0.0;
        ARecoil_V_ADS = 18.0;
        ARecoil_H_HIP =  0.0;
        ARecoil_V_HIP = 16.0;
        ARecoilDelay =   20;
        combo_run(Rapidfire);
    }
        } break;
        case MODE_2: {
        if(!Rapidfire && is_active(BUTTON_5)) {
        hold_trigger = (uint32) 500.000;
        release_trigger = (uint32) 70.000;
        bUseAntiRecoil = 2;
        ARecoil_H_ADS =  0.0;
        ARecoil_V_ADS = 45.0;
        ARecoil_H_HIP =  0.0;
        ARecoil_V_HIP = 18.0;
        ARecoilDelay =   0;
        combo_run(Rapidfire);
    }
        } break;
        case MODE_3: {
        if(!Rapidfire && is_active(BUTTON_5)) {
        hold_trigger = (uint32) 250.000;
        release_trigger = (uint32) 100.000;
        bUseAntiRecoil = 3;
        ARecoil_H_ADS =  0.0;
        ARecoil_V_ADS = 20.0;
        ARecoil_H_HIP =  0.0;
        ARecoil_V_HIP = 18.0;
        ARecoilDelay =   10;
        combo_run(Rapidfire);
    }
        } break;
        case MODE_4: {
        if(!Rapidfire && is_active(BUTTON_5)) {
        hold_trigger = (uint32) 63.333;
        release_trigger = (uint32) 16.777;
        bUseAntiRecoil = 2;
        ARecoil_H_ADS =  0.0;
        ARecoil_V_ADS = 20.0;
        ARecoil_H_HIP =  0.0;
        ARecoil_V_HIP = 18.0;
        ARecoilDelay =   50;
        combo_run(Rapidfire);
    }
        } break;
    }
    if (get_actual(BUTTON_5) && time_active(BUTTON_5) >= ARecoilDelay)
    {
 
        if (abs(get_actual(STICK_1_X)) < StickNoise) set_val(STICK_1_X, 0.0);
        if (abs(get_actual(STICK_1_Y)) < StickNoise) set_val(STICK_1_Y, 0.0);
        if (abs(get_actual(STICK_2_X)) < StickNoise) set_val(STICK_2_X, 0.0);
        if (abs(get_actual(STICK_2_Y)) < StickNoise) set_val(STICK_2_Y, 0.0);
    if (bUseAntiRecoil == 1)
    {
        if (get_actual(BUTTON_8) && get_val(BUTTON_5))
        {
            AntiRecoil(STICK_1_X, ARecoil_H_ADS);
            AntiRecoil(STICK_1_Y, ARecoil_V_ADS);
        }
        else if (!get_actual(BUTTON_8) && get_val(BUTTON_5))
        {
            AntiRecoil(STICK_1_X, ARecoil_H_HIP);
            AntiRecoil(STICK_1_Y, ARecoil_V_HIP);
        }
    }
 
    if (bUseAntiRecoil == 2 || bUseAntiRecoil == 3)
    {
        if (get_actual(BUTTON_8) && get_val(BUTTON_5))
        {
            combo_run(Anti_Recoil_Aim);
        }
        else if (!get_actual(BUTTON_8) && get_val(BUTTON_5))
        {
            combo_run(Anti_Recoil_Hip);
        }
      }
    }
//--------------------------Random auto spot----------------------------------//
    /* AUTO SPOT ON BY HOLD ADS FOR 500 MILLISECONDS AND SHUT OFF
       HOLDING JUMP BUTTON FOR 500 MILLISECONDS WHEN DIED AND
       GOING INTO MENU WEAPONS OPTIONS SO ITS NOT ON.*/

/* -------------------------------------------------------------------------- */
    if (get_actual(BUTTON_8) && time_active(BUTTON_8) > 300) {
          spot = 1;change = 1;
    }
    if(spot == 1) {
    if(event_active(BUTTON_8)
    & !change || (t > 5000)){
        t = 0,
        change = !change;
        spot = 0;
    }
    if (change){
        ++t;
        if (get_actual(BUTTON_8))
        { t = 0; }
        ...
    Spot_Time = Spot_Time + elapsed_time();
    if(Spot_Time >= Spot_Maximum){
        Spot_Time = Spot_Minimum;
    }
    if(!auto_spot){
        Spot_Wait = Spot_Time;
        combo_run(auto_spot);
    }else if(get_actual(BUTTON_4)) {
        combo_stop(auto_spot);
        set_val(BUTTON_4, 100.0);
    }
    }
    }
}
 
combo Rapidfire {
    set_val(BUTTON_5, 100.0);
    wait(hold_trigger);
    set_val(BUTTON_5, 0.0);
    wait(release_trigger);
    set_val(BUTTON_5, 0.0);
}
 
combo Anti_Recoil_Aim
{
    if(bUseAntiRecoil == 2){
    AntiRecoil(STICK_1_X, ARecoil_H_ADS);
    AntiRecoil(STICK_1_Y, ARecoil_V_ADS);}
    wait(hold_trigger);
    if(bUseAntiRecoil == 3){
    AntiRecoil(STICK_1_X, ARecoil_H_ADS);
    AntiRecoil(STICK_1_Y, ARecoil_V_ADS);}
    wait(release_trigger);
}
 
combo Anti_Recoil_Hip
{
    if(bUseAntiRecoil == 2){
    AntiRecoil(STICK_1_X, ARecoil_H_HIP);
    AntiRecoil(STICK_1_Y, ARecoil_V_HIP);}
    wait(hold_trigger);
    if(bUseAntiRecoil == 3){
    AntiRecoil(STICK_1_X, ARecoil_H_HIP);
    AntiRecoil(STICK_1_Y, ARecoil_V_HIP);}
    wait(release_trigger);
}
 
combo auto_spot
{
    set_val(BUTTON_4, 100.0);
    wait(40);
    set_val(BUTTON_4, 0.0);
    wait(Spot_Wait);
    set_val(BUTTON_4, 0.0);
}
 
void AntiRecoil(uint8 AxisToApply, float ARecoilToApply)
{
    float CurrentX = get_val(STICK_1_X);
    float CurrentY = get_val(STICK_1_Y);
    float MinARecoilFactor = MinARecoilPercent / 100.0;
    float MinARecoilToApply = MinARecoilFactor * ARecoilToApply;
    //This sets the ARecoil to be dependent on both X and Y axis movement. With more emphasis on Y
    float MovementARecoilToApply = (1.0 - MinARecoilFactor) * ((ARecoilToApply * (100.0 - sqrt(CurrentX*CurrentX + CurrentY*CurrentY))) / (100.0 + abs(CurrentX) + (CurrentY*CurrentY*0.5)));
    set_val(AxisToApply, MinARecoilToApply + MovementARecoilToApply + get_val(AxisToApply));
}
 
void set_mode(uint8 new_mode) {
    mode = new_mode;
    // Set LED
    switch(mode) {
        case MODE_0: { // Blue LED
            led_set(LED_1, 100.0, 0);
            led_set(LED_2, 0.0, 0);
            led_set(LED_3, 0.0, 0);
            led_set(LED_4, 0.0, 0);
        } break;
        case MODE_1: { // LED OFF
            led_set(LED_1, 0.0, 0);
            led_set(LED_2, 0.0, 0);
            led_set(LED_3, 0.0, 0);
            led_set(LED_4, 0.0, 0);
        } break;
        case MODE_2: { // Red LED
            led_set(LED_1, 0.0, 0);
            led_set(LED_2, 100.0, 0);
            led_set(LED_3, 0.0, 0);
            led_set(LED_4, 0.0, 0);
        } break;
        case MODE_3: { // White LED
            led_set(LED_1, 100.0, 0);
            led_set(LED_2, 100.0, 0);
            led_set(LED_3, 100.0, 0);
            led_set(LED_4, 0.0, 0);
        } break;
        case MODE_4: { // Green LED
            led_set(LED_1, 0.0, 0);
            led_set(LED_2, 0.0, 0);
            led_set(LED_3, 100.0, 0);
            led_set(LED_4, 0.0, 0);
        } break;
    }
    return;
}
 

GUess you meant BF1 if you don't want on then change bool spot = TRUE; to FALSE!
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: start a script for me Please

Postby bonefisher » Wed Jan 16, 2019 5:10 am

If you hold ADS trigger for 300 milliseconds it turns on and does a auto shut off after 5 seconds incase you die and forget to shut off..
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: start a script for me Please

Postby Scopeloc » Wed Jan 16, 2019 5:44 am

Thanks again and putting it on the quick tab button is even better.

I play Bf1 and Bf4. this is the file I use now. if you look at the spot timing,,, it comes on for 12 ms and stays off for 110 ms when holding fire button only. you should try it to see how well it works. You will not see any spot effects on screen but, if you shoot at them it will spot them and their whole group. Even if you die your team will wipe them be a tank gunner and light the whole field up. I score more for spot bonus than most people get for kills. Anyway you have given me more than enough. but if you want to try and put that kind of spot in the file I would really be thankful and in your debt.

Thanks for everything
User avatar
Scopeloc
Master Sergeant
Master Sergeant
 
Posts: 35
Joined: Wed Dec 19, 2018 6:22 am

Re: start a script for me Please

Postby bonefisher » Wed Jan 16, 2019 10:18 am

Scopeloc wrote:Thanks again and putting it on the quick tab button is even better.

I play Bf1 and Bf4. this is the file I use now. if you look at the spot timing,,, it comes on for 12 ms and stays off for 110 ms when holding fire button only. you should try it to see how well it works. You will not see any spot effects on screen but, if you shoot at them it will spot them and their whole group. Even if you die your team will wipe them be a tank gunner and light the whole field up. I score more for spot bonus than most people get for kills. Anyway you have given me more than enough. but if you want to try and put that kind of spot in the file I would really be thankful and in your debt.

Thanks for everything

Yeah I've tinkered with that settings before :smile0517: . Any that on you have there you can change the settings in the hold timing which is on 40 and up top the random settings of release 40 and 80. They use to have it if you went that fast you would get the far out players till you shot longer times so make sure your getting everyone! See if you like how it does the auto shut and everything tell me if you want it done different because I just started using that way towards the end of playing which I like how I didn't have the shut off anything going into menu...
bonefisher
Lieutenant General
Lieutenant General
 
Posts: 5413
Joined: Thu Jan 29, 2015 10:49 am

Re: start a script for me Please

Postby Scopeloc » Fri Feb 08, 2019 4:20 am

Code: Select all
#pragma METAINFO("QuickChangeFireModes", 1, 0, "bonefisher")
 
#include <xb1.gph>
 
#define SHOOT                 XB1_RT
#define ADS                   XB1_LT
 
#define MODE_0          0
#define MODE_1          1
#define MODE_2          2
#define MODE_3          3
#define MODE_4          4
 
uint8 mode = 0;
 
init {
    set_mode(MODE_0);
}
 
main {
 
    inhibit(BUTTON_1, 200);//Tap under 200ms to change. Hold over 200ms for normal button action.
    if(event_release(BUTTON_1) && time_active(BUTTON_1) < 200)
    {
        if(mode == MODE_0) set_mode(MODE_1);
        else if(mode == MODE_1) set_mode(MODE_2);
        else if(mode == MODE_2) set_mode(MODE_3);
        else if(mode == MODE_3) set_mode(MODE_4);
        else if(mode == MODE_4) set_mode(MODE_0);
    }
 
    switch(mode) {
        case MODE_0: {
        if(is_active(BUTTON_5)) {
        set_val(BUTTON_5, 100.0);
    }
        } break;
        case MODE_1: {
    if(is_active(BUTTON_5)) {
        combo_run(RadpiFire1);
    } else if(RadpiFire1) {
        combo_stop(RadpiFire1);
    }
} break;
        case MODE_2: {
    if(is_active(BUTTON_5)) {
        combo_run(RadpiFire2);
    } else if(RadpiFire2) {
        combo_stop(RadpiFire2);
    }
} break;
        case MODE_3: {
    if(is_active(BUTTON_5)) {
        combo_run(RadpiFire3);
    } else if(RadpiFire3) {
        combo_stop(RadpiFire3);
    }
} break;
        case MODE_4: {
    if(is_active(BUTTON_5)) {
        combo_run(RadpiFire4);
    } else if(RadpiFire4) {
        combo_stop(RadpiFire4);
    }
} break;
    }
}
 
combo RadpiFire1 {
    set_val(BUTTON_5, 100.0);
    wait(84);
    set_val(BUTTON_5, 0.0);
    wait(84);
}
 
combo RadpiFire2 {
    set_val(BUTTON_5, 100.0);
    wait(233);
    set_val(BUTTON_5, 0.0);
    wait(100);
}
 
combo RadpiFire3 {
    set_val(BUTTON_5, 100.0);
    wait(500);
    set_val(BUTTON_5, 0.0);
    wait(50);
}
 
combo RadpiFire4 {
    set_val(BUTTON_5, 100.0);
    wait(550);
    set_val(BUTTON_5, 0.0);
    wait(48);
}
 
void set_mode(uint8 new_mode) {
    mode = new_mode;
    // Set LED
    switch(mode) {
        case MODE_0: { // LED OFF
            led_set(LED_1, 0.0, 0);
            led_set(LED_2, 0.0, 0);
            led_set(LED_3, 0.0, 0);
            led_set(LED_4, 0.0, 0);
        } break;
        case MODE_1: { // Blue LED
            led_set(LED_1, 100.0, 0);
            led_set(LED_2, 0.0, 0);
            led_set(LED_3, 0.0, 0);
            led_set(LED_4, 0.0, 0);
        } break;
        case MODE_2: { // Red LED
            led_set(LED_1, 0.0, 0);
            led_set(LED_2, 100.0, 0);
            led_set(LED_3, 0.0, 0);
            led_set(LED_4, 0.0, 0);
        } break;
        case MODE_3: { // Green LED
            led_set(LED_1, 0.0, 0);
            led_set(LED_2, 0.0, 0);
            led_set(LED_3, 100.0, 0);
            led_set(LED_4, 0.0, 0);
        } break;
        case MODE_4: { // White LED
            led_set(LED_1, 100.0, 0);
            led_set(LED_2, 100.0, 0);
            led_set(LED_3, 100.0, 0);
            led_set(LED_4, 0.0, 0);
        } break;
    }
    return;
}
User avatar
Scopeloc
Master Sergeant
Master Sergeant
 
Posts: 35
Joined: Wed Dec 19, 2018 6:22 am

PreviousNext

Return to Gtuner IV Support

Who is online

Users browsing this forum: No registered users and 117 guests