viewing paste Online GM Detector v2.0.3 | Athena

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 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286
/*
   ||======================================================||
   ||                       NPC:                           ||
   ||======================================================||
   ||                Online GMs Detector                   ||
   ||======================================================||
   ||                    Version 2.0.3                     ||
   ||======================================================||
   ||                   Made by Streiker                   ||
   ||======================================================||
   ||                      Updates:                        ||
   ||                    (5 latests)                       ||
   ||                                                      ||
   || Version 1.9: Added new config options.               ||
   ||                                                      ||
   || Version 2.0:                                         ||
   ||             Fixed: small errors.                     ||
   ||             Deleted $@DG_Modo.                       ||
   ||             New options.                             ||
   ||             Added emotions   .                       ||
   ||             Fixed: in some situations the name of the||
   || npc was duplicated.                                  ||
   ||                                                      ||
   || Version 2.0.1:                                       ||
   ||              Fixed: a small error (.@gmd = .1)       ||
   ||                                                      ||
   || Version 2.0.2:                                       ||
   ||              Changed some do-whiles for whiles.      ||
   ||                                                      ||
   || Version 2.0.3:                                       ||
   ||              Changed some colors.                    ||
   ||              Optimized.                              ||
   ||======================================================||
   ||                     Description:                     ||
   ||                                                      ||
   || NPC that shows all the online GMs, with many         ||
   || configurations, and can show the map the gm is       ||
   || with option of don't show gms in hide                ||
   || can be configured in-game, supports @loadnpc.        ||
   ||======================================================||
   ||               Additional Comments:                   ||
   ||                                                      ||
   || If my english it's bad, only tell me in the forum,   ||
   || i'm an amateur in english.                           ||
   ||======================================================||
   ||======================================================||
*/
 
-   script  GM_Conf -1,{
 
OnInit:
 
    // --- Configuration ---
 
    // Name of the GMs of the server, add many as you need.
    setarray $@DG_GMS$[0],"GM 1",
                  "GM 2";
 
    setarray $@DG_GMH$[0], "GM 1", "GM 2"// GMs that him status won't be shown (special for event gms).
 
    set $@DG_Pagina, 5;     // GMs shown per page
 
    set $@DG_Mapa, 1;       // 1 = Will be shown the map of the GM 0 = Won't be shown.
 
    set $@DG_Hide, 0;       // 1 = Will be shown the map of gms in hide 0 = Won't be shown.
 
    set $@DG_Hide2, 1;      // 1 = Will be shown status gms in hide 0 = Won't be shown.
 
    set $@DG_C, 1;          // 1 = Will be shown the coordinates 0 = Won't be shown.
 
    /* Restricted maps ( The GMs won't be shown if they are in )
    dd many as you need */
    setarray $@DG_Mapas$[0], /* 1st map */ "map1",
                 /* 2nd map */ "map2",
                 /* 3rd map */ "map3";
    // NPC Name.
    set $@DG_Nombre$, "Online GMs";
 
    // Name while the npc talks.
    set $@DG_Nombre2$, "Online GMs Detector";
 
    // NPC Sprite.
    set $@DG_Sprite, 899;
 
    set $@DG_N_GM, 40;      // Minimum gm level for access to the gm menu.
 
    do {
        set .@gm_num,.@gm_num + 1;
        setnpcdisplay ( "Online GMs#"+ .@gm_num, $@DG_Sprite ) ;
    } while ( ! setnpcdisplay ( "Online GMs#"+ .@gm_num + 1, $@DG_Nombre$+"#"+ .@gm_num + 1 ) ) ;
    set .DG_init, 1;
    end ;
}
 
prontera,150,188,4  script  Online GMs#1::GM    899,{
 
    if ( ! getvariableofnpc ( .DG_init, "GM_Conf" ) ) donpcevent "GM_Conf::OnInit" ;
    set .@DG_n$, "^2b86b5"+ $@DG_Nombre2$ +"^000000";
 
    emotion 20 ;
    if ( getgmlevel() >= $@DG_N_GM ) {
        MenuGM:
        set .@gm_menu, 0;
        while ( .@gm_menu < 3 ) {
            if ( .@gm_menu < 3 ) mes .@DG_n$;
            mes "Hi GM "+ strcharinfo(0) +" what do you want to do?";
            next ;
            set .@gm_menu, select ( "Add a new GM", "Modify current GMs", "Player View", "^911b1bExit^000000" ) ;
            mes .@DG_n$;
            if ( .@gm_menu < 3 ) {
                switch ( .@gm_menu ) {
 
                    case 1:
 
                    mes "Input the name of the GM";
                    mes "^0080000 or space ^000000to cancel.";
                    input .@new_gm$ ;
                    if ( .@new_gm$ != "0" && .@new_gm$ != " " ) {
                        set .@gm_i2, 0;
                        for ( set .@gm_i,0; .@gm_i < getarraysize ( $@DG_GMS$ ); set .@gm_i, .@gm_i + 1 ) if ( .@new_gm$ == $@DG_GMS$[ .@gm_i ] ) set .@gm_i2, .@gm_i2 + 1;
                        if ( .@gm_i2 ) mes "This GM already exists!";
                        if ( ! .@gm_i2 ) {
                            set $@DG_GMS$[ getarraysize ( $@DG_GMS$ ) ], .@new_gm$;
                            mes "The gm has been added successfully.";
                        }
                    }
                    next ;
                    break ;
 
                    case 2:
 
                    mes "Choose the GM to modify.";
                    set .@gm_list, 0;
                    set .@m$, "";
                    while ( .@gm_list < getarraysize ( $@DG_GMS$ ) ) {
                        set .@m$, .@m$ + $@DG_GMS$[ .@gm_list ] +":";
                        set .@gm_list, .@gm_list + 1;
                        if ( ! .@gm_list % 100 ) sleep2 1 ;
                    }
                    set .@m$, .@m$ +":^911b1bExit^000000";
                    set .@gm_c, select ( .@m$ ) - 1;
                    next ;
                    if ( $@DG_GMS$[.@gm_c] == "" ) break ;
                    mes .@DG_n$;
                    mes "What do you want to do with this GM?";
                    set .@gm_opcion, select ( "Modify", "Raise", "Lower", "^e8052fDelete^000000", "^911b1bExit^000000" );
                    next ;
                    if ( $@DG_GMS$[.@gm_c] != "" ) mes .@DG_n$;
                    switch ( .@gm_opcion ) {
 
                        case 1:
 
                        set .@gm_old$, $@DG_GMS$[ .@gm_c ];
                        mes "Input the new name of ^800000"+ $@DG_GMS$[ .@gm_c ];
                        input .@new_gmd$ ;
                        set $@DG_GMS$[ .@gm_c ], .@new_gmd$;
                        mes "^b1001d "+ .@gm_old$ +" ^000000modified to ^2cc8ef"+ $@DG_GMS$[ .@gm_c ] +".";
                        break ;
 
                        case 2:
 
                        if ( .@gm_c != 0 ) callfunc "Change_Pos", 1, .@gm_c, "$@DG_GMS$";
                        mes ( ( .@gm_c == 0 ) ? "^d50d32This GM already is in the top!^000000" : "The GM has been raised successfully" );
                        break ;
 
                        case 3:
 
                        if ( .@gm_c != ( getarraysize ( $@DG_GMS$ ) - 1 ) ) callfunc "Change_Pos", 2, .@gm_c, "$@DG_GMS$";
                        mes ( ( .@gm_c == ( getarraysize ( $@DG_GMS$ ) - 1 ) ) ? "^d50d32This GM already is in the bottom!^000000" : "This GM has been lowered successfully" );
                        break ;
 
                        case 4:
 
                        set $@DG_GMS$[ .@gm_c ], "";
                        mes "The GM has been deleted successfully.";
                        break ;
                        
 
                        default:
 
                        break ;
                    }
                    next ;
                }
            }
            if ( .@gm_menu == 4 ) set .@a, 2;
        }
    }
    if ( ! .@gm_menu ) mes .@DG_n$;
    if ( ! .@a ) {
        mes "Hi "+ strcharinfo(0) +", would you like to see the Online GMs at this moment?";
        next;
        set .@a, select ( "See Online GMs", "^911b1bExit^000000 " ) ;
        mes .@DG_n$;
    }
    if ( .@a == 1 ) {
        mes "Now i'll show the online gms to you.";
 
        emotion 33 ;
        next ;
        set .@total_gm, getarraysize( $@DG_GMS$ ) ;
        for ( set .@g, 0; .@g < .@total_gm ; set .@g, .@g + $@DG_Pagina ) {
            for ( set .@gm, .@g; .@gm < .@g + $@DG_Pagina && ( .@gm < .@total_gm ) ; set .@gm,.@gm + 1 ) {
                if ( .@gm % $@DG_Pagina == 0 ) mes .@DG_n$;
                set .@e, getcharid( 3, $@DG_GMS$[.@gm] ) ;
                if ( ! .@gm % $@DG_Pagina ) mes "^065cb5===========================^000000";
                set .@o, getcharid( 3 ) ;
                if ( .@e ) attachrid .@e ;
                set .@h, checkoption ( 0x40 ) ;
                if ( .@e ) attachrid .@o ;
                if ( $@DG_GMS$[.@gm] != "" ) {
                    for ( set .@gd, ( set ( .@gmd, 0 ) ); .@gd < getarraysize ( $@DG_GMH$ ) ; set .@gd, .@gd + 1 ) if ( $@DG_GMH$[.@gd] == $@DG_GMS$[.@gm] ) set .@gmd, 1;
                    mes $@DG_GMS$[.@gm] +" (Current Status: "+ ( ( .@e && ( ( ! .@gmd ) || ( $@DG_Hide2 && .@h ) ) )  ? "^4ca24cOnline" : "^a61616Offline" ) +")^000000";
                    if ( $@DG_Mapa ) && ( .@e ) {
                        set .@nomapa, 0;
                        attachrid .@e ;
                        getmapxy .@mapa$, .@x, .@y, 0 ;
                        set .@m, 0;
                        while ( .@m < getarraysize ( $@DG_Mapas$ ) ) {
                            if ( ( .@mapa$ == $@DG_Mapas$[ .@m ] ) || ( .@h && ! $@DG_Hide ) || .@gmd ) set .@nomapa, 1;
                            set .@m, .@m + 1;
                            if ( ! .@m % 100 ) sleep2 1 ;
                        }
                        attachrid .@o ;
                        mes ( ( ! .@nomapa ) ? "Current map: ^0617fd"+ .@mapa$ +"^000000 "+( ( $@DG_C ) ? "^237255"+ .@x +","+ .@y +"^000000" : "" ) : "");
                    }
                    mes "^065cb5===========================^000000";
                }
            }
            next ;
        }
    }
    if ( .@gm_menu && .@a != 2 ) {
        set .@a, 0;
        goto MenuGM;
    }
    if ( .@a == 1 && ! .@gm_menu ) {
        next ;
        mes .@DG_n$;
    }
    mes "Have a nice day";
    close2 ;
 
    emotion 12 ;
 
    end ;
}
 
 
// Function for change the positions.
// Can be used with other scripts
// callfunc "Change_Pos", ( 1 = Lower 2 = Raise ), Position (Array), "Variable";
 
function    script  Change_Pos  {
 
    set .@a, getarg ( 0, 0 );
    set .@b$, getd ( getarg ( 2 )+"["+ getarg ( 1 ) +"]");
    set .@c$, getd ( getarg ( 2 )+"["+ ( ( .@a == 1 ) ? getarg ( 1 ) - 1 : getarg ( 1 ) + 1 ) +"]");
    setd getarg ( 2 )+"["+ ( ( .@a == 1 ) ? getarg ( 1 ) - 1 : getarg ( 1 ) + 1 ) +"]", .@b$;
    setd getarg ( 2 )+"["+ getarg ( 1 ) +"]", .@c$;
    return ;
}
 
morocc,153,94,4 duplicate(GM)   Online GMs#2    899
geffen,116,73,4 duplicate(GM)   Online GMs#3    899
payon,178,100,4 duplicate(GM)   Online GMs#4    899
alberta,186,140,4   duplicate(GM)   Online GMs#5    899
izlude,131,120,4    duplicate(GM)   Online GMs#6    899
aldebaran,143,116,4 duplicate(GM)   Online GMs#7    899
xmas,151,134,4  duplicate(GM)   Online GMs#8    899
comodo,186,149,4    duplicate(GM)   Online GMs#9    899
yuno,150,183,4  duplicate(GM)   Online GMs#10   899
amatsu,200,85,4 duplicate(GM)   Online GMs#11   899
gonryun,164,119,4   duplicate(GM)   Online GMs#12   899
umbala,105,161,4    duplicate(GM)   Online GMs#13   899
niflheim,187,188,4  duplicate(GM)   Online GMs#14   899
louyang,202,107,4   duplicate(GM)   Online GMs#15   899
jawaii,250,139,4    duplicate(GM)   Online GMs#16   899
ayothaya,145,111,4  duplicate(GM)   Online GMs#17   899
einbroch,59,199,4   duplicate(GM)   Online GMs#18   899
einbech,172,120,4   duplicate(GM)   Online GMs#19   899
lighthalzen,155,106,4   duplicate(GM)   Online GMs#20   899
hugel,99,152,4  duplicate(GM)   Online GMs#21   899
rachel,142,142,4    duplicate(GM)   Online GMs#22   899
veins,220,132,4 duplicate(GM)   Online GMs#23   899
moscovia,231,197,4  duplicate(GM)   Online GMs#24   899
Viewed 846 times, submitted by Guest.