Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //------------//Buy Rod Commmand//------------//
- $eval
- if(typeof a$ID === "undefined") {a$ID = 0};
- if(typeof hasfishingrod$ID === "undefined") {hasfishingrod$ID = 0}
- var fishingRod$ID = 0
- var rodPrice = 6900
- var output = "";
- if(hasfishingrod$ID>=1) {output = "**You already bought a fishing rod :P**"
- fishingRod$ID = 1};
- if(a$ID<rodPrice) {output = "**You only have " + encodeURIComponent(a$ID) + " coins!**\nA fishing rod costs $6900 :P"};
- if(a$ID>=rodPrice && hasfishingrod$ID<1) {
- a$ID -= rodPrice
- fishingRod$ID += 1
- hasfishingrod$ID += 1
- output = "**You successfully bought a fishing rod!**\nUse `.fish` to go fishing :D"};
- $halt $get(output)
- //------------//Fish Commmand//------------//
- $eval
- if(typeof fishingRod$ID === "undefined") {fishingRod$ID = 0};
- var breakChance = $rollnum(1,69)
- if(breakChance === 5) {output = "**Looks like your rod broke!**\nBuy a new one using `.buy fishing-rod`"
- fishingRod$ID === 0
- hasfishingrod$ID === 0}
- if(fishingRod$ID === 1 && breakChance !== 5) {
- var fishChance = $rollnum(1,3)
- var fishMade = $rollnum(1,5) * fishingRod$ID
- var fish$ID = (fish$ID == null) ? fishMade : fish$ID += fishMade;
- var output = ""
- if(fishChance<3) {
- output = "**You just went to fishing and caught " + encodeURIComponent(fishMade) + " :fish: **"};
- if(fishChance === 3) {output = "**You weren't able to catch anything...**\nGuess the weather was too bad :P"
- fish$ID -= fishMade};
- };
- if(fishingRod$ID<1) {output = "**You are not planning to fish with your hand, are you?**\nBuy a fishing rod with `.buy fishing-rod`"};
- $halt $get(output)
- //------------//Sell Commmand//------------//
- $eval
- if(typeof fish$ID === "undefined") {fish$ID = 0};
- if(typeof a$ID === "undefined") {a$ID = 0};
- try{
- var fishSold = $messageAfterCommand
- }catch(e) {fishSold = 0}
- var fishPrice = fishSold * $rollnum(50,150)
- var output = "**Bruh enter a number :P**"
- if(fishSold > fish$ID) {output = "**You can't sell imaginary fishes :/**\nCurrent Balance: " + encodeURIComponent(fish$ID) + " :fish:"};
- if(fishSold <= 0) {output = "**Invalid amount of fish sold.**"};
- if(fishSold <= fish$ID && fish$ID > 0) {
- a$ID += fishPrice
- fish$ID -= fishSold
- output = "**Sold " + encodeURIComponent(fishSold) + " :fish: for `$" + encodeURIComponent(fishPrice) + "`!**"
- };
- $halt $get(output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement