Guest User

Untitled

a guest
Jun 23rd, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. (function() {
  2. // hide error messages
  3. GameLoadError = function() {};
  4. setInterval(function(){
  5. // select zone
  6. if ( typeof gGame.m_State.m_Grid !== 'undefined' ) {
  7. for ( var diffCounter = 3; diffCounter > 0; diffCounter-- ) { // hard, medium, easy
  8. for ( var zoneCounter = 0; zoneCounter < 96; zoneCounter++ ) {
  9. if ( !gGame.m_State.m_PlanetData.zones[zoneCounter].captured &&
  10. gGame.m_State.m_PlanetData.zones[zoneCounter].difficulty === diffCounter ) {
  11. gServer.JoinZone(
  12. zoneCounter,
  13. function ( results ) {
  14. gGame.ChangeState( new CBattleState( gGame.m_State.m_PlanetData, zoneCounter ) );
  15. },
  16. GameLoadError
  17. );
  18. return;
  19. }
  20. }
  21. }
  22. }
  23. // kill enemies
  24. if ( typeof gGame.m_State.m_EnemyManager !== 'undefined' ) {
  25. gGame.m_State.m_EnemyManager.m_rgEnemies.forEach( function( enemy ) {
  26. enemy.Die( true );
  27. });
  28. }
  29. // complete zone
  30. if ( typeof gGame.m_State.m_VictoryScreen !== 'undefined' ) {
  31. setTimeout(function() {
  32. gGame.ChangeState( new CBattleSelectionState( gGame.m_State.m_PlanetData.id ) );
  33. }, 2000);
  34. }
  35. }, 2500);
  36. })();
Add Comment
Please, Sign In to add comment