permission: op
trigger:
give player fishing rod named "§4Fishing Rod"
on fishing line cast:
if name of player's tool is "§4Fishing Rod":
if {custom.%player%} is true:
send "blabla" to player
stop
set {custom.%player%} to true
# Shapes (requires skBee)
set {_shape1} to circle with radius 1
set {_shape2} to circle with radius 2
set {_shape3} to circle with radius 3
set particle {_shape1} to dustOption(red, 1.5)
set particle {_shape2} to dustOption(red, 1.5)
set particle {_shape3} to dustOption(red, 1.5)
loop all living entities in radius 3 around player:
if loop-entity is not player:
push loop-entity backwards at speed 1
push loop-entity upward at speed 0.5
damage loop-entity by 4
spawn 40 lava particles at loop-entity
loop 15 times:
make shape {_shape1} at player
make shape {_shape2} at player
make shape {_shape3} at player
wait 5 ticks
# Cooldown reset (2 seconds)
wait 40 ticks
delete {custom.%player%}
skript skbee skript-particle 1.21.8
no errors but when i cast the rod nothing happens
skript skbee skript-particle 1.21.8
no errors but when i cast the rod nothing happens'
#need help with small project
1 messages · Page 1 of 1 (latest)
did you debug
It is recommended that you don't use AI agents for multiple reasons @upbeat oxide:
2) Blindly trusting code from any source is a bad idea, especially on production servers. Even if the code that was generated appears to work, you have no clue what vulnerabilities it introduces or fails to protect against.
3) Using AI to write your code takes away from your learning and doesn't challenge you to develop problem solving skills.```
While AI can be used as a tool, it is necessary to understand what it is doing and check any code it creates. Since this is a learning community, we want to support your personal growth. As a result, we don't allow generated content in our help channels ([Rule 8](<#welcome-to-skunity message>))
i did it myself but i gave to ai to debug
cuz i legit have no idea whats going on
i was screen sharing to a friend while coding
he saw
idk how
Resonant suggests that you read this embed
Debug
What is debugging?
Debugging is the process of finding and fixing bugs/issues/errors within your code. For a more detailed explanation on proper debugging check out sovdee's page
Variables
Since you don't see the value of variables it can be easy to assume that everything is working properly even though that might not be the case. Variables and arguments in functions and commands might change throughout your code in unexpected ways. It is a good idea to broadcast your variables at different points in your code to confirm that the value is what you expect it to be.
on chat:
broadcast {chats::%player's uuid%}
add 1 to {chats::%player's uuid%}
broadcast {chats::%player's uuid%}```
In this example we broadcast the variable to check its value before and after we add to it to make sure the value goes up. If the variable was set to a string (`set {chats::%player's uuid%} to "3"`) then we would be able to see that the value did not go up, alerting us of the issue.
Conditions
If your code does no seem to be doing anything it is a good idea to establish which parts of your code are being executed, especially when using conditions. To accomplish this, add a broadcast after each part of line of your code with a descriptive message.
on right click:
broadcast "player clicked"
if player's tool = iron sword:
broadcast "player's tool was iron sword"
set player's tool to diamond sword```
In this example, we would only see the `player clicked` message if the player was holding an apple, alerting us that the code stopped after the first condition.
NBT
If you are debugging nbt you can use send pretty nbt of nbt of player's tool with split to make it more readable.
ok
i got stuck at if name of player's tool is "§4Fishing Rod"
because if i add broacast anything it says that i need 1tab instead of 2?
then the name isnt right
permission: op
trigger:
give player fishing rod named "§4Fishing Rod"
on leftclick holding a fishing rod:
if name of player's tool is "§4Fishing Rod"
broadcast {chats::%player's uuid%}
if {custom.%player%} is true:
send "blabla" to player
stop
set {custom.%player%} to true
it is tho
idk
use & instead of §
still the same
does if name of player's tool even worl
is that correct for 1.21.8?
yes it is
do you have a : at the end of the line
at set {custom.%player%} to true?
oh
if name of player's tool is "x" there needs to be a :
not sure why that wasnt returning an error
tysm
You successfully increased @simple wedge's reputation. They now have 4 skoints
hm
this time its the "on leftclick"
command /custom:
permission: op
trigger:
give player fishing rod named "&4Fishing Rod"
on leftclick holding a fishing rod:
if name of player's tool is "&4Fishing Rod":
if {custom.%player%} is true:
send "blabla" to player
stop
set {custom.%player%} to true
set {_shape1} to circle with radius 1
set {_shape2} to circle with radius 2
set {_shape3} to circle with radius 3
set particle {_shape1} to dustOption(red, 1.5)
set particle {_shape2} to dustOption(red, 1.5)
set particle {_shape3} to dustOption(red, 1.5)
loop all living entities in radius 3 around player:
if loop-entity is not player:
push loop-entity backwards at speed 1
push loop-entity upward at speed 0.5
damage loop-entity by 4
spawn 40 lava particles at loop-entity
loop 15 times:
make shape {_shape1} at player
make shape {_shape2} at player
make shape {_shape3} at player
wait 5 ticks
delete {custom.%player%}
try on left click with a fishing rod:
also are you sure it should be on left click and not on right click? because your trying to do it when you throw the line right?
try on right click with a fishing rod:
on skript hub is also says
on fishing line cast:
you have a broadcast and it broadcasts nothing?
can u send ur sk info
idk if that should change anything
okay
js on right click with a fishing rod:
broadcast "hi"
works
but
on right click with a fishing rod:
if name of player's tool is "&4Fishing Rod":
broadcast "hello"
doesnt
broadcast name of player's tool
wait
no
broadcast debug info of name of player's tool
show me what it broadcasts
on right click with a fishing rod:
if name of player's tool is "&4Fishing Rod":
broadcast debug info of name of player's tool
?
no before the condition
ok
but also have a broadcast after the condition that broadcasts something else
nun
it broadcasts nothing?
on right click:
broadcast "%debug info of name of player's tool%"
if name of player's tool is "&4Fishing Rod":
broadcast "worked"
``` try this and tell me what it broadcasts
yea?
on a new file?
it doesnt matter
yeah it works
then just use that
omg
i add this and js doesnt work anymore
command /custom:
permission: op
trigger:
give player fishing rod named "&4Fishing Rod"
on right click:
broadcast "%debug info of name of player's tool%"
if name of player's tool is "&4Fishing Rod":
broadcast "worked"
if {custom.%player%} is true:
stop
set {custom.%player%} to true
broadcast "yea"
set {_shape1} to circle with radius 1
set {_shape2} to circle with radius 2
set {_shape3} to circle with radius 3
set particle {_shape1} to dustOption(red, 1.5)
set particle {_shape2} to dustOption(red, 1.5)
set particle {_shape3} to dustOption(red, 1.5)
loop all living entities in radius 3 around player:
if loop-entity is not player:
push loop-entity backwards at speed 1
push loop-entity upward at speed 0.5
damage loop-entity by 4
spawn 40 lava particles at loop-entity
loop 15 times:
make shape {_shape1} at player
make shape {_shape2} at player
make shape {_shape3} at player
wait 5 ticks
wait 40 ticks
delete {custom.%player%}
sorry i couldnt help lol