summaryrefslogblamecommitdiff
path: root/npc/003-1/michel.txt
blob: 5278c306588a6eae5438ecd9df22f73c078e8779 (plain) (tree)
1
2
3
4
5
6
7
8
9
               
          

               
                                                  
 
                                             
 
         
                                                                    
 
                  
 
                                                                       
                                   
 
         
                  
 
                                                           
                                 
 
         




                                                                           
                                                       







                                                                                                                         
                              
          
 






















                                                                                                              
                                                                                                         




                                    
                                        
                                           

                                                                                                 




                       

                  
                  
        
 
// TMW-2 Script
// Author:
//    Jesusalva
// Description:
//    This stuff should be moved somewhere else...

003-1,89,109,0	script	Michel	NPC_BACCHUS,{

    mesn;
    mesq l("These people have lots of unspent Strange Coins! Waw!");

    HallOfCoins();

    // Anyone with GM Level, staff or not, is allowed to latest GM logs
    if (!getgmlevel()) goto L_Main;

    next;
    HallOfGMLog();

    // Only Admins are allowed to change the HoF Scoreboard
    if (!is_admin()) goto L_Main;

    next;
    mes "##BGM Information##b";
    mes "We are currently relying in Karma to generate this Hall Of Fame.";
    mes "";
    mes "##B Manual Edition ##b";
    mes "To reliably change Karma values, you must use @set Karma.";
    mes "But watch out: This command overrides karma!";
    mes "Therefore, it is advised to DON'T change this by hand.";
    mes "";
    mes "##B Scripting Edition ##b";
    mes "Is known to work. This hall of fame will need a few minutes to update itself.";
    mes "";
    mes "##B Technical Notes ##b";
    mes "In future we may start Fame field directly (but it is not displayed on client, thus, we decided to use Karma).";
    //set Karma, Karma + 5;
    if (is_admin()) goto L_GM;
    close;

L_Main:
    if (!$REFERRAL_IDS[#REFERRAL_PROG])
        close;
    next;
    mesn;
    mesq l("Hey, I see you have appointed @@ players to this game. Good job!", $REFERRAL_IDS[#REFERRAL_PROG]);
    close;

L_GM:
    .@nb = query_sql("SELECT SUM(value) FROM `mapreg` WHERE varname='$REFERRAL_IDS' LIMIT 2", .@value);
    @total=.@value[0];
    mesc "Referral Event status: " + ($REFERRAL_ENABLED ? "##2ACTIVE##0" : "##1INACTIVE##0");
    mesc "Total refers count: "+@total;
    mes "";
    select
        "Close",
        "Toggle Referral Event",
        "Scoreboard",
        "CLEAR REFERRAL ID ARRAY",
        "Close";
    mes "";
    switch (@menu) {
        case 2:
            $REFERRAL_ENABLED=!$REFERRAL_ENABLED; logmes "Enabled REFER event.", LOGMES_ATCOMMAND; break;
        case 3:
            HallOfReferral(); break;
        case 4:
            mesc "Are you sure?", 1;
            next;
            if (askyesno() == ASK_YES) {
                deletearray($REFERRAL_IDS);
                logmes "##1Deleted PERMANENTLY the REFER event scoreboard.##0", LOGMES_ATCOMMAND;
            }
        default: close;
    }
    next;
    goto L_GM;

OnInit:
    .sex = G_MALE;
    .distance = 5;
    end;
}