Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pitchAtan2(loc1: location, loc2: location) :: number:
- set {_dx} to x-coordinate of {_loc2} - x-coordinate of {_loc1}
- set {_dy} to y-coordinate of {_loc2} - y-coordinate of {_loc1}
- set {_dz} to z-coordinate of {_loc2} - z-coordinate of {_loc1}
- set {_pitch} to 0-atan2(sqrt({_dx}^2+{_dz}^2), {_dy})
- return {_pitch}
- function yawAtan2(loc1: location, loc2: location) :: number:
- set {_dx} to x-coordinate of {_loc2} - x-coordinate of {_loc1}
- set {_dz} to z-coordinate of {_loc2} - z-coordinate of {_loc1}
- set {_yaw} to atan2({_dx}, {_dz})-90
- return {_yaw}
- function getVectorSizeFromMotionNBT(e: entity) :: number:
- set {_motionnbt} to "%tag ""Motion"" of nbt of {_e}%"
- replace "[", "]" and "d" in {_motionnbt} with ""
- set {_powers::*} to split {_motionnbt} by ","
- return sqrt({_powers::1} parsed as number^2+{_powers::2} parsed as number^2+{_powers::3} parsed as number^2)
- function getTagValues(e: entity) :: strings:
- set {_tagnbt} to "%tag ""Tags"" of nbt of {_e}%"
- replace "[""" and """]" in {_tagnbt} with ""
- return split {_tagnbt} by ""","""
- on rightclick with redstone:
- name of player's tool is "&6Booster"
- cancel event
- {kitpvp.timers.%player%::bootster} is not set
- play sound "block.anvil.place" to all players at player with volume 1 pitch 1
- apply potion regeneration 0 to player for 15 second and ambient true
- apply potion resistance 0 to player for 15 second and ambient true
- apply potion speed 1 to player for 15 second and ambient true
- set {kitpvp.timers.%player%::bootster} to 900
- on rightclick with glowstone dust:
- name of player's tool is "&cAttack Booster"
- cancel event
- {kitpvp.timers.%player%::atkbooster} is not set
- play sound "entity.blaze.ambient" to all players at player with volume 1 pitch 1
- apply potion strength 0 to player for 15 second and ambient true
- set {kitpvp.timers.%player%::atkbooster} to 900
- on rightclick with iron ingot:
- name of player's tool is "&9Defence Booster"
- cancel event
- {kitpvp.timers.%player%::defbooster} is not set
- play sound "entity.zombie.attack_iron_door" to all players at player with volume 1 pitch 1
- apply potion resistance 3 to player for 10 second and ambient true
- apply potion slowness 1 to player for 10 second and ambient true
- set {kitpvp.timers.%player%::defbooster} to 600
- every tick:
- loop all players:
- if {kitpvp.timers.%loop-player%::bootster} >= 1:
- remove 1 from {kitpvp.timers.%loop-player%::bootster}
- if loop-player's tool is redstone:
- name of loop-player's tool is "&6Booster"
- send action bar from "&6Booster&aが使用可能になるまであと%ceil({kitpvp.timers.%loop-player%::bootster}/20)%秒" to loop-player
- {kitpvp.timers.%loop-player%::bootster} is 0
- delete {kitpvp.timers.%loop-player%::bootster}
- send action bar from "&6Booster&aが使用可能になりました" to loop-player
- if {kitpvp.timers.%loop-player%::atkbooster} >= 1:
- remove 1 from {kitpvp.timers.%loop-player%::atkbooster}
- if loop-player's tool is glowstone dust:
- name of loop-player's tool is "&cAttack Booster"
- send action bar from "&cAttack Booster&aが使用可能になるまであと%ceil({kitpvp.timers.%loop-player%::atkbooster}/20)%秒" to loop-player
- {kitpvp.timers.%loop-player%::atkbooster} is 0
- delete {kitpvp.timers.%loop-player%::atkbooster}
- send action bar from "&cAttack Booster&aが使用可能になりました" to loop-player
- if {kitpvp.timers.%loop-player%::defbooster} >= 1:
- remove 1 from {kitpvp.timers.%loop-player%::defbooster}
- if loop-player's tool is iron ingot:
- name of loop-player's tool is "&9Defence Booster"
- send action bar from "&9Defence Booster&aが使用可能になるまであと%ceil({kitpvp.timers.%loop-player%::defbooster}/20)%秒" to loop-player
- {kitpvp.timers.%loop-player%::defbooster} is 0
- delete {kitpvp.timers.%loop-player%::defbooster}
- send action bar from "&9Defence Booster&aが使用可能になりました" to loop-player
- on shoot:
- shooter is a player
- projectile is an arrow
- name of shooter's tool is "&aArcher's Bow"
- set {_vector} to getVectorSizeFromMotionNBT(projectile)
- set {_crit} to tag "crit" of nbt of projectile
- loop items in shooter's inventory:
- id of loop-item is 351
- durability of loop-item is 5
- name of loop-item is "&5Arrow Effector"
- set {_mode} to line 2 of lore of loop-item
- replace "&7Mode: " in {_mode} with ""
- if {_mode} is "Normal":
- delete {_mode}
- if {_mode} is set:
- shooter's gamemode is survival or adventure
- add "{damage:0.0d}" to nbt of projectile
- loop items in shooter's inventory:
- id of loop-item is 351
- durability of loop-item is 5
- name of loop-item is "&5Arrow Effector"
- set {_item} to loop-item
- set item amount of {_item} to 1
- remove {_item} from loop-item
- stop loop
- if {_mode} is "&cFlame":
- add "{Color:14981690,Fire:32767s}" to nbt of projectile
- else if {_mode} is "&bMultiple":
- add "{Color:65535}" to nbt of projectile
- set {_shootloc1} to location 0.5 meter forwards location of shooter's head
- set yaw of {_shootloc1} to yawAtan2(location of shooter, location 5 meter forwards location 1 meter horizontal to the right location of shooter)
- set pitch of {_shootloc1} to pitchAtan2(location of shooter, location 5 meter forwards location 1 meter horizontal to the right location of shooter)
- set {_shootloc2} to location 0.5 meter forwards location of shooter's head
- set yaw of {_shootloc2} to yawAtan2(location of shooter, location 5 meter forwards location 1 meter horizontal to the left location of shooter)
- set pitch of {_shootloc2} to pitchAtan2(location of shooter, location 5 meter forwards location 1 meter horizontal to the left location of shooter)
- shoot an arrow from {_shootloc1} with speed {_vector}
- set shooter of shot projectile to shooter
- add "{Color:65535}" to nbt of shot projectile
- if {_crit} is 1:
- add "{crit:1b}" to nbt of shot projectile
- shoot an arrow from {_shootloc2} with speed {_vector}
- set shooter of shot projectile to shooter
- add "{Color:65535}" to nbt of shot projectile
- if {_crit} is 1:
- add "{crit:1b}" to nbt of shot projectile
- else if {_mode} is "&6Machine Gun":
- add "{Tags:[""machinegunarrow""],Color:16759552}" to nbt of projectile
- loop 4 times:
- wait 5 tick
- set {_shootloc} to location 0.5 meter forwards location of shooter's head
- shoot an arrow from {_shootloc} with speed {_vector}
- set shooter of shot projectile to shooter
- add "{Tags:[""machinegunarrow""],Color:16759552}" to nbt of shot projectile
- play sound "entity.arrow.shoot" to all players at shooter with volume 1 pitch 1
- if {_crit} is 1:
- add "{crit:1b}" to nbt of shot projectile
- on damage:
- projectile is an arrow
- set {_tags::*} to getTagValues(projectile)
- {_tags::*} contain "machinegunarrow"
- set damage to damage/2
- set {_damagedelay} to damage delay of victim
- set damage delay of victim to 0 tick
- wait 1 tick
- set damage delay of victim to {_damagedelay}
- on rightclick:
- id of player's tool is 351
- durability of player's tool is 5
- name of player's tool is "&5Arrow Effector"
- if line 2 of lore of player's tool is "&7Mode: Normal":
- loop items in player's inventory:
- id of loop-item is 351
- durability of loop-item is 5
- name of loop-item is "&5Arrow Effector"
- set line 2 of lore of loop-item to "&7Mode: &cFlame"
- send "&a矢の効果を&cFlame&aに設定しました"
- play sound "UI_BUTTON_CLICK" to player with volume 1 and pitch 15
- else if line 2 of lore of player's tool is "&7Mode: &cFlame":
- loop items in player's inventory:
- id of loop-item is 351
- durability of loop-item is 5
- name of loop-item is "&5Arrow Effector"
- set line 2 of lore of loop-item to "&7Mode: &bMultiple"
- send "&a矢の効果を&bMultiple&aに設定しました"
- play sound "UI_BUTTON_CLICK" to player with volume 1 and pitch 15
- else if line 2 of lore of player's tool is "&7Mode: &bMultiple":
- loop items in player's inventory:
- id of loop-item is 351
- durability of loop-item is 5
- name of loop-item is "&5Arrow Effector"
- set line 2 of lore of loop-item to "&7Mode: &6Machine Gun"
- send "&a矢の効果を&6Machine Gun&aに設定しました"
- play sound "UI_BUTTON_CLICK" to player with volume 1 and pitch 15
- else if line 2 of lore of player's tool is "&7Mode: &6Machine Gun":
- loop items in player's inventory:
- id of loop-item is 351
- durability of loop-item is 5
- name of loop-item is "&5Arrow Effector"
- set line 2 of lore of loop-item to "&7Mode: Normal"
- send "&a矢の効果を&7Normal&aに設定しました"
- play sound "UI_BUTTON_CLICK" to player with volume 1 and pitch 15
- every tick:
- loop all players:
- chance of 0.5%:
- loop items in loop-player's inventory:
- loop-item is a bow
- name of loop-item is "&aArcher's Bow"
- set {_caeamount} to 0
- loop items in loop-player's inventory:
- id of loop-item-2 is 351
- durability of loop-item-2 is 5
- name of loop-item-2 is "&5Arrow Effector"
- set {_mode} to line 2 of lore of loop-item-2
- replace "&7Mode: " in {_mode} with ""
- add item amount of loop-item-2 to {_caeamount}
- if {_caeamount} < 10:
- if {_mode} is set:
- give loop-player purple dye with nbt "{display:{Name:""&5Arrow Effector"",Lore:[""&d&oUndroppable"",""&7Mode: %{_mode}%""]},ench:[{id:0s,lvl:0s}],HideFlags:1}"
- else if {_mode} is not set:
- give loop-player purple dye with nbt "{display:{Name:""&5Arrow Effector"",Lore:[""&d&oUndroppable"",""&7Mode: Normal""]},ench:[{id:0s,lvl:0s}],HideFlags:1}"
- stop loop
- on damage:
- attacker is a player
- attacker's tool is stone sword
- name of attacker's tool is "&2Debuff Sword"
- chance of 10%:
- set {_debuffpattern} to random integer between 1 and 4
- if {_debuffpattern} is 1:
- execute console command "execute %UUID of victim% ~ ~ ~ effect @s poison 10 0"
- if {_debuffpattern} is 2:
- execute console command "execute %UUID of victim% ~ ~ ~ effect @s blindness 3 0"
- if {_debuffpattern} is 3:
- execute console command "execute %UUID of victim% ~ ~ ~ effect @s slowness 15 2"
- if {_debuffpattern} is 4:
- execute console command "execute %UUID of victim% ~ ~ ~ effect @s weakness 5 0"
- function witchRandomPotion() :: item:
- set {_potionpattern} to random integer between 1 and 52
- if {_potionpattern} is between 1 and 5:
- return potion with nbt "{Potion:""minecraft:strong_regeneration""}"
- if {_potionpattern} is between 6 and 8:
- return potion with nbt "{display:{LocName:""potion.effect.strength""},CustomPotionEffects:[{Id:5b,Amplifier:0b,Duration:300,ShowParticles:1b}],CustomPotionColor:9643043}"
- if {_potionpattern} is between 9 and 13:
- return splash potion with nbt "{Potion:""minecraft:strong_harming""}"
- if {_potionpattern} is between 14 and 18:
- return splash potion with nbt "{Potion:""minecraft:regeneration""}"
- if {_potionpattern} is between 19 and 23:
- return splash potion with nbt "{Potion:""minecraft:strong_poison""}"
- if {_potionpattern} is between 24 and 28:
- return splash potion with nbt "{display:{LocName:""potion.effect.swiftness""},CustomPotionEffects:[{Id:1b,Amplifier:1b,Duration:600,ShowParticles:1b}],CustomPotionColor:8171462}"
- if {_potionpattern} is between 29 and 31:
- return splash potion with nbt "{display:{Name:""&rSplash Potion of Nausea""},CustomPotionEffects:[{Id:9b,Amplifier:0b,Duration:300,ShowParticles:1b}],CustomPotionColor:5578058}"
- if {_potionpattern} is between 32 and 34:
- return splash potion with nbt "{display:{Name:""&rSplash Potion of Blindness""},CustomPotionEffects:[{Id:15b,Amplifier:0b,Duration:100,ShowParticles:1b}],CustomPotionColor:2039587}"
- if {_potionpattern} is between 35 and 37:
- return splash potion with nbt "{display:{Name:""&rSplash Potion of Wither""},CustomPotionEffects:[{Id:20b,Amplifier:0b,Duration:100,ShowParticles:1b}],CustomPotionColor:3484199}"
- if {_potionpattern} is between 38 and 40:
- return potion with nbt "{display:{Name:""&6Kangaroo Potion""},CustomPotionEffects:[{Id:8b,Amplifier:4b,Duration:400,ShowParticles:1b}],CustomPotionColor:2293580}"
- if {_potionpattern} is between 41 and 42:
- return splash potion with nbt "{display:{Name:""&8The Weaker""},CustomPotionEffects:[{Id:2b,Amplifier:1b,Duration:200,ShowParticles:1b},{Id:18b,Amplifier:1b,Duration:200,ShowParticles:1b}],CustomPotionColor:5332325}"
- if {_potionpattern} is 43:
- return splash potion with nbt "{display:{Name:""&4Blood Magic""},CustomPotionEffects:[{Id:20b,Amplifier:2b,Duration:100,ShowParticles:1b},{Id:7b,Amplifier:1b,Duration:20,ShowParticles:1b}],CustomPotionColor:6291456}"
- if {_potionpattern} is between 44 and 46:
- return splash potion with nbt "{display:{Name:""&0Black Potion""},CustomPotionEffects:[{Id:20b,Amplifier:1b,Duration:150,ShowParticles:1b},{Id:15b,Amplifier:0b,Duration:150,ShowParticles:1b}],CustomPotionColor:0}"
- if {_potionpattern} is between 47 and 50:
- return splash potion with nbt "{display:{Name:""&eAlchol""},CustomPotionEffects:[{Id:9b,Amplifier:0b,Duration:300,ShowParticles:1b},{Id:10b,Amplifier:0b,Duration:200,ShowParticles:1b}],CustomPotionColor:16770718}"
- if {_potionpattern} is between 51 and 52:
- return splash potion with nbt "{display:{Name:""&dUltimate Healing""},CustomPotionEffects:[{Id:10b,Amplifier:4b,Duration:300,ShowParticles:1b},{Id:21b,Amplifier:4b,Duration:300,ShowParticles:1b},{Id:22,Amplifier:4b,Duration:300,ShowParticles:1b}]}"
- on projectile hit:
- "%tag ""Potion"" of nbt of projectile%" is "{id:""minecraft:splash_potion"",Count:1b,tag:{CustomPotionColor:16770718,CustomPotionEffects:[{Ambient:0b,ShowParticles:1b,Duration:300,Id:9b,Amplifier:0b},{Ambient:0b,ShowParticles:1b,Duration:200,Id:10b,Amplifier:0b}],Potion:""minecraft:empty"",display:{Name:""§eAlchol""}},Damage:0s}"
- id of block at location of projectile is 10 or 11 or 51
- make safe explosion with power 4 at projectile
- loop blocks in radius 5 around projectile:
- loop-block is air
- chance of 30%:
- set loop-block to fire
- loop entities in radius 5 around projectile:
- ignite loop-entity for 15 second
- on rightclick with chest:
- name of player's tool is "&5Potion Box"
- cancel event
- {kitpvp.timers.%player%::potionbox} is not set
- open inventory "HOPPER" named "&5Potion Box" to player
- play sound "BLOCK_CHEST_OPEN" to player with volume 1 and pitch 5
- set {_slots::*} to 0, 1, 2, 3 and 4
- loop random integer between 1 and 5 times:
- set {_slot} to random element out of {_slots::*}
- remove {_slot} from {_slots::*}
- set slot {_slot} of player's current inventory to witchRandomPotion()
- set {kitpvp.timers.%player%::potionbox} to 900
- every tick:
- loop all players:
- {kitpvp.timers.%loop-player%::potionbox} >= 1
- remove 1 from {kitpvp.timers.%loop-player%::potionbox}
- if loop-player's tool is chest:
- name of loop-player's tool is "&5Potion Box"
- send action bar from "&5Potion Box&aが使用可能になるまであと%ceil({kitpvp.timers.%loop-player%::potionbox}/20)%秒" to loop-player
- {kitpvp.timers.%loop-player%::potionbox} is 0
- delete {kitpvp.timers.%loop-player%::potionbox}
- send action bar from "&5Potion Box&aが使用可能になりました" to loop-player
- on inventory close:
- inventory type of player's current inventory is "HOPPER"
- "%player's current inventory%" is "inventory of <none>"
- inventory name of player's current inventory is "&5Potion Box"
- play sound "BLOCK_CHEST_CLOSE" to player with volume 1 and pitch 5
- on rightclick with blaze rod:
- name of player's tool is "&cBlaze Wand"
- cancel event
- if line 2 of lore of player's tool is "&7Charged Fireballs: 3":
- play sound "ENTITY_BLAZE_SHOOT" with volume 3 and pitch 1 at player
- shoot a small fireball from player with speed 2
- add "{Tags:[""blazefireball1""]}" to nbt of shot projectile
- loop items in player's inventory:
- loop-item is blaze rod
- name of loop-item is "&cBlaze Wand"
- set line 2 of lore of loop-item to "&7Charged Fireballs: 2"
- else if line 2 of lore of player's tool is "&7Charged Fireballs: 2":
- play sound "ENTITY_BLAZE_SHOOT" with volume 3 and pitch 1 at player
- shoot a fireball from player with speed 2
- add "{Tags:[""blazefireball2""]}" to nbt of shot projectile
- loop items in player's inventory:
- loop-item is blaze rod
- name of loop-item is "&cBlaze Wand"
- set line 2 of lore of loop-item to "&7Charged Fireballs: 1"
- else if line 2 of lore of player's tool is "&7Charged Fireballs: 1":
- play sound "ENTITY_BLAZE_SHOOT" with volume 3 and pitch 1 at player
- shoot a fireball from player with speed 2
- add "{Tags:[""blazefireball3""],ExplosionPower:3}" to nbt of shot projectile
- loop items in player's inventory:
- loop-item is blaze rod
- name of loop-item is "&cBlaze Wand"
- set line 2 of lore of loop-item to "&7Charged Fireballs: 0"
- set {kitpvp.timers.%player%::blazewand} to 900
- every tick:
- loop all players:
- {kitpvp.timers.%loop-player%::blazewand} >= 1
- remove 1 from {kitpvp.timers.%loop-player%::blazewand}
- if loop-player's tool is blaze rod:
- name of loop-player's tool is "&cBlaze Wand"
- send action bar from "&cBlaze Wand&aが使用可能になるまであと%ceil({kitpvp.timers.%loop-player%::blazewand}/20)%秒" to loop-player
- {kitpvp.timers.%loop-player%::blazewand} is 0
- delete {kitpvp.timers.%loop-player%::blazewand}
- send action bar from "&cBlaze Wand&aが使用可能になりました" to loop-player
- loop items in loop-player's inventory:
- loop-item is blaze rod
- name of loop-item is "&cBlaze Wand"
- set line 2 of lore of loop-item to "&7Charged Fireballs: 3"
- on damage:
- if projectile is a small fireball:
- set {_tags::*} to getTagValues(projectile)
- {_tags::*} contain "blazefireball1"
- set damage to 2.5
- else if projectile is a large fireball:
- set {_tags::*} to getTagValues(projectile)
- {_tags::*} contain "blazefireball2"
- set damage to damage*2
- on projectile hit:
- set {_tags::*} to getTagValues(projectile)
- if {_tags::*} contain "blazefireball2":
- block at projectile is air
- set block at projectile to fire
- if {_tags::*} contain "blazefireball3":
- loop blocks in radius 3 around projectile:
- loop-block is air
- chance of 30%:
- set loop-block to fire
- on damage:
- victim is a large fireball
- set {_tags::*} to getTagValues(victim)
- {_tags::*} contain "blazefireball2" or "blazefireball3"
- cancel event
Add Comment
Please, Sign In to add comment