Code:
options:
seed1-drop: coal
seed2-drop: iron ingot
seed3-drop: gold ingot
seed4-drop: diamond
seed5-drop: emerald
seed6-drop: obsidian
seed1-name: &8Coal &aSeed
seed2-name: &7Iron &aSeed
seed3-name: &6Gold &aSeed
seed4-name: &bDiamond &aSeed
seed5-name: &aEmerald &aSeed
seed6-name: &0Obsidian &aSeed
command /giveseed <player> <text>:
permission: sk.giveseed
trigger:
if arg-2 = "all":
give arg-1 wheat seed named "{@seed1-name}"
give arg-1 wheat seed named "{@seed2-name}"
give arg-1 wheat seed named "{@seed3-name}"
give arg-1 wheat seed named "{@seed4-name}"
give arg-1 wheat seed named "{@seed5-name}"
give arg-1 wheat seed named "{@seed6-name}"
if arg-2 = "coal":
give arg-1 wheat seed named "{@seed1-name}"
if arg-2 = "iron":
give arg-1 wheat seed named "{@seed2-name}"
if arg-2 = "gold":
give arg-1 wheat seed named "{@seed3-name}"
if arg-2 = "diamond":
give arg-1 wheat seed named "{@seed4-name}"
if arg-2 = "emerald":
give arg-1 wheat seed named "{@seed5-name}"
if arg-2 = "obsidian":
give arg-1 wheat seed named "{@seed6-name}"
on right click on soil:
if player's tool is wheat seed:
if block above event-block is air:
set {_loc} to location of event-block
set y-coord of {_loc} to y-coord of {_loc} + 1
if name of player's tool is "{@seed1-name}":
add {_loc} to {%player's uuid%.plantedseeds.{@seed1-drop}::*}
else if name of player's tool is "{@seed2-name}":
add {_loc} to {%player's uuid%.plantedseeds.{@seed2-drop}::*}
else if name of player's tool is "{@seed3-name}":
add {_loc} to {%player's uuid%.plantedseeds.{@seed3-drop}::*}
else if name of player's tool is "{@seed4-name}":
add {_loc} to {%player's uuid%.plantedseeds.{@seed4-drop}::*}
else if name of player's tool is "{@seed5-name}":
add {_loc} to {%player's uuid%.plantedseeds.{@seed5-drop}::*}
else if name of player's tool is "{@seed6-name}":
add {_loc} to {%player's uuid%.plantedseeds.{@seed6-drop}::*}
on block break:
loop {%player's uuid%.plantedseeds.{@seed1-drop}::*}:
if location of event-block = loop-value:
if event-block is ripe wheat plant:
remove loop-value from {%player's uuid%.plantedseeds.{@seed1-drop}::*}
cancel event
set event-block to air
drop 1 of {@seed1-drop}
else if event-block is wheat item:
remove loop-value from {%player's uuid%.plantedseeds.{@seed1-drop}::*}
cancel event
set event-block to air
chance of 80%:
drop 1 of wheat seed named "{@seed1-name}"
loop {%player's uuid%.plantedseeds.{@seed2-drop}::*}:
if location of event-block = loop-value:
if event-block is ripe wheat plant:
remove loop-value from {%player's uuid%.plantedseeds.{@seed2-drop}::*}
cancel event
set event-block to air
drop 1 of {@seed2-drop}
else if event-block is wheat item:
remove loop-value from {%player's uuid%.plantedseeds.{@seed2-drop}::*}
cancel event
set event-block to air
chance of 80%:
drop 1 of wheat seed named "{@seed2-name}"
loop {%player's uuid%.plantedseeds.{@seed3-drop}::*}:
if location of event-block = loop-value:
if event-block is ripe wheat plant:
remove loop-value from {%player's uuid%.plantedseeds.{@seed3-drop}::*}
cancel event
set event-block to air
drop 1 of {@seed3-drop}
else if event-block is wheat item:
remove loop-value from {%player's uuid%.plantedseeds.{@seed3-drop}::*}
cancel event
set event-block to air
chance of 80%:
drop 1 of wheat seed named "{@seed3-name}"
loop {%player's uuid%.plantedseeds.{@seed4-drop}::*}:
if location of event-block = loop-value:
if event-block is ripe wheat plant:
remove loop-value from {%player's uuid%.plantedseeds.{@seed4-drop}::*}
cancel event
set event-block to air
drop 1 of {@seed4-drop}
else if event-block is wheat item:
remove loop-value from {%player's uuid%.plantedseeds.{@seed4-drop}::*}
cancel event
set event-block to air
chance of 80%:
drop 1 of wheat seed named "{@seed4-name}"
loop {%player's uuid%.plantedseeds.{@seed5-drop}::*}:
if location of event-block = loop-value:
if event-block is ripe wheat plant:
remove loop-value from {%player's uuid%.plantedseeds.{@seed5-drop}::*}
cancel event
set event-block to air
drop 1 of {@seed5-drop}
else if event-block is wheat item:
remove loop-value from {%player's uuid%.plantedseeds.{@seed5-drop}::*}
cancel event
set event-block to air
chance of 80%:
drop 1 of wheat seed named "{@seed5-name}"
loop {%player's uuid%.plantedseeds.{@seed6-drop}::*}:
if location of event-block = loop-value:
if event-block is ripe wheat plant:
remove loop-value from {%player's uuid%.plantedseeds.{@seed6-drop}::*}
cancel event
set event-block to air
drop 1 of {@seed6-drop}
else if event-block is wheat item:
remove loop-value from {%player's uuid%.plantedseeds.{@seed6-drop}::*}
cancel event
set event-block to air
chance of 80%:
drop 1 of wheat seed named "{@seed6-name}"
Any help?
I did not make this skript, somebody else did and I usually have to make the skript to follow along with it.