summaryrefslogblamecommitdiff
path: root/npc/016-1/marine.txt
blob: c5cd3ef26433f09ef4fcca41687de078c0adadb0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10






                                          


                       




                                                  
 



                                                                    



          






















                                                                    













                                                                       






 
         


























                                                                    













































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

016-1,19,29,0	script	Captain	NPC_NARD,{
    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,
            l("No, I'll save my money."), -;

    close;

L_THurns:
    .@price=2000;
    .@x=marine_reputation("Hurns");

    if (.@x >= 3)
        .@price-=1500;
    else if (.@x >= 2)
        .@price-=1000;
    else if (.@x >= 1)
        .@price-=500;

    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("Hurns Island, then? Yes, that is a pretty island, right?");
    next;
    mesq l("I was planning to go there soon, anyway. All aboard!");
    close2;
    addtimer nard_time(PC_DEST$), "#MarineShip::OnEvent";
    @timer_navio_running = 1;
    warp "016-6", 40, 32;
    end;








L_TTulim:
    .@price=2000;
    .@x=marine_reputation("Tulim");

    if (.@x >= 10)
        .@price-=1500;
    else if (.@x >= 8)
        .@price-=1000;
    else if (.@x >= 6)
        .@price-=750;
    else if (.@x >= 4)
        .@price-=500;
    else if (.@x >= 2)
        .@price-=250;

    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";
    addtimer nard_time(PC_DEST$), "#MarineShip::OnEvent";
    @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;
    addtimer nard_time(PC_DEST$), "#MarineShip::OnEvent";
    @timer_navio_running = 1;
    warp "016-6", 40, 32;
    end;

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_Close:
    close;

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


OnInterIfInit:
    // Tulim Instance
    .TULIM_INSTID = instance_create("016-1@TulimInst", 0, IOT_NONE);
    instance_attachmap("016-1", .TULIM_INSTID, 0, "016-1@Tulim");
    instance_set_timeout(1000000, 1000000, .TULIM_INSTID);
    instance_init(.TULIM_INSTID);
    end;

    // Hurns Instance
    .HURNS_INSTID = instance_create("016-1@HurnsInst", 0, IOT_NONE);
    instance_attachmap("016-1", .HURNS_INSTID, 0, "016-1@Hurns");
    instance_set_timeout(1000000, 1000000, .HURNS_INSTID);
    instance_init(.HURNS_INSTID);
    end;

}