Zeldaboy111

Skript #133

Mar 26th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. on enable:
  2. set {cw::title} to "&8[&eCraftWars&8]&7" #Default: "&8[&eCraftWars&8]&7"
  3.  
  4. #set {cw::files::path::basic::*} to yaml list "" of file "Files/CraftWars/Basic.yml"
  5. #set {cw::files::path::engineer::*} to yaml list "" of file "Files/CraftWars/Engineer.yml"
  6. #set {cw::files::path::blueprint::*} to yaml list "" of file "Files/CraftWars/Blueprint.yml"
  7.  
  8. if file "Files/CraftWars/Basic.yml" doesn't exist:
  9. create file "Files/CraftWars/Basic.yml"
  10.  
  11. if file "Files/CraftWars/Engineer.yml" doesn't exist:
  12. create file "Files/CraftWars/Engineer.yml"
  13.  
  14. if file "Files/CraftWars/Blueprint.yml" doesn't exist:
  15. create file "Files/CraftWars/Blueprint.yml"
  16.  
  17.  
  18. command /craftwars [<text>] [<text>] [<text>]:
  19. aliases: cw
  20. trigger:
  21. if player has permission "craftwars.*":
  22. if arg 1 is "help":
  23. if arg 2 is not set:
  24. execute player command "/cw help 1"
  25. stop
  26.  
  27. if arg 2 is "1":
  28. send "&8________[&eCraftWars&8]________"
  29. json("%player%", "&8/craftwars help||ttp:&9Krijg de help pagina||cmd:/cw help")
  30. json("%player%", "&8/craftwars shop create [type]||ttp:&9Maak een shop||sgt:/cw shop create [type]")
  31. json("%player%", "&8/craftwars remove||ttp:&9Remove een shop||cmd:/cw shop remove")
  32. send "&8________[&ePag: 1/1&8]________"
  33. stop
  34.  
  35. if arg 1 is "shop":
  36. if arg 2 is "create":
  37. if arg 3 is "basic":
  38. spawn a villager at location of player
  39. set display name of last spawned villager to "&eBasic shop"
  40.  
  41. add "{NoAI:1}" to nbt of last spawned villager
  42. add "{Invulnerable:1, Silent:1}" to nbt of last spawned villager
  43.  
  44. add "%location of entity%" to yaml list "Villagers.Locations" of file "Files/CraftWars/Basic.yml"
  45.  
  46. send "%{cw::title}% Succesvol een &8Basic shop &7gemaakt."
  47. stop
  48.  
  49. if arg 3 is "engineer":
  50. stop
  51.  
  52. if arg 3 is "blueprint":
  53. stop
  54.  
  55. else:
  56. send "%{cw::title}% Dit is geen geldig shop type, de types zijn:%nl%&8Basic, Engineer, Blueprint"
  57. stop
  58.  
  59.  
  60. if arg 2 is "remove":
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67. else:
  68. json("%player%", "&7Bedoel je: ||&8%arg 1% create [type]||ttp:&9Maak een shop||sgt:/cw shop create [type]")
  69. json("%player%", "&7Of bedoel je: ||&8%arg 1% remove||ttp:&9Remove een shop||cmd:/cw shop remove")
  70. stop
  71.  
  72. else:
  73. send "%{cw::title}% Dit is geen geldig argument, doe /craftwars help."
  74. stop
  75. #else
  76.  
  77. on death of villager:
  78.  
  79. if yaml list "Villagers.Locations" of file "Files/CraftWars/Basic.yml" contains "%location of victim%":
  80.  
  81. remove "%location of villager%" from yaml list "Villagers.Locations" of file "Files/CraftWars/Basic.yml"
Advertisement
Add Comment
Please, Sign In to add comment