Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /killeffect [<text>]:
- trigger:
- if player is not op:
- send "&c権限ない"
- else if player is op:
- if arg-1 is not set:
- send "&cUsage: /killeffect <blood|greenstar|flame|fireworks|finalsmash|reset>"
- else if arg-1 is not "blood" or "greenstar" or "flame" or "fireworks" or "finalsmash" or "reset":
- send "&cUsage: /killeffect <blood|greenstar|flame|fireworks|finalsmash|reset>"
- else:
- if arg-1 is "reset":
- delete {killeffect.%UUID of player%}
- send "&7あなたのキルエフェクトをリセットしました"
- else:
- set {killeffect.%UUID of player%} to arg-1 in lower case
- send "&7あなたのキルエフェクトを%arg-1 in lower case%に設定しました"
- function randomColor() :: integer:
- set {_colorpattern} to random integer between 1 and 8
- if {_colorpattern} is 1:
- set {_r} to 255
- set {_g} to random integer between 0 and 255
- set {_b} to 0
- if {_colorpattern} is 2:
- set {_r} to 0
- set {_g} to 255
- set {_b} to random integer between 0 and 255
- if {_colorpattern} is 3:
- set {_r} to random integer between 0 and 255
- set {_g} to 0
- set {_b} to 255
- if {_colorpattern} is 4:
- set {_r} to random integer between 0 and 255
- set {_g} to 255
- set {_b} to 0
- if {_colorpattern} is 5:
- set {_r} to 0
- set {_g} to random integer between 0 and 255
- set {_b} to 255
- if {_colorpattern} is 6:
- set {_r} to 255
- set {_g} to 0
- set {_b} to random integer between 0 and 255
- if {_colorpattern} is 7:
- set {_r} to 0
- set {_g} to 0
- set {_b} to 0
- if {_colorpattern} is 8:
- set {_r} to 255
- set {_g} to 255
- set {_b} to 255
- return "%{_r}*65536+{_g}*256+{_b}%" parsed as integer
- on damage:
- damage was caused by entity explosion
- "%attacker%" is "firework rocket"
- set {_tags::*} to getTagValues(attacker)
- {_tags::*} contain "nodamage"
- cancel event
- on death of player:
- attacker is a player
- victim is not attacker
- {killeffect.%UUID of attacker%} is set
- if {killeffect.%UUID of attacker%} is "blood":
- execute console command "execute %victim% ~ ~ ~ particle blockdust ~ ~1 ~ 0.3 0.5 0.3 0.05 500 force @a 152"
- loop 5 times:
- execute console command "execute %victim% ~ ~ ~ playsound minecraft:block.stone.break master @a ~ ~ ~ 2 1.2"
- else if {killeffect.%UUID of attacker%} is "greenstar":
- execute console command "execute %victim% ~ ~ ~ particle happyVillager ~ ~1 ~ 0.3 0.5 0.3 0 300 force"
- execute console command "execute %victim% ~ ~ ~ playsound minecraft:entity.villager.yes master @a ~ ~ ~ 2"
- else if {killeffect.%UUID of attacker%} is "flame":
- execute console command "execute %victim% ~ ~ ~ particle flame ~ ~1 ~ 0.3 0.5 0.3 0.1 300 force"
- execute console command "execute %victim% ~ ~ ~ playsound minecraft:block.fire.extinguish master @a ~ ~ ~ 2"
- else if {killeffect.%UUID of attacker%} is "fireworks":
- spawn a firework rocket at location 1.5 meter above victim
- add "{Tags:[""nodamage""],LifeTime:1,FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:0,Colors:[I;%randomColor()%]}]}}}}" to nbt of last spawned firework rocket
- loop 5 times:
- execute console command "execute %victim% ~ ~ ~ playsound minecraft:block.stone.break master @a ~ ~ ~ 2 1.2"
- else if {killeffect.%UUID of attacker%} is "finalsmash":
- set {_loc} to location of victim
- set {_yaw} to yaw of victim
- set {_loc2} to {_loc}
- set yaw of {_loc2} to yaw of attacker
- set pitch of {_loc2} to random number between -10 and -30
- spawn an armor stand at {_loc}
- add "{NoGravity:1b,NoBasePlate:1b,Marker:1b,ArmorItems:[{id:""minecraft:leather_boots"",Count:1b,Damage:0s},{id:""minecraft:leather_leggings"",Count:1b,Damage:0s},{id:""minecraft:leather_chestplate"",Count:1b,Damage:0s},{id:""minecraft:skull"",Count:1b,Damage:3s,tag:{SkullOwner:%victim%}}]}" to nbt of last spawned armor stand
- set {_armorstand} to last spawned armor stand
- set {_armorstanduuid} to UUID of {_armorstand}
- play sound "entity.wither.shoot" to all players at {_loc} with volume 2 pitch 1
- loop 70 times:
- set {_distance} to loop-number/1.5
- add 10 to {_yaw}
- set {_loc} to location {_distance} meter forwards {_loc2}
- set yaw of {_loc} to {_yaw}
- teleport {_armorstand} to {_loc}
- execute console command "execute %{_armorstanduuid}% ~ ~ ~ particle cloud ~ ~ ~ 0 0 0 0 1"
- wait 1 tick
- spawn a firework rocket at {_loc}
- add "{Tags:[""nodamage""],LifeTime:1,FireworksItem:{id:fireworks,Count:1,tag:{Fireworks:{Explosions:[{Type:1,Trail:1,Colors:[I;16711680]}]}}}}" to nbt of last spawned firework rocket
- kill {_armorstand}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement