ACNAGOR.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.

\*/

/\*

           Please note any changes that have been made to the file in Updated. Then comment

           the code which you have changed/altered/commented out. Please, do not delete any

           code which was written.

\*/

/\* Include Files \*/

/\* Note, the Following Lines need to be in this order so that

   the script will be compilable. The define Name is referenced

   in a module from define.h and used in command.h. Please do

   not change the ordering.

        -rwh2 11/13/97

\*/

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

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

#define NAME SCRIPT\_ACNAGOR

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

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

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

#define RUNNING\_TILE (9114)

/\* 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 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 Node001;

procedure Node002;

procedure Node002a;

procedure Node003;

procedure Node003a;

procedure Node003b;

procedure Node004;

procedure Node005;

procedure Node006;

procedure Node006a;

procedure Node006b;

procedure Node007;

procedure Node007a;

procedure Node008;

procedure Node009;

procedure Node010;

procedure Node011;

procedure Node012;

procedure Node013;

procedure Node014;

procedure Node015;

procedure Node016;

procedure Node017;

//~~~~~~~~~~~~~~~~ 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)

#define LVAR\_Drop\_Karma (7)

#define LVAR\_Gave\_Xp (8)

/\* Imported variables from the Map scripts. These should only be

   pointers and variables that need not be saved. If a variable

   Needs to be saved, make it a map variable (MVAR\_) \*/

import variable Nagor\_Tile;

/\* 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\_VILLAGER);

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 the critter is mad at the player for any reason, it will attack and remember to attack

   the player should the game be saved and loaded repeatedly. Additionally, if any special

   actions need to be taken by the critter based on previous combat, the critter will remember

   this as well. \*/

   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

   if (global\_var(GVAR\_ARROYO\_DOG) == DOG\_RUN\_OFF) then begin

       animate\_run\_to\_tile(RUNNING\_TILE);

   end

   if (tile\_num(self\_obj) == RUNNING\_TILE) then begin

       set\_obj\_visibility(self\_obj,1); // go invis

       move\_to(self\_obj,5000,2);

   end

   Nagor\_Tile:=tile\_num(self\_obj);

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 the player causes damage to this critter, then he will instantly consider the player

   his personal enemy. In Critter\_Proc or through dialog, actions will be taken against

   the player for his evil acts. \*/

   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

   Evil\_Critter:=0;

   Slavery\_Tolerant:=SLAVE\_VERY\_INTOLERANT;

   Karma\_Perception:=KARMA\_PERCEPTION1;

   CheckKarma;

   GetReaction;

   if (dude\_iq < 4) then begin

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

       gSay\_Start;

           call Node012;

       gSay\_End;

       end\_dialogue;

   end

   else if (reached\_tl\_4) then begin

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

       gSay\_Start;

           call Node016;

       gSay\_End;

       end\_dialogue;

   end

   else if (reached\_tl\_3) then begin

       call Node015;

    end

   else if (reached\_tl\_2) then begin

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

       gSay\_Start;

           call Node014;

       gSay\_End;

       end\_dialogue;

   end

   else if (reached\_tl\_1) then begin

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

       gSay\_Start;

           call Node013;

       gSay\_End;

       end\_dialogue;

   end

   else if (global\_var(GVAR\_ARROYO\_DOG) == DOG\_RUN\_OFF) then begin

       floater(131);

   end

   else if (global\_var(GVAR\_ARROYO\_DOG) == DOG\_ACCEPTED) then begin

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

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

       gSay\_Start;

           call Node005;

       gSay\_End;

       end\_dialogue;

   end

   else if (global\_var(GVAR\_ARROYO\_DOG) == DOG\_DEAD) then begin

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

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

       gSay\_Start;

           call Node006;

       gSay\_End;

       end\_dialogue;

   end

   else if (global\_var(GVAR\_ARROYO\_DOG) == DOG\_RETURNED) then begin

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

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

       gSay\_Start;

           call Node009;

       gSay\_End;

       end\_dialogue;

   end

   else if (global\_var(GVAR\_ARROYO\_DOG) == DOG\_FINISHED\_GOOD) then begin

       call Node010;

   end

   else if (global\_var(GVAR\_ARROYO\_DOG) == DOG\_FINISHED\_BAD) then begin

       call Node011;

   end

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

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

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

       gSay\_Start;

           call Node001;

       gSay\_End;

       end\_dialogue;

   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

/\* Set global\_variable for Enemy status\*/

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

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 ((global\_var(GVAR\_ARROYO\_DOG) >= DOG\_FINISHED\_GOOD) or (global\_var(GVAR\_ARROYO\_DOG) == DOG\_RETURNED)) then

       display\_msg(mstr(300));

   else

       display\_msg(mstr(100));

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(101));

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

/\* Should the Player ever cause the NPC too much discomfort that he desires to attack the player,

   this call will be made. Essentially, it stores the Hostile vaule so that the critter remembers

   he was once hostile towards the player.\*/

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

// Not lines are allowed to be added below here

// The Following lines are from the Design Tool

//~~~~~~~~~~~~~~~~ DESIGN TOOL STARTS HERE

procedure Node001 begin

   if (dude\_is\_male) then

       Reply(102);

   else

       Reply(302);

   BOption(103,Node002,004);

   NOption(104,Node003,004);

end

procedure Node002 begin

   Reply(105);

   NOption(106,Node003,004);

   BOption(107,Node002a,004);

end

procedure Node002a begin

   set\_global\_var(GVAR\_ARROYO\_DOG,DOG\_RUN\_OFF);

   if (local\_var(LVAR\_Drop\_Karma) == 0) then begin

       set\_local\_var(LVAR\_Drop\_Karma,1);

       inc\_general\_rep(REP\_BONUS\_ARROYO\_LIED\_ABOUT\_DOG);

   end

end

procedure Node003 begin

   Reply(108);

   NOption(109,Node003a,004);

   NOption(110,Node003b,004);

   BOption(111,Node002,004);

end

procedure Node003a begin

   set\_global\_var(GVAR\_ARROYO\_DOG,DOG\_ACCEPTED);

   call Node004;

end

procedure Node003b begin

   set\_global\_var(GVAR\_ARROYO\_DOG,DOG\_ACCEPTED);

end

procedure Node004 begin

   Reply(112);

   NOption(113,Node999,004);

end

procedure Node005 begin

   Reply(114);

   NOption(115,Node004,004);

   NOption(116,Node999,004);

end

procedure Node006 begin

   Reply(117);

   BOption(118,Node006a,004);

   NOption(119,Node006b,004);

end

procedure Node006a begin

   if (local\_var(LVAR\_Drop\_Karma) == 0) then begin

       set\_local\_var(LVAR\_Drop\_Karma,1);

       inc\_general\_rep(REP\_BONUS\_ARROYO\_LIED\_ABOUT\_DOG);

   end

end

procedure Node006b begin

   set\_global\_var(GVAR\_ARROYO\_DOG,DOG\_FINISHED\_BAD);

   call Node007;

end

procedure Node007 begin

   Reply(120);

   NOption(121,Node008,004);

   BOption(122,Node007a,004);

end

procedure Node007a begin

   if (local\_var(LVAR\_Drop\_Karma) == 0) then begin

       set\_local\_var(LVAR\_Drop\_Karma,1);

       inc\_general\_rep(REP\_BONUS\_ARROYO\_LIED\_ABOUT\_DOG);

   end

   set\_global\_var(GVAR\_ARROYO\_DOG,DOG\_RUN\_OFF);

end

procedure Node008 begin

   Reply(123);

   NOption(124,Node999,004);

end

procedure Node009 begin

   set\_global\_var(GVAR\_ARROYO\_DOG,DOG\_FINISHED\_GOOD);

   if (local\_var(LVAR\_Drop\_Karma) == 0) then begin

       set\_local\_var(LVAR\_Drop\_Karma,1);

       inc\_general\_rep(REP\_BONUS\_ARROYO\_RETURNED\_DOG);

       give\_xp(EXP\_RETURN\_SMOKE);

   end

   Reply(125);

   NOption(126,Node999,004);

end

procedure Node010 begin

   floater(127);

end

procedure Node011 begin

   floater(128);

end

procedure Node012 begin

   Reply(129);

   NLowOption(130,Node999);

end

procedure Node013 begin

   if (dude\_is\_male) then

       Reply(200);

   else

       Reply(201);

   NLowOption(202,Node999);

   NOption(203,Node999,004);

end

procedure Node014 begin

   if (dude\_is\_male) then

       Reply(204);

   else

       Reply(205);

   NLowOption(206,Node999);

   NOption(207,Node999,004);

end

procedure Node015 begin

   if (dude\_is\_male) then

       floater(208);

   else

       floater(209);

end

procedure Node016 begin

   if (dude\_is\_male) then

       Reply(210);

   else

       Reply(211);

   NLowOption(212,Node017);

   NOption(213,Node017,004);

end

procedure Node017 begin

   if (dude\_is\_male) then

       NMessage(214);

   else

       NMessage(215);

end

//xxxxxxxxxxxxxxxxxxxx