Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- job_price: 100 #jobの価格
- #未購入のjob名は&c
- #購入済みのjob名は&a AND loreにUnlockedと書く
- command /jobshop:
- trigger:
- open chest with 3 row named "&6Job SHOP" to player
- set slot 0 of player's current inventory to glowing stone pickaxe named "&cMiner"
- set slot 1 of player's current inventory to bow named "&cArcher"
- set slot 2 of player's current inventory to experience bottle named "&cEnchanter"
- set slot 3 of player's current inventory to fire charge named "&6Pyro"
- set slot 4 of player's current inventory to feather named "&6Acrobat"
- set slot 5 of player's current inventory to fishing rod named "&6Scout"
- set slot 6 of player's current inventory to record cat named "&6Swapper"
- set slot 7 of player's current inventory to brick block named "&6Builder"
- #set slot (スロット) of player's current inventory to (表示アイテム) named "(職業名)"
- if {buy_job.%player%.miner} is true:
- set slot 0 of player's current inventory to glowing stone pickaxe named "&6Miner" with lore "&aUnlocked"
- if {buy_job.%player%.archer} is true:
- set slot 1 of player's current inventory to bow named "&6Archer" with lore "&aUnlocked"
- if {buy_job.%player%.enchanter} is true:
- set slot 2 of player's current inventory to experience bottle named "&6Enchanter" with lore "&aUnlocked"
- if {buy_job.%player%.pyro} is true:
- set slot 3 of player's current inventory to fire charge named "&6Pyro" with lore "&aUnlocked"
- if {buy_job.%player%.actobat} is true:
- set slot 4 of player's current inventory to feather named "&6Acrobat" with lore "&aUnlocked"
- if {buy_job.%player%.scout} is true:
- set slot 5 of player's current inventory to fishing rod named "&6Scout" with lore "&aUnlocked"
- if {buy_job.%player%.swapper} is true:
- set slot 6 of player's current inventory to record cat named "&6Swapper" with lore "&aUnlocked"
- if {buy_job.%player%.builder} is true:
- set slot 7 of player's current inventory to brick block named "&6Builder" with lore "&aUnlocked"
- #上をまねる
- #ここは弄らなくてもOK
- on inventory click:
- name of player's current inventory contain "Job SHOP"
- clicked item is set
- cancel event
- if lore of clicked item contain "Unlocked": #loreにunlockedという文字が含まれていたら
- stop #何もしない
- if {xp.%player%} is not set: #XPの変数がセットされてなかったら
- set {xp.%player%} to 0 #XPの変数を0にセットする
- #購入処理
- #クリックしたアイテム、色なしの小文字のjob名を入れる (変数用) uncolored、色なし in lower case、全部小文字にする
- set {_job_name_lower} to uncolored name of clicked item in lower case
- #クリックしたアイテムの名前 #(broadcast用)
- set {_job_name_normal} to name of clicked item
- if {xp.%player%} < {@job_price}:
- send "&c%{@job_price} - {xp.%player%}%XP足りません!"
- stop
- set {buy_job.%player%.%{_job_name_lower}%} to true
- remove {@job_price} from {xp.%player%}
- broadcast "&e%player%&aさんが&6%{_job_name_normal}%&aを開放しました!"
- #共通処理
- close player's inventory
- execute player command "/jobshop"
- #職業チェンジのポータル
- on portal:
- cancel event
- if {red::*} contain player:
- teleport player to {map_setting_spawn_red::1}
- if {blue::*} contain player:
- teleport player to {map_setting_spawn_blue::1}
- wait 10 tick
- open chest with 3 row named "&6&lSelect Job" to player
- set slot 0 of player's current inventory to crafting table named "&6Civilian"
- set slot 1 of player's current inventory to glowing stone pickaxe named "&6Miner"
- set slot 2 of player's current inventory to bow named "&6Archer"
- set slot 3 of player's current inventory to experience bottle named "&6Enchanter"
- set slot 4 of player's current inventory to fire charge named "&6Pyro"
- set slot 5 of player's current inventory to feather named "&6Acrobat"
- set slot 6 of player's current inventory to fishing rod named "&6Scout"
- set slot 7 of player's current inventory to record cat named "&6Swapper"
- set slot 8 of player's current inventory to brick block named "&6Builder"
- #set slot (スロット) of player's current inventory to (表示アイテム) named "(職業名)"
- #何もしなくてOK
- #職業選択
- on inventory click:
- name of player's current inventory contain "Select Job"
- clicked item is set
- cancel event
- if {all_free_job} is true: #もし全職業開放をtrueにしてたら
- command "/givejobitem %player% %uncolored name of clicked item in lower case%"
- close player's inventory
- stop
- if {buy_job.%player%.%uncolored name of clicked item in lower case%} is not true: #クリックした名前の職業を持ってなかったら
- stop #何もしない
- command "/givejobitem %player% %uncolored name of clicked item in lower case%"
- #引数はアイテムの名前 in lower caseは全部小文字にするやつ uncoloredは色消す奴 /givejobitem siso_AZ &6Civilianとかになるから
- close player's inventory
- #職業ごとにアイテムを
- command /givejobitem [<player>] [<text>]:
- permission: admin
- trigger:
- set {job.%arg 1%} to arg-2
- set {defaultjob.%player%} to false
- remove_job_item(arg 1)
- #Armor
- if {red::*} contain arg 1:
- set {_item} to leather helmet
- dye {_item} red
- set helmet of arg 1 to {_item} named "&cRedArmor" with lore "&6Soulbound"
- set {_item} to leather chestplate
- dye {_item} red
- set chestplate of arg 1 to {_item} named "&cRedArmor" with lore "&6Soulbound"
- set {_item} to leather leggings
- dye {_item} red
- set leggings of arg 1 to {_item} named "&cRedArmor" with lore "&6Soulbound"
- set {_item} to leather boots
- dye {_item} red
- set boots of arg 1 to {_item} named "&cRedArmor" with lore "&6Soulbound"
- if {blue::*} contain arg 1:
- set {_item} to leather helmet
- dye {_item} blue
- set helmet of arg 1 to {_item} named "&bBlueArmor" with lore "&6Soulbound"
- set {_item} to leather chestplate
- dye {_item} blue
- set chestplate of arg 1 to {_item} named "&bBlueArmor" with lore "&6Soulbound"
- set {_item} to leather leggings
- dye {_item} blue
- set leggings of arg 1 to {_item} named "&bBlueArmor" with lore "&6Soulbound"
- set {_item} to leather boots
- dye {_item} blue
- set boots of arg 1 to {_item} named "&bBlueArmor" with lore "&6Soulbound"
- #Kit Item
- if {job.%arg 1%} is set:
- if {job.%arg 1%} is "civilian":
- give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
- give arg-1 stone pickaxe named "&6Stone Pickaxe" with lore "&6Soulbound"
- give arg-1 stone axe named "&6Stone Axe" with lore "&6Soulbound"
- give arg-1 stone shovel named "&6Stone Shovel" with lore "&6Soulbound"
- give arg-1 book named "&6Craft Book" with lore "&6Soulbound"
- if {job.%arg 1%} is "miner":
- give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
- set {_Miner} to stone pickaxe
- enchant {_Miner} with efficiency 1
- give arg-1 {_Miner} named "&6Miner Pickaxe" with lore "&6Soulbound"
- give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
- give arg-1 8 coal
- give arg-1 furnace
- if {job.%arg 1%} is "archer":
- give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
- give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
- give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
- give arg-1 wooden shovel named "&6Wooden Shovel" with lore "&6Soulbound"
- give arg-1 book named "&eArrow Drop &aREADY" with lore "&6Soulbound"
- give arg-1 bow named "&6Bow" with lore "&6Soulbound"
- give arg-1 16 arrow named "&6Arrow" with lore "&6Soulbound"
- if {job.%arg 1%} is "enchanter":
- give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
- give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
- give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
- give arg-1 experience bottle named "&aLevel Boost &aREADY" with lore "&6Soulbound"
- if {job.%arg 1%} is "pyro":
- give arg-1 stone sword named "&6Stone Sword" with lore "&6Soulbound"
- give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
- give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
- give arg-1 fire charge named "&cPyro &aREADY" with lore "&6Soulbound"
- if {job.%arg 1%} is "acrobat":
- give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
- give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
- give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
- give arg-1 bow named "&6Bow" with lore "&6Soulbound"
- give arg-1 12 arrow named "&6Arrow" with lore "&6Soulbound"
- if {job.%arg 1%} is "scout":
- give arg-1 golden sword named "&6Gold Sword" with lore "&6Soulbound"
- give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
- give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
- give arg-1 fishing rod named "&6Grapple" with lore "&6Soulbound"
- if {job.%arg 1%} is "swapper":
- give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
- give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
- give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
- give arg-1 record cat named "&6SwapRecord &aREADY" with lore "&6Soulbound"
- if {job.%arg 1%} is "builder":
- give arg-1 wooden sword named "&6Wooden Sword" with lore "&6Soulbound"
- give arg-1 wooden pickaxe named "&6Wooden Pickaxe" with lore "&6Soulbound"
- give arg-1 wooden axe named "&6Wooden Axe" with lore "&6Soulbound"
- give arg-1 wooden shovel named "&6Wooden shovel" with lore "&6Soulbound"
- give arg-1 book named "&6Blocks &6READY" with lore "&6Soulbound"
- #上をまねる
- #職業固有のアイテムを消去
- function remove_job_item(p: player):
- loop all items in {_p}'s inventory:
- if lore of loop-item contain "&6Soulbound":
- remove loop-item from {_p}'s inventory
- #ここからKitの効果とか
- #swapper
- on rightclick holding record cat:
- set {_target_location} to location of target entity
- set {_player_location} to location of player
- teleport target entity to {_player_location}
- teleport player to {_target_location}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement