viewing paste Unknown #15048 | Text

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
Index: conf/atcommand_athena.conf
===================================================================
--- conf/atcommand_athena.conf  (revision 15132)
+++ conf/atcommand_athena.conf  (working copy)
@@ -667,6 +667,9 @@
 // Set the server to night.
 night: 80,100
 
+// Recalls everyone in spesific map to your coordinates
+recallmap: 80,80
+
 // Recalls Everyone To Your Coordinates
 recallall: 80,80
 
Index: conf/msg_athena.conf
===================================================================
--- conf/msg_athena.conf    (revision 15132)
+++ conf/msg_athena.conf    (working copy)
@@ -573,5 +573,7 @@
 650: Baby Shadow Chaser
 651: Unknown Job
 
+999: All characters from %s recalled!
+
 //Custom translations
 import: conf/import/msg_conf.txt
Index: src/map/atcommand.c
===================================================================
--- src/map/atcommand.c (revision 15132)
+++ src/map/atcommand.c (working copy)
@@ -4058,6 +4058,64 @@
 }
 
 /*==========================================
+ * Recall all characters from spesific map
+ * to your location [FatalEror]
+ *------------------------------------------*/
+ACMD_FUNC(recallmap)
+{
+   struct map_session_data* pl_sd;
+   struct s_mapiterator* iter;
+   unsigned short mapindex;
+   int m = -1;
+
+   nullpo_retr(-1, sd);
+
+   memset(atcmd_output, '\0', sizeof(atcmd_output));
+
+   if (!message || !*message) {
+       clif_displaymessage(fd, "Please, enter a map name (usage: @recallmap <map>).");
+       return -1;
+   }
+
+   mapindex = mapindex_name2id(message);
+   if (mapindex)
+       m = map_mapindex2mapid(mapindex);
+
+   if (!mapindex) {
+       clif_displaymessage(fd, msg_txt(1)); // Map not found.
+       return -1;
+   }
+
+   if (sd->bl.m >= 0 && map[sd->bl.m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+       clif_displaymessage(fd, "You are not authorised to warp somenone to your actual map.");
+       return -1;
+   }
+
+   iter = mapit_getallusers();
+   for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
+   {
+       if (pl_sd->bl.m == m && sd->status.account_id != pl_sd->status.account_id && pc_isGM(sd) >= pc_isGM(pl_sd))
+       {
+           if (!map[pl_sd->bl.m].flag.nowarp && battle_config.any_warp_GM_min_level < pc_isGM(sd)) {
+               if (pl_sd->state.autotrade) //Can't recall player in Autotrade mode
+                   continue;
+               if (pc_isdead(pl_sd)) { //Wake them up
+                   pc_setstand(pl_sd);
+                   pc_setrestartvalue(pl_sd,1);
+               }
+               pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN);
+           }
+       }
+   }
+   mapit_free(iter);
+
+   sprintf(atcmd_output, msg_txt(999), map[m].name); //All characters from %s recalled!
+   clif_displaymessage(fd, atcmd_output);
+
+   return 0;
+}
+
+/*==========================================
  * Recall All Characters Online To Your Location
  *------------------------------------------*/
 ACMD_FUNC(recallall)
@@ -8922,6 +8980,7 @@
    { "idsearch",          60,60,     atcommand_idsearch },
    { "broadcast",         40,40,     atcommand_broadcast }, // + /b and /nb
    { "localbroadcast",    40,40,     atcommand_localbroadcast }, // + /lb and /nlb
+   { "recallmap",         80,80,     atcommand_recallmap },
    { "recallall",         80,80,     atcommand_recallall },
    { "reloaditemdb",      99,99,     atcommand_reloaditemdb },
    { "reloadmobdb",       99,99,     atcommand_reloadmobdb },
 
Viewed 574 times, submitted by Guest.