Advertisement
Guest User

Untitled

a guest
Oct 20th, 2014
652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. #Super Slick DOUBLEDATE Skript by 8bitfusion!
  2. #Works with any size teams!
  3. #Randomly combines 2 teams to make 1!
  4. command /doubledate:
  5. permission: skript.op
  6. trigger:
  7. loop 50 times:
  8. delete {DD.Teamstr::%loop-number%}
  9. delete {DDcount}
  10. set {_count} to 0
  11. set {testsize} to size of {Teams::*}
  12. set {_num1moduled} to size of {Teams::*}
  13. while {_num1moduled} is greater than or equal to 2:
  14. set {_count} to {_count} + 1
  15. set {_num1moduled} to {_num1moduled} - 2
  16. if {_num1moduled} is 1:
  17. send "<red>Could not execute DoubleDate, odd number of teams!" to player
  18. stop trigger
  19. if {testsize} is 0:
  20. send "<red>No Teams currently set!" to player
  21. stop trigger
  22. else if size of {Teams::*} is greater than 0:
  23. set {prevsize} to size of {Teams::*}
  24. set {DDcount} to 1
  25. while {prevsize} is greater than 0:
  26. set {DD.Teamstr::%{DDcount}%} to ""
  27. set {rand1} to a random element of {Teams::*}
  28. loop {Team.%{rand1}%::*}:
  29. set {DD.Teamstr::%{DDcount}%} to "%{DD.Teamstr::%{DDcount}%}% %loop-value%"
  30. execute command "/team delete %{rand1}%"
  31. set {rand2} to a random element of {Teams::*}
  32. loop {Team.%{rand2}%::*}:
  33. set {DD.Teamstr::%{DDcount}%} to "%{DD.Teamstr::%{DDcount}%}% %loop-value%"
  34. execute command "/team delete %{rand2}%"
  35. add 1 to {DDcount}
  36. subtract 2 from {prevsize}
  37. loop {DDcount} times:
  38. execute command "/ct%{DD.Teamstr::%loop-number%}%"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement