Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 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 TurnOnLandExploreCheck()
  10. Game.EnableLandExploredCheck(1)
  11. end
  12.  
  13. function new_game()
  14. dbg.stm("Script Loaded")
  15. request_event(VictoryConditionCheck, Events.VICTORY_CONDITION_CHECK)
  16. request_event(TurnOnLandExploreCheck,Events.FIRST_TICK_OF_NEW_OR_LOADED_GAME)
  17. request_event(anticheat,Events.FIVE_TICKS)
  18. request_event(cheathelp,Events.TICK)
  19. end
  20.  
  21. function register_functions()
  22. reg_func(VictoryConditionCheck)
  23. reg_func(TurnOnLandExploreCheck)
  24. reg_func(anticheat)
  25. reg_func(cheathelp)
  26. end
  27.  
  28. --//Beispiel Siegesbedingung, in diesem Fall besiege Spieler 2//--
  29. function VictoryConditionCheck()
  30. Game.DefaultPlayersLostCheck()
  31. if Game.HasPlayerLost(1) == 0
  32. and Game.HasPlayerLost(2) == 1
  33. and Game.HasPlayerLost(3) == 1
  34. and Game.HasPlayerLost(4) == 1
  35. and Game.HasPlayerLost(5) == 1
  36. then
  37. unrequest_event(anticheat,Events.FIVE_TICKS)
  38. Game.EnemyPlayersLost(1)
  39. end
  40. Game.DefaultGameEndCheck()
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement