Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Crippler shit done
- main_watcher()
- {
- level thread give_score_shit();
- wait 1;
- level thread pakadoor();
- wait 3;
- level thread move_machine();
- level thread delete_trig();
- wait 3;
- }
- pakadoor()
- {
- pakadoor = getent( "pack_door", "targetname" );
- pakadoor movez(-150,3.5,3);
- wait 1;
- pakadoor playsound( "packa_door_1" );
- wait 5;
- pakadoor movez( 150, 3.5, 3 );
- wait 1;
- pakadoor playsound( "packa_door_2" );
- }
- move_machine()
- {
- paka = GetEntArray("zombie_vending_upgrade", "targetname");
- for(i=0; i<paka.size; i++ )
- {
- level.packapunch = getent(paka[i].target, "targetname");
- if(isDefined(level.packapunch))
- {
- level.packapunch moveto((-54,440,93),3);wait 3;
- playFx( level._effect["poltergeist"], (-54,440,93) );
- level.packapunch setmodel("zombie_vending_packapunch_on");
- }
- level thread add_zombie_hint("Text1", &"ZOMBIE_PERK_PACKAPUNCH");
- level.paptrig = spawn("trigger_radius", level.packapunch.origin, 1, 50, 20);
- level.paptrig setCursorHint("HINT_NOICON");
- level.paptrig useTriggerRequireLookAt();
- level.paptrig set_hint_string( level.paptrig, "Text1");
- packa_rollers = spawn("script_origin", level.packapunch.origin);
- packa_timer = spawn("script_origin", level.packapunch.origin);
- packa_rollers playloopsound("packa_rollers_loop");
- for(;;)
- {
- level.paptrig waittill("trigger", Player );
- if( Player useButtonPressed() && !isDefined(Player.using_controlMenu) && !isDefined(Player.revivetrigger) && Player.score >= 500)
- //if( Player useButtonPressed() && Player.score >= 500 ) this makes the trig too sensitive, meaning press x and it does it 3+ times
- {
- //set the cost to 500 for testing
- Player iPrintlnBold( "^2UPGRADING......" );
- Player.using_controlMenu = true;
- Player thread give_gun_upgraded();
- Player maps\_zombiemode_score::minus_to_player_score( 500 );
- level.paptrig playsound( "bottle_dispense3d" );
- }
- else
- {
- //this keeps looping letting you know, so the sound and dialog repeat if you're in radius
- level.paptrig playsound("deny");
- Player thread maps\_zombiemode_perks::play_no_money_perk_dialog();
- //Player iPrintln("^1Dev: Not enough money yo");
- }
- }
- }
- }
- give_score_shit(){
- //deleted how u did the score so i added this
- p=get_players();
- for(b=0;b<=p.size;b++){
- p[b].score = 5000;
- p[b].score_total = 5000;
- }
- }
- //this is out of the strat im working on, edited to work with this, threw in the knuckle crack as well:p
- give_gun_upgraded(){
- PrecacheItem("zombie_knuckle_crack");
- currentWeapon = self getCurrentWeapon();
- gun = currentWeapon+"_upgraded";
- PrecacheItem( gun );
- self takeWeapon(self getCurrentWeapon());
- self giveweapon("zombie_knuckle_crack");
- self switchtoweapon("zombie_knuckle_crack");
- wait 1.5;
- self giveweapon( gun );
- self switchToWeapon( gun );
- self iPrintln("Equipped Upgraded ^1 " +gun);
- self.using_controlMenu = undefined; //resets trig
- }
- delete_trig()
- {
- old_trig = GetEntArray("zombie_vending_upgrade", "targetname");
- for( k = 0; k < old_trig.size; k++ )
- {
- old_trig delete();
- }
- }
- add_zombie_hint( ref, text )
- {
- if( !IsDefined( level.zombie_hints ) )
- {
- level.zombie_hints = [];
- }
- PrecacheString( text );
- level.zombie_hints[ref] = text;
- }
- get_zombie_hint( ref )
- {
- if( IsDefined( level.zombie_hints[ref] ) )
- {
- return level.zombie_hints[ref];
- }
- return level.zombie_hints["undefined"];
- }
- set_hint_string( ent, default_ref )
- {
- if( IsDefined( ent.script_hint ) )
- {
- self SetHintString( get_zombie_hint( ent.script_hint ) );
- }
- else
- {
- self SetHintString( get_zombie_hint( default_ref ) );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment