#true code but don't work
1 messages · Page 1 of 1 (latest)
what is the .format?
you need to put vb
wait
BRO
ye that
you need to put that before you put code
oh wait
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
no
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?
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.
you should use variables
Instead, there would be data that could get the length of the sugar cane, but as I researched, there is none.
oh
ok
this will take a minute
i will make a skript
ok i will wait
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
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
no you 🫵 dont understand
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?
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?
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.
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
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
this is what i want
set {_amount} to amount of event-block in player's inventory
send "&a&lAmount&7 >>&f %{_amount}%" to player
sorry but i dont understand what u want
This code actually works, but I don't know why, it just doesn't work on sugar cane.
maybe ask someone else
ok cool