Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 01:18

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



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

Discussion on How to do Teleport (Really nice way c++) within the C/C++ forum part of the Coders Den category.

Closed Thread
 
Old   #1
 
v1suaL's Avatar
 
elite*gold: 0
Join Date: May 2014
Posts: 66
Received Thanks: 13
How to do Teleport (Really nice way c++)

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
v1suaL is offline  
Old 05/11/2014, 13:20   #2
 
Padmak's Avatar
 
elite*gold: 58
Join Date: Jun 2008
Posts: 2,311
Received Thanks: 8,420
No.



Padmak
Padmak is offline  
Old 05/11/2014, 14:03   #3
 
v1suaL's Avatar
 
elite*gold: 0
Join Date: May 2014
Posts: 66
Received Thanks: 13
What no?
v1suaL is offline  
Old 05/11/2014, 15:49   #4
 
Logtetsch's Avatar
 
elite*gold: 192
Join Date: May 2009
Posts: 2,227
Received Thanks: 3,262
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.
Logtetsch is offline  
Old 05/11/2014, 16:37   #5
 
v1suaL's Avatar
 
elite*gold: 0
Join Date: May 2014
Posts: 66
Received Thanks: 13
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
v1suaL is offline  
Old 05/11/2014, 21:44   #6



 
+Yazzn's Avatar
 
elite*gold: 420
Join Date: Jan 2012
Posts: 1,030
Received Thanks: 981
Either way it's ****.
+Yazzn is offline  
Old 05/11/2014, 23:49   #7


 
MrSm!th's Avatar
 
elite*gold: 7110
Join Date: Jun 2009
Posts: 28,904
Received Thanks: 25,394
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.
MrSm!th is offline  
Thanks
1 User
Closed Thread


Similar Threads Similar Threads
SilverRoad 80Cap server OPEN !! Nice GM'S Nice events NICE EXP!
10/12/2012 - SRO PServer Advertising - 60 Replies
http://www7.pic-upload.de/27.06.12/sngfh89irdu.png Websites Official Website :SilversRoaD Info: *Dedicated 24/7*
[Scripts] DayZ [Ammo Crates | Invisible | Teleport | Map Teleport | Kill All]
08/05/2012 - DayZ - 66 Replies
.



All times are GMT +2. The time now is 01:18.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.