SkXray

  • 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 comminuty!

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

dnadany

Member
Dec 14, 2019
2
1
1
1SkXray is the best Xray Finding Skript out there! Why is that?

1) Logs

Simple, unlike other xray skripts this Xray Skript doesn't look for how much diamonds a player has mined within some time, instead it places diamonds when the player is mining and then resets it after some time.

View attachment 4289

View attachment 4290

It sends every thing to the console and players with command permission!

2) Support with OIM

You probably don't know what OIM is, but its and offline inventory management skript made by me! It uses this skript to show you a players inventory!

>> Download <<
3) Easy to use

I have made this skript as simple as possible, while inside it may look complex, you don't need to worry! SkXray has been designed to be simple and different from other xray skripts.

4) What it does!
Simple, it sets the block 2/3 blocks under the player to many diamond blocks within a radius, once mined it will warn staff members and console moderators! It doesn't interfere with blocks other than Stone, Gravel and Granite, preventing messing up with mines and etc. The command also hides itself to players without permission!

View attachment 4291

Commands and Permissions:
  • /xray <player> - Opens hud - xray.use
  • /xray <player> clear - Clears the player's trigger - xray.use
  • /xray <player> inv - Opens the player's inventory - xray.use
 
Hey, I was looking around and noticed this script. And i take a look at it and alot of the code is really inefficient for a minecraft server. And found some bugs be inspecting the code. I don't want u to feel attacked but do u want me to explain whats inefficient and what u can do about it.
 
Yea sure!

I admire your new approach to anti-xray.


I currently know 5 cases of anti-xray:

- Clientside Ores

- Ore Delay

- Ore logger

- Ratio reporters

- Ur unseen method


First, I will explain the difference between these.


Clientside ores:

This places clientside ores trough out the underground layers when breaking blocks close-by it recovers the blocks to their original state.

Pro:

- Efficient use of clientside blocks so the server doesn’t have to manage block changes

- Recovering the blocks is easy because serverside the blocks are still the same it only needs to send packets with the current blocks at that location

- Effective way to block xrayers

Con:

- High cpu usage for updating the packets on player movement


Ore delay:

Wenn mining ores this keeps track how many ores / what ores u mined and limits u from mining to many in a set timeset.

Pro:

- No use of movement or timed events

- Almost no cpu usage.

- Manage economy of ur server

Con:

- Not a very effective way to block xrayers

- Data keeping of ores and times per player


Ore logger:

This is pretty much the same as ore delay but instead of blocking the mining, it notifies admins a player is mining more ores than casual.

Pro:

- No use of movement or timed events

- Almost no cpu usage

- Manual control on who might be xraying

Con:

- Not a very effective way to block xrayers

- Can’t automate this process reliably

- Data keeping of ores per player





Ratio reporters:

Wenn mining and finding a bulk of ores it always notifies admins that a player found x amount of ore.

Pro:

- No use of movement or timed events

- Almost no cpu usage

Cons:

- Not a very effective way to block xrayers

- Manual checking players


Ur method:

When moving trough chunks below y 16 it places/removes random diamond ores wenn mined causing a xray detect.

Pro:

- Tbh can’t think of any

Cons:

- Only working for diamond below y 16

- Xrayers can easy see the fake blocks spawning

- Xray bypass by mining above 16 waiting 10 seconds after entering a new chunk and then go down to mine

- High chance of normal players finding the trap diamonds

- A lot of movement checks esspecialy with +25 people online

- A lot of data storage


Well I hope this gives a vision to whats currently available.


First-off bugs I have seen.

Block placement below 0:

Wenn a player moves into a new chunk the y-coord of the player get saved. After that u do proper checks to make shure the player is above the level that it wants to place blocks at. But after these checks u set the location of the player again. Because it can have been 10 seconds since the original location the player now can be at level 1 causing the code to place blocks below 0.


Not crash proof:

No code that takes care of variable management and block recovery on a crash.


Looping taking up to 1 day of looping per chunk per player:

U loop blocks in radius 2 so that’s max 32 blocks and then u loop blocks radius 1.25 wich is ~max 20 so 32 * 20 = 640 minutes but u do this for below and above so *2 = 1280 mins = 21.33 hours


Second time looped diamonds are not fake:

The blocks u place with the second loop are not saved to variables.


Blocks can replace all blocks except stone granite or gravel:

Ur code is set to if its NOT stone granite or gravel so it replaces air lava redstone diamond etc blocks.




Now lets talk about a lot of inefficient things I see in ur code.


High:

- A lot of unneccery loops

- Use of move event

- Giant list BannedDiamonds

- Looping giant list of banned diamonds


Low:

- Uuid checks

- Chunk checks


Well that’s all the time I got for now. I should explain a lot more how to take care of this but no time. u really need to start learning more about efficiency and propably take a closer look at how loops and variables work. Next to that read about efficiency of move events and think about different ways to create this efficiently without move events its possible. Maybe its also worth to work with clientside blocks instead.

Send me dm for questions.