Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ______ _______ _______ _______ ___ ______ _______ _______ ______ ______
- #| _ | | || || _ || | | _ | | || _ || _ | | |
- #| | || | ___|| _ || |_| || | | | || | || |_| || | || | _ |
- #| |_||_ | |___ | |_| || || | | |_||_ | || || |_||_ | | | |
- #| __ || ___|| ___|| || | | __ | | _|| || __ || |_| |
- #| | | || |___ | | | _ || | | | | | | |_ | _ || | | || |
- #|___| |_||_______||___| |__| |__||___| |___| |_| |_______||__| |__||___| |_||______|
- # Created by ShaneBolenback
- options:
- server: YourServerHere #<-- color codes can be used as well
- prefix: [RepairCard] #<--- Use any prefix you would like, currently set to "RepairCard" in pink/purple
- version: 1.0 # Do not edit version
- # --- DO NOT EDIT BELOW THIS LINE OR YOU RISK LOOSING SUPPORT --
- on load:
- send "[&bRepairCard&r] - &2Loaded Successfully" to console
- if text from "https://pastebin.com/raw/eH2QR9wF" is not "{@version}":
- set {_version} to text from "https://pastebin.com/raw/eH2QR9wF"
- send "[&bRepairCard&r] - &2Running current version: {@version}" to console
- send "[&bRepairCard&r] - &cUpdate available, version: %{_version}%" to console
- if text from "https://pastebin.com/raw/eH2QR9wF" is "{@version}":
- send "[&bRepairCard&r] - &2Running current version: {@version}" to console
- on join:
- wait 1 second
- if player has permission "repaircard.admin":
- if text from "https://pastebin.com/raw/eH2QR9wF" is not "{@version}": # -- EDIT THIS AS WELL
- set {_version} to text from "https://pastebin.com/raw/eH2QR9wF"
- send "[&bRepairCard&r] - &2Running current version: {@version}" to player
- send "[&bRepairCard&r] - &cUpdate available, version: %{_version}%" to player
- command /repaircard [<text>]:
- description: This is used to give repair cards to players
- permission: repaircard.admin
- permission message: {@prefix} - &cYou do not have permission for this command
- trigger:
- if arg 1 is not set:
- set {_repaircard} to 1 paper named "&2Repair&aCard"
- set 1st line of lore of {_repaircard} to "This is your RepairCard"
- set 2nd line of lore of {_repaircard} to "It is a ONE TIME USE card!"
- set 3rd line of lore of {_repaircard} to "RepairCards fix ONE item"
- set 4th line of lore of {_repaircard} to "of your choice! Use WISELY!"
- give 1 of {_repaircard} to player
- stop
- if arg 1 is set:
- if arg 1 is not "version":
- set {_repaircard} to 1 paper named "&2Repair&aCard"
- set 1st line of lore of {_repaircard} to "This is your RepairCard"
- set 2nd line of lore of {_repaircard} to "It is a ONE TIME USE card!"
- set 3rd line of lore of {_repaircard} to "RepairCards fix ONE item"
- set 4th line of lore of {_repaircard} to "of your choice! Use WISELY!"
- if arg-1 parsed as a player is online:
- give 1 of {_repaircard} to arg-1 parsed as a player
- send "[&bRepairCard&r] - You have given one card to &6%arg-1%" to player
- stop
- if arg-1 parsed as a offline player is not online:
- send "[&bRepairCard&r] - &6%arg-1%&c is not online, player must be online to recieve a card" to player
- if arg 1 is "version":
- if text from "https://pastebin.com/raw/eH2QR9wF" is not "{@version}":
- set {_version} to text from "https://pastebin.com/raw/eH2QR9wF"
- send "[&bRepairCard&r] - &2Running current version: {@version}" to player
- send "[&bRepairCard&r] - &cUpdate available, version: %{_version}%" to player
- if text from "https://pastebin.com/raw/eH2QR9wF" is "{@version}":
- send "[&bRepairCard&r] - &2Running current version: {@version}" to player
- on right-click holding a paper:
- if "%lore of players's tool%" contains "This is your RepairCard":
- remove 1 of item from player's inventory
- send "&c~~~~~~~~{@server}~~~~~~~~~"
- send " {@prefix}"
- send "&aNow right click with the tool"
- send "&a that needs repairing!"
- send "&c~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
- wait 1 tick
- set {repaircard.%player%} to true
- stop
- on right-click:
- if {repaircard.%player%} is true:
- cancel event
- repair player's tool
- set {repaircard.%player%} to false
- send "[&bRepairCard&r] - Your &6%player's tool%&r has been repaired" to player
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement