Hello, I'm making an 1.12.2 UHC only server and every thing is good so far, less the apples! I need the apples! x) So I made a skript to make apples drop more often but it doesn't work as it should. /apples work, it shows the message that it is indeed *something*% but leaves only drop saplings.
code:
code:
Code:
options:
p: §8[§2Apple Rates§8]§r
perms: skript.apples
{rates::apples} = 0
command /apples [<text>] [<int>]:
permission: {@perms}
usage: /apples [<set:reset>] [<rate (1-100)>]
trigger:
if arg-1 is "reset":
broadcast "{@p} Apple Rates set to Vanilla"
set {rates::aples} to 5
else if arg-1 is "set":
if arg-2 is not set:
send "{@p} You must specify a rate to set it to!" to command sender
stop
else if arg-2 is less than 0:
send "{@p} No number lower than 0!" to command sender
stop
else if arg-2 is more than 0:
send "{@p} No number higher than 100!" to command sender
stop
else:
set {rates::apples} to arg-2
broadcast "{@p} Apple Rates set to %arg-2%%%"
else:
if {rates::apples} is set:
send "{@p} Current Apple Rates: %{rates::apples}%%%"
else:
send "{@p} Current Apple Rates: Vanilla"
send "{@p} /apples [<set:reset>] [<rate (1-100)>]"
on leaves decay:
cancel the event
set the event-block to air
chance of {rates::apples}%:
drop 1 apple at event-block
if event-block is oak leaves:
chance of 5%
drop 1 oak sapling at event-block
else if event-block is spruce leaves:
chance of 5%
drop 1 spruce sapling at event-block
else if event-block is birch leaves:
chance of 5%
drop 1 birch sapling at event-block
else if event-block is jungle leaves:
chance of 5%
drop 1 jungle sapling at event-block
else if event-block is acacia leaves:
chance of 5%
drop 1 acacia sapling at event-block
else if event-block is dark oak leaves:
chance of 5%
drop 1 dark oak sapling at event-block
on break of leaves:
cancel the event
set the event-block to air
chance of {rates::apples}%:
drop 1 apple at event-block
if event-block is oak leaves:
chance of 5%
drop 1 oak sapling at event-block
else if event-block is spruce leaves:
chance of 5%
drop 1 spruce sapling at event-block
else if event-block is birch leaves:
chance of 5%
drop 1 birch sapling at event-block
else if event-block is jungle leaves:
chance of 5%
drop 1 jungle sapling at event-block
else if event-block is acacia leaves:
chance of 5%
drop 1 acacia sapling at event-block
else if event-block is dark oak leaves:
chance of 5%
drop 1 dark oak sapling at event-block