Created
June 21, 2018 23:59
-
-
Save slimlime/7fc9940ca072d8c6b2dbe0d10e16f33d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setInterval(function(){ | |
// select zone | |
if ( typeof gGame.m_State.m_Grid !== 'undefined' ) { | |
for ( var diffCounter = 3; diffCounter > 0; diffCounter-- ) { // hard, medium, easy | |
for ( var zoneCounter = 0; zoneCounter < 96; zoneCounter++ ) { | |
if ( !gGame.m_State.m_PlanetData.zones[zoneCounter].captured && | |
gGame.m_State.m_PlanetData.zones[zoneCounter].difficulty === diffCounter ) { | |
gServer.JoinZone( | |
zoneCounter, | |
function ( results ) { | |
gGame.ChangeState( new CBattleState( gGame.m_State.m_PlanetData, zoneCounter ) ); | |
}, | |
GameLoadError | |
); | |
return; | |
} | |
} | |
} | |
} | |
// kill enemies | |
if ( typeof gGame.m_State.m_EnemyManager !== 'undefined' ) { | |
gGame.m_State.m_EnemyManager.m_rgEnemies.forEach( function( enemy ) { | |
enemy.Die( true ); | |
}); | |
} | |
// complete zone | |
if ( typeof gGame.m_State.m_VictoryScreen !== 'undefined' ) { | |
gGame.ChangeState( new CBattleSelectionState( gGame.m_State.m_PlanetData.id ) ); | |
} | |
}, 2500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment