auto replant skript help.

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

ECSE

Member
May 27, 2021
11
0
1
25
skript : 2.5.3
spigot : 1.16.5
other plant are works well, but cocoa, netherwart doesen't work.
is there other id for nether wart, cocoa?



on block break:
if {seed.status.%player%} is not set:
if {seed.%player%} = -1 or -2:
set {seed.%player%} to 0
if {seed.status.%player%} is true:
if {seed.%player%} < 0:
send "{@a}&a자동심기 &f횟수를 모두 사용하였습니다."
delete {seed.status.%player%}
if event-block is wheat plant:
if player has seeds:
wait 1 tick
remove 1 seeds from player
set block to wheat plant
if event-block is carrot plant:
if player has carrot:
wait 1 tick
remove 1 carrot from player
set block to carrot plant
if event-block is potato plant:
if player has potato:
wait 1 tick
remove 1 potato from player
set block to potato plant
if event-block is beetroot plant:
if player has beetroot seeds:
wait 1 tick
remove 1 beetroot seeds from player
set block to beetroot plant


if event-block is cocoa: ###########problem starts here
if player has cocoa beans:
if the data value of the event-block is 9, 10, 11 or 12:
wait 1 tick
remove 1 cocoa beans from player
set block to cocoa
if event-block is nether_wart_block:
if player has nether wart:
if the data value of the event-block is 3:
wait 1 tick
remove 1 nether wart from player
set block to nether_wart_block
 
Your code is unreadable, let me fix that.
Code:
on block break:
  if {seed.status.%player%} is not set:
    if {seed.%player%} = -1 or -2:
      set {seed.%player%} to 0
  if {seed.status.%player%} is true:
    if {seed.%player%} < 0:
      send "{@a}&a자동심기 &f횟수를 모두 사용하였습니다."
      delete {seed.status.%player%}
  if event-block is wheat plant:
    if player has seeds:
    wait 1 tick
    remove 1 seeds from player
    set block to wheat plant
  if event-block is carrot plant:
    if player has carrot:
    wait 1 tick
    remove 1 carrot from player
    set block to carrot plant
  if event-block is potato plant:
    if player has potato:
      wait 1 tick
      remove 1 potato from player
      set block to potato plant
  if event-block is beetroot plant:
    if player has beetroot seeds:
    wait 1 tick
    remove 1 beetroot seeds from player
    set block to beetroot plant


  if event-block is cocoa: #problem starts here
    if player has cocoa beans:
      if the data value of the event-block is 9, 10, 11 or 12:
      wait 1 tick
      remove 1 cocoa beans from player
      set block to cocoa
  if event-block is nether_wart_block:
    if player has nether wart:
      if the data value of the event-block is 3:
      wait 1 tick
      remove 1 nether wart from player
      set block to nether_wart_block
Are there any errors?
 
sorry for reply lately.
i change the code that you given, but still not works.
 
Status
Not open for further replies.