Fish aren't custom

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

SuperTommyDog

Member
Sep 2, 2019
14
0
1
So i am making a custom fishing element for my server and i get normal vanilla fish and items not my custom ones even after i made this
Code:
on fish:
    if "%fishing state%" is "CAUGHT_FISH":
        if name of player's tool contains "&7Basic Rod":
            stop
            set {_size} to a random integer between 1 and 20
            set {_fish} to a random integer between 1 and 5
            if {_fish} is 1:
                give player 1 raw_fish named "&aAtlantic cod" with lore "&7%{_size}% Inches"
            if {_fish} is 2:
                give player 1 raw_fish named "&aPacific cod" with lore "&7%{_size}% Inches"
            if {_fish} is 3:
                give player 1 salmon named "&bAtlantic Salmon" with lore "&7%{_size}% Inches"
            if {_fish} is 4:
                give player 1 salmon named "&bPacific Salmon" with lore "&7%{_size}% Inches"
            if {_fish} is 5:
                give player 1 salmon named "&cHaddock" with lore "&7%{_size}% Inches"
do you have any idea why? There are 0 errors
 
Last edited:
So i am making a custom fishing element for my server and i get normal vanilla fish not my custom one even after i made this
Code:
on fish:
    if "%fishing state%" is "CAUGHT_FISH":
        if name of player's tool contains "&7Basic Rod":
            stop
            set {_size} to a random integer between 1 and 20
            set {_fish} to a random integer between 1 and 5
            if {_fish} is 1:
                give player 1 raw_fish named "&aAtlantic cod" with lore "&7%{_size}% Inches"
            if {_fish} is 2:
                give player 1 raw_fish named "&aPacific cod" with lore "&7%{_size}% Inches"
            if {_fish} is 3:
                give player 1 salmon named "&bAtlantic Salmon" with lore "&7%{_size}% Inches"
            if {_fish} is 4:
                give player 1 salmon named "&bPacific Salmon" with lore "&7%{_size}% Inches"
            if {_fish} is 5:
                give player 1 salmon named "&cHaddock" with lore "&7%{_size}% Inches"
do you have any idea why? There are 0 errors
?
upload_2020-7-11_5-55-4.png

Try putting the 'stop' at the end of the code.
 
Sorry for the late reply i have been busy, but putting stop at the end gives me both (custom and vanilla) which i don't want
 
Sorry for the late reply i have been busy, but putting stop at the end gives me both (custom and vanilla) which i don't want
It depends on where you put the 'stop', try putting it here:
code_language.skript:
on fish:
    if "%fishing state%" is "CAUGHT_FISH":
        if name of player's tool contains "&7Basic Rod":
            set {_size} to a random integer between 1 and 20
            set {_fish} to a random integer between 1 and 5
            if {_fish} is 1:
                give player 1 raw_fish named "&aAtlantic cod" with lore "&7%{_size}% Inches"
            if {_fish} is 2:
                give player 1 raw_fish named "&aPacific cod" with lore "&7%{_size}% Inches"
            if {_fish} is 3:
                give player 1 salmon named "&bAtlantic Salmon" with lore "&7%{_size}% Inches"
            if {_fish} is 4:
                give player 1 salmon named "&bPacific Salmon" with lore "&7%{_size}% Inches"
            if {_fish} is 5:
                give player 1 salmon named "&cHaddock" with lore "&7%{_size}% Inches"
            stop # < - - -
 
^ Also if you do not want to cancel event, then it's useless having a stop there.
 
Status
Not open for further replies.