This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Now, for the purpose of this guide, I'll be adding Glast Heim as a map I want in my @go function. Since Eclage is the last map, I will add my new map after Eclage.
right after so that it would look like this (after I've **filled** in my **tabs**):
` { MAP_ECLAGE, 110, 39 }, // 35=Eclage`
` { MAP_GLAST_01, 123, 234 }, // 36=Glast Heim`
` { MAP_LASAGNA, 193, 182 }, // 36=Lasagna`
` { MAP_GLAST_01, 123, 234 }, // 37=Glast Heim`
Please note that the structure of it is as followed:
@@ -90,96 +98,95 @@ Getting @go to Work
</h4>
To get the town name as well as with the number working, you need to scroll down a little bit till you see such code:
`// get possible name of the city`
` map_name[MAP_NAME_LENGTH-1] = '\0';`
` for (i = 0; map_name[i]; i++)`
` map_name[i] = TOLOWER(map_name[i]);`
` // try to identify the map name`
` if (strncmp(map_name, "prontera", 3) == 0) {`
` town = 0;`
` } else if (strncmp(map_name, "morocc", 3) == 0) {`
` town = 1;`
` } else if (strncmp(map_name, "geffen", 3) == 0) {`
` town = 2;`
` } else if (strncmp(map_name, "payon", 3) == 0 ||`
` strncmp(map_name, "paion", 3) == 0) {`
` town = 3;`
` } else if (strncmp(map_name, "alberta", 3) == 0) {`
` town = 4;`
` } else if (strncmp(map_name, "izlude", 3) == 0 ||`
` strncmp(map_name, "islude", 3) == 0) {`
` town = 5;`
` } else if (strncmp(map_name, "aldebaran", 3) == 0 ||`
` strcmp(map_name, "al") == 0) {`
` town = 6;`
` } else if (strncmp(map_name, "lutie", 3) == 0 ||`
` strcmp(map_name, "christmas") == 0 ||`
` strncmp(map_name, "xmas", 3) == 0 ||`
` strncmp(map_name, "x-mas", 3) == 0) {`
` town = 7;`
` } else if (strncmp(map_name, "comodo", 3) == 0) {`
` town = 8;`
` } else if (strncmp(map_name, "yuno", 3) == 0) {`
` town = 9;`
` } else if (strncmp(map_name, "amatsu", 3) == 0) {`
` town = 10;`
` } else if (strncmp(map_name, "gonryun", 3) == 0) {`
` town = 11;`
` } else if (strncmp(map_name, "umbala", 3) == 0) {`
` town = 12;`
` } else if (strncmp(map_name, "niflheim", 3) == 0) {`
` town = 13;`
` } else if (strncmp(map_name, "louyang", 3) == 0) {`
` town = 14;`
` } else if (strncmp(map_name, "new_1-1", 3) == 0 ||`
` strncmp(map_name, "startpoint", 3) == 0 ||`
` strncmp(map_name, "begining", 3) == 0) {`
` town = 15;`
` } else if (strncmp(map_name, "sec_pri", 3) == 0 ||`
` strncmp(map_name, "prison", 3) == 0 ||`
` strncmp(map_name, "jails", 3) == 0) {`
` town = 16;`
` } else if (strncmp(map_name, "jawaii", 3) == 0 ||`
` strncmp(map_name, "jawai", 3) == 0) {`
` town = 17;`
` } else if (strncmp(map_name, "ayothaya", 3) == 0 ||`
` strncmp(map_name, "ayotaya", 3) == 0) {`
` town = 18;`
` } else if (strncmp(map_name, "einbroch", 5) == 0 ||`
` strncmp(map_name, "ainbroch", 5) == 0) {`
` town = 19;`
` } else if (strncmp(map_name, "lighthalzen", 3) == 0) {`
` town = 20;`
` } else if (strncmp(map_name, "einbech", 3) == 0) {`
` town = 21;`
` } else if (strncmp(map_name, "hugel", 3) == 0) {`
` town = 22;`
` } else if (strncmp(map_name, "rachel", 3) == 0) {`
` town = 23;`
` } else if (strncmp(map_name, "veins", 3) == 0) {`
` town = 24;`
` } else if (strncmp(map_name, "moscovia", 3) == 0) {`
` town = 25;`
` } else if (strncmp(map_name, "mid_camp", 3) == 0) {`
` town = 26;`
` } else if (strncmp(map_name, "manuk", 3) == 0) {`
` town = 27;`
` } else if (strncmp(map_name, "splendide", 3) == 0) {`
` town = 28;`
` } else if (strncmp(map_name, "brasilis", 3) == 0) {`
` town = 29;`
` } else if (strncmp(map_name, "dicastes01", 3) == 0) {`
` town = 30;`
` } else if (strncmp(map_name, "mora", 3) == 0) {`
` town = 31;`
` } else if (strncmp(map_name, "dewata", 3) == 0) {`
` town = 32;`
` } else if (strncmp(map_name, "malangdo", 3) == 0) {`
` town = 33;`
` } else if (strncmp(map_name, "malaya", 3) == 0) {`
` town = 34;`
` } else if (strncmp(map_name, "eclage", 3) == 0) {`
` town = 35;`
` // get possible name of the city`
` map_name[MAP_NAME_LENGTH-1] = '\0';`
` for (i = 0; map_name[i]; i++)`
` map_name[i] = TOLOWER(map_name[i]);`
` // try to identify the map name`
` if (strncmp(map_name, "prontera", 3) == 0) {`
` town = 0;`
` } else if (strncmp(map_name, "morocc", 4) == 0 ||`
` strncmp(map_name, "morroc", 4) == 0) {`
` town = 1;`
` } else if (strncmp(map_name, "geffen", 3) == 0) {`
` town = 2;`
` } else if (strncmp(map_name, "payon", 3) == 0) {`
` town = 3;`
` } else if (strncmp(map_name, "alberta", 3) == 0) {`
` town = 4;`
` } else if (strncmp(map_name, "izlude", 3) == 0) {`
` town = 5;`
` } else if (strncmp(map_name, "aldebaran", 3) == 0) {`
` town = 6;`
` } else if (strncmp(map_name, "lutie", 3) == 0 ||`
` strcmp(map_name, "christmas") == 0 ||`
` strncmp(map_name, "xmas", 3) == 0 ||`
` strncmp(map_name, "x-mas", 3) == 0) {`
` town = 7;`
` } else if (strncmp(map_name, "comodo", 3) == 0) {`
` town = 8;`
` } else if (strncmp(map_name, "juno", 3) == 0 ||`
` strncmp(map_name, "yuno", 3) == 0) {`
` town = 9;`
` } else if (strncmp(map_name, "amatsu", 3) == 0) {`
` town = 10;`
` } else if (strncmp(map_name, "kunlun", 3) == 0 ||`
` strncmp(map_name, "gonryun", 3) == 0) {`
` town = 11;`
` } else if (strncmp(map_name, "umbala", 3) == 0) {`
` town = 12;`
` } else if (strncmp(map_name, "niflheim", 3) == 0) {`
` town = 13;`
` } else if (strncmp(map_name, "louyang", 3) == 0) {`
` town = 14;`
` } else if (strncmp(map_name, "new_1-1", 3) == 0 ||`
` strncmp(map_name, "startpoint", 3) == 0 ||`
` strncmp(map_name, "beginning", 3) == 0) {`
` town = 15;`
` } else if (strncmp(map_name, "sec_pri", 3) == 0 ||`
` strncmp(map_name, "prison", 3) == 0 ||`
` strncmp(map_name, "jail", 3) == 0) {`
` town = 16;`
` } else if (strncmp(map_name, "jawaii", 3) == 0) {`
` town = 17;`
` } else if (strncmp(map_name, "ayothaya", 3) == 0) {`
` town = 18;`
` } else if (strncmp(map_name, "einbroch", 5) == 0) {`
` town = 19;`
` } else if (strncmp(map_name, "lighthalzen", 3) == 0) {`
` town = 20;`
` } else if (strncmp(map_name, "einbech", 5) == 0) {`
` town = 21;`
` } else if (strncmp(map_name, "hugel", 3) == 0) {`
` town = 22;`
` } else if (strncmp(map_name, "rachel", 3) == 0) {`
` town = 23;`
` } else if (strncmp(map_name, "veins", 3) == 0) {`
` town = 24;`
` } else if (strncmp(map_name, "moscovia", 3) == 0) {`
` town = 25;`
` } else if (strncmp(map_name, "mid_camp", 3) == 0) {`
` town = 26;`
` } else if (strncmp(map_name, "manuk", 3) == 0) {`
` town = 27;`
` } else if (strncmp(map_name, "splendide", 3) == 0) {`
` town = 28;`
` } else if (strncmp(map_name, "brasilis", 3) == 0) {`
` town = 29;`
` } else if (strncmp(map_name, "dicastes01", 3) == 0) {`
` town = 30;`
` } else if (strcmp(map_name, "mora") == 0) {`
` town = 31;`
` } else if (strncmp(map_name, "dewata", 3) == 0) {`
` town = 32;`
` } else if (strncmp(map_name, "malangdo", 5) == 0) {`
` town = 33;`
` } else if (strncmp(map_name, "malaya", 5) == 0) {`
` town = 34;`
` } else if (strncmp(map_name, "eclage", 3) == 0) {`
` town = 35;`
` } else if (strncmp(map_name, "lasagna", 2) == 0) {`
` town = 36;`
` `**`}`**
Before the last bracket, add the following:
@@ -191,55 +198,61 @@ Your "<mapname>" is your map's name while <number of characters required> is the
So, for my Glast Heim map, it would be:
`} else if (strncmp(map_name, "eclage", 3) == 0) {`
` town = 35;`
`} else if (strncmp(map_name, "glast_01", 3) == 0) {`
`} else if (strncmp(map_name, "lasagna", 2) == 0) {`
` town = 36;`
`} else if (strncmp(map_name, "glast_01", 3) == 0) {`
` town = 37;`
` }`
<h1>
Working with mapindex.h
Working with mapindex.hpp
</h1>
Now, moving forward. Back out from your .../src/map folder and go into .../src/common/mapindex.h. Find:
Now, moving forward. Back out from your .../src/map folder and go into .../src/common/mapindex.hpp. Find:
`//Some definitions for the mayor city maps.`
`#define MAP_PRONTERA "prontera"`
`#define MAP_GEFFEN "geffen"`
`#define MAP_MORROC "morocc"`
`#define MAP_ALBERTA "alberta"`
`#define MAP_PAYON "payon"`
`#define MAP_IZLUDE "izlude"`
`#define MAP_ALDEBARAN "aldebaran"`
`#define MAP_LUTIE "xmas"`
`#define MAP_COMODO "comodo"`
`#define MAP_YUNO "yuno"`
`#define MAP_AMATSU "amatsu"`
`#define MAP_GONRYUN "gonryun"`
`#define MAP_UMBALA "umbala"`
`#define MAP_NIFLHEIM "niflheim"`
`#define MAP_LOUYANG "louyang"`
`#define MAP_JAWAII "jawaii"`
`#define MAP_AYOTHAYA "ayothaya"`
`#define MAP_EINBROCH "einbroch"`
`#define MAP_LIGHTHALZEN "lighthalzen"`
`#define MAP_EINBECH "einbech"`
`#define MAP_HUGEL "hugel"`
`#define MAP_RACHEL "rachel"`
`#define MAP_VEINS "veins"`
`#define MAP_JAIL "sec_pri"`
`#define MAP_NOVICE "new_1-1"`
`#define MAP_MOSCOVIA "moscovia"`
`#define MAP_MIDCAMP "mid_camp"`
`#define MAP_MANUK "manuk"`
`#define MAP_SPLENDIDE "splendide"`
`#define MAP_BRASILIS "brasilis"`
`#define MAP_DICASTES "dicastes01"`
`#define MAP_MORA "mora"`
`#define MAP_DEWATA "dewata"`
`#define MAP_MALANGDO "malangdo"`
`#define MAP_MALAYA "malaya"`
`#define MAP_ECLAGE "eclage"`
`#define MAP_PRONTERA "prontera"`
`#define MAP_GEFFEN "geffen"`
`#define MAP_MORROC "morocc"`
`#define MAP_ALBERTA "alberta"`
`#define MAP_PAYON "payon"`
`#define MAP_IZLUDE "izlude"`
`#define MAP_ALDEBARAN "aldebaran"`
`#define MAP_LUTIE "xmas"`
`#define MAP_COMODO "comodo"`
`#define MAP_YUNO "yuno"`
`#define MAP_AMATSU "amatsu"`
`#define MAP_GONRYUN "gonryun"`
`#define MAP_UMBALA "umbala"`
`#define MAP_NIFLHEIM "niflheim"`
`#define MAP_LOUYANG "louyang"`
`#define MAP_JAWAII "jawaii"`
`#define MAP_AYOTHAYA "ayothaya"`
`#define MAP_EINBROCH "einbroch"`
`#define MAP_LIGHTHALZEN "lighthalzen"`
`#define MAP_EINBECH "einbech"`
`#define MAP_HUGEL "hugel"`
`#define MAP_RACHEL "rachel"`
`#define MAP_VEINS "veins"`
`#define MAP_JAIL "sec_pri"`
`#ifdef RENEWAL`
` #define MAP_NOVICE "iz_int"`
`#else`
` #define MAP_NOVICE "new_1-1"`
`#endif`
`#define MAP_MOSCOVIA "moscovia"`
`#define MAP_MIDCAMP "mid_camp"`
`#define MAP_MANUK "manuk"`
`#define MAP_SPLENDIDE "splendide"`
`#define MAP_BRASILIS "brasilis"`
`#define MAP_DICASTES "dicastes01"`
`#define MAP_MORA "mora"`
`#define MAP_DEWATA "dewata"`
`#define MAP_MALANGDO "malangdo"`
`#define MAP_MALAYA "malaya"`
`#define MAP_ECLAGE "eclage"`
`#define MAP_ECLAGE_IN "ecl_in01"`
`#define MAP_LASAGNA "lasagna"`
The structure for this is as followed:
@@ -251,7 +264,7 @@ In the case of me adding my map, I will do it as so:
So that it would look like:
`#define MAP_ECLAGE "eclage"`
`#define MAP_LASAGNA "lasagna"`
`#define MAP_GLAST_01 "glast_01"`
**Note**: There are no tabs
@@ -262,50 +275,56 @@ Now, save the source files and recompile the server. And you will have your own
Additional Steps
</h1>
If you want your map to show up in @go when you do @go, you would need to add it to one more file and this file is called the [help.txt](https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/conf/help.txt). You can find such file by heading to .../conf/help.txt. Search for **go:** so that you can find this code:
`go: "Params: `<number/city_name>`\n" "Warps you to a city.\n"`
` " -3: (Memo point 2) 14: louyang 31: mora\n"`
` " -2: (Memo point 1) 15: start point 32: dewata\n"`
If you want your map to show up in @go when you do @go, you would need to add it to one more file and this file is called the [atcommands.yml](https://github.com/rathena/rathena/blob/master/conf/atcommands.yml). You can find such file by heading to .../conf/atcommands.yml. Search for **go:** so that you can find this code:
` - Command: go`
` Help: |`
` Params: <city name|number>`
` Warps you to a city.`
` -3: (Memo point 2) 14: louyang 31: mora`
` -2: (Memo point 1) 15: start point 32: dewata`
` -1: (Memo point 0) 16: prison/jail 33: malangdo island`
` 0: prontera 17: jawaii 34: malaya port`
` 1: morocc 18: ayothaya 35: eclage`
` 2: geffen 19: einbroch 36: lasagna`
` 3: payon 20: lighthalzen`
` 4: alberta 21: einbech`
` 5: izlude 22: hugel`
` 6: aldebaran 23: rachel`
` 7: xmas (lutie) 24: veins`
` 8: comodo 25: moscovia`
` 9: yuno 26: midgard camp`
` 10: amatsu 27: manuk`
` 11: gonryun 28: splendide`
` 12: umbala 29: brasilis`
` 13: niflheim 30: el dicastes`
Now, since I want to keep the structure of my maps still intact, I will add my new map right after Eclage once again. To do so, I will just expand the line where geffen and einbroch are by doing such:
**Note:***Make sure that you align everything by adding spaces!* [Category:Source Snippets](/Category:Source_Snippets "wikilink") [Category:Customization](/Category:Customization "wikilink")
` - Command: go`
` Help: |`
` Params: <city name|number>`
` Warps you to a city.`
` -3: (Memo point 2) 14: louyang 31: mora`
` -2: (Memo point 1) 15: start point 32: dewata`
` -1: (Memo point 0) 16: prison/jail 33: malangdo island`
**Note:***Make sure that you align everything by adding spaces!* [Category:Source Snippets](/Category:Source_Snippets "wikilink") [Category:Customization](/Category:Customization "wikilink")