Convert Titan One scripts to Titan Two the easy way
49 posts
• Page 4 of 5 • 1, 2, 3, 4, 5
Re: Convert Titan1 scripts to Titan2 the easy way
Converted using the back compatibility header file:
- Code: Select all
#include <titanone.gph>
//------------------------------------------------|
// \ \ \ \ \ ___ _ __\ \ ,_\ __ __ _ |
// \ \ \ \ \ / __`\/\`'__\ \ \/ /'__`\/\ \/'\ |
// \ \ \_/ \/\ \L\ \ \ \/ \ \ \_/\ __/\/> </ |
// \ `\___/\ \____/\ \_\ \ \__\ \____\/\_/\_\ |
// `\/__/ \/___/ \/_/ \/__/\/____/\//\/_/ |
//------------------------------------------------|
//DEFINITIONS
define ANTI_RECOIL = 20; // change this value to compensate vertical recoil (0 - 100)
define ANTI_RECOIL_LEFT = 0; // change this value to compensate to the left (0 - 100)
define ANTI_RECOIL_RIGHT = 0; // change this value to compensate to the right (0 - 100)
//INITIALIZATION
int Dead_Zone_Up = -10 ;
int Dead_Zone_Down = 10 ;
int Dead_Zone_Left = -10 ;
int Dead_Zone_Right = 10 ;
int Recoil_Down = 28;
int Recoil_Up = -28;
int Recoil_Delay = 17;
int Recoil_Release;
int Vertical;
int value = 33;
int value2 = -33;
int delay = 11;
int crouch_shot_onoff = FALSE;
int rf = FALSE;
int rf2 = FALSE;
int rf3 = FALSE;
int Aim_BTN;
int Shoot_BTN;
int RX;
int RY;
int Crouch_BTN;
int LeanLeft;
int LeanRight;
int Switch;
int LX;
int LY;
int Left;
int Up;
init { //-BUTTON LAYOUT-\\
if(get_console() == PIO_PS4){ Aim_BTN = PS4_L2; Shoot_BTN = PS4_R2; RX = PS4_RX; RY = PS4_RY; Crouch_BTN = PS4_CIRCLE; LeanLeft = PS4_L3; LeanRight = PS4_R3; Switch = PS4_TRIANGLE; LX = PS4_LX; LY = PS4_LY; Left = PS4_LEFT; Up = PS4_UP;
}else{
Aim_BTN = XB1_LT; Shoot_BTN = XB1_RT; RX = XB1_RX; RY = XB1_RY; Crouch_BTN = XB1_B; LeanLeft = XB1_LS; LeanRight = XB1_RS; Switch = XB1_Y; LX = XB1_LX; LY = XB1_LY; Left = XB1_LEFT; Up = XB1_UP;
}
Recoil_Release = Recoil_Down + 1; // Anti-Recoil Release Value (For Positive Number) // Anti-Recoil
}
//MAIN SCRIPT
main {
//AimAssist
if(get_val(Shoot_BTN) && get_val(Aim_BTN)) {
combo_run(RT_C);
}
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(RT_C);
}
//FastLean
if (get_val(Aim_BTN) && event_press(LeanLeft)) combo_run(LeanLeft_Combo);
if(combo_running(LeanLeft)) {set_val(LeanLeft, 0);}
if (get_val(Aim_BTN) && event_press(LeanRight)) combo_run(LeanRight_Combo);
if(combo_running(LeanRight)) set_val(LeanRight, 0);
//RapidFire
if(event_press(Left)) { // Rapid Fire Secondary
rf = FALSE;
rf2 = TRUE;
rf3 = FALSE;
}
if(event_press(Up)) { // Rapid Fire Both
rf = TRUE;
rf2 = FALSE;
}
if (rf) {
if (get_val(Shoot_BTN))
combo_run(rapidfire);
}
if (rf2) {
if (event_press(Switch))
rf3 = !rf3;
}
if (rf3) {
if (get_val(Shoot_BTN))
combo_run(rapidfire);
}
//CrouchShot
if (get_val(Aim_BTN) && event_press(Left)) {
crouch_shot_onoff = !crouch_shot_onoff;
}
if (crouch_shot_onoff) {
if (get_val(Shoot_BTN))
combo_run(Crouch_Shot);
}
//AntiRecoil
if (get_val(Shoot_BTN))
combo_run(Anti_Recoil1);
combo_run(Dead_Zone);
}
//COMBOS
combo Crouch_Shot { //CrouchShot
set_val(Crouch_BTN, 100);
wait(80);
wait(60);
}
combo LeanRight_Combo {//FastLeanRight
set_val(LeanLeft, 100);
wait(40);
set_val(LeanRight, 100);
set_val(LeanLeft, 100);
wait(90);
set_val(LeanRight, 100);
set_val(LeanLeft, 0);
wait(10);
set_val(LeanRight, 0);
}
combo LeanLeft_Combo {//FastLeanLeft
set_val(LeanRight, 100);
wait(40);
set_val(LeanLeft, 100);
set_val(LeanRight, 100);
wait(90);
set_val(LeanLeft, 100);
set_val(LeanRight, 0);
wait(10);
set_val(LeanLeft, 0);
}
combo rapidfire { // Rapid Fire
set_val(Shoot_BTN,100);
wait(17);
set_val(Shoot_BTN,0);
wait(17);
}
combo RT_C {
set_val(RY, -32);
wait(delay);
set_val(RX, 32);
set_val(RY, 22);
wait(delay) ;
set_val(RY, 22);
wait(delay) ;
set_val(RX, -32);
set_val(RY, 22);
wait(delay);
}
combo Dead_Zone { // Anti-Recoil
set_val(RX,Dead_Zone_Vertical(RX,Dead_Zone_Right,Dead_Zone_Left));
set_val(RY,Dead_Zone_Vertical(RY,Dead_Zone_Down,Dead_Zone_Up));
set_val(LX,Dead_Zone_Vertical(LX,Dead_Zone_Right,Dead_Zone_Left));
set_val(LY,Dead_Zone_Vertical(LY,Dead_Zone_Down,Dead_Zone_Up));
}
combo Anti_Recoil1 { //Don't touch this combo pls
set_val(RY,Anti_Recoil_Vertical(RY,Recoil_Down)); // Down
wait(Recoil_Delay);
set_val(RY,Anti_Recoil_Vertical(RY,Recoil_Up)); // Up
wait(Recoil_Delay);
}
function Anti_Recoil_Vertical(f_axis,f_val) { // Return Anti-Recoil Value Or Controller Value If Above Release // Anti-Recoil
Vertical = get_val(f_axis);
if(abs(Vertical) < Recoil_Release)
return f_val + Vertical;
return Vertical; }
function Dead_Zone_Vertical(f_axis,f_pv,f_nv) { // Return zero if between postive & negative limits // Anti-Recoil
if(get_val(f_axis) < f_pv && get_val(f_axis) > f_nv)
return 0;
return get_val(f_axis); }
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Convert Titan1 scripts to Titan2 the easy way
J2Kbr wrote:Converted using the back compatibility header file:
- Code: Select all
#include <titanone.gph>
//------------------------------------------------|
// \ \ \ \ \ ___ _ __\ \ ,_\ __ __ _ |
// \ \ \ \ \ / __`\/\`'__\ \ \/ /'__`\/\ \/'\ |
// \ \ \_/ \/\ \L\ \ \ \/ \ \ \_/\ __/\/> </ |
// \ `\___/\ \____/\ \_\ \ \__\ \____\/\_/\_\ |
// `\/__/ \/___/ \/_/ \/__/\/____/\//\/_/ |
//------------------------------------------------|
//DEFINITIONS
define ANTI_RECOIL = 20; // change this value to compensate vertical recoil (0 - 100)
define ANTI_RECOIL_LEFT = 0; // change this value to compensate to the left (0 - 100)
define ANTI_RECOIL_RIGHT = 0; // change this value to compensate to the right (0 - 100)
//INITIALIZATION
int Dead_Zone_Up = -10 ;
int Dead_Zone_Down = 10 ;
int Dead_Zone_Left = -10 ;
int Dead_Zone_Right = 10 ;
int Recoil_Down = 28;
int Recoil_Up = -28;
int Recoil_Delay = 17;
int Recoil_Release;
int Vertical;
int value = 33;
int value2 = -33;
int delay = 11;
int crouch_shot_onoff = FALSE;
int rf = FALSE;
int rf2 = FALSE;
int rf3 = FALSE;
int Aim_BTN;
int Shoot_BTN;
int RX;
int RY;
int Crouch_BTN;
int LeanLeft;
int LeanRight;
int Switch;
int LX;
int LY;
int Left;
int Up;
init { //-BUTTON LAYOUT-\\
if(get_console() == PIO_PS4){ Aim_BTN = PS4_L2; Shoot_BTN = PS4_R2; RX = PS4_RX; RY = PS4_RY; Crouch_BTN = PS4_CIRCLE; LeanLeft = PS4_L3; LeanRight = PS4_R3; Switch = PS4_TRIANGLE; LX = PS4_LX; LY = PS4_LY; Left = PS4_LEFT; Up = PS4_UP;
}else{
Aim_BTN = XB1_LT; Shoot_BTN = XB1_RT; RX = XB1_RX; RY = XB1_RY; Crouch_BTN = XB1_B; LeanLeft = XB1_LS; LeanRight = XB1_RS; Switch = XB1_Y; LX = XB1_LX; LY = XB1_LY; Left = XB1_LEFT; Up = XB1_UP;
}
Recoil_Release = Recoil_Down + 1; // Anti-Recoil Release Value (For Positive Number) // Anti-Recoil
}
//MAIN SCRIPT
main {
//AimAssist
if(get_val(Shoot_BTN) && get_val(Aim_BTN)) {
combo_run(RT_C);
}
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(RT_C);
}
//FastLean
if (get_val(Aim_BTN) && event_press(LeanLeft)) combo_run(LeanLeft_Combo);
if(combo_running(LeanLeft)) {set_val(LeanLeft, 0);}
if (get_val(Aim_BTN) && event_press(LeanRight)) combo_run(LeanRight_Combo);
if(combo_running(LeanRight)) set_val(LeanRight, 0);
//RapidFire
if(event_press(Left)) { // Rapid Fire Secondary
rf = FALSE;
rf2 = TRUE;
rf3 = FALSE;
}
if(event_press(Up)) { // Rapid Fire Both
rf = TRUE;
rf2 = FALSE;
}
if (rf) {
if (get_val(Shoot_BTN))
combo_run(rapidfire);
}
if (rf2) {
if (event_press(Switch))
rf3 = !rf3;
}
if (rf3) {
if (get_val(Shoot_BTN))
combo_run(rapidfire);
}
//CrouchShot
if (get_val(Aim_BTN) && event_press(Left)) {
crouch_shot_onoff = !crouch_shot_onoff;
}
if (crouch_shot_onoff) {
if (get_val(Shoot_BTN))
combo_run(Crouch_Shot);
}
//AntiRecoil
if (get_val(Shoot_BTN))
combo_run(Anti_Recoil1);
combo_run(Dead_Zone);
}
//COMBOS
combo Crouch_Shot { //CrouchShot
set_val(Crouch_BTN, 100);
wait(80);
wait(60);
}
combo LeanRight_Combo {//FastLeanRight
set_val(LeanLeft, 100);
wait(40);
set_val(LeanRight, 100);
set_val(LeanLeft, 100);
wait(90);
set_val(LeanRight, 100);
set_val(LeanLeft, 0);
wait(10);
set_val(LeanRight, 0);
}
combo LeanLeft_Combo {//FastLeanLeft
set_val(LeanRight, 100);
wait(40);
set_val(LeanLeft, 100);
set_val(LeanRight, 100);
wait(90);
set_val(LeanLeft, 100);
set_val(LeanRight, 0);
wait(10);
set_val(LeanLeft, 0);
}
combo rapidfire { // Rapid Fire
set_val(Shoot_BTN,100);
wait(17);
set_val(Shoot_BTN,0);
wait(17);
}
combo RT_C {
set_val(RY, -32);
wait(delay);
set_val(RX, 32);
set_val(RY, 22);
wait(delay) ;
set_val(RY, 22);
wait(delay) ;
set_val(RX, -32);
set_val(RY, 22);
wait(delay);
}
combo Dead_Zone { // Anti-Recoil
set_val(RX,Dead_Zone_Vertical(RX,Dead_Zone_Right,Dead_Zone_Left));
set_val(RY,Dead_Zone_Vertical(RY,Dead_Zone_Down,Dead_Zone_Up));
set_val(LX,Dead_Zone_Vertical(LX,Dead_Zone_Right,Dead_Zone_Left));
set_val(LY,Dead_Zone_Vertical(LY,Dead_Zone_Down,Dead_Zone_Up));
}
combo Anti_Recoil1 { //Don't touch this combo pls
set_val(RY,Anti_Recoil_Vertical(RY,Recoil_Down)); // Down
wait(Recoil_Delay);
set_val(RY,Anti_Recoil_Vertical(RY,Recoil_Up)); // Up
wait(Recoil_Delay);
}
function Anti_Recoil_Vertical(f_axis,f_val) { // Return Anti-Recoil Value Or Controller Value If Above Release // Anti-Recoil
Vertical = get_val(f_axis);
if(abs(Vertical) < Recoil_Release)
return f_val + Vertical;
return Vertical; }
function Dead_Zone_Vertical(f_axis,f_pv,f_nv) { // Return zero if between postive & negative limits // Anti-Recoil
if(get_val(f_axis) < f_pv && get_val(f_axis) > f_nv)
return 0;
return get_val(f_axis); }
Thanks for the reply. When ever I tried to convert this I kept getting errors. I added the titanone.gph thing and all the other headers that you posted in the replies that was said to be needed for cm conversions (this is a cm script) I did the find all combo and changed it to combo c but to no avail. Is there anything special that you did to covert this or did you just add the titanone.gph header?
-
kick238 - Sergeant
- Posts: 9
- Joined: Tue Aug 21, 2018 3:57 pm
Re: Convert Titan1 scripts to Titan2 the easy way
kick238 wrote:J2Kbr wrote:Converted using the back compatibility header file...cut...
Thanks for the reply. When ever I tried to convert this I kept getting errors. I added the titanone.gph thing and all the other headers that you posted in the replies that was said to be needed for cm conversions (this is a cm script) I did the find all combo and changed it to combo c but to no avail. Is there anything special that you did to covert this or did you just add the titanone.gph header?
I don't know what "all the other headers" are you are referring to, you only need the back compatibility header for your script.
Post containing the unmodified script -> viewtopic.php?f=26&t=7591&start=20#p77745
Steps:
- add the back compatibility header to the top of your script
- Code: Select all
#include <titanone.gph>
- hit compile, result:
- Code: Select all
GPC error: e.gpc(124): Invalid symbol redefinition 'LeanRight'
GPC error: e.gpc(136): Invalid symbol redefinition 'LeanLeft'
GPC: GPC Compile ABORTED with 0 warning(s) and 2 error(s). - double click on the first "redefinition" error , it will jump to the line, change
- Code: Select all
combo LeanRight {//FastLeanRight
- Code: Select all
combo cLeanRight {//FastLeanRight
and hit compile again, result:- Code: Select all
GPC error: e.gpc(136): Invalid symbol redefinition 'LeanLeft'
GPC: GPC Compile ABORTED with 0 warning(s) and 1 error(s). - double click on the first line.... change
- Code: Select all
combo LeanLeft {//FastLeanLeft
- Code: Select all
combo cLeanLeft {//FastLeanLeft
- Code: Select all
GPC error: e.gpc(17): syntax error, unexpected INT16, expecting C or T 'int'.
GPC: GPC Compile ABORTED with 0 warning(s) and 1 error(s). - double click on the first error line again...add the missing ; to the end of the previous line or to the start of the current line, hit compile again,...repeat this process until you are getting this type of error message:
- Code: Select all
GPC error: e.gpc(66): Identifier is not a combo 'LeanLeft'.
GPC error: e.gpc(70): Identifier is not a combo 'LeanRight'.
GPC error: e.gpc(92): syntax error, unexpected B_E, expecting C '}'.
GPC: GPC Compile ABORTED with 0 warning(s) and 3 error(s). - We have renamed two combos to fix the redefinition error, so we have to tell the script the correct combo name now.
Double click on the first error message again.
Starting from this line search for all lines with ctrl+f containing "combo_.*LeanLeft" (without the quotes).
and change each LeanLeft in a combo_whatever(LeanLeft) command to combo_whatever(cLeanLeft)
Press F3 to jump to the next line containing the search phrase...
Required change for your script:- Code: Select all
//FastLean
if (get_val(Aim_BTN) && event_press(LeanLeft)) combo_run(LeanLeft);
if(combo_running(LeanLeft)) {set_val(LeanLeft, 0);}
- Code: Select all
if (get_val(Aim_BTN) && event_press(LeanLeft)) combo_run(cLeanLeft);
if(combo_running(cLeanLeft)) {set_val(LeanLeft, 0);} - hit compile again, result:
- Code: Select all
GPC error: e.gpc(70): Identifier is not a combo 'LeanRight'.
GPC error: e.gpc(92): syntax error, unexpected B_E, expecting C '}'.
GPC: GPC Compile ABORTED with 0 warning(s) and 2 error(s). - Repeat the double click on error msg .. combo renaming, this time for cLeanReight: "combo_.*LeanRight"...
Required change for your script:- Code: Select all
if (get_val(Aim_BTN) && event_press(LeanRight)) combo_run(LeanRight);
if(combo_running(LeanRight)) set_val(LeanRight, 0);- Code: Select all
if (get_val(Aim_BTN) && event_press(LeanRight)) combo_run(cLeanRight);
if(combo_running(cLeanRight)) set_val(LeanRight, 0); - hit compile again, result:
- Code: Select all
GPC error: e.gpc(92): syntax error, unexpected B_E, expecting C '}'.
GPC: GPC Compile ABORTED with 0 warning(s) and 1 error(s). - done
But I prefer doing it manually.
Last edited by Scachi on Mon Mar 04, 2019 1:41 pm, edited 2 times in total.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Convert Titan1 scripts to Titan2 the easy way
Scachi, thank you for making this comprehensive script conversion tutorial. Truly appreciated.
ConsoleTuner Support Team
-
J2Kbr - General of the Army
- Posts: 20323
- Joined: Tue Mar 18, 2014 1:39 pm
Re: Convert Titan1 scripts to Titan2 the easy way
*bookmarks by adding a useless comment*
-
AhmedEgg - Sergeant Major
- Posts: 99
- Joined: Thu Jun 30, 2016 4:13 pm
Re: Convert Titan1 scripts to Titan2 the easy way
indeed it work with putting
But the script no longer supports T2 codes where unfortunately that the script i'm using is a T2 based script and turns out some of my T2 code comes with GPC errorwhile compile (i've try not to add any T1 code, just adding the
- Code: Select all
#include <titanone.gph>
But the script no longer supports T2 codes where unfortunately that the script i'm using is a T2 based script and turns out some of my T2 code comes with GPC errorwhile compile (i've try not to add any T1 code, just adding the
- Code: Select all
#include <titanone.gph>
-
megid0105 - Corporal
- Posts: 5
- Joined: Mon Jun 24, 2019 4:10 pm
Re: Convert Titan1 scripts to Titan2 the easy way
Don't mix T1 and T2 code..the chances are good that it will mess up your script.
The include of titanone.gph does add some button translation to functions and this will brake the T2 code.
You should translate the T1 part of your script to plain T2 gpc code or stick to using T1 code only.
The include of titanone.gph does add some button translation to functions and this will brake the T2 code.
You should translate the T1 part of your script to plain T2 gpc code or stick to using T1 code only.
-
Scachi - Brigadier General
- Posts: 3044
- Joined: Wed May 11, 2016 6:25 am
- Location: Germany
Re: Convert Titan1 scripts to Titan2 the easy way
Can someone help me fix for Titan2. Getting GPC error: Invalid symbol redefinition 'rumble' and Invalid parameter ')'
- Code: Select all
// GPC Online Library
// _battlefield_v_antirecoil_-_auto_heal_-_easy_sprint.gpc
#include <titanone.gph>
//--------------------------------------------------------------
// ANTIRECOIL - AUTO HEAL - EASY SPRINT- BATTLEFIELD V
//--------------------------------------------------------------
//--Controls
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 RX = 9;
define RY = 10;
define LX = 11;
define LY = 12;
define UP = 13;
define DOWN = 14;
define LEFT = 15;
define RIGHT = 16;
define Y = 17;
define B = 18;
define A = 19;
define X = 20;
// -- LEDs
define GREEN = 0;
define BLUE = 1;
define PINK = 2;
define RED = 3;
define SKYBLUE = 4;
define YELLOW = 5;
define WHITE = 6;
//--DATA
data(0,0,3,0,3,0,0,0,0,0,0,3,
0,3,0,0,3,0,3,0,0,3,3,0,3,3,3,3);
//DECLARARATIONS - define
//--------------------------------------------------------------
define RECOIL_UP = 13; // Press: LT + UP for increase
define RECOIL_DOWN = 14; // Press: LT + DOWN for decrease
define RECOIL_LEFT = 15; // Press: LT+LEFT compensate to the left
define RECOIL_RIGHT = 16; // Press: LT+RIGHT compensate to the right
define ONLY_WITH_SCOPE=TRUE; //Use Anti-recoil only when scoping
define SPRINT_BTN = 8;// default button is LS/L3 index 8
//--------------------------------------------------------------
//VARIABLES - int
//--------------------------------------------------------------
int ANTI_RECOIL=0;
int ANTI_RECOIL_LEFT = 0;
int ANTI_RECOIL_RIGHT = 0;
int fire_button;
int scope_button;
int anti_recoil;
int anti_recoil_left;
int anti_recoil_right;
int onoff,i;
int rumble,toggled;
//INITIALIZATION - init
//--------------------------------------------------------------
init {
if(get_console() == PIO_PS3) {
fire_button = 3;
scope_button = 6;}
else { // Natural Trigger & Bumper
fire_button = 4;
scope_button = 7;}
}
//MAIN BLOCK RUTINES
//--------------------------------------------------------------
main { // Start of MAIN BLOCK
//increase Antirecoil
if(get_val(7) && event_press(RECOIL_UP)) {
ANTI_RECOIL = ANTI_RECOIL + 1;}
if(get_val(7) && event_press(RECOIL_UP))set_val(RECOIL_UP,0);
// decrease Antirecoil
if(get_val(7) && event_press(RECOIL_DOWN)) {
ANTI_RECOIL = ANTI_RECOIL - 1;}
if(get_val(7) && event_press(RECOIL_DOWN))set_val(RECOIL_DOWN,0);
// compensate to the left
if(get_val(7) && event_press(RECOIL_LEFT)) {
ANTI_RECOIL_LEFT = ANTI_RECOIL_LEFT + 1;}
if(get_val(7) && event_press(RECOIL_LEFT))set_val(RECOIL_LEFT,0);
// compensate to the right
if(get_val(7) && event_press(RECOIL_RIGHT)) {
ANTI_RECOIL_RIGHT = ANTI_RECOIL_RIGHT + 1;}
if(get_val(7) && event_press(RECOIL_RIGHT))set_val(RECOIL_RIGHT,0);
// ONLY WITH SCOPE ANTIRECOIL
if(!ONLY_WITH_SCOPE || get_val(scope_button)) {combo_run(AntiRecoil);}
{
// Move Left Stick at 80% or more will start sprint
if(get_val(12)<-80 || get_val(12)>80 ^^ get_val(11)<-80 || get_val(11)>80 )combo_run(EASY_SPRINT);
}
//--RB is held 1 second
if(get_val(RB) && get_ptime(RB) >= 1000 && !toggled) {
//--keep from looping if rb is held more than 1 sec
toggled = TRUE;
//--toggle
onoff = !onoff;
//--rumble
rumble(onoff);
//--led colors
if(onoff)
//--pink on
leds(PINK);
else
//--blue off
leds(BLUE);
}
//--reset
if(event_release(RB))
toggled = FALSE;
//--combo activators in here
if(onoff) {
combo_run(AUTO_HEAL);
//--toggle off if aim or fire
if(get_val(LT) || get_val(RT)) {
combo_suspend(AUTO_HEAL);
}
}
//--if rumble has a value run combo
if(rumble)
combo_run(RUMBLE);
}// End of MAIN BLOCK
//COMBO BLOCKS
//--------------------------------------------------------------
//Antirecoil This combo must be the last one
combo AntiRecoil {//begin
if(get_val(fire_button)) {
anti_recoil = get_val(10) + ANTI_RECOIL;
if(anti_recoil > 100) anti_recoil = 100;
set_val(10, anti_recoil);
anti_recoil_left = get_val(9) -ANTI_RECOIL_LEFT;
if(anti_recoil_left > 100) anti_recoil_left = 100;
set_val(9, anti_recoil_left);
anti_recoil_right = get_val(9) +ANTI_RECOIL_RIGHT;
if(anti_recoil_right > 100) anti_recoil_right = 100;
set_val(9, anti_recoil_right);}
}
combo EASY_SPRINT {
set_val(SPRINT_BTN,100);
wait(100);
}
combo AUTO_HEAL {
set_val(LEFT, 100);
wait(200);
set_val (UP, 100);
wait(200);
}
combo RUMBLE{
set_rumble(RUMBLE_A,100);
wait(250);
reset_rumble();
wait(150);
rumble--;
}
function leds(f_color){
for(i = 0;i <= 3;i++) {
set_led(i, dbyte((f_color * 4) + i));
}
}
//--1 for ON, 2 for OFF
function rumble(f_bln){
rumble = f_bln;
if(!rumble)
rumble = 2;
}
-
infintejock21 - Sergeant
- Posts: 6
- Joined: Tue Aug 06, 2019 12:00 am
Re: Convert Titan1 scripts to Titan2 the easy way
- Code: Select all
#pragma METAINFO("c1.gpc", 1, 0, "Buffy's GPC Converter v0.25r3")
#include <titanone.gph>
// GPC Online Library
// _battlefield_v_antirecoil_-_auto_heal_-_easy_sprint.gpc
//--------------------------------------------------------------
// ANTIRECOIL - AUTO HEAL - EASY SPRINT- BATTLEFIELD V
//--------------------------------------------------------------
//--Controls
// -- LEDs
//--DATA
//DECLARARATIONS - define
//--------------------------------------------------------------
// Press: LT + UP for increase
// Press: LT + DOWN for decrease
// Press: LT+LEFT compensate to the left
// Press: LT+RIGHT compensate to the right
//Use Anti-recoil only when scoping
// default button is LS/L3 index 8
//--------------------------------------------------------------
//VARIABLES - int
//--------------------------------------------------------------
//INITIALIZATION - init
//--------------------------------------------------------------
// Natural Trigger & Bumper
//MAIN BLOCK RUTINES
//--------------------------------------------------------------
// Start of MAIN BLOCK
//increase Antirecoil
// decrease Antirecoil
// compensate to the left
// compensate to the right
// ONLY WITH SCOPE ANTIRECOIL
// Move Left Stick at 80% or more will start sprint
//--RB is held 1 second
//--keep from looping if rb is held more than 1 sec
//--toggle
//--rumble
//--led colors
//--pink on
//--blue off
//--reset
//--combo activators in here
//--toggle off if aim or fire
//--if rumble has a value run combo
// End of MAIN BLOCK
//COMBO BLOCKS
//--------------------------------------------------------------
//Antirecoil This combo must be the last one
//begin
//--1 for ON, 2 for OFF
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 RX = 9;
define RY = 10;
define LX = 11;
define LY = 12;
define UP = 13;
define DOWN = 14;
define LEFT = 15;
define RIGHT = 16;
define Y = 17;
define B = 18;
define A = 19;
define X = 20;
define GREEN = 0;
define BLUE = 1;
define PINK = 2;
define RED = 3;
define SKYBLUE = 4;
define YELLOW = 5;
define WHITE = 6;
define RECOIL_UP = 13;
define RECOIL_DOWN = 14;
define RECOIL_LEFT = 15;
define RECOIL_RIGHT = 16;
define ONLY_WITH_SCOPE = TRUE;
define SPRINT_BTN = 8;
data(0, 0, 3, 0, 3, 0, 0, 0, 0, 0, 0, 3,
0, 3, 0, 0, 3, 0, 3, 0, 0, 3, 3, 0, 3, 3, 3, 3);
int ANTI_RECOIL = 0;
int ANTI_RECOIL_LEFT = 0;
int ANTI_RECOIL_RIGHT = 0;
int fire_button;
int scope_button;
int anti_recoil;
int anti_recoil_left;
int anti_recoil_right;
int onoff, i;
int rumble, toggled;
init {
if (get_console() == PIO_PS3) {
fire_button = 3;
scope_button = 6;
}
else {
fire_button = 4;
scope_button = 7;
}
}
main {
if (get_val(7) && event_press(RECOIL_UP)) {
ANTI_RECOIL = ANTI_RECOIL + 1;
}
if (get_val(7) && event_press(RECOIL_UP)) set_val(RECOIL_UP, 0);
if (get_val(7) && event_press(RECOIL_DOWN)) {
ANTI_RECOIL = ANTI_RECOIL - 1;
}
if (get_val(7) && event_press(RECOIL_DOWN)) set_val(RECOIL_DOWN, 0);
if (get_val(7) && event_press(RECOIL_LEFT)) {
ANTI_RECOIL_LEFT = ANTI_RECOIL_LEFT + 1;
}
if (get_val(7) && event_press(RECOIL_LEFT)) set_val(RECOIL_LEFT, 0);
if (get_val(7) && event_press(RECOIL_RIGHT)) {
ANTI_RECOIL_RIGHT = ANTI_RECOIL_RIGHT + 1;
}
if (get_val(7) && event_press(RECOIL_RIGHT)) set_val(RECOIL_RIGHT, 0);
if (!ONLY_WITH_SCOPE || get_val(scope_button)) {
combo_run(c_AntiRecoil);
}
if (get_val(12) <- 80 || get_val(12) > 80 ^^ get_val(11) <- 80 || get_val(11) > 80) combo_run(c_EASY_SPRINT);
if (get_val(RB) && get_ptime(RB) >= 1000 && !toggled) {
toggled = TRUE;
onoff =! onoff;
f_rumble(onoff);
if (onoff) f_leds(PINK);
else f_leds(BLUE);
}
if (event_release(RB)) toggled = FALSE;
if (onoff) {
combo_run(c_AUTO_HEAL);
if (get_val(LT) || get_val(RT)) {
combo_stop(c_AUTO_HEAL);
}
}
if (rumble) combo_run(c_RUMBLE);
}
combo c_AntiRecoil {
if (get_val(fire_button)) {
anti_recoil = get_val(10) + ANTI_RECOIL;
if (anti_recoil > 100) anti_recoil = 100;
set_val(10, anti_recoil);
anti_recoil_left = get_val(9) - ANTI_RECOIL_LEFT;
if (anti_recoil_left > 100) anti_recoil_left = 100;
set_val(9, anti_recoil_left);
anti_recoil_right = get_val(9) + ANTI_RECOIL_RIGHT;
if (anti_recoil_right > 100) anti_recoil_right = 100;
set_val(9, anti_recoil_right);
}
}
combo c_EASY_SPRINT {
set_val(SPRINT_BTN, 100);
wait(100);
}
combo c_AUTO_HEAL {
set_val(LEFT, 100);
wait(200);
set_val(UP, 100);
wait(200);
}
combo c_RUMBLE {
set_rumble(RUMBLE_A, 100);
wait(250);
reset_rumble();
wait(150);
rumble -- ;
}
function f_leds(f_color) {
for (i == 0; i <= 3; i ++ ) {
set_led(i, dbyte((f_color * 4) + i));
}
}
function f_rumble(f_bln) {
rumble = f_bln;
if (!rumble) rumble = 2;
}
ConsoleTuner Support Team || ConsoleTuner Discord || InputSense Discord
- Mad
- Major General
- Posts: 4536
- Joined: Wed May 22, 2019 5:39 am
Re: Convert Titan1 scripts to Titan2 the easy way
I have recently tried to convert a CM script into a titan 2 script using the convertor by Buffy. When I load the script into GT and try to compile, it hits me with the following error messages:
Can anyone help me with this to get it working? Apologies if this is basic, but Ive tried to follow the relevant guides on how to sort it but had no luck. Any help is greatly appreciated.
The full script is below if this helps. Thanks
GPC error: cod_modern_warfare_warzone - Original.gpc(697): Invalid symbol redefinition 'notify'
GPC error: cod_modern_warfare_warzone - Original.gpc(697): Invalid parameter ')'
GPC error: cod_modern_warfare_warzone - Original.gpc(705): Invalid symbol redefinition 'btn'
GPC error: cod_modern_warfare_warzone - Original.gpc(705): Invalid parameter ')'
GPC error: cod_modern_warfare_warzone - Original.gpc(733): Invalid symbol redefinition 'c'
GPC: GPC Compile ABORTED with 0 warning(s) and 5 error(s).
Can anyone help me with this to get it working? Apologies if this is basic, but Ive tried to follow the relevant guides on how to sort it but had no luck. Any help is greatly appreciated.
The full script is below if this helps. Thanks
- Code: Select all
#include <titanone.gph>
// GPC Online Library
// cod_modern_warfare_warzone.gpc
//for support tips or advice please visit v2.43
// https://device.com/forums/showthread ... ost1214397
// FIRST TIME USE,
// check the button layout, check the customization section, check the aim down sights menu, check the anti recoil values
// enter the values you want for anti recoil in the script, program, test, re-enter values, program, test and repeat.
// happy? save your defaults then adjust on the fly as you see fit
// once your defaults are saved changing the values in the script wont make any difference
// to clear any saved values
// go into the device program
// go to tools
// device clean up
// erase memory slots
// yes on both boxes (this erases all memory slots)
// how to read anti recoil values you set on the fly https://docs.google.com/document/d/1TUc ... qrp_U/edit
// if you want to simply use the sript to adjust values and not on the fly, do not save your defaults or use the on the fly system
// if you choose to use the on the fly system save your defaults before hand so you can easily revert back to these values and adjust again
// if you change slots without adjusting after resetting to your defaults your on the fly values will be loaded not your defaults
// [[HOLD DPAD DOWN AND HOLD SHARE/VIEW]] to save your defaults
// anti recoil on the fly, recoil values are saved to the slot you are using automatically
// if you want to set your on the fly values as your default values use the first time button combination (hold dpad down hold share/view)
// [[HOLD DPAD DOWN AND DOUBLE TAP SHARE/VIEW]] to reset to your default values
// to ENTER the anti recoil adjustment menu hold DPAD DOWN and DOUBLE TAP OPTIONS/MENU, your led will turn off,
// and your ads menu will become inactive
// to EXIT hold dpad DOWN and tap OPTIONS/MENU, your led will reset to blue
// once in the anti recoil adjustment menu HOLD
// PS4_SQUARE - start values
// PS4_CROSS - end values
// PS4_CIRCLE - horizontal values
// PS4_TRIANGLE - time value
// while holding EITHER square, cross, circle or triangle
// tap R1/RB to INCREASE the value by +1 (triangle = +100)
// tap R2/RT to DECREASE the value -1 (triangle = -100)
//
// to reset your default values hold DPAP DOWN and DOUBLE TAP SHARE/VIEW
//check the button layouts below, the console/controller makes no difference
//but make sure that the button discriptions match with your own.
//-- STICKS
define WALK=PS4_LY;
define STRAFE=PS4_LX;
define AIM_H=PS4_RX;
define AIM_V=PS4_RY;
//--BUTTONS
define FIRE=PS4_R1; //change to R1 for flipped bumpers
define ADS=PS4_L1; //change to L1 for flipped bumpers
define SPRINT=PS4_L3;
define TACTICAL=PS4_L2;//change to L2 for flipped bumpers
define LETHAL=PS4_R2; //change to R2 for flipped bumpers
define PRONE=PS4_CIRCLE;
define MELEE=PS4_R3;
define JUMP=PS4_CROSS;
// check and adjust the customization section below
//--CUSTOMIZATION
int in_game_menu_sens=10; // controls how much sensitivity you lose while hipfire and while ads and fire[higher numbers decrease sensitivity]
define aim_sens_corrections=1; // [0 = OFF / 1 = ON] sensitivity corrections while hipfire and while ADS+FIRE adjust your ADS sensitivity through the in game menu
define StickNoise=10; // Dead Zone value for your thumbsticks (only active when you fire, allowing micro aiming)
int recoiladsonly= ADS; // [FIRE = anti recoil while hipfire & ADS] (ADS = anti recoil only while aim down sights)
define aim_perfection= 1 // [0 = OFF / 1 = ON] sweet evils aim perfection, this should be run together with sticky aim
define sticky_aim_assist=1; // [0 = OFF / 1 = ON] strongest aim assist for COD [crescens]
define _v=22; // (sticky aim only) If your screen shakes whilst using aim assist - lower this value (not recomended below 20)
define easy_plate=1; // [0 = OFF / 1 = ON] holding triangle to place one plate will automatically hold triangle until all plates are full, cancel by firing, ads or tapping reload
define easy_revive=1; // [0 = OFF / 1 = ON] double clicking square will automatically hold square button for 10 seconds while you revive, cancel by firing, ads or tapping reload
define hair_trigger =1; // [0 = OFF / 1 = ON] hair triggers on both ads and fire, with bumpers flipped this is redundant
int hold_time=35; // length of button push during rapid fire
int rest_time=25; // time between button pushes during rapid fire
define easy_pronecontrol=PS4_L3 //button that must be held for easy prone/crouch to activate while firing
define prone_crouch = 350; //[350 = prone / 40 = crouch] prone or crouch on easy_pronecontrol + fire or vice versa
define quickscopecontrol=PS4_L3;//button that must be tapped/double tapped for quick scope to activate-another option is ADS or L2/LT- [can be changed to double_click]
define quickscope_time=460; //adjust here[ +10 or -10] the time it takes from aim down sights to fire, some weapons take longer or shorter,
define easyjumpcontrol=PS4_CROSS//button that must be pressed to easyjump / hold to bunny hop another option is SPRINT or L3/LS
// if you want to run easy prone, quick scope or easy jump on the same ads menu try finding a different control for each that suits your playstyle
// easy prone/crouch activates when you fire and hold the easy_pronecontrol or vice versa
// and you get up when you stop firing or let go of the easy_pronecontrol
//--END CUSTOMIZATION
//-- AR values
int reset_defaults
int ar_sY;
int ar_eY;
int ar_tm;
int ar_sX;
int interval, iteration_point;
int i_, i_count;
int AR_V;
int RY, RX;
int _;
int current_x, current_y;
//---aim corrections variables
int ads_fire_sens, Sens, hip_fire_sens;
//Sweet_Evil 7.10
int mvt = 0;
int Current_State = 0;
int Aim_Abuse_State = 2;
define Get_Last_Value = 0;
define Get_Current_Value = 1;
define Aim_Correction = 2;
define Aim_Boost = 3;
define Aim_Perfection_Limit= 60;
int X_Last_Value = 0;
int Y_Last_Value = 0;
int X_Current_Value = 0;
int Y_Current_Value = 0;
int Aim_Boost_Val = 0;
int Aim_Correction_Val= 0;
//---other variables used by the script
int q;
int double__tap[30];
int pin = 145;
int code;
int notify, notifier;
int auto_hold_breath;
int rapid_fire;
int easy_prone;
int quick_scope;
int quick_melee;
int easy_jump;
int edit=FALSE;
int no_recoil;
init {
while(q < 30)
{double__tap[q] = -1;
q++;}
{code = get_pvar(SPVAR_16,140,150,140);
if (pin ==145){
/////////////////////////////////////////////////////////////
//-------->>>>START ADJUST YOUR RECOIL VALUES HERE<<<<------
ar_sY = 35; // start value -- higher numbers increase pull down
ar_eY = 22; // end value -- higher numbers increase pull down
ar_tm = 3500; // time value - controls time between start to end value
ar_sX = -13;} // horizontal value
//--TO INVERT VERTICAL LOOK insert negative (-) numbers in the start and end value and use the in game menu to invert your look
/* i will be releasing more precise values slowly in the forum
time start end horiz
kilo 141 2800 28 28 4
m4a1 3500 35 22 -13
oden 3200 30 26 9
m13 2500 23 29 -18
fn scar 17 2300 33 25 -13
-ak47 1000 42 24 -1
mp5 3000 27 22 -13
mp7 2900 25 25 7
aug 2300 26 26 -11
p90 3800 28 22 -14
uzi 0 29 0 1
bizon 6400 29 10 -9
//------>>>>END ANTI RECOIL VALUE ADJUSTMENT HERE END<<<<--------*/
//////////////////////////////////////////////////////////////////////
if(code == pin)
{
ar_sY = get_pvar(SPVAR_9, -100,100,15);
ar_eY = get_pvar(SPVAR_14,-100,100,35);
ar_sX = get_pvar(SPVAR_5, -100,100,5);
ar_tm = get_pvar(SPVAR_13,0,10000,3000);
}
}
}
main
{
set_val (TRACE_1, ar_tm/100);
set_val (TRACE_2, ar_sY);
set_val (TRACE_3, ar_eY);
set_val (TRACE_4, ar_sX);
if (get_val (FIRE))
{
current_x = dz(AIM_H,0);
current_y = dz(AIM_V,0);
}
if(get_val(PS4_DOWN))
{if (get_val(PS4_SHARE)&& get_ptime (PS4_SHARE) > 800)
{save_pvars();
notify();
__(7);}
if(double_click(PS4_SHARE))
{reset_defaults=TRUE;
notify();
__(3);
if (reset_defaults)
{
ar_sY = get_pvar(SPVAR_2, -100,100,15);
ar_eY = get_pvar(SPVAR_3,-100,100,35);
ar_sX = get_pvar(SPVAR_1, -100,100,5);
ar_tm = get_pvar(SPVAR_4, 0,10000,3000);
}
}
}
////////////////////////////////////////////////////
//-------->>>>START AIM DOWN SIGHTS MENU HERE<<<<------
//--0=0ff/1=Blue/3=Pink/4=Green/5=Sky/6=Yellow/7=White
if(get_val(ADS) && !edit)// <<--- HOLD DOWN AIM DOWN SIGHTS AND TAP
{
//DPAD-UP
if(event_press(PS4_UP))//change to PS4_SHARE or PS4_OPTIONS if you want to ping while ads
{
easy_jump=TRUE; // easy jump [TRUE = on FALSE = off]
quick_melee=TRUE; // quick melee [TRUE = on FALSE = off]
quick_scope=FALSE; //quick scope [TRUE = on FALSE = off]
easy_prone=TRUE; //easy prone / crouch [TRUE = on FALSE = off]
rapid_fire=FALSE; //rapid fire [TRUE = on FALSE = off]
auto_hold_breath=FALSE; //auto hold breath [TRUE = on FALSE = off]
no_recoil=TRUE; //anti recoil [TRUE = on FALSE = off]
notify (rapid_fire); // rumble
__(4); // colour
}
//D-PAD DOWN
if(event_press(PS4_DOWN)) //D-PAD DOWN
{
easy_jump=FALSE; // easy jump [TRUE = on FALSE = off]
quick_melee=FALSE; // quick melee [TRUE = on FALSE = off]
quick_scope=FALSE; //quick scope [TRUE = on FALSE = off]
easy_prone=FALSE; //easy prone / crouch [TRUE = on FALSE = off]
rapid_fire=FALSE; //rapid fire [TRUE = on FALSE = off]
auto_hold_breath=FALSE;//auto hold breath [TRUE = on FALSE = off]
no_recoil=FALSE; //anti recoil [TRUE = on FALSE = off]
notify (rapid_fire); // rumble
__(1); // colour
}
//DPAD-RIGHT
if(event_press(PS4_RIGHT)) //DPAD-RIGHT
{
easy_jump=TRUE; // easy jump [TRUE = on FALSE = off]
quick_melee=TRUE; // quick melee [TRUE = on FALSE = off]
quick_scope=FALSE; //quick scope [TRUE = on FALSE = off]
easy_prone=FALSE; //easy prone / crouch [TRUE = on FALSE = off]
rapid_fire=TRUE; //rapid fire [TRUE = on FALSE = off]
auto_hold_breath=FALSE; //auto hold breath [TRUE = on FALSE = off]
no_recoil=FALSE; //anti recoil [TRUE = on FALSE = off]
notify (rapid_fire); // rumble
__(3) // colour
}
//DPAD-LEFT
if(event_press(PS4_LEFT)) //DPAD-LEFT
{
easy_jump=TRUE; // easy jump [TRUE = on FALSE = off]
quick_melee=TRUE; // quick melee [TRUE = on FALSE = off]
quick_scope=TRUE; //quick scope [TRUE = on FALSE = off]
easy_prone=FALSE; //easy prone / crouch [TRUE = on FALSE = off]
rapid_fire=FALSE; //rapid fire [TRUE = on FALSE = off]
auto_hold_breath=TRUE; //auto hold breath [TRUE = on FALSE = off]
no_recoil=FALSE; //anti recoil [TRUE = on FALSE = off]
notify (rapid_fire); // rumble
__(7) // colour
}
//delete btn(PS4_UP); to ping while ads
btn(PS4_SHARE);btn(PS4_LEFT);btn(PS4_RIGHT);btn(PS4_UP);btn(PS4_DOWN);btn(WII_HOME);btn(WII_PLUS);} // buttons console ignores while ads
//-------->>>>END AIM DOWN SIGHTS MENU HERE END<<<<------
/////////////////////////////////////////////////////////////
//-- hair trigger
turbo(FIRE);
turbo(ADS);
//-- jump shot
if(easy_jump)
{
if(get_val(easyjumpcontrol)) //change event_press to double_click if you want activation on a double click
combo_run(get_up);
}
//-- quick scope
if (quick_scope)
{
if(event_press(quickscopecontrol)) //change event_press to double_click if you want activation on a double click
combo_run(quick_scope);
}
//-- easy prone
if (easy_prone)
{
if(get_val(FIRE) && event_press(easy_pronecontrol))
combo_run(easy_prone);
if(get_val(easy_pronecontrol) && event_press(FIRE))
combo_run(easy_prone);
if(get_val(easy_pronecontrol)&& event_release(FIRE))
combo_run(get_up);
if(get_val(FIRE)&& event_release(easy_pronecontrol))
combo_run(get_up);
}
//-- auto hold breath
if (auto_hold_breath)
{
if(get_val(ADS)&&get_ptime(ADS)>100)
{set_val(SPRINT, 100);}
}
//-- Rapid fire
if (rapid_fire)
{
if (get_val(FIRE))
{set_val(SPRINT, 100);}
if(get_val(ADS)&&get_ptime(ADS)>100)
{set_val(SPRINT, 100);}
if(get_val(FIRE))
combo_run (rapid_fire);
}
//-- quick melee
if(quick_melee){
if(get_val(MELEE))
{combo_run(quick_melee);}
if(get_val(ADS)&&(MELEE))
combo_stop(quick_melee)}
//-- easy plate
if(easy_plate)
{
if(get_val(PS4_TRIANGLE)&&get_ptime(PS4_TRIANGLE)>350&& !edit)// change to double click if you want to put 3 plates after double pressing triangle
combo_run(easy_plate);
if(get_val(ADS)>10)
combo_stop(easy_plate);
if(get_val(FIRE)>10)
combo_stop(easy_plate);
if(get_val(PS4_SQUARE))
combo_stop(easy_plate);
}
//-- easy revive
if(easy_revive)
{
if(double_click(PS4_SQUARE)&& !edit)//change depending on contextual tap, tap to use or tap to reload
combo_run(easy_revive);// use either .if(get_val(PS4_SQUARE)&&get_ptime(PS4_SQUARE)>800). or double_click, rumble notify on activation
if(get_val(ADS)>10)
combo_stop(easy_revive);
if(get_val(FIRE)>10)
combo_stop(easy_revive);
if(get_val(PS4_SQUARE))
combo_stop(easy_revive);
}
//-- aim corrections
if(aim_sens_corrections)
{
ads_fire_sens=100-(in_game_menu_sens); hip_fire_sens= 95-(in_game_menu_sens);
if (get_val(FIRE)&&!get_val(ADS))
{
if(get_val(FIRE))
Sens = hip_fire_sens;
sensitivity(AIM_H, NOT_USE, Sens);
sensitivity(AIM_V, NOT_USE, Sens);
}
if(get_val(ADS) && get_val(FIRE))
Sens = ads_fire_sens;
if(!get_val(FIRE) || !get_val(ADS))
Sens = 100;
if(Sens > 100) Sens = 100;
sensitivity(AIM_H, NOT_USE, Sens);
sensitivity(AIM_V, NOT_USE, Sens);
}
//-- sticky aim(crescens)
if (sticky_aim_assist)
{
if(get_val(ADS)) combo_run(STICKY_AIM);
else combo_stop(STICKY_AIM);
}
//-- aim perfection(sweet_evil_14)
if(aim_perfection)
{
if(get_val(ADS))
{
if (Current_State == Get_Last_Value)
{
X_Last_Value = get_lval(AIM_H);
Y_Last_Value = get_lval(AIM_V);
Current_State = Get_Current_Value;
}
else if (Current_State == Get_Current_Value)
{
X_Current_Value = get_val(AIM_H);
Y_Current_Value = get_val(AIM_V);
if(Aim_Abuse_State == Aim_Correction)
{
Current_State = Aim_Boost;
}
else
{
Current_State = Aim_Correction;
}
}
if (Current_State == Aim_Boost)
{
Aim_Perfection(X_Last_Value, X_Current_Value, 1, 0, 1, 0 );
Aim_Perfection(Y_Last_Value, Y_Current_Value, 1, 0, 0, 1 );
Current_State = Get_Last_Value;
Aim_Abuse_State = Aim_Boost;
}
else if (Current_State == Aim_Correction)
{
Aim_Perfection(X_Last_Value, X_Current_Value, 0, 1, 1, 0 );
Aim_Perfection(Y_Last_Value, Y_Current_Value, 0, 1, 0, 1 );
Current_State = Get_Last_Value;
Aim_Abuse_State = Aim_Correction;
}
}
else
{
Current_State = Get_Last_Value;
Aim_Abuse_State = Aim_Correction;
}
}
//-- anti recoil
if (no_recoil)
{
if(ar_sY < ar_eY)interval = 1;
else interval = -1;
iteration_point = (ar_tm / 10) / (abs(ar_sY - ar_eY));
if(!get_lval(FIRE))
{
AR_V = ar_sY;
i_count = 0;
i_ = 0;
}
if(get_val(recoiladsonly)&&get_val(FIRE))
{
AntiRecoil(AIM_H, ar_sX);
if(!p())
AR_V = c();
else
AR_V = (ar_eY);
AntiRecoil(AIM_V, AR_V)
}
}
//-- anti recoil on the fly adjustment
if (get_val(PS4_DOWN) &&double_click(PS4_OPTIONS))//----edit on
{
edit=TRUE
notify (edit);}
if (edit)
{
__(0);
}
if (get_val(PS4_DOWN) &&get_val(PS4_OPTIONS))//----edit off
{
edit=FALSE
notify (edit);
if (!edit)
save__();
reset_leds();
}
if (edit)
{
if(get_val(PS4_SQUARE))//----start value
{
if(event_press(PS4_R1))// increase +1
{ar_sY += 1; notify (); }
if(event_press(PS4_R2))// decrease -1
{ar_sY -= 1; notify ();}
}
if(get_val(PS4_CROSS))//----end value
{
if(event_press(PS4_R1))
{ar_eY += 1; notify ();}
if(event_press(PS4_R2))
{ar_eY -= 1; notify (); }
}
if(get_val (PS4_CIRCLE))//----horizontal value
{
if(event_press(PS4_R1))
{ar_sX += 1; notify ();}
if(event_press(PS4_R2))
{ar_sX -= 1; notify ();}
}
if(get_val (PS4_TRIANGLE))//----time value
{
if(event_press(PS4_R1))// increase +100
{ar_tm += 100; notify ();}
if(event_press(PS4_R2))// decrease -100
{ar_tm -= 100; notify ();}
}
btn(PS4_OPTIONS);btn(PS4_DOWN);btn(PS4_SQUARE);btn(PS4_R1);btn(PS4_R2);btn(PS4_CROSS);btn(PS4_CIRCLE);btn(PS4_TRIANGLE);} //buttons console ignores during edit
//-- rumble
if(notify) {
notifier += get_rtime();
if(notifier < 150) set_rumble(1,75);
else if(notifier < 400) reset_rumble();
else
{
notify -= 1;
notifier = 0;
}
}
}//--------------END OF MAIN----------------
//--------------COMBO SECTION----------------
combo ceasy_revive
{
set_val(PS4_SQUARE,100);
set_rumble(RUMBLE_A,100);
wait(200);
reset_rumble();
set_val(PS4_SQUARE,100);
wait(10000);//time revive is held for adjust higher or lower 500 if you fail to get the revive
}
combo ceasy_plate
{set_val(PS4_TRIANGLE,100);
wait(6000)//time triangle is held for adjust higher or lower 500 if you only get 2 plates or cant switch weapons after replating
}
combo cquick_melee {
set_val(MELEE, 100);
wait(20);
set_val(MELEE,0)
}
combo cquick_scope
{
set_val(ADS, 100);
wait(quickscope_time);
set_val(FIRE, 100);
wait(50);
}
combo ceasy_prone
{
set_val(PRONE,100);
wait(prone_crouch);// 350 = prone / 40 = crouch
}
combo cget_up
{
set_val(JUMP,100);
wait (50)
set_val(JUMP,0)
}
combo cSTICKY_AIM
{
set_val(AIM_V,xy_val(AIM_V, _v));
wait(20);
set_val(AIM_H,xy_val(AIM_H, _v));
set_val(STRAFE,xy_val(STRAFE, _v));
wait(20);
set_val(AIM_V,xy_val(AIM_V, _v * -1));
wait(20);
set_val(AIM_H,xy_val(AIM_H, _v * -1));
set_val(STRAFE,xy_val(STRAFE, _v * -1));
wait(20);
}
combo crapid_fire
{
set_val(FIRE,100);
wait(hold_time);
set_val(FIRE, 0);
wait(rest_time);
}
//--------------FUNCTION SECTION----------------
function save_pvars () {
set_pvar(SPVAR_4, ar_tm);
set_pvar(SPVAR_1 ,ar_sX);
set_pvar(SPVAR_2 ,ar_sY);
set_pvar(SPVAR_3,ar_eY);
}
function save__ (){
set_pvar(SPVAR_13, ar_tm);
set_pvar(SPVAR_5 ,ar_sX);
set_pvar(SPVAR_9 ,ar_sY);
set_pvar(SPVAR_14,ar_eY);
set_pvar(SPVAR_16,pin); notify(!1);
}
function double_click(button) {
if (double__tap[button] >= 0) {
double__tap[button] += get_rtime();
if (double__tap[button] > 450)
double__tap[button] = -1;
}
if (event_release(button) && get_ptime(button) <= 200) {
if (double__tap[button] < 0) {
double__tap[button] = 0;
} else {
double__tap[button] = -1;
return 1;
}
}
return 0;
}
function Aim_Perfection( Last_Value, Current_Value, Boost, Correction, X_AXIS, Y_AXIS)
{
mvt = abs(Last_Value) + abs(Current_Value);
Aim_Boost_Val = ( mvt + 1 )/2;
Aim_Correction_Val = Aim_Boost_Val + 4;
if(Aim_Boost_Val >= 10)
{
Aim_Boost_Val = 10;
Aim_Correction_Val = 14;
}
else if(Aim_Boost_Val == 0)
{
Aim_Boost_Val = 2
Aim_Correction_Val = 4;
}
if(mvt < Aim_Perfection_Limit)
{
if(Last_Value < Current_Value)
{
if (Boost)
{
if (X_AXIS)
set_val(AIM_H, (Current_Value + Aim_Boost_Val));
if (Y_AXIS)
set_val(AIM_V, (Current_Value + Aim_Boost_Val));
}
else if(Correction)
{
if (X_AXIS)
set_val(AIM_H, (Current_Value - Aim_Correction_Val));
if (Y_AXIS)
set_val(AIM_V, (Current_Value - Aim_Correction_Val));
}
}
else //--moving left
{
if (Boost)
{
if (X_AXIS)
set_val(AIM_H, (Current_Value - Aim_Boost_Val));
if (Y_AXIS)
set_val(AIM_V, (Current_Value - Aim_Boost_Val));
}
else if(Correction)
{
if (X_AXIS)
set_val(AIM_H, (Current_Value + Aim_Correction_Val));
if (Y_AXIS)
set_val(AIM_V, (Current_Value + Aim_Correction_Val));
}
}
}
}
function xy_val(f_axis,f_val)
{
if(abs(get_val(f_axis)) < (_v + 1))
return f_val;
return get_val(f_axis);
}
function turbo(btn)
{
if (!hair_trigger || !get_val(btn)) return;
set_val(btn, 100);
}
function __(c)
{
for(_=0;_<3;_++)
{
set_led(_,test_bit(c,_));
}
}
function notify(pos)
{
if(pos)
notify = 1;
else
notify = 2;
}
function btn(f__btn)
{
if (!get_val(f__btn)) return;
set_val(f__btn, 0);
}
function dz(f_axis,f_val)
{
f_val = get_val(f_axis);
if(abs(f_val) < StickNoise)
{
set_val(f_axis,0);
return 0;
}
return f_val;
}
function p()
{
i_count++;
if (i_count > (ar_tm / 10))
{
i_count = (ar_tm / 10);
return 1;
}
return 0;
}
function c()
{
i_++;
if(i_ == iteration_point)
{
i_ = 0;
AR_V += interval;
}
return AR_V;
}
function AntiRecoil (axis, recoil)
{
RY = current_y;
RX = current_x;
if (get_val(FIRE) && (isqrt(RX*RX + RY*RY)) <= abs(recoil))
{
if(abs(RY) <= abs(recoil))
{
set_val(axis,(recoil * (100 - abs(get_val(axis)))) / 100 + get_val(axis));
}
}
}
//Credits: compiled by scripts of many others credit goes to the device community.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// change log:2.26-2.27
// added to rapid fire, now you wont toggle your sights while firing ads in rapid fire
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// change log:2.27 - 2.28
// added to aim corrections, now you get a sensitivity decrease while hipfiring, (slightly faster than while aiming down sights)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//change log; 2.28 - 2.29
// added to easy revive, now if easy revive is activated you will feel a rumble notify
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//change log; 2.29 - 2.3
//changed easy jump, now holding the easy jump control causes you to bunny hop
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//change log; 2.3 - 2.4
// added sweet evils 7.1 aim assist (aim perfection), on top of sticky aim this is the most noticable aim assist for cod modern warfare 2019
// removed auto ping,
// removed ads profile ADS+SHARE/VIEW & removed ads profile ADS+OPTIONS/MENU
// changed aim sensitivity corrections you are now able to make adjustments to your ads speed through the game menu
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//changelog; 2.4 - 2.41
// changed some values in sensitivity corrections
///////////////////////////////////////////////////////////////////////////////////////////////////////////
//changelog; 2.41 - 2.42
// changed on the fly adjustment
//////////////////////////////////////////////////////////////////////////////////////////////////////////
//changelog; 2.42-2.43
// added a line in the customization section so you can choose on or off aim perfection
- DPWillo95
- Corporal
- Posts: 5
- Joined: Sat Apr 18, 2020 4:18 pm
49 posts
• Page 4 of 5 • 1, 2, 3, 4, 5
Who is online
Users browsing this forum: No registered users and 82 guests