Untitled

 avatar
user_5811307
plain_text
a month ago
3.5 kB
3
Indexable
Never
#define NOMINMAX
#include "memory.h"	
#include "thread"
#include <iostream>
#include <typeinfo>
#include <vector>
#include "SFML/Graphics.hpp"  

using namespace std;

int entetylist = 0x16E1C70;
int localplayeraddr = 0x16D4F48;
int offcet_health = 0x32C;
int offcetx = 0xCD8;
int offcety = 0xCDC;
int offcetteam = 0x3bf;

int health, team, localteam;
int posx, posy;


uintptr_t Player;
uintptr_t localPlayer;

int numers = 1;

int main()
{
	sf::RenderWindow window(sf::VideoMode(500, 500), "SFML window");
	window.setFramerateLimit(45);

	bool a = 0; // show team


	sf::CircleShape localplayermap;

	sf::CircleShape enemy1;
	sf::CircleShape enemy2;
	sf::CircleShape enemy3;
	sf::CircleShape enemy4;
	sf::CircleShape enemy5;

	sf::CircleShape xxx;
	xxx.setRadius(15);
	xxx.setFillColor(sf::Color(255, 0, 0));
	xxx.setPosition(100, 100);

	enemy1.setRadius(15);
	enemy2.setRadius(15);
	enemy3.setRadius(15);
	enemy4.setRadius(15);
	enemy5.setRadius(15);
	localplayermap.setRadius(15);
	

	localplayermap.setFillColor(sf::Color(100, 250, 50));
	enemy1.setFillColor(sf::Color(255, 0, 0));
	enemy2.setFillColor(sf::Color(255, 0, 0));
	enemy3.setFillColor(sf::Color(255, 0, 0));
	enemy4.setFillColor(sf::Color(255, 0, 0));
	enemy5.setFillColor(sf::Color(255, 0, 0));

	
	while (true)
	{
		std::this_thread::sleep_for(std::chrono::milliseconds(100));



		localPlayer = VARS::memRead<uintptr_t>(VARS::baseAddress + localplayeraddr);

		



		system("cls");

		for (int i = 0; i <= 64; i++)
		{


			Player = VARS::memRead<uintptr_t>(VARS::baseAddress + entetylist + (i * 0x08));

			localteam = VARS::memRead<uintptr_t>(localPlayer + offcetteam);

			health = VARS::memRead<int>(Player + offcet_health);
			posx = (VARS::memRead<float>(Player + offcetx))/10;
			posy = (VARS::memRead<float>(Player + offcety))/10;
			team = VARS::memRead<int>(Player + offcetteam);

			if (localteam != team and (health <= 100 and health > 0) and (team == 2 or team == 3))
			{
				if (a == 0)
				{
					std::cout << i << " " << "team: " << team << " health: " << health << " x: " << posx << " y: " << posy<<" " << numers <<std::endl;
					numers++;
					
				}
			}



			
			

			if (numers == 1)
			{
				enemy1.setPosition(posx, posy);
			}
			

			if (numers == 2)
			{
				enemy2.setPosition(posx, posy);
			}
			
			if (numers == 3)
			{
				enemy3.setPosition(posx, posy);
			}
			
			if (numers == 4)
			{
				enemy4.setPosition(posx, posy);
			}
			
			if (numers == 5)
			{
				enemy5.setPosition(posx, posy);
			}
			
		}
		numers = 1;

		// сделать массив структур 
		// структура описывает болваника 
		// поля - здоровье и координаты

		

		int localplayerX = ((VARS::memRead<float>(localPlayer + offcetx)) / 10 * -1) + 200;
		int localplayerY = ((VARS::memRead<float>(localPlayer + offcety)) / 10 * -1) + 200;
		std::cout << localplayerX << " " << localplayerY << std::endl;

		



		localplayermap.setPosition(localplayerX, localplayerY);
		sf::Event event;
		while (window.pollEvent(event))
		{
			if (event.type == sf::Event::Closed)
				window.close();
		}





		window.draw(localplayermap);

		window.draw(enemy1);
		window.draw(enemy2);
		window.draw(enemy3);
		window.draw(enemy4);
		window.draw(enemy5);

		//window.clear();

		window.display();
		window.clear();





	
	}
	return 0;
}
Leave a Comment