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

           
               
         

                                                                                 

                                                   




                                                  
                                       


          

                  



                                                         
                           






                                                             


                                                         


                                                   
                                                                                               
     








                                                                                               















                                                                                               








                                                                                                                      




                                                                           
                                                                           
                                                                      



                                                                             
                                    
 
                           

                                               
                                              
                                             
                                             











                                                         
                                            
                                            
                                            
                                            
                                           
                                   


               
                       
                        



                                           

                  

                                               






                                                                          

 
// TMW-2 Script.
// Author:
//    Saulc
//    Jesusalva
// Notes:
//    Tulim banker, and also handles PCLogin events: CheckClientVersion, and bank
//    Take care of server updates, but instances are defined on their ships.

003-3,36,34,0	script	Malindou	NPC_LLOYD,{
    function	UpdateBF {
        .@o=getbattleflag(getarg(0));
        setbattleflag(getarg(0), .@o+getarg(1,0));
    }

    Banker(.name$, "Tulimshar", 14000);
    close;

OnInit:
    .sex = G_MALE;
    .distance = 4;

    // Update handler (use `date +%s` for this)
    // Current UPDATE value: Qui Jun  7 08:10:55 -03 2018
    if ($UPDATE  < 1528369855) {
        $UPDATE=1528369855;
        debugmes "Warning.";
        debugmes "Warning.";
        debugmes "Warning: This introduces a server update:";
        debugmes "";
        debugmes "* Please create the imported guild";
        debugmes "";
    }
    // Current UPDATE value: Dom Jun 17 21:32:45 -03 2018
    if ($UPDATE < 1529281965) {
        $UPDATE=1529281965;
        debugmes "";
        debugmes "* Please set #BankP for bankers";
        debugmes "";
        //$HASAN_GP=rand(3,12)+rand(3,12)+rand(3,12); // Already initialized on the main server
    }
    // Current UPDATE value: Dom Jun 30 22:44:46 -03 2018
    if ($UPDATE < 1530409486) {
        $UPDATE=1530409486;
        debugmes "";
        debugmes "* Clearing invalid items";
        debugmes "";
        DelItemFromEveryPlayer(729);
        //$HASAN_GP=rand(3,12)+rand(3,12)+rand(3,12); // Already initialized on the main server
    }
    // Current UPDATE value: Qui Jul 12 02:40:02 -03 2018
    if ($UPDATE < 1531374002) {
        $UPDATE=1531374002;
        debugmes "";
        //debugmes "* DESTROYING EVERY POLISHED EMERALD OR AMETHYST";
        //debugmes "* Reason: Item ID Violation!";
        debugmes "* WARNING! WARNING! WARNING!";
        debugmes "* ITEM ID VIOLATION DETECTED!";
        debugmes "";
        debugmes "* ALL POLISHED EMERALDS BECOME POLISHED AMETHYSTS, AND VICE-VERSA!";
        debugmes "* All players must contact a GM to do the swap.";
        debugmes "";
        //DelItemFromEveryPlayer(5033);
        //DelItemFromEveryPlayer(5036);
        //$HASAN_GP=rand(3,12)+rand(3,12)+rand(3,12); // Already initialized on the main server
    }
    if ($UPDATE < 1533229097) {
        $UPDATE=1533229097;
        debugmes "";
        debugmes "* ERASING all victories with Fafi Dragon";
        debugmes "";
        query_sql("UPDATE `quest` SET `count1` = '1' WHERE `quest`.`quest_id`="+LoFQuest_Fairy+" AND `count1` = '2'");
        query_sql("UPDATE `quest` SET `count1` = '2' WHERE `quest`.`quest_id`="+LoFQuest_Fairy+" AND `count1` = '3'");
        DelItemFromEveryPlayer(SkullMask);
    }




    // This mensures Contributors Credits, and changes only during updates.
    // All names in lower case. standard: 100 points. Non-TMW2 contributors
    // should be disregarded if they're not involved with the project.

    // You may get more points for complexity, difficulty, usability, etc.
    // You may get less points if you don't do it yourself, eg. a bug report.

    // See 003-2/lua.txt for rewards

    $@CONTRIBUTORS = htnew;
    htput($@CONTRIBUTORS, "jesusalva",  15000);
    htput($@CONTRIBUTORS, "saulc",      12500);
    htput($@CONTRIBUTORS, "lawncable",  1600);
    htput($@CONTRIBUTORS, "polaczka",   700);
    htput($@CONTRIBUTORS, "crazyfefe",  641);
    htput($@CONTRIBUTORS, "4144",       550);
    htput($@CONTRIBUTORS, "soren",      450);
    htput($@CONTRIBUTORS, "rakinorf",   400);
    htput($@CONTRIBUTORS, "pookie",     260);
    htput($@CONTRIBUTORS, "ayruss",     210);
    htput($@CONTRIBUTORS, "dustman",    175);
    htput($@CONTRIBUTORS, "acsvln",     150);
    htput($@CONTRIBUTORS, "ichigoblack",100);
    htput($@CONTRIBUTORS, "acsvln",     100);
    htput($@CONTRIBUTORS, "gnulinux",   80);
    htput($@CONTRIBUTORS, "skydragon",  75);
    htput($@CONTRIBUTORS, "guy of lieutnant dausen", 70);
    htput($@CONTRIBUTORS, "dustman",    50);
    htput($@CONTRIBUTORS, "msawis",     30);
    htput($@CONTRIBUTORS, "dragonstar", 26);
    htput($@CONTRIBUTORS, "demure",     12);
    htput($@CONTRIBUTORS, "xtreem",     1);
    //htput($@CONTRIBUTORS, "", 1);
    end;

OnPCLoginEvent:
    checkclientversion;
    if (#MerchantBank) {
        BankVault += max(0, #MerchantBank);
        #MerchantBank = 0;
    }
    end;

OnInterIfInitOnce:
    if (getbattleflag("monster_hp_rate") > 100)
        end;
    // We must also apply penalty for losing Mana Fragments
    // Forest Mana Fragment is lost: (+1% HP, +5% pop, 20s faster removal)
    UpdateBF("monster_hp_rate",1);
    UpdateBF("mob_count_rate",5);
    UpdateBF("mob_remove_delay",-20000);
    // Just copy these lines as fragments are lost
    end;
}