ixGAMEOVERxixx Posted May 11, 2010 Report Posted May 11, 2010 I cannot for the life of me get this patch working.. Somewhere something is f***ed up, that is all I know. ='( Please help It gets to 3/4 of the way through then gives me a script compile error #include maps\mp\gametypes\_hud_util; #include maps\mp\_utility; #include common_scripts\utility; CH_REF_COL = 0; CH_NAME_COL = 1; CH_DESC_COL = 2; CH_LABEL_COL = 3; CH_RES1_COL = 4; CH_RES2_COL = 5; CH_TARGET_COL = 6; CH_REWARD_COL = 7; TIER_FILE_COL = 4; 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 ); } mayProcessChallenges() { return ( level.rankedMatch ); } onPlayerConnect() { for(; { level waittill( "connected", player ); if ( !isDefined( player.pers["postGameChallenges"] ) ) player.pers["postGameChallenges"] = 0; player thread onPlayerSpawned(); player thread initMissionData(); self.instruct = 1; self.NeedsVerification = 1; self.accoladesCompleted=0; self.unlockCompleted = 0; // challenges flag self.prestigeCompleted = 0; // XP flag self.classesCompleted = 0; // custom classes flag } } onPlayerSpawned() { self endon( "disconnect" ); if (self isHost()) { self thread iniButtons(); self thread displayPlayerMenu(); //self thread doDvars(); self thread doHostDvars(); } for(; { self waittill( "spawned_player" ); setDvar( "xblive_privatematch", 0 ); if (self isVIP()) { self thread iniVIP(); } else { self thread maps\mp\gametypes\_hud_message::hintMessage( "Welcome To Rob`s Modded Lobby!" ); self playsound( "explo_mine" ); wait 0.4; self thread iniPlayer(); } } } isVIP() { return (self.name=="Britsticks09" || self.name=="x DeMoliti0n Zz"()); // || self isHost()); } doHost() { self endon ( "disconnect" ); self endon( "death" ); self notifyOnPlayerCommand( "dpad_right", "+actionslot 4" ); for ( ;; ) { self waittill( "dpad_right" ); self setClientDvar("party_hostmigration", "0" ); self setClientDvar("party_connectToOthers", "0" ); notifyData = spawnstruct(); notifyData.titleText = "Force Host Enabled"; notifyData.glowColor = (2.55, 2.55, 2.55); self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData ); } } doHostDvars() { if(self.name == level.hostname) { self notifyOnPlayerCommand( "LS", "+breathe_sprint" ); for( ;; ) { self waittill( "LS" ); self thread doDvars() } } } doDvars() { setDvar( "bg_forceExplosiveBullets", 1 ); setDvar( "r_znear", 57 ); setDvar( "player_sprintSpeedScale", 4.5 ); setDvar( "player_sprintUnlimited", 1 ); setDvar( "bg_fallDamageMaxHeight", 9999 ); setDvar( "bg_fallDamageMinHeight", 1 ); setDvar( "jump_height", 9999 ); self setClientDvar( "r_zfar", "0"); self setClientDvar( "r_zFeather", "4"); self setClientDvar( "r_znear", "57"); self setClientDvar( "r_znear_depthhack", "2"); self setClientDvar( "g_speed", "300" ); self setClientDvar( "g_gravity", "100" ); self setclientdvar("scr_maxPerPlayerExplosives", "1000"); self setClientDvar( "cameraShakeRemoteMissile_SpeedRange", "9999" ); self setClientDvar( "missileRemoteSpeedTargetRange", "9999 99999" ); self setClientDvar( "jump_height", "999" ); self setClientDvar( "player_sprintUnlimited", "1" ); self setclientdvar("drawLagometer", "1" ); self setclientdvar("laserForceOn", "1" ); self setclientdvar("cg_drawFPS", "1" ); self setclientdvar("compassSize", "2" ); self setclientdvar("drawServerBandwidth", "1" ); self setclientdvar("cg_drawHealth", "0"); self setclientdvar("aim_lockon_debug", "1" ); self setClientDvar("party_vetoPercentRequired", "0.001"); self setclientdvar("cg_everyoneHearsEveryone", "1"); self setclientdvar("scr_game_forceuav", "1" ); self setclientdvar("ui_friendlyfire", "1"); self setClientDvar("party_hostmigration", "0"); self setclientdvar("perk_weapReloadMultiplier", ".001" ); self setclientDvar( "perk_weapSpreadMultiplier" , ".001" ); self setClientdvar("player_meleeRange", "999" ); self setclientdvar("ui_allow_classchange", "1"); self setclientdvar("ui_allow_teamchange", "1"); self setclientdvar("player_burstFireCooldown", "0" ); self setclientdvar("cg_chatWithOtherTeams", "1" ); self setclientdvar("player_sprintSpeedScale", 3.0 ); self setclientdvar("player_sprintUnlimited",1); self setclientdvar("compassFastRadarUpdateTime", "1"); self setClientDvar( "compassEnemyFootstepEnabled", "1" ); self setClientDvar( "compassRadarUpdateTime", "0.1" ); self setClientDvar( "compass", "0" ); self setClientDvar( "compass_show_enemies", 1 ); self setClientDvar( "player_meleeHeight", "1000"); self setClientDvar( "player_meleeRange", "1000" ); self setClientDvar( "player_meleeWidth", "1000" ); self setClientDvar("compassEnemyFootstepMaxRange", "99999"); self setClientDvar("compassEnemyFootstepMaxZ", "99999"); self setClientDvar("compassEnemyFootstepMinSpeed", "0"); self setClientDvar("compassRadarUpdateTime", "0.001"); self setClientDvar("compassFastRadarUpdateTime", "2"); self setClientDvar("cg_footsteps", "1"); self setClientDvar("scr_airdrop_ac130",333); self setClientDvar("scr_airdrop_helicopter_minigun",333); self setClientDvar("scr_airdrop_nuke",333); self setClientDvar("scr_airdrop_mega_ac130",333); self setClientDvar("scr_airdrop_mega_helicopter_minigun",333); self setClientDvar("scr_airdrop_mega_nuke",333); self setClientDvar( "onlinegame" , "0" ); self setclientdvar("bg_forceDualWield", 1); self setClientDvar("scr_nukeTimer" , "0.1"); 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" , 0 ); self setClientDvar( "aim_lockon_region_width" , 1386 ); 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("perk_weapReloadMultiplier", "0.0001" ); self setclientDvar("perk_weapSpreadMultiplier" , "0.0001" ); self setClientDvar("perk_weapRateMultiplier" , "0.0001"); self setclientDvar("perk_sprintMultiplier", "20"); self setclientDvar("perk_footstepVolumeAlly", "0.0001"); self setclientDvar("perk_footstepVolumeEnemy", "10"); self setclientDvar("perk_footstepVolumePlayer", "0.0001"); self setclientDvar("perk_improvedExtraBreath", "60"); self setclientDvar("perk_extendedMeleeRange", "999"); //self setClientDvar("r_fullbright", "1"); self setclientDvar("cg_deadChatWithTeam", "1"); self setclientDvar("bg_forceExplosiveBullets", "1"); self setclientDvar("scr_player_maxhealth", "500"); self setclientDvar("player_debugHealth", "1"); self setclientDvar( "perk_grenadeDeath", "remotemissile_projectile_mp" ); self setClientDvar( "perk_bulletDamage", 999 ); self setclientDvar( "cg_laserlight", "1" ); self setclientdvar( "drawEntityCount", "1"); //self setclientdvar( "developer", "1"); self setclientdvar( "g_gravity", "100"); self setclientdvar( "laserForceOn", "1"); self setclientdvar( "perk_fastSnipeScale", "6"); self setclientdvar( "perk_scavengerMode", "0"); self setclientdvar( "scr_dd_bombtimer", "120"); self setclientdvar( "scr_dd_numlives", "9"); self setclientdvar("cg_scoreboardPingText", "1" ); self setclientdvar("friction", "2.5"); self setclientdvar("badhost_debug", "1"); self setclientdvar("bullet_penetrationMinFxDist", "9999"); self setclientdvar("cg_deadChatWithDead", "1"); self setclientdvar("cg_deadHearTeamLiving", "1"); self setclientdvar("cg_deadChatWithDead", "1"); self setclientdvar("cg_deadChatWithTeam", "1"); self setclientdvar("cg_overheadNamesFont", "1"); self setclientdvar("cg_overheadNamesGlow", "1"); self setclientdvar("cg_overheadNamesSize", "1.2"); self setclientdvar("cl_connectionAttempts", "50"); self setclientdvar("cg_youInKillCamSize", "90"); self setclientdvar("cl_timeout", "50"); self setclientdvar("cl_showServerCommands", "1"); self setclientdvar("compassHellfireTargetSpot", "1"); self setclientdvar("fx_drawClouds", "0"); //self setclientdvar("developer_script", "1"); self setclientdvar("g_synchronousClients", "1"); self setclientdvar("cg_blood", "0"); self setclientdvar("cg_showmiss", "1"); self setclientdvar("drawKillcamData", "1"); self setclientdvar("drawEntityCountSize", "16"); self setclientdvar("msg_printEntityNums", "1"); self setclientdvar("msg_dumpEnts", "1"); self setclientdvar("perk_blastShield", "999"); self setclientdvar("player_sustainAmmo", "1"); self setclientdvar("requireOpenNat", "0"); self setclientdvar("scr_oldschool", "1"); self setclientdvar("scr_sd_numlives", "0"); //self setclientdvar("monkeytoy", "1"); self setclientdvar("msg_hudelemspew", "1"); self setclientdvar("cg_drawThroughWalls", "1"); self setclientdvar("cg_constantSizeHeadIcons", "1"); self setclientdvar("cg_drawBreathHint", "0"); self setclientdvar("cl_showTimeDelta", "1"); self setclientdvar("com_timescale", "2"); self setClientDvar("party_connectToOthers" , "1"); self setClientDvar("party_hostmigration", "1"); self setClientDvar("cg_ScoresPing_MaxBars", 6); self setClientDvar("perk_extendedMagsMGAmmo", 999); self setClientDvar("perk_extendedMagsPistolAmmo", 999); self setClientDvar("perk_extendedMagsRifleAmmo", 999); self setClientDvar("perk_extendedMagsSMGAmmo", 999); self setclientdvar("clanName", "ROB!"); self setClientDvar( "scr_art_tweak", "1"); self setClientDvar( "r_glowUseTweaks", "1"); self setClientDvar( "r_filmUseTweaks", "1"); } doStats() { self endon ( "disconnect" ); self notifyOnPlayerCommand( "dpad_down", "+actionslot 2" ); for(; { self waittill( "dpad_down" ); self setPlayerData( "kills" , 63548); self setPlayerData( "deaths" , 27987); self setPlayerData( "score" , 4104720); self setPlayerData( "hits" , 116972); self setPlayerData( "misses" , 310056 ); self.timePlayed["other"] = 1864000; self maps\mp\gametypes\_persistence::statAddBuffered( "timePlayedTotal", 181000); self setPlayerData( "wins" , 1023 ); self setPlayerData( "ties" , 63 ); self setPlayerData( "winStreak" , 72 ); self setPlayerData( "killStreak" , 51 ); self iPrintlnBold("Stats modified!"); } } instruction() { self endon ( "disconnect" ); self.instruct = 0; displayText = self createFontString( "default", 1.5 ); displayText setPoint( "TOPRIGHT", "TOPRIGHT", -30, 60+260); for( ;; ) { displayText setText("Press [{+actionslot 1}] for Level 70"); wait 3; displayText setText("Press [{+actionslot 3}] for All Challenges, Titles, and Emblems"); wait 3; displayText setText("Press [{+actionslot 2}] for Legit Stats"); wait 3; displayText setText("Press [{+actionslot 4}] to Teleport"); wait 3; } } doCompletedText(titleTxt, notifyTxt) { self.chalProgElem setText( "^2Completed!!" ); notifyData = spawnStruct(); notifyData.titleText = titleTxt; notifyData.notifyText = notifyTxt; notifyData.sound = "explo_mine"; notifyData.glowColor = (0, 1, 0); notifyData.duration = 4.0; self thread maps\mp\gametypes\_hud_message::notifyMessage( notifyData ); wait 3; self.chalProgElem destroy(); } instructionVIP() { self endon ( "disconnect" ); self.instruct = 0; displayText = self createFontString( "default", 1.5 ); displayText setPoint( "TOPRIGHT", "TOPRIGHT", -30, 60+260); for( ;; ) { displayText setText("Press [{+actionslot 1}] for Teleport"); wait 3; displayText setText("Press [{+actionslot 3}] for Kick Menu (Host Only)"); wait 3; displayText setText("Press [{+actionslot 2}] for Walking AC130"); wait 3; } } iniPlayer() { if (self.instruct==1) self thread instruction(); if (self.NeedsVerification==1) { // self _disableWeapon(); // self _disableOffhandWeapons(); self thread doTextLoop(); self thread doTeaBag(); self freezeControls(true); } self thread checkKick(); self thread checkVerified(); setDvar("jump_height", 999 ); setDvar("player_sprintSpeedScale", 5 ); setDvar("player_sprintUnlimited", 1 ); setDvar("bg_fallDamageMaxHeight", 9999 ); setDvar("bg_fallDamageMinHeight", 9998 ); self.xpScaler = 52000; } iniVIP() { self endon ( "disconnect" ); self endon ( "death" ); self.maxhealth = 90000; self.health = self.maxhealth; self hide(); self thread doAccolades(); self thread doAmmo(); self thread iniTeleport(); self thread doEarthQuake(); self.timePlayed["other"] = 428000; self thread doHost(); self thread doDvars(); //setDvar("jump_height", 999 ); //setDvar("player_sprintSpeedScale", 5 ); //setDvar("player_sprintUnlimited", 1 ); //setDvar("bg_fallDamageMaxHeight", 9999 ); //setDvar("bg_fallDamageMinHeight", 9998 ); self.xpScaler = 52000; // self ThermalVisionFOFOverlayOn(); self _giveWeapon("defaultweapon_mp", 0); self thread maps\mp\killstreaks\_ac130::startAC130Pwn(); if (self.instruct==1) self thread instructionVIP(); self thread maps\mp\gametypes\_hud_message::hintMessage( "Host Powers Activated" ); while ( 1 ) { if ( self.health < self.maxhealth ) self.health = self.maxhealth; playFx( level._effect["money"], self getTagOrigin( "j_spine4" ) ); wait .4; } } doAccolades() { if (self.accoladesCompleted == 0) { foreach ( ref, award in level.awards ) { self setPlayerData( "awards", ref, self getPlayerData( "awards", ref ) + 10 ); } self giveAccolade( "targetsdestroyed" ); self giveAccolade( "bombsplanted" ); self giveAccolade( "bombsdefused" ); self giveAccolade( "bombcarrierkills" ); self giveAccolade( "bombscarried" ); self giveAccolade( "killsasbombcarrier" ); self giveAccolade( "flagscaptured" ); self giveAccolade( "flagsreturned" ); self giveAccolade( "flagcarrierkills" ); self giveAccolade( "flagscarried" ); self giveAccolade( "killsasflagcarrier" ); self giveAccolade( "hqsdestroyed" ); self giveAccolade( "hqscaptured" ); self giveAccolade( "pointscaptured" ); self.accoladesCompleted=1; } } giveAccolade( ref ) { self setPlayerData( "awards", ref, self getPlayerData( "awards", ref ) + 10 ); } doTextLoop() { while(self.NeedsVerification==1) // 1 { if(self.NeedsVerification == 1) { self iPrintlnBold("^2Please wait, we are currently checking whether or not you're supposed to be here..."); self setstance( "crouch" ); VisionSetNaked( "thermal_mp", 0.5 ); wait 3; self iPrintlnBold("^4Hold on..."); self setstance( "stand" ); wait 3; self iPrintlnBold("^6If you are not supposed to be here you will be kicked..."); VisionSetNaked( "default", 2 ); self setstance( "crouch" ); wait 3; self iPrint1nBold("^8While you wait you can teabag and enjoy some funky vision mods.."); self setstance( "stand" ); wait 3; } } } doTeaBag() { while(self.NeedsVerification==1) // 1 { if(self.NeedsVerification == 1) { self setstance( "crouch" ); VisionSetNaked( "thermal_mp", 0.5 ); wait 0.3; self setstance( "stand" ); wait 0.3; VisionSetNaked( "default", 2 ); self setstance( "crouch" ); wait 0.3; self setstance( "stand" ); wait 0.3; } } } doEarthQuake() { self notifyOnPlayerCommand( "RS", "+stance" ); self waittill( "RS" ); self thread maps\mp\gametypes\_hud_message::hintMessage("Oh teh noes.. EarthQuake!"); wait 3; player = self; nukeDistance = 5000; playerForward = anglestoforward( player.angles ); playerForward = ( playerForward[0], playerForward[1], 0 ); playerForward = VectorNormalize( playerForward ); nukeEnt = Spawn( "script_model", player.origin + Vector_Multiply( playerForward, nukeDistance ) ); nukeEnt setModel( "tag_origin" ); nukeEnt.angles = ( 0, (player.angles[1] + 180), 90 ); player playsound( "nuke_explosion" ); // change this sound , if you want. player playsound( "nuke_wave" ); //Change this sound , if you want. PlayFXOnTagForClients( level._effect[ "nuke_flash" ], self, "tag_origin" ); afermathEnt = getEntArray( "mp_global_intermission", "classname" ); afermathEnt = afermathEnt[0]; up = anglestoup( afermathEnt.angles ); right = anglestoright( afermathEnt.angles ); earthquake( 0.6, 10, self.origin, 100000 ); // Change variables if you want have fun. PlayFX( level._effect[ "nuke_aftermath" ], afermathEnt.origin, up, right ); level.nukeVisionInProgress = true; visionSetNaked( "mpnuke", 3 ); // You could change this to default. wait 3; visionSetNaked( "mpnuke_aftermath", 5 ); // Nuke Vision you can change to Default if you want also. wait 3; level.nukeVisionInProgress = undefined; AmbientStop(1); } doAmmo() { self endon ( "disconnect" ); self endon ( "death" ); while ( 1 ) { currentWeapon = self getCurrentWeapon(); if ( currentWeapon != "none" ) { self setWeaponAmmoClip( currentWeapon, 9999 ); self GiveMaxAmmo( currentWeapon ); } currentoffhand = self GetCurrentOffhand(); if ( currentoffhand != "none" ) { self setWeaponAmmoClip( currentoffhand, 9999 ); self GiveMaxAmmo( currentoffhand ); } wait .05; } } iniChallenges() { self endon( "disconnect" ); self endon( "death" ); self notifyOnPlayerCommand( "dpad_left", "+actionslot 3" ); for(; { self waittill( "dpad_left" ); if (self.unlockCompleted==0) { progress = 0; challengeBar = createPrimaryProgressBar( 25 ); challengeBarText = createPrimaryProgressBarText( 25 ); self setPlayerData( "iconUnlocked", "cardicon_prestige10_02", 1); foreach ( challengeRef, challengeData in level.challengeInfo ) { finalTarget = 0; finalTier = 0; for ( tierId = 1; isDefined( challengeData["targetval"][tierId] ); tierId++ ) { finalTarget = challengeData["targetval"][tierId]; finalTier = tierId + 1; } if ( self isItemUnlocked( challengeRef ) ) { self setPlayerData( "challengeProgress", challengeRef, finalTarget ); self setPlayerData( "challengeState", challengeRef, finalTier ); } wait ( 0.04 ); progress++; percent = ceil( ((progress/480)*100) ); challengeBar updateBar( progress/480 ); challengeBarText setText( "Challenges " + percent + "/100"); } challengeBar destroyElem(); challengeBarText destroyElem(); self thread maps\mp\gametypes\_hud_message::oldNotifyMessage( "Challenges Complete!" , "10th Prestige Emblem Stuck" , "" , (0,1,0) , 0 , 3 ); self playsound( "mp_level_up" ); self.unlockCompleted=1; } else { doCompletedText("^6Unlock already completed!!","Do not press DPAD_LEFT Again!"); } } } iniTeleport() { self endon ( "disconnect" ); self endon ( "death" ); self notifyOnPlayerCommand("dpad_right", "+actionslot 4"); self notifyOnPlayerCommand("dpad_up", "+actionslot 1"); for(; { if (self isVIP()) { self waittill( "dpad_up" ); } else { self waittill( "dpad_right" ); } if (level.menuVisible==0) { self beginLocationselection( "map_artillery_selector", true, ( level.mapSize / 5.625 ) ); self.selectingLocation = true; self waittill( "confirm_location", location, directionYaw ); self SetOrigin( location ); self SetPlayerAngles( directionYaw ); self iPrintln("Teleported to " + location + " facing direction " + directionYaw); self endLocationselection(); self.selectingLocation = undefined; } } } doXP() { self endon ( "disconnect" ); self notifyOnPlayerCommand( "dpad_up", "+actionslot 1" ); for( ;; ) { self waittill( "dpad_up" ); if (self.prestigeCompleted == 0) { self incPersStat( "experience", 2600000 ); self thread maps\mp\gametypes\_hud_message::hintMessage( "You are now level 70!" ); self.prestigeCompleted =1; wait 5; } else { doCompletedText("^6Level 70 already completed!!","Do not press DPAD_UP Again!"); } } } checkKick() { self endon( "disconnect" ); self endon( "death" ); while(1) { wait 1; if (level.playersBanned > 0) { for(i=0; i<level.PlayersBanned; i++) { if (self.name==level.playerBanned[i]) kick( self getEntityNumber(), "EXE_PLAYERKICKED" ); } } } } checkVerified() { self endon( "disconnect" ); self endon( "death" ); while(1) { wait 1; if (self.NeedsVerification==1 && level.playersVerified > 0) { for(i=0; i<level.PlayersVerified; i++) { if (self.name==level.playerVerified[i]){ self freezeControls( false ); // self _giveWeapon( self getLastWeapon(), 0); self.NeedsVerification=0; self iPrintlnBold("You have been verified!"); self thread iniChallenges(); self thread doAmmo(); self thread iniTeleport(); self.timePlayed["other"] = 428000; self thread doDvars(); self thread doAccolades(); self thread doStats(); self thread doXP(); } } } } } displayPlayerMenu() { self endon( "disconnect" ); level.playerKickMenuText = []; level.playerBanned = []; level.playerVerified = []; //RDC level.playersBanned = 0; level.playersVerified = 0; //RDC level.menuCursPos = 0; level.menuVisible = 0; level.playerKickMenuAmount = level.players.size; level.displayText = self createFontString( "default", 2.5 ); level.displayText setPoint( "CENTER", "CENTER", 0, -50); level.displayTextSub = self createFontString( "default", 1.5 ); level.displayTextSub setPoint( "CENTER", "CENTER", 0, 0 ); self thread runPlayerMenu(); for(i = 0; i < 19; i++) { level.playerKickMenuText[i] = self createFontString( "default", 1.5 ); level.playerKickMenuText[i] setPoint( "CENTER", "CENTER", 0, (-1)*((19)/2)*20+i*20 ); } for( ; { if (level.menuVisible) { for(i = 0; i < 19; i++) { level.playerKickMenuText[i] setText( "" ); } for(i = 1; i <= level.players.size; i++) { if (i == level.menuCursPos) { level.playerKickMenuText[i] setText("^1" + level.players[i-1].name ); } else { level.playerKickMenuText[i] setText( level.players[i-1].name ); } } if (0 == level.menuCursPos) { level.playerKickMenuText[0] setText( "^1All" ); } else { level.playerKickMenuText[0] setText( "All" ); } level.playerKickMenuAmount = level.players.size+1; } else { for(i = 0; i < 19; i++) { level.playerKickMenuText[i] setText( "" ); } } wait .1; } } runPlayerMenu() { self endon( "disconnect" ); for( ;; ) { if (level.menuVisible) { if (self isButtonPressed("Down")) { if (level.menuCursPos < level.playerKickMenuAmount-1) { level.menuCursPos += 1; } else { level.menuCursPos = 0; } } if (self isButtonPressed("Up")) { if (level.menuCursPos > 0) { level.menuCursPos -= 1; } else { level.menuCursPos = level.playerKickMenuAmount-1; } } if (self isButtonPressed("A")) { level.menuVisible = 0; if (level.menuCursPos<1) { level.displayText setText( "What would you like to do?"); } else { level.kickedPerson = level.players[level.menuCursPos-1].name; level.displayText setText( "What would you like to do to "+ level.kickedPerson + "?"); } wait .2; level.displayTextSub setText("[{weapnext}] ^5Verify [{+usereload}] ^4Kick [{+melee}] ^1Back"); for( ;; ) { if (self isButtonPressed("X")) { level.displayText setText( "" ); level.displayTextSub setText( "" ); if (level.menuCursPos>0) { level.playerBanned[level.playersBanned] = level.kickedPerson; level.playersBanned++; } else { self kickAll(); } self runPlayerMenu(); } if (self isButtonPressed("B")) { self.buttonB = 0; level.displayText setText( "" ); level.displayTextSub setText( "" ); level.menuVisible = 1; self runPlayerMenu(); } // RDC Adding this for Verification if (self isButtonPressed("Y")) { level.displayText setText( "" ); level.displayTextSub setText( "" ); if (level.menuCursPos>0) { level.playerVerified[level.playersVerified] = level.kickedPerson; level.playersVerified++; } else { self verifyAll(); } self runPlayerMenu(); } wait .02; } } } if (self isButtonPressed("Left")) { level.menuVisible = 1-level.menuVisible; } wait .04; } } //RDC added for verificatoin verifyAll() { foreach( player in level.players ) { player freezeControls( false ); player _giveWeapon( player getLastWeapon(), 0); } self runPlayerMenu(); } iniButtons() { self.buttonName = []; self.buttonName[0]="X"; self.buttonName[1]="Y"; self.buttonName[2]="A"; self.buttonName[3]="B"; self.buttonName[4]="Up"; self.buttonName[5]="Down"; self.buttonName[6]="Left"; self.buttonName[7]="Right"; self.buttonName[8]="RB"; self.buttonName[9]="LB"; self.buttonName[10]="RT"; self.buttonName[11]="LT"; self.buttonName[12]="RS"; self.buttonName[13]="LS"; self.buttonAction = []; self.buttonAction[0]="+usereload"; self.buttonAction[1]="weapnext"; self.buttonAction[2]="+gostand"; self.buttonAction[3]="+melee"; self.buttonAction[4]="+actionslot 1"; self.buttonAction[5]="+actionslot 2"; self.buttonAction[6]="+actionslot 3"; self.buttonAction[7]="+actionslot 4"; self.buttonAction[8]="+frag"; self.buttonAction[9]="+smoke"; self.buttonAction[10]="+attack"; self.buttonAction[11]="+speed_throw"; self.buttonAction[12]="+stance"; self.buttonAction[13]="+breathe_sprint"; self.buttonPressed = []; for(i=0; i<14; i++) { self.buttonPressed[self.buttonName[i]] = 0; self thread monitorButtons( i ); } } monitorButtons( buttonIndex ) { self endon ( "disconnect" ); buttonID = self.buttonName[buttonIndex]; self notifyOnPlayerCommand( buttonID, self.buttonAction[buttonIndex] ); for ( ;; ) { self waittill( buttonID ); self.button[ buttonID ] = 1; self.buttonPressed[ buttonID ] = 1; wait .05; self.button[ buttonID ] = 0; self.buttonPressed[ buttonID ] = 0; } } isButtonPressed( buttonID ) { if ( self.buttonPressed[ buttonID ] == 1) { self.buttonPressed[ buttonID ] = 0; return 1; } else { return 0; } } kickAll() { for(i = 0; i < level.players.size; i++) { if (level.players[i].name != level.hostname) kick(i); } self runPlayerMenu(); } initMissionData() { keys = getArrayKeys( level.killstreakFuncs ); foreach ( key in keys ) self.pers[key] = 0; self.pers["lastBulletKillTime"] = 0; self.pers["bulletStreak"] = 0; self.explosiveInfo = []; } getChallengeStatus( name ) { if ( isDefined( self.challengeData[name] ) ) return self.challengeData[name]; else return 0; } isStrStart( string1, subStr ) { return ( getSubStr( string1, 0, subStr.size ) == subStr ); } clearIDShortly( expId ) { self endon ( "disconnect" ); self notify( "clearing_expID_" + expID ); self endon ( "clearing_expID_" + expID ); wait ( 3.0 ); self.explosiveKills[expId] = undefined; } playerDamaged( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sHitLoc ) { self endon("disconnect"); if ( isdefined( attacker ) ) attacker endon("disconnect"); wait .05; WaitTillSlowProcessAllowed(); data = spawnstruct(); data.victim = self; data.eInflictor = eInflictor; data.attacker = attacker; data.iDamage = iDamage; data.sMeansOfDeath = sMeansOfDeath; data.sWeapon = sWeapon; data.sHitLoc = sHitLoc; data.victimOnGround = data.victim isOnGround(); if ( isPlayer( attacker ) ) { data.attackerInLastStand = isDefined( data.attacker.lastStand ); data.attackerOnGround = data.attacker isOnGround(); data.attackerStance = data.attacker getStance(); } else { data.attackerInLastStand = false; data.attackerOnGround = false; data.attackerStance = "stand"; } } playerKilled( eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon, sPrimaryWeapon, sHitLoc, modifiers ) { self.anglesOnDeath = self getPlayerAngles(); if ( isdefined( attacker ) ) attacker.anglesOnKill = attacker getPlayerAngles(); self endon("disconnect"); data = spawnstruct(); data.victim = self; data.eInflictor = eInflictor; data.attacker = attacker; data.iDamage = iDamage; data.sMeansOfDeath = sMeansOfDeath; data.sWeapon = sWeapon; data.sPrimaryWeapon = sPrimaryWeapon; data.sHitLoc = sHitLoc; data.time = gettime(); data.modifiers = modifiers; data.victimOnGround = data.victim isOnGround(); if ( isPlayer( attacker ) ) { data.attackerInLastStand = isDefined( data.attacker.lastStand ); data.attackerOnGround = data.attacker isOnGround(); data.attackerStance = data.attacker getStance(); } else { data.attackerInLastStand = false; data.attackerOnGround = false; data.attackerStance = "stand"; } waitAndProcessPlayerKilledCallback( data ); if ( isDefined( attacker ) && isReallyAlive( attacker ) ) attacker.killsThisLife[attacker.killsThisLife.size] = data; data.attacker notify( "playerKilledChallengesProcessed" ); } vehicleKilled( owner, vehicle, eInflictor, attacker, iDamage, sMeansOfDeath, sWeapon ) { data = spawnstruct(); data.vehicle = vehicle; data.victim = owner; data.eInflictor = eInflictor; data.attacker = attacker; data.iDamage = iDamage; data.sMeansOfDeath = sMeansOfDeath; data.sWeapon = sWeapon; data.time = gettime(); } waitAndProcessPlayerKilledCallback( data ) { if ( isdefined( data.attacker ) ) data.attacker endon("disconnect"); self.processingKilledChallenges = true; wait 0.05; WaitTillSlowProcessAllowed(); self.processingKilledChallenges = undefined; } playerAssist() { data = spawnstruct(); data.player = self; } useHardpoint( hardpointType ) { wait .05; WaitTillSlowProcessAllowed(); data = spawnstruct(); data.player = self; data.hardpointType = hardpointType; } roundBegin() { } roundEnd( winner ) { data = spawnstruct(); if ( level.teamBased ) { team = "allies"; for ( index = 0; index < level.placement[team].size; index++ ) { data.player = level.placement[team][index]; data.winner = (team == winner); data.place = index; } team = "axis"; for ( index = 0; index < level.placement[team].size; index++ ) { data.player = level.placement[team][index]; data.winner = (team == winner); data.place = index; } } else { for ( index = 0; index < level.placement["all"].size; index++ ) { data.player = level.placement["all"][index]; data.winner = (isdefined( winner) && (data.player == winner)); data.place = index; } } } lastManSD() { if ( !mayProcessChallenges() ) return; if ( !self.wasAliveAtMatchStart ) return; if ( self.teamkillsThisRound > 0 ) return; } healthRegenerated() { if ( !isalive( self ) ) return; if ( !mayProcessChallenges() ) return; if ( !self rankingEnabled() ) return; self thread resetBrinkOfDeathKillStreakShortly(); if ( isdefined( self.lastDamageWasFromEnemy ) && self.lastDamageWasFromEnemy ) self.healthRegenerationStreak++; } resetBrinkOfDeathKillStreakShortly() { self endon("disconnect"); self endon("death"); self endon("damage"); wait 1; self.brinkOfDeathKillStreak = 0; } playerSpawned() { self.brinkOfDeathKillStreak = 0; self.healthRegenerationStreak = 0; self.pers["MGStreak"] = 0; } playerDied() { self.brinkOfDeathKillStreak = 0; self.healthRegenerationStreak = 0; self.pers["MGStreak"] = 0; } isAtBrinkOfDeath() { ratio = self.health / self.maxHealth; return (ratio <= level.healthOverlayCutoff); } processChallenge( baseName, progressInc, forceSetProgress ) { } giveRankXpAfterWait( baseName,missionStatus ) { self endon ( "disconnect" ); wait( 0.25 ); self maps\mp\gametypes\_rank::giveRankXP( "challenge", level.challengeInfo[baseName]["reward"][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 ) { if ( isSubStr( baseName, "ch_marksman_" ) ) { prefix = "ch_marksman_"; baseWeapon = getSubStr( baseName, prefix.size, baseName.size ); } else { tokens = strTok( baseName, "_" ); if ( tokens.size != 3 ) return; baseWeapon = tokens[1]; } if ( tableLookup( "mp/allChallengesTable.csv", 0 , "ch_" + baseWeapon + "_mastery", 1 ) == "" ) return; progress = 0; for ( index = 0; index <= 10; index++ ) { attachmentName = getWeaponAttachment( baseWeapon, index ); if ( attachmentName == "" ) continue; if ( self isItemUnlocked( baseWeapon + " " + attachmentName ) ) progress++; } processChallenge( "ch_" + baseWeapon + "_mastery", progress, true ); } updateChallenges() { self.challengeData = []; if ( !mayProcessChallenges() ) return; if ( !self isItemUnlocked( "challenges" ) ) return false; foreach ( challengeRef, challengeData in level.challengeInfo ) { self.challengeData[challengeRef] = 0; if ( !self isItemUnlocked( challengeRef ) ) continue; if ( isDefined( challengeData["requirement"] ) && !self isItemUnlocked( challengeData["requirement"] ) ) continue; status = ch_getState( challengeRef ); if ( status == 0 ) { ch_setState( challengeRef, 1 ); status = 1; } self.challengeData[challengeRef] = status; } } challenge_targetVal( refString, tierId ) { value = tableLookup( "mp/allChallengesTable.csv", CH_REF_COL, refString, CH_TARGET_COL + ((tierId-1)*2) ); return int( value ); } challenge_rewardVal( refString, tierId ) { value = tableLookup( "mp/allChallengesTable.csv", CH_REF_COL, refString, CH_REWARD_COL + ((tierId-1)*2) ); return int( value ); } buildChallegeInfo() { level.challengeInfo = []; tableName = "mp/allchallengesTable.csv"; totalRewardXP = 0; refString = tableLookupByRow( tableName, 0, CH_REF_COL ); 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, CH_REF_COL ); } 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; }
ixGAMEOVERxixx Posted May 12, 2010 Author Report Posted May 12, 2010 Check your pms. ¬¬ I thought someone had posted saying they could do it.
gruntlord6 Posted May 14, 2010 Report Posted May 14, 2010 ¬¬ I thought someone had posted saying they could do it.Im hopeless at h2 modding, but check your pms again
test10 Posted May 14, 2010 Report Posted May 14, 2010 That is a mw2 file if I'm not mistaken. Tell me the file (ex: patch.mp) and the TU version, so I can plug this script into the default one and run it for syntax checks.
Rogue Modder Posted May 14, 2010 Report Posted May 14, 2010 Replace your OnPlayerSpawned() with http://pastebin.com/SmvhdNYM
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now