summaryrefslogblamecommitdiff
path: root/npc/016-1/captain.txt
blob: 0e37e8f847c475627160e7ae02922819d72875de (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=1000;
    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");

    if (.@x >= 14)
        .@price-=950;
    else if (.@x >= 12)
        .@price-=750;
    else if (.@x >= 10)
        .@price-=600;
    else if (.@x >= 8)
        .@price-=400;
    else if (.@x >= 6)
        .@price-=250;
    else if (.@x >= 4)
        .@price-=175;
    else if (.@x >= 2)
        .@price-=100;

    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");

    if (.@x >= 5)
        .@price-=950;
    else if (.@x >= 4)
        .@price-=800;
    else if (.@x >= 3)
        .@price-=600;
    else if (.@x >= 2)
        .@price-=400;
    else if (.@x >= 1)
        .@price-=200;

    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");

    if (!$NIVALIS_LIBDATE)
        .@price=1; // zero could cause weird bugs
    else if (.@x >= 2)
        .@price-=950;
    else if (.@x >= 1)
        .@price-=550;

    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;

}