Jump to content
metin2dev
VegaS

[Release] Command Teleporter for player (C++)

Recommended Posts

Hello world last night at around 5 am bored me and I created a short teleport order in minutes.

What is this order?

- Order can be used for teleporting a player.
- By accessing the / teleport <number> you have to choose one of the numbers that are in the map settings.
- Each map has a configuration proposed for the minimum and maximum level.

- You can teleport a map if you do not have the required minimum.
- You can teleport a map if you level higher than the configuration map.
- List of papers default starts from 1 to 13.
- You can not enter a number less than 1.
- You can not enter a number greater than 13.
- You can not enter characters than numbers.
- When you tried to use the command without arguments will show the list as the number of error information, as well as where you enter a character or use / teleport show_list.

 You can add as many maps you want.
- Everything is configurable.
- Must have knowledge of C++ 0.1% to add more maps.

 

 

 

142374a43ff72003829a9016b7b1935d.png

 

 

 

Download:

Edited by VegaS
update link
  • Like 17

Share this post


Link to post
Share on other sites

Because I'm a bitch, I'll do some updates required by some of you.

So if you want to add something and I like I could add the code in a separate part.

You feel free to express yourself.

  • Like 3

Share this post


Link to post
Share on other sites

Usefull System, i like it. Thanks given.

I know "I created a short teleport order in minutes"
So this should be only suggestions for improvement -> :
1. Why you dont do?:

Spoiler

    if (ch->GetExchange() || ch->IsOpenSafebox() || ch->IsCubeOpen() || ch->GetShop() || ch->GetMyShop()
#ifdef ENABLE_ACCE_COSTUME_SYSTEM
    || ch->IsAcceOpen()
#endif
#ifdef ENABLE_OFFLINE_SHOP
    || ch->GetOfflineShop() || ch->GetOfflineShopOwner()
#endif
    )


2nd thing -> if you open a NPC-shop you can warp immediately,
normally you have to wait; so it is the 10sec time missing you have to wait.

Working very good !

sry for bad english.

Share this post


Link to post
Share on other sites
On 01.09.2016 at 6:00 PM, JeeX said:

2nd thing -> if you open a NPC-shop you can warp immediately,
normally you have to wait; so it is the 10sec time missing you have to wait.

	if (!ch->CanWarp()) // or ch->CanWarp() == false
	{
		ch->ChatPacket(CHAT_TYPE_NOTICE, "Please wait 10 seconds.");
		return;	
	}

 

Share this post


Link to post
Share on other sites

Plese help
error: cannot initialize an array element of
type 'int' with an rvalue of type 'nullptr_t'
{ NULL, NULL, NULL, NULL},

Share this post


Link to post
Share on other sites
4 hours ago, TheGameDeveloper said:

error: cannot initialize an array element of
type 'int' with an rvalue of type 'nullptr_t'

Replace with:

{ 0, 0, 0, 0},

 

  • Like 1

Share this post


Link to post
Share on other sites

Hmm then try to change that:

#cmd_General.cpp
#Change:
if (iRequestIndexMap < 1)
#With:
if (iRequestIndexMap <= 0)

#Search:
if (iRequestIndexMap > NUMBER_MAX_MAPS)
#Add before:
iRequestIndexMap -= 1;

And replace the tables from .h with this:

	int szTeleportConfig[NUMBER_MAX_MAPS][4] = 
	{
		{	473900,	954600,	1,	105	},	// metin2_map_a1                (idxMapIndex: 1)
		{	352300,	882700,	1,	105	},	// metin2_map_a3                (idxMapIndex: 3)
		{	63200,	166700,	1,	105	},	// metin2_map_b1                (idxMapIndex: 21)
		{	145700,	239800,	1,	105	},	// metin2_map_b3                (idxMapIndex: 23)
		{	959600,	269700,	1,	105	},	// metin2_map_c1                (idxMapIndex: 41)
		{	863800,	246000,	1,	105	},	// metin2_map_c3                (idxMapIndex: 43)	
		{	436300, 215700,	10,	105	},	// map_n_snowm_01               (idxMapIndex: 61)
		{	270400, 739900,	15,	105	},	// map_n_threeway               (idxMapIndex: 64)
		{	600900, 687500,	20,	105	},	// metin2_map_n_flame_01        (idxMapIndex: 62)
		{	217800, 627200,	25,	75	},	// metin2_map_n_desert_01       (idxMapIndex: 63)
		{	60000, 	496600, 30,	85	},	// metin2_map_spiderdungeon     (idxMapIndex: 10)
		{	553600,	144900, 35,	95	},	// metin2_map_milgyo            (idxMapIndex: 65)
		{	284200,	809600, 45,	105	}	// metin2_map_skipia_dungeon_01 (idxMapIndex: 72)
	};
	
	char* szTableNameMaps[NUMBER_MAX_MAPS] =
	{
		"<1> Map1 Shinshoo            (Lv. min.%d) | | (Lv. max.%d)", 
		"<2> Map2 Shinshoo            (Lv. min.%d) | | (Lv. max.%d)", 
		"<3> Map1 Chunjo              (Lv. min.%d) | | (Lv. max.%d)", 
		"<4> Map2 Chunjo              (Lv. min.%d) | | (Lv. max.%d)", 
		"<5> Map1 Jinno               (Lv. min.%d) | | (Lv. max.%d)", 
		"<6> Map2 Jinno               (Lv. min.%d) | | (Lv. max.%d)", 
		"<7> Mount Sohan              (Lv. min.%d) | | (Lv. max.%d)", 
		"<8> Valley of Seungryong     (Lv. min.%d) | | (Lv. max.%d)", 
		"<9> Doyyumhwaji              (Lv. min.%d) | | (Lv. max.%d)", 
		"<10> Yongbi Desert           (Lv. min.%d) | | (Lv. max.%d)", 	
		"<11> Spiders Dungeon 1       (Lv. min.%d) | | (Lv. max.%d)", 
		"<12> Hwang Temple            (Lv. min.%d) | | (Lv. max.%d)", 
		"<13> Skipia Dungeon 1        (Lv. min.%d) | | (Lv. max.%d)"
	};	

 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×