Oxalist

Untitled

Feb 26th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.84 KB | None | 0 0
  1. on rightclick on a chest:
  2. if {starter.crate.being used} is true:
  3. cancel event
  4. send "&8» &7The crate is being used"
  5. stop
  6. if {crate.starter} is true:
  7. if {starter.key.%player%} is -1:
  8. cancel event
  9. send "&8» &7You need more keys to do this"
  10. stop
  11. else:
  12. set {crate.opening.%player%} to true
  13. set block to air
  14. set {_block} to beacon
  15. set {_target} to location 10 meters above the event-block
  16. block at {_target} is air:
  17. set {starter.crate.being used} to true
  18. delete holo object "starter"
  19. spawn {_fallingentity} at {target}
  20. spawn falling block of {_block} at {_target}
  21. wait 2 seconds
  22. loop blocks in radius 10 of player:
  23. if loop-block is beacon:
  24. set loop-block to chest
  25. create a fake explosion
  26. create holo object "&a&l%player%;&7Check chat for your rewards" with id "reward" at block above above loop-block
  27. wait 2 seconds
  28. delete holo object "reward"
  29. create holo object "&a&lSTARTER CRATE &8&o(Right click to open);&7Your keys: &e%{starter.key.%player%}%" with id "starter" at block above above loop-block
  30. set {crate.opening.%player%} to false
  31. remove 1 from {starter.key.%player%}
  32. set {starter.crate.being used} to false
  33. set {_random} to a random integer between 1 and 5
  34. if {_random} is 1:
  35. add 2000 to player's money
  36. send "" to player
  37. send "&a&lReward: &2$2000" to player
  38. send "" to player
  39. if {_random} is 2:
  40. add 5 to {level.%player%}
  41. send "" to player
  42. send "&a&lReward: &2+5 Levels" to player
  43. send "" to player
  44. if {_random} is 3:
  45. add 50 to {exp.%player%}
  46. send "" to player
  47. send "&a&lReward: &2+50 Exp" to player
  48. send "" to player
  49. if {_random} is 4:
  50. make console execute command "/manuaddp %player% donator.fly"
  51. send "" to player
  52. send "&a&lReward: &2Fly permission" to player
  53. send "" to player
  54. if {_random} is 5:
  55. make console execute command "/manuaddp %player% Revils.pvs.2"
  56. make console execute command "/manuaddp %player% Revils.pv.2"
  57. send "" to player
  58. send "&a&lReward: &2Vault ##2 permission" to player
  59. send "" to player
  60. stop
  61.  
  62. command /crateglitched:
  63. trigger:
  64. set {crate.opening.%player%} to false
  65.  
  66.  
  67. on any movement:
  68. if {crate.opening.%player%} is true:
  69. send "&8» &7You are opening a crate"
  70. cancel event
  71.  
  72. #on command:
  73. #if {crate.opening.%player%} is true:
  74. # send "&8» &7You are opening a crate"
  75. # cancel event
  76.  
  77. on place of chest:
  78. if name of player's tool is "&a&lSTARTER CRATE &7&o(Place down)":
  79. create holo object "&a&lSTARTER CRATE &8&o(Right click to open);&7Your keys: &e%{starter.key.%player%}%" with id "starter" at block above above event-block
  80. set {crate.starter} to true
  81.  
  82. on break of chest:
  83. if {crate.starter} is true:
  84. set {crate.starter} to false
  85. delete holo object "starter"
  86.  
  87.  
  88. command /crate [<text>] [<player>] [<text>] [<number>]:
  89. trigger:
  90. if arg 1 is "list":
  91. send ""
  92. if arg 1 is "give":
  93. if arg 3 is "starter":
  94. give 1 chest named "&a&lSTARTER CRATE &7&o(Place down)" to arg 2
  95.  
  96. command /key [<text>] [<player>] [<text>] [<number>]:
  97. trigger:
  98. if arg 1 is "list":
  99. send ""
  100. if arg 1 is "give":
  101. if arg 3 is "starter":
  102. add arg 4 to {starter.key.%arg 2%}
  103.  
  104. options:
  105.  
  106. # --- CONFIGURATION
  107. prefix: &b[NPC-ACTION]&7
  108. permission: skript.perm.mod
  109.  
  110. # --- DO NOT CHANGE ANYTHING BELOW ...
  111.  
  112. on chat:
  113. if player has permission "{@permission}":
  114. if {waitchat::%player%::npcadd} is set:
  115. cancel event
  116. set {_id} to {waitchat::%player%::npcadd}
  117. delete {waitchat::%player%::npcadd}
  118. set {_cmd} to the message
  119. remove all "/" from {_cmd}
  120. set {_found} to false
  121. loop {npcaction::*}:
  122. if {_id} is loop-value:
  123. set {_found} to true
  124. add {_cmd} to {npcaction::%{_id}%::commands::*}
  125. if {_found} is false:
  126. add {_id} to {npcaction::*}
  127. add {_cmd} to {npcaction::%{_id}%::commands::*}
  128. message "{@prefix} &aCommand added successfully to NPC %{_id}%"
  129. message "{@prefix} List of NPC's commands:"
  130. loop {npcaction::%{_id}%::commands::*}:
  131. message "&7- &9%loop-value%"
  132.  
  133. on npc right click:
  134. set {_id} to event-number
  135. loop {npcaction::*}:
  136. if {_id} is loop-value-1:
  137. # does this npc have commands?
  138. if {npcaction::%{_id}%::commands::*} is set:
  139. loop {npcaction::%{_id}%::commands::*}:
  140. set {_cmd} to loop-value-2
  141. replace all "%%player%%" with "%player%" in {_cmd}
  142. make player execute command "%{_cmd}%"
  143.  
  144. command /npcaction [<text>] [<text>] [<text>] [<text>]:
  145. aliases: npca, nac
  146. trigger:
  147. if arg-1 is not set:
  148. # ----------------------------------------------------- HELP MENU -------------------------------------------------
  149. if player has permission "{@permission}":
  150. message "&6NPC ACTION &7/npca &8by screamfine"
  151. message "&3/npca add &7&oAdd console command to targeted NPC"
  152. message "&3/npca clear &7&oRemove all commands from targeted NPC"
  153. message "&3/npca list &7&oList all commands of targeted NPC"
  154. message "&3/npca listall &7&oList all NPC IDs with commands"
  155. # ----------------------------------------------------- ADD COMMAND -------------------------------------------------
  156. else if arg-1 is "add":
  157. if targeted entity is a npc:
  158. set {_id} to citizen id of targeted entity
  159. set {waitchat::%player%::npcadd} to {_id}
  160. message "{@prefix} &eVariables: &9%%player%%"
  161. message "{@prefix} &aPlease enter command now &4(without '/')&a..."
  162. else:
  163. message "{@prefix} &cError! Please target any NPC to add a command!"
  164. else if arg-1 is "list":
  165. if targeted entity is a npc:
  166. set {_id} to citizen id of targeted entity
  167. message "{@prefix} Commands (if any) listed below:"
  168. if {npcaction::%{_id}%::commands::*} is set:
  169. loop {npcaction::%{_id}%::commands::*}:
  170. message "&3(%loop-index%) &9%loop-value%"
  171. else if arg-1 is "listall":
  172. loop {npcaction::*}:
  173. message "&3(%loop-index%) &5(%loop-value%) &9%{npcaction::%loop-value%::commands::*}%"
  174.  
  175. else if arg-1 is "del" or "delete" or "clear":
  176. if targeted entity is a npc:
  177. set {_id} to citizen id of targeted entity
  178. if {npcaction::%{_id}%::commands::*} is set:
  179. loop {npcaction::%{_id}%::commands::*}:
  180. remove loop-value from {npcaction::%{_id}%::commands::*}
  181. delete {npcaction::%{_id}%::commands::*}
  182. loop {npcaction::*}:
  183. if loop-value is {_id}:
  184. remove loop-value from {npcaction::*}
  185. message "{@prefix} All commands cleared!"
  186. else:
  187. message "{@prefix} &cError! You need to target any NPC!"
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194. #Skript By ammar
  195. #
  196. options:
  197. prefix: &7[&cRevils&7] &aplayervaults &b
  198.  
  199.  
  200. command /playervaults [<int>]:
  201. description: &cplayervaults command !
  202. aliases: pv, vault, chest
  203. trigger:
  204. if arg 1 is set:
  205. wait 2 ticks
  206. set {_int} to arg 1
  207. if player has permission "Revils.pv.%{_int}%" or "Revils.pv.*" or "Revils.pv.admin":
  208. play raw sound "random.chestopen" at player with pitch 1 volume 1
  209. open chest with 3 rows named "&2&lVAULTS &8&o(##%{_int}%)" to player
  210. wait 2 ticks
  211. loop {playervaults::%uuid of player%.%{_int}%::*}:
  212. add loop-value to current inventory of player
  213. set {pv.%uuid of player%} to {_int}
  214. set {pvclose.%uuid of player%} to true
  215. message "&8» &7Opening vault ##%{_int}%"
  216. stop
  217. if player doesn't have permission "Revils.pv.%{_int}%" or "Revils.pv.*":
  218. message "{@prefix}you doesn't have permission"
  219. stop
  220.  
  221. command /opplayervaults [<int>] [<offlineplayer>]:
  222. description: &cplayervaults command !
  223. aliases: oppv, opvault, opchest
  224. trigger:
  225. if player has permission "Revils.pv.admin":
  226. if arg 1 is set:
  227. if arg 2 is set:
  228. wait 2 ticks
  229. set {_int} to arg 1
  230. play raw sound "random.chestopen" at player with pitch 1 volume 1
  231. set {%uuid of player%.player} to "%uuid of arg 2%"
  232. if player has permission "Revils.pv.op":
  233. open chest with 6 rows named "&c&lPV %{_int}%" to player
  234. wait 2 ticks
  235. loop {playervaults::%{%uuid of player%.player}%.%{_int}%::*}:
  236. add loop-value to current inventory of player
  237. set {pv.%{%uuid of player%.player}%} to {_int}
  238. set {pvclose.%uuid of player%} to op
  239. on inventory close:
  240. if {pvclose.%uuid of player%} is true:
  241. play raw sound "random.chestclosed" at player with pitch 1 volume 1
  242. if {pv.%uuid of player%} is set:
  243. clear {playervaults::%uuid of player%.%{pv.%uuid of player%}%::*}
  244. loop 54 times:
  245. set {playervaults::%uuid of player%.%{pv.%uuid of player%}%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
  246. set {pv.%uuid of player%} to 0
  247. set {pvclose.%uuid of player%} to false
  248. if {pvclose.%uuid of player%} is op:
  249. play raw sound "random.chestclosed" at player with pitch 1 volume 1
  250. if {pv.%{%uuid of player%.player}%} is set:
  251. clear {playervaults::%{%uuid of player%.player}%.%{pv.%{%uuid of player%.player}%}%::*}
  252. loop 54 times:
  253. set {playervaults::%{%uuid of player%.player}%.%{pv.%{%uuid of player%.player}%}%::%loop-number - 1%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player
  254. set {pv.%{%uuid of player%.player}%} to 0
  255. set {pvclose.%uuid of player%} to false
  256. if inventory name of player's current inventory is "&c&lPlayer Vaults":
  257. play raw sound "random.chestclosed" at player with pitch 1 volume 1
  258. on inventory click:
  259. if inventory name of player's current inventory is "&c&lPlayer Vaults":
  260. if lore of clicked item contains "&2[&cLeft click&2]":
  261. cancel event
  262. if "%clicked slot%" is not "53":
  263. play "CLICK" to player at volume 2
  264. cancel event
  265. set {_pvm} to "%clicked slot +1 +{pv.ss.%uuid of player%}%" parsed as an integer
  266. set {_pvk} to "%clicked slot +1 +{pv.ss.%uuid of player%}%" parsed as an integer
  267. set {_pvv} to "%{pv.ss.%uuid of player%} - 1%" parsed as an integer
  268. if player has permission "Revils.pv.%{_pvm}%" or "Revils.pv.*" or "Revils.pv.admin":
  269. if "%clicked type%" is "LEFT":
  270. set {pv.%uuid of player%} to {_pvm}
  271. execute player command "/pv %{_pvm}%"
  272. stop
  273. if "%clicked type%" is "RIGHT":
  274. if player's held item is not air:
  275. clear {playervaultsset.%uuid of player%::%{_pvk}%}
  276. set {playervaultsset.%uuid of player%::%{_pvk}%} to "%player's tool%" parsed as item
  277. wait 1 ticks
  278. loop 53 times:
  279. set {_pv3} to "%loop-number - 1%" parsed as an integer
  280. set {_pvs} to "%loop-number + {pv.ss.%uuid of player%}%" parsed as an integer
  281. if player has permission "Revils.pv.%{_pvs} +1%" or "Revils.pv.*" or "Revils.pv.admin":
  282. if {playervaultssetname.%uuid of player%::%{_pvs}%} is set:
  283. set slot {_pv3} of player's current inventory to {playervaultsset.%uuid of player%::%{_pvs}%} named "%{playervaultssetname.%uuid of player%::%{_pvs}%}%" with lore "&2[&cLeft click&2] to open the playervaults||&2[&cRight click&2] to change icon to the item you hold||&2[&cMiddle click&2] to change vault name"
  284. if {playervaultssetname.%uuid of player%::%{_pvs}%} is not set:
  285. set slot {_pv3} of player's current inventory to {playervaultsset.%uuid of player%::%{_pvs}%} named "&c&lPv %{_pvs} +1%" with lore "&2[&cLeft click&2] to open the playervaults||&2[&cRight click&2] to change icon to the item you hold||&2[&cMiddle click&2] to change vault name"
  286. if player's held item is air:
  287. send "{@prefix} &c&lneed to hold the item you want icon to be"
  288. close player's inventory
  289. stop
  290. if "%clicked type%" is "MIDDLE":
  291. set {pv.number.%uuid of player%} to clicked slot + 1 + {pv.ss.%uuid of player%}
  292. close player's inventory
  293. send "{@prefix} ok now type the name you want in chat you can use color code if you want"
  294. stop
  295. if "%clicked slot%" is "53":
  296. if "%clicked type%" is "LEFT":
  297. add 53 to {pv.ss.%uuid of player%}
  298. if "%clicked type%" is "RIGHT":
  299. if {pv.ss.%uuid of player%} is not 0:
  300. remove 53 from {pv.ss.%uuid of player%}
  301. wait 1 ticks
  302. loop 53 times:
  303. set {_pv3} to "%loop-number - 1%" parsed as an integer
  304. set {_pvs} to "%loop-number + {pv.ss.%uuid of player%}%" parsed as an integer
  305. if player has permission "Revils.pv.%{_pvs}%" or "Revils.pv.*" or "Revils.pv.admin":
  306. if {playervaultssetname.%uuid of player%::%{_pvs}%} is not set:
  307. set {playervaultssetname.%uuid of player%::%{_pvs}%} to "&c&lPv %{_pvs}%"
  308. if {playervaultsset.%uuid of player%::%{_pvs}%} is not set:
  309. set {playervaultsset.%uuid of player%::%{_pvs}%} to emerald
  310. set slot {_pv3} of player's current inventory to {playervaultsset.%uuid of player%::%{_pvs}%} named "%{playervaultssetname.%uuid of player%::%{_pvs}%}%" with lore "&2[&cLeft click&2] to open the playervaults||&2[&cRight click&2] to change icon to the item you hold||&2[&cMiddle click&2] to change vault name"
  311. if player don't have permission "Revils.pv.%{_pvs}%" or "Revils.pv.*" or "Revils.pv.admin":
  312. set slot {_pv3} of player's current inventory to 166 named "&c&lpv %{_pvs}%" with lore "&7you don't have permission"
  313. set slot 53 of player's current inventory to Ender Chest named "&c&lNext %{pv.ss.%uuid of player%} +53%" with lore "&2[&cLeft click&2] &e&lNext||&2[&cRight click&2] &e&lback"
  314.  
  315. command /vault:
  316. aliases: /vaults
  317. trigger:
  318. open chest with 3 rows named "&2&lVAULTS" to player
  319. if player has permission "Revils.pv.1":
  320. format slot 10 of player with chest named "&a&lVAULT &7&o(##1)" with lore "||&8» &7Click to open pv ##1||&7||&8» &a&lUNLOCKED" to close then run [player command "pv 1"]
  321. if player does not have permission "Revils.pv.1":
  322. format slot 10 of player with chest named "&a&lVAULT &7&o(##1)" with lore "||&8» &7Click to open pv ##1||&7||&8» &c&lLOCKED" to be unstealable
  323. if player has permission "Revils.pv.2":
  324. format slot 11 of player with chest named "&a&lVAULT &7&o(##2)" with lore "||&8» &7Click to open pv ##2||&7||&8» &a&lUNLOCKED" to close then run [player command "pv 2"]
  325. if player does not have permission "Revils.pv.2":
  326. format slot 11 of player with chest named "&a&lVAULT &7&o(##2)" with lore "||&8» &7Click to open pv ##2||&7||&8» &c&lLOCKED" to be unstealable
  327.  
  328. command /satchel [<player>]:
  329. trigger:
  330. if arg 1 is not set:
  331. give 1 chest named "&6&lVAULTS STACHEL &7&o(Click to open)" to the player
  332. if arg 1 is set:
  333. give 1 chest named "&6&lVAULTS STACHEL &7&o(Click to open)" to the arg 1
  334.  
  335. on place:
  336. if name of player's tool is "&6&lVAULTS STACHEL &7&o(Click to open)":
  337. cancel event
  338.  
  339. on right click:
  340. if name of player's tool is "&6&lVAULTS STACHEL &7&o(Click to open)":
  341. make player execute command "/vaults"
  342.  
  343. command /afk [<text>]:
  344. permission: skript.afk
  345. trigger:
  346. if {afk.%player%} is true:
  347. set {afk.%player%} to false
  348. delete holo object "%player%.afk"
  349. broadcast "&a%player% is no longer &2AFK"
  350. stop
  351. else:
  352. if argument 1 is not set:
  353. set {afk.%player%} to true
  354. create holo object "&a&l%player% is AFK" with id "%player%.afk" at location 3 meters above player
  355. broadcast "&a%player% is now &2AFK"
  356. stop
  357.  
  358. on any move:
  359. if {afk.%player%} is true:
  360. set {afk.%player%} to false
  361. delete holo object "%player%.afk"
  362.  
  363. on quit:
  364. if {afk.%player%} is true:
  365. set {afk.%player%} to false
  366. delete holo object "%player%.afk"
  367.  
  368. on respawn:
  369. if {afk.%player%} is true:
  370. set {afk.%player%} to false
  371. delete holo object "%player%.afk"
  372.  
  373. on death:
  374. if {afk.%player%} is true:
  375. set {afk.%player%} to false
  376. delete holo object "%player%.afk"
  377.  
  378. on break:
  379. if {afk.%player%} is true:
  380. set {afk.%player%} to false
  381. delete holo object "%player%.afk"
Add Comment
Please, Sign In to add comment