Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2022
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. class TGCpistol : TGCweapon {
  2. default {
  3. weapon.AmmoUse 1;
  4. weapon.AmmoGive 2;
  5. weapon.AmmoType "Clip";
  6. obituary "LOL";
  7. +WEAPON.WIMPY_WEAPON;
  8. inventory.PickupMessage "LOL";
  9. tag "LOL";
  10. }
  11. int a;
  12. //int a = 0;
  13. override void postBeginPlay()
  14. {
  15. super.postBeginPlay();
  16. //int a = 5; this one works but it's pretty useless if it only works here
  17. }
  18.  
  19. states {
  20. Ready:
  21. //PISG A 1 a_WeaponReady();
  22. TNT1 A 0 a_WeaponOffset(0, -6, WOF_ADD);
  23. PISG A 0 a_WeaponOffset(acs_NamedExecuteWithResult("TGCcheckInventoryX"), acs_NamedExecuteWithResult("TGCcheckInventoryY"), WOF_ADD | WOF_INTERPOLATE);
  24. PISG A 0 giveInventory("TGCswepSwchPosY", acs_NamedExecuteWithResult("TGCcheckInventoryY"));
  25. TNT1 A 0 giveInventory("TGCswepSwchPosX", 5);
  26. TNT1 A 0 a_JumpIfInventory("TGCswepSwchPosY", 100, 1);
  27. goto Ready;
  28. TNT1 A 0 setInventory("TGCswepSwchPosYbackup", acs_NamedExecuteWithResult("TGCcheckInventoryY"));
  29. TNT1 A 0 setInventory("TGCswepSwchPosY", 1);
  30. TNT1 A 0 setInventory("TGCswepSwchPosXbackup", -1 * acs_NamedExecuteWithResult("TGCcheckInventoryY"));
  31. TNT1 A 0 setInventory("TGCswepSwchPosX", 1);
  32. goto ReadyAgain;
  33.  
  34. ReadyAgain:
  35. TNT1 A 0 a_WeaponOffset(0, -6, WOF_ADD);
  36. PISG A 1 a_WeaponOffset(acs_NamedExecuteWithResult("TGCcheckInventoryXbackup"), acs_NamedExecuteWithResult("TGCcheckInventoryYbackup"), WOF_ADD | WOF_INTERPOLATE);
  37. PISG A 0 giveInventory("TGCswepSwchPosYbackup", acs_NamedExecuteWithResult("TGCcheckInventoryYbackup"));
  38. TNT1 A 0 giveInventory("TGCswepSwchPosXbackup", 5);
  39. TNT1 A 0 a_JumpIfInventory("TGCswepSwchPosYbackup", 100, 1);
  40. goto ReadyAgain;
  41. TNT1 A 0 setInventory("TGCswepSwchPosYbackup", acs_NamedExecuteWithResult("TGCcheckInventoryY"));
  42. TNT1 A 0 setInventory("TGCswepSwchPosY", 1);
  43. TNT1 A 0 setInventory("TGCswepSwchPosXbackup", -1 * acs_NamedExecuteWithResult("TGCcheckInventoryY"));
  44. TNT1 A 0 setInventory("TGCswepSwchPosX", 1);
  45. goto ReadyAgainAgain;
  46.  
  47. ReadyAgainAgain:
  48. PISG A 1 a_WeaponReady();
  49. loop;
  50.  
  51. Deselect:
  52. PISG A 0 a_Lower();
  53. //{
  54. //a = 0;
  55. //}
  56. goto DeselectAgain;
  57.  
  58. DeselectAgain:
  59. TNT1 A 0 a_WeaponOffset(0, -6, WOF_ADD);
  60. PISG A 1 a_WeaponOffset(acs_NamedExecuteWithResult("TGCcheckInventoryX"), acs_NamedExecuteWithResult("TGCcheckInventoryY"), WOF_ADD | WOF_INTERPOLATE);
  61. PISG A 0 giveInventory("TGCswepSwchPosY", acs_NamedExecuteWithResult("TGCcheckInventoryY"));
  62. TNT1 A 0 giveInventory("TGCswepSwchPosX", 5);
  63. TNT1 A 0 a_JumpIfInventory("TGCswepSwchPosY", 100, 1);
  64. goto ReadyAgainAgain;
  65. TNT1 A 0 setInventory("TGCswepSwchPosYbackup", acs_NamedExecuteWithResult("TGCcheckInventoryY"));
  66. TNT1 A 0 setInventory("TGCswepSwchPosY", 1);
  67. TNT1 A 0 setInventory("TGCswepSwchPosXbackup", acs_NamedExecuteWithResult("TGCcheckInventoryY"));
  68. TNT1 A 0 setInventory("TGCswepSwchPosX", 1);
  69. goto d;
  70.  
  71. d:
  72. TNT1 A 0 a_Lower();
  73. loop;
  74.  
  75. Select:
  76. PISG A 0 a_Raise();
  77. loop;
  78.  
  79. Fire:
  80. PISG A 4;
  81. PISG B 6 a_FirePistol();
  82. PISG C 4;
  83. PISG B 5 a_Refire();
  84. goto ReadyAgainAgain;
  85.  
  86. Flash:
  87. PISF A 7 Bright a_Light1();
  88. goto LightDone;
  89. PISF A 7 Bright a_Light1();
  90. goto LightDone;
  91.  
  92. Spawn:
  93. PIST A -1;
  94. stop;
  95. }
  96. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement