Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Mar 30th, 2020 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. options:
  2.     job_price: 100 #jobの価格
  3.  
  4. #未購入のjob名は&c
  5. #購入済みのjob名は&a AND loreにUnlockedと書く
  6.  
  7. command /jobshop:
  8.     trigger:
  9.         open chest with 3 row named "&6Job SHOP" to player
  10.         set slot 0 of player's current inventory to glowing stone pickaxe named "&cMiner"
  11.         set slot 1 of player's current inventory to bow named "&cArcher"
  12.         set slot 2 of player's current inventory to experience bottle named "&cEnchanter"
  13.         set slot 3 of player's current inventory to fire charge named "&6Pyro"
  14.         set slot 4 of player's current inventory to feather named "&6Acrobat"
  15.         set slot 5 of player's current inventory to fishing rod named "&6Scout"
  16.         set slot 6 of player's current inventory to record cat named "&6Swapper"
  17.         set slot 7 of player's current inventory to brick block named "&6Builder"
  18.         #set slot (スロット) of player's current inventory to (表示アイテム) named "(職業名)"
  19.         if {buy_job.%player%.miner} is true:
  20.             set slot 0 of player's current inventory to glowing stone pickaxe named "&6Miner" with lore "&aUnlocked"
  21.         if {buy_job.%player%.archer} is true:
  22.             set slot 1 of player's current inventory to bow named "&6Archer" with lore "&aUnlocked"
  23.         if {buy_job.%player%.enchanter} is true:
  24.             set slot 2 of player's current inventory to experience bottle named "&6Enchanter" with lore "&aUnlocked"
  25.         if {buy_job.%player%.pyro} is true:
  26.             set slot 3 of player's current inventory to fire charge named "&6Pyro" with lore "&aUnlocked"
  27.         if {buy_job.%player%.actobat} is true:
  28.             set slot 4 of player's current inventory to feather named "&6Acrobat" with lore "&aUnlocked"
  29.         if {buy_job.%player%.scout} is true:
  30.             set slot 5 of player's current inventory to fishing rod named "&6Scout" with lore "&aUnlocked"
  31.         if {buy_job.%player%.swapper} is true:
  32.             set slot 6 of player's current inventory to record cat named "&6Swapper" with lore "&aUnlocked"
  33.         if {buy_job.%player%.builder} is true:
  34.             set slot 7 of player's current inventory to brick block named "&6Builder" with lore "&aUnlocked"
  35.         #上をまねる
  36.  
  37. #ここは弄らなくてもOK
  38. on inventory click:
  39.     name of player's current inventory contain "Job SHOP"
  40.     clicked item is set
  41.     cancel event
  42.     if lore of clicked item contain "Unlocked": #loreにunlockedという文字が含まれていたら
  43.         stop #何もしない
  44.     if {xp.%player%} is not set: #XPの変数がセットされてなかったら
  45.         set {xp.%player%} to 0 #XPの変数を0にセットする
  46.     #購入処理
  47.     #クリックしたアイテム、色なしの小文字のjob名を入れる (変数用) uncolored、色なし in lower case、全部小文字にする
  48.     set {_job_name_lower} to uncolored name of clicked item in lower case
  49.     #クリックしたアイテムの名前 #(broadcast用)
  50.     set {_job_name_normal} to name of clicked item
  51.     if {xp.%player%} < {@job_price}:
  52.         send "&c%{@job_price} - {xp.%player%}%XP足りません!"
  53.         stop
  54.     set {buy_job.%player%.%{_job_name_lower}%} to true
  55.     remove {@job_price} from {xp.%player%}
  56.     broadcast "&e%player%&aさんが&6%{_job_name_normal}%&aを開放しました!"
  57.     #共通処理
  58.     close player's inventory
  59.     execute player command "/jobshop"
  60.  
  61. #職業チェンジのポータル
  62. on portal:
  63.     cancel event
  64.     if {red::*} contain player:
  65.         teleport player to {map_setting_spawn_red::1}
  66.     if {blue::*} contain player:
  67.         teleport player to {map_setting_spawn_blue::1}
  68.     wait 10 tick
  69.     open chest with 3 row named "&6&lSelect Job" to player
  70.     set slot 0 of player's current inventory to crafting table named "&6Civilian"
  71.     set slot 1 of player's current inventory to glowing stone pickaxe named "&6Miner"
  72.     set slot 2 of player's current inventory to bow named "&6Archer"
  73.     set slot 3 of player's current inventory to experience bottle named "&6Enchanter"
  74.     set slot 4 of player's current inventory to fire charge named "&6Pyro"
  75.     set slot 5 of player's current inventory to feather named "&6Acrobat"
  76.     set slot 6 of player's current inventory to fishing rod named "&6Scout"
  77.     set slot 7 of player's current inventory to record cat named "&6Swapper"
  78.     set slot 8 of player's current inventory to brick block named "&6Builder"
  79.     #set slot (スロット) of player's current inventory to (表示アイテム) named "(職業名)"
  80.  
  81. #何もしなくてOK
  82. #職業選択
  83. on inventory click:
  84.     name of player's current inventory contain "Select Job"
  85.     clicked item is set
  86.     cancel event
  87.     if {all_free_job} is true: #もし全職業開放をtrueにしてたら
  88.         command "/givejobitem %player% %uncolored name of clicked item in lower case%"
  89.         close player's inventory
  90.         stop
  91.     if {buy_job.%player%.%uncolored name of clicked item in lower case%} is not true: #クリックした名前の職業を持ってなかったら
  92.         stop #何もしない
  93.     command "/givejobitem %player% %uncolored name of clicked item in lower case%"
  94.     #引数はアイテムの名前 in lower caseは全部小文字にするやつ uncoloredは色消す奴 /givejobitem siso_AZ &6Civilianとかになるから
  95.     close player's inventory
  96.  
  97. #職業ごとにアイテムを
  98. command /givejobitem [<player>] [<text>]:
  99.     permission: admin
  100.     trigger:
  101.         set {job.%arg 1%} to arg-2
  102.         set {defaultjob.%player%} to false
  103.         remove_job_item(arg 1)
  104.         #Armor
  105.         if {red::*} contain arg 1:
  106.             set {_item} to leather helmet
  107.             dye {_item} red
  108.             set helmet of arg 1 to {_item} named "&cRedArmor" with lore "&6Soulbound"
  109.             set {_item} to leather chestplate
  110.             dye {_item} red
  111.             set chestplate of arg 1 to {_item} named "&cRedArmor" with lore "&6Soulbound"
  112.             set {_item} to leather leggings
  113.             dye {_item} red
  114.             set leggings of arg 1 to {_item} named "&cRedArmor" with lore "&6Soulbound"
  115.             set {_item} to leather boots
  116.             dye {_item} red
  117.             set boots of arg 1 to {_item} named "&cRedArmor" with lore "&6Soulbound"
  118.         if {blue::*} contain arg 1:
  119.             set {_item} to leather helmet
  120.             dye {_item} blue
  121.             set helmet of arg 1 to {_item} named "&bBlueArmor" with lore "&6Soulbound"
  122.             set {_item} to leather chestplate
  123.             dye {_item} blue
  124.             set chestplate of arg 1 to {_item} named "&bBlueArmor" with lore "&6Soulbound"
  125.             set {_item} to leather leggings
  126.             dye {_item} blue
  127.             set leggings of arg 1 to {_item} named "&bBlueArmor" with lore "&6Soulbound"
  128.             set {_item} to leather boots
  129.             dye {_item} blue
  130.             set boots of arg 1 to {_item} named "&bBlueArmor" with lore "&6Soulbound"
  131.         #Kit Item
  132.         if {job.%arg 1%} is set:
  133.             if {job.%arg 1%} is "civilian":
  134.                 give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
  135.                 give arg-1 stone pickaxe named "&6Stone Pickaxe" with lore "&6Soulbound"
  136.                 give arg-1 stone axe named "&6Stone Axe" with lore "&6Soulbound"
  137.                 give arg-1 stone shovel named "&6Stone Shovel" with lore "&6Soulbound"
  138.                 give arg-1 book named "&6Craft Book" with lore "&6Soulbound"
  139.             if {job.%arg 1%} is "miner":
  140.                 give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
  141.                 set {_Miner} to stone pickaxe
  142.                 enchant {_Miner} with efficiency 1
  143.                 give arg-1 {_Miner} named "&6Miner Pickaxe" with lore "&6Soulbound"
  144.                 give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
  145.                 give arg-1 8 coal
  146.                 give arg-1 furnace
  147.             if {job.%arg 1%} is "archer":
  148.                 give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
  149.                 give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
  150.                 give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
  151.                 give arg-1 wooden shovel named "&6Wooden Shovel" with lore "&6Soulbound"
  152.                 give arg-1 book named "&eArrow Drop &aREADY" with lore "&6Soulbound"
  153.                 give arg-1 bow named "&6Bow" with lore "&6Soulbound"
  154.                 give arg-1 16 arrow named "&6Arrow" with lore "&6Soulbound"
  155.             if {job.%arg 1%} is "enchanter":
  156.                 give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
  157.                 give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
  158.                 give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
  159.                 give arg-1 experience bottle named "&aLevel Boost &aREADY" with lore "&6Soulbound"
  160.             if {job.%arg 1%} is "pyro":
  161.                 give arg-1 stone sword named "&6Stone Sword" with lore "&6Soulbound"
  162.                 give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
  163.                 give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
  164.                 give arg-1 fire charge named "&cPyro &aREADY" with lore "&6Soulbound"
  165.             if {job.%arg 1%} is "acrobat":
  166.                 give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
  167.                 give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
  168.                 give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
  169.                 give arg-1 bow named "&6Bow" with lore "&6Soulbound"
  170.                 give arg-1 12 arrow named "&6Arrow" with lore "&6Soulbound"
  171.             if {job.%arg 1%} is "scout":
  172.                 give arg-1 golden sword named "&6Gold Sword" with lore "&6Soulbound"
  173.                 give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
  174.                 give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
  175.                 give arg-1 fishing rod named "&6Grapple" with lore "&6Soulbound"
  176.             if {job.%arg 1%} is "swapper":
  177.                 give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
  178.                 give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
  179.                 give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
  180.                 give arg-1 record cat named "&6SwapRecord &aREADY" with lore "&6Soulbound"
  181.             if {job.%arg 1%} is "builder":
  182.                 give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
  183.                 give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
  184.                 give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
  185.                 give arg-1 wooden shovel named "&6Wooden shovel" with lore "&6Soulbound"
  186.                 give arg-1 book named "&6Blocks &6READY" with lore "&6Soulbound"
  187.             #上をまねる
  188.  
  189. #職業固有のアイテムを消去
  190. function remove_job_item(p: player):
  191.     loop all items in {_p}'s inventory:
  192.         if lore of loop-item contain "&6Soulbound":
  193.             remove loop-item from {_p}'s inventory
  194.  
  195. #ここからKitの効果とか
  196. #swapper
  197. on rightclick holding record cat:
  198.     set {_target_location} to location of target entity
  199.     set {_player_location} to location of player
  200.     teleport target entity to {_player_location}
  201.     teleport player to {_target_location}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top