Panda Aim V5 (1).gpc
Panda Aim V5 (1).gpc
*/
const int16 pollarArr[] =
{ 23170, 23164, 23156, 23134, 23114, 23082, 23044, 22998, 22445, 22885,
22818, 22245, 22664, 22577, 22482, 22381, 22273, 22158, 22036, 21908,
21773, 21632, 21483, 21329, 21167, 21000, 20825, 20645, 20458, 20265,
20066, 19861, 19650, 19432, 19209, 18980, 18745, 18505, 18259, 18007,
17750, 17487, 17219, 16946, 16667, 16384, 16096, 15802, 15504, 15201,
14894, 14582, 14265, 13944, 13619, 13290, 12957, 12620, 12278, 11934,
11585, 11233, 10878, 10519, 10157, 9792, 9424, 9053, 8680, 8304, 7925,
7544, 7160, 6774, 6387, 5997, 5605, 5212, 4817, 4421, 4024, 3625, 3225,
2824, 2422, 2019, 1616, 1213, 809, 404, 00, -404, -809, -1213, -1616, -
2019, -2422, -2824, -3225, -3625, -4024, -4421, -4817, -5212, -5605, -
5997, -6387, -6774, -7160, -7544, -7925, -8304, -8680, -9053, -9424, -
9792, -10157, -10519, -10878, -11233, -11585, -11934, -12278, -12620, -
12957, -13290, -13619, -13944, -14265, -14582, -14894, -15201, -15504, -
15802, -16096, -16384, -16667, -16946, -17219, -17487, -17750, -18007, -
18259, -18505, -18745, -18980, -19209, -19432, -19650, -19861, -20066, -
20265, -20458, -20645, -20825, -21000, -21167, -21329, -21483, -21632, -
21773, -21908, -22036, -22158, -22273, -22381, -22482, -22577, -22664, -
22745, -22818, -22885, -22945, -22998, -23044, -23082, -23114, -23139, -
23156, -23167, -23170, -23167, -23156, -23139, -23114, -23082, -23044, -
22998, -22945, -22885, -22818, -22745, -22664, -22577, -22482, -22381, -
22273, -22158, -22036, -21908, -21773, -21632, -21483, -21329, -21167, -
21000, -20825, -20645, -20458, -20265, -20066, -19861, -19650, -19432, -
19209, -18980, -18745, -18505, -18259, -18007, -17750, -17487, -17219, -
16946, -16667, -16384, -16096, -15802, -15504, -15201, -14894, -14582, -
14265, -13944, -13619, -13290, -12957, -12620, -12278, -11934, -11585, -
11233, -10878, -10519, -10157, -9792, -9424, -9053, -8680, -8304, -7925,
-7544, -7160, -6774, -6387, -5997, -5605, -5212, -4817, -4421, -4024, -
3625, -3225, -2824, -2422, -2019, -1616, -1213, -809, -404, 00, 404,
809, 1213, 1616, 2019, 2422, 2824, 3225, 3625, 4024, 4421, 4817, 5212,
5605, 5997, 6387, 6774, 7160, 7544, 7925, 8304, 8680, 9053, 9424, 9792,
10157, 10519, 10878, 11233, 11585, 11934, 12278, 12620, 12957, 13290,
13619, 13944, 14265, 14582, 14894, 15201, 15504, 15802, 16096, 16384,
16667, 16946, 17219, 17487, 17750, 18007, 18259, 18505, 18745, 18980,
19209, 19432, 19650, 19861, 20066, 20265, 20458, 20645, 20825, 21000,
21167, 21329, 21483, 21632, 21773, 21908, 22036, 22158, 22273, 22381,
22482, 22577, 22664, 22745, 22818, 22885, 22945, 22998, 23044, 23082,
23114, 23139, 23156, 23167, 23170 };
const int8 Polar_Array[]=
{100,100,100,100,100,100,100,100,99,99,99,99,98,98,97,97,97,91,95,95,94,94,93,92,92
,91,90,89,89,88,87,86,85,84,83,82,80,80,79,78,77,75,74,73,72,71,70,69,67,66,65,63,6
2,61,59,58,56,55,53,52,50,49,47,46,44,43,41,40,38,36,35,33,31,30,28,26,25,23,21,20,
18,16,14,13,11,9,7,6,4,2,0,-1,-3,-5,-7,-8,-10,-12,-13,-15,-17,-19,-20,-22,-24,-25,-
27,-29,-30,-32,-34,-35,-37,-39,-40,-42,-43,-45,-46,-48,-50,-51,-53,-54,-55,-57,-
58,-60,-61,-62,-64,-65,-66,-68,-69,-70,-71,-73,-74,-75,-76,-77,-78,-79,-80,-81,-
82,-83,-84,-85,-86,-87,-88,-89,-89,-90,-91,-92,-92,-93,-93,-94,-95,-95,-96,-96,-
97,-97,-97,-98,-98,-99,-99,-99,-99,-100,-100,-100,-100,-100,-100,-100,-100,-100,-
100,-100,-100,-100,-100,-99,-99,-99,-98,-98,-98,-97,-97,-96,-96,-95,-94,-94,-93,-
93,-92,-91,-90,-90,-89,-88,-87,-86,-85,-84,-83,-82,-81,-80,-79,-78,-77,-76,-75,-
74,-72,-71,-70,-69,-67,-66,-65,-63,-62,-61,-59,-58,-56,-55,-53,-52,-50,-49,-47,-
46,-44,-43,-41,-40,-38,-36,-35,-33,-31,-30,-28,-26,-25,-23,-21,-20,-18,-16,-14,-
13,-11,-9,-7,-6,-4,-
2,0,2,4,6,7,9,11,13,14,16,18,20,21,23,25,26,28,30,31,33,35,36,38,40,41,43,44,46,47,
49,51,52,54,55,56,58,59,61,62,63,65,66,67,69,70,70,72,73,74,75,77,78,79,80,81,82,83
,84,85,86,87,88,89,89,90,91,92,92,93,94,94,95,95,96,97,97,97,98,98,99,99,99,99,100,
100,100,100,100,100,100};
const int16 TrackerCords[] =
{0, 8, 17,23, 34, 41, 52, 59,63,69, 75 ,81,87, 90, 104, 121, 139, 156,173, 190,
207, 224, 241, 258, 275, 292, 309, 325,342, 358, 374, 390, 406, 422, 438, 453, 469,
484,500, 515, 529, 544, 559, 573, 587, 601, 615, 629,642, 656, 669, 682, 694, 707,
719, 731, 743, 754,766, 777, 788, 798, 809, 819, 829, 838, 848, 857,866, 874, 882,
891, 898, 906, 913, 920, 927, 933, 939, 945, 951, 956, 961, 965, 970, 974, 978,
981,984, 987, 990, 992, 994, 996, 997, 998, 999, 999,1000 }
/* Menu Variables */
int modMenu,editMenu;
int modNameIdx,valNameIdx;
enum {
vStrength,hStrength,vStrengthP,hStrengthP,dStrengthTime,deadZone,aaCurve,aaSize,aaS
pd,aaBoost,aaBSize,aaBSpd,aaLR,aaLRSize,rAAShape,rAASize,rAASpd,AAOSpd,AAOSsize,HPB
oost,PAR,PAS,TSt,TSp,DZo,RAD,AcT,FRA,ANG,ASF,SAR,rfFireRate,dualFireRate
}
//====================================================================
define MaxAmountOfMODs = 25;
//====================================================================
int standardARFireType;
int taylorFireType;
int rotationalFireType;
int rapidFireType;
int dropShotmw2FireType;
int snakeShotActivationmw2;
// Misc Variables \\
int smartRumble;
int antirecoilStrengthStandard;
int smartRumbleStandard;
int legacyRecoilStrength;
int antirecoilBoostTimer;
int radiusPosition;
int smoothingValue;
int angle,loopTime,cosAngle,sinAngle,radiusUsed;
int HoldTime,RestTime;
int LedOn,LedOff;
int driveMode;
int antirecoilStrength
int invertStick = 1;
int
actual_X,actual_Y,actual_Magnitude,max_Magnitude,time,Position,SpiralPosition1,Spir
alPosition2,InnerSpiral,OuterSpiral,cos_angle_tdrift, sin_angle_tdrift,MinRadius =
1;
int CurRX,CurRY,TrackerAngle = 270,CurrentRX,CurrentRY,ReT,_ret;
define STEP_INTERVAL = 1;
int
x_aim,y_aim,x_aim_assist,y_aim_assist,x_pred_position,y_pred_position,input_mag,fir
st_aim,rumble,radiuS,toggle_active_tacking,active_tacking_counter,active_tacking =
1, _angle, x_velocity, kalman_kx, y_velocity;
int kalman_y, kalman_py, kalman_ky, x_pred, xp_pred, y_pred, yp_pred, kalman_x;
int kalman_qx = 100, kalman_rx = 1000, kalman_px = 1000, kalman_qy = 100, kalman_ry
= 1000;
define fix16_maximum = 0x7FFFFFFF; /*!< the maximum value of fix16_t */
define fix16_minimum = 0x80000000; /*!< the minimum value of fix16_t */
define fix16_overflow = 0x80000000; /*!< the value used to indicate overflows when
FIXMATH_NO_OVERFLOW is not specified */
define fix16_e = 178145; /*!< fix16_t value of e */
define fix16_one = 0x00010000; /*!< fix16_t value of 1 */
define fix16_1000 = 0x03E80000;
/*
===================================================================================
===============================
Const String Arrays
===================================================================================
===============================
*/
}
/* Edit Menu Navigation / Adjustable Values */
if(editMenu){
vm_tctrl(0);
valNameIdx = menuNavigation(valNameIdx,valRangeIdx[modNameIdx]
[0],valRangeIdx[modNameIdx][1]);
verticalStrength = editValues(verticalStrength ,vStrength);
horizontalStrength = editValues(horizontalStrength ,hStrength);
verticalStrengthP = editValues(verticalStrengthP ,vStrengthP);
horizontalStrengthP = editValues(horizontalStrengthP ,hStrengthP);
doubleStrengthTime = editValues(doubleStrengthTime ,dStrengthTime);
deadzoneValue = editValues(deadzoneValue ,deadZone);
aimAssistCurveType = editSwitch(aimAssistCurveType ,aaCurve); //
edit switch function
radiusSize = editValues(radiusSize ,aaSize);
speedAngle = editValues(speedAngle ,aaSpd);
aimAssistBoost = editSwitch(aimAssistBoost ,aaBoost); //
edit switch function
fireRadius = editValues(fireRadius ,aaBSize);
fireSpeed = editValues(fireSpeed ,aaBSpd);
longRange = editSwitch(longRange ,aaLR); // edit
switch function
longRangeRadius = editValues(longRangeRadius ,aaLRSize);
ceorinShape = editSwitch(ceorinShape ,rAAShape);
rotationalSize = editValues(rotationalSize ,rAASize);
rotationalSpeed = editValues(rotationalSpeed ,rAASpd);
AimAssistOpSize = editValues(AimAssistOpSize ,AAOSpd);
AimAssistOpTime =
editValues(AimAssistOpTime ,AAOSsize);
HIPBoost = editValues(HIPBoost
,HPBoost);
polar_aasist_radius = editValues(polar_aasist_radius ,PAR);
polar_aasist_steps = editValues(polar_aasist_steps ,PAS);
TrackerStrength = editValues(TrackerStrength ,TSt);
TrackerSpeed = editValues(TrackerSpeed
,TSp);
DeadZoneSize = editValues(DeadZoneSize
,DZo);
RADIUS = editValues(RADIUS
,RAD);
ACTIVE_TRACKING = editValues(ACTIVE_TRACKING ,AcT);
FractioN = editValues(FractioN
,FRA);
ANGLE = editValues(ANGLE
,ANG);
AIM_SMOOTHING_FACTOR = editValues(AIM_SMOOTHING_FACTOR ,ASF);
SteadyAimResolution = editValues(SteadyAimResolution ,SAR);
rateOfFire = editValues(rateOfFire ,rfFireRate);
akimboRateOfFire = editValues(akimboRateOfFire ,dualFireRate);
}
/* When We are Either In Mod Menu OR Edit Menu - Update/Refresh The Display
for the OLED */
if(updateDisplay){
cls_oled(OLED_BLACK); // Clear The Screen
rect_oled(0, 0, OLED_WIDTH, OLED_HEIGHT, OLED_BLACK, OLED_WHITE);
line_oled(0,28,127 , 28, 1, 1);
/* Display Val Names / Adjustble Values when In Edit Menu */
if(editMenu){
print(centerPosition(getStringLength(valNames[valNameIdx]) ,OLED_FONT_SMALL_WIDTH),
10 ,OLED_FONT_SMALL , OLED_WHITE , valNames[valNameIdx]);
}
/* Display Mod Names / Toggles When In Mod Menu */
else {
print(centerPosition(getStringLength(modNames[modNameIdx]) ,OLED_FONT_SMALL_WIDTH),
10 ,OLED_FONT_SMALL , OLED_WHITE , modNames[modNameIdx]);
}
updateDisplay = FALSE; // When No Buttons are Pressed In the menu /
Update Display is FALSE
}
}
/* When We ARE NOT in ModMenu or EditMenu */
if(!modMenu && !editMenu){
/* Display The Title Screen When we Are NOT in any Menu s */
if(displayTitle){
cls_oled(0);
displayTitle = FALSE;
screenSaver = TRUE;
//run = 1;
//combo_run(rgb);
rect_oled(0, 0, OLED_WIDTH, OLED_HEIGHT, OLED_BLACK, OLED_WHITE);
print(centerPosition(getStringLength(misc[0]) ,OLED_FONT_SMALL_WIDTH),
6 ,OLED_FONT_SMALL , OLED_WHITE , misc[0]);
if(get_ival(Fire) > 1)
set_val(Fire, 100);
if(!driveMode){
if(vmSpeed){
if(vmSpeed == 0) vm_tctrl( 0);
if(vmSpeed == 1) vm_tctrl(-2);
if(vmSpeed == 2) vm_tctrl(-4);
if(vmSpeed == 3) vm_tctrl(-6);
}
rapidFire =
presetQuickToggles(ActivateHoldButton[0],ActivatePressButton[0],rapidFire ,rF
,1,rapidQT );
akimboRF =
presetQuickToggles(ActivateHoldButton[1],ActivatePressButton[1],akimboRF ,dualRF
,2,akimboQT );
dropShotmw2 =
presetQuickToggles(ActivateHoldButton[2],ActivatePressButton[2],dropShotmw2 ,dShot
,1,dropShotQT );
snakeShotmw2 =
presetQuickToggles(ActivateHoldButton[3],ActivatePressButton[3],snakeShotmw2,sShot
,1,snakeShotQT );
silentScope =
presetQuickToggles(ActivateHoldButton[4],ActivatePressButton[4],silentScope ,sScope
,1,silentShotQT);
if(rapidFire){
HoldTime = 500 / rateOfFire;
RestTime = HoldTime -get_rtime();
if(RestTime < 0) RestTime = 0;
if(rapidFireActivationType(rapidFireType))
combo_run(RAPIDFIRE);
else
combo_stop(RAPIDFIRE);
combo_run(Blink);
LedOn = 200;
LedOff = 150;
}
if(snakeShotmw2){
if(snakeShotActivationType(snakeShotActivationmw2)){
combo_run(SnakeShotmw2);
}
if(combo_running(SnakeShotmw2) && !get_val(Fire)){
combo_stop(SnakeShotmw2);
}
}
if(antiRecoilBasic >= 1){
smartRumbleStandard = get_rumble(rumbleToUse());
if(antirecoilActivation(standardARFireType)){
if(antiRecoilBasic == 1){
combo_run(antiRecoilCombo);
}
if(antiRecoilBasic == 2){
if(smartRumbleStandard > 10 &&
smartRumbleStandard < 90){
antirecoilStrengthStandard =
verticalStrength + smartRumbleStandard / 2;
}
if(smartRumbleStandard < 10){
if(taylorAssist){
offsetAR(aimRY,verticalStrength +
(sinAngle / 327));
offsetAR(aimRX,horizontalStrength +
(cosAngle / 327));
}
else {
offsetAR(aimRY,verticalStrength);
offsetAR(aimRX,horizontalStrength);
}
}
else {
if(taylorAssist){
offsetAR(aimRY,antirecoilStrengthStandard);
offsetAR(aimRX,horizontalStrength);
}
}
}
}
if(!get_val(Fire)){
antirecoilStrengthStandard = 0;
smartRumbleStandard = 0;
}
}
if(antiRecoilPolar == 1){
if(antirecoilActivation(standardARFireType)){
antirecoilBoostTimer += get_rtime();
if(antirecoilBoostTimer < doubleStrengthTime){
legacyRecoilStrength = ((verticalStrengthP * 2 *
32767/100));
}
if(antirecoilBoostTimer > doubleStrengthTime){
legacyRecoilStrength = (verticalStrengthP *
32767/100) ;
}
if(isqrt(pow(get_ival(POLAR_RX),2) +
pow(get_ival(POLAR_RY),2)) >(deadzoneValue * 32767/100)) {
offset(POLAR_RY,legacyRecoilStrength -
(deadzoneValue * 32767 / 100));
offset(POLAR_RX,horizontalStrengthP * 32767 /
100);
}
if(isqrt(pow(get_ival(POLAR_RX),2) +
pow(get_ival(POLAR_RY),2))<(deadzoneValue * 32767/100)) {
offset(POLAR_RY,legacyRecoilStrength -
get_val(POLAR_RY))
offset(POLAR_RX,horizontalStrengthP * 32767 /
100);
}
}
if(!get_val(Fire)){
antirecoilBoostTimer = 0;
}
}
if(antiRecoilPolar == 2){
smartRumble = get_rumble(rumbleToUse());
if(antirecoilActivation(standardARFireType)){
antirecoilBoostTimer += get_rtime();
if(smartRumble > 10 && smartRumble < 90){
if(antirecoilBoostTimer < doubleStrengthTime){
if(get_controller() == PIO_XB1){
antirecoilStrength =
((verticalStrengthP * invertStick) * 2) + smartRumble / 2;
}
else {
antirecoilStrength =
((verticalStrengthP * invertStick) * 2) + smartRumble / 4;
}
}
if(antirecoilBoostTimer > doubleStrengthTime){
if(get_controller() == PIO_XB1){
antirecoilStrength =
(verticalStrengthP * invertStick) + smartRumble / 2;
}
else {
antirecoilStrength =
(verticalStrengthP * invertStick) + smartRumble / 3;
}
}
}
if(isqrt(pow(get_ival(POLAR_RX),2) +
pow(get_ival(POLAR_RY),2)) >(deadzoneValue * 32767/100)) {
if(smartRumble < 10){
offset(POLAR_RY,((verticalStrengthP -
(deadzoneValue * invertStick)) * 32767 / 100));
offset(POLAR_RX,horizontalStrengthP *
32767 / 100);
}
else {
offset(POLAR_RY,((antirecoilStrength -
(deadzoneValue * invertStick)) * 32767 / 100));
offset(POLAR_RX,horizontalStrengthP *
32767 / 100);
}
}
if(isqrt(pow(get_ival(POLAR_RX),2) +
pow(get_ival(POLAR_RY),2))<(deadzoneValue * 32767/100)) {
if(smartRumble < 10){
offset(POLAR_RY,(verticalStrengthP *
32767/100) - get_val(POLAR_RY))
offset(POLAR_RX,horizontalStrengthP *
32767 / 100);
}
else {
offset(POLAR_RY,antirecoilStrength *
32767 / 100);
offset(POLAR_RX,horizontalStrengthP *
32767 / 100);
}
}
}
if(!get_val(Fire)){
smartRumble = 0;
antirecoilStrength = 0;
antirecoilBoostTimer = 0;
}
}
if(taylorAssist){
radiusPosition = getPolar(POLAR_RS,POLAR_RADIUS);
angle = (angle % 360);
if(!(loopTime++ % 1)){
if(aimAssistBoost)
angle += (random(speedAngle >> 1,speedAngle) +
fireSpeed);
else
angle += random(speedAngle >> 1,speedAngle);
}
if(aimAssistActivation(taylorFireType)){
if(!longRange){
if(aimAssistBoost && get_ival(Fire)){
radiusUsed = ((random(radiusSize >>
1,radiusSize + fireRadius)) * 32767/100);
}
else {
radiusUsed = (random(radiusSize >>
1,radiusSize) * 32767/100);
}
}
if(longRange){
if(!(loopTime++ % 1)){
if(radiusPosition > 0 && radiusPosition <
(25 * 32767/100)){
if(!aimAssistBoost){
radiusUsed =
((random(longRangeRadius >> 1,longRangeRadius) * 32767/100));
}
}else {
radiusUsed = (random(radiusSize >>
1,radiusSize) * 32767/100);
}
}
}
if(aimAssistCurveType == 0)
setPolar(POLAR_RS,angle,radiusUsed);
else
setLinear(POLAR_RS,angle,radiusUsed);
smoothingValue = 32767;
}
}
if(rotationalAA){
LX = get_val(POLAR_LX);
LY = get_val(POLAR_LY);
if(!(loopSync++ % 1)){
leftAngle += random(rotationalSpeed >>
1,rotationalSpeed);
}
getLeftAngle(ceorinShape,leftAngle,random(rotationalSize >>
1,rotationalSize) * 32767/100)
if(aimAssistActivation(rotationalFireType)) {
set_val(POLAR_LX,clamp(LX + cosAngleL + random(-100,100),-
32767,32767));
set_val(POLAR_LY,clamp(LY + sinAngleL + random(-
100,100),-32767,32767));
}
}
if(dropShotmw2){
if(dropShotmw2FireType == 0) {
if(get_val(Fire) && get_ptime(Fire) <= 200 && !
get_val(Ads)){
combo_run(dropShotter);
}
}
if(dropShotmw2FireType == 1) {
if(get_ival(Ads) && get_val(Fire) && get_ptime(Fire)
<= 200){
combo_run(dropShotter);
}
}
if(dropShotmw2FireType == 2) {
if(get_val(Ads) && get_val(Fire) && get_val(Crouch)){
combo_run(dropShotter);
}
if(combo_running(dropShotter) && (event_release(Ads)
|| !get_val(Fire) || event_press(Jump) || !get_val(Crouch))){
combo_stop(dropShotter);
}
}
if(dropShotmw2FireType == 3){
if(get_val(Fire) && event_release(Crouch) &&
get_ptime(Crouch) < 200){
combo_run(dropShotter);
}
}
if(dropShotmw2FireType == 4) {
if(get_ival(Ads)){
if(get_val(Lethal)){
swap(Lethal,Fire);
}
if(get_ptime(Lethal) <= 200){
combo_run(dropShotter);
}
set_val(Lethal,0);
}
}
if(combo_running(dropShotter) && (event_release(Ads) || !
get_val(Fire) || event_press(Jump))){
combo_stop(dropShotter);
}
}
if(silentScope){
if(get_ival(Ads) && get_val(Fire) || get_val(Fire)){
combo_run(cancelAnimation);
}
}
if(akimboRF == 1){
HoldTime = 500 / random(akimboRateOfFire >> 1,akimboRateOfFire);
if(get_val(Fire)){
combo_run(AkimboRapidFire1)
}
else {
if(get_val(Ads)){
combo_run(AkimboRapidFire2);
}
}
combo_run(Blink);
LedOn = 200;
LedOff = 150;
}
if(akimboRF == 2){
if(get_ival(Ads) || get_ival(Fire)){
set_val(Ads,100);
set_val(Fire,100);
}
combo_run(Blink);
LedOn = 200;
LedOff = 150;
}
if(bunnyHop) {
if (bunnyHop && get_ival(Jump) && get_ptime(Jump) > 200)
combo_run(BunnyHop);
}
if(SOFTAIM){
combo_run(SAW_movement_finder)
SAWMOVEMENTX()
SOFTaim(PS4_RY,(0));
actual_X = get_ival(aimRX);
actual_Y = get_ival(aimRY);
if(!(time++ % STEP_INTERVAL)){
angle += polar_aasist_steps;
}
angle = angle % 360;
cos_angle_tdrift = Polar_Array[angle % 360];
sin_angle_tdrift -= actual_Y;
cos_angle_tdrift -= actual_X;
}else {
}
}
if(ToggleTracker){
if(get_ival(Ads) || get_ival(Ads) && get_ival(Fire))
{
CurRX = get_ival(PS4_RX);
CurRY = get_ival(PS4_RY);
}}
if(ToggleSteadyAim){
if( get_ival(Ads) || get_ival(Fire) || get_ival(Ads) && get_ival(Fire))
{
CurrentRX = get_val(aimRX);
CurrentRY = get_val(aimRY);
x_aim = get_ival(aimRX);
y_aim = get_ival(aimRY);
combo SAW2 {
set_val(aimRX,AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRX,-AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRY,AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRY,-AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRY,AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRX,-AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRX,AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRY,-AimAssistOpSize)wait(AimAssistOpTime)
}
combo SAW3 {
set_val(aimRX,AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRX,-AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRY,AimAssistOpSize + 1)wait(AimAssistOpTime)
set_val(aimRY,-AimAssistOpSize - 1)wait(AimAssistOpTime)
set_val(aimRY,AimAssistOpSize + 1)wait(AimAssistOpTime)
set_val(aimRX,-AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRX,AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRY,-AimAssistOpSize)wait(AimAssistOpTime)
}
combo SAW5 {
set_val(aimRX,AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRX,-AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRY,AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRY,-AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRY,AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRX,-AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRX,AimAssistOpSize)wait(AimAssistOpTime)
set_val(aimRY,-AimAssistOpSize)wait(AimAssistOpTime)
}
combo HipBoost {
SOFTaim(aimRX,AimAssistOpSize + HIPBoost)wait(AimAssistOpTime)
SOFTaim(aimRX,-AimAssistOpSize - HIPBoost)wait(AimAssistOpTime)
SOFTaim(aimRY,AimAssistOpSize + HIPBoost + 1)wait(AimAssistOpTime)
SOFTaim(aimRY,-AimAssistOpSize - HIPBoost - 1)wait(AimAssistOpTime)
SOFTaim(aimRY,AimAssistOpSize + HIPBoost + 1)wait(AimAssistOpTime)
SOFTaim(aimRX,-AimAssistOpSize - HIPBoost)wait(AimAssistOpTime)
SOFTaim(aimRX,AimAssistOpSize + HIPBoost)wait(AimAssistOpTime)
SOFTaim(aimRY,-AimAssistOpSize - HIPBoost - 1)wait(AimAssistOpTime)
}
combo SAW_movement_finder {
SAWAIM_MOVEMENT_TRACK = 1
if(get_val(aimRX) > 15 ||get_val(aimRY) < -15)
SAWAIM_MOVEMENT_TRACK = 1
if(get_val(aimRX) > 15 ||get_val(aimRY) < -15)
SAWAIM_MOVEMENT_TRACK = -1
if(get_val(aimRX) > 15 ||get_val(aimRY) < -15)
SAWAIM_MOVEMENT_TRACK = -1
if(get_val(aimRX) > 15 ||get_val(aimRY) < -15)
SAWAIM_MOVEMENT_TRACK = (-SAWAIM_MOVEMENT_TRACK + SAWAIM_MOVEMENT_TRACK)
}
function SOFTaim( axis, offset_val) {
set_val(axis, clamp(offset_val * (100 - abs(get_val(axis))) / 100 +
get_val(axis), -100, 100));
return;
}
function SAW1() {
if(abs(get_val(aimRX)) + abs(get_val(aimRY)) > 15 || abs(get_val(aimRX)) +
abs(get_val(aimRY)) < -15)
combo_stop(SAW1)return;}
function SAW2() {
if(abs(get_val(aimRX)) + abs(get_val(aimRY)) > 16 || abs(get_val(aimRX)) +
abs(get_val(aimRY)) < -16)
combo_stop(SAW2)return;}
function SAW3() {
if(abs(get_val(aimRX)) + abs(get_val(aimRY)) > 17 || abs(get_val(aimRX)) +
abs(get_val(aimRY)) < -17)
combo_stop(SAW3)return;}
function SAW5() {
if(abs(get_val(aimRX)) + abs(get_val(aimRY)) > 19 || abs(get_val(aimRX)) +
abs(get_val(aimRY)) < -19)
combo_stop(SAW5)return;}
function SAWMOVEMENTX() {
if(abs(get_val(aimRX)) + abs(get_val(aimRY)) > 20 || abs(get_val(aimRX)) +
abs(get_val(aimRY)) < -20)
combo_stop(SAW_movement_finder)return;}
function offset(Stick, Value) {
if (Stick >= aimRX) {
set_val(Stick, clamp(Value * (32767 - abs(get_val(Stick))) / 32767 +
get_val(Stick), -32767, 32767));
return;
}
set_val(Stick, clamp(Value * (100 - abs(get_val(Stick))) / 100 + get_val(Stick),
-100, 100));
}
function GetShapes(f_var) {
if(!SpiralPosition1)
{
InnerSpiral -= 1;
if(InnerSpiral < MinRadius)
SpiralPosition1 = TRUE;
}
else
{
InnerSpiral += 1;
if(InnerSpiral > f_var)
SpiralPosition1 = FALSE;
}
if(!SpiralPosition2)
{
OuterSpiral -= 1;
if(OuterSpiral < MinRadius)
SpiralPosition2 = TRUE;
}
else
{
OuterSpiral += 1;
if(OuterSpiral > f_var)
SpiralPosition2 = FALSE;
}
if( polar_aim_assist_onoff == 1)
{
sin_angle_tdrift = (sin_angle_tdrift * f_var) /100;
cos_angle_tdrift = (cos_angle_tdrift * f_var) /100;
}
if( polar_aim_assist_onoff == 2)
{
sin_angle_tdrift = (sin_angle_tdrift * f_var)/100;
cos_angle_tdrift = (cos_angle_tdrift * f_var/2)/100;
}
if( polar_aim_assist_onoff == 3)
{
cos_angle_tdrift = (cos_angle_tdrift * f_var) /100;
sin_angle_tdrift = (sin_angle_tdrift * f_var/2)/100;
}
if( polar_aim_assist_onoff == 4)
{
sin_angle_tdrift = (sin_angle_tdrift * InnerSpiral) /100;
cos_angle_tdrift = (cos_angle_tdrift * OuterSpiral) /100;
}
if( polar_aim_assist_onoff == 5)
{
if(Position == 0 || Position == 1)
{
actual_X = (get_ival(aimRX)) + ((cos_angle_tdrift * f_var))/100;
}
if(Position == 2 || Position == 3)
{
actual_Y = (get_ival(aimRY)) + ((sin_angle_tdrift * f_var))/100;
}
Position++;
if(Position == 4)
{
Position = 0;
}
}
if(polar_aim_assist_onoff == 5 )
{
set_val(aimRX, actual_X);
set_val(aimRY, actual_Y);
}
else
{
set_val(aimRX, calculate(actual_X + cos_angle_tdrift, -100, 100));
set_val(aimRY, calculate(actual_Y + sin_angle_tdrift, -100, 100));
}
}
function calculate(int v, int lo, int hi) {
if(v < lo) return lo;
if(v > hi) return hi;
return v;
}
function get_polar_coordinate(Radius, coef){
return _ret;
}
function cos_( _angle)
{
if (_angle <= 90)
{
_ret = (TrackerCords[90 - _angle]);
}
else if (_angle <= 180)
{
_ret = inv(TrackerCords[_angle - 90]);
}
else if (_angle <= 270)
{
_ret = inv(TrackerCords[270 - _angle]);
}
else
{
_ret = (TrackerCords[_angle - 270]);
}
return _ret;
}
function Sweet_EviL_Aim_Assist(int _x, int _y)
{
x_aim_assist = _x;
y_aim_assist = _y;
if(first_aim == 0)
{
first_aim = 1;
angle = atan2_16bits(y_aim_assist, x_aim_assist);
}
else
{
angle += ANGLE;
angle = (angle % 360);
}
rumble = 0;
if(toggle_active_tacking)
{
x_aim_assist = x_aim_assist + ((radiuS * sin_(angle)) / 1000);
y_aim_assist = y_aim_assist + ((radiuS * cos_(angle)) / 1000);
}
else
{
x_aim_assist = x_aim_assist + ((radiuS * cos_(angle)) / 1000);
y_aim_assist = y_aim_assist + ((radiuS * sin_(angle)) / 1000);
}
active_tacking_counter++;
if(active_tacking == active_tacking_counter)
{
active_tacking_counter = 0;
toggle_active_tacking = toggle_active_tacking ^^ 1;
}
}
}
else
{ // oct 2,3
// if (inv(_x) <= _y) {
if (_x >= inv(_y))
{
_angle = 540 - ((_x * 300) / _y);
}
else
{
_angle = 1080 + ((_y * 300) / _x);
}
}
}
else
{ // oct 4,5,6,7
if (_x < 0)
{ // oct 4,5
// if (inv(_x) > inv(_y)) {
if (_x < _y)
{
_angle = ((_y * 300) / _x) - 1080;
}
else
{
_angle = ((inv(_x) * 300) / _y) - 540;
}
}
else
{ // oct 6,7
// if (_x <= inv(_y)) {
if (inv(_x) >= _y)
{
_angle = ((inv(_x) * 300) / _y) - 540;
}
else
{
_angle = ((_y * 300) / _x);
}
}
}
fix_result_float = fix16_from_int(abs(integer_part))
+ fix16_sdiv(fix16_from_int(clamp(fractional_part, 0, 1000)), fix16_1000);
return fix_result_float * fix_float_sign;
}
function fix16_from_int(int a)
{
return clamp(a, -32768, 32767) * fix16_one;
}
int result_sdiv;
function fix16_sdiv(int inArg0, int inArg1)
{
result_sdiv = fix16_div(inArg0, inArg1);
if (result_sdiv == fix16_overflow)
{
if ((inArg0 >= 0) == (inArg1 >= 0))
return fix16_maximum;
else
return fix16_minimum;
}
return result_sdiv;
}
int remainder_div;
int divider_div;
int quotient_div;
int bit_div;
int result_div;
if (b == 0)
return fix16_minimum;
if(a >= 0)
{
remainder_div = a;
}
else
{
remainder_div = -a;
}
if(b >= 0)
{
divider_div = b;
}
else
{
divider_div = -b;
}
quotient_div = 0;
bit_div = 0x10000;
if (!bit_div)
return fix16_overflow;
remainder_div = remainder_div<<1;
bit_div = bit_div>>1;
}
result_div = quotient_div;
if (result_div == fix16_minimum)
return fix16_overflow;
result_div = -result_div;
}
return result_div;
}
function offsetAR(Stick,Value) {
set_val(Stick, clamp(Value * (100 - abs(get_val(Stick))) / 100 + get_val(Stick),
-100, 100));
return;
}
function getPolar(Stick, AngleOrRadius) {
if (AngleOrRadius) return 360 - get_polar(Stick, POLAR_ANGLE);
return isqrt((get_val(Stick + 42) * get_val(Stick + 42)) + (get_val(Stick + 43) *
get_val(Stick + 43)));
}
function linearCosAngle(int angle) { return linearCoordinates(angle, 0); }
function linearSinAngle(int angle) { return linearCoordinates(angle, 1); }
int angleOut, yOut, xOut;
function linearCoordinates(int angle, int axis) {
if (angle < 0)
angle = (angle % 360) + 360;
angle = (angle % 360);
angleOut = ((angle % 90)) * (smoothingValue) / (90);
xOut = angleOut;
yOut = -smoothingValue + angleOut;
if(modNameIdx == dShot){
print(centerPosition(getStringLength(instaDropOpt[dropShotmw2FireType]) ,OLED_FONT_
SMALL_WIDTH),34 ,OLED_FONT_SMALL , OLED_WHITE ,instaDropOpt[dropShotmw2FireType]);
}
else if(modNameIdx == basicAR || modNameIdx == basicPolar){
print(centerPosition(getStringLength(arActivation[standardARFireType]),OLED_FONT_SM
ALL_WIDTH),34,OLED_FONT_SMALL,OLED_WHITE,arActivation[standardARFireType])
}
else if(modNameIdx == tAA){
print(centerPosition(getStringLength(aimAssistType[taylorFireType]),OLED_FONT_SMALL
_WIDTH),34,OLED_FONT_SMALL,OLED_WHITE,aimAssistType[taylorFireType])
}
else if(modNameIdx == rAA){
print(centerPosition(getStringLength(aimAssistType[rotationalFireType]),OLED_FONT_S
MALL_WIDTH),34,OLED_FONT_SMALL,OLED_WHITE,aimAssistType[rotationalFireType])
}
else if(modNameIdx == rF){
print(centerPosition(getStringLength(handGunFireType[rapidFireType]) ,OLED_FONT_SMA
LL_WIDTH),34 ,OLED_FONT_SMALL , OLED_WHITE ,handGunFireType[rapidFireType]);
}
else if(modNameIdx == sShot){
print(centerPosition(getStringLength(snakeShotOpt[snakeShotActivationmw2]) ,OLED_FO
NT_SMALL_WIDTH),34 ,OLED_FONT_SMALL ,
OLED_WHITE ,snakeShotOpt[snakeShotActivationmw2]);
}
}
return fVar;
}
function menuNavigation(indexVar,fMin,fMax){
if(!get_ival(Ads)){
if(event_press(PS4_RIGHT)){
indexVar += 1;
updateDisplay = TRUE;
}
if(event_press(PS4_LEFT)){
indexVar -= 1;
updateDisplay = TRUE;
}
}
if(valRangeIdx[modNameIdx][2] == 1){
if(event_press(PS4_CROSS)){
valNameIdx = valRangeIdx[modNameIdx][0];
modMenu = FALSE;
editMenu = TRUE;
updateDisplay = TRUE;
}
}
if(event_press(PS4_CIRCLE)){
if(modMenu){
modMenu = FALSE;
editMenu = FALSE;
displayTitle = TRUE;
Save();
combo_run(saved);
}
else if(editMenu){
updateDisplay = TRUE;
modMenu = TRUE;
editMenu = FALSE;
}
}
BlockButtonPress ()
indexVar = rotateVar(indexVar,fMin,fMax);
return indexVar;
}
int run;
int stepInterval = 6; // This is how many times the script updates the colour
changing sequence
int maxColourChange;
int cycleRunTime;
int colorChange;
combo rgb {
cycleRunTime += get_rtime();
if(!(cycleRunTime++ % stepInterval)){ // Change stepInterval to determine how
many loops you want to use to increase/decrease the colour change,lower means
faster - higher means slower
if(!maxColourChange){
colorChange -= 4; // 360 / 100 = 3.6 ( due to no floating
points I round up to 4 )
if(colorChange < 0) // When the colourChange has reached max
359 , decrease back to 0
maxColourChange = TRUE;
}
else {
colorChange += 4;// 360 / 100 = 3.6 ( due to no floating
points I round up to 4 )
if(colorChange > 359) // when the colourChange has reached 0 ,
increase back up to 359
maxColourChange = FALSE;
}
cycleRunTime = 0; // reset cycleRunTime
}
set_hsb(colorChange,100,100);
}
function rotateVar(Value,Min,Max){
if(Value > Max)
return Min;
if(Value < Min)
return Max;
return Value;
}
combo QuickToggles{
wait(1500)
displayTitle = TRUE;
}
combo saved {
cls_oled(OLED_BLACK);
print(centerPosition(getStringLength(misc[7]),OLED_FONT_MEDIUM_WIDTH),25,OLED_FONT_
MEDIUM,OLED_WHITE,misc[7])
wait(500);
displayTitle = TRUE;
}
combo AkimboRapidFire1 {
offsetAR(moveLY,0);
wait(40);
set_val(Fire,100);
set_val(Ads,0);
wait(HoldTime);
offsetAR(moveLY,0);
wait(40);
set_val(Ads,100);
set_val(Fire,0);
wait(RestTime);
}
combo AkimboRapidFire2 {
offsetAR(moveLY,0);
wait(40);
set_val(Ads,100);
set_val(Fire,0);
wait(HoldTime);
offsetAR(moveLY,0);
wait(40);
set_val(Fire,100);
set_val(Ads,0);
wait(RestTime);
}
combo Blink{
set_ledx(0,0);
wait(LedOn);
set_ledx(1,2);
wait(LedOff);
}
combo cancelAnimation {
set_val(Lethal,100);
wait(100);
set_val(Lethal,100);
set_val(Swap,100);
wait(40);
set_val(Swap,0);
wait(20);
}
combo SnakeShotmw2{
set_val(Crouch,100);
wait(100);
set_val(moveLY,100);
wait(30);
set_val(Crouch,100);
wait(750);
set_val(Crouch,0);
set_val(moveLY,0);
wait(100);
set_val(Jump, 100);
wait(30);
set_val(Jump, 0);
wait(60);
set_val(Jump, 100);
wait(30);
set_val(Jump, 0);
wait(60);
set_val(Jump, 100);
wait(30);
set_val(Jump, 0);
wait(600);
set_val(Jump, 100);
wait(30);
set_val(Jump, 0);
wait(60);
}
combo RAPIDFIRE {
wait(HoldTime);
set_val(Fire, 0);
wait(RestTime);
}
combo rumbleOn {
set_ledx(2, 2);
set_rumble(RUMBLE_B, 50);
wait(150);
reset_rumble();
wait(100);
set_rumble(RUMBLE_B, 50);
wait(150);
reset_rumble();
reset_leds();
run = 1;
}
combo rumbleOff {
set_ledx(1, 1);
set_rumble(RUMBLE_A, 50);
wait(300);
reset_rumble();
wait(400);
reset_leds();
wait(20);
}
combo resetLed {
reset_leds();
set_rumble(RUMBLE_A, 50);
wait(300);
reset_rumble();
wait(400);
reset_leds();
wait(20);
run = TRUE;
}
combo DriveMode {
cls_oled(OLED_BLACK);
print(centerPosition(getStringLength(misc[4]),OLED_FONT_MEDIUM_WIDTH),10,OLED_FONT_
MEDIUM,OLED_WHITE,misc[4])
print(centerPosition(getStringLength(misc[5]),OLED_FONT_MEDIUM_WIDTH),35,OLED_FONT_
MEDIUM,OLED_WHITE,misc[5])
wait(1500);
displayTitle = TRUE;
}
combo driveModeOff {
cls_oled(OLED_BLACK)
print(centerPosition(getStringLength(misc[4]),OLED_FONT_MEDIUM_WIDTH),10,OLED_FONT_
MEDIUM,OLED_WHITE,misc[4])
print(centerPosition(getStringLength(misc[6]),OLED_FONT_MEDIUM_WIDTH),35,OLED_FONT_
MEDIUM,OLED_WHITE,misc[6])
wait(1500);
displayTitle = TRUE;
run = TRUE;
}
int displayToggles;
function presetQuickToggles(fHold,fPress,fVar,fIdx,fMax,fState) {
if(get_ival(fHold)){
if(event_release(fPress) && get_ptime(fPress) < 300){
modNameIdx = fIdx;
if(fVar){
fVar = rotateVar(fVar++,0,fMax);
}
else {
if(!fState){
fVar = rotateVar(fVar++,0,fMax);
fState = fVar;
}
else
fVar = fState;
}
displayToggles = TRUE;
}
if(get_val(fPress) && get_ptime(fPress) == 300){
if(fVar){
fVar = 0;
}
else {
if(!fState){
fVar = rotateVar(fVar++,0,0);
fState = fVar;
}
else
fVar = fState;
}
displayToggles = TRUE;
}
set_val(fPress, 0)
}
if(displayToggles){
combo_run(QuickToggles);
screenSaver = FALSE;
cls_oled(OLED_BLACK);
rect_oled(0, 0, OLED_WIDTH, OLED_HEIGHT, OLED_BLACK, OLED_WHITE);
displayToggles = FALSE;
print(centerPosition(getStringLength(modNames[modNameIdx]) ,OLED_FONT_SMALL_WIDTH),
8 ,OLED_FONT_SMALL , OLED_WHITE , modNames[modNameIdx]);
if(modNameIdx == dualRF){
if(fVar == 0)
print(centerPosition(getStringLength(akimboRF_Opt[0]),OLED_FONT_SMALL_WIDTH),35,OLE
D_FONT_SMALL,OLED_WHITE,akimboRF_Opt[0])
else if(fVar == 1)
print(centerPosition(getStringLength(akimboRF_Opt[1]),OLED_FONT_SMALL_WIDTH),35,OLE
D_FONT_SMALL,OLED_WHITE,akimboRF_Opt[1])
else if(fVar == 2)
print(centerPosition(getStringLength(akimboRF_Opt[2]),OLED_FONT_SMALL_WIDTH),35,OLE
D_FONT_SMALL,OLED_WHITE,akimboRF_Opt[2])
}
else {
if(fVar == 1)
print(centerPosition(getStringLength(Toggle[1]),OLED_FONT_SMALL_WIDTH),35,OLED_FONT
_SMALL,OLED_WHITE,Toggle[1])
else
print(centerPosition(getStringLength(Toggle[0]),OLED_FONT_SMALL_WIDTH),35,OLED_FONT
_SMALL,OLED_WHITE,Toggle[0])
}
}
return fVar;
}
int stringLength;
function getStringLength(offset) {
stringLength = 0;
do {
offset++;
stringLength++;
} while (duint8(offset));
return stringLength;
}
/*
===================================================================================
=========================================================
Center X Function (Made By Batts)
===================================================================================
=========================================================
*/
function centerPosition(f_chars,f_font) {
===================================================================================
=========================================================
*/
int bufferIndex;
int charIndex,digitIndex;
function NumberToString(f_val,f_digits) {
bufferIndex = 1;
digitIndex = 10000;
if(f_val < 0) { //--neg numbers
putc_oled(bufferIndex,45); //--add leading "-"
bufferIndex += 1;
f_val = abs(f_val);
}
for(charIndex = 5; charIndex >= 1; charIndex--) {
if(f_digits >= charIndex) {
putc_oled(bufferIndex,(f_val / digitIndex) + 48);
f_val %= digitIndex;
bufferIndex ++;
if(charIndex == 4) {
putc_oled(bufferIndex,44);//--add ","
bufferIndex ++;
}
}
digitIndex /= 10;
}
puts_oled(centerPosition(bufferIndex -
1,OLED_FONT_MEDIUM_WIDTH),38,OLED_FONT_MEDIUM,bufferIndex - 1,OLED_WHITE);
}
int logVal;
function FindDigits(num) {
logVal = 0;
do {
num /= 10;
logVal++;
} while (num);
return logVal;
}
int i;
const uint8 BlockButtons [] = {
PS4_L2,PS4_OPTIONS,PS4_LEFT,
PS4_RIGHT,PS4_UP,PS4_DOWN,PS4_CROSS,PS4_CIRCLE,PS4_SQUARE,PS4_TRIANGLE,PS4_L1,PS4_R
1,PS4_R2};
function BlockButtonPress (){
for(i = 0; i < 13; i++){
if(get_ival(BlockButtons[i]) || event_press(BlockButtons[i])){
set_val(BlockButtons[i],0);
set_val(Tactical,0);
set_val(Ping,0);
set_val(Melee,0);
set_val(Reload,0);
set_val(Swap,0);
set_val(Lethal,0);
set_val(Sprint,0);
set_val(moveLX,0);
}
}
}
//======================================================================
// Toggle Switch Function
//======================================================================
function toggleSwitch(fVar,fIdx){
if(modNameIdx == fIdx){
if(event_press(PS4_UP)){
fVar = rotateVar(fVar + 1,0,toggleMax[modNameIdx]); // Max Amount of
Toggles From Array
updateDisplay = TRUE;
if(!fVar)
combo_run(rumbleOff);
else
combo_run(rumbleOn);
}
if(event_press(PS4_DOWN)){
fVar = rotateVar(fVar - 1,0,toggleMax[modNameIdx]); // Max Amount of
Toggles From Array
updateDisplay = TRUE;
if(!fVar)
combo_run(rumbleOff);
else
combo_run(rumbleOn);
}
if(modNameIdx == basicAR){
if(fVar == 1){
antiRecoilPolar = 0;
}
}
if(modNameIdx == basicPolar){
if(fVar == 1){
antiRecoilBasic = 0;
}
}
if(modNameIdx == rF){
rapidQT = fVar;
if(fVar == 1){
akimboRF = 0;
}
}
if(modNameIdx == dualRF){
akimboQT = fVar;
if(fVar == 1){
rapidFire = 0;
}
}
if(modNameIdx == dShot){
dropShotQT = fVar;
if(fVar == 1){
snakeShotmw2 = 0;
}
}
if(modNameIdx == sShot){
snakeShotQT = fVar;
if(fVar == 1){
dropShotmw2 = 0;
}
}
if(modNameIdx == sScope){
silentShotQT = fVar;
}
/* Print Strings here... */
if(modNameIdx == basicAR ){
print(centerPosition(getStringLength(antiRecoilBasic_Opt[antiRecoilBasic]) ,OLED_FO
NT_SMALL_WIDTH),49 ,OLED_FONT_SMALL ,
OLED_WHITE ,antiRecoilBasic_Opt[antiRecoilBasic]);
}
else if(modNameIdx == basicPolar ){
print(centerPosition(getStringLength(antiRecoilPolar_Opt[antiRecoilPolar]) ,OLED_FO
NT_SMALL_WIDTH),49 ,OLED_FONT_SMALL ,
OLED_WHITE ,antiRecoilPolar_Opt[antiRecoilPolar]);
}
else if(modNameIdx == SA){
if(fVar == 1)
print(centerPosition(getStringLength(Toggle[1]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[1])
else
print(centerPosition(getStringLength(Toggle[0]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[0])
}
else if(modNameIdx == RD){
print(centerPosition(getStringLength(RatDetectorShapes_Opt[polar_aim_assist_onoff])
,OLED_FONT_SMALL_WIDTH),40,OLED_FONT_SMALL,OLED_WHITE,RatDetectorShapes_Opt[polar_a
im_assist_onoff])
}
else if(modNameIdx == TT){
if(fVar == 1)
print(centerPosition(getStringLength(Toggle[1]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[1])
else
print(centerPosition(getStringLength(Toggle[0]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[0])
}
else if(modNameIdx == TSA){
if(fVar == 1)
print(centerPosition(getStringLength(Toggle[1]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[1])
else
print(centerPosition(getStringLength(Toggle[0]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[0])
}
else if(modNameIdx == StA){
if(fVar == 1)
print(centerPosition(getStringLength(Toggle[1]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[1])
else
print(centerPosition(getStringLength(Toggle[0]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[0])
}
else if(modNameIdx == HB){
if(fVar == 1)
print(centerPosition(getStringLength(Toggle[1]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[1])
else
print(centerPosition(getStringLength(Toggle[0]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[0])
}
else if(modNameIdx == dualRF ){
print(centerPosition(getStringLength(akimboRF_Opt[akimboRF]) ,OLED_FONT_SMALL_WIDTH
),40 ,OLED_FONT_SMALL , OLED_WHITE ,akimboRF_Opt[akimboRF]);
}
else if(modNameIdx == sScope){
if(fVar == 1)
print(centerPosition(getStringLength(Toggle[1]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[1])
else
print(centerPosition(getStringLength(Toggle[0]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[0])
}
else if(modNameIdx == bHop){
if(fVar == 1)
print(centerPosition(getStringLength(Toggle[1]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[1])
else
print(centerPosition(getStringLength(Toggle[0]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[0])
}
else if(modNameIdx == vSpeed ){
print(centerPosition(getStringLength(vmSpeed_Opt[vmSpeed]) ,OLED_FONT_SMALL_WIDTH),
40 ,OLED_FONT_SMALL , OLED_WHITE ,vmSpeed_Opt[vmSpeed]);
}
else if(modNameIdx == bLayout){
print(centerPosition(getStringLength(buttonLayouts_Opt[buttonLayouts]) ,OLED_FONT_S
MALL_WIDTH),40 ,OLED_FONT_SMALL , OLED_WHITE ,buttonLayouts_Opt[buttonLayouts]);
}
else if(modNameIdx == sLayout){
print(centerPosition(getStringLength(stickLayouts_Opt[stickLayouts]) ,OLED_FONT_SMA
LL_WIDTH),40 ,OLED_FONT_SMALL , OLED_WHITE ,stickLayouts_Opt[stickLayouts]);
}
else if(modNameIdx == bRumble){
if(fVar == 1)
print(centerPosition(getStringLength(Toggle[1]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[1])
else
print(centerPosition(getStringLength(Toggle[0]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[0])
}
else if(modNameIdx == ps4Swap){
if(fVar == 1)
print(centerPosition(getStringLength(Toggle[1]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[1])
else
print(centerPosition(getStringLength(Toggle[0]),OLED_FONT_SMALL_WIDTH),40,OLED_FONT
_SMALL,OLED_WHITE,Toggle[0])
}
else {
if(fVar == 1)
print(centerPosition(getStringLength(Toggle[1]),OLED_FONT_SMALL_WIDTH),49,OLED_FONT
_SMALL,OLED_WHITE,Toggle[1])
else
print(centerPosition(getStringLength(Toggle[0]),OLED_FONT_SMALL_WIDTH),49,OLED_FONT
_SMALL,OLED_WHITE,Toggle[0])
}
}
return fVar;
}
//======================================================================
// Edit Switch Function
//======================================================================
function editSwitch(fVar,fIdx){
if(valNameIdx == fIdx){ // Which valNameIdx number we are on \\
if(event_press(PS4_UP)){
fVar += valuesMinMax[valNameIdx][2] // Increase value by desired in
Array
updateDisplay = TRUE;
if(!fVar)
combo_run(rumbleOff);
else
combo_run(rumbleOn);
}
if(event_press(PS4_DOWN)){
fVar -= valuesMinMax[valNameIdx][2] // Increase value by desired in
Array
updateDisplay = TRUE;
if(!fVar)
combo_run(rumbleOff);
else
combo_run(rumbleOn);
}
fVar = rotateVar(fVar,valuesMinMax[valNameIdx][0],valuesMinMax[valNameIdx]
[1]);// Min and Max Value
if(valNameIdx == aaBoost){
if(fVar == 1){
longRange = 0;
}
}
if(valNameIdx == aaLR){
if(fVar == 1){
aimAssistBoost = 0;
}
}
/*=================================================================================
==============================================
Display Toggle Strings
===================================================================================
==============================================
*/
if(valNameIdx == aaCurve){
print(centerPosition(getStringLength(aimAssistCurveType_Opt[aimAssistCurveType]),OL
ED_FONT_SMALL_WIDTH),42,OLED_FONT_SMALL,OLED_WHITE,aimAssistCurveType_Opt[aimAssist
CurveType])
}
else if(valNameIdx == aaBoost){
print(centerPosition(getStringLength(aimAssistBoost_Opt[aimAssistBoost]),OLED_FONT_
SMALL_WIDTH),42,OLED_FONT_SMALL,OLED_WHITE,aimAssistBoost_Opt[aimAssistBoost])
}
else if(valNameIdx == aaLR){
print(centerPosition(getStringLength(longRange_Opt[longRange]),OLED_FONT_SMALL_WIDT
H),42,OLED_FONT_SMALL,OLED_WHITE,longRange_Opt[longRange])
}
else if(valNameIdx == rAAShape){
print(centerPosition(getStringLength(ceorinShape_Opt[ceorinShape]),OLED_FONT_SMALL_
WIDTH),42,OLED_FONT_SMALL,OLED_WHITE,ceorinShape_Opt[ceorinShape])
}
else {
if(fVar == 1)
print(centerPosition(getStringLength(Toggle[1]),OLED_FONT_SMALL_WIDTH),42,OLED_FONT
_SMALL,OLED_WHITE,Toggle[1])
else
print(centerPosition(getStringLength(Toggle[0]),OLED_FONT_SMALL_WIDTH),42,OLED_FONT
_SMALL,OLED_WHITE,Toggle[0])
}
}
return fVar;
}
/*
===================================================================================
===============================
Edit Values Function For Edit Menu
===================================================================================
===============================
*/
function editValues(fVar,fIdx){
if(valNameIdx == fIdx){
if(get_ival(Ads)){ // Ads
if(event_press(PS4_RIGHT)){
fVar += valuesMinMax[valNameIdx][2] // Increase value by
desired in Array
updateDisplay = TRUE;
}
if(event_press(PS4_LEFT)){
fVar -= valuesMinMax[valNameIdx][2] // Decrease value by
desired in Array
updateDisplay = TRUE;
}
if(event_press(PS4_UP)){
fVar += valuesMinMax[valNameIdx][3] // Increase value by
desired in Array
updateDisplay = TRUE;
}
if(event_press(PS4_DOWN)){
fVar -= valuesMinMax[valNameIdx][3] // Increase value by
desired in Array
updateDisplay = TRUE;
}
fVar = rotateVar(fVar,valuesMinMax[valNameIdx]
[0],valuesMinMax[valNameIdx][1]);// Min and Max Value
}
NumberToString(fVar,FindDigits(fVar)); // Display Value
}
return fVar;
}
/*
===================================================================================
=========================================================
Customisable Menu Options For Buttons (Hold & Press Options)
===================================================================================
=========================================================
*/
const string HoldButtons[] = {
"Select","L2/LT","R2/RT","L1/LB","R1/RB","L3/LS","R3/RS","Dpad Down","Dpad
Up","Dpad Left","Dpad Right","Triangle/Y","Cross/A","Circle/B","Square/X"};
const int8 HoldBtns [] = { -1, PS4_L2 ,PS4_R2 , PS4_L1, PS4_R1 , PS4_L3
, PS4_R3 ,PS4_DOWN,PS4_UP,PS4_LEFT,PS4_RIGHT,PS4_TRIANGLE,PS4_CROSS,
PS4_CIRCLE,PS4_SQUARE};
const int8 PressBtns[] = { -1,
PS4_TRIANGLE,PS4_CROSS,PS4_CIRCLE,PS4_SQUARE,PS4_DOWN,PS4_UP,PS4_LEFT,PS4_RIGHT,PS4
_SHARE,PS4_OPTIONS,PS4_TOUCH,PS4_ACCX,PS4_ACCY,PS4_PS,XB1_XBOX};
int highLight;
define ActivateButtonCount = 6;
int ActivateHoldButton[ActivateButtonCount];
int ActivatePressButton[ActivateButtonCount];
int ActivateHoldBtnIdx[ActivateButtonCount];
int ActivatePressBtnIdx[ActivateButtonCount];
function ButtonActivation(i,fIdx){
if(modNameIdx == fIdx){
if(event_press(PS4_UP)){
highLight = rotateVar(highLight ++,0,1);
updateDisplay = TRUE;
}
if(event_press(PS4_DOWN)){
highLight = rotateVar(highLight --,0,1);
updateDisplay = TRUE;
}
if(get_ival(Ads)){
if(highLight == 0){
if(event_press(PS4_RIGHT)){
ActivateHoldBtnIdx[i] = rotateVar(ActivateHoldBtnIdx[i] +
1,0,14);
updateDisplay = TRUE;
}
if(event_press(PS4_LEFT)){
ActivateHoldBtnIdx[i] = rotateVar(ActivateHoldBtnIdx[i] -
1,0,14);
updateDisplay = TRUE;
}
}
if(highLight == 1){
if(event_press(PS4_RIGHT)){
ActivatePressBtnIdx[i] = rotateVar(ActivatePressBtnIdx[i] +
1,0,19);
updateDisplay = TRUE;
}
if(event_press(PS4_LEFT)){
ActivatePressBtnIdx[i] = rotateVar(ActivatePressBtnIdx[i] -
1,0,19);
updateDisplay = TRUE;
}
}
}
if(highLight == 0){
rect_oled(115,34, 6, 8, OLED_WHITE, OLED_WHITE); // HighLight 1
rect_oled(6,34, 6, 8, OLED_WHITE, OLED_WHITE); // HighLight 1
}
if(highLight == 1){
rect_oled(115,49, 6, 8, OLED_WHITE, OLED_WHITE); // HighLight 2
rect_oled(6,49, 6, 8, OLED_WHITE, OLED_WHITE); // HighLight 2
}
print(centerPosition(getStringLength(HoldButtons[ActivateHoldBtnIdx[i]]),OLED_FONT_
SMALL_WIDTH),34,OLED_FONT_SMALL,OLED_WHITE,HoldButtons[ActivateHoldBtnIdx[i]])
print(centerPosition(getStringLength(pressButtons[ActivatePressBtnIdx[i]]),OLED_FON
T_SMALL_WIDTH),49,OLED_FONT_SMALL,OLED_WHITE,pressButtons[ActivatePressBtnIdx[i]])
}
}
function ActivateAllButtons(){
function Buttons(Type) {
Fire = Layouts[Type][0];
Ads = Layouts[Type][1];
Lethal = Layouts[Type][2];
Tactical = Layouts[Type][3];
Jump = Layouts[Type][4];
Crouch = Layouts[Type][5];
Melee = Layouts[Type][6];
Sprint = Layouts[Type][7];
Reload = Layouts[Type][8];
Swap = Layouts[Type][9];
Ping = Layouts[Type][10];
}
/*
===================================================================================
=========================================================
Controller Stick Layouts ()
===================================================================================
=========================================================
*/
int aimRY,aimRX,moveLY,moveLX;
const uint8 StickLayouts[][] = {
// 0 1 2 3 //
{ PS4_RY,PS4_RX,PS4_LY,PS4_LX},// Default Sticks
{ PS4_LY,PS4_LX,PS4_RY,PS4_RX},// SouthPaw
{ PS4_RY,PS4_LX,PS4_LY,PS4_RX},// Legacy
{ PS4_LY,PS4_RX,PS4_LY,PS4_LX} // Legacy SouthPaw
};
function ControllerRSLS(sticks){
aimRY = StickLayouts[sticks][0];
aimRX = StickLayouts[sticks][1];
moveLY = StickLayouts[sticks][2];
moveLX = StickLayouts[sticks][3];
function Load() {
reset_spvar();
if (read_spvar(0, 1, 0)) { // Read and check the first bit, if it is set, we
know something should have been saved, otherwise we fall back on our default
setting
antiRecoilBasic = read_spvar( 0, 2, 0); // 0
antiRecoilPolar = read_spvar( 0, 2, 0); // 1
taylorAssist = read_spvar( 0, 1, 0); // 2
rotationalAA = read_spvar( 0, 1, 0); // 3
SOFTAIM = read_spvar( 0, 1, 0);
polar_aim_assist_onoff = read_spvar(0, 5, 0);
ToggleTracker = read_spvar( 0, 1, 0);
ToggleSweetAssist = read_spvar( 0, 1, 0);
ToggleSteadyAim = read_spvar( 0, 1, 0);
holdbreath_onoff = read_spvar( 0, 1, 0);
rapidFire = read_spvar( 0, 1, 0); // 4
akimboRF = read_spvar( 0, 2, 0); // 5
dropShotmw2 = read_spvar( 0, 1, 0); // 6
snakeShotmw2 = read_spvar( 0, 1, 0); // 7
silentScope = read_spvar( 0, 1, 0); // 8
bunnyHop = read_spvar( 0, 1, 0); // 8
vmSpeed = read_spvar( 0, 3, 0); // 9
buttonLayouts = read_spvar( 0, 21, 0); // 10
stickLayouts = read_spvar( 0, 3, 0); // 11
rapidQT = read_spvar( 0, 1, 0); // 12
akimboQT = read_spvar( 0, 1, 0); // 13
dropShotQT = read_spvar( 0, 1, 0); // 14
snakeShotQT = read_spvar( 0, 1, 0); // 15
silentShotQT = read_spvar( 0, 1, 0); // 16
verticalStrength = read_spvar( -99, 99, 0); // 17
horizontalStrength = read_spvar( -99, 99, 0); // 18
verticalStrengthP = read_spvar( -99, 99, 0); // 19
horizontalStrengthP = read_spvar( -99, 99, 0); // 20
doubleStrengthTime = read_spvar( 0, 5000, 0); // 21
deadzoneValue = read_spvar( 0, 20, 4); // 22
aimAssistCurveType = read_spvar( 0, 1, 0); // 23
radiusSize = read_spvar( 0, 99, 0); // 24
speedAngle = read_spvar( 0, 99, 0); // 25
aimAssistBoost = read_spvar( 0, 1, 0); // 26
fireRadius = read_spvar( 0, 99, 0); // 27
fireSpeed = read_spvar( 0, 99, 0); // 28
longRange = read_spvar( 0, 1, 0); // 29
longRangeRadius = read_spvar( 0, 99, 0); // 30
ceorinShape = read_spvar( 0, 4, 0);
rotationalSize = read_spvar( 0, 99, 0); // 31
rotationalSpeed = read_spvar( 0, 99, 0); // 32
AimAssistOpSize = read_spvar( 0, 99, 0); // 27
AimAssistOpTime = read_spvar( 0, 99, 0); // 27
HIPBoost = read_spvar( 0, 99, 0); // 27
polar_aasist_radius = read_spvar( 0, 99, 0); // 27
polar_aasist_steps = read_spvar( 0, 99, 0); // 27
TrackerStrength = read_spvar( 0, 99, 0); // 27
TrackerSpeed = read_spvar( 0, 99, 0); // 27
DeadZoneSize = read_spvar( 0, 99, 0); // 27
RADIUS = read_spvar( 0, 99, 0); //
27
ACTIVE_TRACKING = read_spvar( 0, 99, 0); // 27
FractioN = read_spvar( 0, 999, 0); // 27
ANGLE = read_spvar( 0, 999, 0); //
27
AIM_SMOOTHING_FACTOR = read_spvar( 0, 99, 0); // 27
SteadyAimResolution = read_spvar( 0, 99, 0); // 27
rateOfFire = read_spvar( 0, 25, 1); // 33
akimboRateOfFire = read_spvar( 0, 25, 1); // 34
ActivateHoldBtnIdx[0] = read_spvar(0,14,0);
ActivateHoldBtnIdx[1] = read_spvar(0,14,0);
ActivateHoldBtnIdx[2] = read_spvar(0,14,0);
ActivateHoldBtnIdx[3] = read_spvar(0,14,0);
ActivateHoldBtnIdx[4] = read_spvar(0,14,0);
ActivateHoldBtnIdx[5] = read_spvar(0,14,0);
ActivatePressBtnIdx[0] = read_spvar(0,19,0);
ActivatePressBtnIdx[1] = read_spvar(0,19,0);
ActivatePressBtnIdx[2] = read_spvar(0,19,0);
ActivatePressBtnIdx[3] = read_spvar(0,19,0);
ActivatePressBtnIdx[4] = read_spvar(0,19,0);
ActivatePressBtnIdx[5] = read_spvar(0,19,0);
standardARFireType = read_spvar(0, 2,0);
taylorFireType = read_spvar(0, 3,0);
rotationalFireType = read_spvar(0, 3,0);
rapidFireType = read_spvar(0, 3,0);
snakeShotActivationmw2 = read_spvar(0, 4,0);
dropShotmw2FireType = read_spvar(0, 4,0);
blockRumble = read_spvar(0, 1,0);
swapPS4Btns = read_spvar(0, 1,0);
}
else {
antiRecoilBasic = 0; // 0
antiRecoilPolar = 0; // 1
taylorAssist = 0; // 2
rotationalAA = 0; // 3
SOFTAIM = 0;
polar_aim_assist_onoff = 0;
ToggleTracker = 0;
ToggleSweetAssist = 0;
ToggleSteadyAim = 0;
holdbreath_onoff = 0;
rapidFire = 0; // 4
akimboRF = 0; // 5
dropShotmw2 = 0; // 6
snakeShotmw2 = 0; // 7
silentScope = 0; // 8
bunnyHop = 0; // 7
vmSpeed = 0; // 9
buttonLayouts = 0; // 10
stickLayouts = 0; // 11
rapidQT = 0; // 12
akimboQT = 0; // 13
dropShotQT = 0; // 14
snakeShotQT = 0; // 15
silentShotQT = 0; // 16
verticalStrength = 0; // 17
horizontalStrength = 0; // 18
verticalStrengthP = 0; // 19
horizontalStrengthP = 0; // 20
doubleStrengthTime = 400; // 21
deadzoneValue = 4; // 22
aimAssistCurveType = 0; // 23
radiusSize = 12; // 24
speedAngle = 12; // 25
aimAssistBoost = 0; // 26
fireRadius = 5; // 27
fireSpeed = 5; // 28
longRange = 0; // 29
longRangeRadius = 5; // 30
ceorinShape = 0;
rotationalSize = 10; // 31
rotationalSpeed = 99; // 32
AimAssistOpSize = 12; // 31
AimAssistOpTime = 18; // 32
HIPBoost = 10; // 33
polar_aasist_radius = 12;
polar_aasist_steps = 18;
TrackerStrength = 12; // 33
TrackerSpeed = 34;
DeadZoneSize = 5;
RADIUS = 12;
ACTIVE_TRACKING = 6;
FractioN = 15;
ANGLE = 255;
AIM_SMOOTHING_FACTOR = 20;
SteadyAimResolution = 6;
rateOfFire = 1; // 33
akimboRateOfFire = 1; // 34
ActivateHoldBtnIdx[0] = 0;
ActivateHoldBtnIdx[1] = 0;
ActivateHoldBtnIdx[2] = 0;
ActivateHoldBtnIdx[3] = 0;
ActivateHoldBtnIdx[4] = 0;
ActivateHoldBtnIdx[5] = 0;
ActivatePressBtnIdx[0] = 0;
ActivatePressBtnIdx[1] = 0;
ActivatePressBtnIdx[2] = 0;
ActivatePressBtnIdx[3] = 0;
ActivatePressBtnIdx[4] = 0;
ActivatePressBtnIdx[5] = 0;
standardARFireType = 0;
taylorFireType = 0;
rotationalFireType = 0;
rapidFireType = 2;
snakeShotActivationmw2 = 0;
dropShotmw2FireType = 2;
blockRumble = 0;
swapPS4Btns = 0;
}
} // end of LOAD FUNCTION
function Save(){
reset_spvar(); //
save_spvar(1,0, 1); //
save_spvar(antiRecoilBasic , 0, 2); // 0
save_spvar(antiRecoilPolar , 0, 2); // 1
save_spvar(taylorAssist , 0, 1); // 2
save_spvar(rotationalAA , 0, 1); // 3
save_spvar(SOFTAIM , 0, 1); // 3
save_spvar(polar_aim_assist_onoff , 0, 5); // 3
save_spvar(ToggleTracker , 0, 1); // 3
save_spvar(ToggleSweetAssist , 0, 1); // 3
save_spvar(ToggleSteadyAim , 0, 1); // 3
save_spvar(holdbreath_onoff , 0, 1); // 3
save_spvar(rapidFire , 0, 1); // 4
save_spvar(akimboRF , 0, 2); // 5
save_spvar(dropShotmw2 , 0, 1); // 6
save_spvar(snakeShotmw2 , 0, 1); // 7
save_spvar(silentScope , 0, 1); // 8
save_spvar(bunnyHop , 0, 1); // 8
save_spvar(vmSpeed , 0, 3); // 9
save_spvar(buttonLayouts , 0, 21); // 10
save_spvar(stickLayouts , 0, 3); // 11
save_spvar(rapidQT , 0, 1); // 12
save_spvar(akimboQT , 0, 1); // 13
save_spvar(dropShotQT , 0, 1); // 14
save_spvar(snakeShotQT , 0, 1); // 15
save_spvar(silentShotQT , 0, 1); // 16
save_spvar(verticalStrength , -99, 99); // 17
save_spvar(horizontalStrength , -99, 99); // 18
save_spvar(verticalStrengthP , -99, 99); // 19
save_spvar(horizontalStrengthP , -99, 99); // 20
save_spvar(doubleStrengthTime , 0, 5000); // 21
save_spvar(deadzoneValue , 0, 20); // 22
save_spvar(aimAssistCurveType , 0, 1); // 23
save_spvar(radiusSize , 0, 99); // 24
save_spvar(speedAngle , 0, 99); // 25
save_spvar(aimAssistBoost , 0, 1); // 26
save_spvar(fireRadius , 0, 99); // 27
save_spvar(fireSpeed , 0, 99); // 28
save_spvar(longRange , 0, 1); // 29
save_spvar(longRangeRadius , 0, 99); // 30
save_spvar(ceorinShape , 0, 4);
save_spvar(rotationalSize , 0, 99); // 31
save_spvar(rotationalSpeed , 0, 99); // 32
save_spvar(AimAssistOpSize , 0, 99);
save_spvar(AimAssistOpTime , 0, 99);
save_spvar(HIPBoost , 0, 99);
save_spvar(polar_aasist_radius , 0, 99);
save_spvar(polar_aasist_steps , 0, 99);
save_spvar(TrackerStrength , 0, 99);
save_spvar(TrackerSpeed , 0, 99);
save_spvar(DeadZoneSize , 0, 99);
save_spvar(RADIUS , 0, 99);
save_spvar(ACTIVE_TRACKING , 0, 99);
save_spvar(FractioN , 0, 999);
save_spvar(ANGLE , 0, 999);
save_spvar(AIM_SMOOTHING_FACTOR , 0, 99);
save_spvar(SteadyAimResolution , 0, 99);
save_spvar(rateOfFire , 0, 25); // 33
save_spvar(akimboRateOfFire , 0, 25); // 34
save_spvar(ActivateHoldBtnIdx[0] ,0,14);
save_spvar(ActivateHoldBtnIdx[1] ,0,14);
save_spvar(ActivateHoldBtnIdx[2] ,0,14);
save_spvar(ActivateHoldBtnIdx[3] ,0,14);
save_spvar(ActivateHoldBtnIdx[4] ,0,14);
save_spvar(ActivateHoldBtnIdx[5] ,0,14);
save_spvar(ActivatePressBtnIdx[0] ,0,19);
save_spvar(ActivatePressBtnIdx[1] ,0,19);
save_spvar(ActivatePressBtnIdx[2] ,0,19);
save_spvar(ActivatePressBtnIdx[3] ,0,19);
save_spvar(ActivatePressBtnIdx[4] ,0,19);
save_spvar(ActivatePressBtnIdx[5] ,0,19);
save_spvar(standardARFireType ,0, 2);
save_spvar(taylorFireType ,0, 3);
save_spvar(rotationalFireType ,0, 3);
save_spvar(rapidFireType ,0, 3);
save_spvar(snakeShotActivationmw2 ,0, 4);
save_spvar(dropShotmw2FireType ,0, 4);
save_spvar(blockRumble ,0, 1);
save_spvar(swapPS4Btns ,0, 1);
}// end of SAVE FUNCTION
function reset_spvar() {
spvar_current_slot = SPVAR_1; // Change this to say where it's safe to start
storing data
spvar_current_bit = 0; // Should always be 0, unless you're using part of the
first SPVAR in which case you should also change the next line to include the value
you are storing in the bits you are using
spvar_current_value = 0;
}
// ------ DO NOT TOUCH ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING!
------
int spvar_current_bit, // Variable used to keep track of the next available
bit
spvar_current_slot, // Variable used to keep track of the currently
used SPVAR slot
spvar_current_value, // Variable used to keep track of the current value
with all the bits from the previous variables saved in the current SPVAR
spvar_tmp, // Variable used temporarily during the various
calculation steps
spvar_bits; // Variable used to keep track of the number of bits
required to represent the currently saved/loaded variable
// Function used to count the number of bits used by the given value
function get_bit_count(val) {
spvar_tmp = 0; // We need to start at 0, we use spvar_tmp here as we need to
track the bits during our loop below
while (val) { // Loop while val is anything but 0
spvar_tmp++; // Increment the bit count by 1
val = abs(val >> 1); // Shift the value down 1 bit, once we have no more
bits set this will result in 0, unless the value is negative - in which case this
will be endless, we do abs here to make it always
}
return spvar_tmp;
}
// Function used to count the number of bits used by 2 given values
function get_bit_count2(val1, val2) {
spvar_tmp = max(get_bit_count(val1), get_bit_count(val2)); // Get the highest
bit count required for either min or max
if (is_signed2(val1, val2)) { // Check if we need to know if the value is
negative or not
spvar_tmp++; // If we need to track if the saved value is negative, we need
1 bit for that specifically - the others are used to store the actual value
}
return spvar_tmp;
}
// Function used to determine if either of 2 given values is negative
function is_signed2(val1, val2) { return val1 < 0 || val2 < 0; }
// Function used to generate a bitmask for the sign bit, this will always be the
highest bit in the range we're requesting it for, to do that - we need to start
with the lowest bit set and move it up the number of steps there is between 1 and
the bits we need, this needs to be a maximum of 31 but can never be negative
function make_sign(bits) { return 1 << clamp(bits - 1, 0, 31); }
// Function used to generate a full bitmask (essentially all bits set up to and
including the number of bits given)
function make_full_mask(bits) {
if (bits == 32) { // If we're wanting a bitmask for all bits, we can simply
return -1 (which is all bits set to 1)
return -1;
}
return 0x7FFFFFFF >> (31 - bits); // What we do here is basically take a value
with all bits except the highest set and shift them down as many times as we need
to get a mask that fits the bit count we're looking for
}
// Function used to generate a bitmask for just the bits required for the value
part of a signed range, this means all the bits below the sign bit
function make_sign_mask(bits) { return make_full_mask(bits - 1); }
// Function used to pack a value that has potential for being negative in a way
that we use the least number of bits we really need to represent the value
function pack_i(val, bits) {
if (val < 0) { // Check if we have a negative value, if so - handle it
accordingly
return (abs(val) & make_sign_mask(bits)) | make_sign(bits); // Get the
positive version of the value and keep the bits that are within range of what we're
doing and add the sign bit since we have a negative value and return the result
}
return val & make_sign_mask(bits); // Get the bits that are within our range
}
// Function used to unpack (restore) a value that has potential for being negative,
essentially reversing what pack_i does above
function unpack_i(val, bits) {
if (val & make_sign(bits)) { // Check if the stored value is supposed to ve
negative
return 0 - (val & make_sign_mask(bits)); // Retrieve the stored positive
value and subtract it from 0 (resulting in the same value except negative), return
the result
}
return val & make_sign_mask(bits); // Retrieve the stored positive value and
return it
}
// Function used to read the value of a SPVAR without any limits
function read_spvar_slot(slot) { return get_pvar(slot, 0x80000000, 0x7FFFFFFF,
0); }
// Function used to save your value in the SPVARs, this is the function you'll be
calling when saving a value. You need to provide the value to save aswell as the
range (minimum and maximum value, this is how we determine how many bits to use
when saving this value)
function save_spvar(val, min, max) {
spvar_bits = get_bit_count2(min, max); // Set spvar_bits to the number of bits
we need for this range
val = clamp(val, min, max); // Make sure the value is within our defined range
to begin with
// Return the retrieved value to the user since it's within the expected range
return spvar_current_value;
} #��������������#��������������