Thread: How to get accurate skill success chances for your server.

Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16
  1. #11  
    Renown Programmer
    Bartvh's Avatar
    Join Date
    May 2017
    Posts
    370
    Thanks given
    89
    Thanks received
    208
    Rep Power
    497
    It's easier to just append ?action=raw to the url then you get something like this.
    This also allows for easy parsing/dumping data.
    Attached image
    Guthix Open Source Emulation Framework
    Reply With Quote  
     

  2. Thankful users:


  3. #12  
    Registered Member
    Tyluur's Avatar
    Join Date
    Jun 2010
    Age
    26
    Posts
    5,103
    Thanks given
    1,818
    Thanks received
    1,767
    Rep Power
    2438
    Quote Originally Posted by George View Post
    What was done previously? I guess the difference is that this is the confirmed method that JaGex uses, and the low/high chances are the most accurate numbers you're gonna get as its been crowdsourced from thousands of people using runelite.
    Nice, was reading the code at like 3AM at night trying to remember how I wrote fishing lol. Good stuff
    Quote Originally Posted by blakeman8192 View Post
    Keep trying. Quitting is the only true failure.
    Spoiler for skrrrrr:

    Attached image
    Reply With Quote  
     

  4. #13  
    How to get accurate skill success chances for your server.



    Scu11's Avatar
    Join Date
    Aug 2007
    Age
    30
    Posts
    16,307
    Thanks given
    7,215
    Thanks received
    12,308
    Rep Power
    5000
    Quote Originally Posted by Kris View Post
    Include the cascade function found on wikia as well please.
    where is this on the wiki?

    edit: nvm its https://oldschool.runescape.wiki/w/M..._success_chart

    Attached image
    Reply With Quote  
     

  5. #14  
    Respected Member


    Kris's Avatar
    Join Date
    Jun 2016
    Age
    26
    Posts
    3,638
    Thanks given
    820
    Thanks received
    2,642
    Rep Power
    5000
    Since George hasn't done it yet, I'll add the cascade function as a reply to this thread as well, converted from lua to kotlin for those who might struggle with it.

    Code:
        fun interpolate(low: Int, high: Int, level: Int) : Double {
            val value = floor(low * (99 - level) / 98.0) + floor(high * (level - 1) / 98.0) + 1
            return min(max((value / 256), 0.0), 1.0)
        }
    
        fun cascadeInterpolate(elements: Array<Element>, level: Int, index: Int) : Double {
            assert(elements contentEquals elements.copyOf().sortedByDescending { it.req }.toTypedArray()) { "Elements array is not sorted." }
            var rate = 1.0
            for (i in elements.indices) {
                val v = elements[i]
                if (i == index) {
                    rate *= interpolate(v.low, v.high, level)
                    return rate
                }
                if (level >= v.req) {
                    rate *= 1 - interpolate(v.low, v.high, level)
                }
            }
            throw IllegalStateException("Index out of bounds")
        }
    
        data class Element(val low: Int, val high: Int, val req: Int)
    Example usage:
    Code:
    val successProbability = cascadeInterpolate(elements, playerLevel, indexOfElementInArray)//returns a double from 0 to 1, giving the probability of the given action succeeding.
    Note: When the array of elements is passed to the cascade function, the array must have been sorted in descending order, starting with the highest level element. If they're out of order, you will receive invalid probabilities. All the examples in Wikia I could find had them in descending order, starting with the highest level one. Thus the assertion at the top of the cascade function.

    The formula is, as Scu11 mentioned above, from Skilling Success Chart.
    Attached image
    Reply With Quote  
     

  6. Thankful users:


  7. #15  
    Registered Member

    Join Date
    Sep 2016
    Posts
    181
    Thanks given
    84
    Thanks received
    74
    Rep Power
    452
    Nice. The way fishing works is it rolls for the highest level fish and gices that if success else repeat for the next fish. So salmon is prioritized over trout, anchovies over shrimp.
    Reply With Quote  
     

  8. #16  
    Banned

    Join Date
    May 2016
    Age
    55
    Posts
    1,137
    Thanks given
    565
    Thanks received
    600
    Rep Power
    0
    Will use this when I rewrite my skills on my project thanks!
    Reply With Quote  
     

Page 2 of 2 FirstFirst 12

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. Replies: 3
    Last Post: 03-22-2013, 11:38 PM
  2. Replies: 7
    Last Post: 09-14-2011, 05:19 PM
  3. [GUIDE] How to get SMS+PBP PIN-s for free [5$]
    By Rune-Exclusion in forum Selling
    Replies: 2
    Last Post: 01-13-2011, 07:03 PM
  4. How to get the most performance out of your code
    By thiefmn6092 in forum RS 503+ Client & Server
    Replies: 26
    Last Post: 02-08-2009, 10:51 AM
  5. Replies: 24
    Last Post: 09-15-2007, 04:32 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
  •