Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options:
- P: &3[&9&lPvP&3]
- C: &b
- H: &a
- World: "newarena"
- Spawn: "UHCspawn"
- LongshotBlocks: 50
- command /pvpwarps:
- permission: skript.warps
- trigger:
- loop 20 times:
- command "/warp pvp%loop-number% %command sender%"
- broadcast "{@P}{@C} Setting warp {@H}%loop-number%!"
- set {PvPWarp::%loop-number%} to (location at command sender)
- loop all players:
- command "/playsound note.harp %loop-player%"
- wait 2 ticks
- command /p:
- trigger:
- if {PvPArena} is set:
- if player is not in {@World}:
- message "{@P}{@C} You entered PvP!"
- heal the player
- clear inventory of player
- set {_warp} to a random integer between 1 and 20
- teleport (player) to {PvPWarp::%{_warp}%}
- give player iron sword
- give player bow
- give player 32 arrows
- set the chestplate of player to a iron chestplate
- set the leggings of player to iron leggings
- set the boots of player to iron boots
- set the helmet of player to a iron helmet
- else:
- message "{@P}{@C} You're already in the arena!"
- else:
- message "{@P}{@C} Not enabled!"
- command /pvparena:
- trigger:
- if (command sender) does not have permission "skript.pvparena":
- message "{@P}{@C} You're not allowed to do that!"
- else:
- if {PvPArena} is set:
- broadcast "{@P}{@C} Arena disabled!"
- delete {PVPArena}
- else:
- set {PvPArena} to true
- broadcast "{@P}{@C} Arena enabled!"
- on damage:
- {PvPArena} is set
- victim is in {@World}
- damage was caused by fall
- cancel the event
- on damage of player:
- {PvPArena} is set
- victim is in {@World}
- damage was caused by projectile
- set {_distance} to round distance between attacker and victim
- {_distance} is greater than {@LongshotBlocks}
- broadcast "{@P}{@C} %attacker% got a longshot of {@H}%{_distance}% blocks!"
- on death of player:
- {PvPArena} is set
- attacker is a player
- attacker is in {@World}
- message "{@P}{@C} You killed {@H}%victim%!" to attacker
- message "{@P}{@C} You were killed by {@H}%attacker%!" to victim
- give 1 golden apple to attacker
- apply regeneration 4 to attacker for 2 seconds
- apply speed 2 to attacker for 2 seconds
- give ((a random integer between 20 and 32) of arrow) to attacker
- clear the victim's inventory
- loop items in attacker's inventory:
- if loop-item is bow:
- damage was caused by projectile
- if loop-item is not enchanted:
- set name of loop-item to "Power 1"
- enchant loop-item with power 1
- set {_power} to "enchanted with power 1!"
- else if loop-item is enchanted with power 1:
- set name of loop-item to "Power 2"
- enchant loop-item with power 2
- set {_power} to "enchanted with power 2!"
- else if loop-item is enchanted with power 2:
- set name of loop-item to "Power 3"
- enchant loop-item with power 3
- set {_power} to "enchanted with power 3!"
- else if loop-item is enchanted with power 3:
- set name of loop-item to "Power 4"
- enchant loop-item with power 4
- set {_power} to "enchanted with power 4!"
- else if loop-item is enchanted with power 4:
- set name of loop-item to "Power 5"
- enchant loop-item with power 5
- set {_power} to "enchanted with power 5!"
- else:
- set {_power} to "maxed out!"
- message "{@P}{@C} Your bow is %{_power}%" to attacker
- if loop-item is iron sword:
- damage was caused by attack
- if loop-item is not enchanted:
- set name of loop-item to "Sharpness 1"
- enchant loop-item with sharpness 1
- set {_sharpness} to "enchanted with sharpness 1!"
- else if loop-item is enchanted with sharpness 1:
- set name of loop-item to "Sharpness 2"
- enchant loop-item with sharpness 2
- set {_sharpness} to "enchanted with sharpness 2!"
- else if loop-item is enchanted with sharpness 2:
- set name of loop-item to "Sharpness 3"
- enchant loop-item with sharpness 3
- set {_sharpness} to "enchanted with sharpness 3!"
- else if loop-item is enchanted with sharpness 3:
- set name of loop-item to "Sharpness 4"
- enchant loop-item with sharpness 4
- set {_sharpness} to "enchanted with sharpness 4!"
- else if loop-item is enchanted with sharpness 4:
- set name of loop-item to "Sharpness 5"
- enchant loop-item with sharpness 5
- set {_sharpness} to "enchanted with sharpness 5!"
- else:
- set {_sharpness} to "maxed out!"
- message "{@P}{@C} Your sword is {@H}%{_sharpness}%" to attacker
- on death of player:
- player is in {@World} or {@Spawn}
- set death message to ""
- on hunger meter change:
- {PvPArena} is set
- set player's hunger meter to 10
- on quit:
- event-player is in {@World}
- kill event-player
- on projectile hit:
- event-projectile is in world "{@World}":
- wait 5 seconds
- delete the arrow
- command /autopvp <text>:
- trigger:
- if arg 1 is "on":
- set {autopvp.%command sender%} to true
- if arg 1 is "off":
- set {autopvp.%command sender%} to false
- on respawn:
- if {Arena} is true:
- {autopvp.%player%} is true:
- wait 1 second
- make player execute "/p"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement