Jump to content

steveshatt

Member
  • Posts

    6
  • Joined

  • Last visited

Everything posted by steveshatt

  1. Hey everyone, this script is actually not made by me, but by TuSKe Enjoyer. Same thing as block overlay skript, but it will outline the hitbox of entities with particles. Requirements: - SkBee -Skript-Reflect import: org.bukkit.World function displayEntityHitBox(player: player, entity: entity, color: color = white): set {_boundingBox} to {_entity}.getBoundingBox() set {_minX} to {_boundingBox}.getMinX() set {_minY} to {_boundingBox}.getMinY() set {_minZ} to {_boundingBox}.getMinZ() set {_maxX} to {_boundingBox}.getMaxX() set {_maxZ} to {_boundingBox}.getMaxZ() set {_height} to {_boundingBox}.getHeight() set {_point::1} to location({_minX}, {_minY}, {_minZ}, ({_player}'s world)) set {_point::2} to location({_maxX}, {_minY}, {_minZ}, ({_player}'s world)) set {_point::3} to location({_maxX}, {_minY}, {_maxZ}, ({_player}'s world)) set {_point::4} to location({_minX}, {_minY}, {_maxZ}, ({_player}'s world)) loop 2 times: loop 4 times: draw 1 of dust using dustOption({_color}, 0.5) at getLineLocation(({_point::%loop-integer-2%} ~ {_offset}), (({_point::%loop-integer-2 + 1%} ? {_point::1}) ~ {_offset})) to {_player} if loop-integer-1 is 1: draw 1 of dust using dustOption({_color}, 0.5) at getLineLocation(({_point::%loop-integer-2%}), ({_point::%loop-integer-2%} ~ vector(0,{_height},0))) to {_player} draw 1 of dust using dustOption(red, 0.5) at getLineLocation(({_point::%loop-integer-2%} ~ vector(0,((y-coord of location of {_entity}'s eyes) - {_minY}),0)), (({_point::%loop-integer-2 + 1%} ? {_point::1}) ~ vector(0,((y-coord of location of {_entity}'s eyes) - {_minY}),0))) to {_player} set {_offset} to vector(0,{_height},0) draw 1 of dust using dustOption(blue, 0.5) at getLineLocation((location of {_entity}'s eyes), (location 2 meters infront of {_entity}'s eyes), 20) to {_player} function getLineLocation(location1: location, location2: location, density: integer=10) :: locations: set {_vector} to vector between {_location1} and {_location2} add {_location1} to {_return::*} loop {_density} times: set vector length of {_vector} to loop-integer/{_density} * (distance between {_location1} and {_location2}) add ({_location1} ~ {_vector}) to {_return::*} return {_return::*} every tick: loop all players: loop all entities in radius 20 of loop-player: loop-player-1 is not loop-entity-2 displayEntityHitBox(loop-player-1, loop-entity-2)
  2. I was thinking the same thing!
  3. Hey everyone, I made a cool script for block overlay to let you know where you place! It still has some minor bugs so I'll fix those soon, but for now enjoy! To my knowledge it doesn't cause lag. Original code made by me steveshat (ofc) Requirements: - SkBee - Skript import: org.bukkit.World options: color: pink function displayBlockOverlay(player: player, location: location): set {_point::1} to {_location} ~ vector(0.5, -0.5, 0.5) set {_point::2} to {_location} ~ vector(-0.5, -0.5, 0.5) set {_point::3} to {_location} ~ vector(-0.5, -0.5, -0.5) set {_point::4} to {_location} ~ vector(0.5, -0.5, -0.5) loop 2 times: loop 4 times: make 1 of dust using dustOption({@color}, 0.5) at getLineLocations(({_point::%loop-integer-2%} ~ {_offset}), (({_point::%loop-integer-2 + 1%} ? {_point::1}) ~ {_offset})) to {_player} if loop-integer-1 is 1: make 1 of dust using dustOption({@color}, 0.5) at getLineLocations(({_point::%loop-integer-2%}), ({_point::%loop-integer-2%} ~ vector(0,1,0))) to {_player} set {_offset} to vector(0,1,0) function getLineLocations(location1: location, location2: location, density: integer=10) :: locations: set {_vector} to vector between {_location1} and {_location2} add {_location1} to {_return::*} loop {_density} times: set vector length of {_vector} to loop-integer/{_density} * (distance between {_location1} and {_location2}) add ({_location1} ~ {_vector}) to {_return::*} return {_return::*} every tick: loop all players where [{blockoverlay::%input's uuid%} is set]: set {_rayTrace.Result} to (loop-player's world).rayTraceBlocks(location of loop-player's eyes, (vector from yaw (loop-player's yaw) and pitch (loop-player's pitch)), 5) set {_rayTrace.hitBlock} to {_rayTrace.Result}.getHitBlock() set {_rayTrace.hitBlockFace} to "%{_rayTrace.Result}.getHitBlockFace()%" if {_rayTrace.hitBlockFace} is "UP": set {_focusedArea} to vector(0,1,0) else if {_rayTrace.hitBlockFace} is "SOUTH": set {_focusedArea} to vector(0,0,1) else if {_rayTrace.hitBlockFace} is "NORTH": set {_focusedArea} to vector(0,0,-1) else if {_rayTrace.hitBlockFace} is "DOWN": set {_focusedArea} to vector(0,-1,0) else if {_rayTrace.hitBlockFace} is "EAST": set {_focusedArea} to vector(1,0,0) else if {_rayTrace.hitBlockFace} is "WEST": set {_focusedArea} to vector(-1,0,0) displayBlockOverlay(loop-player, ({_rayTrace.hitBlock} ~ {_focusedArea})) command /blockoverlay [<string="help">]: trigger: if arg-1 is "help": send "&6Block Overlay Help:" send "1. /blockoverlay off" send "2. /blockoverlay on" else if arg-1 is "on": set {blockoverlay::%player's uuid%} to true send "&aYou turned on the Block Overlay!" else if arg-1 is "off": delete {blockoverlay::%player's uuid%} send "&cYou turned off the Block Overlay!" else: player command "/blockoverlay" Fixed the particles to be client sided
  4. Dear Minehut Workers, My friend has a server and the area shop is out of date. I know you guys probably wont see this but if you do can it please be updated. https://www.spigotmc.org/resources/areashop.2991/
×
×
  • Create New...