PDA

View Full Version : QUIERO AGREGARLE ANTIRECOIL A ESTE CODIGO



extacyallnight
16th March 19, 19:28
Hola estoy jugando The Last of us, este codigo me funciona de maravilla, tiene rapidfire y autospot. pero quiero agregarle antirecoil.




//Posted by LEX LOST, a member of the community in the CronusMAX Forums - http://cronusmax.com/forums
//Posted : Saturday 3rd of June, 2017 22:19 UTC


// AIMING RAPID FIRE
define SPOT_TIME = 50;
define SPOT_BUTTON = PS4_R3;
define RATE_OF_FIRE = 25; // Range: 1 to 25 RPS (Round/s)
// Values higher than 25 would be so fast that the
// game probably will not detect 100% of the events.
//
// No need to make changes in the code below.
//

int hold_time, rest_time;

init {
hold_time = 500 / RATE_OF_FIRE;
rest_time = hold_time - 20;
if(rest_time < 0) rest_time = 0;
}

main {
if(get_val(PS4_R2) && get_val(PS4_L2)) {
combo_run(RapidFire);
} else if(combo_running(RapidFire)) {
combo_stop(RapidFire);
}
}


main {
if (get_val(PS4_L2)) combo_run(AutoSpot);
}
//Autospot
combo AutoSpot {//begin
set_val(SPOT_BUTTON, 100);
wait(50);
set_val(SPOT_BUTTON, 0);
wait(SPOT_TIME);
}//end

combo RapidFire {
set_val(PS4_R2, 100);
wait(hold_time);
set_val(PS4_R2, 0);
wait(rest_time);
set_val(PS4_R2, 0);
}//end