#help skript minehut
1 messages · Page 1 of 1 (latest)
theres conditions for this
cant i do like:
if gamemode of player is creative:
(checks if is op and if yes it bypasses and if not it doesnt bypass)
@mighty pasture
just do it negative
if player is not op:
if gamemode of player is not creative:
wait
i mean how to do to bypass the skript
gimme your code
idk
on break:
# Allow Creative players to break anything
if player is in creative mode:
allow event
stop
# Suspicious sand can always be broken by survival
if event-block is suspicious sand:
allow event
stop
# Generator blocks list
if event-block is stone or coal ore or iron ore or gold ore or diamond ore or emerald ore or redstone ore or lapis ore or nether quartz ore or nether gold ore or ancient debris or iron block or gold block or diamond block or emerald block or spawner or spruce log or stripped spruce log or spruce wood or stripped spruce wood or spruce planks or spruce leaves:
# Only act as generator if on suspicious sand
if block below event-block is suspicious sand:
cancel event
give player 1 of event-block
set block at event-block to event-block
else:
allow event # breaks normally
else:
cancel event
send "&cYou can only break generator blocks!" to player
the notes are for other admin to understand whats it for
dont delete them
its not there thats why im asking
so you want "creative and op" to cancel event?
or "creative or op"
and
ok
nah
np
what is the purpose of your code tho
a gen server
when mined it doesnt drop, it gets onto the inventory directly and regens
hm
so your code is like
just break the blocks in the region?
nah
idk how to explain
like
when u break the blocks (selected blocks not every) and it doesnt drop, gets directly into inv and it regens
oh ok
so just whitelist all the allow to break blocks
huh
player does not have permission "op"```
not like that
if event-block is dirt:
cancel event
give player drops of blocks using player's tool
this is an example
i already have that
What do you mean not like that 😭
this is shorter
but i dont want to do that with all the blocks
and i already have something of that that works
on load:
add dirt, coal ore, diamond ore to {-allowed_blocks::*}
on break:
if {-allowed_blocks::*} contains event-block:
if gamemode of player is not creative:
if player is not op:
cancel event
give player drops of block using player's tool```
this is what you want?
AI code is not allowed #welcome-to-skunity rule 8
It is recommended that you don't use AI agents for multiple reasons:
2) Blindly trusting code from any source is a bad idea, especially on production servers. Even if the code that was generated appears to work, you have no clue what vulnerabilities it introduces or fails to protect against.
3) Using AI to write your code takes away from your learning and doesn't challenge you to develop problem solving skills.```
While AI can be used as a tool, it is necessary to understand what it is doing and check any code it creates. Since this is a learning community, we want to support your personal growth. As a result, we don't allow generated content in our help channels ([Rule 8](<#welcome-to-skunity message>))
this is my example ```
on load:
set {-allowed_blocks::*} to dirt, coal ore, diamond ore
on break:
if {-allowed_blocks::*} contains event-block:
if gamemode of player is not creative:
if player is not op:
cancel event
give player drops of block using player's tool```
you can check it out
i didnt lmao
right
its notes for other admins to understand faster what it does
sure
dont believeme if you dont want to dude we do things like that