How to do Teleport (Really nice way c++)

05/11/2014 12:06 v1suaL#1
here im releasing my function, you can save 100 coordinates or more, w/e you want and then teleport from point to point.. : ) if you don't understand the code then don't ask stupid questions.

btw i created a "Walk-Bot" with this way ^^

Code:
#include <windows.h>
#include <stdio.h>
/*Creditz goes to ZeaS*/

DWORD *PlayerIsInamge = (DWORD*)0xPLAYER_POINTER;

int ArrayX[100];
int ArrayY[100];
int ArrayZ[100];

int curx, cury, curz;
int ArraySwitch=0, ArraySwitch2=0;

DWORD X, Y, Z;

DWORD WINAPI SaveTeleportCoor(LPVOID);
DWORD WINAPI ArrayTeleport(LPVOID);

BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved)
{
   if(dwReason == DLL_PROCESS_ATTACH)
   {
	  CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)SaveTeleportCoor, NULL, NULL, NULL);
	  CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)SetTeleportCoor, NULL, NULL, NULL);
   }
   return TRUE;
}

DWORD WINAPI SetTeleportCoor(LPVOID)
{
   for(;;)
   {
	  if(*PlayerIsIngame)
	  {
		 X = ( /*Player Pointer*/ );
	 X = *(DWORD*)X;
	 X += 0x18c; //Offset X
	 curx = *(int*)X;

	 Y = ( /*Player Pointer*/ );
	 Y = *(DWORD*)ab;
	 Y += 0x194; //Offset Y
	 cury = *(int*)Y;

	 Z = ( /*Player Pointer*/ );
		 Z = *(DWORD*)Z;
 	 Z += 0x190; //Offset Z
		 curz = *(int*)Z;

		 if(GetAsyncKeyState(VK_NUMPAD8)&1) // Saving Current Possition
		 {

		ArrayX[ArraySwitch] = curx;
		ArrayY[ArraySwitch] = cury;
		ArrayZ[ArraySwitch] = curz;
		ArraySwitch++;
		Sleep(2);

	 }
	  }
   }
   return 0;
}

DWORD WINAPI ArrayTeleport(LPVOID)
{
   for(;;)
   {
	  if(GetAsyncKeyState(VK_NUMPAD1)&1) //Teleport Forward
	  {
		
		 DWORD *first = (DWORD*)X;
	 *(int*)X = ArrayX[ArraySwitch2];
	 DWORD *secound = (DWORD*)Y;
	 *(int*)Y = ArrayY[ArraySwitch2];
	 DWORD *third = (DWORD*)Z;
	 *(int*)Z = ArrayZ[ArraySwitch2];
	 Sleep(1);
 	 ArraySwitch2++;

	  }
	  if(GetAsyncKeyState(VK_NUMPAD2)&1) //Teleport Backward
	  {
			
		 ArraySwitch2--;
		
	 DWORD *first = (DWORD*)X;
	 *(int*)X = ArrayX[ArraySwitch2];
	 DWORD *secound = (DWORD*)Y;
	 *(int*)Y = ArrayY[ArraySwitch2];
	 DWORD *third = (DWORD*)Z;
	 *(int*)Z = ArrayZ[ArraySwitch2];
	 Sleep(1);
	  }
	  Sleep(21);
   }
   return 0;
}
Please thank me :D
05/11/2014 13:20 Padmak#2
No.

[Only registered and activated users can see links. Click Here To Register...]

Padmak
05/11/2014 14:03 v1suaL#3
What no?
05/11/2014 15:49 Logtetsch#4
Bullshit. This code is something like - "ahh, the one part I want to code in C and the other part in C++". Probably I would say it's copy and paste.
I agree Padmak - No.
05/11/2014 16:37 v1suaL#5
Quote:
Originally Posted by Logtetsch View Post
Bullshit. This code is something like - "ahh, the one part I want to code in C and the other part in C++". Probably I would say it's copy and paste.
I agree Padmak - No.
It's not copy n paste, if you want i can you show some of my clean detours
05/11/2014 21:44 +Yazzn#6
Either way it's crap.
05/11/2014 23:49 MrSm!th#7
I used this code in WoW and it didn't work.
The game also crashed when I wanted to add 101 coordinates.
Strange.
It's just a vague assumption, but this may be due to the fact that this code sucks and you didn't even mention the game it was written for.

Quote:
Bullshit. This code is something like - "ahh, the one part I want to code in C and the other part in C++". Probably I would say it's copy and paste.
I agree Padmak - No.
Hm. I don't see even one line of C++ code.