ACWARIOR.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: Warrior of Arroyo

        Location: Arroyo

        Description: Generic warrior in Arroyo. Will be armed with either a spear or a knife.

        Log:

           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.

           Created: December 01, 1997

           Updated:

\*/

/\* 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\ArVillag.h"

#define NAME SCRIPT\_ACWARIOR

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

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

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

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

procedure timed\_event\_p\_proc;

procedure push\_p\_proc;

/\* Script Specific Procedure Calls \*/

procedure Node997; // This Node goes to the where to go

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;

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

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

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

variable Only\_Once:=0;

variable In\_Timed\_Event;

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 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 ((random(0,200) == 1) and (In\_Timed\_Event == 0)) then begin

       In\_Timed\_Event:=1;

       add\_timer\_event(self\_obj,game\_ticks(random(3,7)),1);

   end

end

procedure push\_p\_proc begin

end

procedure timed\_event\_p\_proc begin

   if (fixed\_param == 1) then begin

       animate\_move\_to\_tile(tile\_num\_in\_direction(tile\_num(self\_obj),random(0,5),random(3,7)));

       In\_Timed\_Event:=0;

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

   GetReaction;

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

       call Node009;

   end

   else begin

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

       gSay\_Start;

// if (map\_var(MVAR\_Talked\_Warrior) == 0) then begin

// set\_map\_var(MVAR\_Talked\_Warrior,1);

// call Node000;

// end

// else

             call Node997;

       gSay\_End;

       end\_dialogue;

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

   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 (get\_critter\_stat(self\_obj,STAT\_gender) == GENDER\_MALE) then begin

       display\_msg(mstr(100));

   end

   else begin

       display\_msg(mstr(101));

   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

procedure Node009 begin

   floater(random(176,179));

end

procedure Node997 begin

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

       call Node007;

   end

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

       call Node001;

   end

   else begin

       call Node001;

   end

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 Node000 begin

   Reply(150);

   NOption(151,Node997,001);

end

procedure Node001 begin

   if (reached\_tl\_4) then

       Reply(303);

   else if (reached\_tl\_3) then

       Reply(302);

   else if (reached\_tl\_2) then

       Reply(301);

   else if (reached\_tl\_1) then

       Reply(300);

   else

       Reply(mstr(152));

   NOption(153,Node002,004);

   NOption(154,Node010,004);

   NOption(155,Node003,004);

end

procedure Node002 begin

   Reply(156);

   NOption(157,Node006,004);

   NOption(158,Node999,004);

end

procedure Node003 begin

   Reply(159);

   NOption(160,Node999,004);

end

procedure Node004 begin

   Reply(161);

   NOption(163,Node005,004);

   NOption(164,Node006,004);

   NOption(162,Node999,004);

end

procedure Node005 begin

   Reply(165);

   NOption(167,Node006,004);

   NOption(166,Node999,004);

end

procedure Node006 begin

   Reply(168);

   NOption(169,Node003,004);

   NOption(170,Node010,004);

   NOption(171,Node999,004);

end

procedure Node007 begin

   Reply(172);

   NLowOption(173,Node008);

end

procedure Node008 begin

   Reply(174);

   NLowOption(175,Node999);

end

procedure Node010 begin

   Reply(180);

   NOption(181,Node003,004);

   NOption(182,Node999,004);

   NOption(183,Node006,004);

end

//xxxxxxxxxxxxxxxxxxxx