summaryrefslogtreecommitdiff
path: root/npc/002-5/main.txt
blob: 6e5094f6e6b2f9fbdf4688ce5fd0e7fb84d30317 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// 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;

}