#Make it give me shit only once

1 messages · Page 1 of 1 (latest)

daring scarab
#

holup lemme say this shit cause i got alot to say

#

sooo basically i got a gui for fishing milestones and when you catch fish and shit it changes the milestones and uh yeah that works and i would like to add coin rewards

#
function fishingMilestoneMenu(p: player):
    set {_u} to the uuid of {_p}
    create a gui with virtual chest inventory with 6 rows named "&3Fishing Milestones"
    open last gui for {_p}
    edit gui last gui:
        loop 55 times:
            make next gui with gray stained glass pane named "&f"
        make gui 45 with arrow named "&cBack":
            fishingMenu({_p})
        make gui 13 with lily pad named "&3Fishing Milestones" with lore "&7View all your progress"
        
        set {_fishCaught} to {playerData::%{_u}%::fishCaught}  # Retrieve the number of fish caught
        
        send "Fish Caught: %{_fishCaught}%" to {_p}
        
        if {_fishCaught} >= 50:
            make gui 29 with lime stained glass pane named "&aMilestone I" with lore "&6%{_fishCaught}%&7/50 fish caught!" and "&f" and "&7Rewards:" and "&6+2000 Coins" and "&e&lCLAIMED"
            add 2000 to {playerData::%{_u}%::coins}
        else:
            make gui 29 with red stained glass pane named "&4Milestone I" with lore "&c%{_fishCaught}%&7/50 fish caught!" and "&f" and "&7Rewards:" and "&6+2000 Coins"
        if {_fishCaught} >= 100:
            make gui 30 with lime stained glass pane named "&aMilestone II" with lore "&6%{_fishCaught}%&7/100 fish caught!" and "&f" and "&7Rewards:" and "&6+5000 Coins" and "&e&lCLAIMED"
            add 5000 to {playerData::%{_u}%::coins}
        else:
            make gui 30 with red stained glass pane named "&4Milestone II" with lore "&c%{_fishCaught}%&7/100 fish caught!" and "&f" and "&7Rewards:" and "&6+5000 Coins"
        if {_fishCaught} >= 500:
            make gui 31 with lime stained glass pane named "&aMilestone III" with lore "&6%{_fishCaught}%&7/500 fish caught!" and "&f" and "&7Rewards:" and "&6+20,000 Coins" and "&e&lCLAIMED"
            add 20000 to {playerData::%{_u}%::coins}
#

so heres what i got so far (more milestones but word limit wont let me say shit)

#

and the issue is i want it to give me the coin rewards only once

for example the first milestone is 50 fish. I want it so that when I hit 50 fish i get the coin bonus and i move on with my life but instead EVERY 50 fish it gives me the reward money (so 50, 100, 150, 200, ....)

#

anyways any help is appreciated

#

apologies for yapfest

#

🙏

tawdry holly
#

well, if {_fishCaught} >= 50: will be run if they have more then 50 fish