Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /addrecipe <boolean> <text>:
- permission: skript.addrecipe
- aliases: /rcp+
- trigger:
- set {_i::0} to arg 2 parsed as item
- set {_slot} to -1
- loop all items in player's inventory:
- add 1 to {_slot}
- set {_i::%{_slot}%} to type of loop-item
- {_slot} is 8
- exit loop
- add 1 to {recipe-quant}
- set {recipe::%{recipe-quant}%::*} to {_i::*}
- if arg 1 is true:
- register new shapeless recipe for {_i::0} using {_i::1}, {_i::2}, {_i::3}, {_i::4}, {_i::5}, {_i::6}, {_i::7}, {_i::8}, {_i::9}
- message "&aID %{recipe-quant}% に不定形レシピを追加しました"
- set {recipe::%{recipe-quant}%::shapeless} to true
- stop
- register new shaped recipe for {_i::0} using {_i::1}, {_i::2}, {_i::3}, {_i::4}, {_i::5}, {_i::6}, {_i::7}, {_i::8}, {_i::9}
- message "&aID %{recipe-quant}% にレシピを追加しました"
- command /recipelist [<integer>]:
- permission: skript.recipelist
- aliases: /rcpl
- trigger:
- set {_range-b} to 1
- set {_range-e} to 9
- set {_page} to floor((size of {_recipe::*} - 1)/9) + 1
- if arg 1 is set:
- set {_range-e} to arg 1 * 9
- set {_range-b} to {_range-e} - 8
- message "&e登録済みレシピのリスト(Page %arg 1%/%{_page}%)"
- loop {recipe::*}:
- add 1 to {_loop-number}
- if {_range-b} > {_loop-number}:
- continue loop
- if {recipe::%{recipe-quant}%::shapeless} is true:
- message "&eID %loop-index%&7: &6[Sharpless] &a%{recipe::%loop-index%::0}% &7... &f%{recipe::%loop-index%::1}%, %{recipe::%loop-index%::2}%, %{recipe::%loop-index%::3}%, %{recipe::%loop-index%::4}%, %{recipe::%loop-index%::5}%, %{recipe::%loop-index%::6}%, %{recipe::%loop-index%::7}%, %{recipe::%loop-index%::8}%, %{recipe::%loop-index%::9}%"
- else:
- message "&eID %loop-index%&7: &a%{recipe::%loop-index%::0}% &7... &f%{recipe::%loop-index%::1}%, %{recipe::%loop-index%::2}%, %{recipe::%loop-index%::3}%, %{recipe::%loop-index%::4}%, %{recipe::%loop-index%::5}%, %{recipe::%loop-index%::6}%, %{recipe::%loop-index%::7}%, %{recipe::%loop-index%::8}%, %{recipe::%loop-index%::9}%"
- if {_range-e} < {_loop-number}:
- exit loop
- command /removerecipe <integer>:
- permission: skript.removerecipe
- aliases: /rcp-
- trigger:
- set {_i::*} to {recipe::%arg 1%::*}
- register new shaped recipe for air using {_i::1}, {_i::2}, {_i::3}, {_i::4}, {_i::5}, {_i::6}, {_i::7}, {_i::8}, {_i::9}
- clear {recipe::%arg 1%::*}
- clear {recipe::%arg 1%}
- message "&aID %{recipe-quant}% のレシピを削除しました"
Add Comment
Please, Sign In to add comment