Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /weapon <text> <text> <integer> <number> <number>:
- permission: weapon.admin
- permission message: &cYou do not have permission to use this command.
- usage: /weapon <武器名> <ポーションエフェクト> <ポーションレベル> <秒数> <確率>
- trigger:
- set {_potion} to arg-2 parsed as potioneffecttype
- if {_potion} is not set:
- send "&c無効なポーションエフェクト名です"
- else if arg-3 > 127:
- send "&cポーションレベルは0~127の整数を入力してください"
- else if arg-3 < 0:
- send "&cポーションレベルは0~127の整数を入力してください"
- else if arg-5 > 100:
- send "&c確率は0~100の数値を入力してください"
- else if arg-5 < 0:
- send "&c確率は0~100の数値を入力してください"
- else if player's tool is air:
- send "&cメインハンドにアイテムを持ってください"
- else:
- set name of player's tool to colored arg-1
- set {_lorelines} to size of lore of player's tool
- set {_lore} to "potion: %arg-2 in lower case% %arg-3% %arg-4% %arg-5%"
- set {_splits::*} to split {_lore} by ""
- set {_num} to size of {_splits::*}
- delete {_splits::%{_num}%}
- set {_lore} to "§%join {_splits::*} by ""§""%"
- set line {_lorelines}+1 of lore of player's tool to {_lore}
- send "&aポーション効果を付与しました"
- on damage:
- attacker is a player
- set {_lore::*} to lore of attacker's tool
- loop {_lore::*}:
- first 16 characters of loop-value is "§p§o§t§i§o§n§:§ "
- set {_str} to loop-value
- replace "§" in {_str} with ""
- set {_splits::*} to split {_str} by " "
- delete {_splits::1}
- set {_potion} to {_splits::2} parsed as potioneffecttype
- set {_tier} to {_splits::3} parsed as integer
- set {_seconds} to "%{_splits::4}% seconds" parsed as timespan
- set {_chance} to {_splits::5} parsed as number
- chance of {_chance}%:
- apply {_potion} of tier {_tier} to attacker for {_seconds} and ambient true hide particle false
Advertisement
Add Comment
Please, Sign In to add comment