Results 1 to 2 of 2

Thread: My Random Library by Daniel

  1. #1
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default My Random Library by Daniel

    Well, I couldn't be bothered scouring Simba's source to find the correct place to put all of these in and then export them, so I decided to create this!

    Basically, it can do the following:
    • Custom random seeds.
    • Can update/change the random seed (only really needs to be done once per script). (call Randomise)
    • Semi-true randomness (connects to Random.ORG to get a good, random seed value).
    • Can force Simba to use this library instead of its own (forces SRL to use it as-well if included first)


    I will be using it in my scripts (harder for Jagex to catch me if they can somehow generate the exact same seed value created at script execution <- PARANOIA!)

    Properties/Methods included:
    PHP Code:
        PROPERTIES:
          
    randomSeed (unsigned integer) - The actual seed valueIt is advised to
                                
    use the method SetRandomSeed to set a seed value.

        
    METHODS:
          
    SetRandomSeed Modifies randomSeed to a user-entered value.
          
    RandomiseWeb  Connects to Random.ORG to set a 'true' randomSeed value.
          
    Randomise     Changes the randomSeed value to the current operation time
                        of your operating system
    .
          
    Rand          Returns a random value between 0 (inclusive) and (not
                        inclusive
    ). See Random() documentation.
          
    RandF         Returns a random value between 0.0 (inclusive) and 1.0.
          
    RandRange     Returns a random value between two specified values
    Anyways, enough with the chit-chat, here you go

    Save to: Includes/Random.simba

    File is attached.
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  2. #2
    Join Date
    Jul 2007
    Location
    Finland
    Posts
    304
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I am too paranoid to use this i am using /dev/random

Thread Information

Users Browsing this Thread

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •