summaryrefslogblamecommitdiff
path: root/npc/009-2/ryan.txt
blob: 73302f2511224e03479d876392151c603a4c89e8 (plain) (tree)
1
2
3
4
5
6
7
8
9







                                            
                                    

                                                           
                 
                        
                      
                            

                                          
 







                                                                                                                  
                                                                      





                              
                                                     
 



                                                        
                               

                                                 
                                            



                             
                                                       


                                          
                                            
                           
                         


                                                                                  
     
                    

                                               
     
 
                                                                  








                                                                                                                     
                    

                                               
     
                    

                                                 
     
                                                                      

                                            
                                 
                                

                                       
                                                   
                                                         


                                                                                                                                                  

                                                
     







                                          




                                                                                                          








                                                                                                                  
       
                               


                                                         
                                            




                                            




                                                                              


        
// TMW-2 Script.
// Author:
//    Saulc
//    Jesusalva
// Notes:
//    Buys Tonori Delight

009-2,29,57,0	script	Ryan	NPC_PLAYER,{
    if (BaseLevel < 17) goto L_Weak;
    if (!getq(HalinarzoQuest_LifeDelight)) goto L_Prologue;
    .@q=getq2(HalinarzoQuest_LifeDelight);
    if (.@q < 25)
        .@a=(.@q**2)+18;
    else if (.@q < 50)
        .@a=625+18*(.@q-24);
    else
        .@a=1092+(.@q*(.@q < 75 ? 2 : 3));

    if (.@q > 100) goto L_Complete;
    mesn;
    mesq l("Ah, I just wanted @@... Yummy, lovely @@...", getitemlink(TonoriDelight), getitemlink(TonoriDelight));
    next;
    mesn;
    mesq l("If you bring me @@ @@, I'll give you a reward!", .@a, getitemlink(TonoriDelight));
    next;
    select
        rif(countitem(TonoriDelight) >= .@a, l("I have everything!")),
        l("Ah, not now...");
    mes "";
    if (@menu == 2)
        close;

    inventoryplace ChefHat, 1;
    inventoryplace PlatinumIngot, 1, IridiumIngot, 2;

    // Generic rewards: XP Boost (.@l) and GP boost (.p)
    .@l=BaseLevel+JobLevel;

    // Main reward
    delitem TonoriDelight, .@a;
    getexp rand(.@a, .@a*2)+.@q*rand(10,30), .@l;
    Zeny=Zeny+.@a*.p;
    setq2 HalinarzoQuest_LifeDelight, .@q+1;
    mesn;
    mesq l("Hmmm... Yummy!");

    // Landmark rewards
    // Chef hat last stage: 120 Delights - 583 in total
    .@r=getq(HalinarzoQuest_LifeDelight);
    .@q=getq2(HalinarzoQuest_LifeDelight);
    if (.@r < 2 && .@q >= 11) {
        setq1 HalinarzoQuest_LifeDelight, 2;
        getitem ChefHat, 1;
        getexp 13500, 10;
        next;
        mesn;
        mesq l("Ah, you really deserve this @@. Good job!", getitemlink(ChefHat));
    }
    if (.@q >= 21) {
        Zeny+=rand2(1,.@a)*.p;
        getexp rand2(1,.@q)*.@l, rand2(1, .@q);
    }

    // Elixir Of Life last stage: ~1075 Delights - 26,825 in total
    if (.@r < 3 && .@q >= 51) {
        setq1 HalinarzoQuest_LifeDelight, 3;
        getitem ElixirOfLife, 1;
        getexp 30000, 5000;
        next;
        mesn;
        mesq l("Hey, take this @@. It heals fully but who cares, I have Tonori Delight!", getitemlink(ElixirOfLife));
    }

    if (.@q >= 51) {
        Zeny+=rand2(.@q,.@a)*.p;
        getexp rand2(1,.@a)*.@l, rand2(1, .@q);
    }
    if (.@q >= 91) {
        Zeny+=rand2(.@a, .@a+.@q)*.p;
        getexp rand2(.@q,.@a)*.@l, rand2(1, .@q);
    }
    // Platinum + Iridium last stage: ~1390 Delights - 91,050 in total
    if (.@r < 4 && .@q == 100) {
        setq1 HalinarzoQuest_LifeDelight, 4;
        getitem PlatinumIngot, 1;
        getitem IridiumIngot, 2;
        getitem EquipmentBlueprintE, 2;
        getitem AlchemyBlueprintE, 2;
        Mobpt+=1000000; // 1 Million Monster Points
        getexp 500000, 50000; // Reference: Lv 74 / Lv 38
        next;
        mesn;
        mesq l("Ah, I have enough @@ for a life! Take this EXTREMELY RARE @@. Good job!", getitemlink(TonoriDelight), getitemlink(PlatinumIngot));
        mesc l("Got Master Blueprints!");
        mesc l("Got 1,000,000 Monster Points!");
    }

    close;

L_Complete:
    mesn;
    mesq l("Thanks for the help! Yummy!");
    close;

L_Weak:
    mesn;
    mesq l("How did you even got here? There are dangerous swamps north, and dangerous deserts south...");
    close;

L_Prologue:
    setq HalinarzoQuest_LifeDelight, 1, 0;
    mesn;
    mesq l("Ah, I just wanted @@... Yummy, lovely @@...", getitemlink(TonoriDelight), getitemlink(TonoriDelight));
    next;
    mesn;
    mesq l("There's a big prize in the end... Could you bring me some later?");
    close;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, ChefHat);
    setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe);
    setunitdata(.@npcId, UDT_HEADBOTTOM, CottonTrousers);
    setunitdata(.@npcId, UDT_WEAPON, Boots);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 2);

    .sex = G_MALE;
    .distance = 4;
    .p=97; // Price in GP of each Tonori Delight.
    // real price is 556 in ingredients (this gets a x2 sell price)
    // + 120 GP of taxes
    // Total: 676 GP per batch (5~9 units). We consider the average batch (7).
    // NO EXTRA PROFIT IS REQUIRED/ALLOWED.
    end;
}