home *** CD-ROM | disk | FTP | other *** search
/ Classic Fond 52 / ClassicFond52.iso / GAMES / DROIDW.RAR / DWCD.GOB / mission_cog_00_t_startcammyhelp.cog < prev    next >
Encoding:
Text File  |  1998-11-04  |  2.6 KB  |  104 lines

  1. # Droids COG Script
  2. #
  3. # 00_HelptextTimer.cog
  4. #
  5. # Displays Help messages with optional timeouts 
  6. #
  7. # Desc (original):
  8. #    Two sectors, startsector and startsecotr2 will trigger the message number
  9. #    specified by messagenumber. The stopsectors display message 0, effectively
  10. #    turning it off.
  11. #
  12. # Desc (Timer version):
  13. #    There are now two new variables, displaytime and show_once. 
  14. #    Displaytime, if set to a number larger than 0, will only
  15. #        display the message for the number of seconds it's set to.
  16. #    Show_once, if set to 1, will display the message only once then never 
  17. #        display it again. 
  18. #
  19. #         [MT]    Created
  20. # 11/03/97    [DGS]    Added Printtext commands for debugging
  21. # 11/04/97    [DGS]    Added    two more start and stop sectors
  22. # 12/03/97    [DGS]    Modified "Helptext" to add timeouts and one-offs (see desc. above).
  23. # 03/10/98     [JP]      Modified to add 2nd message.   
  24. # ========================================================================================
  25.  
  26. symbols
  27. message         entered
  28. message        timer
  29. message        startup
  30.  
  31.  
  32. sector             startsector     linkid=1
  33. sector             stopsector      linkid=2
  34.  
  35. int                 messagenumber
  36. int            displaytime=0    
  37. int            show_once=0
  38.  
  39. cog            cammy
  40.  
  41. end
  42.  
  43.  
  44. code
  45.  
  46.  
  47. startup:
  48.      player=getlocalplayerthing();
  49.      if (!GetInv(GetLocalPlayerThing(), 21))
  50.           {
  51.           //Player hasn't visited the training ground before
  52.           SetInv(GetLocalPlayerThing(), 21, 1);     
  53.           dwplaycammyspeech(16000, "TGCA001.wav", 5, 2);
  54.           settimer(8);
  55.           }
  56.           
  57.      else
  58.           {
  59.           randx=rand();
  60.           if (randx> 0.75)
  61.                {
  62.                dwplaycammyspeech(16111, "TGCA005.wav", 3, 2);
  63.                sleep(2);
  64.                sendmessage(cammy, user1);
  65.                }
  66.                     
  67.           else if (randx> 0.5)
  68.                {
  69.                dwplaycammyspeech(16002, "TGCA006.wav", 3, 2);
  70.                sleep(2);
  71.                sendmessage(cammy, user1);
  72.                }
  73.                
  74.           else if (randx> 0.25)
  75.                {
  76.                dwplaycammyspeech(16003, "TGCA007.wav", 3, 2);
  77.                sleep(2);
  78.                sendmessage(cammy, user1);
  79.                }
  80.                
  81.           else 
  82.                {
  83.                dwplaycammyspeech(16004, "TGCA008.wav", 3, 2);
  84.                sleep(2);
  85.                sendmessage(cammy, user1);
  86.                }
  87.           }
  88.  
  89.      return;
  90.  
  91. timer:
  92.      dwplaycammyspeech(16100, "TGCA020.wav", 3, 2);
  93.      sleep(22);
  94.      sendmessage(cammy, user1);
  95.      print("sent");
  96.      return;
  97.  
  98.  
  99. end
  100.  
  101.  
  102.  
  103.  
  104.