Rainbow Table and srand (), i need help please.

This is a discussion on Rainbow Table and srand (), i need help please. within the Game Programming forums, part of the General Programming Boards category; Ok, I am playing a game and let say that i want to upgrade my gear by linking items in ...

  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    6

    Rainbow Table and srand (), i need help please.

    Ok, I am playing a game and let say that i want to upgrade my gear by linking items in it. The items give you a 22% linking chance. I know that in order to link i need numbers lower than 22000/100000. I know that anything under 22000 can be linked. In order to know at what time i can get a number under 22000 i need to use a rainbow table to get a timeframe and put it in the srand(). This is a guy trying to explain me how to do it, but since i do not know anything about the Rainbow table i cannot manage to do it.


    tell him this: srand(time) % 10000, you need the results of that mapped out into a rainbow table


    for a timeframe


    you used this

    Code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <time.h>
    
    
    int main(void)
    {
    int i;
    time_t t;
    
    
    srand((unsigned) time(&t));
    
    
    for(i=0; i<10; i++)
    printf("%d\n", rand() % 100);
    return 0;
    }
    but you're thinking about it the wrong way
    you will never be accurate enough trying it like that
    You just want to output the results of srand()


    Timestamp is just a really long number
    and it's sequential


    so, you can.... predict what... 12/2/2011 11:32:10 PM would be
    exactly.
    in a timestamp format


    Now, if XXX game's RNG runs off the timestamp of the current time...
    you can predict what it will generate
    at 12/2/2011 11:32:10 PM
    in the future.


    So, a rainbow table just basically lists "all" the possible outcomes. I do 7 hours worth of times in my rainbow tables


    Then I look for groups of time periods where linking % is high


    because you just can't get accurate enough to know what exact server time is + the lag


    So, you want to feed srand() with future times and map them out into a spreadsheet (excel or something)


    Just small periods of time, then look at allllll the numbers under 22,000


    because those are the ones that will link.
    Or %%,000. whatever % it is


    22,000 = 22%, etc.


    and make a table with srand() outputs


    then try to find a big group of low numbers


    You want about... 2-3 seconds where 80% of the numbers are under your desired linking %. It's not hard to find if you have the output in front of you


    Here are steps
    1) pick day you want to link
    2) find a 10-20 minute time period, predict their unix timestamps (just calculate, google it )
    3) feed all those unix timestamps into srand() in order
    4) save srand's output into CSV or some kind of output you can read
    11:28pm
    5) evaluate for 2-3 seconds of low numbers
    ^--- linking in a nutshell

    I know this is a little be complicated but i hope any of you know, what i am trying to accomplish here.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,434
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Rainbow
    By ram4nd in forum C Programming
    Replies: 6
    Last Post: 05-09-2009, 10:12 PM
  2. Sorting a table and saving a table help!!!
    By MrMe913 in forum C Programming
    Replies: 4
    Last Post: 04-18-2007, 12:19 PM
  3. plz help w/ srand();
    By snowBunnie in forum C Programming
    Replies: 7
    Last Post: 04-29-2005, 04:12 PM
  4. When to srand()?
    By Imperito in forum C++ Programming
    Replies: 1
    Last Post: 05-12-2002, 12:20 AM
  5. srand
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 02-26-2002, 05:06 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21