TalkingLianTian Script in C++

Posts 1–15 of 20 · Page 1 of 2
LianTian Script in C++

months ago i converted liantian's logi script into c++. Now its useless for me as
1. the script is for rapid single fire which is patched
2. i made a perfect script for full auto for every weapons

Im releasing the c++ source code of liantian's script here for everyone to study.
Hope this helps you






Calculate.cpp
Code:
#include "stdafx.h"



using namespace std;



bool weapon_speed_mode = true;

bool obfs_mode = true;

float interval_ratio = 0.75;

int random_seed = 1;


float target_sensitivity = 50;
float scope_sensitivity = 50;
float scope4x_sensitivity = 50;

float target_scale;
float scope_scale;
float scope4x_scale;

float shoot_duration;

recoil_values myrecoilvalue;




float convert_sens(float unconvertedSens) {


	return 0.002f * pow(10, unconvertedSens / 50);

}


float calc_sens_scale(float sensitivity) {


	return convert_sens(sensitivity) / convert_sens(50);
}





recoil_values recoil_value(recoil_values rv) {

	Scope _mode = currentscope;

	int step = (int)(floor(rv._duration / 100)) + 1;

	if (step > 40)	step = 40;
			
	float weapon_recoil = getRecoil(rv._weapon, step);

	

	int weapon_speed = 30;

	if (weapon_speed_mode) {
		weapon_speed = getSpeed(rv._weapon);
	}

	


	int weapon_intervals = weapon_speed;

	if (obfs_mode) {

		float coefficient =  interval_ratio * (1 + random_seed * randomFloat(2.0,0.1)) ;


		//msgboxstring(to_string(coefficient));


		weapon_intervals = floor(coefficient  * weapon_speed);
	}

	


	float recoil_recovery = weapon_recoil * weapon_intervals / 100;

	

	target_scale = calc_sens_scale(target_sensitivity);
	scope_scale = calc_sens_scale(scope_sensitivity);
	scope4x_scale = calc_sens_scale(scope4x_sensitivity);



	if (GetAsyncKeyState(VK_RBUTTON)){

		recoil_recovery = recoil_recovery / target_scale;
	}
	else if (currentscope == X1) {

		recoil_recovery = recoil_recovery / scope_scale;

	}else if(currentscope == X4){

		recoil_recovery = recoil_recovery / scope4x_scale;
	}


	recoil_recovery = floor(recoil_recovery);


	recoil_values returnvalue;

	returnvalue.weapon_intervals = weapon_intervals;
	returnvalue.recoil_recovery = recoil_recovery;


	//msgboxstring(to_string(returnvalue.weapon_intervals));
	

	return returnvalue;


}


recoiltable.cpp
Code:
#include "stdafx.h"




using namespace std;



namespace recoilTABLE {


	float akm_basic[40] = { 23.7,23.7,23.7,23.7,23.7,23.7,23.7,23.7,23.7,23.7,23.7,28,28,28,28,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7,29.7 };

	float akm_quadruple[40] = { 66.7,66.7,66.7,66.7,66.7,66.7,66.7,66.7,66.7,66.7,66.7,123.3,123.3,123.3,123.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3,93.3 };

	int akm_speed = 100;




	float m16a4_basic[41] = { 25,25,25,29,33,33,32,33,32,32,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30 };

	float m16a4_quadruple[40] = { 86.7,86.7,86.7,86.7,86.7,86.7,86.7,150,150,150,150,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120 };

	int m16a4_speed = 75;



	float m416_basic[41] = { 21,21,21,21,21,21,21,21,21,23,23,24,23,24,25,25,26,27,27,32,31,31,31,31,31,31,31,32,32,32,35,35,35,35,35,35,35,35,35,35,35 };

	float m416_quadruple[40] = { 86.7,86.7,86.7,86.7,86.7,86.7,86.7,150,150,150,150,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7,96.7 };

	int m416_speed = 86;








}





float getRecoil(Weapon w, int i) {

	if (w == AKM)
	{
		if (currentscope == X1) {

			return recoilTABLE::akm_basic[i];
		}

		if (currentscope == X4) {

			return recoilTABLE::akm_quadruple[i];
		}


	}
	else if (w == M16A4) {

		if (currentscope == X1) {

			return recoilTABLE::m16a4_basic[i];
		}

		if (currentscope == X4) {

			return recoilTABLE::m16a4_quadruple[i];
		}



	}
	else if (w = M416) {



		if (currentscope == X1) {

			return recoilTABLE::m416_basic[i];
		}

		if (currentscope == X4) {

			return recoilTABLE::m416_quadruple[i];
		}



	}





}





int getSpeed(Weapon w) {

	if (w == AKM)
	{
		return recoilTABLE::akm_speed;
	}
	else if (w == M16A4) {

		return recoilTABLE::m16a4_speed;

	}
	else if (w == M416) {

		return recoilTABLE::m416_speed;
	}







}



void initrecoil() {

	currentweapon = NONE;

	currentscope = X1;

	



}

main part:
Code:
			if (GetAsyncKeyState(VK_LBUTTON)) {    //mouse check


				if (currentweapon == NONE) {

					

					do {
						keydown(0x19);
						Sleep(16);
						keyup(0x19);

					} while (GetAsyncKeyState(VK_LBUTTON));


					

				}
				else {

					shoot_duration = 0.0;

					do {

						myrecoilvalue._weapon = currentweapon;
						myrecoilvalue._duration = shoot_duration;
						recoil_values rvs = recoil_value(myrecoilvalue);
						keydown(0x19);
						Sleep(16);
						keyup(0x19);
						mouse_event(MOUSEEVENTF_MOVE, 0, rvs.recoil_recovery, 0, 0);
						Sleep(rvs.weapon_intervals);
						shoot_duration = shoot_duration + rvs.weapon_intervals;
						
						



					} while (GetAsyncKeyState(VK_LBUTTON));






				}








			}	 //mouse check

I will post the important remaining part if i forget
//approved and changed to right topic
recoil_values:
Code:
struct recoil_values {

    Weapon _weapon;

    float _duration;

    int weapon_intervals;

    int recoil_recovery;
};
global.h
Code:
enum Weapon {

    NONE,
    AKM,
    M16A4,
    M416



};


enum Scope {

    X1,
    X4




};


extern Weapon currentweapon;

extern Scope currentscope;



extern string Weapontostring();
extern string Scopetostring();
What u mean by saying "rapid single fire patched". They have changed smth? Coz it still works for me

And what about your new script. Is it privat or u can share it to test or smth else?
Quote Originally Posted by Raynek View Post
What u mean by saying "rapid single fire patched". They have changed smth? Coz it still works for me

And what about your new script. Is it privat or u can share it to test or smth else?
rapid fire is patched the gun slutters. and yes its private, i sell it
do you accept crypto
Quote Originally Posted by daniel1233 View Post
do you accept crypto
i dont have bitcoin
Quote Originally Posted by ahiddenmessi View Post
rapid fire is patched the gun slutters. and yes its private, i sell it
What is the price? Is it for all weapons?
Hi thnx for sharing .
but how to use it ?
and can you make a steps ?
I interested for rapid fire .
But this is working? because they changed the bullet direction now you need to add new direction for the bullets.

For example this: m416_basic 21,21,21,21,21,21,21,21,21,23,23,24,23,24,25,25,26 ,27,27,32,31,31,31,31,31,31,31,32,32,32,35,35,35,3 5,35,35,35,35,35,35,35 };
Quote Originally Posted by lalala312 View Post
But this is working? because they changed the bullet direction now you need to add new direction for the bullets.

For example this: m416_basic 21,21,21,21,21,21,21,21,21,23,23,24,23,24,25,25,26 ,27,27,32,31,31,31,31,31,31,31,32,32,32,35,35,35,3 5,35,35,35,35,35,35,35 };

its just source code for studying purpose. u can do whatever you like with the code

- - - Updated - - -

Quote Originally Posted by koshinator View Post
What is the price? Is it for all weapons?
selling is not allowed on this forum its better to add me. and no its not for all weapons. airdrop weapons and dp28 are missed (can be made easily )

spent so much time to make it work for auto weapons. add my dikssoddd i have bunch of vids
Quote Originally Posted by lalala312 View Post
But this is working? because they changed the bullet direction now you need to add new direction for the bullets.

For example this: m416_basic 21,21,21,21,21,21,21,21,21,23,23,24,23,24,25,25,26 ,27,27,32,31,31,31,31,31,31,31,32,32,32,35,35,35,3 5,35,35,35,35,35,35,35 };
do u know new values?
Would like to know more about the new values aswell. Somebody can share them or help with?
guys if i want to change 4x scope sens which parts i should change?
Posts 1–15 of 20 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us