fortnite script convert

GPC1 script programming for Titan One. Code examples, questions, requests.

Re: fortnite script convert

Postby J2Kbr » Wed Aug 07, 2019 10:03 am

O.g swayz wrote:can someone convert this script as well please......

Converted:
Code: Select all
define SHOOT_BTN    =  4;
define AIM_BTN      =  7;
define CROUCH_BTN   =  5;
define RELOAD_BTN   = 20;
define SPRINT_BTN   =  8;
define JUMP_BTN     = 19;
define RIGHT_BUMP   =  3;
define LEFT_BUMP    =  6;
define SWAP_BTN     = 17;
define BUILD_BTN    = 18;
define UP           = 13;
define DOWN         = 14;
define LEFT         = 15;
define RIGHT        = 16;
define RX           =  9;
define RY           = 10;
define LX           = 11;
define LY           = 12;
define VIEW         =  1;
define MENU         =  2;
define RB           =  3;
define RT           =  4;
define RS           =  5;
define LB           =  6;
define LT           =  7;
define LS           =  8;
define Y            = 17;
define BUILD        = 18;
define A            = 19;
define X            = 20;
 
int AimAbuse        = TRUE;
int ZoomInValues    = 290;
int ZoomOutValues   = 40;
 
int AimAssist       = TRUE;
int Shake1          =  19;
int Shake2          = -19;
 
int RapidFire       = FALSE;
 
int SwapTrigger     = FALSE;
 
int EDIT_BUTTON     = LS;
int RESET_EDIT_BUTTON = RS;
int CONFIRM_BUTTON  = BUILD;
int edit = FALSE;
 
int FIRE = 4;
 
int value  = 19;
int value2 =-19;
int delay  = 20;
int GhostPeek_R = 111;
 
int pressedIt[6];                                                                       
int WAIT;                                                                               
int num, i, a;                                                                           
int button;                                                                             
int rumble_type = RUMBLE_A;
int HairTrigger = TRUE ;
define Sampling_Time = 10;
define Aim_Boost = 7;
define Aim_Correction = 12;
define Aim_Perfection_Limit = 30;
define POS_Aim_Limit = 70;
int NEG_Aim_Limit = -70;
define POS_Micro_MVT_Limit = 25;
int NEG_Micro_MVT_Limit = -25;
int X_Last_Value     = 0;
int Y_Last_Value     = 0;
int X_Current_Value  = 0;
int Y_Current_Value  = 0;
int Sampling_Done = FALSE;
int spiroide_pulse = 0;
int fine_pulse = 0;
int Joystick_calibration = FALSE;
int RX_Axis_Joystick_calibrate = 0;
int RY_Axis_Joystick_calibrate = 0;
 
main {                                                                           
 
if(HairTrigger){                                                                 
if(get_val(SHOOT_BTN)){set_val(SHOOT_BTN,100);}                                 
}                                                                               
 
if (SwapTrigger){                                                               
swap (7,6) swap (4,3) }                                                         
 
if(AimAbuse){                                                                   
if(get_val(AIM_BTN)> 95){                                                       
combo_run(AimAbuseC);}                                                           
if(event_release(AIM_BTN)){ combo_stop(AimAbuseC);                               
}                                                                               
}                                                                               
 
 
if (get_val(AIM_BTN)) {                                                         
if (event_press(LEFT_BUMP)) {                                                   
combo_run( GhostPeek);                                                           
}                                                                               
set_val(LEFT_BUMP, 0);                                                           
}                                                                               
 
if (get_val(AIM_BTN) && get_val(RIGHT_BUMP)) {                                   
combo_run(SingleShot);                                                           
set_val(RIGHT_BUMP, 0);                                                         
} else {                                                                         
combo_stop(SingleShot);                                                         
}                                                                               
 
if(edit){
if(get_val(EDIT_BUTTON)){
if(get_ptime(EDIT_BUTTON) > 5){
edit = TRUE;
combo_run(cheese)
}
}
if(event_release(EDIT_BUTTON)){
combo_stop(cheese);
set_click(CONFIRM_BUTTON, 1, 100);
edit = FALSE;
}
if(event_press(RESET_EDIT_BUTTON)){
set_click(RT, 0, 0);
combo_stop(cheese);
combo_run(wait1);
set_click(CONFIRM_BUTTON, 1, 100);
set_click(EDIT_BUTTON, 0, 0);
edit = FALSE;
}
}
 
if(get_val(EDIT_BUTTON) && !get_val(RT) < 20){
edit = TRUE;
}
if (a) {
if (i < num) {
if (!combo_running(master)) {
combo_run(master);
}
} else if
(i > num) {a = FALSE;
}
}
 
if(edit == TRUE) {
if(event_press(X)){
combo_run(FlrPyraEdit);
}
}                                         
 
if (Joystick_calibration == FALSE)                                               
{                                                                               
RX_Axis_Joystick_calibrate = get_val(PS4_RX);                                   
RY_Axis_Joystick_calibrate = get_val(PS4_RY);                                   
Joystick_calibration = TRUE;                                                     
}                                                                               
X_Last_Value = X_Current_Value;                                                 
Y_Last_Value = Y_Current_Value;                                                 
X_Current_Value = get_lval(PS4_RX)- RX_Axis_Joystick_calibrate;                 
Y_Current_Value = get_lval(PS4_RY)- RY_Axis_Joystick_calibrate;                 
if(get_val(PS4_L2))                                                             
{                                                                               
if(abs(X_Current_Value) <= POS_Micro_MVT_Limit && abs(Y_Current_Value) <= POS_Micro_MVT_Limit)
{                                                                               
if(abs(X_Last_Value - X_Current_Value) < 15)                                     
{                                                                               
combo_stop(Aim_Assist_Perfection);                                               
Sampling_Done = FALSE;                                                           
if(get_val(PS4_R2) > 95)                                                         
{                                                                               
combo_stop(Fine_Tune_Aim);                                                       
fine_pulse = 0;                                                                 
combo_run(spiroide_Aim_Assit);                                                   
}                                                                               
else                                                                             
{                                                                               
combo_stop(spiroide_Aim_Assit);                                                 
spiroide_pulse = 0;                                                             
combo_run(Fine_Tune_Aim);                                                       
}                                                                               
}                                                                               
}                                                                               
else if(abs(X_Current_Value) <= POS_Aim_Limit && abs(Y_Current_Value) <= POS_Aim_Limit)
{                                                                               
combo_stop(Fine_Tune_Aim);                                                       
combo_stop(spiroide_Aim_Assit);                                                 
spiroide_pulse = 0;                                                             
fine_pulse = 0;                                                                 
combo_run(Aim_Assist_Perfection);                                               
}                                                                               
}                                                                               
else                                                                             
{                                                                               
combo_stop(Fine_Tune_Aim);                                                       
combo_stop(spiroide_Aim_Assit);                                                 
combo_stop(Aim_Assist_Perfection);                                               
spiroide_pulse = 0;                                                             
fine_pulse = 0;                                                                 
Sampling_Done = FALSE;                                                           
}                                                                               
 
if (AimAssist) {                                                                 
if (get_val(AIM_BTN)) {                                                         
combo_run(AimAssistC);}}                                                         
if (get_val(RX)<value2||get_val(RX)>value||get_val(RY)<value2||get_val(RY)>value||get_val(RX)<value2||get_val(RX)>value||get_val(RY)<value2||get_val(RY)>value){
combo_stop(AimAssistC);}                                                         
 
if(get_val(AIM_BTN) && event_press(LEFT)) {                                     
RapidFire =! RapidFire;                                                         
rumble_A_if_true(RapidFire);                                                     
}                                                                               
if(RapidFire){                                                                               
if (get_val(AIM_BTN) && get_val(SHOOT_BTN)) {                                   
combo_run( RapidFireC);                                                           
}                                                                               
}                                                                               
}                                                                                                                                                                       
 
combo AimAbuseC {                                                                         
set_val(AIM_BTN, 100);                                                                   
wait(ZoomInValues);                                                                     
set_val(AIM_BTN, 0);                                                                     
wait(ZoomOutValues);                                                                     
} 
combo AimAssistC {
set_val(RY, (Shake1));
wait(delay)
set_val(RX, (Shake1));
wait(delay)
set_val(RY, (Shake2));
wait(delay)
set_val(RX, (Shake2));
wait(delay)
set_val(RY, (Shake1));
wait(delay)
set_val(RX, (Shake1));
wait(delay)
set_val(RY, (Shake2));
wait(delay)
set_val(RX, (Shake2));
wait(delay)
}
combo SingleShot {
set_val(SHOOT_BTN,100);
wait(100);
wait(250);
set_val(SHOOT_BTN,100);
}
combo GhostPeek {
set_val(CROUCH_BTN, 100);
wait(25); wait(25);
set_val(SHOOT_BTN, 100);
wait(25); wait(25);
set_val(CROUCH_BTN, 100);
wait(25); wait(GhostPeek_R);
}                                                                                             
combo RapidFireC {                                                                           
set_val(SHOOT_BTN, 100);                                                                     
wait(120);                                                                                   
set_val(SHOOT_BTN, 0);                                                                       
wait(30);                                                                                   
}
combo Aim_Assist_Perfection
{       
X_Last_Value = X_Current_Value
Y_Last_Value = Y_Current_Value
wait(Sampling_Time);
X_Current_Value = get_lval(PS4_RX)- RX_Axis_Joystick_calibrate;
Y_Current_Value = get_lval(PS4_RY)- RY_Axis_Joystick_calibrate;
if (Sampling_Done == TRUE )
{
Aim_Perfection(X_Last_Value, X_Current_Value, 1, 0, 1, 0 );
Aim_Perfection(Y_Last_Value, Y_Current_Value, 1, 0, 0, 1 );
}
X_Last_Value = X_Current_Value;
Y_Last_Value = Y_Current_Value;
wait(Sampling_Time);
X_Current_Value = get_lval(PS4_RX)- RX_Axis_Joystick_calibrate;
Y_Current_Value = get_lval(PS4_RY)- RX_Axis_Joystick_calibrate;
if (Sampling_Done == TRUE )
{
Aim_Perfection(X_Last_Value, X_Current_Value, 0, 1, 1, 0 );
Aim_Perfection(Y_Last_Value, Y_Current_Value, 0, 1, 0, 1 );
}
Sampling_Done = TRUE;
wait(Sampling_Time);
}
 
combo Fine_Tune_Aim {
set_val(PS4_RX,(4 + fine_pulse));
wait(Sampling_Time);
wait(Sampling_Time);
wait(Sampling_Time);
set_val(PS4_RX,(-4 - fine_pulse));
wait(Sampling_Time);
wait(Sampling_Time);
wait(Sampling_Time);
fine_pulse = fine_pulse + 2;
if ( fine_pulse > 10)
{
fine_pulse = 0;   
}
}
 
combo spiroide_Aim_Assit {
set_val(PS4_RY,(5 + spiroide_pulse));
wait(Sampling_Time);
wait(Sampling_Time);
set_val(PS4_RX,(4 + spiroide_pulse));
wait(Sampling_Time);
wait(Sampling_Time);
set_val(PS4_RY,(5 + spiroide_pulse));
wait(Sampling_Time);
wait(Sampling_Time);
wait(Sampling_Time);
wait(Sampling_Time);
set_val(PS4_RY,(5 + spiroide_pulse));
wait(Sampling_Time);
wait(Sampling_Time);
set_val(PS4_RX,(-4 - spiroide_pulse));
wait(Sampling_Time);
wait(Sampling_Time);
set_val(PS4_RY,(5 + spiroide_pulse));
wait(Sampling_Time);
wait(Sampling_Time);
wait(Sampling_Time);
wait(Sampling_Time);
spiroide_pulse = spiroide_pulse + 2;
if ( spiroide_pulse > 10)
{
spiroide_pulse = 0;   
}
}
 
combo VIBRATE {                                                                             
set_rumble(rumble_type, 100);                                                               
wait(300);                                                                                   
reset_rumble();                                                                             
}                                                                                           
 
combo wait1 {
wait(50);
wait(55);
}
combo cheese {
set_val(RT,100);
wait(10000);
}
combo FlrPyraEdit {
set_val(EDIT_BUTTON, 100);
wait(12);
set_val(FIRE, 100);
wait(12);
set_val(FIRE, 0);
set_val(EDIT_BUTTON, 0);
wait(12);
set_val(BUILD, 100);
wait(12);
set_val(BUILD, 0);
wait(100);
set_val(EDIT_BUTTON, 100);
wait(12);
set_val(FIRE, 100);
wait(12);
set_val(FIRE, 0);
set_val(EDIT_BUTTON, 0);
wait(12);
set_val(BUILD, 100);
wait(12);
set_val(BUILD, 0);
wait(8);
}
combo master {                                                                               
wait(WAIT);                                                                                 
set_val(button, 100);                                                                       
wait(28);                                                                                   
set_val(button, 0);                                                                         
wait(28);                                                                                   
i = i + 1;                                                                                   
}   
function Aim_Perfection(Last_Value, Current_Value, Boost, Correction, X_AXIS, Y_AXIS )
{
if(abs(Last_Value - Current_Value) < Aim_Perfection_Limit)
{
if(Last_Value < Current_Value)
{     
if (Boost)
{
if (X_AXIS)
set_val(PS4_RX, (Current_Value + Aim_Boost));
if (Y_AXIS)
set_val(PS4_RY, (Current_Value + Aim_Boost));
}
else if(Correction)
{
if (X_AXIS)
set_val(PS4_RX, (Current_Value - Aim_Correction));
if (Y_AXIS)
set_val(PS4_RY, (Current_Value - Aim_Correction));   
}
}
else
{
if (Boost)
{
if (X_AXIS)
set_val(PS4_RX, (Current_Value - Aim_Boost));
if (Y_AXIS)
set_val(PS4_RY, (Current_Value - Aim_Boost));
}
else if(Correction)
{
if (X_AXIS)
set_val(PS4_RX, (Current_Value + Aim_Correction));
if (Y_AXIS)
set_val(PS4_RY, (Current_Value + Aim_Correction));   
}
}
}
}
 
function rumble_A_if_true(var) {                                                             
if (var) rumble_type = RUMBLE_A;                                                             
else rumble_type = RUMBLE_B;                                                                 
combo_run(VIBRATE);                                                                         
}                                                                                       
 
function set_click(B, Num, Wait) {                                                           
WAIT = Wait;                                                                                 
i = 0;                                                                                       
button = B;                                                                                 
num = Num;                                                                                   
a = TRUE;                                                                                   
}
 
ConsoleTuner Support Team
User avatar
J2Kbr
General of the Army
General of the Army
 
Posts: 20323
Joined: Tue Mar 18, 2014 1:39 pm

Re: fortnite script convert

Postby O.g swayz » Wed Aug 07, 2019 1:28 pm

thank you so much
User avatar
O.g swayz
First Sergeant
First Sergeant
 
Posts: 54
Joined: Tue Feb 05, 2019 3:46 pm
Location: bundaberg,qld

Previous

Return to GPC1 Script Programming

Who is online

Users browsing this forum: No registered users and 43 guests