Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

TeleportSystem+Some Source etc..

Master Summoner
Joined
Feb 8, 2011
Messages
506
Reaction score
79
Hello der comunity here is my release
WARINING:so first dont use it on your online server bacause there is no admin check for the commands !
So First we go to TeleportSystem:
TeleportSystem works on command so the command's
1./fort
2./Naroo
3./cargo
4./mine
5./bird
6./cop
7./d1
8./d3
9./valley
10./emok
Thats all atm there
Source:
Code:
if (command == "/emok")
		{
			int Coords[2];

			Coords[0] = 339772; //x point
			Coords[1] = 257384; //y point

			int nMap = 0; //nMap?=Map
			
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);         

		}
		else 
		  
		  if (command == "/fort")
		{
			int Coords[2];

			Coords[0] = 267634; //x point
			Coords[1] = 243008; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		  }
		  else
		  if (command == "/Naroo")
		{
			int Coords[2];

			Coords[0] = 257303; //x point
			Coords[1] = 258710; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		  }
		  else
		  if (command == "/cargo")
		{
			int Coords[2];

			Coords[0] = 264931; //x point
			Coords[1] = 262029; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		  }

		  else
		  if (command == "/mine")
		{
			int Coords[2];

			Coords[0] = 265642; //x point
			Coords[1] = 285434; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		  }
		  else
		  if (command == "/bird")
		{
			int Coords[2];

			Coords[0] = 256442; //x point
			Coords[1] = 288522; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		  }
		  else
		  if (command == "/cop")
		{
			int Coords[2];

			Coords[0] = 232828; //x point
			Coords[1] = 294721; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		  }

		  else

		 if (command == "/d1")
		{
			int Coords[2];

			Coords[0] = 50684; //x point
			Coords[1] = 34099; //y point

			int nMap = 2; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1); 
		 }
		
		 else
		 if (command == "/d3")
		{
			int Coords[2];

			Coords[0] = 281325; //x point
			Coords[1] = 249715; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		 }
		 else
		 if (command == "/valley")
		{
			int Coords[2];

			Coords[0] = 335622; //x point
			Coords[1] = 340432; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		 }
Okey now the 2nd command in the files is the nMap command
print the nMap value on the mainsvrt
command:/MapPoint
Source:
Code:
if (command == "/MapPoint")

			{
				
			int nMap = ((int*)thispointer)[79]; //<-- that is the location of the players nMap value
			
			ConsoleWriteBlue("nMap Print [%d]", nMap);//<--- that prints the value of nMap on MainSvrt
			}
Okey now to next command included here is the :/MyInfo
it prints the:level,pid,type,curhp,curmp,speedup & Admin on the MainSvrt console
Source:
Code:
if (command == "/MyInfo")
		{
			
			int Level = ((int*)thispointer)[15]; //<-- that is the level of your caracter
			int PID = ((int*)thispointer)[7]; //< PID pointer
			int Type = ((int*)thispointer)[6]; //<Type pointer idk if works
			int CurHp = ((int*)thispointer)[68]; //CurHp Offset and pointer
			int CurMp = ((int*)thispointer)[69]; //CurMp The same ^
			int SpeedUp = ((int*)thispointer)[65]; //Is the SpeedUp pointer
			int Admin = ((int*)thispointer)[114];
			ConsoleWriteBlue("Your level is: [%d]", Level);//<--- that prints the value of level
			ConsoleWriteBlue("Your Pid is: [%d]", PID);//<--- that prints the value of PID
		    ConsoleWriteBlue("Your Type is: [%d]", Type);//<--- that prints the value of Type idk if its right
			ConsoleWriteBlue("Your CurHp is: [%d]", CurHp);//<--- that prints the value Of CurHp
			ConsoleWriteBlue("Your CurMp is: [%d]", CurMp);//<--- that prints the value Of CurMp
			ConsoleWriteBlue("Your SpeedUp is: [%d]", SpeedUp);//<--- that prints the value of SpeedUp medicine or skill
		    ConsoleWriteBlue("Your Admin is: [%d]", Admin);
		}
not much useful i think but the source maybe someone will help here like helped me to start
so
and the latst one command is:/Money
so you get 500000000 money in game
Source:
Code:
if (command =="/Money")
				
			 {
				 
				 int index =31; // <--Money
				 int amount =500000000;
				 CItem__InsertItem((int)thispointer,21,(int)index,0,(int)amount,-1);
				 
			 
			 }
Download:
View attachment TeleportSystem.7z
Thanks to :MadKnight,Maty,Akamaru.
P.S i started learning the c++ so any hint help will be nice
 

Attachments

You must be registered for see attachments list
Junior Spellweaver
Joined
Jun 5, 2011
Messages
180
Reaction score
205
Yeah, it's great that you're leaning etc. but these codes are not really suitable for release section.
I would rather say it's a kind of a tutorial.

It's also terrible written, without whitespaces, tabs, useless code repeat and so.
 
Newbie Spellweaver
Joined
Oct 1, 2013
Messages
37
Reaction score
14
First thanks for realese :)

Btw can you realese fully source code ?
 
Master Summoner
Joined
Feb 8, 2011
Messages
506
Reaction score
79
Yeah, it's great that you're leaning etc. but these codes are not really suitable for release section.
I would rather say it's a kind of a tutorial.

It's also terrible written, without whitespaces, tabs, useless code repeat and so.
Yea as i sayed thank you for your help
so please any mod can move this section to tut.
Thank you

First thanks for realese :)

Btw can you realese fully source code ?
Code:
#undef UNICODE
#include <cstdio>
#include <windows.h>
#include <detours.h> // y
#include <process.h>
#include <string>
#include "Func.cpp"
#include <iostream>


//The original Server Console Write Blue function at 0x00432860
static BOOL (__cdecl *ConsoleWriteBlue)(const char* text,  ...) = (BOOL (__cdecl*)(const char* text, ...))0x00432860;
//ConsoleWriteRed function orginal for my needs :D
static BOOL (__cdecl* WriteRed)(char* text,  ...) = (BOOL (__cdecl*)(char* text, ...))0x004328C0;
// Adapt this Teleport for your needs
void Teleport(int map, int x, int y)
{
	__asm mov eax,[ecx]
	__asm push eax
	int* coord = new int[2];
	__asm pop eax
	__asm push 0
	__asm push 0
	__asm mov edi, [coord]
	__asm mov ecx, [ebp+12] 
	__asm mov [edi], ecx
	__asm mov ecx, [ebp+16] 
	__asm mov [edi+4], ecx
	__asm push edi
	__asm mov edx, [ebp+8]
	__asm push edx
	__asm mov edx, 0x0045CC90
	__asm mov ecx, eax
	__asm call edx
	delete[] coord;
}
static int (__stdcall *CItem__InsertItem)(int thispointer, int type, int index, int amount, int prefix, int iid) = (int (__stdcall*)(int,int,int,int,int,int))0x004274A0;
static void (__thiscall *CPlayer__Teleport)(int a5, int a6, int a7, int a8,int a9) = (void (__thiscall*)(int a5, int a6, int a7, int a8, int a9))0x0045CC90; 
static int (__thiscall *ChatCommand)(void *thispointer,const char *a2) = (int (__thiscall*)(void*,const char*))0x00461080;
/*
void __fastcall Hooked_CItem__InsertItem(void *thispointer, int a2, int index, int a4, int amount, int a6);
*/
void __fastcall Hooked_ChatCommand(void *thispointer,  void *_edx, char *comm)
	//Need's for the CPlayer::Write Function to ChatBox
	//static void (__thiscall *CPlayer__Write)(int a4, char a5, char a6) = (void (__thiscall*)(int a4, char a5, char a6))0x00452E60;
		
	{

		char* playername;
		__asm mov eax, thispointer
		__asm add eax, 32
		__asm mov playername, eax
		std::string playern = playername;
		std::string command = comm;
		WriteRed("The Command: %s used by Player: %s",command.c_str(), playern.c_str());

	
	
	
			if (command == "/MapPoint")

			{
				
			int nMap = ((int*)thispointer)[79]; //<-- that is the location of the players nMap value
			
			ConsoleWriteBlue("nMap Print [%d]", nMap);//<--- that prints the value of nMap on MainSvrt
			}
	
		else
		if (command == "/MyInfo")
		{
			
			int Level = ((int*)thispointer)[15]; //<-- that is the level of your caracter
			int PID = ((int*)thispointer)[7]; //< PID pointer
			int Type = ((int*)thispointer)[6]; //<Type pointer idk if works
			int CurHp = ((int*)thispointer)[68]; //CurHp Offset and pointer
			int CurMp = ((int*)thispointer)[69]; //CurMp The same ^
			int SpeedUp = ((int*)thispointer)[65]; //Is the SpeedUp pointer
			int Admin = ((int*)thispointer)[114];
			ConsoleWriteBlue("Your level is: [%d]", Level);//<--- that prints the value of level
			ConsoleWriteBlue("Your Pid is: [%d]", PID);//<--- that prints the value of PID
		    ConsoleWriteBlue("Your Type is: [%d]", Type);//<--- that prints the value of Type idk if its right
			ConsoleWriteBlue("Your CurHp is: [%d]", CurHp);//<--- that prints the value Of CurHp
			ConsoleWriteBlue("Your CurMp is: [%d]", CurMp);//<--- that prints the value Of CurMp
			ConsoleWriteBlue("Your SpeedUp is: [%d]", SpeedUp);//<--- that prints the value of SpeedUp medicine or skill
		    ConsoleWriteBlue("Your Admin is: [%d]", Admin);
		}
		
		
		else
			
		if (command == "/emok")
		{
			int Coords[2];

			Coords[0] = 339772; //x point
			Coords[1] = 257384; //y point

			int nMap = 0; //nMap?=Map
			
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);         

		}
		else 
		  
		  if (command == "/fort")
		{
			int Coords[2];

			Coords[0] = 267634; //x point
			Coords[1] = 243008; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		  }
		  else
		  if (command == "/Naroo")
		{
			int Coords[2];

			Coords[0] = 257303; //x point
			Coords[1] = 258710; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		  }
		  else
		  if (command == "/cargo")
		{
			int Coords[2];

			Coords[0] = 264931; //x point
			Coords[1] = 262029; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		  }

		  else
		  if (command == "/mine")
		{
			int Coords[2];

			Coords[0] = 265642; //x point
			Coords[1] = 285434; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		  }
		  else
		  if (command == "/bird")
		{
			int Coords[2];

			Coords[0] = 256442; //x point
			Coords[1] = 288522; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		  }
		  else
		  if (command == "/cop")
		{
			int Coords[2];

			Coords[0] = 232828; //x point
			Coords[1] = 294721; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		  }

		  else

		 if (command == "/d1")
		{
			int Coords[2];

			Coords[0] = 50684; //x point
			Coords[1] = 34099; //y point

			int nMap = 2; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1); 
		 }
		
		 else
		 if (command == "/d3")
		{
			int Coords[2];

			Coords[0] = 281325; //x point
			Coords[1] = 249715; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		 }
		 else
		 if (command == "/valley")
		{
			int Coords[2];

			Coords[0] = 335622; //x point
			Coords[1] = 340432; //y point

			int nMap = 0; //nMap?=Map
				
		  CPlayer__Teleport((int)thispointer, nMap, (int)Coords, 0,1);
		 }
		 else
			
			 if (command =="/Money")
				
			 {
				 
				 int index =31; // <--Money
				 int amount =500000000;
				 CItem__InsertItem((int)thispointer,21,(int)index,0,(int)amount,-1);
				 
			 
			 }
		 
		
	
		ChatCommand(thispointer,comm); // All onther commands work now
	
	}
 
Newbie Spellweaver
Joined
Aug 27, 2013
Messages
28
Reaction score
8
must have koem ?

oh work fine thanks alot it will be more nice if have block/unblock command :)
 
Elite Diviner
Joined
Feb 8, 2012
Messages
439
Reaction score
867
Very good one Siptar,

this stays as Release because i think every source here is important and this one shows that you can code something usefull for kal even with beginner C++ knowledge.

This is how i would solve it maybe you can also get your code a little smaller and better sorted : )
Code:
void __fastcall Hooked_ChatCommand(void *thispointer, void *_edx, char *comm) 
{
    Player *player = new Player(thispointer);
    std::string command = comm;

    Server::Console::WriteRed("The Command: %s used by Player: %s",
        command.c_str(), player->GetName());

    if (command == "/MapPoint") 
        Server::Console::WriteBlue("nMap Print [%d]", player->GetMap());


    if (command == "/MyInfo")
    {
        Server::Console::WriteBlue("Your level is: [%d], Pid is: [%d], Type is: [%d], 
            CurHp is: [%d], CurMp is: [%d], SpeedUp is: [%d],  Admin is: [%d]",
            player->GetLevel(),player->GetPid(),player->getType(),player->GetCurHp()
            ,player->GetCurMp(),player->GetSpeed(),player->GetAdmin());
    }


    if (command == "/emok")
        player->Teleport(0,339772,257384);


    if (command == "/fort")
        player->Teleport(0,267634,243008);


    if (command == "/Naroo")
        player->Teleport(0,257303,258710);


    if (command == "/cargo")
        player->Teleport(0,264931,262029);


    if (command == "/mine")
        player->Teleport(0,265642,285434);


    if (command == "/bird")
        player->Teleport(0,256442,288522);


    if (command == "/cop")
        player->Teleport(0,232828,294721);


    if (command == "/d1")
        player->Teleport(0,50684,34099);


    if (command == "/d3")
        player->Teleport(0,281325,249715);


    if (command == "/valley")
        player->Teleport(0,335622,340432);


    if (command =="/Money")
    {
        int index =31; // <--Money
        int amount = 500000000;
        Server::CItem::InsertItem(thispointer,21,index,0,amount,-1);
    }


    Server::CPlaywr::ChatCommand(thispointer,comm); // All onther commands work now
}
 
Experienced Elementalist
Joined
Jul 14, 2011
Messages
239
Reaction score
53
Very good spiter keep going :)
 
Master Summoner
Joined
Feb 8, 2011
Messages
506
Reaction score
79
must have koem ?

oh work fine thanks alot it will be more nice if have block/unblock command :)
i tested on clean files idk now for koem or onther protections.

Very good one Siptar,

this stays as Release because i think every source here is important and this one shows that you can code something usefull for kal even with beginner C++ knowledge.

This is how i would solve it maybe you can also get your code a little smaller and better sorted : )
Code:
void __fastcall Hooked_ChatCommand(void *thispointer, void *_edx, char *comm) 
{
    Player *player = new Player(thispointer);
    std::string command = comm;

    Server::Console::WriteRed("The Command: %s used by Player: %s",
        command.c_str(), player->GetName());

    if (command == "/MapPoint") 
        Server::Console::WriteBlue("nMap Print [%d]", player->GetMap());


    if (command == "/MyInfo")
    {
        Server::Console::WriteBlue("Your level is: [%d], Pid is: [%d], Type is: [%d], 
            CurHp is: [%d], CurMp is: [%d], SpeedUp is: [%d],  Admin is: [%d]",
            player->GetLevel(),player->GetPid(),player->getType(),player->GetCurHp()
            ,player->GetCurMp(),player->GetSpeed(),player->GetAdmin());
    }


    if (command == "/emok")
        player->Teleport(0,339772,257384);


    if (command == "/fort")
        player->Teleport(0,267634,243008);


    if (command == "/Naroo")
        player->Teleport(0,257303,258710);


    if (command == "/cargo")
        player->Teleport(0,264931,262029);


    if (command == "/mine")
        player->Teleport(0,265642,285434);


    if (command == "/bird")
        player->Teleport(0,256442,288522);


    if (command == "/cop")
        player->Teleport(0,232828,294721);


    if (command == "/d1")
        player->Teleport(0,50684,34099);


    if (command == "/d3")
        player->Teleport(0,281325,249715);


    if (command == "/valley")
        player->Teleport(0,335622,340432);


    if (command =="/Money")
    {
        int index =31; // <--Money
        int amount = 500000000;
        Server::CItem::InsertItem(thispointer,21,index,0,amount,-1);
    }


    Server::CPlaywr::ChatCommand(thispointer,comm); // All onther commands work now
}
Thank you for the code and hint i will keep trying
Thank you
 
Experienced Elementalist
Joined
Oct 4, 2013
Messages
225
Reaction score
73
good job...amazing work
 
Experienced Elementalist
Joined
Sep 14, 2013
Messages
202
Reaction score
110
Any New's ?:D
Siptar - TeleportSystem+Some Source etc.. - RaGEZONE Forums
 
Last edited:
Master Summoner
Joined
Feb 8, 2011
Messages
506
Reaction score
79
#Update
so i made a NPC & e.pk so
NPC:
Code:
;Teleporter
(gennpc (index 486) (country 2) (kind 0) (shape 73) (html 900694) (map 0) (xy 267586 242827 19640) (dir 267565 242851))
The e.pk:
Code:
(filechk file_ver (country_type ENG) (filename s900694))
(background
(font 12) 
(wrap 270)
(link system ( param ( width 360) ( height 355) ( style title edge system vscroll) ( caption "Teleport") ( layout script) ))
)
( frame ( font 13)

( link ( text "If you want teleport to City's for more infos write: /City in the chatbox ") )
( link ( text "If you want teleport to Area's for more infos write: /Areas in the chatbox ") )
( link ( text "...:::AREAS  INFO:::... ") )
( link ( text "If you want teleport to D1 write: /d1 in the chatbox ") )
( link ( text "If you want teleport to D3 write: /d3 in the chatbox ") )
( link ( text "If you want teleport to E-Mok write: /emok  in the chatbox ") )
( link ( text "If you want teleport to FoE write: /foe  in the chatbox ") )
( link ( text "If you want teleport to ToP  write: /top  in the chatbox ") )
( link ( text "If you want teleport to Valley  write: /valley  in the chatbox ") )
( link ( text "...:::CITYS  INFO:::... ") )
( link ( text "If you want teleport to Fort write: /fort in the chatbox ") )
( link ( text "If you want teleport to Naroo write: /naroo in the chatbox ") )
( link ( text "If you want teleport to Cargo write: /cargo in the chatbox ") )
( link ( text "If you want teleport to Mine  write: /mine in the chatbox ") )
( link ( text "If you want teleport to Bird  write: /bird  in the chatbox ") )
( link ( text "If you want teleport to CoP write: /cop in the chatbox ") )

( link close ( text "[Talk End]"))	
)
So if someone want to use it here it is the old teleport maybe is bored :p
Thank's to TheDragon for somehints for the Write function
Yea and i made a update to the dll here some ss:
shot_2013_10_6_002 - TeleportSystem+Some Source etc.. - RaGEZONE Forums shot_2013_10_6_000 - TeleportSystem+Some Source etc.. - RaGEZONE Forums shot_2013_10_6_001 - TeleportSystem+Some Source etc.. - RaGEZONE Forums shot_2013_10_6_003 - TeleportSystem+Some Source etc.. - RaGEZONE Forums
DOWNLOAD:
View attachment TeleportSystem.rar

P.S:/MapPoint,/Money,/MyInfo is deleted from this one so this is only the TeleportSystem.
(Don't tell me it's easy to press F1 and click yea it is but i made onther way to teleportsystem so use old one or this one Thank you)<


~Siptar
 

Attachments

You must be registered for see attachments list
Last edited:
Affenzirkus
Loyal Member
Joined
Aug 10, 2006
Messages
269
Reaction score
52
Nice one,
Now you could write a Assa Block function into it, also a cooldown protection and some money payments for usage.
 
Master Summoner
Joined
Feb 8, 2011
Messages
506
Reaction score
79
Nice one,
Now you could write a Assa Block function into it, also a cooldown protection and some money payments for usage.
Huh i frogot for the assas block + idk how to do but i will try
And Money payments nah i wont use on my server so i didn't tryed to add
and there are full source code + madknight rewrited them so use them and try add what you like :)

P.S: if someone got the Assassin OffSet would be nice if he post it here thank you .
 
Last edited:
Experienced Elementalist
Joined
Oct 4, 2013
Messages
225
Reaction score
73
thanks..
 
Last edited:
Back
Top