Search results

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the community!

    Now, what are you waiting for? Join the community now!

  1. M

    Solved Set location to a variable.

    Try this: on join: set {_loc} to location at (0.5, 66, -1.5) in world "sb%player%" parsed as world
  2. M

    Block Chains

    Here's your code: options: debug: true limit: 5 delay: 1 function breakBlockRecursive(b: location, t: string, i: number = 0): if {_i} is greater than {@limit}: if {@debug}: broadcast "recursion limit exceeded" stop if "%type of block at {_b}%" is...
  3. M

    Water conducting lightning

    The idea is to use recursively Flood fill algorithm to check all block. If there is any entity on that block, damage it. Simple.
  4. M

    [HELP] Loop blocks in cube radius

    function blocksInCube(b: block, r: number) :: blocks: set {_loc1} to location of {_b} set {_loc2} to location of {_b} remove {_r} from x coord of {_loc1} remove {_r} from y coord of {_loc1} remove {_r} from z coord of {_loc1} add {_r} to x coord of {_loc2} add...
  5. M

    [HELP] Loop blocks in cube radius

    Try running command like so: `/cube 5` this will create cube around you with side length of 2*5+1 = 11 blocks
  6. M

    [HELP] Loop blocks in cube radius

    Try values > 0. The equation for this is `2 * r + 1` (diameter + block which player stands on), so if you put there 0 the result would be 1 = single block on player location.
  7. M

    [HELP] Loop blocks in cube radius

    Note that my example usage code sets nearby blocks to air. That means nothing changes when you don't have any blocks around you. Try changing for example `air` to `stone` and try again. (You will get stuck inside the cube.) The code should be working fine, I tested it several times.
  8. M

    [HELP] Loop blocks in cube radius

    The code is now fixed, check my edit.
  9. M

    [HELP] Loop blocks in cube radius

    Try this function: function blocksInCube(p: player, r: number) :: blocks: set {_loc1} to location of {_p} set {_loc2} to location of {_p} remove {_r} from x coord of {_loc1} remove {_r} from y coord of {_loc1} remove {_r} from z coord of {_loc1} add {_r} to x coord of...
  10. M

    Event win skript

    Here's your code: variables: {vyhra} = 0 command /event: aliases: /eventy, /eventmain, eventinfo permission: simocraft.event.help trigger: send "&b----------------( &a&lEventy &f&b)----------------" to player send "" to player send " &b/eventjoin...
  11. M

    Shiny not working : "format slot 1 of player with shiny paper"

    Hello, the syntax seems to be ok, even parser parsed it without any errors: I don't really know what's the issue. Try check for updates.
  12. M

    Skript look detection?

    How would that solve the problem? You could just create array with all armor stands for each player and loop through the array to keep them updated.
  13. M

    cooldown on my skript

    Try this: on rightclick: if clicked block is a Fern: if {cooldown::%player%} > 0: message "You have to wait %{cooldown::%player%} - convert date now to unix date% before you can use this command again!" else: delete event-block set...
  14. M

    Skript look detection?

    This is not really possible. Each player might have different FOV, render distance and aspect ratio. You can't obtain information about client side options on your server. Also there is F5 toggle perspective option, which makes this even harder. But the idea is: You know player position and...
  15. M

    Solved Check if a player is between a location?

    Split the position into coordinates and compare them separately, like so: if event-player's x coord is between {_loc1} x coord and {_loc2} x coord: if event-player's y coord is between {_loc1} y coord and {_loc2} y coord: if event-player's z coord is between {_loc1} z...
  16. M

    Solved Auto-generation

    You're welcome
  17. M

    Solved Auto-generation

    Try: on chunk generate: if random integer between 0 and 10 is 1: loop blocks within event-chunk: if y-pos of loop-block is less than 60: if loop-block is air: if block under loop-block is stone: set {_c} to 0...
  18. M

    "on break of" doesnt work

    Hmm... I am just want to help him, but idk what he need... I thought he want to drop diamond when glass break event is fired and that was broken so I made it with only on break event and condition.
  19. M

    "on break of" doesnt work

    Hmm.. Then I did not understand what you want. Describe it more detaily please.
  20. M

    Solved giveall Token/Coins

    Try: trigger: if name of player's tool is "&61'000 &aTokens &8> &cGiveall": remove 1 of sunflower named "&61'000 &aTokens &8> &cGiveall" from player loop all players: add 1000 to {geld.%loop-player%} broadcast "&7Jeder Spieler hat &61000 &2Tokens...