1. The moderators of this forum are Nexus, .com, religiousjedi, shiny finder, and TheMantyke.
  2. Welcome to Smogon Forums! Please take a minute to read the rules.
  3. Welcome to Wi-Fi! Please remember to read the rules and do NOT create a new thread for simple trades or Friend Safari codes.
  4. Click here to ensure that you never miss a new SmogonU video upload!

Past Gen RNG Research

Discussion in 'Wi-Fi' started by mingot, Sep 12, 2009.

  1. Kaphotics

    Kaphotics Remodeling Kitchens
    is a Researcher Alumnusis a Contributor Alumnus

    Apr 25, 2009
    Goldenrod Department Store RNG (HGSS)

    Rand % 100
    0-3   (1st Prize)  4% for TMs
    4-39  (2nd Prize) 36% for Balls
    40-99 (3rd Prize) 60% for Berries (-> Rand%70 for 7 berries)
    ingame scriptcode (open)
    Message 0xb        ' All right. Please draw one!/r.../n.../r/0 '
    017C 0x800c 0x64                     Rand%100
    If 0x800c 0x28                       >= 40    (60%)
    COMPARELASTRESULT 0x4 func_16        goto 3rd: Berry
    If 0x800c 0x4                        >= 4    (36%)
    COMPARELASTRESULT 0x4 func_17        goto 2nd: Ball
    If 0x800c 0x0                        >= 0    (4%)
    COMPARELASTRESULT 0x4 func_18        goto 1st: TM
    Berry Branch:
    Fanfare 0x913
    SetvarNum 0x0 0x3    ' Wow!/nYou've got yourself the no. [VAR NUM: 2 .0 ] .0  prize!/rPlease take it./r/0 '
    Message 0xc
    017C 0x800c 0x46                     Rand%70
    If 0x800c 0x3c                       >= 60
    COMPARELASTRESULT 0x4 func_44        gives 0x009B = Oran
    If 0x800c 0x32                       >= 50
    COMPARELASTRESULT 0x4 func_45        gives 0x0096 = Chesto
    If 0x800c 0x28                       >= 40
    COMPARELASTRESULT 0x4 func_46        gives 0x0097 = Pecha
    If 0x800c 0x1e                       >= 30
    COMPARELASTRESULT 0x4 func_47        gives 0x0098 = Rawst
    If 0x800c 0x14                       >= 20
    COMPARELASTRESULT 0x4 func_48        gives 0x0099 = Aspear
    If 0x800c 0xa                        >= 10
    COMPARELASTRESULT 0x4 func_49        gives 0x009A = Leppa
    If 0x800c 0x0                        >= 0
    COMPARELASTRESULT 0x4 func_50        gives 0x0095 = Cheri
    Vending Machine to verify blastoise_x
    Rand % 64
    0    - Give Extra Drink
    1-63 - Don't Give Extra Drink
    ingame scriptcode (open)
    017C 0x800c 0x40                   varC rand%0x40
    If 0x800c 0x0                      cmp(varC,0)
    COMPARELASTRESULT 0x5 func_36      if != goto start
    Fanfare 0x616                      play clang
    SetvarItem 0x0 0x8001              textvar = itemname
    Message 0x7                        "Clang!\rBonus! Another can of [item]\ndropped down.\r"

    They gr/eq for their statements when checking high->low; in gen V they check low->high but with le/eq's. (script cmp values for reference)
    Last edited: Jan 21, 2014
    Edu likes this.

Users Viewing Thread (Users: 0, Guests: 0)