please help fix errors
2 posts
• Page 1 of 1
please help fix errors
please help fix errors .thanks
- Code: Select all
=Weapon Switch=
-P/S weapon: press TRIANGLE button.(Blue LED:Primary /Green LED:Secondly)
-Pisto(Red Led): pressing UP+TRIANGLE,return to P/S weapon just press TRIANGLR
-Special weapon(White Led): pressing UP+CIRCLE,return to P/S weapon just press TRIANGLR
=AntiRecoil Adjustment(For P/S Weapon & Pistol)=
-Starting Value adjustment: holding L2+SQUARE and then pressing UP/DOWN/RIGHT/LEFT(short rumble)
-Ending Value adjustment: holding L2+CIRCLE and then pressing UP/DOWN/RIGHT/LEFT(short rumble)
-UP:+1, DOWN:-1, RIGHT:+10, LEFT:-10
-Long rumble means value min. or max.
=RapidFire(For P/S Weapon & Pistol)=
-Rapid ON/OFF: holding L2 & pressing L3 to enable(short rumble/LED flash) or disable(long rumble)
-Rate OF Fire adjustment: holding L2+CROSS and pressing UP/DOWN(short rumble)
-UP:=+20(Slower),DOWN:-20(Faster)
-Long rumble means value min. or max.
=AutoRun=
-Default enable
-Enable/Disable: holding CROSS then pressing L3.(enable:short rumble, disable:long rumble)
=Easy Medkit=
-Holding RIGHT then pressing SQUARE
=Easy Skill Cancelled=
-Holding L3 then pressing L1 for L1 Skill cancelled.(no need to keep holding L1)
-Holding R3 then pressing R1 for R1 Skill cancelled.(no need to keep holding R1)
=Fix Script Mis-match for Primary/Secondly Weapon=
-Holding UP then pressing SQUARE.
=Save Date/Value=
-Holding L3 then pressing R3(short rumble) for saving Data/Value/Setting.
=Script ON/OFF For P/S Weapon & Pistol individual=
-Holding L2+SQUARE then pressing R3 to enable(short rumble) or disable(long rumble/LED OFF) AntiRecoil+RapidFire script individual
=Aim Assist(Aim Abuse)=
-Holding R2 then pressing UP for ON/OFF Aim Assist
=Double Swap=
-"Dodge City Gunslinger's Holster" is requested.
-Holding Down then pressing PS4 TRIANGLE to do "Double Swap" to reload all weapons.
*/
int recoil;
int RS
int RE;
int autorun=0;
int a4;
int tr3=300;
int hg;
int K;
int ms;
int AR1[6];
int ROF[3];
int idx=0, idy=0;
int IAR1[6];
int IART[3];
int rapid[3];
int sp;
int SC[3];
int wp;
int savedata=0;
int rapid_R3;
int sw;
define off=0;
define Blue=1;
define Green=2;
define Red=3;
define White=4;
data(
0,0,0,0,// Off
2,0,0,0,// Blue
0,0,2,0,// Green
0,2,0,0,// Red
2,2,2,2 // White
);
init {
savedata= get_pvar(SPVAR_16, 0,1,0)
if(savedata== 1) {
AR1[0] = get_pvar(SPVAR_1 ,-100,100,0); AR1[1] = get_pvar(SPVAR_2, -100,100,0); AR1[2] = get_pvar(SPVAR_3, -100,100,0);
AR1[3] = get_pvar(SPVAR_4, -100,100,0); AR1[4] = get_pvar(SPVAR_5, -100,100,0); AR1[5] = get_pvar(SPVAR_6, -100,100,0);
ROF[0] = get_pvar(SPVAR_7, -100,100,0); ROF[1] = get_pvar(SPVAR_8, -100,100,0); ROF[2] = get_pvar(SPVAR_9, -100,100,0);
rapid[0] = get_pvar(SPVAR_10,0,1,0); rapid[1] = get_pvar(SPVAR_11,0,1,0); rapid[2] = get_pvar(SPVAR_12,0,1,0);
SC[0] = get_pvar(SPVAR_13,0,1,0); SC[1] = get_pvar(SPVAR_14,0,1,0); SC[2] = get_pvar(SPVAR_15,0,1,0);
}
IAR1[0]=25; IAR1[3]=20;
IAR1[1]=30; IAR1[4]=25;
IAR1[2]=30; IAR1[5]=30;
IART[0]=3500; IART[1]=3500; IART[2]=3500
ROF[0]=40; ROF[1]=40; ROF[2]=40;
RS=(IAR1[idx]+AR1[idx]);
RE=(IAR1[idx + 3]+AR1[idx + 3]);
}
//unmap PS4_SHARE;
main {
if((idx==1 || idx==0) && get_val(PS4_DOWN) && event_press(PS4_TRIANGLE)){
sw=100;
combo_run(swap2);
}
if(event_press(PS4_TRIANGLE) && !combo_running(swap) && !get_val(PS4_UP) && !get_val(PS4_DOWN)) { //Swap weapon-TRIANGLE
//set_val(PS4_TRIANGLE, 0);
combo_run(swap);
if(hg==0 && sp==0 ){wp=!wp;}
if(hg==1 || sp==1){hg=0;sp=0;}
if(wp){idx=1;recoil_value();}
if(!wp){idx=0;recoil_value();}
}
if(get_val(PS4_TRIANGLE) && get_ptime(PS4_TRIANGLE)>200){ combo_stop(swap);}
if(event_press(PS4_SQUARE) && get_val(PS4_UP)){//Change script UP+SQUARE
wp= !wp;
if(wp){idx=1;recoil_value();}
if(!wp){idx=0;recoil_value();}
combo_run(rumble_1);
}
////////////////Special///////////////////////////////
if(get_val(PS4_UP) && event_press(PS4_CIRCLE) && sp==0){
hg=0;
sp=1;
set_val(PS4_CIRCLE, 0);
set_val(PS4_UP, 0);
combo_run(HD_TRIANGLE);
combo_stop(led_flash);
setled(White);
}
/////////////////////////HangGun////////////////////////////
if(get_val(PS4_UP) && event_press(PS4_TRIANGLE) && hg==0 && !combo_running(swap)){
hg=1;
sp=0;
set_val(PS4_TRIANGLE, 0);
set_val(PS4_UP, 0);
combo_run(swap2);
setled(Red);
idx=2;
recoil_value();
}
////////////////////////////Script ON/OFF && LED Status////////////////////////////////////
if(sp==0){
if(SC[idx]==0){
if(get_val(PS4_R2)){combo_run(antirecoil);
if(rapid[idx]==1){combo_run(rapidx);}
}
if(rapid[idx]==0){combo_stop(led_flash);setled(idx+1);}
//if(rapid[1]==0 && idx ==1){combo_stop(led_flash);setled(Green);}
//if(rapid[2]==0 && idx ==2){combo_stop(led_flash);setled(Red);}
if(rapid[idx]==1){combo_run(led_flash);}
}
if(SC[idx]==1){combo_stop(led_flash);setled(off);combo_stop(antirecoil);combo_stop(rapidx);}
}
//////////////////////Hold L2/////////////////////
if(get_val(PS4_L2) && sp==0){
if(!get_val(PS4_SQUARE)&& !get_val(PS4_CROSS)&& !get_val(PS4_CIRCLE)){
if(event_press(PS4_L3)){rapid[idx]=!rapid[idx];
if(rapid[idx]==1){combo_run(rumble_1);}
if(rapid[idx]==0){combo_run(rumble_2);}
}
if(event_press(PS4_UP)){rapid_R3=!rapid_R3;}
if(rapid_R3){combo_run(rapid_R3);}
if(!rapid_R3){combo_stop(rapid_R3);}
}
if(get_val(PS4_SQUARE) && !get_val(PS4_R2)){
if(event_press(PS4_L3)){SC[idx]= !SC[idx];
if(SC[idx]==0){combo_run(rumble_1);}
if(SC[idx]==1){combo_run(rumble_2);}
}
}
///////////////////////////////////////////////////////////////////
if((get_val(PS4_SQUARE) || get_val(PS4_CIRCLE)) && !get_val(PS4_R2)&& !get_val(PS4_CROSS)){
if(get_val(PS4_SQUARE)){idy=idx;}
if(get_val(PS4_CIRCLE)){idy=idx + 3;}
if(event_press(PS4_UP)){AR1[idy]+=1; combo_run(rumble_1);}
if(event_press(PS4_DOWN)){AR1[idy]+= -1; combo_run(rumble_1);}
if(event_press(PS4_RIGHT)){AR1[idy]+=10;combo_run(rumble_1);}
if(event_press(PS4_LEFT)){AR1[idy]+=-10;combo_run(rumble_1);}
recoil_value()
set_val(PS4_UP,0); set_val(PS4_DOWN,0);
set_val(PS4_RIGHT,0); set_val(PS4_LEFT,0);
}
K=(IART[idx])/(abs((IAR1[idx]+AR1[idx])-(IAR1[idx + 3]+AR1[idx + 3])));
//////////////////////////////////////////////////////////////////////
if(get_val(PS4_CROSS) && rapid[idx] == 1 && !get_val(PS4_R2)){// ROF
if(event_press(PS4_UP)){ROF[idx]+=20;combo_run(rumble_1);
if(ROF[idx]>=1000){ROF[idx]=500;combo_run(rumble_2);}
}
if(event_press(PS4_DOWN)){ROF[idx]-=20; combo_run(rumble_1);
if(ROF[idx]<=40){ROF[idx]=40;combo_run(rumble_2);}
}
set_val(PS4_UP,0);
set_val(PS4_DOWN,0);
}
}//if get_val L2 end
////////////////////////////////////////////////////////////////////
if(get_val(PS4_L3) && event_press(PS4_L1)){combo_run(HD_L1);}
if(get_val(PS4_R3) && event_press(PS4_R1)){combo_run(HD_R1);}
if(get_val(PS4_RIGHT) && event_press(PS4_SQUARE)){combo_run(HD_RIGHT);}
////////////////////////////////////////////////////////////////////
if(event_release(PS4_R2)|| event_release(PS4_L2)){ //Reset
combo_stop(antirecoil);
combo_stop(rapidx);
combo_stop(rapid_R3);
recoil_value()
ms=0;
tr3=300;
}
///////////////AutoRun//////////////
if(get_val(PS4_CROSS)){
if(event_press(PS4_L3)){
autorun=!autorun;
if(autorun){
combo_run(rumble_2);
if(combo_running(run)){
combo_stop(run);
}
}
if(!autorun){
combo_run(rumble_1);
}
}
}
if(!get_val(PS4_L2) && autorun==0){
if(get_val(PS4_LY) < -50 && a4==0){
combo_run(run);
}
if((get_val(PS4_LY) > -50) && (abs(get_val(PS4_LX))) < 10 && a4==1){
a4=0;
}
}
//////////////////Save Data///////////////////
if(get_val(PS4_L3) && event_press(PS4_R3))
{
set_pvar(SPVAR_1 ,AR1[0]); set_pvar(SPVAR_2 ,AR1[1]); set_pvar(SPVAR_3 ,AR1[2]);
set_pvar(SPVAR_4 ,AR1[3]); set_pvar(SPVAR_5 ,AR1[4]); set_pvar(SPVAR_6 ,AR1[5]);
set_pvar(SPVAR_7 ,ROF[0]); set_pvar(SPVAR_8 ,ROF[1]); set_pvar(SPVAR_9 ,ROF[2]);
set_pvar(SPVAR_10,rapid[0]); set_pvar(SPVAR_11,rapid[1]); set_pvar(SPVAR_12,rapid[2]);
set_pvar(SPVAR_16,1); combo_run(rumble_2);
}
/*set_val(TRACE_1, wp);
set_val(TRACE_2, hg);
set_val(TRACE_3, sp);
set_val(TRACE_4, idx);*/
//set_val(TRACE_5, a4);
//set_val(TRACE_6, tr3/10);
}
combo HD_TRIANGLE{
set_val(PS4_CIRCLE, 0);
set_val(PS4_TRIANGLE, 100);
wait(1000);
//sp=0;
}
combo HD_L1{
set_val(PS4_L1, 100);
wait(3000);
}
combo HD_R1{
set_val(PS4_R1, 100);
wait(3000);
}
combo HD_RIGHT{
set_val(PS4_RIGHT, 100);
wait(2500);
}
combo swap{
set_val(PS4_TRIANGLE, 100);
wait(200);
set_val(PS4_TRIANGLE, 0);
wait(1100);
//swt=0;
}
combo swap2{
set_val(PS4_TRIANGLE, 100);
wait(80);
set_val(PS4_TRIANGLE, 0);
wait(80);
set_val(PS4_TRIANGLE, 100);
wait(80);
set_val(PS4_TRIANGLE, 0);
wait(600);
set_val(PS4_TRIANGLE, sw);
wait(80);
set_val(PS4_TRIANGLE, 0);
wait(80);
sw=0;
}
combo run {//AutoRun
wait(200);
set_val(PS4_L3,100);
wait(200);
set_val(PS4_L3, 0);
wait(100);
a4=1;
}
combo antirecoil{//Weapon AR
ms = ms + get_rtime();
if(ms >= K){ms=0;
if(RE > RS){ RS+=1;}
if(RS > RE){ RS+=-1;}
}
recoil = RS + ((get_val(PS4_RY)/2));
if(recoil > 100){recoil = 100;}
if(recoil < -100){recoil = -100;}
set_val(PS4_RY, recoil);
wait(50);
set_val(PS4_RY, recoil);
}
combo rapidx{//Rapidx
set_val(PS4_R2, 100);
wait(40);
set_val(PS4_R2, 0);
wait(ROF[idx]);
//set_val(PS4_R2, 100);
}
combo rapid_R3{//Rapid_R3
wait(tr3);
set_val(PS4_R3, 100);
wait(40);
set_val(PS4_R3, 0);
wait(40);
tr3=0;
}
combo rumble_1{
wait(200);
set_rumble(RUMBLE_B, 80);
wait(100);
reset_rumble();
wait(50);
//rb=0;
}
combo rumble_2{
wait(200);
set_rumble(RUMBLE_B, 80);
wait(1000);
reset_rumble();
wait(50);
//rb=0;
}
combo led_flash{
setled(idx + 1);
wait(500);
setled(off);
wait(500);
}
function recoil_value(){
RS=(IAR1[idx]+AR1[idx]);
RE=(IAR1[idx + 3]+AR1[idx + 3]);
if(RS > 100){RS=100;AR1[idx]=100-IAR1[idx];combo_run(rumble_2)}
if(RS < -100){RS=-100;AR1[idx]=-100-IAR1[idx];combo_run(rumble_2)}
if(RE > 100){RE=100;AR1[idx + 3]=100-IAR1[idx + 3];combo_run(rumble_2)}
if(RE < -100){RE=-100;AR1[idx + 3]=-100-IAR1[idx + 3];combo_run(rumble_2)}
}
function setled(colour) {
set_led(LED_1, dbyte(colour * 4));
set_led(LED_2, dbyte((colour * 4) + 1));
set_led(LED_3, dbyte((colour * 4) + 2));
set_led(LED_4, dbyte((colour * 4) + 3));
}
-
dean - Private
- Posts: 1
- Joined: Mon Jul 22, 2019 2:09 pm
Re: please help fix errors
Errors fixed.
- Code: Select all
/*
=Weapon Switch=
-P/S weapon: press TRIANGLE button.(Blue LED:Primary /Green LED:Secondly)
-Pisto(Red Led): pressing UP+TRIANGLE,return to P/S weapon just press TRIANGLR
-Special weapon(White Led): pressing UP+CIRCLE,return to P/S weapon just press TRIANGLR
=AntiRecoil Adjustment(For P/S Weapon & Pistol)=
-Starting Value adjustment: holding L2+SQUARE and then pressing UP/DOWN/RIGHT/LEFT(short rumble)
-Ending Value adjustment: holding L2+CIRCLE and then pressing UP/DOWN/RIGHT/LEFT(short rumble)
-UP:+1, DOWN:-1, RIGHT:+10, LEFT:-10
-Long rumble means value min. or max.
=RapidFire(For P/S Weapon & Pistol)=
-Rapid ON/OFF: holding L2 & pressing L3 to enable(short rumble/LED flash) or disable(long rumble)
-Rate OF Fire adjustment: holding L2+CROSS and pressing UP/DOWN(short rumble)
-UP:=+20(Slower),DOWN:-20(Faster)
-Long rumble means value min. or max.
=AutoRun=
-Default enable
-Enable/Disable: holding CROSS then pressing L3.(enable:short rumble, disable:long rumble)
=Easy Medkit=
-Holding RIGHT then pressing SQUARE
=Easy Skill Cancelled=
-Holding L3 then pressing L1 for L1 Skill cancelled.(no need to keep holding L1)
-Holding R3 then pressing R1 for R1 Skill cancelled.(no need to keep holding R1)
=Fix Script Mis-match for Primary/Secondly Weapon=
-Holding UP then pressing SQUARE.
=Save Date/Value=
-Holding L3 then pressing R3(short rumble) for saving Data/Value/Setting.
=Script ON/OFF For P/S Weapon & Pistol individual=
-Holding L2+SQUARE then pressing R3 to enable(short rumble) or disable(long rumble/LED OFF) AntiRecoil+RapidFire script individual
=Aim Assist(Aim Abuse)=
-Holding R2 then pressing UP for ON/OFF Aim Assist
=Double Swap=
-"Dodge City Gunslinger's Holster" is requested.
-Holding Down then pressing PS4 TRIANGLE to do "Double Swap" to reload all weapons.
*/
data(
0,0,0,0,// Off
2,0,0,0,// Blue
0,0,2,0,// Green
0,2,0,0,// Red
2,2,2,2 // White
);
int recoil;
int RS;
int RE;
int autorun=0;
int a4;
int tr3=300;
int hg;
int K;
int ms;
int AR1[6];
int ROF[3];
int idx=0, idy=0;
int IAR1[6];
int IART[3];
int rapid[3];
int sp;
int SC[3];
int wp;
int savedata=0;
int rapid_R3;
int sw;
define off=0;
define Blue=1;
define Green=2;
define Red=3;
define White=4;
init {
savedata= get_pvar(SPVAR_16, 0,1,0)
if(savedata== 1) {
AR1[0] = get_pvar(SPVAR_1 ,-100,100,0); AR1[1] = get_pvar(SPVAR_2, -100,100,0); AR1[2] = get_pvar(SPVAR_3, -100,100,0);
AR1[3] = get_pvar(SPVAR_4, -100,100,0); AR1[4] = get_pvar(SPVAR_5, -100,100,0); AR1[5] = get_pvar(SPVAR_6, -100,100,0);
ROF[0] = get_pvar(SPVAR_7, -100,100,0); ROF[1] = get_pvar(SPVAR_8, -100,100,0); ROF[2] = get_pvar(SPVAR_9, -100,100,0);
rapid[0] = get_pvar(SPVAR_10,0,1,0); rapid[1] = get_pvar(SPVAR_11,0,1,0); rapid[2] = get_pvar(SPVAR_12,0,1,0);
SC[0] = get_pvar(SPVAR_13,0,1,0); SC[1] = get_pvar(SPVAR_14,0,1,0); SC[2] = get_pvar(SPVAR_15,0,1,0);
}
IAR1[0]=25; IAR1[3]=20;
IAR1[1]=30; IAR1[4]=25;
IAR1[2]=30; IAR1[5]=30;
IART[0]=3500; IART[1]=3500; IART[2]=3500
ROF[0]=40; ROF[1]=40; ROF[2]=40;
RS=(IAR1[idx]+AR1[idx]);
RE=(IAR1[idx + 3]+AR1[idx + 3]);
}
//unmap PS4_SHARE;
main {
if((idx==1 || idx==0) && get_val(PS4_DOWN) && event_press(PS4_TRIANGLE)){
sw=100;
combo_run(swap2);
}
if(event_press(PS4_TRIANGLE) && !combo_running(Swap) && !get_val(PS4_UP) && !get_val(PS4_DOWN)) { //Swap weapon-TRIANGLE
//set_val(PS4_TRIANGLE, 0);
combo_run(Swap);
if(hg==0 && sp==0 ){wp=!wp;}
if(hg==1 || sp==1){hg=0;sp=0;}
if(wp){idx=1;recoil_value();}
if(!wp){idx=0;recoil_value();}
}
if(get_val(PS4_TRIANGLE) && get_ptime(PS4_TRIANGLE)>200){ combo_stop(Swap);}
if(event_press(PS4_SQUARE) && get_val(PS4_UP)){//Change script UP+SQUARE
wp= !wp;
if(wp){idx=1;recoil_value();}
if(!wp){idx=0;recoil_value();}
//combo_run(rumble_1);
}
////////////////Special///////////////////////////////
if(get_val(PS4_UP) && event_press(PS4_CIRCLE) && sp==0){
hg=0;
sp=1;
set_val(PS4_CIRCLE, 0);
set_val(PS4_UP, 0);
combo_run(HD_TRIANGLE);
combo_stop(led_flash);
setled(White);
}
/////////////////////////HangGun////////////////////////////
if(get_val(PS4_UP) && event_press(PS4_TRIANGLE) && hg==0 && !combo_running(Swap)){
hg=1;
sp=0;
set_val(PS4_TRIANGLE, 0);
set_val(PS4_UP, 0);
combo_run(swap2);
setled(Red);
idx=2;
recoil_value();
}
////////////////////////////Script ON/OFF && LED Status////////////////////////////////////
if(sp==0){
if(SC[idx]==0){
if(get_val(PS4_R2)){combo_run(antirecoil);
if(rapid[idx]==1){combo_run(rapidx);}
}
if(rapid[idx]==0){combo_stop(led_flash);setled(idx+1);}
//if(rapid[1]==0 && idx ==1){combo_stop(led_flash);setled(Green);}
//if(rapid[2]==0 && idx ==2){combo_stop(led_flash);setled(Red);}
if(rapid[idx]==1){combo_run(led_flash);}
}
if(SC[idx]==1){combo_stop(led_flash);setled(off);combo_stop(antirecoil);combo_stop(rapidx);}
}
//////////////////////Hold L2/////////////////////
if(get_val(PS4_L2) && sp==0){
if(!get_val(PS4_SQUARE)&& !get_val(PS4_CROSS)&& !get_val(PS4_CIRCLE)){
if(event_press(PS4_L3)){rapid[idx]=!rapid[idx];
//if(rapid[idx]==1){combo_run(rumble_1);}
if(rapid[idx]==0){combo_run(rumble_2);}
}
if(event_press(PS4_UP)){rapid_R3=!rapid_R3;}
if(rapid_R3){combo_run(Rapid_R3);}
if(!rapid_R3){combo_stop(Rapid_R3);}
}
if(get_val(PS4_SQUARE) && !get_val(PS4_R2)){
if(event_press(PS4_L3)){SC[idx]= !SC[idx];
//if(SC[idx]==0){combo_run(rumble_1);}
if(SC[idx]==1){combo_run(rumble_2);}
}
}
///////////////////////////////////////////////////////////////////
if((get_val(PS4_SQUARE) || get_val(PS4_CIRCLE)) && !get_val(PS4_R2)&& !get_val(PS4_CROSS)){
if(get_val(PS4_SQUARE)){idy=idx;}
if(get_val(PS4_CIRCLE)){idy=idx + 3;}
if(event_press(PS4_UP)){AR1[idy]=AR1[idy]+1; }//combo_run(rumble_1);}
if(event_press(PS4_DOWN)){AR1[idy]=AR1[idy]-1; }//combo_run(rumble_1);}
if(event_press(PS4_RIGHT)){AR1[idy]=AR1[idy]+10;}//combo_run(rumble_1);}
if(event_press(PS4_LEFT)){AR1[idy]=AR1[idy]-10;}//combo_run(rumble_1);}
recoil_value()
set_val(PS4_UP,0); set_val(PS4_DOWN,0);
set_val(PS4_RIGHT,0); set_val(PS4_LEFT,0);
}
K=(IART[idx])/(abs((IAR1[idx]+AR1[idx])-(IAR1[idx + 3]+AR1[idx + 3])));
//////////////////////////////////////////////////////////////////////
if(get_val(PS4_CROSS) && rapid[idx] == 1 && !get_val(PS4_R2)){// ROF
if(event_press(PS4_UP)){ROF[idx]=ROF[idx]+20;//combo_run(rumble_1);
if(ROF[idx]>=1000){ROF[idx]=500;combo_run(rumble_2);}
}
if(event_press(PS4_DOWN)){ROF[idx]=ROF[idx]-20; //combo_run(rumble_1);
if(ROF[idx]<=40){ROF[idx]=40;combo_run(rumble_2);}
}
set_val(PS4_UP,0);
set_val(PS4_DOWN,0);
}
}//if get_val L2 end
////////////////////////////////////////////////////////////////////
if(get_val(PS4_L3) && event_press(PS4_L1)){combo_run(HD_L1);}
if(get_val(PS4_R3) && event_press(PS4_R1)){combo_run(HD_R1);}
if(get_val(PS4_RIGHT) && event_press(PS4_SQUARE)){combo_run(HD_RIGHT);}
////////////////////////////////////////////////////////////////////
if(event_release(PS4_R2)|| event_release(PS4_L2)){ //Reset
combo_stop(antirecoil);
combo_stop(rapidx);
combo_stop(Rapid_R3);
recoil_value()
ms=0;
tr3=300;
}
///////////////AutoRun//////////////
if(get_val(PS4_CROSS)){
if(event_press(PS4_L3)){
autorun=!autorun;
if(autorun){
combo_run(rumble_2);
if(combo_running(run)){
combo_stop(run);
}
}
//if(!autorun){
// combo_run(rumble_1);
// }
}
}
if(!get_val(PS4_L2) && autorun==0){
if(get_val(PS4_LY) < -50 && a4==0){
combo_run(run);
}
if((get_val(PS4_LY) > -50) && (abs(get_val(PS4_LX))) < 10 && a4==1){
a4=0;
}
}
//////////////////Save Data///////////////////
if(get_val(PS4_L3) && event_press(PS4_R3))
{
set_pvar(SPVAR_1 ,AR1[0]); set_pvar(SPVAR_2 ,AR1[1]); set_pvar(SPVAR_3 ,AR1[2]);
set_pvar(SPVAR_4 ,AR1[3]); set_pvar(SPVAR_5 ,AR1[4]); set_pvar(SPVAR_6 ,AR1[5]);
set_pvar(SPVAR_7 ,ROF[0]); set_pvar(SPVAR_8 ,ROF[1]); set_pvar(SPVAR_9 ,ROF[2]);
set_pvar(SPVAR_10,rapid[0]); set_pvar(SPVAR_11,rapid[1]); set_pvar(SPVAR_12,rapid[2]);
set_pvar(SPVAR_16,1); combo_run(rumble_2);
}
/*set_val(TRACE_1, wp);
set_val(TRACE_2, hg);
set_val(TRACE_3, sp);
set_val(TRACE_4, idx);*/
//set_val(TRACE_5, a4);
//set_val(TRACE_6, tr3/10);
}
combo HD_TRIANGLE{
set_val(PS4_CIRCLE, 0);
set_val(PS4_TRIANGLE, 100);
wait(1000);
//sp=0;
}
combo HD_L1{
set_val(PS4_L1, 100);
wait(3000);
}
combo HD_R1{
set_val(PS4_R1, 100);
wait(3000);
}
combo HD_RIGHT{
set_val(PS4_RIGHT, 100);
wait(2500);
}
combo Swap{
set_val(PS4_TRIANGLE, 100);
wait(200);
set_val(PS4_TRIANGLE, 0);
wait(1100);
//swt=0;
}
combo swap2{
set_val(PS4_TRIANGLE, 100);
wait(80);
set_val(PS4_TRIANGLE, 0);
wait(80);
set_val(PS4_TRIANGLE, 100);
wait(80);
set_val(PS4_TRIANGLE, 0);
wait(600);
set_val(PS4_TRIANGLE, sw);
wait(80);
set_val(PS4_TRIANGLE, 0);
wait(80);
sw=0;
}
combo run {//AutoRun
wait(200);
set_val(PS4_L3,100);
wait(200);
set_val(PS4_L3, 0);
wait(100);
a4=1;
}
combo antirecoil{//Weapon AR
ms = ms + get_rtime();
if(ms >= K){ms=0;
if(RE > RS){ RS++;}
if(RS > RE){ RS--;}
}
recoil = RS + ((get_val(PS4_RY)/2));
if(recoil > 100){recoil = 100;}
if(recoil < -100){recoil = -100;}
set_val(PS4_RY, recoil);
wait(50);
set_val(PS4_RY, recoil);
}
combo rapidx{//Rapidx
set_val(PS4_R2, 100);
wait(40);
set_val(PS4_R2, 0);
wait(ROF[idx]);
//set_val(PS4_R2, 100);
}
combo Rapid_R3{//Rapid_R3
wait(tr3);
set_val(PS4_R3, 100);
wait(40);
set_val(PS4_R3, 0);
wait(40);
tr3=0;
}
/*
combo rumble_1{
wait(200);
set_rumble(RUMBLE_B, 80);
wait(100);
reset_rumble();
wait(50);
//rb=0;
}
*/
combo rumble_2{
wait(200);
set_rumble(RUMBLE_B, 80);
wait(1000);
reset_rumble();
wait(50);
//rb=0;
}
combo led_flash{
setled(idx + 1);
wait(500);
setled(off);
wait(500);
}
function recoil_value(){
RS=(IAR1[idx]+AR1[idx]);
RE=(IAR1[idx + 3]+AR1[idx + 3]);
if(RS > 100){RS=100;AR1[idx]=100-IAR1[idx];combo_run(rumble_2)}
if(RS < -100){RS=-100;AR1[idx]=-100-IAR1[idx];combo_run(rumble_2)}
if(RE > 100){RE=100;AR1[idx + 3]=100-IAR1[idx + 3];combo_run(rumble_2)}
if(RE < -100){RE=-100;AR1[idx + 3]=-100-IAR1[idx + 3];combo_run(rumble_2)}
}
function setled(colour) {
set_led(LED_1, dbyte(colour * 4));
set_led(LED_2, dbyte((colour * 4) + 1));
set_led(LED_3, dbyte((colour * 4) + 2));
set_led(LED_4, dbyte((colour * 4) + 3));
}
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
2 posts
• Page 1 of 1
Return to GPC1 Script Programming
Who is online
Users browsing this forum: No registered users and 49 guests