summaryrefslogblamecommitdiff
path: root/npc/002-5/main.txt
blob: 6e5094f6e6b2f9fbdf4688ce5fd0e7fb84d30317 (plain) (tree)
1
2
3
4
5
6
7
8
9

                        
                        
 
                                                           
                                                                    


        
                                       

                                               
                                               
                      

        

                  
                         
                             
                          
                                                                                          

        

                  
                       
                             
                         








                                                                                      

        
        
                  
                             
                         
                                                                                           
        






                                                           

 
                             
                                                  
                                                                      

                                                                                  


        
                                                       

                             
 
 
// TMW2 script
// Originals from TMW-BR
// Imported by Jesusalva

002-5,28,27,0	script	#NardShip	NPC_HIDDEN,117,29,{
    //if (PC_DEST$ != "" && @timer_navio_running == 0) goto L_Timer;
    end;

OnEvent:
    if (@timer_navio_running == 0) end;
    if (PC_DEST$ == "Candor") goto L_Candor;
    else if (PC_DEST$ == "Tulim") goto L_Tulim;
    else if (PC_DEST$ == "Artis") goto L_Artis;
    else goto L_Error;
    end;

L_Candor:
    PC_DEST$ = "";
    LOCATION$ = "Candor";
    @timer_navio_running = 0;
    warp "005-1", 49, 117;
    message strcharinfo(0), l("%s disembarks at %s.", strcharinfo(0), l("Candor Island"));
    end;

L_Tulim:
    PC_DEST$ = "";
    EnterTown("Tulim");
    @timer_navio_running = 0;
    warp "003-1", 81, 68;
    message strcharinfo(0), l("%s disembarks at %s.", strcharinfo(0), l("Tulimshar"));
    end;

L_Artis:
    PC_DEST$ = "";
    EnterTown("Artis");
    @timer_navio_running = 0;
    warp "029-0", 203, 85;
    message strcharinfo(0), l("%s disembarks at %s.", strcharinfo(0), l("Artis"));
    end;

L_Error:
    PC_DEST$ = "";
    @timer_navio_running = 0;
    warp "000-1", 22, 22;
    Exception("PLAYER INVALID PC_DEST ON #NardShip: " + PC_DEST$, RB_DEFAULT | RB_ISFATAL);
    end;

OnTouch:
    if (PC_DEST$ != "" && @timer_navio_running == 0) {
        addtimer nard_time(PC_DEST$), "#NardShip::OnEvent";
        @timer_navio_running = 1;
    }
    end;
}

// Do not add .distance here.
002-5,40,26,0	script	Elmo#002-5	NPC_ELMO,{
    npctalk3 l("It won't be long before we reach our destination...");
    // If player logged out during travel, this Elmo can reset player travel time.
    if (PC_DEST$ != "" && @timer_navio_running == 0) goto L_Timer;
    end;

L_Timer:
    addtimer nard_time(PC_DEST$), "#NardShip::OnEvent";
    @timer_navio_running = 1;
    end;

}