Solved Need CustomFish Skript

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

Gino

Member
Apr 10, 2017
24
4
0
25
Category:
FishPlugin? Don't know what exactly ment with Category xD
Suggested name:
CustomFishing
Spigot/Skript Version:
1.13.2 Spigot
What I want:
<- I need a skript like this, but without the Treasure/Junk/percentages. So basically a plugin were you can Customize the fishing items.


Ideas for commands:
Maybe /customfish and than you get a gui?
Ideas for permissions:
customfish.* ?
When I'd like it by: As soon as possible, ly guys <3
 
Code:
command /customfish:
    permission: customfish.command
    trigger:
        customFishGUI(player)
      
function customFishGUI(p: player):
    open chest inventory with 6 rows named "&9&lFishing Drops" to {_p}
    set {_i} to 0
    loop {fishingdrops::*}:
        set slot {_i} of {_p}'s current inventory to loop-value
        add 1 to {_i}
    while name of current inventory of {_p} is "&9&lFishing Drops":
        delete {_items::*}
        set {_items::*} to items in current inventory of {_p}
        wait 1 tick
    delete {fishingdrops::*}
    set {fishingdrops::*} to {_items::*}
  
import:
    org.bukkit.event.player.PlayerFishEvent
    org.bukkit.event.player.PlayerFishEvent$State
      
on PlayerFishEvent:
    event.getState() is State.CAUGHT_FISH!
    set {_e} to event.getCaught()
    set {_i} to random element out of {fishingdrops::*}
    set item of {_e} to {_i}

Code:
command /customfish:
    permission: customfish.command
    trigger:
        customFishGUI(player)
      
function customFishGUI(p: player):
    open chest inventory with 6 rows named "&9&lFishing Drops" to {_p}
    set {_i} to 0
    loop {fishingdrops::*}:
        set slot {_i} of {_p}'s current inventory to loop-value
        add 1 to {_i}
    while name of current inventory of {_p} is "&9&lFishing Drops":
        delete {_items::*}
        set {_items::*} to items in current inventory of {_p}
        wait 1 tick
    delete {fishingdrops::*}
    set {fishingdrops::*} to {_items::*}
  
on fish:
    fish state is CAUGHT_FISH
    set {_e} to caught fish
    {_e} is set
    set {_i} to random element out of {fishingdrops::*}
    set item of {_e} to {_i}
 
  • Like
Reactions: Gino