• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

AFK Protection 1.0, Auto Start 1.0, Ease In 1.0

AFK Protection
If a player is AFK at the beginning of a game his allies can take control over his units and buildings. When the player returns he can easily disable this in the "Allies" Option Window.


  • AFK Protection
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • Game - Grant shared vision and full shared unit control of (Picked player) units with his/her allies
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())

-Unshare
If you don't want to have control over your allied units you can type
"-unshare" into the chat box and press enter.
All your allies will stop "shared unit control" with you henceforth.

  • Unshare
    • Events
      • Player - Player 1 (Red) types a chat message containing -unshare as A substring
      • Player - Player 2 (Blue) types a chat message containing -unshare as A substring
      • Player - Player 3 (Teal) types a chat message containing -unshare as A substring
      • Player - Player 4 (Purple) types a chat message containing -unshare as A substring
    • Conditions
    • Actions
      • Set tempPlayer = (Triggering player)
      • Set tempPlayerGroup = (All allies of tempPlayer)
      • Player Group - Pick every player in tempPlayerGroup and do (Actions)
        • Loop - Actions
          • Player - Make (Picked player) treat tempPlayer as an Ally with shared vision
      • Set Saying_Player = (Player group(tempPlayer))
      • Game - Display to Saying_Player the text: Disabled Share
      • Custom script: set udg_tempPlayer = null
      • Custom script: call DestroyForce(udg_tempPlayerGroup)
      • Custom script: call DestroyForce (udg_Saying_Player)

Auto Start
Workers immediately start harvesting and the main building starts building an additional worker.
This could be regarded as an additional AFK protection.
Purposefully the rally point isn't set on the Goldmine so that at this point it gets obvious, when the idle worker appears, that the player is indeed AFK, since before that it might not be to clear.

  • Auto Start
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup = true
      • Set GroupVar = (Units in (Playable map area))
      • Unit Group - Pick every unit in GroupVar and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Picked unit) is A peon-type unit) Equal to True
            • Then - Actions
              • Unit - Order (Picked unit) to Harvest Nearby Gold
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Unit-type of (Picked unit)) Equal to Ghoul
                • Then - Actions
                  • Unit - Order (Picked unit) to Harvest Nearby Lumber
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Unit-type of (Picked unit)) Equal to Town Hall
                    • Then - Actions
                      • Unit - Order (Picked unit) to train/upgrade to a Peasant
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • (Unit-type of (Picked unit)) Equal to Great Hall
                        • Then - Actions
                          • Unit - Order (Picked unit) to train/upgrade to a Peon
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • (Unit-type of (Picked unit)) Equal to Necropolis
                            • Then - Actions
                              • Unit - Order (Picked unit) to train/upgrade to a Acolyte
                            • Else - Actions
                              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                • If - Conditions
                                  • (Unit-type of (Picked unit)) Equal to Tree of Life
                                • Then - Actions
                                  • Unit - Order (Picked unit) to train/upgrade to a Wisp
                                • Else - Actions
      • Custom script: call DestroyGroup(udg_GroupVar)
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())

Ease In
To start the game off slowly. The Game starts at slowest game speed and slowly accelerates to the game speed the game was originally set.

  • Ease Ini
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Clock = 96.00
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Current game speed) Equal to Fastest
        • Then - Actions
          • Set GameSpeed = 5.00
          • Game - Display to (All players) the text: Fastest
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Current game speed) Equal to Fast
            • Then - Actions
              • Set GameSpeed = 4.00
              • Game - Display to (All players) the text: Fast
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Current game speed) Equal to Normal
                • Then - Actions
                  • Set GameSpeed = 3.00
                  • Game - Display to (All players) the text: Normal
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Current game speed) Equal to Slow
                    • Then - Actions
                      • Set GameSpeed = 2.00
                      • Game - Display to (All players) the text: Slow
                    • Else - Actions
                      • Set GameSpeed = 1.00
                      • Game - Display to (All players) the text: Slowest
      • Game - Unlock the game speed
      • Game - Set game speed to Slowest
      • Game - Lock the game speed
      • Sound - Play BattleNetTick <gen>
      • Trigger - Run Clock <gen> (checking conditions)
      • Custom script: call DestroyTrigger(GetTriggeringTrigger())


  • Clock
    • Events
      • Time - Every (1.00 / 32.00) seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • curClock Greater than or equal to Clock
        • Then - Actions
          • Set curClock = 0.00
          • Trigger - Run Gamespeed <gen> (checking conditions)
        • Else - Actions
          • Set curClock = (curClock + 1.00)


  • Gamespeed
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • curGameSpeed Greater than GameSpeed
        • Then - Actions
          • Sound - Play CreepAggroWhat1 <gen>
          • Game - Display to (All players) the text: !
          • Set Clock = 0.00
          • Set curClock = 0.00
          • Set GameSpeed = 0.00
          • Set curGameSpeed = 0.00
          • Trigger - Turn off Clock <gen>
          • Trigger - Turn off (This trigger)
          • Custom script: call DestroyTrigger(gg_trg_Clock)
          • Custom script: call DestroyTrigger(GetTriggeringTrigger())
        • Else - Actions
          • Game - Unlock the game speed
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • curGameSpeed Equal to 1.00
            • Then - Actions
              • Game - Set game speed to Slowest
              • Game - Display to (All players) the text: Slowest
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • curGameSpeed Equal to 2.00
                • Then - Actions
                  • Game - Set game speed to Slow
                  • Game - Display to (All players) the text: Slow
                • Else - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • curGameSpeed Equal to 3.00
                    • Then - Actions
                      • Game - Set game speed to Normal
                      • Game - Display to (All players) the text: Normal
                    • Else - Actions
                      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        • If - Conditions
                          • curGameSpeed Equal to 4.00
                        • Then - Actions
                          • Game - Set game speed to Fast
                          • Game - Display to (All players) the text: Fast
                        • Else - Actions
                          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            • If - Conditions
                              • curGameSpeed Equal to 5.00
                            • Then - Actions
                              • Game - Set game speed to Fastest
                              • Game - Display to (All players) the text: Fastest
                            • Else - Actions
          • Game - Lock the game speed
          • Set curGameSpeed = (curGameSpeed + 1.00)
          • Sound - Play BattleNetTick <gen>


-Fixed the leaks
-Waits improved
-replaced function call (All Players) with tempPlayerGroupAll
-Maker: You don't need a group variable to use All Players. All Players
does not leak
Use
((Picked unit) is A peon-type unit) Equal to True
instead of a list of unit types


Keywords:
AFK Protection, Auto Start, Ease In,
Away from Keyboard, AS, EI
Contents

Lost Temple AFK, AS, EI (Map)

Reviews
AFK Protection 1.0, Auto Start 1.0, Ease In 1.0 | Reviewed by Maker | 4th Oct 2013 APPROVED Useful systems You don't need a group variable to use All Players. All Players does not leak Use [TR]((Picked unit) is A...

Moderator

M

Moderator


AFK Protection 1.0, Auto Start 1.0, Ease In 1.0 | Reviewed by Maker | 4th Oct 2013
APPROVED


126248-albums6177-picture66521.png


  • Useful systems
126248-albums6177-picture66523.png


  • You don't need a group variable to use All Players. All Players
    does not leak
  • Use
    • ((Picked unit) is A peon-type unit) Equal to True
    instead of a list of unit types
[tr]
 
AFK Protection 1.0, Auto Start 1.0, Ease In 1.0 Review by bowser499

This is my first review on a system, this one appeared when I wanted to write a review.

Originality: 3.5/5. It's not quite original but is still useful. I've seen this anti-afk system: http://www.hiveworkshop.com/forums/spells-569/anti-afk-system-v1-8-new-build-196389/. I can say, it's a lot better because it allows more than this one. I've seen some maphack protection systems aswell. So, that's why it lacks originality. It's difficult to create a really creative system.

Execution: 3/5. The whole trigger system can be seriously optimized by using loops in the code. For example, you can do a loop for shared vision and full shared unit control setting for every player. Use For each (Integer A) from 1 to 12, do (Actions). And also check if this player is controlled by player and is in game, it is possible using GUI. Imagine if you will get a share of all the computer units. AI won't unshare it. And AI never stays AFK. Destroying trigger is very nice though!
Ease In trigger can also be optimized by playing with same actions and IF blocks.

Usability: 5/5. Probably this is the only high rating. This system can simplify many lives.

Overall: (3.5+3+5)/3 = 3.8 = 4/5. Nice and simple system.

4/5: Recommended
 
Level 8
Joined
Sep 30, 2012
Messages
205
Thx Dude! :D

Did the Loop thing for sharing units and you got me thinking: maybe someone doesn't want to be able to have someones unit control.. so therefore he can disable it now :p

I don't mind having partial control over bots, it works well, you just give them an order and when they executed your order, the bot takes over again - i think thats pretty sweet..

Anti-AFK System v1.8 (New Build) is cool but something different imo
My system is primarily against stupid first minute game afk guys
and furthermore real team players always play with "share unit control"
The Anti-AFK system is nice. It tells you: who went afk, but you can only hit the pause button and wait.. after some time when it was noticed that he went afk. True its good to have that too, but i would like it even more if someone is afk a bot takes control, just in case the enemy team doesn't agree with taking a break.

Can't see how you want to optimize Ease In.. how do you want to jam a loop in there?
 
Level 8
Joined
Sep 30, 2012
Messages
205
Don't see how this is that mush more efficient.. Since it was run once anyway i guess it didn't have such a big impact.. but yeah
Fixed that to my knowledge.. Anything else that needs improvement?
- on that note is jass more efficient? isn't it saved as the same anyway?
 
Last edited:
Top