Advertisement
Guest User

Untitled

a guest
Oct 11th, 2014
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.36 KB | None | 0 0
  1. #include "zcommon.acs"
  2.  
  3. script "ActionSystem" ENTER
  4. {
  5.     //stamina regen system
  6.     int buttons = GetPlayerInput(-1, INPUT_BUTTONS);
  7.     if(buttons & BT_ALTATTACK)
  8.     {
  9.         delay(35);
  10.     }
  11.     if(buttons & BT_ATTACK)
  12.     {  
  13.         delay(35);
  14.     }
  15.     if (CheckInventory("Stamina") == 0)
  16.     {
  17.         delay(35*2);
  18.         GiveInventory("Stamina",1);
  19.     }
  20.     if(CheckInventory("Stamina") != 0)
  21.     {
  22.         delay(4);
  23.         if(CheckInventory("Roll") == 1)
  24.         {
  25.             delay(4);
  26.         }
  27.         else
  28.         {  
  29.             GiveInventory("Stamina",1);
  30.         }
  31.     }
  32.     //roll system
  33.     int button = GetPlayerInput(-1, INPUT_BUTTONS);
  34.     delay(1);
  35.     if(CheckInventory("Stamina") != 0)
  36.     {
  37.         if(button & BT_FORWARD && button & BT_CROUCH)
  38.         {
  39.             GiveInventory("Roll", 1);
  40.             SetActorProperty(0, APROP_Invulnerable, 1); //start of iframes
  41.             TakeInventory("Stamina", 33);
  42.             ThrustThing(GetActorAngle(0) >> 8, 10, 1, 0); //angle, speed, limit, id
  43.             delay(25); //cooldown for another roll
  44.             SetActorProperty(0, APROP_Invulnerable, 0); //end of iframes
  45.             TakeInventory("Roll",1);
  46.         }
  47.         int angle = GetActorAngle(0) >> 8;
  48.         if(button & BT_MOVELEFT && button & BT_CROUCH )
  49.         {  
  50.             GiveInventory("Roll", 1);
  51.             SetActorProperty(0, APROP_Invulnerable, 1);
  52.             TakeInventory("Stamina",33);
  53.             ThrustThing(angle+64, 10, 1, 0);
  54.             delay(25);
  55.             SetActorProperty(0, APROP_Invulnerable, 0);
  56.             TakeInventory("Roll",1);
  57.         }
  58.         if(button & BT_MOVERIGHT && button & BT_CROUCH)
  59.         {  
  60.             GiveInventory("Roll", 1);
  61.             SetActorProperty(0, APROP_Invulnerable, 1);
  62.             TakeInventory("Stamina", 33);
  63.             ThrustThing(angle +192 , 10, 1, 0);
  64.             delay(25);
  65.             SetActorProperty(0, APROP_Invulnerable, 0);
  66.             TakeInventory("Roll",1);
  67.         }
  68.         if(button & BT_BACK && button & BT_CROUCH)
  69.         {  
  70.             GiveInventory("Roll", 1);
  71.             SetActorProperty(0, APROP_Invulnerable, 1);
  72.             TakeInventory("Stamina",33);
  73.             ThrustThing(angle+128, 10, 1, 0);
  74.             delay(25);
  75.             SetActorProperty(0, APROP_Invulnerable, 0);
  76.             TakeInventory("Roll",1);
  77.         }
  78.         //sprint system
  79.         if((button & BT_FORWARD) | (button & BT_BACK) | (button & BT_MOVELEFT) | (button & BT_MOVERIGHT) && (button & BT_SPEED) && CheckInventory("Stamina") > 2)
  80.         {
  81.             SetActorProperty(0, APROP_SPEED, 2.0); 
  82.             GiveInventory("IsSprinting", 3);
  83.             TakeInventory("Stamina", 2);       
  84.         }
  85.         else
  86.         {  
  87.             SetActorProperty(0, APROP_SPEED, 1.0);
  88.             TakeInventory("IsSprinting", 1);
  89.         }
  90.         delay(1);
  91.         restart;
  92.     }
  93.     restart;
  94. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement