jomjoms123 0 Posted June 11, 2013 how to add modify @go commands in hercules. Quote Share this post Link to post Share on other sites
0 Mumbles 193 Posted June 12, 2013 I'd definitely recommend jTynne's @go alternative. Here's a link to the release topic here on Hercules: http://herc.ws/board/topic/14-utility-added-feature-jtynnes-go-command-alternative-txt-format/ Quote Share this post Link to post Share on other sites
0 Mystery 594 Posted June 11, 2013 how to add modify @go commands in hercules. What do you mean? You mean you want to change the maps within @go? If so, take a look in your /src/map/atcommand.c and find this: /*========================================== * @go [city_number or city_name] - Updated by Harbin *------------------------------------------*/ACMD(go){ int i; int town; char map_name[MAP_NAME_LENGTH]; int16 m; const struct { char map[MAP_NAME_LENGTH]; int x, y; } data[] = { { MAP_PRONTERA, 156, 191 }, // 0=Prontera { MAP_MORROC, 156, 93 }, // 1=Morroc { MAP_GEFFEN, 119, 59 }, // 2=Geffen { MAP_PAYON, 162, 233 }, // 3=Payon { MAP_ALBERTA, 192, 147 }, // 4=Alberta#ifdef RENEWAL { MAP_IZLUDE, 128, 146 }, // 5=Izlude (Renewal)#else { MAP_IZLUDE, 128, 114 }, // 5=Izlude#endif { MAP_ALDEBARAN, 140, 131 }, // 6=Al de Baran { MAP_LUTIE, 147, 134 }, // 7=Lutie { MAP_COMODO, 209, 143 }, // 8=Comodo { MAP_YUNO, 157, 51 }, // 9=Yuno { MAP_AMATSU, 198, 84 }, // 10=Amatsu { MAP_GONRYUN, 160, 120 }, // 11=Gonryun { MAP_UMBALA, 89, 157 }, // 12=Umbala { MAP_NIFLHEIM, 21, 153 }, // 13=Niflheim { MAP_LOUYANG, 217, 40 }, // 14=Louyang { MAP_NOVICE, 53, 111 }, // 15=Training Grounds { MAP_JAIL, 23, 61 }, // 16=Prison { MAP_JAWAII, 249, 127 }, // 17=Jawaii { MAP_AYOTHAYA, 151, 117 }, // 18=Ayothaya { MAP_EINBROCH, 64, 200 }, // 19=Einbroch { MAP_LIGHTHALZEN, 158, 92 }, // 20=Lighthalzen { MAP_EINBECH, 70, 95 }, // 21=Einbech { MAP_HUGEL, 96, 145 }, // 22=Hugel { MAP_RACHEL, 130, 110 }, // 23=Rachel { MAP_VEINS, 216, 123 }, // 24=Veins { MAP_MOSCOVIA, 223, 184 }, // 25=Moscovia { MAP_MIDCAMP, 180, 240 }, // 26=Midgard Camp { MAP_MANUK, 282, 138 }, // 27=Manuk { MAP_SPLENDIDE, 197, 176 }, // 28=Splendide { MAP_BRASILIS, 182, 239 }, // 29=Brasilis { MAP_DICASTES, 198, 187 }, // 30=El Dicastes { MAP_MORA, 44, 151 }, // 31=Mora { MAP_DEWATA, 200, 180 }, // 32=Dewata { MAP_MALANGDO, 140, 114 }, // 33=Malangdo Island { MAP_MALAYA, 242, 211 }, // 34=Malaya Port { MAP_ECLAGE, 110, 39 }, // 35=Eclage }; If you want to add more, you can but if you do, you gotta scroll down and edit this part as well: // 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; } and don't forget to change your /src/common/mapindex.h file. Finally, you need to edit your /conf/help.txt file. It controls the message displayed in @go. go: "Params: <city name|number>n" "Warps you to a city.n" " -3: (Memo point 2) 14: louyang 31: moran" " -2: (Memo point 1) 15: start point 32: dewatan" " -1: (Memo point 0) 16: prison/jail 33: malangdo islandn" " 0: prontera 17: jawaii 34: malaya portn" " 1: morocc 18: ayothaya 35: eclagen" " 2: geffen 19: einbrochn" " 3: payon 20: lighthalzenn" " 4: alberta 21: einbechn" " 5: izlude 22: hugeln" " 6: aldebaran 23: racheln" " 7: xmas (lutie) 24: veinsn" " 8: comodo 25: moscovian" " 9: yuno 26: midgard campn" " 10: amatsu 27: manukn" " 11: gonryun 28: splendiden" " 12: umbala 29: brasilisn" " 13: niflheim 30: el dicastesn" Quote Share this post Link to post Share on other sites
0 jTynne 101 Posted June 11, 2013 Alternatively, if you do not wish to modify your source code, you can use my custom @go command which runs via NPC script. Easy to modify and can simply be loaded/unloaded at any time without having to stop/re-compile/start your server. 1 Mumbles reacted to this Quote Share this post Link to post Share on other sites
0 mofo 2 Posted June 12, 2013 Yes, use jTynne's script. It's so awesome! Quote Share this post Link to post Share on other sites
how to add modify @go commands in hercules.
Share this post
Link to post
Share on other sites