https://github.com/mrpeanut188/mrpeanut188-zombie-scripts/tree/master/Enable-XP-Ranking (https://github.com/mrpeanut188/mrpeanut188-zombie-scripts/tree/master/Enable-XP-Ranking) Credit: Marvel4 *Prestige currently does not instructions at the moment. Installation: Place in mods/MAPNAME/maps and replace if necessary. Place ranktable.csv into mods/MAPNAME/mp. Include in .IWD. (ranktable.csv is in the same folder as this file.) mod.csv: Add:stringtable,mp/ranktable.csv material,rank_private material,rank_corporal material,rank_major material,rank_lieutenant
mapname.gsc: Add:players = getPlayers(); for (i = 0; i < players.size; i++) players[i] thread maps\_challenges_coop::xpWatcher();
_zombiemode_spawner.gsc: Add: maps\_challenges_coop::setXPReward( zombie.attacker, zombie.damagelocation, zombie.damagemod ); Before: zombie.attacker notify("zom_kill"); After:maps\_challenges_coop::setXPReward( zombie.attacker, zombie.damagelocation, zombie.damagemod ); zombie.attacker notify("zom_kill");
_zombiemode_blockers_new.gsc: Add: who notify( "door_purchased" ); Example:if( is_player_valid( who ) ) { if( who.score >= self.zombie_cost ) { who notify( "door_purchased" ); // set the score who maps\_zombiemode_score::minus_to_player_score( self.zombie_cost ); if( isDefined( level.achievement_notify_func ) ) { level [[ level.achievement_notify_func ]]( "DLC3_ZOMBIE_ALL_DOORS" ); } bbPrint( "zombie_uses: playername %s playerscore %d round %d cost %d name %s x %f y %f z %f type door", who.playername, who.score, level.round_number, self.zombie_cost, self.target, self.origin ); } else // Not enough money { play_sound_at_pos( "no_purchase", self.doors[0].origin ); // who thread maps\_zombiemode_perks::play_no_money_perk_dialog(); continue; } }
Add: who notify( "door_purchased" ); Example:if( is_player_valid( who ) ) { if( who.score >= self.zombie_cost ) { who notify( "door_purchased" ); // set the score who maps\_zombiemode_score::minus_to_player_score( self.zombie_cost ); if( isDefined( level.achievement_notify_func ) ) { level [[ level.achievement_notify_func ]]( "DLC3_ZOMBIE_ALL_DOORS" ); } bbPrint( "zombie_uses: playername %s playerscore %d round %d cost %d name %s x %f y %f z %f type debris", who.playername, who.score, level.round_number, self.zombie_cost, self.target, self.origin ); // delete the stuff self thread debris_move_start(); break; } else { play_sound_at_pos( "no_purchase", self.origin ); // who thread maps\nazi_zombie_sumpf_blockers::play_no_money_purchase_dialog(); } }
_zombiemode.gsc: Add: reviver notify( "revive_bonus" ); Example:player_revive_monitor() { self endon( "disconnect" ); while (1) { self waittill( "player_revived", reviver ); if ( IsDefined(reviver) ) { // Check to see how much money you lost from being down. points = self.score_lost_when_downed; if ( points > 300 ) { points = 300; } reviver notify( "revive_bonus" ); reviver maps\_zombiemode_score::add_to_player_score( points ); self.score_lost_when_downed = 0; } } }
Change the settings below to fit your preference. Remember to compile mod .FF and .IWD files. To enable Prestige, please see the instructions contained in the parent folder. Script usage: Call any of the following on a player _challenges_coop.gsc::getRank() returns the current rank. _challenges_coop.gsc::getPrestigeLevel() returns the current prestige. _challenges_coop.gsc::getRankXP() returns current XP.