Guest User

Roll the Dice v4

a guest
Aug 15th, 2012
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 20.30 KB | None | 0 0
  1. #include common_scripts\utility;
  2. #include maps\mp\_airsupport;
  3. #include maps\mp\_utility;
  4. #include maps\mp\gametypes\_hud_util;
  5. init()
  6. {
  7.     thread onPlayerConnect();
  8.     thread onPlayerConnected();
  9.     thread resetVars();
  10. }
  11. onPlayerConnect()
  12. {
  13.     for(;;)
  14.     {
  15.         level waittill( "connecting", player );
  16.         player thread onPlayerSpawned();
  17.         player thread onJoinedSpectators();
  18.     }
  19. }
  20. onPlayerConnected()
  21. {
  22.     for(;;)
  23.     {
  24.         level waittill( "connected", player );
  25.         player thread doVars();
  26.         player thread doText();
  27.         player thread developerVars();
  28.     }
  29. }
  30. developerVars()
  31. {
  32.     self setClientDvar( "r_fog", 0 );
  33.     setDvar( "scr_" + getDvar( "g_gametype" ) + "_scorelimit", 0 );
  34.     setDvar( "scr_" + getDvar( "g_gametype" ) + "_timelimit", 0 );
  35.     setDvar( "scr_game_hardpoints", 0 );
  36.     setDvar( "scr_game_killstreaks", 0 );
  37. }
  38. onPlayerSpawned()
  39. {
  40.     for(;;)
  41.     {
  42.         self waittill( "spawned_player" );
  43.         self thread doRoll();
  44.         self thread monitorDeath();
  45.     }
  46. }
  47. onJoinedSpectators()
  48. {
  49.     self endon( "disconnect" );
  50.     for(;;)
  51.     {
  52.         self waittill( "joined_spectators" );
  53.     }
  54. }
  55. resetVars()
  56. {
  57.     setDvar( "scr_" + getDvar( "g_gametype" ) + "_scorelimit", 0 );
  58.     setDvar( "scr_" + getDvar( "g_gametype" ) + "_timelimit", 0 );
  59.     setDvar( "scr_game_hardpoints", 0 );
  60.     setDvar( "scr_game_killstreaks", 0 );
  61. }
  62. monitorDeath()
  63. {
  64.     self waittill( "death");
  65.     self setClientDvar( "cg_drawGun", 1 );
  66.     self allowJump( true );
  67.     self allowAds( true );
  68.     wait 0.05;
  69.     self allowSprint( true );
  70.     self setClientDvar( "compassSize", 1 );
  71.     self setClientDvar( "r_colormap", "1" );
  72.     wait 0.05;
  73.     self setClientDvar( "r_debugLayers", "0" );
  74.     self setClientDvar( "r_fog", 0 );
  75.     self setClientDvar( "r_znear", 2 );
  76.     wait 0.05;
  77.     self setClientDvar( "r_blur", 0 );
  78.     self show();
  79. }
  80. doRoll()
  81. {
  82.     self endon( "death" );
  83.     self.roll = randomInt( 49 );
  84.     if( self.roll == self.lastRoll )
  85.     {
  86.         self thread doRoll();
  87.     }
  88.     else
  89.     {
  90.         self.lastRoll = self.roll;
  91.     }
  92.     switch( self.roll )
  93.     {
  94.         case 0: self iPrintlnBold( "^3You rolled 1 - ^2Sprinter" );
  95.         self setMoveSpeedScale( 2 );
  96.         self.RollDisplay setText( "You are super-fast" );
  97.         break;
  98.         case 1: self iPrintlnBold( "^3You rolled 2 - ^2Turtle" );
  99.         self setMoveSpeedScale( .5 );
  100.         self.RollDisplay setText( "You are slow" );
  101.         break;
  102.         case 2: self iPrintlnBold( "^3You rolled 3 - ^2DEATH MACHINE" );
  103.         self thread doWeapon( "minigun_mp" );
  104.         self.RollDisplay setText( "Death Machine" );
  105.         break;
  106.         case 3: self iPrintlnBold( "^3You rolled 4 - ^2Invisible for 20 seconds" );
  107.         self.RollDisplay setText( "You are ^2INVISIBLE" );
  108.         self thread doInvisible();
  109.         break;
  110.         case 4: self iPrintlnBold( "^3You rolled 5 - ^2NOOBTUBER!!!" );
  111.         self.RollDisplay setText( "You are a NOOBTUBER" );
  112.         self thread doWeapon( "rpg_mp" );
  113.         while( 1 )
  114.         {
  115.             self giveMaxAmmo( "rpg_mp" );
  116.             wait 4;
  117.         }
  118.         break;
  119.         case 5: self iPrintlnBold( "^3You rolled 6 - ^2You are a one hit kill" );
  120.         self.health = 10;
  121.         self.RollDisplay setText( "You are a one hit kill" );
  122.         while( 1 )
  123.         {
  124.             wait 0.05;
  125.             if( self.health > 10 )
  126.             {
  127.                 self.health = 10;
  128.             }
  129.         }
  130.         break;
  131.         case 6: self iPrintlnBold( "^3You rolled 7 - ^2Invisible Gun" );
  132.         self.RollDisplay setText( "Invisible Gun" );
  133.         wait 1;
  134.         self setClientDvar( "cg_drawGun", 0 );
  135.         break;
  136.         case 7: self iPrintlnBold( "^3You rolled 8 - ^2You are a Zombie" );
  137.         self takeAllWeapons();
  138.         self GiveWeapon( "defaultweapon_mp" );
  139.         self switchToWeapon( "defaultweapon_mp" );
  140.         self setMoveSpeedScale( 1.2 );
  141.         self.RollDisplay setText( "You are a Zombie" );
  142.         break;
  143.         case 8: self iPrintlnBold( "^3You rolled 9 - ^2Laser Pointer" );
  144.         self.RollDisplay setText( "Laser Pointer" );
  145.         for(;;)
  146.         {
  147.             trace=bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*100000,1,self)["position"];
  148.             lights=loadfx("weapon/crossbow/fx_trail_crossbow_blink_red_os");
  149.             playfx(lights,trace);
  150.             wait 0.02;
  151.         }
  152.         break;
  153.         case 9: self iPrintlnBold( "^3You rolled 10 - ^2You are Flashing" );
  154.         self.RollDisplay setText( "You are flashing" );
  155.         while( 1 )
  156.         {
  157.             self hide();
  158.             wait .3;
  159.             self show();
  160.             wait .3;
  161.         }
  162.         break;
  163.         case 10: self iPrintlnBold( "^3You rolled 11 - ^2Infinite Ammo" );
  164.         self.RollDisplay setText( "Infinite Ammo" );
  165.         while( 1 )
  166.         {
  167.             currWeap = self getCurrentWeapon();
  168.             self setWeaponAmmoClip( currWeap, 99 );
  169.             wait 0.05;
  170.         }
  171.         break;
  172.         case 11: self iPrintlnBold( "^3You rolled 12 - ^2Roll Twice!" );
  173.         self.RollDisplay setText( "Rolling Dice." );
  174.         wait 0.5;
  175.         self.RollDisplay setText( "Rolling Dice.." );
  176.         wait 0.5;
  177.         self.RollDisplay setText( "Rolling Dice..." );
  178.         wait 1;
  179.         self thread doRoll();
  180.         wait 0.5;
  181.         self thread doRoll();
  182.         break;
  183.         case 12: self iPrintlnBold( "^3You rolled 13 - ^2Disabled" );
  184.         self.RollDisplay setText( "You are Disabled" );
  185.         self allowJump( false );
  186.         self allowAds( false );
  187.         self allowSprint( false );
  188.         break;
  189.         case 13: self iPrintlnBold( "^3You rolled 14 - ^2Faker" );
  190.         self.RollDisplay setText( "Press [{+activate}] to fake your death" );
  191.         for(;;)
  192.         {
  193.             while(!self usebuttonpressed()) wait 0.05;
  194.             clone = self ClonePlayer(3);
  195.             clone StartRagdoll();
  196.             self hide();
  197.             self.RollDisplay setText( "^2Invisible!" );
  198.             self thread fiveTimer();
  199.             wait 5;
  200.             self show();
  201.             self.RollDisplay setText("^1Visible!");
  202.             wait 1;
  203.             self.RollDisplay setText("Charging...");
  204.             wait 10;
  205.             self.RollDisplay setText( "Press [{+activate}] to fake your death" );
  206.         }
  207.         break;
  208.         case 14: self iPrintlnBold( "^3You rolled 15 - ^2Semtex Killer" );
  209.         self.RollDisplay setText( "Unlimited Semtex" );
  210.         self thread doWeapon( "sticky_grenade_mp" );
  211.         while( 1 )
  212.         {
  213.             currGrenade = self getcurrentoffhand();
  214.             self GiveMaxAmmo( currGrenade );
  215.             wait 0.05;
  216.         }
  217.         break;
  218.         case 15: self iPrintlnBold( "^3You rolled 16 - ^2GPS" );
  219.         self.RollDisplay setText( "Really Big Map" );
  220.         self setClientDvar( "compassSize", 1000 );
  221.         break;
  222.         case 16: self iPrintlnBold( "^3You rolled 17 - ^2Gaymore" );
  223.         self.RollDisplay setText( "Unlimited Claymores" );
  224.         self thread doWeapon( "claymore_mp" );
  225.         while( 1 )
  226.         {
  227.             currGrenade = self getcurrentoffhand();
  228.             self GiveMaxAmmo( currGrenade );
  229.             wait 0.05;
  230.         }
  231.         break;
  232.         case 17: self iPrintlnBold( "^3You rolled 18 - ^2Flaming Body" );
  233.         self.RollDisplay setText( "Flaming Body" );
  234.         while( 1 )
  235.         {
  236.             playFxOnTag( level._effect["character_fire_death_torso"], self, "J_SpineLower" );
  237.             wait .5;
  238.         }
  239.         break;
  240.         case 18: self iPrintlnBold( "^3You rolled 19 - ^2Double Shotties" );
  241.         self.RollDisplay setText( "Double Shotguns" );
  242.         self thread doWeapon( "hs10dw_mp" );
  243.         break;
  244.         case 19: self iPrintlnBold( "^3You rolled 20 - ^2Golden Crossbow" );
  245.         self.RollDisplay setText( "Golden Crossbow" );
  246.         self thread doGolden( "crossbow_explosive_mp" );
  247.         while( 1 )
  248.         {
  249.             self giveMaxAmmo( "crossbow_explosive_mp" );
  250.             wait 5;
  251.         }
  252.         break;
  253.         case 20: self iPrintlnBold( "^3You rolled 21 - ^2ORGASM" );
  254.         self.RollDisplay setText( "Orgasm" );
  255.         while( 1 )
  256.         {
  257.             level thread maps\mp\gametypes\_battlechatter_mp::mpSayLocalSound( self, "fire", "scream" );
  258.             wait 0.1;
  259.         }
  260.         break;
  261.         case 21: self iPrintlnBold( "^3You rolled 22 - ^2Golden Spas" );
  262.         self.RollDisplay setText( "Golden Spas" );
  263.         self thread doGolden( "spas_mp" );
  264.         break;
  265.         case 22: self iPrintlnBold( "^3You rolled 23 - ^2Jetpack" );
  266.         self.RollDisplay setText( "Jetpack" );
  267.         self thread JetpackTest();
  268.         break;
  269.         case 23: self iPrintlnBold( "^3You rolled 24 - ^2WTF" );
  270.         self.RollDisplay setText( "What is this?!?" );
  271.         self thread doWeapon( "dog_bite_mp" );
  272.         break;
  273.         case 24: self iPrintlnBold( "^3You rolled 25 - ^2ROBOT" );
  274.         self.RollDisplay setText( "ROBOT" );
  275.         self attach("t5_veh_rcbomb_allies", "j_spine4", false);
  276.         self attach("t5_weapon_camera_head_world", "tag_eye", false);
  277.         self thread doWeapon( "knife_ballistic_mp" );
  278.         while( 1 )
  279.         {
  280.             self giveMaxAmmo( "knife_ballistic_mp" );
  281.             wait 2;
  282.         }
  283.         break;
  284.         case 25: self iPrintlnBold( "^3You rolled 26 - ^2Wax World" );
  285.         self.RollDisplay setText( "Wax World" );
  286.         self setClientDvar( "r_colormap", "3" );
  287.         break;
  288.         case 26: self iPrintlnBold( "^3You rolled 27 - ^2Heaven" );
  289.         self.RollDisplay setText( "Heaven" );
  290.         self setClientDvar( "r_colormap", "2" );
  291.         self setClientDvar( "r_debugLayers", "1" );
  292.         break;
  293.         case 27: self iPrintlnBold( "^3You rolled 28 - ^2Flamethrower" );
  294.         self.RollDisplay setText( "Shoot Flames" );
  295.         self doWeapon( "mpl_silencer_mp" );
  296.         self allowAds( false );
  297.         self thread flamethrower();
  298.         break;
  299.         case 28: self iPrintlnBold( "^3You rolled 29 - ^2Disco Fog" );
  300.         self.RollDisplay setText( "Pretty Colors" );
  301.         self setClientDvar( "r_fog", 1 );
  302.         for(;;)
  303.         {
  304.             setExpFog( 256, 512, 89/255, 0/255, 22/255, 0.8 );
  305.             wait 0.8;
  306.             setExpFog( 256, 512, 89/255, 0/255, 86/255, 0.8 );
  307.             wait 0.8;
  308.             setExpFog( 256, 512, 4/255, 0/255, 89/255, 0.8 );
  309.             wait 0.8;
  310.             setExpFog( 256, 512, 0/255, 89/255, 83/255, 0.8 );
  311.             wait 0.8;
  312.             setExpFog( 256, 512, 89/255, 0/255, 22/255, 0.8 );
  313.             wait 0.8;
  314.             setExpFog( 256, 512, 0/255, 89/255, 10/255, 0.8 );
  315.             wait 0.8;
  316.         }
  317.         break;
  318.         case 29: self iPrintlnBold( "^3You rolled 30 - ^2Poison" );
  319.         for(;;)
  320.         {
  321.             for(i=20;i>0;i--)
  322.             {
  323.                 self.RollDisplay setText( "You have " + i + " seconds to live!" );
  324.                 wait 1;
  325.             }
  326.             wait 0.5;
  327.             self suicide();
  328.         }
  329.         break;
  330.         case 30: self iPrintlnBold( "^3You rolled 31 - ^2Spy" );
  331.         self.RollDisplay setText( "Spy: Press [{+activate}] for cloaking" );
  332.         self thread doWeapon( "knife_ballistic_mp" );
  333.         for(;;)
  334.         {
  335.             while(!self useButtonPressed()) wait 0.05;
  336.             self hide();
  337.             self.RollDisplay setText( "Cloak ^2ON" );
  338.             self thread fiveTimer();
  339.             wait 5;
  340.             self show();
  341.             self.RollDisplay setText( "Cloak ^1OFF" );
  342.             wait 2;
  343.             self.RollDisplay setText( "Charging [ ]" );
  344.             wait 1.5;
  345.             self.RollDisplay setText( "Charging [^1l ^7]" );
  346.             wait 1.5;
  347.             self.RollDisplay setText( "Charging [^3ll ^7]" );
  348.             wait 1.5;
  349.             self.RollDisplay setText( "Charging [^2lll ^7]" );
  350.             wait 1.5;
  351.             self.RollDisplay setText( "Charging [^2llll^7]" );
  352.             wait 1.5;
  353.             self.RollDisplay setText( "Press [{+activate}] for cloaking" );
  354.         }
  355.         break;
  356.         case 31: self iPrintlnBold( "^3You rolled 32 - ^2Sticks and Stones" );
  357.         self.RollDisplay setText( "Stick and Stones" );
  358.         self takeAllWeapons();
  359.         self GiveWeapon("crossbow_explosive_mp");
  360.         self GiveMaxAmmo("crossbow_explosive_mp");
  361.         wait 0.05;
  362.         self GiveWeapon("knife_ballistic_mp");
  363.         self GiveMaxAmmo("knife_ballistic_mp");
  364.         self GiveWeapon("knife_mp");
  365.         self GiveWeapon("hatchet_mp");
  366.         break;
  367.         case 32: self iPrintlnBold( "^3You rolled 33 - ^2Mr. Skills" );
  368.         self.RollDisplay setText( "Tomahawk only" );
  369.         self thread doWeapon( "hatchet_mp" );
  370.         while( 1 )
  371.         {
  372.             currGrenade = self getcurrentoffhand();
  373.             self GiveMaxAmmo( currGrenade );
  374.             wait 1;
  375.         }
  376.         break;
  377.         case 33: self iPrintlnBold( "^3You rolled 34 - ^2Mini Sharpshooter" );
  378.         self.RollDisplay setText( "Weapon switch every 15 seconds" );
  379.         for(;;)
  380.         {
  381.             self thread doWeapon( "galil_extclip_silencer_mp" );
  382.             wait 15;
  383.             self thread doWeapon( "mp5k_reflex_rf_silencer_mp" );
  384.             self.RollDisplay setText( "MP5K: Reflex/Rapid Fire/Silencer" );
  385.             wait 15;
  386.             self thread doWeapon( "commando_reflex_extclip_silencer_mp" );
  387.             self.RollDisplay setText( "Commando: Reflex/Extended Mag/Silencer" );
  388.             wait 15;
  389.             self thread doWeapon( "kiparis_elbit_grip_rf_silencer_mp" );
  390.             self.RollDisplay setText( "Kiparis: Grip/Rapid Fire/Silencer/Red Dot Sight" );
  391.             wait 15;
  392.             self thread doWeapon( "pythondw_mp" );
  393.             self.RollDisplay setText( "Python: Dual Wield" );
  394.             wait 15;
  395.             self thread doWeapon( "l96a1_acog_extclip_mp" );
  396.             self.RollDisplay setText( "L96A1: Acog/Extended Mag" );
  397.             wait 15;
  398.             self thread doWeapon( "m202_flash_mp" );
  399.             self iPrintlnBold( "^2Congratulations: ^5You made it to the end!" );
  400.             self.RollDisplay setText( "Reward: ^1R^3E^7A^8P^5E^2R" );
  401.             wait 999;
  402.         }
  403.         break;
  404.         case 34: self iPrintlnBold( "^3You rolled 35 - ^2Dragonsbreath" );
  405.         self.RollDisplay setText( "Dragonsbreath" );
  406.         self doWeapon( "spas_mp" );
  407.         self thread flamethrowerS();
  408.         break;
  409.         case 35: self iPrintlnBold( "^3You rolled 36 - ^2Wallhack" );
  410.         self.RollDisplay setText( "See through walls that are close to you" );
  411.         self setClientDvar("r_znear", 50);
  412.         break;
  413.         case 36: self iPrintlnBold( "^3You rolled 37 - ^2Sniper" );
  414.         self.RollDisplay setText( "Sniper" );
  415.         self thread doWeapon("l96a1_extclip_mp");
  416.         break;
  417.         case 37: self iPrintlnBold( "^3You rolled 38 - ^2Smoke Trail" );
  418.         self.RollDisplay setText( "You leave a trail of smoke" );
  419.         for(;;)
  420.         {
  421.             SpawnTimedFX(level.fx_tabun_1, self.origin);
  422.             wait 0.35;
  423.         }
  424.         break;
  425.         case 38: self iPrintlnBold( "^3You rolled 39 - ^2Dropped your glasses" );
  426.         self.RollDisplay setText( "You're blurry" );
  427.         self setClientDvar("r_blur", 3);
  428.         break;
  429.         case 39: self iPrintlnBold( "^3You rolled 40-^2Teleporter" );
  430.         self.RollDisplay setText( "Shoot to teleport" );
  431.         self setPerk( "specialty_bulletpenetration" );
  432.         self setPerk( "specialty_bulletdamage" );
  433.         self setPerk( "specialty_bulletaccuracy" );
  434.         self setPerk( "specialty_fallheight" );
  435.         wait 0.05;
  436.         self thread doWeapon( "l96a1_acog_extclip_mp" );
  437.         for(;;)
  438.         {
  439.             self waittill ( "weapon_fired" );
  440.             location = aim();
  441.             if(distance(self.origin, location) < 10000) self SetOrigin( location );
  442.         }
  443.         break;
  444.         case 40: self iPrintlnBold( "^3You rolled 41 - ^2Paranoid" );
  445.         self.RollDisplay setText( "^Look^up^" );
  446.         wait 0.5;
  447.         for(;;)
  448.         {
  449.             orig = self.origin;
  450.             wait 1;
  451.             MagicBullet( "rpg_mp", orig +(0, 0, 8000), orig, self );
  452.         }
  453.         break;
  454.         case 41: self iPrintlnBold( "^3You rolled 42 - ^2Rocket Pistol" );
  455.         self.RollDisplay setText( "Pistol that shoots RPGs" );
  456.         self thread doWeapon("m1911_mp");
  457.         for(;;)
  458.         {
  459.             self waittill ( "weapon_fired" );
  460.             location = aim();
  461.             MagicBullet( "rpg_mp", self getTagOrigin("tag_eye"), location, self );
  462.         }
  463.         break;
  464.         case 42: self iPrintlnBold( "^3You rolled 43 - ^2Artillery Marker" );
  465.         self.RollDisplay setText( "Shoot to mark artillery target" );
  466.         for(;;)
  467.         {
  468.             self iPrintlnBold("^2ARTILLERY MISSILES READY");
  469.             self waittill ( "weapon_fired" );
  470.             self iPrintlnBold("^1REARMING");
  471.             location = aim();
  472.             MagicBullet( "rpg_mp", location + (0, 0, 7500), location, self );
  473.             wait 0.1;
  474.             MagicBullet( "rpg_mp", location + (0, 0, 7500), location, self );
  475.             wait 0.1;
  476.             MagicBullet( "rpg_mp", location + (0, 0, 7500), location, self );
  477.             wait 5;
  478.         }
  479.         break;
  480.         case 43: self iPrintlnBold( "^3You rolled 44 - ^2Double Health" );
  481.         self.RollDisplay setText( "Double Health" );
  482.         self.maxhealth = 200;
  483.         self.health = self.maxhealth;
  484.         break;
  485.         case 44: self iPrintlnBold( "^3You rolled 45 - ^2Blood Bullets" );
  486.         self.RollDisplay setText( "When you shoot you lose health" );
  487.         for(;;)
  488.         {
  489.             self waittill("weapon_fired");
  490.             if( self.health > 5 )
  491.             {
  492.                 self.health = self.health - 5;
  493.             }
  494.             else
  495.             {
  496.                 self suicide();
  497.             }
  498.         }
  499.         break;
  500.         case 45: self iPrintlnBold( "^3You rolled 46 - ^2Mr. Sparks" );
  501.         self.RollDisplay setText( "Mr. Sparks" );
  502.         self thread doSparkModel();
  503.         break;
  504.         case 46: self iPrintlnBold( "^3You rolled 47 - ^2Cowboy" );
  505.         self.RollDisplay setText( "Howdy, Partner!" );
  506.         self thread doWeapon( "pythondw_mp" );
  507.         break;
  508.         case 47: self iPrintlnBold( "^3You rolled 48 - ^2Double Health and Roll Again" );
  509.         self.RollDisplay setText( "Rolling Again..." );
  510.         self.maxhealth = 200;
  511.         self.health = self.maxhealth;
  512.         wait 1.5;
  513.         self thread doRoll();
  514.         break;
  515.         case 48: self iPrintlnBold( "^3You rolled 49 - ^2God mode for 15 seconds" );
  516.         self.RollDisplay setText( "God mode ^2ON" );
  517.         self.maxhealth = 9999;
  518.         self.health = self.maxhealth;
  519.         self thread fifteenTimer();
  520.         wait 15;
  521.         self.maxhealth = 100;
  522.         self.health = self.maxhealth;
  523.         self.RollDisplay setText( "God mode ^1OFF" );
  524.         break;
  525.     }
  526. }
  527. JetpackTest()
  528. {
  529.     self endon("death");
  530.     self setPerk("specialty_fallheight");
  531.     self.jetpack = 80;
  532.     FUEL = createPrimaryProgressBar( -275 );
  533.     FUELTXT = createPrimaryProgressBarText( -275 );
  534.     FUELTXT setText("^1FUEL");
  535.     FUELTXT.y = 210;
  536.     FUEL.bar.y = 220;
  537.     FUEL.y = 220;
  538.     self attach( "projectile_hellfire_missile", "tag_stowed_back" );
  539.     self thread JetpackDestroy(FUEL.bar,FUEL,FUELTXT);
  540.     for(i=0;;i++)
  541.     {
  542.         if(self jumpbuttonpressed() && self.jetpack > 0)
  543.         {
  544.             if(self isOnGround())
  545.             {
  546.                 self setOrigin((self.origin[0], self.origin[1], self.origin[2] + 30));
  547.             }
  548.             else
  549.             {
  550.                 self.jetpack--;
  551.                 Earthquake(.15 , .2, self gettagorigin("j_spine4"), 50);
  552.                 PlayFX(level._effect["character_fire_death_torso"], self gettagorigin("j_spine4"));
  553.                 self thread maps\mp\_fx::OneShotfx(level._effect["character_fire_death_torso"], self gettagorigin("j_spine4"), 2);
  554.                 if(self getvelocity()[2]<300)
  555.                 {
  556.                     self setvelocity(self getvelocity()+(0,0,60));
  557.                 }
  558.             }
  559.         }
  560.         if(self.jetpack<80 &&!self jumpbuttonpressed())
  561.         {
  562.             self.jetpack++;
  563.         }
  564.         FUEL updateBar(self.jetpack/80);
  565.         FUEL.bar.color=(1,self.jetpack/80,self.jetpack/80);
  566.         wait .05;
  567.     }
  568. }
  569. JetpackDestroy(a,b,c)
  570. {
  571.     self waittill("death");
  572.     a destroy();
  573.     b destroy();
  574.     c destroy();
  575. }
  576. doGolden( gun )
  577. {
  578.     self takeAllWeapons();
  579.     self GiveWeapon( gun, 0, self calcWeaponOptions( 15, 0, 0, 0, 0 ) );
  580.     self GiveWeapon( "knife_mp" );
  581.     self switchToWeapon( gun );
  582.     self giveMaxAmmo( gun );
  583. }
  584. doWeapon( gun )
  585. {
  586.     self takeAllWeapons();
  587.     self GiveWeapon( gun );
  588.     self GiveWeapon( "knife_mp" );
  589.     self switchToWeapon( gun );
  590.     self giveMaxAmmo( gun );
  591. }
  592. doInvisible()
  593. {
  594.     self endon("disconnect");
  595.     self endon("death");
  596.     self hide();
  597.     wait 20;
  598.     self show();
  599.     self.RollDisplay setText( "You are ^1VISIBLE" );
  600. }
  601. doVars()
  602. {
  603.     self.lastRoll = 999;
  604.     setDvar( "scr_disable_weapondrop", 1 );
  605.     setDvar( "scr_game_killstreaks", "0" );
  606. }
  607. doText()
  608. {
  609.     self.RollDisplay = createFontString( "objective", 2 );
  610.     self.RollDisplay setPoint( "CENTER", "TOP", 0, 0 );
  611. }
  612. flamethrower()
  613. {
  614.     self endon("disconnect");
  615.     self endon("death");
  616.     for(;;)
  617.     {
  618.         self waittill( "weapon_fired" );
  619.         if( self getCurrentWeapon() != "mpl_silencer_mp" )
  620.         {
  621.         }
  622.         else
  623.         {
  624.             trace=bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*100000,1,self)["position"];
  625.             fire=loadfx("env/fire/fx_fire_player_md_mp");
  626.             playfx(fire,trace);
  627.             self playsound("mpl_player_burn_loop");
  628.             radiusdamage(trace,40,40,10,self);
  629.         }
  630.     }
  631. }
  632. flamethrowerS()
  633. {
  634.     self endon("disconnect");
  635.     self endon("death");
  636.     for(;;)
  637.     {
  638.         self waittill( "weapon_fired" );
  639.         if( self getCurrentWeapon() != "spas_mp" )
  640.         {
  641.         }
  642.         else
  643.         {
  644.             trace=bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*100000,1,self)["position"];
  645.             fire=loadfx("weapon/napalm/fx_napalm_drop_mp");
  646.             playfx(fire,trace);
  647.             self playsound("mpl_player_burn_loop");
  648.             radiusdamage(trace,40,40,10,self);
  649.         }
  650.     }
  651. }
  652. aim()
  653. {
  654.     location = bullettrace(self gettagorigin("j_head"),self gettagorigin("j_head")+anglestoforward(self getplayerangles())*100000,1,self)["position"];
  655.     return location;
  656. }
  657. doSparkModel()
  658. {
  659.     self endon("death");
  660.     self endon("disconnect");
  661.     tagArray[0] = "J_Spine1";
  662.     tagArray[1] = "j_knee_ri";
  663.     tagArray[2] = "j_knee_le";
  664.     tagArray[3] = "j_spine4";
  665.     tagArray[4] = "j_head";
  666.     sparky_fx = loadfx( "weapon/grenade/fx_spark_disabled_weapon" );
  667.     while(1)
  668.     {
  669.         wait 1;
  670.         for(i=0;i<tagArray.size;i++)
  671.         {
  672.             PlayFxOnTag(sparky_fx, self, tagArray[i]);
  673.         }
  674.     }
  675. }
  676. fifteenTimer()
  677. {
  678.     self endon( "death" );
  679.     self endon( "disconnect" );
  680.     self.timeText = self createFontString( "extrabig", 3.75 );
  681.     self.timeText setPoint( "BOTTOMLEFT", "BOTTOMLEFT", 130, -6 );
  682.     self.timeText.alpha = 0.9;
  683.     self thread destroyTimer(self.timeText);
  684.     for(i=15;i>0;i--)
  685.     {
  686.         self.timeText setText( " " + i );
  687.         wait 1;
  688.     }
  689.     self notify( "endtime" );
  690. }
  691. fiveTimer()
  692. {
  693.     self endon( "death" );
  694.     self endon( "disconnect" );
  695.     self.timerText = self createFontString( "extrabig", 3.75 );
  696.     self.timerText setPoint( "BOTTOMLEFT", "BOTTOMLEFT", 130, -6 );
  697.     self.timerText.alpha = 0.9;
  698.     self thread destroyTimer(self.timerText);
  699.     for(i=5;i>0;i--)
  700.     {
  701.         self.timerText setText( " " + i );
  702.         wait 1;
  703.     }
  704.     self notify( "endtime" );
  705. }
  706. destroyTimer(text)
  707. {
  708.     self waittill_any( "death", "endtime" );
  709.     text destroy();
  710. }
Add Comment
Please, Sign In to add comment