#true code but don't work

1 messages · Page 1 of 1 (latest)

formal moat
#

.format

#

wait what

#

.format

#

bruh

#

anyway

bitter eagle
#

what is the .format?

formal moat
#

you need to put vb

#

wait

#

BRO

#

ye that

#

you need to put that before you put code

bitter eagle
#

oh wait

formal moat
#

and put ```

#

after the code

#

for example vb hi

bitter eagle
#

ok i send wait

#

command /sugarcane: trigger: send "&l&aAmount&7 >> &f%amount of sugar cane in player's inventory%" to player

#

this is my code

formal moat
#

no

bitter eagle
#

only not work in the sugar cane

#
    trigger:
        send "&l&aAmount&7 >> &f%amount of sugar cane in player's inventory%" to player
#

like this?

formal moat
#

yes

#

ty

#

its way easier to help now

bitter eagle
#

This only dont work in the sugar cane

#

when i write diamond or other things

#

it works

#

I'm making a level system and this level has something to do with farming. That's why I want experience to go to the player when a candy cane is broken, but as you know, the player can abuse this and get as much experience as he wants by breaking the candy cane and putting it again.

formal moat
#

you should use variables

bitter eagle
#

Instead, there would be data that could get the length of the sugar cane, but as I researched, there is none.

bitter eagle
#

is shorted of my code

formal moat
#

ok

#

this will take a minute

#

i will make a skript

bitter eagle
#

ok i will wait

formal moat
#

so thgis code will check if the sugar cane was placed by the same player,
if so it doesnt work

on place:
  if event-item is sugar cane
  set {placed_by_player} to true
if {placed_by_player} is true```
#

now the code you want

#

so this checks if the sugar cane was placed bu the player

bitter eagle
#

oh i see new

#

i check this wait

#

My friend, you have misunderstood the issue, what matters to me is not who planted the sugar cane. The important thing is to prevent users from cheating by controlling the number while collecting sugar cane. If they just plant sugarcane and harvest it again, they will gain experience without doing anything. Here I want the quantity before I buy the sugarcane so that after I get the sugarcane I will know how big and long the sugarcane is broken.

#

Problem is this. ``` set {_amount} to amount of event-block in player's inventory
send "&a&lAmount&7 >>&f %{_amount}%" to player

formal moat
#
on place:
  if event-item is sugar cane
  set {placed_by_player} to true
if {placed_by_player} is true:
  cancel event```
#

so it doesnt give xp or levels if u place it

#

and then break it

#

get it?

bitter eagle
#

So, when the sugar cane grows, will it give experience again? For example, when we plant it, it is one long, but when it grows, it will be 2 or more. That's when he will gain experience.

#

How i can check the length with this code?

formal moat
#

no

#

but i could do a timer

#

wait gimme a sec

bitter eagle
#

Isn't sugar cane affected by some factors such as light?

#

Is the growth rate constant?

#

Even so, the player can plant millions of sugar canes.

formal moat
#
on place:
  if event-item is sugar cane
  set {placed_by_player} to true
  wait 1 minute
  set {placed_by_player} to false
on break
  if {placed_by_player} is true:
    cancel event```
#

so

#

this makes it that

#

if u place a sugar cane

#

u have to wait 1 minute to harvest it

bitter eagle
#

What I want to do is to have x amount of sugar canes in the inventory before breaking the sugar cane. If 1 is added when you break it, this sugar cane is 1 unit in size, meaning you have harvested it before it even grows. This is what I want to check, but the code doesn't work and I don't understand why.

#

I waited 15 minutes for a sugar cane to grow, but sometimes it can be less or more.

#

i can plant 100 sugar cane

#

and i harvest 1 minute later

#

but canes did'nt grow

#

its hack to gain exp

bitter eagle
#

set {_amount} to amount of event-block in player's inventory
send "&a&lAmount&7 >>&f %{_amount}%" to player

formal moat
#

sorry but i dont understand what u want

bitter eagle
#

This code actually works, but I don't know why, it just doesn't work on sugar cane.

formal moat
#

maybe ask someone else

bitter eagle
#

@formal moat

#

I solved this

#

i send wait

formal moat
#

ok cool