summaryrefslogblamecommitdiff
path: root/npc/001-1/devis.txt
blob: 23a7451ac7aef5447cbc9d5f74ed550c3aa90855 (plain) (tree)
























































                                                                                                
               









                                                         



                                                                                                                     
                                                                         

                                                                                 
                                                                        
                                                                                                                     







                                                                                                                     


                                                                                             
                                    


                 
// Evol scripts.
// Authors:
//    Travolta
//    Reid
// Description:
//    La Johanne crew member.

001-1,193,109,0	script	Devis#001-1	NPC_DEVIS_ARTIS,{

    function say_random_greeting {
        .@rand = rand (5);
        if (.@rand == 0) goodbye;
        else if (.@rand == 1)
        {
            speech 4,
                l("A sunny and hot day,"),
                l("a quiet place,"),
                l("a ground!"),
                l("What else do you need?");
        }
        else if (.@rand == 2) npctalk3 l("A-hoy matey!");
        else if (.@rand == 3) npctalk3 l("We are glad captain Nard has let you join the crew!");
        else if (.@rand == 4) npctalk3 l("Howdy?");

        return;
    }

    function face_to_PC {
        getmapxy(.@map$, .@cx, .@cy, 0);
        @Devis_old_dir = .dir;
        npc_turntoxy(.@cx, .@cy);

        return;
    }

    function local_close {
        if (@Devis_old_dir > 0)
        {
            .dir = @Devis_old_dir;
        }
        npc_resumemove;

        close;
    }

    @Devis_old_dir = -1;

    npc_pausemove;
    face_to_PC;
    say_random_greeting;
    local_close;

OnTimer1000:
    dographmovestep;

OnInit:
    .sex = G_MALE;
    .debug = 1;
    .distance = 5;
    initmovegraph   "start_pos",    193, 109,
                    "dock_ent",     194, 109,
                    "dock_right",   192, 114,   195, 115,
                    "dock_left",    151, 103,   160, 106,
                    "dock_bot",     161, 119,   163, 127,
                    "dock_top",     184, 91,    195, 92,
                    "ship_ent",     19, 28,
                    "ship_sit",     28, 26;

    setmovegraphcmd "start_pos",    "dock_bot",     1,  "dir 0; wait 4",
                    "dock_ent",     "dock_bot",     1,  "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5",
                    "dock_ent",     "dock_top",     3,  "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5",
                    "dock_ent",     "dock_right",   2,  "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5",
                    "dock_top",     "dock_bot",     2,  "dir 0; wait 10",
                    "dock_top",     "dock_left",    3,  "dir 2; wait 8",
                    "dock_top",     "dock_ent",     1,  "warp 001-2-21 ship_ent",
                    "dock_bot",     "dock_top",     1,  "dir 4; wait 7",
                    "dock_bot",     "dock_right",   2,  "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5",
                    "dock_bot",     "dock_ent",     4,  "warp 001-2-21 ship_ent",
                    "dock_bot",     "dock_left",    3,  "dir 6; wait 8",
                    "dock_left",    "dock_top",     1,  "dir 0; wait 6",
                    "dock_left",    "dock_right",   2,  "dir 0; wait 7",
                    "dock_left",    "dock_bot",     3,  "dir 0; wait 1; dir 2; wait 1; dir 0; wait 1; dir 6; wait 5",
                    "dock_right",   "dock_left",    1,  "dir 0; wait 7",
                    "dock_right",   "dock_bot",     2,  "dir 0; wait 4",
                    "dock_right",   "dock_ent",     3,  "warp 001-2-21 ship_ent",
                    "ship_ent",     "ship_sit",     1,  "dir 4; sit; wait 14; stand; wait 1",
                    "ship_sit",     "ship_ent",     1,  "warp 001-1 dock_ent";
                    
    firstmove "wait 8", "start_pos";
    initnpctimer;
}