home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2012 February / maximum-cd-2012-02.iso / DiscContents / TheWagerSetup1.2.exe / Assets / Scripts / SeaMonster4.lua < prev    next >
Encoding:
Text File  |  2011-03-06  |  2.2 KB  |  45 lines

  1. -- SeaMonster Events
  2. Starting = 0;
  3. SeaEvent = 1;
  4.  
  5. iValue = GetIntFlag(4);
  6.  
  7. if iValue == 1 then
  8.  
  9.   ShowStoryText("Injured as it is, the crew find the confidence to attack for all they are worth, throwing everything they have at the lashing tentacles and causing the beast to scream with rage. Then, quite suddenly, the creature falls silent, and begins to sink helplessly back down into the depths. You have won and, uncharacteristically proud of your crew, you declare that this night you will all feast on the finest meats and wines in your hold in celebration.");
  10.  
  11. else
  12.  
  13.   if CrewPower >= 9 then
  14.  
  15.     ShowStoryText("The crew stand ready, and you find yourself mildly touched at how willing they are to fight for you and your ship. Fortunately they do so well, throwing everything they have at the lashing tentacles and causing the beast to scream with rage. Then, quite suddenly, the creature falls silent, and begins to sink helplessly back down into the depths. You have won and, uncharacteristically proud of your crew, you declare that this night you will all feast on the finest meats and wines in your hold in celebration.");
  16.     
  17.   else
  18.  
  19.     CrewID1 = math.random(0, CrewCount);
  20.     CrewID2 = math.random(0, CrewCount);
  21.  
  22.     while CrewID2 == CrewID1 do
  23.       CrewID2 = math.random(0, CrewCount);
  24.     end
  25.  
  26.     CrewName1 = GetCrewName(CrewID1);
  27.     CrewName2 = GetCrewName(CrewID2);
  28.  
  29.     ShowStoryText("You realise that you are sending your crew to die, but you see no other course of action, and refuse to show remorse. You give no cry as " .. CrewName1 .. " is impaled by a bony spike. You deny yourself the luxury of tears as " .. CrewName2 .. " is picked up by a thrashing tentacle. Eventually the creature sinks back into the depths, satisfied with its meal of your entire crew. As you sail back to port, alone, you treat yourself to the finest meats and wines in your hold, because you know it is what they would have wanted.");
  30.     
  31.     for i = 0, CrewCount, 1 do
  32.       KillCrew(0);
  33.     end    
  34.  
  35.     RemoveAlly("{1}");
  36.     RemoveAlly("{2}");
  37.     RemoveAlly("{3}");
  38.     RemoveAlly("{4}");
  39.  
  40.     SetStartingEvent("[48]", false);
  41.     SetStartingEvent("[58]", false);
  42.  
  43.   end
  44.  
  45. end