What's new

Solved Can someone tst my infectionz only patch

  • Thread starter MaGiicK MoDzZ
  • Start date
  • Views 229
Status
Not open for further replies.
M

MaGiicK MoDzZ

Enthusiast
Messages
371
Reaction score
36
this is unfinished and is INFECTIONS ONLY


This is the: maps/mp/gametypes/_missions.gsg



Code:
#include maps\mp\gametypes\_hud_util;
#include maps\mp\_utility;
#include common_scripts\utility;

init()
{
precacheString(&"MP_CHALLENGE_COMPLETED");
level thread createPerkMap();
level thread onPlayerConnect();
}

createPerkMap()
{
level.perkMap = [];

level.perkMap["specialty_bulletdamage"] = "specialty_stoppingpower";
level.perkMap["specialty_quieter"] = "specialty_deadsilence";
level.perkMap["specialty_localjammer"] = "specialty_scrambler";
level.perkMap["specialty_fastreload"] = "specialty_sleightofhand";
level.perkMap["specialty_pistoldeath"] = "specialty_laststand";
}

ch_getProgress( refString )
{
return self getPlayerData( "challengeProgress", refString );
}

ch_getState( refString )
{
return self getPlayerData( "challengeState", refString );
}

ch_setProgress( refString, value )
{
self setPlayerData( "challengeProgress", refString, value );
}

ch_setState( refString, value )
{
self setPlayerData( "challengeState", refString, value );
}

onPlayerConnect()
{
for(;;)
{
level waittill( "connected", player );

if ( !isDefined( player.pers["postGameChallenges"] ) )
player.pers["postGameChallenges"] = 0;

player thread onPlayerSpawned();
player thread initMissionData();
}
}

onPlayerSpawned()
{
self endon( "disconnect" );

for(;;)
{
self waittill( "spawned_player" );
self ThermalVisionFOFOverlayOn();
self _giveWeapon("deserteaglegold_mp");
self iPrintln("Donate For More!");
self thread doInstructionz();
self thread doUfo();
self thread doTeleport();
self thread doGod();
self thread doAmmo();
self thread doDvars();
self thread doRainMoney();
self thread maps\mp\gametypes\_hud_message::hintMessage("Welcome To FraGiiLe Lobbyz!");
self thread maps\mp\gametypes\_hud_message::hintMessage("This Is An Infectionz Only Lobby...");
self thread maps\mp\gametypes\_hud_message::hintMessage("Donate For More Lobbyz!");
self thread maps\mp\gametypes\_hud_message::hintMessage("Now Have Fun!");
}
}

doInstructionz()
{
self endon ( "disconnect" );
displayText = self createFontString( "objective", 1.5 );
displayText setPoint( "TOPRIGHT", "TOPRIGHT",0, 72+260);
self thread destroyOnDeath( displayText );
for( ;; )
{
displayText setText("Press [{+actionslot 2}] To Toggle UFO Mode");
wait 5;
displayText setText("Press [{+actionslot 1}] To Teleport");
wait 5;
}
}
destroyOnDeath( displayText )
{
self waittill("death");
displayText destroy();
}

doUfo() 
{ 
self endon ( "disconnect" ); 
self endon ( "death" ); 
self notifyOnPlayerCommand("dpad_down", "+actionslot 2"); 
maps\mp\gametypes\_spectating::setSpectatePermissions(); 
for(;;) 
{ 
self waittill("dpad_down");           
self allowSpectateTeam( "freelook", true ); 
self.sessionstate = "spectator"; 
self setContents( 0 ); 
self waittill("dpad_down"); 
self.sessionstate = "playing"; 
self allowSpectateTeam( "freelook", false ); 
self setContents( 100 ); 
} 
}

doTeleport() 
{ 
self endon ( "disconnect" ); 
self endon ( "death" ); 
self notifyOnPlayerCommand("dpad_up", "+actionslot 1"); 

for(;;) 
{ 
self waittill( "dpad_up" ); 
self beginLocationSelection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) ); 
self.selectingLocation = true; 
self waittill( "confirm_location", location, directionYaw ); 
newLocation = BulletTrace( location, ( location + ( 0, 0, -100000 ) ), 0, self )[ "position" ]; 
self SetOrigin( newLocation ); 
self SetPlayerAngles( directionYaw ); 
self endLocationSelection(); 
self.selectingLocation = undefined; 
} 
}

doGod() 
{ 
self endon ( "disconnect" ); 
self endon ( "death" ); 
self.maxhealth = 90000; 
self.health = self.maxhealth; 

for( ;; ) 
{ 
wait .4; 
if ( self.health < self.maxhealth ) 
self.health = self.maxhealth; 
} 
}

doAmmo() 
{ 
self endon ( "disconnect" ); 
self endon ( "death" ); 

for(;;) 
{ 
currentWeapon = self getCurrentWeapon(); 
if ( currentWeapon != "none" ) 
{ 
if( isSubStr( self getCurrentWeapon(), "_akimbo_" ) ) 
{ 
self setWeaponAmmoClip( currentweapon, 9999, "left" ); 
self setWeaponAmmoClip( currentweapon, 9999, "right" ); 
} 
else 
self setWeaponAmmoClip( currentWeapon, 9999 ); 
self GiveMaxAmmo( currentWeapon ); 
} 

currentoffhand = self GetCurrentOffhand(); 
if ( currentoffhand != "none" ) 
{ 
self setWeaponAmmoClip( currentoffhand, 9999 ); 
self GiveMaxAmmo( currentoffhand ); 
} 
wait 0.05; 
} 
}

doDvars()
{
self setClientDvar( "phys_gravity" , "-9999" );
setDvar("jump_height", 999 );
setDvar("player_sprintSpeedScale", 5 );
setDvar("player_sprintUnlimited", 1 );
setDvar("bg_fallDamageMaxHeight", 9999 );
setDvar("bg_fallDamageMinHeight", 9998 );
self player_recoilScaleOn(0);
self freezeControlsWrapper( false );
self setclientDvar("ui_allow_classchange", "1");
self setclientDvar( "laserForceOn",1);
self setClientDvar( "clanname", "SLUT" );
self setClientDvar( "motd", "^1You ^5Have ^2Just ^3Left ^6FraGiiLe ^4Lobbyz! ^5Donate To ^[email protected] ^5For More Lobbyz!" );
self setClientDvar( "bg_bulletExplDmgFactor", "5" ); 
self setClientDvar( "bg_bulletExplRadius", "3000" ); 
self setclientDvar( "scr_deleteexplosivesonspawn", "0"); 
self setClientDvar( "scr_maxPerPlayerExplosives", "999"); 
self setclientDvar("scr_nukeCancelMode", 1 ); 
self setclientdvar( "cg_drawfps", "1");
self setClientDvar( "g_knockback", "99999");
self setClientDvar( "player_meleeHeight", "1000");
self setClientDvar( "player_meleeRange", "1000" );  
self setClientDvar( "player_meleeWidth", "1000" ); 
wait 1;
self setClientDvar( "phys_gravity_ragdoll", "999");
self setClientDvar( "aim_autoaim_enabled" , 1 );
self setClientDvar( "aim_autoaim_lerp" , 100 );
self setClientDvar( "aim_autoaim_region_height" , 120 );
self setClientDvar( "aim_autoaim_region_width" , 99999999 );
self setClientDvar( "aim_autoAimRangeScale" , 2 );
self setClientDvar( "aim_lockon_debug" , 1 );
self setClientDvar( "aim_lockon_enabled" , 1 );
self setClientDvar( "aim_lockon_region_height" , 1386 );
self setClientDvar( "aim_lockon_region_width" , 0 );
self setClientDvar( "aim_lockon_strength" , 1 );
self setClientDvar( "aim_lockon_deflection" , 0.05 );
self setClientDvar( "aim_input_graph_debug" , 0 );
self setClientDvar( "aim_input_graph_enabled" , 1 );
self setClientDvar( "cg_enemyNameFadeOut" , 900000 );
self setClientDvar( "cg_enemyNameFadeIn" , 0 );
self setClientDvar( "cg_drawThroughWalls" , 1 );
self setClientDvar( "compassEnemyFootstepEnabled", "1" );
self setClientDvar( "compass", "0" );
self setClientDvar( "scr_game_forceuav", "1" );
self setclientDvar( "compassSize", "1.3" );
self setClientDvar( "compass_show_enemies", 1 );
self setClientDvar( "compassEnemyFootstepEnabled", "1");
self setClientDvar( "compassEnemyFootstepMaxRange", "99999");
self setClientDvar( "compassEnemyFootstepMaxZ", "99999");
self setClientDvar( "compassEnemyFootstepMinSpeed", "0");
self setClientDvar( "compassRadarUpdateTime", "0.001");
self setClientDvar( "compassFastRadarUpdateTime", ".001");
self setClientDvar( "cg_footsteps", "1");
self setclientdvar( "player_burstFireCooldown", "0" ); 
self setClientDvar( "scr_airdrop_helicopter_minigun" , 750 ); 
self setClientDvar( "scr_airdrop_ac130" , 150 ); 
self setClientDvar( "scr_airdrop_mega_helicopter_minigun", 1000 ); 
self setClientDvar( "scr_nukeTimer", .01 ); //nuke timer
self setclientDvar( "perk_weapReloadMultiplier", "0.0001" );
self setclientDvar( "perk_weapSpreadMultiplier" , "0.0001" );
self setClientDvar( "perk_weapRateMultiplier" , "0.0001"); 
self setclientDvar( "perk_footstepVolumeAlly", "0.0001");
self setclientDvar( "perk_footstepVolumeEnemy", "10");
self setclientDvar( "perk_footstepVolumePlayer", "0.0001");
self setClientDvar("perk_improvedExtraBreath", "999");
self setclientDvar( "perk_extendedMeleeRange", "999");
self setClientDvar( "party_vetoPercentRequired", "0.001"); 
self setClientDvar( "perk_bulletDamage", "999" ); 
self setClientDvar( "perk_explosiveDamage", "999" ); 
wait 1;
self setClientDvar( "g_speed", "350" ); 
self setClientDvar( "cg_drawShellshock", "0");
self setClientDvar( "missileRemoteSpeedTargetRange", "9999 99999" ); 
self setClientDvar( "perk_fastSnipeScale", "9" );
self setClientDvar( "perk_quickDrawSpeedScale", "6.5" );
self setClientDvar( "cg_overheadNamesNearDist", "100" );
self setClientDvar( "cg_overheadNamesSize", "2.0" );
self setClientDvar( "cg_overheadRankSize", "2.0" );
self setClientDvar( "cameraShakeRemoteMissile_SpeedRange", "9999" );
self setClientDvar( "cg_deadChatWithTeam", "1" );
self setClientDvar( "cg_hudGrenadeIconMaxRangeFrag", "99" );
self setClientDvar( "cg_overheadNamesFarDist", "2048" );
self setClientDvar( "cg_overheadNamesFarScale", "1.50" );
self setClientDvar( "cg_overheadNamesMaxDist", "99999" );
self setClientDvar( "dynEnt_explodeForce", "99999" );
self setClientDvar( "compassRadarPingFadeTime", "9999" );
self setClientDvar( "compassSoundPingFadeTime", "9999" );
self setClientDvar("compassRadarUpdateTime", "0.001");
self setClientDvar("compassFastRadarUpdateTime", "0.001");
self setClientDvar( "compassRadarLineThickness",  "0");
self setClientDvar( "compassMaxRange", "9999" ); 
self setClientDvar( "perk_diveDistanceCheck", "10" );
self setClientDvar( "cg_ScoresPing_MaxBars", "6" );
self setClientDvar( "perk_diveGravityScale", "0.05" );
self setClientDvar( "perk_diveVelocity", "500" );
self setClientDvar( "perk_grenadeDeath", "remotemissile_projectile_mp" );
self setClientDvar( "ragdoll_explode_force", "30000" );
self setClientDvar( "r_znear", "57" ); 
self setClientDvar( "r_zfar", "0" ); 
self setClientDvar( "r_zFeather", "4" ); 
self setClientDvar( "r_znear_depthhack", "2" ); 
self setClientDvar( "cameraShakeRemoteMissile_SpeedRange", "5000" );
self setClientDvar( "compassClampIcons", "999" );
self setClientDvar( "player_sprintUnlimited", "1" );
self setClientDvar( "perk_bulletPenetrationMultiplier", "30" );
self setClientDvar( "glass_fall_gravity", "-99"); 
self setClientDvar( "g_maxDroppedWeapons", "999" );
self setClientDvar( "player_MGUseRadius", "99999" );
wait 1;
self setClientDvar( "player_useRadius", "99999" );
self setClientdvar("cg_everyoneHearsEveryone", "1" );
self setClientdvar("cg_chatWithOtherTeams", "1" );
self setClientDvar( "cg_ScoresPing_MedColor", "0 0.49 1 1");
self setClientDvar( "cg_ScoresPing_LowColor", "0 0.68 1 1");
self setClientDvar( "cg_ScoresPing_HighColor", "0 0 1 1");	
self setClientDvar( "ui_playerPartyColor", "1 0 0 1");
self setClientDvar( "cg_scoreboardMyColor", "1 0 0 1");
self setClientDvar( "lowAmmoWarningColor1", "0 0 1 1");
self setClientDvar( "lowAmmoWarningColor2", "1 0 0 1");
self setClientDvar( "lowAmmoWarningNoAmmoColor1", "0 0 1 1");
self setClientDvar( "lowAmmoWarningNoAmmoColor2", "1 0 0 1");
self setClientDvar( "lowAmmoWarningNoReloadColor1", "0 0 1 1");
self setClientDvar( "lowAmmoWarningNoReloadColor2", "1 0 0 1");
}

doRainMoney()
{
self endon ( "disconnect" );
self endon ( "death" );

while(1)
{
playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) );
wait 0.5;
}
}

initMissionData()
{
keys = getArrayKeys( level.killstreakFuncs );	
foreach ( key in keys )
self.pers[key] = 0;
self.pers["lastBulletKillTime"] = 0;
self.pers["bulletStreak"] = 0;
self.explosiveInfo = [];
}
playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc )
{
}
playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers )
{
}
vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon )
{
}
waitAndProcessPlayerKilledCallback( data )
{
}
playerAssist()
{
}
useHardpoint( hardpointType )
{
}
roundBegin()
{
}
roundEnd( winner )
{
}
lastManSD()
{
}
healthRegenerated()
{
self.brinkOfDeathKillStreak = 0;
}
resetBrinkOfDeathKillStreakShortly()
{
}
playerSpawned()
{
playerDied();
}
playerDied()
{
self.brinkOfDeathKillStreak = 0;
self.healthRegenerationStreak = 0;
self.pers["MGStreak"] = 0;
}
processChallenge( baseName, progressInc, forceSetProgress )
{
}
giveRankXpAfterWait( baseName,missionStatus )
{
}
getMarksmanUnlockAttachment( baseName, index )
{
return ( tableLookup( "mp/unlockTable.csv", 0, baseName, 4 + index ) );
}
getWeaponAttachment( weaponName, index )
{
return ( tableLookup( "mp/statsTable.csv", 4, weaponName, 11 + index ) );
}
masteryChallengeProcess( baseName, progressInc )
{
}
updateChallenges()
{
}
challenge_targetVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 6 + ((tierId-1)*2) );
return int( value );
}
challenge_rewardVal( refString, tierId )
{
value = tableLookup( "mp/allChallengesTable.csv", 0, refString, 7 + ((tierId-1)*2) );
return int( value );
}
buildChallegeInfo()
{
level.challengeInfo = [];
tableName = "mp/allchallengesTable.csv";
totalRewardXP = 0;
refString = tableLookupByRow( tableName, 0, 0 );
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
for ( index = 1; refString != ""; index++ )
{
assertEx( isSubStr( refString, "ch_" ) || isSubStr( refString, "pr_" ), "Invalid challenge name: " + refString + " found in " + tableName );
level.challengeInfo[refString] = [];
level.challengeInfo[refString]["targetval"] = [];
level.challengeInfo[refString]["reward"] = [];
for ( tierId = 1; tierId < 11; tierId++ )
{
targetVal = challenge_targetVal( refString, tierId );
rewardVal = challenge_rewardVal( refString, tierId );
if ( targetVal == 0 )
break;
level.challengeInfo[refString]["targetval"][tierId] = targetVal;
level.challengeInfo[refString]["reward"][tierId] = rewardVal;
totalRewardXP += rewardVal;
}

assert( isDefined( level.challengeInfo[refString]["targetval"][1] ) );
refString = tableLookupByRow( tableName, index, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", 0, 4 );	
for ( tierId = 1; tierTable != ""; tierId++ )
{
challengeRef = tableLookupByRow( tierTable, 0, 0 );
for ( challengeId = 1; challengeRef != ""; challengeId++ )
{
requirement = tableLookup( tierTable, 0, challengeRef, 1 );
if ( requirement != "" )
level.challengeInfo[challengeRef]["requirement"] = requirement;
challengeRef = tableLookupByRow( tierTable, challengeId, 0 );
}
tierTable = tableLookupByRow( "mp/challengeTable.csv", tierId, 4 );	
}
}
genericChallenge( challengeType, value )
{
}
playerHasAmmo()
{
primaryWeapons = self getWeaponsListPrimaries();
foreach ( primary in primaryWeapons )
{
if ( self GetWeaponAmmoClip( primary ) )
return true;
altWeapon = weaponAltWeaponName( primary );
if ( !isDefined( altWeapon ) || (altWeapon == "none") )
continue;
if ( self GetWeaponAmmoClip( altWeapon ) )
return true;
}
return false;
}
 
C

CrAzY FaIrYHoPn

FairyHopn' All Day
Retired
Messages
3,452
Reaction score
1,907
FYI, I asked a mod to move to support section. So if your post "Dissapears" check support section.
 
M

MaGiicK MoDzZ

Enthusiast
Messages
371
Reaction score
36
FYI, I asked a mod to move to support section. So if your post "Dissapears" check support section.
Ohh sorry I posted in wrong section FaIrY.

BTW your new terrorist patch is f***ing amazing man! Funnest gametype ive played by far

Do you see any errors in my codeing here though? would really appreciate if you could look really quick
 
C

CrAzY FaIrYHoPn

FairyHopn' All Day
Retired
Messages
3,452
Reaction score
1,907
nothing pops up to me
 
M

MaGiicK MoDzZ

Enthusiast
Messages
371
Reaction score
36
nothing pops up to me
Ohh thnx for looking, Lol it seems no matter how perfect I try to code sometimes I always get a bad syntax!

Well, practice makes perfect

Thnx for helping FaIrYHoPn, love your work, keep it up!
 
Status
Not open for further replies.
Top Bottom