summaryrefslogblamecommitdiff
path: root/npc/016-1/captain.txt
blob: f666d9e8ff33ba0609e17b8bb188e508ecb97167 (plain) (tree)
1
2
3
4
5
6
7
8






                                          
                


                       




                                                  
 


                                                                    
                                                                  
                                            


          

                                     
                                                      
 
                   
                     

                       
                       
                     
                       
                     
                       
                     
































                                                                    
         
                                                      
 
                   
                     

                       
                       
                     
                       
                     
                       
                     













                                                                    




                      
                                                                       


                                                                   
                  
 





 

                                   
                                                      
 
                   
                     

                       
                       
                     
                       
                     
                       
                     



                                                           



                                             
                                                                                                              
                                            









                                                                    
                      
                     


           
                                                                                                            


                                                                   

                  






                                 





                                                                                                              


                                                         




                                                 
                                                               

        
 




                  
 
// TMW2 scripts.
// Authors:
//    Jesusalva
// Description:
//    Temporary, placeholder.

016-1,19,29,0	script	Captain	NPC_NARD,{
    .@price=810;
    if (BaseLevel < 20)
        goto L_TooWeak;

    mesn;
    mesq l("Hi @@.", strcharinfo(0));
    next;
    mesq l("You are currently at @@.", LOCATION$);
    mes "";

        menu
            rif(LOCATION$ != "Tulim", l("To Tulimshar.")), L_TTulim,
            rif(LOCATION$ != "Hurns", l("To Hurnscald.")), L_THurns,
            rif(LOCATION$ != "Nival", l("To Nivalis.")), L_TNival,
            l("No, I'll save my money."), -;

    close;

///// ---------- Tulimshar ----------
L_TTulim:
    .@x=(reputation("Tulim")+reputation(LOCATION$))/2;

    if (.@x >= 100)
        .@price-=800;
    else if (.@x >= 80)
        .@price-=640;
    else if (.@x >= 60)
        .@price-=480;
    else if (.@x >= 40)
        .@price-=320;
    else if (.@x >= 20)
        .@price-=160;

    mes "";
    mesn;
    mesq l("It'll cost you @@ GP.", .@price);
    mes "";

    if (Zeny < .@price) {
        mes l("You still need @@ GP to afford it.", (.@price-Zeny));
        close;
    }

    if (askyesno() != ASK_YES)
        close;

    Zeny=Zeny-.@price;
    PC_DEST$="Tulim";
    @timer_navio_running = 1;

    mes "";
    mesn;
    mesq l("Tulimshar, right? The oldest human city-state!");
    next;
    mesq l("I was planning to go there soon, anyway. All aboard!");
    close2;
    goto L_DoWarp;







///// ---------- Hurnscald ----------
L_THurns:
    .@x=(reputation("Hurns")+reputation(LOCATION$))/2;

    if (.@x >= 100)
        .@price-=800;
    else if (.@x >= 80)
        .@price-=640;
    else if (.@x >= 60)
        .@price-=480;
    else if (.@x >= 40)
        .@price-=320;
    else if (.@x >= 20)
        .@price-=160;

    mes "";
    mesn;
    mesq l("It'll cost you @@ GP.", .@price);
    mes "";

    if (Zeny < .@price) {
        mes l("You still need @@ GP to afford it.", (.@price-Zeny));
        close;
    }

    if (askyesno() != ASK_YES)
        close;

    Zeny=Zeny-.@price;
    PC_DEST$="Hurns";

    mes "";
    mesn;
    mesq l("Hurnscald? Small farming towns are always nice to visit.");
    next;
    mesq l("I was planning to go there soon, anyway. All aboard!");
    close2;
    goto L_DoWarp;







///// ---------- Nivalis ----------
L_TNival:
    .@x=(reputation("Nival")+reputation(LOCATION$))/2;

    if (.@x >= 100)
        .@price-=800;
    else if (.@x >= 80)
        .@price-=640;
    else if (.@x >= 60)
        .@price-=480;
    else if (.@x >= 40)
        .@price-=320;
    else if (.@x >= 20)
        .@price-=160;

    // Nivalis Liberation Day. Zero could cause weird bugs.
    if (!$NIVALIS_LIBDATE)
        .@price=1; // 

    mes "";
    mesn;
    mesq l("It'll cost you @@ GP.", .@price);
    mesc l("WARNING: As of r7.2 \"Frozen Jesusalva\", there's currently no ship route to carry you back."), 1;
    mesc l("Continue at your own risk."), 1;
    mes "";

    if (Zeny < .@price) {
        mes l("You still need @@ GP to afford it.", (.@price-Zeny));
        close;
    }

    if (askyesno() != ASK_YES)
        close;

    Zeny=Zeny-.@price;
    PC_DEST$="Nival";

    mes "";
    mesn;
    mesq l("Nivalis? It's frozen during the whole year! I hope you have good ice gear and a high level...");
    next;
    mesq l("I was planning to go there soon, anyway. All aboard!");
    close2;
    goto L_DoWarp;







///// ---------------- Core Utils
L_TooWeak:
    mesn;
    mesq l("The sea route I take is very dangerous, and full of pirates. You're too weak to travel with me.");
    close;

L_DoWarp:
    addtimer nard_time(PC_DEST$), "#MarineShip::OnEvent";
    @timer_navio_running = 1;
    warp "016-6", 40, 32;

    // 10% base chance of Pirate Attack!
    // Each level INCREASES this in 0.1%.
    // So for a level 40 player, chances are 14%.
    if (rand(1, 10000) < 1000+(BaseLevel*10))
        addtimer rand(3000,6000), "#MarineShipAttack::OnEvent";
    end;


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

}