basa

 avatar
user_5811307
plain_text
a month ago
3.2 kB
4
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 = 0;

int main()
{
	sf::RenderWindow window(sf::VideoMode(1000, 1000), "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;


	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));


		window.clear();
		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) +200;
			posy = ((VARS::memRead<float>(Player + offcety)) / 10) +200;
			team = VARS::memRead<int>(Player + offcetteam);

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

				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 = 0;

		

		int localplayerX = ((VARS::memRead<float>(localPlayer + offcetx)) / 10) + 200;
		int localplayerY = ((VARS::memRead<float>(localPlayer + offcety)) / 10) + 200;
		

		



		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.display();
		





	
	}
	return 0;
}
Leave a Comment