Guest User

Actually Monsters Inc [SK]

a guest
Sep 15th, 2016
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. # Monsters Inc.
  2. # WiNtErHaX9
  3.  
  4.  
  5. options:
  6. P : &8[&cMonsters Inc&8]&f
  7. C : &f
  8. H : &6
  9.  
  10. MaxAllowedDoors: 1000000 #Change to your liking, how many doors can people make?
  11. MaxAllowedPlaces: 100000
  12. Perm: skript.op
  13.  
  14.  
  15. command /monstersinc [<text>] [<text>]:
  16. trigger:
  17. if arg-1 is "enable" or "on":
  18. if {Inc.On} is not set:
  19. command sender has permission "{@Perm}":
  20. set {Inc.On} to true
  21. broadcast "{@P} Enabled by: {@H}%command sender%"
  22. command "/monstersinc sound mob.cat.purr"
  23. else:
  24. message "{@P} No permissions!"
  25. else:
  26. message "{@P} Already enabled!"
  27. else if arg-1 is "disable" or "off":
  28. if {Inc.On} is true:
  29. command sender has permission "{@Perm}":
  30. delete {Inc.On}
  31. broadcast "{@P} Disabled by: {@H}%command sender%"
  32. command "/monstersinc sound mob.cat.purr"
  33. else:
  34. message "{@P} Already disabled!"
  35. else if arg-1 is "toggle" or "switch":
  36. command sender has permission "{@Perm}":
  37. if {Inc.On} is not set:
  38. command "/monstersinc on"
  39. else:
  40. command "/monstersinc off"
  41. else if arg-1 is "reset":
  42. delete {Doors::*}
  43. delete {Doors.Used::*}
  44. delete {Doors.Placed}
  45. delete {Doors.Teleport::*}
  46. delete {Doors.IPlaced::*}
  47. broadcast "{@P} Reset!"
  48. else if arg-1 is "sound":
  49. set {_sound} to arg-2
  50. loop all players:
  51. execute console command "playsound %{_sound}% %loop-player% ~ ~ ~ 1 1 1"
  52.  
  53. on place:
  54. {Inc.On} is true:
  55. event-block is door:
  56. if {Doors.IPlaced::%event-player%} is greater than {@MaxAllowedPlaces}:
  57. message "{@P} You have already placed maximum doors!"
  58. cancel the event
  59. stop trigger
  60. else:
  61. add 1 to {Doors.Placed}
  62. add 1 to {Doors.IPlaced::%event-player%}
  63. message "{@P} You created door {@H}%{Doors.Placed}%!"
  64. set {_loc} to (location of the event-block)
  65. add {_loc} to {Doors.Teleport::*}
  66.  
  67. on click:
  68. {Inc.On} is true:
  69. event-block is door:
  70. if {Doors.Placed} is greater than 1:
  71. if {Doors.Used::%event-player%} is greater than {@MaxAllowedDoors}:
  72. message "{@P} You used all your doors!"
  73. stop trigger
  74. else:
  75. set {_door} to (random element out of {Doors.Teleport::*})
  76. teleport (event-player) to ({_door})
  77. message "{@P} You were teleported to: {@H}%{_door}%!"
  78. add 1 to {Doors.Used::%event-player%}
  79. else:
  80. message "{@P} 1 more door needs to be placed!"
  81.  
  82. on break:
  83. {Inc.On} is true:
  84. event-block is door:
  85. message "{@P} Can't do that!"
Advertisement
Add Comment
Please, Sign In to add comment