viewing paste Unknown #15668 | 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
prontera,50,73,4    script  General 78,{
 
    mes .name$;
    mes "I have the strongest Warriors in my Army!";
    mes "You do not believe me? Arrgh!!";
    mes "Check my list of the Top Players!";
    switch(select("Show me your list!:No, thanks")){
        case 1:
            next;
            mes .name$;
            mes "Ok, I'll show you my Top 10 lists!";
            mes "Sort by:";
            //.@count = query_sql("SELECT `char_name`, `damage`, `mob_id`, `job_id` FROM `table` ORDER BY damage DESC LIMIT 10" .@char_name$, .@damage, .@mob_id, .@job_id);
            switch(select("~Mob ID:~Damage:~Class")){
                case 1:
                    next;
                    mes .name$;
                    mes "Please choose a Mob: ";
                    input .@input;
                    .@count = query_sql("SELECT `char_name`, `damage`, `job_id` FROM `highdamage` WHERE mob_id = " + .@input + " ORDER BY damage DESC LIMIT 10", .@char_name$, .@damage, .@job_id);
                    next;
                    mes .name$;
                    mes "["+getmonsterinfo(.@input,0)+"]";
                    for(.@i = 0; .@i < .@count; .@i++){
                        mes .@char_name$[.@i] + ", " + .@damage[.@i] + " Dmg with " + jobname(.@job_id[.@i]);
                    }
                    break;
                case 2:
                    next;
                    mes .name$;
                    mes "[Highest Damage]";
                    .@count = query_sql("SELECT `char_name`, `damage`, `mob_id`, `job_id` FROM `highdamage` ORDER BY damage DESC LIMIT 10", .@char_name$, .@damage, .@mob_id, .@job_id);
                    for(.@i = 0; .@i < .@count; .@i++){
                        mes .@damage[.@i] + " Dmg, by " + .@char_name$[.@i] + " with " + jobname(.@job_id[.@i]);
                    }
                    break;
                case 3:
                    next;
                    mes .name$;
                    mes "Please select a class:";
                    mes "nonthird"+((.thirdclass)?" ~ ^FF0000Third Class^000000":"");
                    set .@menu$,"";
                    if(.thirdclass){
                        setarray .@joblist[0], 4054, 4055, 4056, 4057, 4058, 4059, 4066, 4067, 4068, 4069, 4070, 4071;
                        setarray .@joblist2[0], 4060, 4061, 4062, 4063, 4064, 4065, 4073, 4074, 4075, 4076, 4077, 4078;
                        for(.@i = 0; .@i < getarraysize(.@joblist); set .@i,.@i + 2){
                            set .@menu$, .@menu$+" ~ "+jobname(.@joblist[.@i])+":";
                        }
                        set .@menu$, .@menu$+" ~ ^777777Cancel^000000";
                    }else{
                        for(.@i = 4008; .@i < 4022; .@i++){
                            set .@menu$, .@menu$+" ~ "+jobname(.@i)+":";
                        }
                        set .@menu$, .@menu$+" ~ ^777777Cancel^000000";
                    }
                    set .@c, select(.@menu$);
                    next;
                    mes .name$;
                    if(.thirdclass){
                        dispbottom .@joblist[.@c - 1] + " : " + .@joblist2[.@c - 1];
                        mes "["+jobname(.@joblist[.@c])+"]";
                        .@count = query_sql("SELECT `char_name`, `damage`, `mob_id` FROM `highdamage` WHERE `job_id` = "+ .@joblist[.@c - 1] +" OR `job_id` = "+ .@joblist2[.@c - 1] +" ORDER BY damage DESC LIMIT 10", .@char_name$, .@damage, .@mob_id);
                    }else{
                        mes "["+jobname(.@c + 4007)+"]";
                        .@count = query_sql("SELECT `char_name`, `damage`, `mob_id` FROM `highdamage` WHERE `job_id` = "+ (jobname(.@c + 4007)) +" ORDER BY damage DESC LIMIT 10", .@char_name$, .@damage, .@mob_id);
                    }
                    for(.@i = 0; .@i < .@count; .@i++){
                        mes .@char_name$[.@i] + ", " + .@damage[.@i] + " Dmg at " + getmonsterinfo(.@mob_id[.@i],0);
                    }
                    break;
            }
            break;
        case 2:
            next;
            mes .name$;
            mes "Are you afraid?!";
            break;
    }
    close;
    
OnInit:
    set .thirdclass, 1;
    set .name$, "[~ General ~]";
}
Viewed 551 times, submitted by Guest.