Jump to content

drakulya

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by drakulya

  1. Hello every body! I hope you're all doing well. I'm using the official rAthena JobMaster custom script and i've realized that, no matter which job i'd choose, it never gaves me the job relative weapon/item - i tested it with First classes, second classes, transclasses and third-classes. So, i've started studying the script code yesterday, when rAthena compiles there is no error, but it simply doesnt gave me the item. I would like to know how you guys would fix it. Here i Solved. My Solution is described bellow: Changed the Original Job_Change function last lines: // Executes the actual jobchange and closes. function Job_Change { .@previous_class = Class; .@to_cls = getarg(0); next; mes .NPCName$; mes "You are now " + callfunc("F_InsertArticle", jobname(.@to_cls)) + "!"; if (.@to_cls == Job_Novice_High && .LastJob) lastJob = Class; // Saves the lastJob for rebirth jobchange .@to_cls; if (.@to_cls == Job_Novice_High) resetlvl(1); else if (.@to_cls == Job_Baby) { resetstatus; resetskill; set SkillPoint,0; } specialeffect2 EF_ANGEL2; specialeffect2 EF_ELECTRIC; if (.@previous_class != Class) { if (.Platinum) callfunc "F_GetPlatinumSkills"; if (.GetJobEquip) Get_Job_Equip(); } close; // Always closes after the change } To this way below... (the function for me is now out of the "IF" condition and before the ".Platinum" IF condition), it always gives the item: // Executes the actual jobchange and closes. function Job_Change { .@previous_class = Class; .@to_cls = getarg(0); next; mes .NPCName$; mes "You are now " + callfunc("F_InsertArticle", jobname(.@to_cls)) + "!"; if (.@to_cls == Job_Novice_High && .LastJob) lastJob = Class; // Saves the lastJob for rebirth jobchange .@to_cls; if (.@to_cls == Job_Novice_High) resetlvl(1); else if (.@to_cls == Job_Baby) { resetstatus; resetskill; set SkillPoint,0; } specialeffect2 EF_ANGEL2; specialeffect2 EF_ELECTRIC; Get_Job_Equip(); if (.Platinum) callfunc "F_GetPlatinumSkills"; close; // Always closes after the change } Hope it helps someone who needs.
  2. drakulya

    Quarantine

    Hello everybody, I hope you're all doing well. Here in Brazil we're going fine, but i'm super afraid with the possible financial crisis that is comming here. The government has taken a series of actions in the labor laws to prevent unemployment in this time of crisis, reducing workload and wages by up to 70% and other things that, at other times, would have been unimaginable. I just hope that this crisis will pass soon, for the good of all. Stay safe!
  3. @AkkarinThank you for your Answer Akkarin! Yes, i've recompiled I didn't realized, but I have some Warnings on my Map.Server, thanks to you now i have more clues to find what is wrong. So now i know i must always search for things on map.server etc. "restart_mode=on" [Status]: Memory manager initialised: log/map-server.exe.leaks rAthena Development Team presents ___ __ __ _____/ | / /_/ /_ ___ ____ ____ _ / ___/ /| |/ __/ __ \/ _ \/ __ \/ __ `/ / / / ___ / /_/ / / / __/ / / / /_/ / /_/ /_/ |_\__/_/ /_/\___/_/ /_/\__,_/ http://rathena.org/board/ [Info]: Git Hash: '2f326bf04a0f81c1717289db55b38288c2d8c59c' [Info]: Server uses 'select' as event dispatcher [Info]: Server supports up to '4096' concurrent connections. [Info]: Char Server IP Address : '127.0.0.1' -> '127.0.0.1'. [Info]: Map Server Bind IP Address : '127.0.0.1' -> '127.0.0.1'. [Info]: Map Server IP Address : '127.0.0.1' -> '127.0.0.1'. [Status]: Using SQL dbs: no [Info]: Logging item transactions to table 'picklog'. [Info]: Logging commands to table 'atcommandlog'. [Info]: Logging 'logmes' messages to table 'npclog'. [Info]: Logging Cash transactions to table 'cashlog'. [Info]: Logging Feeding items to table 'feedinglog'. [Info]: Connecting to the Map DB Server.... [Status]: Connect success! (Map Server Connection) [Info]: [SQL]: Connecting to the Log Database ragnarok At 127.0.0.1... [Status]: [SQL]: Successfully 'connected' to Database 'ragnarok'. [Status]: Loading maps (using db/re/map_cache.dat as map cache)... [Status]: Loading maps (using db/import/map_cache.dat as map cache)... [Info]: Successfully loaded '995' maps. [Info]: Done reading '0' messages in 'conf/msg_conf/import/map_msg_eng_conf.txt'. [Info]: Done reading '1210' messages in 'conf/msg_conf/map_msg.conf'. [Status]: Done reading '206' entries in 'conf/atcommands.yml' [Status]: Done reading '28' entries in 'db/re/instance_db.txt'. [Status]: Done reading '0' entries in 'db/import/instance_db.txt'. [Status]: Using packet version: 20180620. [Status]: Packet Obfuscation: Enabled. Keys: 0x00000000, 0x00000000, 0x00000000 [Status]: Done reading '197' entries in 'db/const.txt'. [Status]: Done reading '0' entries in 'db/import/const.txt'. [Status]: Done reading '13143' entries in 'db/re/item_db.txt'. [Status]: Done reading '0' entries in 'db/import/item_db.txt'. [Status]: Done reading '1' entries in 'db/item_avail.txt'. [Status]: Done reading '8' entries in 'db/re/item_stack.txt'. [Status]: Done reading '125' entries in 'db/item_nouse.txt'. [Status]: Done reading '0' entries in 'db/re/item_group_db.txt'. [Status]: Done reading '1022' entries in 'db/re/item_bluebox.txt'. [Status]: Done reading '923' entries in 'db/re/item_violetbox.txt'. [Status]: Done reading '440' entries in 'db/re/item_cardalbum.txt'. [Status]: Done reading '20' entries in 'db/item_findingore.txt'. [Status]: Done reading '617' entries in 'db/re/item_giftbox.txt'. [Status]: Done reading '1335' entries in 'db/re/item_misc.txt'. [Status]: Done reading '4118' entries in 'db/re/item_package.txt'. [Status]: Done reading '1249' entries in 'db/re/item_combo_db.txt'. [Status]: Done reading '186' entries in 'db/re/item_randomopt_db.txt'. [Status]: Done reading '204' entries in 'db/re/item_noequip.txt'. [Status]: Done reading '3662' entries in 'db/re/item_trade.txt'. [Status]: Done reading '41' entries in 'db/re/item_delay.txt'. [Status]: Done reading '1935' entries in 'db/re/item_buyingstore.txt'. [Status]: Done reading '1752' entries in 'db/re/item_flag.txt'. [Status]: Done reading '7' entries in 'db/re/item_randomopt_group.txt'. [Status]: Done reading '0' entries in 'db/import/item_avail.txt'. [Status]: Done reading '0' entries in 'db/import/item_stack.txt'. [Status]: Done reading '0' entries in 'db/import/item_nouse.txt'. [Status]: Done reading '0' entries in 'db/import/item_group_db.txt'. [Status]: Done reading '0' entries in 'db/import/item_bluebox.txt'. [Status]: Done reading '0' entries in 'db/import/item_violetbox.txt'. [Status]: Done reading '0' entries in 'db/import/item_cardalbum.txt'. [Status]: Done reading '0' entries in 'db/import/item_giftbox.txt'. [Status]: Done reading '0' entries in 'db/import/item_misc.txt'. [Status]: Done reading '0' entries in 'db/import/item_package.txt'. [Status]: Done reading '0' entries in 'db/import/item_combo_db.txt'. [Status]: Done reading '0' entries in 'db/import/item_randomopt_db.txt'. [Status]: Done reading '0' entries in 'db/import/item_noequip.txt'. [Status]: Done reading '0' entries in 'db/import/item_trade.txt'. [Status]: Done reading '0' entries in 'db/import/item_delay.txt'. [Status]: Done reading '0' entries in 'db/import/item_buyingstore.txt'. [Status]: Done reading '0' entries in 'db/import/item_flag.txt'. [Status]: Done reading '0' entries in 'db/import/item_randomopt_group.txt'. [Status]: Done reading '42' entries in 'db_roulette'. [Status]: Done reading '3' channels in 'conf/channels.conf'. [Status]: Done reading '0' entries in 'db/re/item_cash_db.txt'. [Status]: Done reading '0' entries in 'db/import/item_cash_db.txt'. [Status]: Done reading '0' entries in 'sales'. [Status]: Done reading '1201' entries in 'db/re/skill_db.yml' [Status]: Done reading '142' entries in 'db/re/skill_nocast_db.txt'. [Status]: Done reading '270' entries in 'db/re/produce_db.txt'. [Status]: Done reading '136' entries in 'db/create_arrow_db.txt'. [Status]: Done reading '74' entries in 'db/skill_changematerial_db.txt'. [Status]: Done reading '0' entries in 'db/skill_damage_db.txt'. [Status]: Done reading '0' entries in 'db/import/skill_nocast_db.txt'. [Status]: Done reading '0' entries in 'db/import/produce_db.txt'. [Status]: Done reading '0' entries in 'db/import/create_arrow_db.txt'. [Status]: Done reading '0' entries in 'db/import/skill_changematerial_db.txt'. [Status]: Done reading '0' entries in 'db/import/skill_damage_db.txt'. [Status]: Done reading '155' entries in 'db/abra_db.yml' [Status]: Done reading '16' entries in 'db/re/improvise_db.yml' [Status]: Done reading '23' entries in 'db/re/magicmushroom_db.yml' [Status]: Done reading '17' entries in 'db/re/spellbook_db.yml' [Status]: Done reading '1975' entries in 'db/re/mob_db.txt'. [Status]: Done reading '0' entries in 'db/import/mob_db.txt'. [Status]: Done reading '11457' entries in 'db/re/mob_skill_db.txt'. [Status]: Done reading '23' entries in 'db/re/mob_race2_db.txt'. [Status]: Done reading '0' entries in 'db/mob_item_ratio.txt'. [Status]: Done reading '40' entries in 'db/mob_chat_db.txt'. [Status]: Done reading '0' entries in 'db/re/mob_random_db.txt'. [Status]: Done reading '480' entries in 'db/re/mob_branch.txt'. [Status]: Done reading '14' entries in 'db/re/mob_poring.txt'. [Status]: Done reading '47' entries in 'db/re/mob_boss.txt'. [Status]: Done reading '331' entries in 'db/mob_pouch.txt'. [Status]: Done reading '345' entries in 'db/mob_mission.txt'. [Status]: Done reading '25' entries in 'db/mob_classchange.txt'. [Status]: Done reading '105' entries in 'db/re/mob_drop.txt'. [Status]: Done reading '0' entries in 'db/import/mob_skill_db.txt'. [Status]: Done reading '0' entries in 'db/import/mob_race2_db.txt'. [Status]: Done reading '0' entries in 'db/import/mob_item_ratio.txt'. [Status]: Done reading '0' entries in 'db/import/mob_chat_db.txt'. [Status]: Done reading '0' entries in 'db/import/mob_random_db.txt'. [Status]: Done reading '0' entries in 'db/import/mob_branch.txt'. [Status]: Done reading '0' entries in 'db/import/mob_poring.txt'. [Status]: Done reading '0' entries in 'db/import/mob_boss.txt'. [Status]: Done reading '0' entries in 'db/import/mob_pouch.txt'. [Status]: Done reading '0' entries in 'db/import/mob_mission.txt'. [Status]: Done reading '0' entries in 'db/import/mob_classchange.txt'. [Status]: Done reading '0' entries in 'db/import/mob_drop.txt'. [Status]: Done reading '37' entries in 'db/re/level_penalty.txt'. [Status]: Done reading '0' entries in 'db/import/level_penalty.txt'. [Status]: Done reading '175' entries in 'db/re/statpoint.txt'. [Status]: Done reading '151' entries in 'db/re/job_db1.txt'. [Status]: Done reading '150' entries in 'db/job_db2.txt'. [Status]: Done reading '16' entries in 'db/re/job_exp.txt'. [Status]: Done reading '90' entries in 'db/re/job_basehpsp_db.txt'. [Status]: Done reading '0' entries in 'db/re/job_param_db.txt'. [Status]: Done reading '61' entries in 'db/re/job_noenter_map.txt'. [Status]: Done reading '0' entries in 'db/import/statpoint.txt'. [Status]: Done reading '0' entries in 'db/import/job_db1.txt'. [Status]: Done reading '0' entries in 'db/import/job_db2.txt'. [Status]: Done reading '0' entries in 'db/import/job_exp.txt'. [Status]: Done reading '0' entries in 'db/import/job_basehpsp_db.txt'. [Status]: Done reading '0' entries in 'db/import/job_param_db.txt'. [Status]: Done reading '0' entries in 'db/import/job_noenter_map.txt'. [Status]: Done reading '6197' entries in 'db/re/skill_tree.txt'. [Status]: Done reading '0' entries in 'db/import/skill_tree.txt'. [Status]: Done reading '1' entries in 'conf/motd.txt'. [Status]: Done reading '0' entries in 'db/re/attendance.yml' [Status]: Done reading '8' groups in 'conf/groups.conf'. [Status]: Done reading '4' entries in 'db/re/attr_fix.txt'. [Status]: Done reading '243' entries in 'db/status_disabled.txt'. [Status]: Done reading '6' entries in 'db/re/refine_db.yml'. [Status]: Done reading '0' entries in 'db/import/attr_fix.txt'. [Status]: Done reading '0' entries in 'db/import/status_disabled.txt'. [Status]: Done reading '0' entries in 'db/import/refine_db.yml'. [Status]: Done reading '23' entries in 'db/size_fix.yml' [Status]: Done reading '1' entries in 'db/re/size_fix.yml' [Status]: Done reading '44' entries in 'db/castle_db.txt'. [Status]: Done reading '0' entries in 'db/import/castle_db.txt'. [Status]: Done reading '16' entries in 'db/re/guild_skill_tree.yml' [Status]: Done reading '90' entries in 'db/re/pet_db.yml' [Status]: Done reading '13' entries in 'db/re/homunculus_db.txt'. [Status]: Done reading '0' entries in 'db/import/homunculus_db.txt'. [Status]: Done reading '175' levels in 'db/re/exp_homun.txt'. [Status]: Done reading '0' levels in 'db/import/exp_homun.txt'. [Status]: Done reading '82' entries in 'db/homun_skill_tree.txt'. [Status]: Done reading '0' entries in 'db/import/homun_skill_tree.txt'. [Status]: Done reading '62' entries in 'db/mercenary_db.txt'. [Status]: Done reading '0' entries in 'db/import/mercenary_db.txt'. [Status]: Done reading '154' entries in 'db/mercenary_skill_db.txt'. [Status]: Done reading '0' entries in 'db/import/mercenary_skill_db.txt'. [Status]: Done reading '12' entries in 'db/elemental_db.txt'. [Status]: Done reading '0' entries in 'db/import/elemental_db.txt'. [Status]: Done reading '36' entries in 'db/elemental_skill_db.txt'. [Status]: Done reading '0' entries in 'db/import/elemental_skill_db.txt'. [Status]: Done reading '3687' entries in 'db/re/quest_db.yml' [Status]: Done reading '359' entries in 'db/re/achievement_db.yml' [Status]: Done reading '20' entries in 'db/re/achievement_level_db.yml' [Status]: Done reading '5' entries in 'db/battleground_db.yml' [Status]: Done loading '128' entries for '22' NPC Markets from 'market' table. [Info]: Done loading '20192' NPCs: -'3931' Warps -'297' Shops -'15964' Scripts -'3477' Spawn sets -'52523' Mobs Cached -'0' Mobs Not Cached [Info]: Checking '22' NPC Markets... [Status]: Done checking '22' NPC Markets. [Status]: Event 'OnInit' executed with '2424' NPCs. [Status]: Server is 'ready' and listening on port '5121'. [Status]: Attempting to connect to Char Server. Please wait. [Status]: Connecting to 127.0.0.1:6121 [Status]: Logging in to char server... [Status]: Successfully logged on to Char Server (Connection: '2'). [Status]: Sending maps to char server... [Status]: Event 'OnInterIfInit' executed with '0' NPCs. [Status]: Event 'OnInterIfInitOnce' executed with '1' NPCs. [Status]: Requested '44' guild castles from char-server... [Status]: Map-server connected to char-server 'MeuServidorLocal'. [Status]: Map Server is now online. [Info]: Received Fame List of '0' characters. [Status]: Received '44' guild castles from char-server. [Status]: Received '4' clans from char-server. [Info]: 'Gm Drakulya' logged in. (AID/CID: '2000004/150000', IP: '127.0.0.1', Group '99'). [Debug]: (map_mapname2mapid) mapindex_name2id: Map "eden" not found in index list! [Debug]: (atcommand_go) mapindex_name2id: Map "eden" not found in index list! [Debug]: pc_setpos: Passed mapindex(0) is invalid! [Debug]: (map_mapname2mapid) mapindex_name2id: Map "eden" not found in index list! [Debug]: (atcommand_go) mapindex_name2id: Map "eden" not found in index list! [Debug]: pc_setpos: Passed mapindex(0) is invalid! [Debug]: (map_mapname2mapid) mapindex_name2id: Map "eden" not found in index list! [Debug]: (atcommand_go) mapindex_name2id: Map "eden" not found in index list! [Debug]: pc_setpos: Passed mapindex(0) is invalid! [Debug]: (map_mapname2mapid) mapindex_name2id: Map "eden" not found in index list! [Debug]: (atcommand_go) mapindex_name2id: Map "eden" not found in index list! [Debug]: pc_setpos: Passed mapindex(0) is invalid! [Debug]: (map_mapname2mapid) mapindex_name2id: Map "eden" not found in index list! [Debug]: (atcommand_go) mapindex_name2id: Map "eden" not found in index list! [Debug]: pc_setpos: Passed mapindex(0) is invalid! [Debug]: (map_mapname2mapid) mapindex_name2id: Map "eden" not found in index list! [Debug]: (atcommand_go) mapindex_name2id: Map "eden" not found in index list! [Debug]: pc_setpos: Passed mapindex(0) is invalid! [Debug]: (map_mapname2mapid) mapindex_name2id: Map "eden" not found in index list! [Debug]: (atcommand_go) mapindex_name2id: Map "eden" not found in index list! [Debug]: pc_setpos: Passed mapindex(0) is invalid! [Debug]: (map_mapname2mapid) mapindex_name2id: Map "eden" not found in index list! [Debug]: (atcommand_go) mapindex_name2id: Map "eden" not found in index list! [Debug]: pc_setpos: Passed mapindex(0) is invalid! [Info]: Character 'Gm Drakulya' logged off. @Emistry Thank you for your answer! After adjusting as you've suggested I can use @go 37 and go to Eden! Big thanks for you both for you help! Solved!
  4. Hello everybody! I hope you're doing very well! So, I know the command @Go is for Cities only, right? But I would like to give a better experience to my future players by making the moc_para01 map (eden group map for quests and etc) accessible via the @go command. I was looking in the seach topics for any tutorial/guidance/old topics about creating custom maps, @go, turn a fild into a city, but i couldn't find my answer. Since i'm not creating a new map, just want to use the existing one as a city or in better words turn it as a destination available for @go command. Is it possible? I dont know if any of the steps i done was necessary, but I am trying my best to learn more, here is what i done: In the src\map\Atcommand.cpp file, I have inserted a line for the map and i did choose the number 745 for index after looking the db\map_index.txt and calculating which would be the map index. /*========================================== * @go [city_number or city_name] - Updated by Harbin *------------------------------------------*/ ACMD_FUNC(go) { int i; int town; char map_name[MAP_NAME_LENGTH]; 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 #ifdef RENEWAL { MAP_NOVICE, 18, 26 }, // 15=Training Grounds (Renewal) #else { MAP_NOVICE, 53, 111 }, // 15=Training Grounds #endif { 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, 201, 147 }, // 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 { MAP_LASAGNA, 193, 182 }, // 36=Lasagna { MAP_MOC_PARA01, 31, 14 }, // 745=Eden }; nullpo_retr(-1, sd); if( map_getmapflag(sd->bl.m, MF_NOGO) && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE) ) { clif_displaymessage(sd->fd,msg_txt(sd,995)); // You cannot use @go on this map. return 0; } memset(map_name, '\0', sizeof(map_name)); memset(atcmd_output, '\0', sizeof(atcmd_output)); // get the number town = atoi(message); if (!message || !*message || sscanf(message, "%11s", map_name) < 1 || town < 0 || town >= ARRAYLENGTH(data)) {// no value matched so send the list of locations const char* text; // attempt to find the text help string text = atcommand_help_string( command ); clif_displaymessage(fd, msg_txt(sd,38)); // Invalid location number, or name. if( text ) {// send the text to the client clif_displaymessage( fd, text ); } return -1; } // 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; } else if (strncmp(map_name, "eden", 2) == 0) { town = 745; } if (town >= 0 && town < ARRAYLENGTH(data)) { int16 m = map_mapname2mapid(data[town].map); if (m >= 0 && map_getmapflag(m, MF_NOWARPTO) && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif_displaymessage(fd, msg_txt(sd,247)); // You are not authorized to warp to this map. return -1; } if (sd->bl.m >= 0 && map_getmapflag(sd->bl.m, MF_NOWARP) && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) { clif_displaymessage(fd, msg_txt(sd,248)); // You are not authorized to warp from your current map. return -1; } if (pc_setpos(sd, mapindex_name2id(data[town].map), data[town].x, data[town].y, CLR_TELEPORT) == SETPOS_OK) { clif_displaymessage(fd, msg_txt(sd,0)); // Warped. } else { clif_displaymessage(fd, msg_txt(sd,1)); // Map not found. return -1; } } else { // if you arrive here, you have an error in town variable when reading of names clif_displaymessage(fd, msg_txt(sd,38)); // Invalid location number or name. return -1; } return 0; } In src\common\mapindex.hpp file, I have inserted a line for the map too. // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder #ifndef MAPINDEX_HPP #define MAPINDEX_HPP #include "../common/mmo.hpp" #define MAX_MAPINDEX 2000 //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" #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" #define MAP_MOC_PARA01 "eden" const char* mapindex_getmapname(const char* string, char* output); const char* mapindex_getmapname_ext(const char* string, char* output); unsigned short mapindex_name2idx(const char* name, const char *func); #define mapindex_name2id(mapname) mapindex_name2idx((mapname), __FUNCTION__) const char* mapindex_idx2name(unsigned short id, const char *func); #define mapindex_id2name(mapindex) mapindex_idx2name((mapindex), __FUNCTION__) int mapindex_addmap(int index, const char* name); int mapindex_removemap(int index); void mapindex_check_mapdefault(const char *mapname); void mapindex_init(void); void mapindex_final(void); #endif /* MAPINDEX_HPP */ In npc\re\mapflag\town.txt file I have insert a line for the map //===== rAthena Script ======================================= //= Mapflag: Town. //===== By: ================================================== //= Epoque //===== Current Version: ===================================== //= 1.1 //===== Compatible With: ===================================== //= rAthena Project //===== Description: ========================================= //= Designates a map as a town, granting mailbox access. //===== Additional Comments: ================================= //= 1.0 Renewal split. [Euphy] //= 1.1 Added Izlude duplicates. [Euphy] //============================================================ brasilis mapflag town dewata mapflag town dicastes01 mapflag town eclage mapflag town izlude_a mapflag town izlude_b mapflag town izlude_c mapflag town izlude_d mapflag town malangdo mapflag town malaya mapflag town mora mapflag town lasagna mapflag town moc_para01 mapflag town When I type @go, it doesnt shows Eden as a destination When I try to teleport there with @go 754 the server returns: "Go failed" with the destination list When I try @go Eden it returns Go Failed, Map not found... Thank you all in advance for anyhelp, I still looking for an answer by myself too. Greetings!
×
×
  • Create New...