mirror of
https://github.com/JezuzLizard/Public-BO2-Mods.git
synced 2025-06-07 10:47:49 -05:00
new way of fixing tombstone
This commit is contained in:
parent
c0af044995
commit
fc8566f8b4
@ -1,9 +1,3 @@
|
||||
# Tombstone For Plutonium T6
|
||||
A GSC plugin for Plutonium BO2 which make the Tombstone Perk usable for Green Run and Town map
|
||||
## How to install
|
||||
* Compile tombstone.gsc with https://gscstudio.imcsx.co or https://bit.ly/2SCQVi7 (compiler folder)
|
||||
* Rename tombstone.gsc to _clientids.gsc
|
||||
* Create the folders in this way named **maps**>**mp**>**gametypes_zm** in t6r/data
|
||||
* Make sure the folders are like this order **t6r/data/maps/mp/gametypes_zm**
|
||||
* Place **_clientids.gsc** inside **gametypes_zm** folder
|
||||
* Run the server and enjoy Tombstone on Town and Tranzit
|
||||
Compile zm_transit_utility.gsc as zm_transit_utility.gsc and place it in maps/mp.
|
||||
|
||||
It simply disables the function removing tombstone.
|
||||
|
@ -1,183 +0,0 @@
|
||||
#include maps\mp\_utility;
|
||||
#include common_scripts\utility;
|
||||
#include maps\mp\gametypes_zm\_hud_util;
|
||||
#include maps\mp\gametypes_zm\_hud_message;
|
||||
#include maps\mp\zombies\_zm_perks;
|
||||
|
||||
init()
|
||||
{
|
||||
level thread perk_machine_spawn_init();
|
||||
thread solo_tombstone_removal();
|
||||
thread turn_tombstone_on();
|
||||
}
|
||||
|
||||
solo_tombstone_removal()
|
||||
{
|
||||
notify( "tombstone_on" );
|
||||
}
|
||||
|
||||
turn_tombstone_on()
|
||||
{
|
||||
while ( 1 )
|
||||
{
|
||||
machine = getentarray( "vending_tombstone", "targetname" );
|
||||
machine_triggers = getentarray( "vending_tombstone", "target" );
|
||||
i = 0;
|
||||
while ( i < machine.size )
|
||||
{
|
||||
machine[ i ] setmodel( level.machine_assets[ "tombstone" ].off_model );
|
||||
i++;
|
||||
}
|
||||
level thread do_initial_power_off_callback( machine, "tombstone" );
|
||||
array_thread( machine_triggers, ::set_power_on, 0 );
|
||||
level waittill( "tombstone_on" );
|
||||
i = 0;
|
||||
while ( i < machine.size )
|
||||
{
|
||||
machine[ i ] setmodel( level.machine_assets[ "tombstone" ].on_model );
|
||||
machine[ i ] vibrate( vectorScale( ( 0, -1, 0 ), 100 ), 0.3, 0.4, 3 );
|
||||
machine[ i ] playsound( "zmb_perks_power_on" );
|
||||
machine[ i ] thread perk_fx( "tombstone_light" );
|
||||
machine[ i ] thread play_loop_on_machine();
|
||||
i++;
|
||||
}
|
||||
level notify( "specialty_scavenger_power_on" );
|
||||
array_thread( machine_triggers, ::set_power_on, 1 );
|
||||
if ( isDefined( level.machine_assets[ "tombstone" ].power_on_callback ) )
|
||||
{
|
||||
array_thread( machine, level.machine_assets[ "tombstone" ].power_on_callback );
|
||||
}
|
||||
level waittill( "tombstone_off" );
|
||||
if ( isDefined( level.machine_assets[ "tombstone" ].power_off_callback ) )
|
||||
{
|
||||
array_thread( machine, level.machine_assets[ "tombstone" ].power_off_callback );
|
||||
}
|
||||
array_thread( machine, ::turn_perk_off );
|
||||
players = get_players();
|
||||
_a1718 = players;
|
||||
_k1718 = getFirstArrayKey( _a1718 );
|
||||
while ( isDefined( _k1718 ) )
|
||||
{
|
||||
player = _a1718[ _k1718 ];
|
||||
player.hasperkspecialtytombstone = undefined;
|
||||
_k1718 = getNextArrayKey( _a1718, _k1718 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
perk_machine_spawn_init()
|
||||
{
|
||||
match_string = "";
|
||||
location = level.scr_zm_map_start_location;
|
||||
if ( location != "default" && location == "" && isDefined( level.default_start_location ) )
|
||||
{
|
||||
location = level.default_start_location;
|
||||
}
|
||||
match_string = ( level.scr_zm_ui_gametype + "_perks_" ) + location;
|
||||
pos = [];
|
||||
if ( isDefined( level.override_perk_targetname ) )
|
||||
{
|
||||
structs = getstructarray( level.override_perk_targetname, "targetname" );
|
||||
}
|
||||
else
|
||||
{
|
||||
structs = getstructarray( "zm_perk_machine", "targetname" );
|
||||
}
|
||||
_a3578 = structs;
|
||||
_k3578 = getFirstArrayKey( _a3578 );
|
||||
while ( isDefined( _k3578 ) )
|
||||
{
|
||||
struct = _a3578[ _k3578 ];
|
||||
if ( isDefined( struct.script_string ) )
|
||||
{
|
||||
tokens = strtok( struct.script_string, " " );
|
||||
_a3583 = tokens;
|
||||
_k3583 = getFirstArrayKey( _a3583 );
|
||||
while ( isDefined( _k3583 ) )
|
||||
{
|
||||
token = _a3583[ _k3583 ];
|
||||
if ( token == match_string )
|
||||
{
|
||||
pos[ pos.size ] = struct;
|
||||
}
|
||||
_k3583 = getNextArrayKey( _a3583, _k3583 );
|
||||
}
|
||||
}
|
||||
else pos[ pos.size ] = struct;
|
||||
_k3578 = getNextArrayKey( _a3578, _k3578 );
|
||||
}
|
||||
if ( !isDefined( pos ) || pos.size == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
precachemodel( "zm_collision_perks1" );
|
||||
i = 0;
|
||||
while ( i < pos.size )
|
||||
{
|
||||
perk = pos[ i ].script_noteworthy;
|
||||
if ( isDefined( perk ) && isDefined( pos[ i ].model ) )
|
||||
{
|
||||
use_trigger = spawn( "trigger_radius_use", pos[ i ].origin + vectorScale( ( 0, -1, 0 ), 30 ), 0, 40, 70 );
|
||||
use_trigger.targetname = "zombie_vending";
|
||||
use_trigger.script_noteworthy = perk;
|
||||
use_trigger triggerignoreteam();
|
||||
perk_machine = spawn( "script_model", pos[ i ].origin );
|
||||
perk_machine.angles = pos[ i ].angles;
|
||||
perk_machine setmodel( pos[ i ].model );
|
||||
if ( isDefined( level._no_vending_machine_bump_trigs ) && level._no_vending_machine_bump_trigs )
|
||||
{
|
||||
bump_trigger = undefined;
|
||||
}
|
||||
else
|
||||
{
|
||||
bump_trigger = spawn( "trigger_radius", pos[ i ].origin, 0, 35, 64 );
|
||||
bump_trigger.script_activated = 1;
|
||||
bump_trigger.script_sound = "zmb_perks_bump_bottle";
|
||||
bump_trigger.targetname = "audio_bump_trigger";
|
||||
if ( perk != "specialty_weapupgrade" )
|
||||
{
|
||||
bump_trigger thread thread_bump_trigger();
|
||||
}
|
||||
}
|
||||
collision = spawn( "script_model", pos[ i ].origin, 1 );
|
||||
collision.angles = pos[ i ].angles;
|
||||
collision setmodel( "zm_collision_perks1" );
|
||||
collision.script_noteworthy = "clip";
|
||||
collision disconnectpaths();
|
||||
use_trigger.clip = collision;
|
||||
use_trigger.machine = perk_machine;
|
||||
use_trigger.bump = bump_trigger;
|
||||
if ( isDefined( pos[ i ].blocker_model ) )
|
||||
{
|
||||
use_trigger.blocker_model = pos[ i ].blocker_model;
|
||||
}
|
||||
if ( isDefined( pos[ i ].script_int ) )
|
||||
{
|
||||
perk_machine.script_int = pos[ i ].script_int;
|
||||
}
|
||||
if ( isDefined( pos[ i ].turn_on_notify ) )
|
||||
{
|
||||
perk_machine.turn_on_notify = pos[ i ].turn_on_notify;
|
||||
}
|
||||
if ( perk == "specialty_scavenger" || perk == "specialty_scavenger_upgrade" )
|
||||
{
|
||||
use_trigger.script_sound = "mus_perks_tombstone_jingle";
|
||||
use_trigger.script_string = "tombstone_perk";
|
||||
use_trigger.script_label = "mus_perks_tombstone_sting";
|
||||
use_trigger.target = "vending_tombstone";
|
||||
perk_machine.script_string = "tombstone_perk";
|
||||
perk_machine.targetname = "vending_tombstone";
|
||||
if ( isDefined( bump_trigger ) )
|
||||
{
|
||||
bump_trigger.script_string = "tombstone_perk";
|
||||
}
|
||||
}
|
||||
if ( isDefined( level._custom_perks[ perk ] ) && isDefined( level._custom_perks[ perk ].perk_machine_set_kvps ) )
|
||||
{
|
||||
[[ level._custom_perks[ perk ].perk_machine_set_kvps ]]( use_trigger, perk_machine, bump_trigger, collision );
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
283
Tombstone For Town server/zm_transit_utility.gsc
Normal file
283
Tombstone For Town server/zm_transit_utility.gsc
Normal file
@ -0,0 +1,283 @@
|
||||
#include maps/mp/_compass;
|
||||
#include maps/mp/zombies/_zm_zonemgr;
|
||||
#include maps/mp/zombies/_zm_perks;
|
||||
#include maps/mp/zombies/_zm_audio;
|
||||
#include maps/mp/zombies/_zm_score;
|
||||
#include maps/mp/zombies/_zm_utility;
|
||||
#include maps/mp/_utility;
|
||||
#include common_scripts/utility;
|
||||
|
||||
playercanafford( player, cost )
|
||||
{
|
||||
if ( !player usebuttonpressed() )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if ( player in_revive_trigger() )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if ( isDefined( cost ) )
|
||||
{
|
||||
if ( player.score < cost )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
player maps/mp/zombies/_zm_score::minus_to_player_score( cost );
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
setinvisibletoall()
|
||||
{
|
||||
players = get_players();
|
||||
playerindex = 0;
|
||||
while ( playerindex < players.size )
|
||||
{
|
||||
self setinvisibletoplayer( players[ playerindex ] );
|
||||
playerindex++;
|
||||
}
|
||||
}
|
||||
|
||||
spawnandlinkfxtotag( effect, ent, tag )
|
||||
{
|
||||
fxent = spawn( "script_model", ent gettagorigin( tag ) );
|
||||
fxent setmodel( "tag_origin" );
|
||||
fxent linkto( ent, tag );
|
||||
wait_network_frame();
|
||||
playfxontag( effect, fxent, "tag_origin" );
|
||||
return fxent;
|
||||
}
|
||||
|
||||
spawnandlinkfxtooffset( effect, ent, offsetorigin, offsetangles )
|
||||
{
|
||||
fxent = spawn( "script_model", ( 0, 0, 0 ) );
|
||||
fxent setmodel( "tag_origin" );
|
||||
fxent linkto( ent, "", offsetorigin, offsetangles );
|
||||
wait_network_frame();
|
||||
playfxontag( effect, fxent, "tag_origin" );
|
||||
return fxent;
|
||||
}
|
||||
|
||||
custom_weapon_wall_prices()
|
||||
{
|
||||
if ( !isDefined( level.zombie_include_weapons ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
weapon_spawns = [];
|
||||
weapon_spawns = getentarray( "weapon_upgrade", "targetname" );
|
||||
i = 0;
|
||||
while ( i < weapon_spawns.size )
|
||||
{
|
||||
if ( !isDefined( level.zombie_weapons[ weapon_spawns[ i ].zombie_weapon_upgrade ] ) )
|
||||
{
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( isDefined( weapon_spawns[ i ].script_int ) )
|
||||
{
|
||||
cost = weapon_spawns[ i ].script_int;
|
||||
level.zombie_weapons[ weapon_spawns[ i ].zombie_weapon_upgrade ].cost = cost;
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
pause_zombie_spawning()
|
||||
{
|
||||
if ( !isDefined( level.spawnpausecount ) )
|
||||
{
|
||||
level.spawnpausecount = 0;
|
||||
}
|
||||
level.spawnpausecount++;
|
||||
flag_clear( "spawn_zombies" );
|
||||
}
|
||||
|
||||
try_resume_zombie_spawning()
|
||||
{
|
||||
if ( !isDefined( level.spawnpausecount ) )
|
||||
{
|
||||
level.spawnpausecount = 0;
|
||||
}
|
||||
level.spawnpausecount--;
|
||||
|
||||
if ( level.spawnpausecount <= 0 )
|
||||
{
|
||||
level.spawnpausecount = 0;
|
||||
flag_set( "spawn_zombies" );
|
||||
}
|
||||
}
|
||||
|
||||
automatonspeak( category, type, response, force_variant, override )
|
||||
{
|
||||
if ( isDefined( level.automaton ) && !is_true( level.automaton.disabled_by_emp ) )
|
||||
{
|
||||
if ( type != "leaving" && type != "leaving_warning" )
|
||||
{
|
||||
level.automaton notify( "want_to_be_speaking" );
|
||||
level.automaton waittill( "startspeaking" );
|
||||
}
|
||||
level.automaton maps/mp/zombies/_zm_audio::create_and_play_dialog( category, type, response, force_variant, override );
|
||||
}
|
||||
}
|
||||
|
||||
is_thedouche()
|
||||
{
|
||||
return self.characterindex == 0;
|
||||
}
|
||||
|
||||
is_theconspiracytheorist()
|
||||
{
|
||||
return self.characterindex == 1;
|
||||
}
|
||||
|
||||
is_thefarmersdaughter()
|
||||
{
|
||||
return self.characterindex == 2;
|
||||
}
|
||||
|
||||
is_theelectricalengineer()
|
||||
{
|
||||
return self.characterindex == 3;
|
||||
}
|
||||
|
||||
get_random_encounter_match( location )
|
||||
{
|
||||
match_pool = [];
|
||||
return random( match_pool );
|
||||
}
|
||||
|
||||
transit_breakable_glass_init()
|
||||
{
|
||||
glass = getentarray( "transit_glass", "targetname" );
|
||||
if ( level.splitscreen && getDvarInt( "splitscreen_playerCount" ) > 2 )
|
||||
{
|
||||
array_delete( glass );
|
||||
return;
|
||||
}
|
||||
array_thread( glass, ::transit_breakable_glass );
|
||||
}
|
||||
|
||||
transit_breakable_glass()
|
||||
{
|
||||
level endon( "intermission" );
|
||||
self.health = 99999;
|
||||
self setcandamage( 1 );
|
||||
self.damage_state = 0;
|
||||
while ( 1 )
|
||||
{
|
||||
self waittill( "damage", amount, attacker, direction, point, dmg_type );
|
||||
if ( isplayer( attacker ) )
|
||||
{
|
||||
if ( self.damage_state == 0 )
|
||||
{
|
||||
self glass_gets_destroyed();
|
||||
self.damage_state = 1;
|
||||
self playsound( "fly_glass_break" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
glass_gets_destroyed()
|
||||
{
|
||||
if ( isDefined( level._effect[ "glass_impact" ] ) )
|
||||
{
|
||||
playfx( level._effect[ "glass_impact" ], self.origin, anglesToForward( self.angles ) );
|
||||
}
|
||||
wait 0.1;
|
||||
if ( isDefined( self.model ) && self.damage_state == 0 )
|
||||
{
|
||||
self setmodel( self.model + "_broken" );
|
||||
self.damage_state = 1;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
self delete();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
solo_tombstone_removal()
|
||||
{
|
||||
/*
|
||||
if ( getnumexpectedplayers() > 1 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
level notify( "tombstone_removed" );
|
||||
level thread maps/mp/zombies/_zm_perks::perk_machine_removal( "specialty_scavenger" );
|
||||
*/
|
||||
}
|
||||
|
||||
sparking_power_lines()
|
||||
{
|
||||
lines = getentarray( "power_line_sparking", "targetname" );
|
||||
}
|
||||
|
||||
disconnect_door_zones( zone_a, zone_b, flag_name )
|
||||
{
|
||||
level endon( "intermission" );
|
||||
level endon( "end_game" );
|
||||
while ( 1 )
|
||||
{
|
||||
flag_wait( flag_name );
|
||||
azone = level.zones[ zone_a ].adjacent_zones[ zone_b ];
|
||||
azone maps/mp/zombies/_zm_zonemgr::door_close_disconnect( flag_name );
|
||||
}
|
||||
}
|
||||
|
||||
enable_morse_code()
|
||||
{
|
||||
level clientnotify( "mc1" );
|
||||
}
|
||||
|
||||
disable_morse_code()
|
||||
{
|
||||
level clientnotify( "mc0" );
|
||||
}
|
||||
|
||||
transit_pathnode_spawning()
|
||||
{
|
||||
precachemodel( "collision_wall_128x128x10_standard" );
|
||||
precachemodel( "collision_wall_256x256x10_standard" );
|
||||
precachemodel( "collision_clip_64x64x256" );
|
||||
minimap_upperl = spawn( "script_origin", ( -12248, 9496, 552 ) );
|
||||
minimap_upperl.targetname = "minimap_corner";
|
||||
minimap_lowerr = spawn( "script_origin", ( 14472, -8496, -776 ) );
|
||||
minimap_lowerr.targetname = "minimap_corner";
|
||||
maps/mp/_compass::setupminimap( "compass_map_zm_transit" );
|
||||
flag_wait( "start_zombie_round_logic" );
|
||||
collision1 = spawn( "script_model", ( 2273, -126, 143 ) );
|
||||
collision1 setmodel( "collision_wall_128x128x10_standard" );
|
||||
collision1.angles = ( 0, 0, 0 );
|
||||
collision1 ghost();
|
||||
collision2 = spawn( "script_model", ( 2096, -126, 143 ) );
|
||||
collision2 setmodel( "collision_wall_128x128x10_standard" );
|
||||
collision2.angles = ( 0, 0, 0 );
|
||||
collision2 ghost();
|
||||
collision3 = spawn( "script_model", ( 1959, -126, 143 ) );
|
||||
collision3 setmodel( "collision_wall_128x128x10_standard" );
|
||||
collision3.angles = ( 0, 0, 0 );
|
||||
collision3 ghost();
|
||||
collision4 = spawn( "script_model", ( 12239, 8509, -688 ) );
|
||||
collision4 setmodel( "collision_wall_128x128x10_standard" );
|
||||
collision4.angles = ( 0, 0, 0 );
|
||||
collision4 ghost();
|
||||
collision5 = spawn( "script_model", ( 8320, -6679, 362 ) );
|
||||
collision5 setmodel( "collision_wall_256x256x10_standard" );
|
||||
collision5.angles = vectorScale( ( 0, 0, 0 ), 300 );
|
||||
collision5 ghost();
|
||||
collision5 = spawn( "script_model", ( 10068, 7272, -67 ) );
|
||||
collision5 setmodel( "collision_clip_64x64x256" );
|
||||
collision5.angles = ( 0, 0, 0 );
|
||||
collision5 ghost();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user