home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2012 February / maximum-cd-2012-02.iso / DiscContents / TheWagerSetup1.2.exe / Assets / Scripts / OnLeaveIsland.lua < prev    next >
Encoding:
Text File  |  2011-05-16  |  624 b   |  17 lines

  1. -- Script OnLeaveIsland
  2. -- This script is run whenever the ship leaves an island. Be careful not to create things that would happen -every- time.
  3.  
  4. -- Check if player has Key and Lockbox
  5. if InInventory("{3}") and InInventory("{4}") then
  6.  
  7.   ShowPopup("You notice that your rusty old key bears the same symbol as the lockbox you were given by the Chieftain. It seems like a long shot, but you try it anyway. It works, and inside the box you see the glow of a fabulous red gem. It must be worth a lot!");
  8.  
  9.   AddInventory("{11}");
  10.  
  11.   RemoveInventory("{3}");
  12.   RemoveInventory("{4}");
  13.   
  14.   AddCheevo('[17]');
  15.  
  16. end
  17.