1. 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!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Need CustomFish Skript

Discussion in 'Requests' started by Gino, Apr 20, 2019.

  1. Gino

    Gino Member

    Joined:
    Apr 10, 2017
    Messages:
    24
    Likes Received:
    4
    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
     
  2. Best Answer:
    Post #2 by TPGamesNL, Apr 20, 2019
  3. TPGamesNL

    Supporter Addon Developer Dev Programme

    Joined:
    Jan 20, 2018
    Messages:
    1,501
    Likes Received:
    108
    Medals:
    Code (Text):
    1. command /customfish:
    2.     permission: customfish.command
    3.     trigger:
    4.         customFishGUI(player)
    5.      
    6. function customFishGUI(p: player):
    7.     open chest inventory with 6 rows named "&9&lFishing Drops" to {_p}
    8.     set {_i} to 0
    9.     loop {fishingdrops::*}:
    10.         set slot {_i} of {_p}'s current inventory to loop-value
    11.         add 1 to {_i}
    12.     while name of current inventory of {_p} is "&9&lFishing Drops":
    13.         delete {_items::*}
    14.         set {_items::*} to items in current inventory of {_p}
    15.         wait 1 tick
    16.     delete {fishingdrops::*}
    17.     set {fishingdrops::*} to {_items::*}
    18.  
    19. import:
    20.     org.bukkit.event.player.PlayerFishEvent
    21.     org.bukkit.event.player.PlayerFishEvent$State
    22.      
    23. on PlayerFishEvent:
    24.     event.getState() is State.CAUGHT_FISH!
    25.     set {_e} to event.getCaught()
    26.     set {_i} to random element out of {fishingdrops::*}
    27.     set item of {_e} to {_i}

    Code (Text):
    1. command /customfish:
    2.     permission: customfish.command
    3.     trigger:
    4.         customFishGUI(player)
    5.      
    6. function customFishGUI(p: player):
    7.     open chest inventory with 6 rows named "&9&lFishing Drops" to {_p}
    8.     set {_i} to 0
    9.     loop {fishingdrops::*}:
    10.         set slot {_i} of {_p}'s current inventory to loop-value
    11.         add 1 to {_i}
    12.     while name of current inventory of {_p} is "&9&lFishing Drops":
    13.         delete {_items::*}
    14.         set {_items::*} to items in current inventory of {_p}
    15.         wait 1 tick
    16.     delete {fishingdrops::*}
    17.     set {fishingdrops::*} to {_items::*}
    18.  
    19. on fish:
    20.     fish state is CAUGHT_FISH
    21.     set {_e} to caught fish
    22.     {_e} is set
    23.     set {_i} to random element out of {fishingdrops::*}
    24.     set item of {_e} to {_i}
     
    Gino likes this.
  4. Gino

    Gino Member

    Joined:
    Apr 10, 2017
    Messages:
    24
    Likes Received:
    4
    You are a boss!
     

Share This Page

Loading...