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


                
               

                                                          
 
                                          
 
                               

                                     
                                

                                    
                                                                        




                                                                                                                                  
                
                                                    
                                                                                                     


         
 




                                                
                   
                                                               
                   
                                                                
                   
                                                






                                                                                                                                                          
                      
         
     
 
                       



                                                                                                                              
         

                                                                 
                                                               
                          
 



                               


                                                                                                                                     
             
                             





                
                               





                                                     
 

                  

        
// TMW2 scripts.
// Author:
//    Saulc
//    Jesusalva
// Description:
//    Eistein rewards players for getting level landmarks.

003-2,35,34,0	script	Eistein	NPC_UKAR,{

    // Level, Reward{, Reward2}
    function is_level {
        if (BaseLevel >= getarg(0)) {
            getitem getarg(1),1;
            if (getarg(2, 0))
                getitem getarg(2),1;
            setq TulimsharQuest_Eistein, getq(TulimsharQuest_Eistein)+1;
            mes "";
            mesn;
            mesq l("Congrats you passed the level cap of @@! Here is a(n) @@, you deserve it.",getarg(0), getitemlink(getarg(1)));
            if (getarg(2,0))
                mesc l("Item obtained: @@", getitemlink(getarg(2)));
        } else {
            speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
                l("You are level @@/@@. Keep building levels, you need them!", BaseLevel, getarg(0));
        }
    }


    function quest_open {
        .@q = getq(TulimsharQuest_Eistein);
        switch (.@q) {
            case 0:
                is_level(25, BronzeGift); break;
            case 1:
                is_level(50, SilverGift, GraduationCap); break;
            case 2:
                is_level(75, GoldenGift, GraduationRobe); break;
            case 3:
                is_level(100, PrismGift); break;
            case 4:
                is_level(125, PrismGift); break;
            case 5:
                is_level(150, SupremeGift); break;
            default:
                mesn;
                mesq l("Waw, you are level @@! Many congratulations. If there were people like you, ukarania wouldn't have been destroyed...", BaseLevel);
                break;
        }
    }

    speech S_LAST_NEXT,
        l("Ah, welcome. Please, don't be afraid of my look, Saulc GM assigned me to here."),
        l("I'm Eistein, survivor from Ukarania. I reward brave adventurers who kill monsters, which plague our lands."),
        l("I'll give you a reward, in the name of Saulc, once you reach the following levels: 25, 50, 75, 100, 125 and 150.");
        do
        {
            select
                l("Interesting! can I be rewarded for my help?"),
                l("What about job levels and job experience?"),
                l("Quit");

            switch (@menu) {
                case 1:
                    quest_open;
                    break;
                case 2:
                    mesn; mesq l("Job levels already boosts all your status. It gives +1 on each status every 10 job levels."); next;
                    break;
            }
        } while (@menu != 3);

    closedialog;
    goodbye;
    close;

OnInit:
    .@npcId = getnpcid(.name$);
    setunitdata(.@npcId, UDT_HEADTOP, GraduationCap);
    setunitdata(.@npcId, UDT_HEADMIDDLE, SilkRobe);
    setunitdata(.@npcId, UDT_WEAPON, DeepBlackBoots);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 0);
    npcsit;

    .sex = G_MALE;
    .distance = 4;
    end;
}