Advertisement
Hqko

Untitled

Apr 7th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.10 KB | None | 0 0
  1.  
  2. #Commands and options
  3. options:
  4. #------------------------------------------------------------------------------------#
  5. #Change the color codes for the prefixes.
  6. prefix: &f[&cSimpleFFA&f]&c
  7. #------------------------------------------------------------------------------------#
  8. #DO NOT ENABLE THIS, JUST GETS SPAMMY
  9. dev-mode: false
  10. #------------------------------------------------------------------------------------#
  11. #The world for the game to take place in. Still making some optimizations
  12. world: ffa
  13. #------------------------------------------------------------------------------------#
  14. #Permission for players to create spawns.
  15. permission: {@variable-starter}.admin
  16. #------------------------------------------------------------------------------------#
  17. #You know what, here. Just incase you're picky about your variables.
  18. variable-starter: mce
  19. #Please don't edit this. It'll just turn out bad for everyone. Just no.
  20. variables:
  21. {{@variable-starter}.ffav2.locations.spawnpoints} = 0
  22. command /ffa [<text>]:
  23. trigger:
  24. if {@dev-mode} is true:
  25. if player doesn't have permission "{@permission}":
  26. message "{@prefix} The FFA is in dev mode. Please wait for it to re-open."
  27. if arg 1 doesn't exist:
  28. make player execute "ffa join"
  29. stop
  30. if {{@variable-starter}.ffav2.playing.%player%} is true:
  31. message "{@prefix} You are already playing!"
  32. stop
  33. if arg 1 is equal to "join" or "enter" or "play":
  34. if {{@variable-starter}.ffav2.players.%player%} is true:
  35. message "{@prefix} You are already playing FFA! Leave with &e/ffa leave"
  36. stop
  37. message "{@prefix} Joining FFA"
  38. make console execute "ffainfo save %player%"
  39. set {{@variable-starter}.ffav2.players.%player%} to true
  40. give player an iron sword
  41. give player a bow
  42. give player 10 mushroom soup
  43. give player 10 arrows
  44. equip player with all iron armor
  45. set {_spawn} to a random integer between 1 and {{@variable-starter}.ffav2.locations.spawnpoints}
  46. teleport player to {{@variable-starter}.ffav2.locations.spawnpoint::%{_spawn}%}
  47. broadcast "{@prefix} %player% joined the FFA game!"
  48. heal the player
  49. console execute command "/scoreboard objectives add FFA playerKillCount &aFFA &bArena &cKills"
  50. console execute command "/scoreboard objectives add FFA deathCount &aFFA &bArena &cDeaths"
  51. console execute command "/scoreboard setdisplay sidebar FFA"
  52. if arg 1 is equal to "leave" or "exit":
  53. if {{@variable-starter}.ffav2.players.%player%} doesn't exist:
  54. message "{@prefix} You are not in the FFA game!"
  55. stop
  56. message "{@prefix} Leaving FFA."
  57. make console execute "ffainfo restore %player%"
  58. delete {{@variable-starter}.ffav2.players.%player%}
  59. delete {{@variable-starter}.ffav2.kills.%player%}
  60. command /ffainfo <text> <player>:
  61. executable by: console
  62. trigger:
  63. if arg 1 is equal to "save":
  64. set {{@variable-starter}.ffav2.armor.helmet.%arg 2%} to "%helmet of arg 2%"
  65. set {{@variable-starter}.ffav2.armor.chestplate.%arg 2%} to "%chestplate of arg 2%"
  66. set {{@variable-starter}.ffav2.armor.legging.%arg 2%} to "%legging of arg 2%"
  67. set {{@variable-starter}.ffav2.armor.boots.%arg 2%} to "%boots of arg 2%"
  68. if arg 2's gamemode is creative:
  69. set {{@variable-starter}.ffav2.gamemode.%arg 2%} to true
  70. set arg 2's gamemode to survival
  71. equip arg 2 with all air
  72. set {{@variable-starter}.ffav2.inventory.%arg 2%} to serialized inventory of arg 2
  73. set {{@variable-starter}.ffav2.locations.lastloc.%arg 2%} to location of arg 2
  74. clear arg 2's inventory
  75. stop
  76. if arg 1 is equal to "restore":
  77. clear arg 2's inventory
  78. equip arg 2 with {{@variable-starter}.ffav2.armor.helmet.%arg 2%} parsed as item
  79. equip arg 2 with {{@variable-starter}.ffav2.armor.chestplate.%arg 2%} parsed as item
  80. equip arg 2 with {{@variable-starter}.ffav2.armor.legging.%arg 2%} parsed as item
  81. equip arg 2 with {{@variable-starter}.ffav2.armor.boots.%arg 2%} parsed as item
  82. restore inventory of arg 2 to {{@variable-starter}.ffav2.inventory.%arg 2%}
  83. teleport arg 2 to {{@variable-starter}.ffav2.locations.lastloc.%arg 2%}
  84. delete {{@variable-starter}.ffav2.armor.helmet.%arg 2%}
  85. delete {{@variable-starter}.ffav2.armor.chestplate.%arg 2%}
  86. delete {{@variable-starter}.ffav2.armor.legging.%arg 2%}
  87. delete {{@variable-starter}.ffav2.armor.boots.%arg 2%}
  88. delete {{@variable-starter}.ffav2.inventory.%arg 2%}
  89. delete {{@variable-starter}.ffav2.lastloc.%arg 2%}
  90. if {{@variable-starter}.ffav2.gamemode.%arg 2%} is true:
  91. set player's gamemode to creative
  92. delete {{@variable-starter}.ffav2.gamemode.%arg 2%}
  93. stop
  94. command /ffadmin <text>:
  95. permission: {@permission}
  96. trigger:
  97. if arg 1 is equal to "setspawn" or "addspawn":
  98. if {{@variable-starter}.ffav2.locations.spawnpoints} is not set:
  99. set {{@variable-starter}.ffav2.locations.spawnpoints} to 0
  100. if {{@variable-starter}.ffav2.locations.spawnpoints} doesn't exist:
  101. set {{@variable-starter}.ffav2.locations.spawnpoints} to 0
  102. add 1 to {{@variable-starter}.ffav2.locations.spawnpoints}
  103. add location of player to {{@variable-starter}.ffav2.locations.spawnpoint::*}
  104. set {{@variable-starter}.ffav2.misc.lastspawn.%player%} to location of player
  105. message "{@prefix} Spawn set at %location of player%"
  106. if arg 1 is equal to "list":
  107. message "{@prefix} Total Spawnpoints:"
  108. loop {{@variable-starter}.ffav2.locations.spawnpoint::*}:
  109. send "%loop-index%: %loop-value%" to command sender
  110. if {@dev-mode} is true:
  111. message "{@prefix} %{{@variable-starter}.ffav2.locations.spawnpoints}%"
  112. if arg 1 is equal to "clearspawns":
  113. message "{@prefix} Clearing all spawns"
  114. delete {{@variable-starter}.ffav2.locations.spawnpoint::*}
  115. set {{@variable-starter}.ffav2.locations.spawnpoints} to 0
  116. message "{@prefix} Success!"
  117. stop
  118. if arg 1 is equal to "delspawn":
  119. message "{@prefix} Removing last set spawn set by you, which was at %{{@variable-starter}.ffav2.misc.lastspawn.%player%}%"
  120. remove {{@variable-starter}.ffav2.misc.lastspawn.%player%} from {{@variable-starter}.ffav2.locations.spawnpoint::*}
  121. remove 1 from {{@variable-starter}.ffav2.locations.spawnpoints}
  122. if {@dev-mode} is true:
  123. message "{@prefix} DEV MODE: PROCESSING SPAWNS"
  124. loop {{@variable-starter}.ffav2.locations.spawnpoint::*}:
  125. send "&a%loop-index%: %loop-value%" to command sender
  126. #Events
  127. on death of player:
  128. if {{@variable-starter}.ffav2.players.%victim%} is true:
  129. if attacker exists:
  130. if {{@variable-starter}.ffav2.players.%attacker%} is true:
  131. if {{@variable-starter}.ffav2.kills.%attacker%} is not set:
  132. set {{@variable-starter}.ffav2.kills.%attacker%} to 0
  133. add 1 to {{@variable-starter}.ffav2.kills.%attacker%}
  134. send "{@prefix} You killed &f%victim%! &cYou have &6%{{@variable-starter}.ffav2.kills.%attacker%}% &ckills." to attacker
  135. if {{@variable-starter}.ffav2.kills.%attacker%} is equal to 1:
  136. remove an iron sword from attacker
  137. give attacker a diamond sword
  138. give attacker 5 mushroom soup
  139. give attacker 4 arrows
  140. if {{@variable-starter}.ffav2.kills.%attacker%} is equal to 3:
  141. broadcast "{@prefix} %attacker% is on a 3 kill streak! Stop him with &e/ffa"
  142. if {{@variable-starter}.ffav2.kills.%attacker%} is greater than 3:
  143. give attacker 2 mushroom soup
  144. delete {{@variable-starter}.ffav2.kills.%victim%}
  145. send "{@prefix} You died by the hands of %attacker%" to victim
  146. clear drops
  147. on respawn:
  148. if {{@variable-starter}.ffav2.players.%player%} is true:
  149. wait 0.1 seconds
  150. make console execute "ffainfo restore %player%"
  151. console execute command "/scoreboard players reset %player%"
  152. delete {{@variable-starter}.ffav2.players.%player%}
  153.  
  154. on break:
  155. if {{@variable-starter}.ffav2.players.%player%} is true:
  156. cancel event
  157. on place:
  158. if {{@variable-starter}.ffav2.players.%player%} is true:
  159. cancel event
  160. On Hunger Meter Change:
  161. if {{@variable-starter}.ffav2.players.%player%} is true:
  162. cancel event
  163. set the player's food level to 10
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement