Share Pastebin
Guest
Public paste!

rf`

By: a guest | Mar 21st, 2010 | Syntax: None | Size: 3.47 KB | Hits: 82 | Expires: Never
Copy text to clipboard
  1. in library script:
  2. _______________________________________________
  3.  
  4. int inspace;
  5. int SpacesuitIntegrity=10;
  6.  
  7. script 850 (void)
  8. {
  9.         if(inspace)
  10.         {
  11.                 SetHudSize(320,200,1);
  12.                 SetFont("SMALLFONT");
  13.                 if(SpacesuitIntegrity>0){hudmessage(s:"Suit Integrity: ",d:SpacesuitIntegrity;hudmsg_plain, 30, CR_UNTRANSLATED, 160.4, 160.0,0);}
  14.                 int suithealth;
  15.                 int suithealth2;
  16.                 SetFont("SPACEST1");
  17.                 hudmessage(s:"A";hudmsg_plain, 1003, CR_UNTRANSLATED, 160.4, 100.0,0);
  18.                 suithealth=GetActorProperty(1000,APROP_Health);
  19.                 suithealth2=GetActorProperty(1000,APROP_Health);
  20.                 delay(5);
  21.                 suithealth2=GetActorProperty(1000,APROP_Health);
  22.                 if(suithealth2<suithealth) { SpacesuitIntegrity-=1; }
  23.                 if(SpacesuitIntegrity<=0)
  24.                 {
  25.                         acs_execute(851,0,0,0,0);
  26.                 }
  27.         }
  28.         else
  29.         {
  30.                 if(SpacesuitIntegrity>0)
  31.                 {
  32.                         acs_execute(851,0,0,0,0);
  33.                 }
  34.         }
  35.         delay(1);
  36.         restart;
  37. }
  38.  
  39. script 851 (void)
  40. {
  41.         if(SpacesuitIntegrity>0)
  42.         {
  43.                 hudmessage(s:"";hudmsg_plain, 1003, CR_UNTRANSLATED, 0.0, 0.0, 0);
  44.                 hudmessage(s:"";hudmsg_plain, 30, CR_UNTRANSLATED, 0.0, 0.0, 0);
  45.                 hudmessage(s:"";hudmsg_plain, 31, CR_UNTRANSLATED, 0.0, 0.0, 0);
  46.                 terminate;
  47.         }
  48.         SetHudSize(320,200,1);
  49.         SetFont("SMALLFONT");
  50.        
  51.         while(SpacesuitIntegrity<=0)
  52.         {
  53.                 if(!inspace)
  54.                 {
  55.                         if(SpacesuitIntegrity>0) { terminate; }
  56.                         hudmessage(s:"Suit Integrity Recovering";hudmsg_plain, 30, CR_UNTRANSLATED , 160.4, 160.0,0);
  57.                         hudmessage(s:"";hudmsg_plain, 31, CR_UNTRANSLATED , 160.4, 170.0,0);
  58.                         delay(35);
  59.                         hudmessage(s:"";hudmsg_plain, 1003, CR_UNTRANSLATED, 0.0, 0.0, 0);
  60.                         hudmessage(s:"";hudmsg_plain, 30, CR_UNTRANSLATED, 0.0, 0.0, 0);
  61.                         hudmessage(s:"";hudmsg_plain, 31, CR_UNTRANSLATED, 0.0, 0.0, 0);
  62.                         SpacesuitIntegrity=10;
  63.                         terminate;
  64.                 }
  65.                 hudmessage(s:"Suit Integrity: 0";hudmsg_plain, 30, CR_YELLOW, 160.4, 160.0,0);
  66.                 hudmessage(s:"Warning: BREACHED SUIT";hudmsg_plain, 31, CR_YELLOW, 160.4, 170.0,0);
  67.                 delay(5);
  68.                 hudmessage(s:"Suit Integrity: 0";hudmsg_plain, 30, CR_ORANGE, 160.4, 160.0,0);
  69.                 hudmessage(s:"Warning: BREACHED SUIT";hudmsg_plain, 31, CR_ORANGE, 160.4, 170.0,0);
  70.                 delay(5);
  71.                 hudmessage(s:"Suit Integrity: 0";hudmsg_plain, 30, CR_RED, 160.4, 160.0,0);
  72.                 hudmessage(s:"Warning: BREACHED SUIT";hudmsg_plain, 31, CR_RED, 160.4, 170.0,0);
  73.                 delay(5);
  74.                 hudmessage(s:"Suit Integrity: 0";hudmsg_plain, 30, CR_DARKRED , 160.4, 160.0,0);
  75.                 hudmessage(s:"Warning: BREACHED SUIT";hudmsg_plain, 31, CR_DARKRED , 160.4, 170.0,0);
  76.                 delay(5);
  77.                 hudmessage(s:"Suit Integrity: 0";hudmsg_plain, 30, CR_RED , 160.4, 160.0,0);
  78.                 hudmessage(s:"Warning: BREACHED SUIT";hudmsg_plain, 31, CR_RED , 160.4, 170.0,0);
  79.                 delay(5);
  80.                 hudmessage(s:"Suit Integrity: 0";hudmsg_plain, 30, CR_ORANGE, 160.4, 160.0,0);
  81.                 hudmessage(s:"Warning: BREACHED SUIT";hudmsg_plain, 31, CR_ORANGE, 160.4, 170.0,0);
  82.                 delay(5);
  83.                 damagething(5);        
  84.         }
  85. }
  86.  
  87. _______________________________________________
  88. in map script:
  89. _______________________________________________
  90.  
  91. int airlocktoggle;
  92.  
  93. script 10 (int mode) //airlock to outside
  94. {
  95.  
  96.     if(airlocktoggle)
  97.     {
  98.     door_close(22,64);
  99.     delay(35*1);
  100.     sector_setcolor(23,255,0,0);
  101.     inspace=0;
  102.     delay(35*2);    
  103.     sector_setcolor(23,255,255,255);
  104.     delay(35*1);
  105.     door_open(21,64);
  106.     airlocktoggle=0;
  107.     }
  108.    
  109.     else
  110.     {
  111.     door_close(21,64);
  112.     delay(35*1);
  113.     sector_setcolor(23,255,0,0);
  114.     inspace=1;
  115.     delay(35*2);    
  116.     sector_setcolor(23,255,255,255);
  117.     delay(35*1);
  118.     door_open(22,64);
  119.     airlocktoggle=1;
  120.     }
  121. }