Advertisement
BaneOfSmite

Untitled

Jan 3rd, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.10 KB | None | 0 0
  1. every 1 minutes:
  2. if {_imtoolazyremoveatabspacefromeachofthebottomcodes} is not set:
  3. set {_url} to "https://hosts.uhc.gg/api/matches/upcoming"
  4. replace all "ยง" in {_url} with "&"
  5. send a request to {_url} with headers "User-agent: postbot69420"
  6. map json last http response's body to {_l::*}
  7. if {_l::*} is set:
  8. loop {_l::*}:
  9. if {_l::%loop-index%::ip} contains "62.210.77.183" or "139.99.4.213" or "167.114.209.167" or "2donkeys.net":
  10. if {matchpost::%{_l::%loop-index%::id}%} is not set:
  11. set {_text::*} to {_l::%loop-index%::opens} split at ""
  12. set {_time} to "%{_text::9}%%{_text::10}%%{_text::8}%%{_text::6}%%{_text::7}%%{_text::5}%%{_text::1}%%{_text::2}%%{_text::3}%%{_text::4}% | %{_text::12}%%{_text::13}%%{_text::14}%%{_text::15}%%{_text::16}%"
  13. if {_l::%loop-index%::scenarios} is true:
  14. loop {_l::%loop-index%::scenarios::*}:
  15. add "%loop-value-2%" to {_scenarios::*}
  16. if {_l::%loop-index%::teams} is set:
  17. if {_l::%loop-index%::teams} is "ffa":
  18. set {_tempteam} to "FFA"
  19. else if {_l::%loop-index%::teams} is "chosen":
  20. set {_tempteam} to "c"
  21. else if {_l::%loop-index%::teams} is "random":
  22. set {_tempteam} to "r"
  23. else:
  24. set {_tempteam} to "%{_l::%loop-index%::teams}%"
  25. if {_l::%loop-index%::size} is set:
  26. discord send message "@here" to channel with id "291878099749044224" as bot "2 Donkeys"
  27. create embed "matchpost"
  28. set title of embed "matchpost" to "Upcoming Match!"
  29. set color of embed "matchpost" to "YELLOW"
  30. add field "Region", with value "%{_l::%loop-index%::region}%", split true to embed "matchpost"
  31. add field "Host", with value "%{_l::%loop-index%::hostingname}%'s ##%{_l::%loop-index%::count}%", split true to embed "matchpost"
  32. add field "TeamSize & Gamemodes", with value "%{_tempteam}%to%{_l::%loop-index%::size}% - %{_scenarios::*}%", split true to embed "matchpost"
  33. add field "Matchpost", with value "{@Link}%{_l::%loop-index%::id}%", split true to embed "matchpost"
  34. add field "Opens", with value "%{_time}% UTC", split true to embed "matchpost"
  35. add field "IP", with value "__%{_l::%loop-index%::ip}%__", split true to embed "matchpost"
  36. set footer of embed "matchpost" to "Developed by BaneOfSmite & lolitsvictor"
  37. set thumbnail of embed "matchpost" to "https://pbs.twimg.com/profile_images/911867440119767040/hvEvQ8DK_400x400.jpg"
  38. send embed "matchpost" to channel "291878099749044224" with "2 Donkeys"
  39. send embed "matchpost" to channel "368645443544154113" with "2 Donkeys"
  40. clear embed "matchpost"
  41. else:
  42. discord send message "@here" to channel with id "291878099749044224" as bot "2 Donkeys"
  43. create embed "matchpost"
  44. set title of embed "matchpost" to "Upcoming Match!"
  45. set color of embed "matchpost" to "YELLOW"
  46. add field "Region", with value "%{_l::%loop-index%::region}%", split true to embed "matchpost"
  47. add field "Host", with value "%{_l::%loop-index%::hostingname}%'s ##%{_l::%loop-index%::count}%", split true to embed "matchpost"
  48. add field "TeamSize & Gamemodes", with value "%{_tempteam}% - %{_scenarios::*}%", split true to embed "matchpost"
  49. add field "Matchpost", with value "{@Link}%{_l::%loop-index%::id}%", split true to embed "matchpost"
  50. add field "Opens", with value "%{_time}% UTC", split true to embed "matchpost"
  51. add field "IP", with value "__%{_l::%loop-index%::ip}%__", split true to embed "matchpost"
  52. set footer of embed "matchpost" to "Developed by BaneOfSmite & lolitsvictor"
  53. set thumbnail of embed "matchpost" to "https://pbs.twimg.com/profile_images/911867440119767040/hvEvQ8DK_400x400.jpg"
  54. send embed "matchpost" to channel "291878099749044224" with "2 Donkeys"
  55. send embed "matchpost" to channel "368645443544154113" with "2 Donkeys"
  56. clear embed "matchpost"
  57. set {matchpost::%{_l::%loop-index%::id}%} to true
  58. set {matchpost::%{_l::%loop-index%::id}%::opendate} to "%{_text::1}%%{_text::2}%%{_text::3}%%{_text::4}%%{_text::6}%%{_text::7}%%{_text::9}%%{_text::10}%" parsed as an integer
  59. delete {_scenarios::*}
  60. else if {_l::%loop-index%::address} contains "62.210.77.183" or "139.99.4.213" or "167.114.209.167" or "2donkeys.net":
  61. if {matchpost::%{_l::%loop-index%::id}%} is not set:
  62. set {_text::*} to {_l::%loop-index%::opens} split at ""
  63. set {_time} to "%{_text::9}%%{_text::10}%%{_text::8}%%{_text::6}%%{_text::7}%%{_text::5}%%{_text::1}%%{_text::2}%%{_text::3}%%{_text::4}% | %{_text::12}%%{_text::13}%%{_text::14}%%{_text::15}%%{_text::16}%"
  64. if {_l::%loop-index%::scenarios} is true:
  65. loop {_l::%loop-index%::scenarios::*}:
  66. add "%loop-value-2%" to {_scenarios::*}
  67. if {_l::%loop-index%::teams} is set:
  68. if {_l::%loop-index%::teams} is "ffa":
  69. set {_tempteam} to "FFA"
  70. else if {_l::%loop-index%::teams} is "chosen":
  71. set {_tempteam} to "c"
  72. else if {_l::%loop-index%::teams} is "random":
  73. set {_tempteam} to "r"
  74. else:
  75. set {_tempteam} to "%{_l::%loop-index%::teams}%"
  76. if {_l::%loop-index%::size} is set:
  77. discord send message "@here" to channel with id "291878099749044224" as bot "2 Donkeys"
  78. create embed "matchpost"
  79. set title of embed "matchpost" to "Upcoming Match!"
  80. set color of embed "matchpost" to "YELLOW"
  81. add field "Region", with value "%{_l::%loop-index%::region}%", split true to embed "matchpost"
  82. add field "Host", with value "%{_l::%loop-index%::hostingname}%'s ##%{_l::%loop-index%::count}%", split true to embed "matchpost"
  83. add field "TeamSize & Gamemodes", with value "%{_tempteam}%to%{_l::%loop-index%::size}% - %{_scenarios::*}%", split true to embed "matchpost"
  84. add field "Matchpost", with value "{@Link}%{_l::%loop-index%::id}%", split true to embed "matchpost"
  85. add field "Opens", with value "%{_time}% UTC", split true to embed "matchpost"
  86. add field "IP", with value "__%{_l::%loop-index%::address}%__", split true to embed "matchpost"
  87. set footer of embed "matchpost" to "Developed by BaneOfSmite & lolitsvictor"
  88. set thumbnail of embed "matchpost" to "https://pbs.twimg.com/profile_images/911867440119767040/hvEvQ8DK_400x400.jpg"
  89. send embed "matchpost" to channel "291878099749044224" with "2 Donkeys"
  90. send embed "matchpost" to channel "368645443544154113" with "2 Donkeys"
  91. clear embed "matchpost"
  92. else:
  93. discord send message "@here" to channel with id "291878099749044224" as bot "2 Donkeys"
  94. create embed "matchpost"
  95. set title of embed "matchpost" to "Upcoming Match!"
  96. set color of embed "matchpost" to "YELLOW"
  97. add field "Region", with value "%{_l::%loop-index%::region}%", split true to embed "matchpost"
  98. add field "Host", with value "%{_l::%loop-index%::hostingname}%'s ##%{_l::%loop-index%::count}%", split true to embed "matchpost"
  99. add field "TeamSize & Gamemodes", with value "%{_tempteam}% - %{_scenarios::*}%", split true to embed "matchpost"
  100. add field "Matchpost", with value "{@Link}%{_l::%loop-index%::id}%", split true to embed "matchpost"
  101. add field "Opens", with value "%{_time}% UTC", split true to embed "matchpost"
  102. add field "IP", with value "__%{_l::%loop-index%::address}%__", split true to embed "matchpost"
  103. set footer of embed "matchpost" to "Developed by BaneOfSmite & lolitsvictor"
  104. set thumbnail of embed "matchpost" to "https://pbs.twimg.com/profile_images/911867440119767040/hvEvQ8DK_400x400.jpg"
  105. send embed "matchpost" to channel "291878099749044224" with "2 Donkeys"
  106. send embed "matchpost" to channel "368645443544154113" with "2 Donkeys"
  107. clear embed "matchpost"
  108. set {matchpost::%{_l::%loop-index%::id}%} to true
  109. set {matchpost::%{_l::%loop-index%::id}%::opendate} to "%{_text::1}%%{_text::2}%%{_text::3}%%{_text::4}%%{_text::6}%%{_text::7}%%{_text::9}%%{_text::10}%" parsed as an integer
  110. delete {_scenarios::*}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement