ACMYNOC.SSL

*This image comes from* Fallout Mod *or from websites created and owned by Game publisher or Game developer, who hold the copyright of* Fallout Mod*. All trademarks and registered trademarks present in the image are proprietary to Game publisher.
The use of images to illustrate articles concerning the subject of the images in question is believed to qualify as **fair use** under United States copyright law, as such display does not significantly impede the right of the copyright holder to sell the copyrighted material.*

Template:Scriptfile

Template:Scriptbox

File:Transcript.png
/\*

        Copyright 1998-2003 Interplay Entertainment Corp. All rights reserved.

\*/

/\*

        Name: Mynoc (The Bridge Guard)

        Location: Arroyo

        Description:

        Log: The defines for VAULT\_KNOWN, VISITED\_OTHER\_TOWN, & VISITED\_TOWN\_MULTIPLE\_TIMES need to be changed

             when the functionality is available to fit the designer's script.

           Created: December 01, 1997

           Updated:

\*/

/\* Include Files \*/

#include "..\headers\define.h"

//#include "..\headers\<TownName.h>"

#define NAME SCRIPT\_ACMYNOC

#define TOWN\_REP\_VAR (GVAR\_TOWN\_REP\_ARROYO)

#include "..\headers\command.h"

#include "..\headers\ModReact.h"

#define VAULT\_KNOWN vault\_13\_visible\_on\_map

// change both when we have the ability to get the number of times players have visited other towns

#define VISITED\_OTHER\_TOWN ((den\_visit) or (klamath\_visit))

#define VISITED\_TOWN\_MULTIPLE\_TIMES ((den\_visit) and (klamath\_visit))

/\* Standard Script Procedures \*/

procedure start;

procedure critter\_p\_proc;

procedure pickup\_p\_proc;

procedure talk\_p\_proc;

procedure destroy\_p\_proc;

procedure look\_at\_p\_proc;

procedure description\_p\_proc;

procedure use\_skill\_on\_p\_proc;

procedure damage\_p\_proc;

procedure map\_enter\_p\_proc;

/\* Script Specific Procedure Calls \*/

procedure Node995; // this checks the charisma level and sets the critter reaction accordingly

procedure Node996; // this Node sets the critter reaction to bad and Ends dialog

procedure Node997; // this Node handles the basic START CONDITIONS

procedure Node998; // This Node is Always Combat

procedure Node999; // This Node is Always Ending

// The next lines are added in by the Designer Tool.

// Do NOT add in any lines here.

//~~~~~~~~~~~~~~~~ DESIGNER TOOL STARTS HERE

procedure Node000;

procedure Node001;

procedure Node002;

procedure Node003;

procedure Node004;

procedure Node005;

procedure Node006;

procedure Node007;

procedure Node008;

procedure Node009;

procedure Node010;

procedure Node011;

procedure Node012;

procedure Node013;

procedure Node014;

procedure Node015;

procedure Node016;

procedure Node017;

procedure Node018;

procedure Node019;

procedure Node020;

procedure Node021;

procedure Node022;

procedure Node023;

procedure Node024;

procedure Node025;

procedure Node026;

procedure Node027;

procedure Node028;

procedure Node029;

procedure Node030;

procedure Node031;

procedure Node032;

procedure Node033;

procedure Node034;

procedure Node035;

procedure Node036;

procedure Node037;

//~~~~~~~~~~~~~~~~ DESIGN TOOL ENDS HERE

// The Following lines are for anything that is not needed to be

// seen by the design Tool

/\* Local Variables which are saved. All Local Variables need to be

   prepended by LVAR\_ \*/

#define LVAR\_HereBefore (4)

#define LVAR\_Hostile (5)

#define LVAR\_Personal\_Enemy (6)

/\* Local variables which do not need to be saved between map changes. \*/

variable Only\_Once:=0;

procedure start begin

end

/\* This procedure will get called each time that the map is first entered. It will

   set up the Team number and AI packet for this critter. This will override the

   default from the prototype, and needs to be set in scripts. \*/

procedure map\_enter\_p\_proc begin

   Only\_Once:=0;

   critter\_add\_trait(self\_obj,TRAIT\_OBJECT,OBJECT\_TEAM\_NUM,TEAM\_ARROYO);

   critter\_add\_trait(self\_obj,TRAIT\_OBJECT,OBJECT\_AI\_PACKET,AI\_ARROYO\_WARRIOR);

end

/\* Every heartbeat that the critter gets, this procedure will be called. Anything from

   Movement to attacking the player on sight can be placed in here.\*/

procedure critter\_p\_proc begin

   if ((local\_var(LVAR\_Hostile) == 2)and(obj\_can\_see\_obj(self\_obj,dude\_obj))) then begin

      set\_local\_var(LVAR\_Hostile,1);

      attack(dude\_obj);

   end

   if (REP\_ENEMY\_ARROYO) then begin

       attack(dude\_obj);

   end

   else if ((global\_var(GVAR\_TALKED\_TO\_ELDER) == 0) and (obj\_can\_see\_obj(self\_obj,dude\_obj)) and (tile\_is\_visible(tile\_num(self\_obj)))) then begin

       set\_global\_var(GVAR\_TALKED\_TO\_ELDER,1);

       floater(500);

   end

end

/\* Whenever the critter takes damage of any type, this procedure will be called. Things

   like setting ENEMY\_ and LVAR\_Personal\_Enemy can be set here. \*/

procedure damage\_p\_proc begin

   if (source\_obj == dude\_obj) then begin

      set\_local\_var(LVAR\_Personal\_Enemy,1);

      set\_global\_var(GVAR\_ENEMY\_ARROYO,1);

   end

end

/\* Any time that the player is caught stealing from this critter, Pickup\_proc will be called.

   In here, various things can happen. The most common response is instant hostility which

   will be remembered. \*/

procedure pickup\_p\_proc begin

   if (source\_obj == dude\_obj) then begin

      set\_local\_var(LVAR\_Hostile,2);

   end

end

/\* The dialog system is setup and prepares the player to talk to this NPC. Where To Go

   written by designers are placed in here. Additionally, Reactions are generated and

   stored which affects player interactions. \*/

procedure talk\_p\_proc begin

   GetReaction;

   if ((REP\_ENEMY\_ARROYO) or (local\_var(LVAR\_Personal\_Enemy) == 1) or (local\_var(LVAR\_Hostile)>0)) then begin

      call Node009;

   end else begin

      start\_gdialog(NAME,self\_obj,4,-1,-1);

      gSay\_Start;

         call Node000;

      gSay\_End;

      end\_dialogue;

      inc\_local\_var(LVAR\_HereBefore);

   end

end

/\* This procedure gets called only on the death of this NPC. Special things like

   incrementing the death count for reputation purposes and Enemy Counters are placed

   in here. \*/

procedure destroy\_p\_proc begin

/\* Increment the aligned critter counter\*/

   inc\_good\_critter

end

/\* Look\_at\_p\_proc gets called any time that the player passes the cursor over any object.

   This should only hold the most cursory of glances for the player. \*/

procedure look\_at\_p\_proc begin

   script\_overrides;

   // if the player has spoken to Mynoc, it will add his name to his description

   if (local\_var(LVAR\_HereBefore) == 1) then begin

       display\_msg(mstr(101));

   end else begin

       display\_msg(mstr(100));

   end

end

/\* The player will see more indepth descriptions from this procedure. They are actively

   looking at the critter and want more information. Things like names can be added here

   if the critter is known to the player. \*/

procedure description\_p\_proc begin

   script\_overrides;

   display\_msg(mstr(150));

end

/\* Any time a skill is used on a critter this call is made. This can be to give examinations

   for things like Doctor skill or messages for various other skills. \*/

procedure use\_skill\_on\_p\_proc begin

end

// nodes

procedure Node000 begin

   call Node997;

end

procedure Node001 begin

   Reply(152);

   NOption(153,Node002,004);

   NOption(154,Node003,004);

   NOption(155,Node004,004);

   if ((global\_var(GVAR\_ARROYO\_SPEAR) == QUEST\_NONE) and (dude\_perception > 5)) then

       NOption(314,Node020,004);

end

procedure Node002 begin

   Reply(156);

   NOption(157,Node999,004);

end

procedure Node003 begin

   Reply(158);

   NOption(159,Node005,004);

   NOption(160,Node006,004);

   NOption(161,Node999,004);

end

procedure Node004 begin

   Reply(162);

   NOption(163,Node007,004);

   NOption(164,Node008,004);

   NOption(165,Node999,004);

end

procedure Node005 begin

   mark\_klamath\_on\_map

   Reply(166);

   NOption(167,Node999,004);

   if (obj\_is\_carrying\_obj\_pid(dude\_obj,PID\_VIC\_WATER\_FLASK)) then

       NOption(168,Node006,004);

end

procedure Node006 begin

   Reply(169);

   NOption(170,Node009,004);

   NOption(171,Node999,004);

end

procedure Node007 begin

   Reply(172);

   NOption(173,Node996,004);

   NOption(174,Node999,004);

end

procedure Node008 begin

   Reply(175);

   NOption(176,Node999,004);

   NOption(177,Node996,004);

end

procedure Node009 begin

   Reply(178);

   NOption(179,Node999,004);

end

procedure Node010 begin

   Reply(180);

   NOption(181,Node999,004);

   NOption(182,Node999,004);

   NOption(183,Node996,004);

   NOption(184,Node003,004);

   if ((global\_var(GVAR\_ARROYO\_SPEAR) == QUEST\_NONE) and (dude\_perception > 5)) then

       NOption(314,Node020,004);

end

procedure Node011 begin

   Reply(185);

   if (VAULT\_KNOWN) then NOption(186,Node012,004);

   NOption(187,Node013,004);

end

procedure Node012 begin

   Reply(188);

   NOption(189,Node014,004);

   NOption(190,Node014,004);

   NOption(191,Node999,004);

end

procedure Node013 begin

   Reply(192);

   NOption(193,Node999,004);

   NOption(194,Node996,004);

end

procedure Node014 begin

   Reply(195);

   NOption(196,Node999,004);

   NOption(197,Node999,004);

end

procedure Node015 begin

   Reply(198);

   NOption(199,Node012,004);

   NOption(200,Node013,004);

end

procedure Node016 begin

   Reply(201);

   NOption(202,Node999,004);

   NOption(203,Node999,004);

   NOption(204,Node017,004);

end

procedure Node017 begin

   Reply(205);

   NOption(206,Node996,004);

   NOption(207,Node995,004);

   NOption(208,Node996,004);

end

procedure Node018 begin

   Reply(209);

   NLowOption(210,Node999);

end

procedure Node019 begin

   floater(random(211,215));

end

procedure Node020 begin

   Reply(300);

   NOption(301,Node021,004);

end

procedure Node021 begin

   set\_global\_var(GVAR\_ARROYO\_SPEAR,SPEAR\_GET\_FLINT);

   Reply(302);

   NOption(303,Node999,004);

end

procedure Node022 begin

   Reply(304);

   if (obj\_is\_carrying\_obj\_pid(dude\_obj,PID\_FLINT)) then

       NOption(305,Node023,004);

   else

       NOption(306,Node999,004);

end

procedure Node023 begin

   Reply(307);

   if (obj\_is\_carrying\_obj\_pid(dude\_obj,PID\_SPEAR)) then

       NOption(308,Node024,004);

   else

       NOption(309,Node025,004);

end

procedure Node024 begin

/\* variable item;

   variable JunkIt;

   item:=obj\_carrying\_pid\_obj(dude\_obj,PID\_SPEAR);

   JunkIt:=rm\_mult\_objs\_from\_inven(dude\_obj,item,1);

   destroy\_object(item);

   item:=obj\_carrying\_pid\_obj(dude\_obj,PID\_FLINT);

   JunkIt:=rm\_mult\_objs\_from\_inven(dude\_obj,item,1);

   destroy\_object(item);

   item:=create\_object(PID\_SHARP\_SPEAR,0,0);

   add\_mult\_objs\_to\_inven(dude\_obj,item,1);

   set\_global\_var(GVAR\_ARROYO\_SPEAR,SPEAR\_FINISHED);

   gfade\_out(600);

   gfade\_in(600);

\*/

   Reply(mstr(310));

   NOption(g\_mstr(209),Node026,004);

end

procedure Node025 begin

   Reply(311);

   NOption(g\_mstr(209),Node026,004);

end

procedure Node026 begin

   variable item;

   variable item1;

   variable item2;

   variable JunkIt;

   if (obj\_is\_carrying\_obj\_pid(dude\_obj,PID\_SPEAR)) then begin

       item:=obj\_carrying\_pid\_obj(dude\_obj,PID\_SPEAR);

       inven\_unwield(dude\_obj);

       JunkIt:=rm\_mult\_objs\_from\_inven(dude\_obj,item,1);

       destroy\_object(item);

       debug\_msg("Destroy Spear");

   end

   item1:=obj\_carrying\_pid\_obj(dude\_obj,PID\_FLINT);

   JunkIt:=rm\_mult\_objs\_from\_inven(dude\_obj,item1,1);

   destroy\_object(item1);

   debug\_msg("Destroy Flint");

   item2:=create\_object(PID\_SHARP\_SPEAR,0,0);

   add\_mult\_objs\_to\_inven(dude\_obj,item2,1);

   debug\_msg("Give Sharp Spear");

   game\_time\_advance(30\*ONE\_GAME\_MINUTE);

   set\_global\_var(GVAR\_ARROYO\_SPEAR,SPEAR\_FINISHED);

   gfade\_out(600);

   gfade\_in(600);

   Reply(312);

   NOption(313,Node999,004);

end

procedure Node027 begin

   Reply(400);

   NLowOption(401,Node028);

   NOption(402,Node028,004);

   BOption(403,Node999,004);

end

procedure Node028 begin

   Reply(404);

   NLowOption(405,Node029);

   NLowOption(406,Node030);

   NOption(407,Node029,004);

   NOption(408,Node030,004);

end

procedure Node029 begin

   Reply(409);

   NLowOption(410,Node030);

   NOption(411,Node030,004);

end

procedure Node030 begin

   NMessage(412);

end

procedure Node031 begin

   Reply(413);

   NLowOption(414,Node032);

   NOption(415,Node032,004);

   BOption(416,Node999,004);

end

procedure Node032 begin

   NMessage(417);

end

procedure Node033 begin

   Reply(418);

   NLowOption(419,Node034);

   NOption(420,Node034,004);

   NOption(421,Node035,004);

end

procedure Node034 begin

   NMessage(422);

end

procedure Node035 begin

   Reply(423);

   NLowOption(424,Node999);

   NOption(425,Node999,004);

end

procedure Node036 begin

   Reply(426);

   NLowOption(427,Node037);

   NOption(428,Node037,004);

   BOption(429,Node999,004);

end

procedure Node037 begin

   NMessage(430);

end

procedure Node995 begin

   if (dude\_charisma>=7) then begin

      TopReact;

   end

end

procedure Node996 begin

   if (bad\_critter\_reaction == false) then BottomReact;

end

procedure Node997 begin

   if (get\_critter\_stat(dude\_obj,STAT\_iq) <= (0-LOW\_IQ)) then begin

      call Node018;

   end

   else if (reached\_tl\_4) then begin

       call Node036;

   end

   else if (reached\_tl\_3) then begin

       call Node033;

   end

   else if (reached\_tl\_2) then begin

       call Node031;

   end

   else if (reached\_tl\_1) then begin

       call Node027;

   end

   else if (bad\_critter\_reaction) then begin

      call Node016;

   end

   else if (VISITED\_TOWN\_MULTIPLE\_TIMES) then begin

      call Node015;

   end

   else if (VISITED\_OTHER\_TOWN) then begin

      call Node011;

   end

   else if (local\_var(LVAR\_HereBefore) == 0) then begin

      call Node001;

   end

   else if ((global\_var(GVAR\_ARROYO\_SPEAR) == SPEAR\_GET\_POWDER) or

            (global\_var(GVAR\_ARROYO\_SPEAR) == SPEAR\_GET\_FLINT)) then begin

       call Node022;

   end

   else begin

      call Node010;

   end

end

procedure Node998 begin

   set\_local\_var(LVAR\_Hostile,2);

end

/\* Anytime that there is a need for an ending to dialog, this node is to be called. It will just

   exit from the dialog system without any reprisals from the NPC. \*/

procedure Node999 begin

end