summaryrefslogblamecommitdiff
path: root/world/map/npc/020-2/baktar.txt
blob: 4dcef7a6be87b8d60ffd612b83bbdfc9881bedd4 (plain) (tree)
1
2
3
4
5
6
7
8
9


                             
                                        
                           
   
                                                                   
   
                  









                                                                                                         
                          
                            
                               
 
                              
 
                        
 


                               
 


                                 
 


                            
 


                              
 


                           
 


                              
 


                             
 
                                                                         
                                         









                                                                                                  
                      


                 
 
                                                         
                      
                                                                                    

                                            

                                                

              
                  
                                                                                                                                                                                                                                              
                     

         
                  
                                                                                                                                                                                                                                                                                        



                                                                       

            

                                                       

                                                                                           


                                            
                       

              
                                                                                           


                                              
                   

          
                                                                                  


                                          
                  

         
                                                                                            


                                                       
               

      
                                                                                       


                                                   
                

       
                                                                                        


                                           
                     
 


                                                                                        

                       
                     

            

                                       
                   
        








                                      







                                                     
                                                  
               

                                
          
 
                 
                                                           
                                                  


                                      
                                                   
          
 
                   
                                                             
                                                    


                                        
                                                     
          
 
               
                                                         
                                                


                                    
                                                 
          
 
              
                                                           
                                                            


                                      
                                                   
          
 
           
                                                        
                                                         


                                   
                                                
          
 
            
                                                           
                                                  


                                      
                                                   
          
 






                                                           
          

         

                                                                                                      
          

              

                                                         
          
 
        
          
 
//#=========================
//#== NPC Baktar
//# Authors: Lien, PjotrOrial
//# Review: BigCrunch, Mistakes, Jenalya
//# This NPC has one stage:
//#
//# you need to bring 7 different items, but only one of each kind.
//#
//# variable used:
//# @QUEST_Nivalis_state: NIBBLE0, NIBBLE1, NIBBLE2, NIBBLE3:
//# BYTE0 ( == NIBBLE0 | NIBBLE1)        stores in each bit information if that item was already brought.
//# bits:
//# bit 0        if you have met the npc already
//# bit 1        Desert Hat
//# bit 2        Desert Shirt
//# bit 3        Serf Hat
//# bit 4        tongue_Item
//# bit 5        eggs_Item
//# bit 6        skin_Item
//# bit 7        insectleg
//#=========================
020-2,70,61,0|script|Baktar|191
{
    set @npcname$, "[Baktar]";

    set @BIT_KNOWHIM, 0;

    set @BIT_DESERTHAT,1;
    set @MONEY_DESERTHAT, 1500;
    set @XP_DESERTHAT, 500;

    set @BIT_DESERTSHIRT,2;
    set @MONEY_DESERTSHIRT, 1500;
    set @XP_DESERTSHIRT, 600;

    set @BIT_SERFHAT,3;
    set @MONEY_SERFHAT, 800;
    set @XP_SERFHAT, 350;

    set @BIT_MS_TONGUE,4;
    set @MONEY_MS_TONGUE, 800;
    set @XP_MS_TONGUE, 350;

    set @BIT_MS_EGG,5;
    set @MONEY_MS_EGG, 800;
    set @XP_MS_EGG, 350;

    set @BIT_SNAKESKIN,6;
    set @MONEY_SNAKESKIN, 800;
    set @XP_SNAKESKIN, 350;

    set @BIT_INSECTLEG,7;
    set @MONEY_INSECTLEG, 20;
    set @XP_INSECTLEG, 130;

    set @run, ((QUEST_NorthTulimshar & TWOBIT_8_MASK) >> TWOBIT_8_SHIFT);
    if ((@run == 3) && (QL_KYLIAN == 13))
        goto L_Deliver;
    goto L_Start;

L_Deliver:
    menu
        "I have a delivery for you", L_Delivery;

L_Delivery:
    mes "[Baktar]";
    mes "\"Ahh my delivery from Tulimshar, how nice it is to get some comforts from back home.\"";
    set QL_KYLIAN, 14;
    goto L_Close;

L_Start:

    if(QL_BAKTAR & (1<<@BIT_KNOWHIM)) goto L_KnowAlready;
        mes @npcname$;
        mes "\"Hello, did you come from Tulimshar? Because you have a nice tan. \"";
    menu
        "Yes, I'm from Tulimshar", L_exotic,
        "Well, I just like sunbathing", L_Close,
        "Good bye", L_Close;

L_KnowAlready:
    mes @npcname$;
    mes "\"I love Tulimshar's stuff. I'm collecting souvenirs from Tulimshar to help remind me of all the great times I had there. If you give me an interesting item from the area, I'll give you a nice reward. So, you have a new item?\"";
    goto L_startitem;

L_exotic:
    mes @npcname$;
    mes "\"I said that because I love Tulimshar's stuff...I'm collecting souvenirs from Tulimshar to help remind me of all the great times I had there. If you give me an interesting item maybe I can give you a nice reward. But I don't need a lot, I just need one of each item.\"";
    menu
        "I have some items on me maybe you'll like them ", L_startitem,
        "Don't touch my stuff!", L_Close,
        "I'll get them. Bye.", L_Close;

L_startitem:
    setarray @exotic_item$, "", "", "", "", "", "", "";
    set @c, 0;
    set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_KNOWHIM);
    if (countitem("DesertHat") < 1 || QL_BAKTAR & (1<<@BIT_DESERTHAT) ) goto L_DesertShirt;
    set @exotic_item$[@c], "a Desert Hat ?";
    set @menuid[@c], 0;
    set @c, @c + 1;
    goto L_DesertShirt;

L_DesertShirt:
    if (countitem("DesertShirt") < 1 || QL_BAKTAR & (1<<@BIT_DESERTSHIRT) ) goto L_SerfHat;
    set @exotic_item$[@c], "a Desert Shirt ?";
    set @menuid[@c], 1;
    set @c, @c + 1;
    goto L_SerfHat;

L_SerfHat:
    if (countitem("SerfHat") < 1 || QL_BAKTAR & (1<<@BIT_SERFHAT) ) goto L_tongue;
    set @exotic_item$[@c], "a Serf Hat ?";
    set @menuid[@c], 2;
    set @c, @c + 1;
    goto L_tongue;

L_tongue:
    if (countitem("MountainSnakeTongue") < 1 || QL_BAKTAR & (1<<@BIT_MS_TONGUE)) goto L_egg;
    set @exotic_item$[@c], "a Mountain Snake Tongue ?";
    set @menuid[@c], 3;
    set @c, @c + 1;
    goto L_egg;

L_egg:
    if (countitem("MountainSnakeEgg") < 1 || QL_BAKTAR & (1<<@BIT_MS_EGG)) goto L_Skin;
    set @exotic_item$[@c], "a Mountain Snake Egg?";
    set @menuid[@c], 4;
    set @c, @c + 1;
    goto L_Skin;

L_Skin:
    if (countitem("SnakeSkin") < 1 || QL_BAKTAR & (1<<@BIT_SNAKESKIN)) goto L_insectleg;
    set @exotic_item$[@c], "a Snake Skin?";
    set @menuid[@c], 5;
    set @c, @c + 1;
    goto L_insectleg;

L_insectleg:
    if (countitem("InsectLeg") < 1 || QL_BAKTAR & (1<<@BIT_INSECTLEG)) goto L_NeverMind;
    set @exotic_item$[@c], "a Insect Leg?";
    set @menuid[@c], 6;
    set @c, @c + 1;
    goto L_NeverMind;

L_NeverMind:
    set @exotic_item$[@c], "Nevermind";
    set @menuid[@c], 6;
//menu for the item
    menu
        @exotic_item$[0], L_MenuItems,
        @exotic_item$[1], L_MenuItems,
        @exotic_item$[2], L_MenuItems,
        @exotic_item$[3], L_MenuItems,
        @exotic_item$[4], L_MenuItems,
        @exotic_item$[5], L_MenuItems,
        @exotic_item$[6], L_MenuItems;

L_MenuItems:
    set @menu, @menu -1;

    if (@menuid[@menu] == 0) goto L_DesertHat_Item;
    if (@menuid[@menu] == 1) goto L_DesertShirt_Item;
    if (@menuid[@menu] == 2) goto L_SerfHat_Item;
    if (@menuid[@menu] == 3) goto L_tongue_Item;
    if (@menuid[@menu] == 4) goto L_egg_Item;
    if (@menuid[@menu] == 5) goto L_skin_Item;
    if (@menuid[@menu] == 6) goto L_InsectLegItem;
//if Never mind
    mes @npcname$;
    mes "\"Ok, goodbye then.\"";
    close;

L_DesertHat_Item:
    if(QL_BAKTAR & (1<<@BIT_DESERTHAT)) goto L_havealready;
    if (countitem("DesertHat") < 1) goto L_Noitem;
    delitem "DesertHat", 1;
    set Zeny, Zeny + @MONEY_DESERTHAT;
    getexp @XP_DESERTHAT,0;
    set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_DESERTHAT);
    close;

L_DesertShirt_Item:
    if(QL_BAKTAR & (1<<@BIT_DESERTSHIRT)) goto L_havealready;
    if (countitem("DesertShirt") < 1) goto L_Noitem;
    delitem "DesertShirt", 1;
    set Zeny, Zeny + @MONEY_DESERTSHIRT;
    getexp @XP_DESERTSHIRT,0;
    set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_DESERTSHIRT);
    close;

L_SerfHat_Item:
    if(QL_BAKTAR & (1<<@BIT_SERFHAT)) goto L_havealready;
    if (countitem("SerfHat") < 1) goto L_Noitem;
    delitem "SerfHat", 1;
    set Zeny, Zeny + @MONEY_SERFHAT;
    getexp @XP_SERFHAT,0;
    set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_SERFHAT);
    close;

L_tongue_Item:
    if(QL_BAKTAR & (1<<@BIT_MS_TONGUE)) goto L_havealready;
    if (countitem("MountainSnakeTongue") < 1) goto L_Noitem;
    delitem "MountainSnakeTongue", 1;
    set Zeny, Zeny + @MONEY_MS_TONGUE;
    getexp @XP_MS_TONGUE,0;
    set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_MS_TONGUE);
    close;

L_egg_Item:
    if(QL_BAKTAR & (1<<@BIT_MS_EGG)) goto L_havealready;
    if (countitem("MountainSnakeEgg") < 1) goto L_Noitem;
    delitem "MountainSnakeEgg", 1;
    set Zeny, Zeny + @MONEY_MS_EGG;
    getexp @XP_MS_EGG,0;
    set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_MS_EGG);
    close;

L_skin_Item:
    if(QL_BAKTAR & (1<<@BIT_SNAKESKIN)) goto L_havealready;
    if (countitem("SnakeSkin") < 1) goto L_Noitem;
    delitem "SnakeSkin", 1;
    set Zeny, Zeny + @MONEY_SNAKESKIN;
    getexp @XP_SNAKESKIN,0;
    set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_SNAKESKIN);
    close;

L_InsectLegItem:
    if(QL_BAKTAR & (1<<@BIT_INSECTLEG)) goto L_havealready;
    if (countitem("InsectLeg") < 1) goto L_Noitem;
    delitem "InsectLeg", 1;
    set Zeny, Zeny + @MONEY_INSECTLEG;
    getexp @XP_INSECTLEG,0;
    set QL_BAKTAR, QL_BAKTAR | (1<<@BIT_INSECTLEG);
    close;

L_Noitem:
    mes @npcname$;
    mes "\"Well, if you happen to get items from Tulimshar, see me first before you sell anything.\"";
    close;

L_havealready:
    mes @npcname$;
    mes "\"I already collected what you can offer me.\"";
    close;

L_Close:
    close;
}