Help with Script
4 posts
• Page 1 of 1
Help with Script
I'm trying to make it so when i hold R2 + R3 it activates a certain combo, but i also want it to cancel out the combo that i have assigned to R3 already (that way it doesnt run 2 combos at the same time. The combo I want activated by R2 + R3 is c_UPCOURTRH & the combo that i want to be deactivated by R2 + R3 is c_CurryBehindTheBackRight (this is the combo assigned to R3). I tried using combo_stop but this didn't work for me
- Code: Select all
#pragma METAINFO("NBA 2K21 700 ", 1, 0, "<700>")
#include <titanone.gph>
//NBA 2K21 //NBA 2K21
//Author: VvV
//Thanks to Scachi & MAD for helping me with this script
//My random notes below dont pay them any mind
////// abcdefghijklmnopqrstuvwxyz
// slot 1 is 630
// slot 2 is 640
// slot 3 is 650
// slot 4 is 660
//----------------------
// slot 5 is 750
// slot 6 760
//
//////////////////////////////////////////////////////////////////////
//85.LB.RG.75 .......720 works well in my kourt......works well in rec too
//85.LB.RG.100.........720 WENT SLITE LATE 28/30 TIMES...... 700..
//
//DAME.LB.RG.75..........780 WORKS WELL FOR LATE (SAFE) LATENCY SOTS
//DAME.LB.RG.............
//
//WADE.CP.JSTOC.70.30.75SPEED............700 IS PERFEKT EXELLENT LATENCY SOTS
//
init { led(0,0,255); }
int modeRED = FALSE;
main {
if(get_val(PS4_SQUARE) && get_ptime(PS4_SQUARE) > 750) {
set_val(PS4_SQUARE, 0);
}
if(get_val(PS4_R2) && get_ptime(PS4_SQUARE) > 630) {
set_val(PS4_SQUARE, 0);
}
if (get_val(PS4_R1)) {
combo_run(c_OnBallDefense);
}
if (get_val(PS4_L1)) {
combo_run(c_SpinBak);
}
if (get_val(PS4_OPTIONS)) {
set_val(PS4_R1, 100);
}
if (get_val(PS4_L2)) {
set_val(PS4_SQUARE, 0);
}
if (get_val(PS4_SHARE)) {
combo_run(c_hesiSpeedBoostLeft);
}
if (get_val(PS4_SHARE)) {
combo_run(c_hesiSpeedBoostLeftR2);
}
if (c_CurryBehindTheBackLeft ) set_val(PS4_L3, 0);
if (get_val(PS4_PS)) {
combo_run(c_hesiSpeedBoostRight);
}
if (get_val(PS4_PS)) {
combo_run(c_hesiSpeedBoostRightR2);
}
if (get_val(PS4_TOUCH)) {
combo_run(c_ProStickShot2); //NO METER
}
if (get_val(PS4_LEFT)) {
combo_run(c_ExplosiveBehindTheBackLeftSmall);
}
if (get_val(PS4_UP)) {
combo_run(c_ExplosiveBehindTheBackRightSmall);
}
if (get_val(PS4_LEFT)) {
combo_run(c_SpaceCreatorLeftR2);
}
if (get_val(PS4_UP)) {
combo_run(c_SpaceCreatorRightR2);
}
if (get_val(PS4_R3)) {
combo_run(c_CurryBehindTheBackRight);
}
if (get_val(PS4_L3)) {
combo_run(c_CurryBehindTheBackLeft);
}
//////////////////////moonwalk////////////////////////
if (get_val(PS4_RIGHT)) {
combo_run(c_MomentumKrossRight);
}
if (get_val(PS4_DOWN)) {
combo_run(c_MomentumKrossLeft);
}
if (get_val(PS4_RIGHT)) {
combo_run(c_MomentumKrossRight2);
}
if (get_val(PS4_DOWN)) {
combo_run(c_MomentumKrossLeft2 );
}
}
//
//////////////
combo c_AutoShot1{ //STAGE (2K21)
set_val(PS4_SQUARE, 100);
wait(537); wait(80);
} ///////
//////////////////////////////////////
combo c_ProStickShot1{ // 85-90% GREENS WITH RS 45 - 90 ( INCREMENTS OF 5 ) WITH 10MS WAIT TIME
//tis for meter on
set_val(PS4_RY, 45);
set_val(PS4_RX, -15);
wait(10);
set_val(PS4_RY, 50);
set_val(PS4_RX, -15);
wait(10);
set_val(PS4_RY, 55);
set_val(PS4_RX, -15);
wait(10);
set_val(PS4_RY, 60);
set_val(PS4_RX, -15);
wait(10);
set_val(PS4_RY, 65);
set_val(PS4_RX, -15);
wait(10);
set_val(PS4_RY, 70);
set_val(PS4_RX, -15);
wait(10);
set_val(PS4_RY, 75);
set_val(PS4_RX, -15);
wait(10);
set_val(PS4_RY, 80);
set_val(PS4_RX, -15);
wait(10);
set_val(PS4_RY, 85);
set_val(PS4_RX, -15);
set_val(PS4_RX, -15);
wait(10);
set_val(PS4_RY, 90);
set_val(PS4_RX, -15);
wait(1000);
}
///////
///////////////////////////////////////
//////////////////////////////////////
combo c_ProStickShot2{ // 85-90% GREENS WITH RS 45 - 90 ( INCREMENTS OF 5 ) WITH 10MS WAIT TIME
//AS OF 10/7/2020 .... // NO METER// -7.20 is LEFT but GREEN , -7.19 is LEFT but GREENS, -7.18 is LEFT but GREENS, -7.17 is LEFT but MISSES -7.15 is RITE but MISSES, -7 is RITE but GREEN, -6.90 is RITE but GREEN -6.80 is rite but GREEN -6.70 is rite but GREEN -6.60 is rite but GREEN -6.50 is rite but GREEN -6 is RITE but GREEN
//45-90s RESULTS WERE BETTER -15.19
set_val(PS4_RY, 45);
set_val(PS4_RX, -15.19);
wait(10);
set_val(PS4_RY, 50);
set_val(PS4_RX, -15.19);
wait(10);
set_val(PS4_RY, 55);
set_val(PS4_RX, -15.19);
wait(10);
set_val(PS4_RY, 60);
set_val(PS4_RX, -15.19);
wait(10);
set_val(PS4_RY, 65);
set_val(PS4_RX, -15.19);
wait(10);
set_val(PS4_RY, 70);
set_val(PS4_RX, -15.19);
wait(10);
set_val(PS4_RY, 75);
set_val(PS4_RX, -15.19);
wait(10);
set_val(PS4_RY, 80);
set_val(PS4_RX, -15.19);
wait(10);
set_val(PS4_RY, 85);
set_val(PS4_RX, -15.19);
wait(10);
set_val(PS4_RY, 90);
set_val(PS4_RX, -15.19);
wait(1000);
}
combo c_ProStickShot3{ // 85-90% GREENS WITH RS 45 - 90 ( INCREMENTS OF 5 ) WITH 10MS WAIT TIME
set_val(PS4_RY, 45);
set_val(PS4_RX, -14.19);
wait(10);
set_val(PS4_RY, 50);
set_val(PS4_RX, -14.19);
wait(10);
set_val(PS4_RY, 55);
set_val(PS4_RX, -14.19);
wait(10);
set_val(PS4_RY, 60);
set_val(PS4_RX, -14.19);
wait(10);
set_val(PS4_RY, 65);
set_val(PS4_RX, -14.19);
wait(10);
set_val(PS4_RY, 70);
set_val(PS4_RX, -14.19);
wait(10);
set_val(PS4_RY, 75);
set_val(PS4_RX, -14.19);
wait(10);
set_val(PS4_RY, 80);
set_val(PS4_RX, -14.19);
wait(10);
set_val(PS4_RY, 85);
set_val(PS4_RX, -14.19);
wait(10);
set_val(PS4_RY, 90);
set_val(PS4_RX, -14.19);
wait(1500);
}
///////
///////////////////////////////////////
////////////////////
combo c_OnBallDefense {
set_val(PS4_L2, 100);
wait(75); wait(60);
set_val(PS4_R2, 100);
wait(100); wait(60);
}
///StepBack
combo c_SpinBak {
//Step Back
set_val(PS4_RY, -100);
wait(20);
set_val(PS4_RX, 100);
wait(20);
set_val(PS4_RY, 100);
wait(20); wait(100); ////line 1: set_val(PS4_LY, 100); line 2:wait(1000); wait(100);
}
///StepBack
combo c_StepBak {
//Step Back
set_val(PS4_RY, 100);
wait(60); wait(75);
}
//////////////////////////////CROSSOVERS/////////////////////////////////
//FUMBLE
combo c_FumbleCancelRight{ //MAKE SURE BALL IS IN LEFT HAND
//Spin Cancel
set_val(PS4_RX, 100);
wait(20);
set_val(PS4_RX, 75);
set_val(PS4_RY, -75);
wait(20);
set_val(PS4_RY, -100);
wait(20); wait(800);
set_val(PS4_RX, 100);
wait(20);
set_val(PS4_RX, 75);
set_val(PS4_RY, -75);
wait(20);
set_val(PS4_RY, -100);
wait(20); wait(1500); //END OF FUMBLE ANIMATION (1700 too late) (1600 is best wait time) (1500 is a kool wait time) (1300 is too early offline)
set_val(PS4_RY, -100); // CROSSOVER
wait(50); wait(85);
set_val(PS4_RX, 75); //BEHIND THE BACK (DOWN RITE)
set_val(PS4_RY, 75);
wait(50); wait(85);
set_val(PS4_RY, -100); // CROSSOVER
wait(50); wait(85);
set_val(PS4_RX, 100); // CROSSOVER
wait(50); wait(50);
}
//FUMBLE
combo c_FumbleCancelLeft{ //MAKE SURE BALL IS IN LEFT HAND
set_val(PS4_RX, -100);
wait(20);
set_val(PS4_RX, -75);
set_val(PS4_RY, 75);
wait(20);
set_val(PS4_RY, -100);
wait(20); wait(800);
set_val(PS4_RX, -100);
wait(20);
set_val(PS4_RX, -75);
set_val(PS4_RY, 75);
wait(20);
set_val(PS4_RY, -100);
wait(20); wait(1500); // END OF FUMBLE ANIMATION (1700 too late) (1600 is best wait time) (1500 is a kool wait time) (1400 is too early offline) (2000
set_val(PS4_RY, -100); // CROSSOVER
wait(50); wait(85);
set_val(PS4_RX, -75); //BEHIND THE BACK (DOWN LEFT)
set_val(PS4_RY, 75);
wait(50); wait(85);
set_val(PS4_RY, -100); // CROSSOVER
wait(50); wait(85);
set_val(PS4_RX, -100); // CROSSOVER
wait(50); wait(50);
}
//SCREEN//////////////////////////////////////////////////////
combo c_CallForScreen{ //MAKE SURE BALL IS IN LEFT HAND
//SCREEN
set_val(PS4_L1, 100);
wait(4000); wait(4000);
/////////////////////////////////////////////////////////////
}
//CROSS OVER
combo c_ExplosiveBehindTheBackLeft{ //MAKE SURE BALL IS IN LEFT HAND
//DOWN LEFT ON RS
set_val(PS4_RY, 86);
set_val(PS4_RX, -65);
wait(50); wait(150);
//UP LEFT ON LS
set_val(PS4_LY, -89);
set_val(PS4_LX, -52);
wait(50); wait(120);
}
//CROSS OVER
combo c_ExplosiveBehindTheBackRight{ //MAKE SURE BALL IS IN LEFT HAND
//DOWN RIGHT ON RS
set_val(PS4_RY, 75);
set_val(PS4_RX, 75);
wait(50); wait(200);
//UP RIGHT ON LS
set_val(PS4_LY, -75);
set_val(PS4_LX, 75);
wait(50); wait(120);
}
///////////////////////////////////////////STEEZ BOOST//////////////////////////////////////////
combo c_MomentumKrossLeft {
//UP ON RS
set_val(PS4_RX, -100); //KROSS OVER
wait(50); wait(300); // (wait 500 for steez boost)
//LEFT ON LS
set_val(PS4_LX, -75); //BLOW BY
set_val(PS4_LY, -75);
wait(700); wait(60);
}
combo c_MomentumKrossRight {
//UP ON RS
set_val(PS4_RX, 100); //KROSS OVER
wait(50); wait(300); //(wait 500 for steez boost)
//UP RIGHT ON LS
set_val(PS4_LY, -75); //BLOW BY
set_val(PS4_LX, 75);
wait(700); wait(60);
}
combo c_MomentumKrossLeft2 {
wait(500);
set_val(PS4_R2, 100);
wait(600); wait(50); // (wait 500 for steez boost)
}
combo c_MomentumKrossRight2 {
wait(500);
set_val(PS4_R2, 100);
wait(600); wait(50); //(wait 500 for steez boost)
}
///////////////////////////////////////////////Curry Slide///////////////////////////////////
combo c_CurryBehindTheBackLeft{
set_val(PS4_RX, -75);
set_val(PS4_RY, 75); //EXPLOSIVE BEHIND THE BACK
wait(200); wait(80);
}
combo c_CurryBehindTheBackRight {
set_val(PS4_RY, 75);
set_val(PS4_RX, 75); //EXPLOSIVE BEHIND THE BACK
wait(200); wait(80);
}
//////////////////////////////HESI/////////
combo c_hesiSpeedBoostLeft{
set_val(PS4_RX, -93);
set_val(PS4_RY, -50); //EXPLOSIVE BEHIND THE BACK
wait(700); wait(80);
}
combo c_hesiSpeedBoostRight {
set_val(PS4_RY, -50);
set_val(PS4_RX, 93); //EXPLOSIVE BEHIND THE BACK
wait(700); wait(80);
}
combo c_hesiSpeedBoostLeftR2{
set_val(PS4_R2, 100);
wait(700); wait(80);
}
combo c_hesiSpeedBoostRightR2 {
set_val(PS4_R2, 100);
wait(700); wait(80);
}
/////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////SpaceCreator/////////////////////////////////////////////////////
combo c_SpaceCreatorRight {
///////
set_val(PS4_RY, -100); // CROSSOVER (150 is a good wait value b4 next move)
wait(40); wait(150);
set_val(PS4_LY, 75); // DOWN ON LEFT STICK (THIS IS THE TURNAROUND)
set_val(PS4_LX, -75);
wait(450); wait(75);
set_val(PS4_RY, 100);
wait(60); wait(75);
}
combo c_SpaceCreatorLeft {
///////
set_val(PS4_RY, -100); // CrossOver (150 is a good wait value b4 next move)
wait(40); wait(150);
set_val(PS4_LY, 90); // DOWN ON RITE STICK (THIS IS THE TURNAROUND)
set_val(PS4_LX, 60);
wait(450); wait(75);
set_val(PS4_RY, 100);
wait(60); wait(75);
}
combo c_SpaceCreatorRightR2 {
///////
wait(130);
set_val(PS4_R2, 100); // CrossOver (150 is a good wait value b4 next move)
wait(1000); wait(150);
}
combo c_SpaceCreatorLeftR2 {
///////
wait(130);
set_val(PS4_R2, 100); // CrossOver (150 is a good wait value b4 next move)
wait(1000); wait(150);
}
//////////////////////////////////////MOONWALK/////////////////////////
combo c_MoonWalkRight {
///////
set_val(PS4_RY, -100); // CROSSOVER (150 is a good wait value b4 next move)
wait(40); wait(150);
set_val(PS4_LY, 75); // DOWN ON LEFT STICK (THIS IS THE TURNAROUND)
set_val(PS4_LX, -75);
wait(450); wait(500);
set_val(PS4_LX, 100);
wait(200); wait(50);
}
combo c_MoonWalkLeft {
///////
set_val(PS4_RY, -100); // CrossOver (150 is a good wait value b4 next move)
wait(40); wait(150);
set_val(PS4_LY, 90); // DOWN ON LEFT STICK (THIS IS THE TURNAROUND)
set_val(PS4_LX, 60);
wait(450); wait(500);
set_val(PS4_LX, -100);
wait(200); wait(50);
}
combo c_MoonWalkRightR2 {
///////
wait(130);
set_val(PS4_R2, 100); // CrossOver (150 is a good wait value b4 next move)
wait(1000); wait(150);
}
combo c_MoonWalkLeftR2 {
///////
wait(130);
set_val(PS4_R2, 100); // CrossOver (150 is a good wait value b4 next move)
wait(1000); wait(150);
}
combo c_halfspinRight {
///////
set_val(PS4_RX, 100); //SPIN MOVE
wait(30); //
set_val(PS4_RY, -100); //
wait(50); wait(600); //
set_val(PS4_RY, -100); // CrossOver (85 is a good wait value b4 next move)
wait(50); wait(900);
set_val(PS4_RX, 100); // RITE
wait(50); wait(70);
set_val(PS4_RX, -75); //DOWN LEFT
set_val(PS4_RY, 75);
wait(50); wait(55);
}
combo c_halfspinLeft {
///////
set_val(PS4_RX,-100); //SPIN MOVE
wait(30); //
set_val(PS4_RY, -100); //
wait(50); wait(600); //
set_val(PS4_RY, -100); // CrossOver (85 is a good wait value b4 next move)
wait(50); wait(900);
set_val(PS4_RX, -100); // LEFT
wait(50); wait(70);
set_val(PS4_RX, 75); //DOWN RITE
set_val(PS4_RY, 75);
wait(50); wait(55);
}
//////////////////////////////CrossOverBehindTheBack////////////////////////
combo c_CrossOverBehindTheBackRight{
///////
set_val(PS4_RY, -100); // CrossOver (85 is a good wait value b4 next move)
wait(50); wait(85);
set_val(PS4_RX, -75); //DOWN LEFT
set_val(PS4_RY, 75);
wait(50); wait(85);
set_val(PS4_RX, 100); // RITE
wait(50); wait(50);
}
combo c_CrossOverBehindTheBackLeft {
///////
set_val(PS4_RY, -100); // CrossOver (85 is a good wait value b4 next move)
wait(50); wait(85);
set_val(PS4_RY, 75); // DOWN RITE
set_val(PS4_RX, 75);
wait(50); wait(85);
set_val(PS4_RX, -100); // LEFT
wait(50); wait(50);
}
combo c_Steals {
///////
set_val(PS4_R2, 100);
wait(50); wait(100);
set_val(PS4_SQUARE, 100);
wait(50); wait(75);
set_val(PS4_L2, 100);
wait(50); wait(5000);
}
combo c_wait_time
{
wait(750);
set_val(PS4_L2, 100);
set_val(PS4_SQUARE, 0);
wait(100);
set_val(PS4_L2, 0);
wait(200);
}
combo c_ExplosiveBehindTheBackRightSmall{ //MAKE SURE BALL IS IN LEFT HAND
//DOWN RIGHT ON RS
set_val(PS4_RY, 75);
set_val(PS4_RX, 75);
wait(50); wait(75);
//UP RIGHT ON LS
set_val(PS4_LX, 100);
wait(50); wait(40);
}
combo c_ExplosiveBehindTheBackLeftSmall{ //MAKE SURE BALL IS IN LEFT HAND
//DOWN LEFT ON RS
set_val(PS4_RY, 86);
set_val(PS4_RX, -65);
wait(50); wait(75);
//UP LEFT ON LS
set_val(PS4_LX, -100);
wait(50); wait(40);
}
///////
combo c_UPCOURTRH
{
set_val(XB1_LY, -100);
wait(300);
set_val(XB1_LY, -100);
set_val(XB1_RY, -100);
wait(50);
set_val(XB1_LY, -100);
set_val(XB1_RY, 0);
wait(50);
set_val(XB1_LY, -100);
set_val(XB1_RX, 100);
wait(300);
set_val(XB1_LY, -100);
set_val(XB1_RX, 0);
wait(100);
call(c_RHSLIDE);
}
combo c_UPCOURTLH
{
set_val(XB1_LY, -100);
wait(300);
set_val(XB1_LY, -100);
set_val(XB1_RY, -100);
wait(50);
set_val(XB1_LY, -100);
set_val(XB1_RY, 0);
wait(50);
set_val(XB1_LY, -100);
set_val(XB1_RX, -100);
wait(300);
set_val(XB1_LY, -100);
set_val(XB1_RX, 0);
wait(100);
call(c_LHSLIDE);
}
/////
combo c_LHSLIDE//curryslide yessuh
{
set_val(PS4_RX, 100);
set_val(PS4_RY, 50);
wait(400);
}
combo c_RHSLIDE
{
set_val(PS4_RX, -100);
set_val(PS4_RY, 50);
wait(400);
}
/////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
void led(int8 r, int8 g, int8 b) {
led_set(LED_1, (fix32)b, 0);
led_set(LED_2, (fix32)r, 0);
led_set(LED_3, (fix32)g, 0);
return;
}
main { // remapping code
set_val(PS4_PS, 0);
set_val(PS4_SHARE, 0);
set_val(PS4_OPTIONS, 0);
set_val(PS4_TOUCH, 0);
set_val(PS4_RIGHT, 0);
set_val(PS4_UP, 0);
set_val(PS4_DOWN, 0);
set_val(PS4_LEFT, 0);
set_val(PS4_L1, 0);
}
-
VvV - Sergeant Major
- Posts: 87
- Joined: Mon Jun 18, 2018 12:04 pm
Re: Help with Script
All the combos use "get_val" to get started.
So adding R2 + R3 to it when R3 is already used will end up in triggering both combos each time.
I have no idea if you really need to spam the combos all over again when holding down the button or if you are fine with using event_press for your R3 and R2 + R3 combos.
Another options is to check if R2 is released for some time already to not trigger both combos, something like that may work but you need to hold R2 first before hitting R3 to avoid starting the other one (not tested at all):
So adding R2 + R3 to it when R3 is already used will end up in triggering both combos each time.
I have no idea if you really need to spam the combos all over again when holding down the button or if you are fine with using event_press for your R3 and R2 + R3 combos.
Another options is to check if R2 is released for some time already to not trigger both combos, something like that may work but you need to hold R2 first before hitting R3 to avoid starting the other one (not tested at all):
- Code: Select all
if (get_val(PS4_R2) && get_val(PS4_R3)) {
combo_stop(c_CurryBehindTheBackRight);
combo_run(c_UPCOURTRH);
} else {
if (time_release(PS4_R2) > 300 && get_val(PS4_R3)) {
combo_stop(c_UPCOURTRH);
combo_run(c_CurryBehindTheBackRight);
}
}
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Help with Script
thanks this combo worked just fine!
So you're saying If I was to use event_press for my combos they wouldn't spam all over again wile holding down the activation button? Interesting.
So you're saying If I was to use event_press for my combos they wouldn't spam all over again wile holding down the activation button? Interesting.
Scachi wrote:All the combos use "get_val" to get started.
So adding R2 + R3 to it when R3 is already used will end up in triggering both combos each time.
I have no idea if you really need to spam the combos all over again when holding down the button or if you are fine with using event_press for your R3 and R2 + R3 combos.
Another options is to check if R2 is released for some time already to not trigger both combos, something like that may work but you need to hold R2 first before hitting R3 to avoid starting the other one (not tested at all):
- Code: Select all
if (get_val(PS4_R2) && get_val(PS4_R3)) {
combo_stop(c_CurryBehindTheBackRight);
combo_run(c_UPCOURTRH);
} else {
if (time_release(PS4_R2) > 300 && get_val(PS4_R3)) {
combo_stop(c_UPCOURTRH);
combo_run(c_CurryBehindTheBackRight);
}
}
-
VvV - Sergeant Major
- Posts: 87
- Joined: Mon Jun 18, 2018 12:04 pm
Re: Help with Script
[quote="VvV"If I was to use event_press for my combos they wouldn't spam all over again wile holding down the activation button? Interesting.[/quote]
Yes, event_press will only run the combo once.
Yes, event_press will only run the combo once.
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord (2K / FPS)
- Mad
- Major General
- Posts: 4532
- Joined: Wed May 22, 2019 5:39 am
4 posts
• Page 1 of 1
Return to GPC2 Script Programming
Who is online
Users browsing this forum: No registered users and 114 guests