Advertisement
Skylinerw

RE: "Out of Combat" - Commands

Dec 31st, 2013
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. Via: https://www.youtube.com/watch?v=uzoAwwCVkN8
  2.  
  3. REFER TO THIS IMAGE FOR CONTRAPTION: http://i.imgur.com/h0V0MWZ.png
  4. REFER TO THIS FORUM POST FOR DETAILED INFORMATION: http://www.minecraftforum.net/topic/2252260-combat-logging-system/#entry27508450
  5.  
  6. -----OBJECTIVES NEEDED-----
  7.  
  8. /scoreboard objectives add PLAYTIME stat.playOneMinute
  9. /scoreboard objectives add LOGOUT stat.leaveGame
  10. /scoreboard objectives add TAKEDAMAGE stat.damageTaken
  11. /scoreboard objectives add PUNISH dummy
  12.  
  13. -----COMMANDS (see image, labeled by reference number)-----
  14.  
  15. 1.
  16.  
  17. /scoreboard players set @a[score_LOGOUT_min=1,score_PUNISH=1,score_PUNISH_min=1] PUNISH 2
  18.  
  19. 2.
  20.  
  21. /scoreboard players set @a[score_TAKEDAMAGE_min=1,score_PUNISH=1] PLAYTIME 0
  22.  
  23. 3.
  24.  
  25. /scoreboard players set @a[score_PLAYTIME_min=60,score_PUNISH=1,score_PUNISH_min=1] PUNISH 0
  26.  
  27. (Change the 60 to change how many ticks it takes before 'out of combat'. This number is in ticks, so 60 is 3 seconds).
  28.  
  29. 4.
  30.  
  31. /scoreboard players set @a[score_LOGOUT_min=1] LOGOUT 0
  32.  
  33. 5.
  34.  
  35. /scoreboard players set @a[score_TAKEDAMAGE_min=1,score_PUNISH=1] PUNISH 1
  36.  
  37. 6.
  38.  
  39. /scoreboard players set @a[score_TAKEDAMAGE_min=1] TAKEDAMAGE 0
  40.  
  41. -----SELECTING PLAYER WHO LOGGED OUT DURING COMBAT-----
  42.  
  43. /say @a[score_PUNISH=2,score_PUNISH_min=2] has logged out during combat!
  44.  
  45. /scoreboard players set @a[score_PUNISH=2,score_PUNISH_min=2] PUNISH 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement