Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. function anticheat()
  2. if Game.IsAlmostAllLandExplored() == 1 then
  3. Game.SetAlliesDontRevealFog(1)
  4. Game.ResetFogging()
  5. Tutorial.Exit()
  6. end
  7. end
  8.  
  9. function cheathelp()
  10. if Game.Time() == 100 then
  11. unrequest_event(anticheat,Events.FIVE_TICKS)
  12. end
  13.  
  14. if Game.HasPlayerLost(2) + Game.HasPlayerLost(3) + Game.HasPlayerLost(4) + Game.HasPlayerLost(5) > 1 then
  15. unrequest_event(anticheat,Events.FIVE_TICKS)
  16. end
  17. end
  18.  
  19. function TurnOnLandExploreCheck()
  20. Game.EnableLandExploredCheck(1)
  21. end
  22.  
  23. function new_game()
  24. dbg.stm("Script Loaded")
  25. request_event(VictoryConditionCheck, Events.VICTORY_CONDITION_CHECK)
  26. request_event(TurnOnLandExploreCheck,Events.FIRST_TICK_OF_NEW_OR_LOADED_GAME)
  27. request_event(anticheat,Events.FIVE_TICKS)
  28. request_event(cheathelp,Events.TICK)
  29. end
  30.  
  31. function register_functions()
  32. reg_func(VictoryConditionCheck)
  33. reg_func(TurnOnLandExploreCheck)
  34. reg_func(anticheat)
  35. reg_func(cheathelp)
  36. end
  37.  
  38. --//Beispiel Siegesbedingung, in diesem Fall besiege Spieler 2//--
  39. function VictoryConditionCheck()
  40. Game.DefaultPlayersLostCheck()
  41. if Game.HasPlayerLost(1) == 0
  42. and Game.HasPlayerLost(2) == 1
  43. and Game.HasPlayerLost(3) == 1
  44. and Game.HasPlayerLost(4) == 1
  45. and Game.HasPlayerLost(5) == 1
  46. then
  47. unrequest_event(anticheat,Events.FIVE_TICKS)
  48. Game.EnemyPlayersLost(1)
  49. end
  50. Game.DefaultGameEndCheck()
  51. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement