Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 26th, 2012  |  syntax: None  |  size: 1.38 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. unit Talk;
  2.  
  3. interface
  4.  
  5. procedure message;
  6.  
  7. implementation
  8.  
  9. uses
  10.         crt,Variables,SaveWorld;
  11.  
  12. procedure message;
  13. var
  14.         arguments                       :string;
  15.         chatLogFile                     :text;
  16.         IOR                                     :integer;
  17. begin
  18.         gotoxy(2,24);
  19.         readln(arguments);
  20.         if (arguments='Cheat Unlimited Materials') then
  21.                 begin
  22.                         if (Cheats.unlimMaterials=false) then Cheats.unlimMaterials:=true
  23.                         else if (Cheats.unlimMaterials=true) then Cheats.unlimMaterials:=false;
  24.                 end
  25.         else if (arguments='Cheat Fly') then
  26.                 begin
  27.                         if (Cheats.fly=true) then Cheats.fly:=false
  28.                         else if (Cheats.fly=false) then Cheats.fly:=true;
  29.                 end
  30.         else if (arguments='Cheat Lava Placing') then
  31.                 begin
  32.                         if (Cheats.lavaPlacing=true) then Cheats.LavaPlacing:=false
  33.                         else if (Cheats.lavaPlacing=false) then Cheats.lavaPlacing:=true;
  34.                         miner.inventory[5]:=100;
  35.                 end
  36.         else if (arguments='noclip') then
  37.                 begin
  38.                         if (Cheats.noclip=true) then Cheats.noclip:=false
  39.                         else if (Cheats.noclip=false) then Cheats.noclip:=true;
  40.                 end
  41.         else if (arguments='Save') then Save;
  42.         gotoxy(2,24);
  43.         write('                                                 ');
  44.         {WRITING TO TEXT FILE}
  45.         assign(chatLogFile,'ChatLog.txt');
  46.         {$I-}
  47.                 Reset(chatLogFile);
  48.         {$I+}
  49.     IOR := IOResult;
  50.     if IOR = 2 then rewrite(chatLogFile)
  51.     else if IOR <> 0 then
  52.         begin
  53.                 append(chatLogFile);
  54.                         writeln(chatLogFile,arguments);
  55.                 end;
  56.         close(chatLogFile);
  57.         {FINISHED WRITING TO TEXT FILE}
  58. end;
  59.  
  60. end.