Thread: [PI] Fishing Formula

Results 1 to 8 of 8
  1. #1 [PI] Fishing Formula 
    Registered Member B E N's Avatar
    Join Date
    May 2012
    Posts
    142
    Thanks given
    14
    Thanks received
    3
    Rep Power
    36
    Hey guys,

    I need some help making a fishing formula so that the higher level you are, the less time it takes to catch the fish. I have been thinking for awhile now and every way that I approach this, it seems that the higher level you are, the more time it takes to catch a fish.

    This is my current timer formula:

    Code:
    private static int getFishingTimer(Client c)
    	{
    		return (int) (Math.round(c.playerLevel[c.playerFishing] / 10) * Math.random());
    	}
    I have been trying to think of ways to make it better, but none come to mind.
    Reply With Quote  
     

  2. #2  
    Banned
    Join Date
    Jun 2015
    Posts
    49
    Thanks given
    25
    Thanks received
    13
    Rep Power
    0
    So timing depends on each 10 levels? Doesn't look right to me.
    Reply With Quote  
     

  3. #3  
    Registered Member B E N's Avatar
    Join Date
    May 2012
    Posts
    142
    Thanks given
    14
    Thanks received
    3
    Rep Power
    36
    Quote Originally Posted by Astro_ View Post
    So timing depends on each 10 levels? Doesn't look right to me.
    No, c.playerLevel[c.playerFishing] / 10 is your fishing level divided by 10, then multiplied by Math.random()

    I mean the current formula still isn't right, but like I said, I can't think of a better one.
    Reply With Quote  
     

  4. #4  
    Registered Member Tylwr's Avatar
    Join Date
    Jul 2012
    Age
    26
    Posts
    478
    Thanks given
    105
    Thanks received
    42
    Rep Power
    15
    Quote Originally Posted by B E N View Post
    Hey guys,

    I need some help making a fishing formula so that the higher level you are, the less time it takes to catch the fish. I have been thinking for awhile now and every way that I approach this, it seems that the higher level you are, the more time it takes to catch a fish.

    This is my current timer formula:

    Code:
    private static int getFishingTimer(Client c)
    	{
    		return (int) (Math.round(c.playerLevel[c.playerFishing] / 10) * Math.random());
    	}
    I have been trying to think of ways to make it better, but none come to mind.
    I took your formula and set it to 25, 50, 75, 99. Ran it 5 times for each level. Results:

    Level: 25
    Code:
    1
    1
    1
    1
    0
    Level: 50
    Code:
    2
    1
    0
    3
    4
    Level: 75
    Code:
    1
    0
    4
    2
    0
    Level: 99
    Code:
    8
    1
    3
    8
    1
    So, the higher the level, the higher the return value is. Here is what I used to generate them:
    Code:
    package test;
    
    public class main {
    	
    	public static void main(String args[]) {
    		
    		System.out.println((int) (Math.round(25 / 10) * Math.random()));
    		System.out.println((int) (Math.round(25 / 10) * Math.random()));
    		System.out.println((int) (Math.round(25 / 10) * Math.random()));
    		System.out.println((int) (Math.round(25 / 10) * Math.random()));
    		System.out.println((int) (Math.round(25 / 10) * Math.random()));
    		System.out.println("===============================");
    		System.out.println((int) (Math.round(50 / 10) * Math.random()));
    		System.out.println((int) (Math.round(50 / 10) * Math.random()));
    		System.out.println((int) (Math.round(50 / 10) * Math.random()));
    		System.out.println((int) (Math.round(50 / 10) * Math.random()));
    		System.out.println((int) (Math.round(50 / 10) * Math.random()));
    		System.out.println("===============================");
    		System.out.println((int) (Math.round(75 / 10) * Math.random()));
    		System.out.println((int) (Math.round(75 / 10) * Math.random()));
    		System.out.println((int) (Math.round(75 / 10) * Math.random()));
    		System.out.println((int) (Math.round(75 / 10) * Math.random()));
    		System.out.println((int) (Math.round(75 / 10) * Math.random()));
    		System.out.println("===============================");
    		System.out.println((int) (Math.round(99 / 10) * Math.random()));
    		System.out.println((int) (Math.round(99 / 10) * Math.random()));
    		System.out.println((int) (Math.round(99 / 10) * Math.random()));
    		System.out.println((int) (Math.round(99 / 10) * Math.random()));
    		System.out.println((int) (Math.round(99 / 10) * Math.random()));
    		System.out.println("===============================");
    	}
    
    }
    Also, math.round rounds the number obviously, so if you do 99 / 10 you get 10(?), or 50 / 10 you get 5 right? So if you times it by 0.0 to 1.0 via math.random(), 10 * .3 = 3 seconds or cycles or whatever you using the variable for.

    Your current method expanded:
    Math.round = Rounds the number within the parenthesis to the closest whole number, eg: 9.3 = 9, 3.5 = 4.
    / = Divide a number by a number
    Math.random = returns a value from 0.0 to 1.0
    Math.round(moving the decimal point of the players fishing level to the right once) * a value 0.0 to 1.0

    Hope this makes sense and helps you on your endeavor.
    Attached image
    Quote my post for me to see your reply.
    Discord: tiller#2854

    Reply With Quote  
     

  5. Thankful user:


  6. #5  
    plz dont take my wizard mind bombs Women's Avatar
    Join Date
    Mar 2010
    Posts
    1,881
    Thanks given
    724
    Thanks received
    1,162
    Rep Power
    4763
    You should be more specific about what you want.

    There's tons of ways to do what you asked
    Reply With Quote  
     

  7. #6  
    Banned [PI] Fishing Formula Market Banned

    -3clipse-'s Avatar
    Join Date
    May 2015
    Posts
    839
    Thanks given
    101
    Thanks received
    311
    Rep Power
    389
    Just take your formula and add "10 -" in front of it.

    Problem solved.
    Reply With Quote  
     

  8. #7  
    Registered Member B E N's Avatar
    Join Date
    May 2012
    Posts
    142
    Thanks given
    14
    Thanks received
    3
    Rep Power
    36
    Quote Originally Posted by Tylwr View Post
    I took your formula and set it to 25, 50, 75, 99. Ran it 5 times for each level. Results:

    Level: 25
    Code:
    1
    1
    1
    1
    0
    Level: 50
    Code:
    2
    1
    0
    3
    4
    Level: 75
    Code:
    1
    0
    4
    2
    0
    Level: 99
    Code:
    8
    1
    3
    8
    1
    So, the higher the level, the higher the return value is. Here is what I used to generate them:
    Code:
    package test;
    
    public class main {
    	
    	public static void main(String args[]) {
    		
    		System.out.println((int) (Math.round(25 / 10) * Math.random()));
    		System.out.println((int) (Math.round(25 / 10) * Math.random()));
    		System.out.println((int) (Math.round(25 / 10) * Math.random()));
    		System.out.println((int) (Math.round(25 / 10) * Math.random()));
    		System.out.println((int) (Math.round(25 / 10) * Math.random()));
    		System.out.println("===============================");
    		System.out.println((int) (Math.round(50 / 10) * Math.random()));
    		System.out.println((int) (Math.round(50 / 10) * Math.random()));
    		System.out.println((int) (Math.round(50 / 10) * Math.random()));
    		System.out.println((int) (Math.round(50 / 10) * Math.random()));
    		System.out.println((int) (Math.round(50 / 10) * Math.random()));
    		System.out.println("===============================");
    		System.out.println((int) (Math.round(75 / 10) * Math.random()));
    		System.out.println((int) (Math.round(75 / 10) * Math.random()));
    		System.out.println((int) (Math.round(75 / 10) * Math.random()));
    		System.out.println((int) (Math.round(75 / 10) * Math.random()));
    		System.out.println((int) (Math.round(75 / 10) * Math.random()));
    		System.out.println("===============================");
    		System.out.println((int) (Math.round(99 / 10) * Math.random()));
    		System.out.println((int) (Math.round(99 / 10) * Math.random()));
    		System.out.println((int) (Math.round(99 / 10) * Math.random()));
    		System.out.println((int) (Math.round(99 / 10) * Math.random()));
    		System.out.println((int) (Math.round(99 / 10) * Math.random()));
    		System.out.println("===============================");
    	}
    
    }
    Also, math.round rounds the number obviously, so if you do 99 / 10 you get 10(?), or 50 / 10 you get 5 right? So if you times it by 0.0 to 1.0 via math.random(), 10 * .3 = 3 seconds or cycles or whatever you using the variable for.

    Your current method expanded:
    Math.round = Rounds the number within the parenthesis to the closest whole number, eg: 9.3 = 9, 3.5 = 4.
    / = Divide a number by a number
    Math.random = returns a value from 0.0 to 1.0
    Math.round(moving the decimal point of the players fishing level to the right once) * a value 0.0 to 1.0

    Hope this makes sense and helps you on your endeavor.
    It's supposed to be the higher level, the lower the return value. If the player is at 99 fishing and the time is returning "8" cycles and 8 cycles is about 4800 milliseconds (4.8 seconds) multiplied by Math.random() So it would take whatever value it returns and the longer it takes for a fish to be caught at level 99.

    At level 1, I see it's returning values such as "1" and "0", which would take no time at all to catch the fish.

    These two should be switched. This was the problem I was having, I couldn't get the formula to calculate longer for lower levels.

    Let me know if I'm wrong or I misunderstood you.
    Reply With Quote  
     

  9. #8  
    Community Veteran


    Arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,950
    Thanks given
    210
    Thanks received
    349
    Rep Power
    1376
    A simple foruma count be: fishtime - fishlvl-fishreq/10.
    Just tinker a little with it and I'm sure you can find one.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [pi] fishing
    By Ninja assassin in forum Help
    Replies: 2
    Last Post: 08-17-2011, 04:51 AM
  2. [PI] Fishing Emotes [PI]
    By EpIcKoLoL in forum Help
    Replies: 4
    Last Post: 05-24-2011, 12:29 AM
  3. [PI] Fishing [PI]
    By umad in forum Help
    Replies: 0
    Last Post: 04-17-2011, 12:20 PM
  4. dspk/Pi fishing
    By i pk 0wn u in forum Help
    Replies: 1
    Last Post: 01-07-2011, 06:10 PM
  5. Fishing formula
    By lukas265 in forum Requests
    Replies: 0
    Last Post: 09-09-2009, 01:52 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •