Advertisement
fleft17

Untitled

Oct 5th, 2014
736
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.92 KB | None | 0 0
  1. options:
  2.  
  3. P: &f&l[Inventors]
  4. C: &7&l
  5. H: &a&l
  6.  
  7. Scenario: Inventors
  8. Command: /inventors
  9. Permission: skript.inventors
  10.  
  11. PlaySounds: true
  12. Sound: random.pop
  13. Pitch: 2
  14.  
  15.  
  16. command {@Command} [<text>]:
  17. trigger:
  18. if arg-1 is "on" or "enable":
  19. command sender has permission "{@Permission}":
  20. if {Inventors.Enabled} is not set:
  21. set {Inventors.Enabled} to true
  22. delete {Inventors.Items::*}
  23. broadcast "{@P}{@C} Enabled by {@H}%command sender%!"
  24. else:
  25. message "{@P}{@C} Already enabled!" to the command sender
  26. stop trigger
  27. else:
  28. execute console command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
  29. message "{@P}{@C} You don't have permission for that!" to the command sender
  30.  
  31. else if arg-1 is "off" or "disable":
  32. command sender has permission "{@Permission}":
  33. if {Inventors.Enabled} is true:
  34. delete {Inventors.Enabled}
  35. delete {Inventors.Items::*}
  36. broadcast "{@P}{@C} Disabled by {@H}%command sender%!"
  37. else:
  38. message "{@P}{@C} Already disabled!" to the command sender
  39. stop trigger
  40. else:
  41. execute console command "/playsound random.break %command sender% ~ ~ ~ 1 1 1"
  42. message "{@P}{@C} You don't have permission for that!" to the command sender
  43.  
  44.  
  45. else if arg-1 is "toggle" or "switch":
  46. if {Inventors.Enabled} is true:
  47. command sender command "/{@Command} off"
  48. stop trigger
  49. if {Inventors.Enabled} is not set:
  50. command sender command "/{@Command} on"
  51. stop trigger
  52.  
  53. else if arg-1 is "reset":
  54. if {Inventors.Enabled} is true:
  55. delete {Inventors.Items::*}
  56. broadcast "{@P}{@C} Items have been reset!"
  57. message "{@P}{@H} %command sender%, Inventors is &lstill{@H} enabled!"
  58. else:
  59. message "{@P}{@H} Inventors is not enabled!"
  60.  
  61. else if arg-1 is "help" or "?" or "question" or "info" or "information":
  62. message "" to the command sender
  63. if command sender has permission "{@Permission}":
  64. message "{@P}{@C} /{@Command} {@H}on/off/toggle" to the command sender
  65. message "{@P}{@C} Scenario by: {@H}/u/farlander0015"
  66. if command sender is "Fleft":
  67. message "{@P}{@C} Skript: {@H}You!" to the command sender
  68. else:
  69. message "{@P}{@C} Skript: {@H}Fleft" to the command sender
  70. message "" to the command sender
  71. message "{@P}{@C} In {@H}Inventors{@C} the first time someone" to the command sender
  72. message "{@P}{@C} crafts something, it's broadcasted."
  73. message "" to the command sender
  74.  
  75. else if arg-1 is not set:
  76. command sender command "/{@Command} help"
  77. else:
  78. command sender command "/{@Command} help"
  79.  
  80. on craft:
  81. {Inventors.Enabled} is true:
  82. if {Inventors.Items::%event-item%} is not set:
  83. set {Inventors.Items::%event-item%} to true
  84. broadcast "{@P}{@C} %event-player%: {@H}%event-item%!"
  85. if {@PlaySounds} is true:
  86. loop all players:
  87. execute console command "/playsound {@Sound} %loop-player% ~ ~ ~ 1 {@Pitch} 1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement