Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on rightclick on a chest:
- if {starter.crate.being used} is true:
- cancel event
- send "&8» &7The crate is being used"
- stop
- if {crate.starter} is true:
- if {starter.key.%player%} is -1:
- cancel event
- send "&8» &7You need more keys to do this"
- stop
- else:
- set {crate.opening.%player%} to true
- set block to air
- set {_block} to beacon
- set {_target} to location 10 meters above the event-block
- block at {_target} is air:
- set {starter.crate.being used} to true
- delete holo object "starter"
- spawn {_fallingentity} at {target}
- spawn falling block of {_block} at {_target}
- wait 2 seconds
- loop blocks in radius 10 of player:
- if loop-block is beacon:
- set loop-block to chest
- create a fake explosion
- create holo object "&a&l%player%;&7Check chat for your rewards" with id "reward" at block above above loop-block
- wait 2 seconds
- delete holo object "reward"
- 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
- set {crate.opening.%player%} to false
- remove 1 from {starter.key.%player%}
- set {starter.crate.being used} to false
- set {_random} to a random integer between 1 and 5
- if {_random} is 1:
- add 2000 to player's money
- send "" to player
- send "&a&lReward: &2$2000" to player
- send "" to player
- if {_random} is 2:
- add 5 to {level.%player%}
- send "" to player
- send "&a&lReward: &2+5 Levels" to player
- send "" to player
- if {_random} is 3:
- add 50 to {exp.%player%}
- send "" to player
- send "&a&lReward: &2+50 Exp" to player
- send "" to player
- if {_random} is 4:
- make console execute command "/manuaddp %player% donator.fly"
- send "" to player
- send "&a&lReward: &2Fly permission" to player
- send "" to player
- if {_random} is 5:
- make console execute command "/manuaddp %player% Revils.pvs.2"
- make console execute command "/manuaddp %player% Revils.pv.2"
- send "" to player
- send "&a&lReward: &2Vault ##2 permission" to player
- send "" to player
- stop
- command /crateglitched:
- trigger:
- set {crate.opening.%player%} to false
- on any movement:
- if {crate.opening.%player%} is true:
- send "&8» &7You are opening a crate"
- cancel event
- #on command:
- #if {crate.opening.%player%} is true:
- # send "&8» &7You are opening a crate"
- # cancel event
- on place of chest:
- if name of player's tool is "&a&lSTARTER CRATE &7&o(Place down)":
- 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
- set {crate.starter} to true
- on break of chest:
- if {crate.starter} is true:
- set {crate.starter} to false
- delete holo object "starter"
- command /crate [<text>] [<player>] [<text>] [<number>]:
- trigger:
- if arg 1 is "list":
- send ""
- if arg 1 is "give":
- if arg 3 is "starter":
- give 1 chest named "&a&lSTARTER CRATE &7&o(Place down)" to arg 2
- command /key [<text>] [<player>] [<text>] [<number>]:
- trigger:
- if arg 1 is "list":
- send ""
- if arg 1 is "give":
- if arg 3 is "starter":
- add arg 4 to {starter.key.%arg 2%}
- options:
- # --- CONFIGURATION
- prefix: &b[NPC-ACTION]&7
- permission: skript.perm.mod
- # --- DO NOT CHANGE ANYTHING BELOW ...
- on chat:
- if player has permission "{@permission}":
- if {waitchat::%player%::npcadd} is set:
- cancel event
- set {_id} to {waitchat::%player%::npcadd}
- delete {waitchat::%player%::npcadd}
- set {_cmd} to the message
- remove all "/" from {_cmd}
- set {_found} to false
- loop {npcaction::*}:
- if {_id} is loop-value:
- set {_found} to true
- add {_cmd} to {npcaction::%{_id}%::commands::*}
- if {_found} is false:
- add {_id} to {npcaction::*}
- add {_cmd} to {npcaction::%{_id}%::commands::*}
- message "{@prefix} &aCommand added successfully to NPC %{_id}%"
- message "{@prefix} List of NPC's commands:"
- loop {npcaction::%{_id}%::commands::*}:
- message "&7- &9%loop-value%"
- on npc right click:
- set {_id} to event-number
- loop {npcaction::*}:
- if {_id} is loop-value-1:
- # does this npc have commands?
- if {npcaction::%{_id}%::commands::*} is set:
- loop {npcaction::%{_id}%::commands::*}:
- set {_cmd} to loop-value-2
- replace all "%%player%%" with "%player%" in {_cmd}
- make player execute command "%{_cmd}%"
- command /npcaction [<text>] [<text>] [<text>] [<text>]:
- aliases: npca, nac
- trigger:
- if arg-1 is not set:
- # ----------------------------------------------------- HELP MENU -------------------------------------------------
- if player has permission "{@permission}":
- message "&6NPC ACTION &7/npca &8by screamfine"
- message "&3/npca add &7&oAdd console command to targeted NPC"
- message "&3/npca clear &7&oRemove all commands from targeted NPC"
- message "&3/npca list &7&oList all commands of targeted NPC"
- message "&3/npca listall &7&oList all NPC IDs with commands"
- # ----------------------------------------------------- ADD COMMAND -------------------------------------------------
- else if arg-1 is "add":
- if targeted entity is a npc:
- set {_id} to citizen id of targeted entity
- set {waitchat::%player%::npcadd} to {_id}
- message "{@prefix} &eVariables: &9%%player%%"
- message "{@prefix} &aPlease enter command now &4(without '/')&a..."
- else:
- message "{@prefix} &cError! Please target any NPC to add a command!"
- else if arg-1 is "list":
- if targeted entity is a npc:
- set {_id} to citizen id of targeted entity
- message "{@prefix} Commands (if any) listed below:"
- if {npcaction::%{_id}%::commands::*} is set:
- loop {npcaction::%{_id}%::commands::*}:
- message "&3(%loop-index%) &9%loop-value%"
- else if arg-1 is "listall":
- loop {npcaction::*}:
- message "&3(%loop-index%) &5(%loop-value%) &9%{npcaction::%loop-value%::commands::*}%"
- else if arg-1 is "del" or "delete" or "clear":
- if targeted entity is a npc:
- set {_id} to citizen id of targeted entity
- if {npcaction::%{_id}%::commands::*} is set:
- loop {npcaction::%{_id}%::commands::*}:
- remove loop-value from {npcaction::%{_id}%::commands::*}
- delete {npcaction::%{_id}%::commands::*}
- loop {npcaction::*}:
- if loop-value is {_id}:
- remove loop-value from {npcaction::*}
- message "{@prefix} All commands cleared!"
- else:
- message "{@prefix} &cError! You need to target any NPC!"
- #Skript By ammar
- #
- options:
- prefix: &7[&cRevils&7] &aplayervaults &b
- command /playervaults [<int>]:
- description: &cplayervaults command !
- aliases: pv, vault, chest
- trigger:
- if arg 1 is set:
- wait 2 ticks
- set {_int} to arg 1
- if player has permission "Revils.pv.%{_int}%" or "Revils.pv.*" or "Revils.pv.admin":
- play raw sound "random.chestopen" at player with pitch 1 volume 1
- open chest with 3 rows named "&2&lVAULTS &8&o(##%{_int}%)" to player
- wait 2 ticks
- loop {playervaults::%uuid of player%.%{_int}%::*}:
- add loop-value to current inventory of player
- set {pv.%uuid of player%} to {_int}
- set {pvclose.%uuid of player%} to true
- message "&8» &7Opening vault ##%{_int}%"
- stop
- if player doesn't have permission "Revils.pv.%{_int}%" or "Revils.pv.*":
- message "{@prefix}you doesn't have permission"
- stop
- command /opplayervaults [<int>] [<offlineplayer>]:
- description: &cplayervaults command !
- aliases: oppv, opvault, opchest
- trigger:
- if player has permission "Revils.pv.admin":
- if arg 1 is set:
- if arg 2 is set:
- wait 2 ticks
- set {_int} to arg 1
- play raw sound "random.chestopen" at player with pitch 1 volume 1
- set {%uuid of player%.player} to "%uuid of arg 2%"
- if player has permission "Revils.pv.op":
- open chest with 6 rows named "&c&lPV %{_int}%" to player
- wait 2 ticks
- loop {playervaults::%{%uuid of player%.player}%.%{_int}%::*}:
- add loop-value to current inventory of player
- set {pv.%{%uuid of player%.player}%} to {_int}
- set {pvclose.%uuid of player%} to op
- on inventory close:
- if {pvclose.%uuid of player%} is true:
- play raw sound "random.chestclosed" at player with pitch 1 volume 1
- if {pv.%uuid of player%} is set:
- clear {playervaults::%uuid of player%.%{pv.%uuid of player%}%::*}
- loop 54 times:
- 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
- set {pv.%uuid of player%} to 0
- set {pvclose.%uuid of player%} to false
- if {pvclose.%uuid of player%} is op:
- play raw sound "random.chestclosed" at player with pitch 1 volume 1
- if {pv.%{%uuid of player%.player}%} is set:
- clear {playervaults::%{%uuid of player%.player}%.%{pv.%{%uuid of player%.player}%}%::*}
- loop 54 times:
- 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
- set {pv.%{%uuid of player%.player}%} to 0
- set {pvclose.%uuid of player%} to false
- if inventory name of player's current inventory is "&c&lPlayer Vaults":
- play raw sound "random.chestclosed" at player with pitch 1 volume 1
- on inventory click:
- if inventory name of player's current inventory is "&c&lPlayer Vaults":
- if lore of clicked item contains "&2[&cLeft click&2]":
- cancel event
- if "%clicked slot%" is not "53":
- play "CLICK" to player at volume 2
- cancel event
- set {_pvm} to "%clicked slot +1 +{pv.ss.%uuid of player%}%" parsed as an integer
- set {_pvk} to "%clicked slot +1 +{pv.ss.%uuid of player%}%" parsed as an integer
- set {_pvv} to "%{pv.ss.%uuid of player%} - 1%" parsed as an integer
- if player has permission "Revils.pv.%{_pvm}%" or "Revils.pv.*" or "Revils.pv.admin":
- if "%clicked type%" is "LEFT":
- set {pv.%uuid of player%} to {_pvm}
- execute player command "/pv %{_pvm}%"
- stop
- if "%clicked type%" is "RIGHT":
- if player's held item is not air:
- clear {playervaultsset.%uuid of player%::%{_pvk}%}
- set {playervaultsset.%uuid of player%::%{_pvk}%} to "%player's tool%" parsed as item
- wait 1 ticks
- loop 53 times:
- set {_pv3} to "%loop-number - 1%" parsed as an integer
- set {_pvs} to "%loop-number + {pv.ss.%uuid of player%}%" parsed as an integer
- if player has permission "Revils.pv.%{_pvs} +1%" or "Revils.pv.*" or "Revils.pv.admin":
- if {playervaultssetname.%uuid of player%::%{_pvs}%} is set:
- 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"
- if {playervaultssetname.%uuid of player%::%{_pvs}%} is not set:
- 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"
- if player's held item is air:
- send "{@prefix} &c&lneed to hold the item you want icon to be"
- close player's inventory
- stop
- if "%clicked type%" is "MIDDLE":
- set {pv.number.%uuid of player%} to clicked slot + 1 + {pv.ss.%uuid of player%}
- close player's inventory
- send "{@prefix} ok now type the name you want in chat you can use color code if you want"
- stop
- if "%clicked slot%" is "53":
- if "%clicked type%" is "LEFT":
- add 53 to {pv.ss.%uuid of player%}
- if "%clicked type%" is "RIGHT":
- if {pv.ss.%uuid of player%} is not 0:
- remove 53 from {pv.ss.%uuid of player%}
- wait 1 ticks
- loop 53 times:
- set {_pv3} to "%loop-number - 1%" parsed as an integer
- set {_pvs} to "%loop-number + {pv.ss.%uuid of player%}%" parsed as an integer
- if player has permission "Revils.pv.%{_pvs}%" or "Revils.pv.*" or "Revils.pv.admin":
- if {playervaultssetname.%uuid of player%::%{_pvs}%} is not set:
- set {playervaultssetname.%uuid of player%::%{_pvs}%} to "&c&lPv %{_pvs}%"
- if {playervaultsset.%uuid of player%::%{_pvs}%} is not set:
- set {playervaultsset.%uuid of player%::%{_pvs}%} to emerald
- 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"
- if player don't have permission "Revils.pv.%{_pvs}%" or "Revils.pv.*" or "Revils.pv.admin":
- set slot {_pv3} of player's current inventory to 166 named "&c&lpv %{_pvs}%" with lore "&7you don't have permission"
- 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"
- command /vault:
- aliases: /vaults
- trigger:
- open chest with 3 rows named "&2&lVAULTS" to player
- if player has permission "Revils.pv.1":
- 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"]
- if player does not have permission "Revils.pv.1":
- 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
- if player has permission "Revils.pv.2":
- 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"]
- if player does not have permission "Revils.pv.2":
- 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
- command /satchel [<player>]:
- trigger:
- if arg 1 is not set:
- give 1 chest named "&6&lVAULTS STACHEL &7&o(Click to open)" to the player
- if arg 1 is set:
- give 1 chest named "&6&lVAULTS STACHEL &7&o(Click to open)" to the arg 1
- on place:
- if name of player's tool is "&6&lVAULTS STACHEL &7&o(Click to open)":
- cancel event
- on right click:
- if name of player's tool is "&6&lVAULTS STACHEL &7&o(Click to open)":
- make player execute command "/vaults"
- command /afk [<text>]:
- permission: skript.afk
- trigger:
- if {afk.%player%} is true:
- set {afk.%player%} to false
- delete holo object "%player%.afk"
- broadcast "&a%player% is no longer &2AFK"
- stop
- else:
- if argument 1 is not set:
- set {afk.%player%} to true
- create holo object "&a&l%player% is AFK" with id "%player%.afk" at location 3 meters above player
- broadcast "&a%player% is now &2AFK"
- stop
- on any move:
- if {afk.%player%} is true:
- set {afk.%player%} to false
- delete holo object "%player%.afk"
- on quit:
- if {afk.%player%} is true:
- set {afk.%player%} to false
- delete holo object "%player%.afk"
- on respawn:
- if {afk.%player%} is true:
- set {afk.%player%} to false
- delete holo object "%player%.afk"
- on death:
- if {afk.%player%} is true:
- set {afk.%player%} to false
- delete holo object "%player%.afk"
- on break:
- if {afk.%player%} is true:
- set {afk.%player%} to false
- delete holo object "%player%.afk"
Add Comment
Please, Sign In to add comment