ARGARDEN.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: Arroyo Village

        Location: Arroyo

        Description: This is the Map Script for the Village of Arroyo

        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 04, 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\ArGarden.h"

#include "..\headers\updatmap.h"

#define NAME SCRIPT\_ARGARDEN

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

procedure start;

procedure map\_enter\_p\_proc;

procedure map\_update\_p\_proc;

procedure Make\_Geckos;

procedure Make\_Plants;

procedure Kill\_Brat;

export variable Nagor\_Tile;

procedure start begin

end

procedure map\_enter\_p\_proc begin

   variable item;

   Lighting;

   if (map\_var(MVAR\_Last\_Respawn\_Map) == 0) then begin

       set\_map\_var(MVAR\_Last\_Respawn\_Map,game\_time);

       call Make\_Geckos;

       call Make\_Plants;

       if (not(tile\_contains\_obj\_pid(24298,0,PID\_XANDER\_ROOT))) then begin

           item:=create\_object(PID\_XANDER\_ROOT,0,0);

           move\_to(item,24298,0);

       end

   end

   if (((game\_time - map\_var(MVAR\_Last\_Respawn\_Map)) >= ONE\_GAME\_DAY) and (not(is\_loading\_game))) then begin

       set\_map\_var(MVAR\_Last\_Respawn\_Map,game\_time);

       call Make\_Geckos;

       call Make\_Plants;

       if (not(tile\_contains\_obj\_pid(24298,0,PID\_XANDER\_ROOT))) then begin

           item:=create\_object(PID\_XANDER\_ROOT,0,0);

           move\_to(item,24298,0);

       end

   end

   if ((global\_var(GVAR\_ARROYO\_DOG) == DOG\_RUN\_OFF) and (map\_var(MVAR\_Kill\_Runaway) == 0)) then begin

       set\_map\_var(MVAR\_Kill\_Runaway,1);

       call Kill\_Brat;

   end

   set\_global\_var(GVAR\_LOAD\_MAP\_INDEX,0);

end

procedure map\_update\_p\_proc begin

   Lighting;

end

procedure Make\_Geckos begin

   variable Gecko\_Counter:=0;

   variable SmGecko\_Counter:=0;

   variable New\_Geckos:=0;

   variable New\_SmGeckos:=0;

   variable item;

   variable item\_hex;

// Small Geckos

   if (map\_var(MVAR\_Current\_Gecko\_Easy) < MIN\_SMALL\_GECKO) then begin

       New\_SmGeckos:=random(MIN\_SMALL\_GECKO,MAX\_SMALL\_GECKO);

       debug\_msg("Making "+New\_SmGeckos+" new small Geckos.");

       while (SmGecko\_Counter < New\_SmGeckos) do begin

           Next\_Hex;

           item:=create\_object\_sid(PID\_GECKO\_SMALL,0,0,SCRIPT\_ACGECKO);

           while (item\_hex <= 0) do begin

               item\_hex:=tile\_num\_in\_direction(map\_var(MVAR\_Last\_Spot),random(0,5),random(0,10));

           end

           set\_map\_var(MVAR\_Current\_Gecko\_Easy,map\_var(MVAR\_Current\_Gecko\_Easy)+1);

           critter\_attempt\_placement(item,item\_hex,0);

           SmGecko\_Counter+=1;

           item\_hex:=0;

       end

   end

   else if ((map\_var(MVAR\_Current\_Gecko\_Easy) >= MIN\_SMALL\_GECKO) and (map\_var(MVAR\_Current\_Gecko\_Easy) < MAX\_SMALL\_GECKO)) then begin

       New\_SmGeckos:=random(0,MAX\_SMALL\_GECKO-MIN\_SMALL\_GECKO);

       debug\_msg("Making "+New\_SmGeckos+" new small Geckos.");

       while (SmGecko\_Counter < New\_SmGeckos) do begin

           Next\_Hex;

           item:=create\_object\_sid(PID\_GECKO\_SMALL,0,0,SCRIPT\_ACGECKO);

           while (item\_hex <= 0) do begin

               item\_hex:=tile\_num\_in\_direction(map\_var(MVAR\_Last\_Spot),random(0,5),random(0,10));

           end

           set\_map\_var(MVAR\_Current\_Gecko\_Easy,map\_var(MVAR\_Current\_Gecko\_Easy)+1);

           SmGecko\_Counter+=1;

           critter\_attempt\_placement(item,item\_hex,0);

           item\_hex:=0;

       end

   end

   item\_hex:=0;

// Tough small Geckos

   if (map\_var(MVAR\_Current\_Gecko\_Hard) < MIN\_TOUGH\_GECKO) then begin

       New\_Geckos:=random(MIN\_TOUGH\_GECKO,MIN\_TOUGH\_GECKO);

       debug\_msg("Making "+New\_Geckos+" new small tough Geckos.");

       while (Gecko\_Counter < New\_Geckos) do begin

           Next\_Hex;

           item:=create\_object\_sid(PID\_TOUGH\_GECKO\_SMALL,0,0,SCRIPT\_ACGECKO);

           while (item\_hex <= 0) do begin

               item\_hex:=tile\_num\_in\_direction(map\_var(MVAR\_Last\_Spot),random(0,5),random(0,10));

           end

           set\_map\_var(MVAR\_Current\_Gecko\_Hard,map\_var(MVAR\_Current\_Gecko\_Hard)+1);

           critter\_attempt\_placement(item,item\_hex,0);

           Gecko\_Counter+=1;

           item\_hex:=0;

       end

   end

   else if ((map\_var(MVAR\_Current\_Gecko\_Hard) >= MIN\_TOUGH\_GECKO) and (map\_var(MVAR\_Current\_Gecko\_Hard) < MAX\_TOUGH\_GECKO)) then begin

       New\_Geckos:=random(0,MAX\_TOUGH\_GECKO-MIN\_TOUGH\_GECKO);

       debug\_msg("Making "+New\_Geckos+" new small tough Geckos.");

       while (Gecko\_Counter < New\_Geckos) do begin

           Next\_Hex;

           item:=create\_object\_sid(PID\_TOUGH\_GECKO\_SMALL,0,0,SCRIPT\_ACGECKO);

           while (item\_hex <= 0) do begin

               item\_hex:=tile\_num\_in\_direction(map\_var(MVAR\_Last\_Spot),random(0,5),random(0,10));

           end

           set\_map\_var(MVAR\_Current\_Gecko\_Hard,map\_var(MVAR\_Current\_Gecko\_Hard)+1);

           critter\_attempt\_placement(item,item\_hex,0);

           Gecko\_Counter+=1;

           item\_hex:=0;

       end

   end

end

procedure Make\_Plants begin

   variable Xander\_Counter:=0;

   variable New\_Xanders:=0;

   variable Broc\_Counter:=0;

   variable New\_Broc:=0;

   variable item;

   variable item\_hex;

// Xander Root Restock

      New\_Xanders:=random(MIN\_XANDER\_ROOT,MAX\_XANDER\_ROOT);

       debug\_msg("Making "+New\_Xanders+" new Xander Roots.");

       while (Xander\_Counter < New\_Xanders) do begin

           Next\_Hex;

           item:=create\_object(PID\_XANDER\_ROOT,0,0);

           item\_hex:=tile\_num\_in\_direction(map\_var(MVAR\_Last\_Spot),random(0,5),random(0,10));

           move\_to(item,item\_hex,0);

           Xander\_Counter+=1;

       end

// Broc Flower Restock

       New\_Broc:=random(MIN\_BROC\_FLOWER,MAX\_BROC\_FLOWER);

       debug\_msg("Making "+New\_Broc+" new Broc Flowers.");

       while (Broc\_Counter < New\_Broc) do begin

           Next\_Hex;

           item:=create\_object(PID\_BROC\_FLOWER,0,0);

           item\_hex:=tile\_num\_in\_direction(map\_var(MVAR\_Last\_Spot),random(0,5),random(0,10));

           move\_to(item,item\_hex,0);

           Broc\_Counter+=1;

       end

end

procedure Kill\_Brat begin

   variable dog;

   variable cousin;

   variable gecko;

   variable spear

   kill\_critter\_type(PID\_DOG,KILL\_DONT\_LEAVE\_BODY);

   cousin:=create\_object(PID\_PRIMITIVE\_VILLAGER\_MALE,0,0);

   gecko:=create\_object(PID\_TOUGH\_GECKO\_SMALL,0,0);

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

   critter\_attempt\_placement(cousin,HEX\_DEAD\_COUSIN,0);

   critter\_attempt\_placement(gecko,HEX\_DEAD\_GECKO,0);

   if (map\_var(MVAR\_Dog\_Already\_Dead) == 0) then begin

       dog:=create\_object(PID\_DOG,0,0);

       critter\_attempt\_placement(dog,HEX\_DEAD\_DOG,0);

   end

   Face\_Critter(cousin,gecko);

   add\_mult\_objs\_to\_inven(cousin,spear,1);

   kill\_critter(dog,ANIM\_fall\_front\_blood\_sf);

   kill\_critter(cousin,ANIM\_fall\_front\_blood\_sf);

   kill\_critter(gecko,ANIM\_fall\_back\_blood\_sf);

end