#Auto Compressor
1 messages · Page 1 of 1 (latest)
Show error message
- on break:
You should use on break so when they break the next block, It checks if they have 32 wheat seeds.
- if player's inventory contains wheat seeds named "&eWheat Auto Compressor":
Checks if the player's inventory (not offhand) contains the auto compressor.
-
Check if player has 32 wheat seeds first.
-
Indentation.
In skript, you need to maintain consistent indentation, meaning you cannot indent 1 line 5 spaces, and the next 7 spaces. Usually it’s recommended you use tabs, however.
A good rule of thumb is to always indent the subsequent line whenever the previous statement ends with a :, an exception to this is in command statements with items before the trigger such as permission: or aliases:
With conditional statements and loops, any code that is indented within the statement will be run as a part of the statement, other code will not be run within the statement. Here is an example of proper indentation:
There you go.
You should now be able to create an "Auto Compressor" skript
^
wait i kinda dont understand
like send me the pic
this is my first ever skript
You should def not make an auto comp skript as first skript.
here I'll send a little snippet of (not how i'd do it) but how I'd do it if I was a starter.
oTrixy when i did the skript the first time with block break it worked but kinda now
if player's inventory contains wheat seeds:
set {_amt} to amount of wheat seeds in player's inventory
set {_required} to 32
if {_amt} >= {_required}:
set {_compressAmount} to floor({_amt} / {_required})
remove ({_compressAmount} * {_required}) of wheat seeds from player's inventory
give player {_compressAmount} of wheat seeds named "&eCompressed Seeds"
replace all "block" in {_from} with ""
send action bar "&fCompressed &a32x &fof &eWheat Seeds &finto &a1x &fof &eCompressed Seeds&f successfully." to player
This works
look through it and see what you have to change
Its a really bad way to do it
You have to add the comp item
wait is it for 1.20.6 ?
if player's inventory contains wheat seeds:
set {_amt} to amount of wheat seeds in player's inventory
set {_required} to 32
if {_amt} >= {_required}:
if player's inventory contains wheat seeds named "&aWheat Auto Compressor":
set {_compressAmount} to floor({_amt} / {_required})
remove ({_compressAmount} * {_required}) of wheat seeds from player's inventory
give player {_compressAmount} of wheat seeds named "&eCompressed Seeds"
replace all "block" in {_from} with ""
send action bar "&fCompressed &a32x &fof &eWheat Seeds &finto &a1x &fof &eCompressed Seeds&f successfully." to player
Skript + Skbee, 1.20.4+ - 1.21.1 yes
aight ty
aight ty
Try it and see and np
(You should for sure think about updating to 1.21.1(latest)
I heard 1.20.6 is a bit buggy
aight ty
np