User File #15492143967959935

Upload All User Files

#15492143967959935 - Bari, Biri, Cheep Cheep, Ghini (slash)

Bari,Biri,Cheep-Cheep,Ghini.slash.lua
794 downloads
Uploaded 6/20/2014 4:11 PM by SBD (see all 61)
----
--Bari,Biri,Cheep-Cheep,Ghini.slash
----
----
--drop:          2/8
----
--Heart:         32/32
--1 Rupee:       0/32
--5 Rupees:      0/32
--Fairy:         0/32
--Bombs:         0/32
--Ember Seeds:   0/32
--Mystery Seeds: 0/32
--Scent Seeds:   0/32
--Pegasus Seeds: 0/32
--Gale Seeds:    0/32
----



local function RNG (low,high)

  low=3*low
  if high>85 then low=low+1 end
  if high>170 then low=low+1 end
  if low>255 then low=low-256 end
  if low>255 then low=low-256 end
  high=high+low
  if high>255 then high=high-256 end

  return low, high
end

memory.usememorydomain("HRAM")

while true do

  local low0,high0 = memory.readbyte (0x0015), memory.readbyte (0x0014)
  local low1,high1 = RNG (low0,high0)
  local low2,high2 = RNG (low1,high1)
  local low3,high3 = RNG (low2,high2)
  local lh2 = high2%64
  local lh3 = high3%32


  if lh2==0x03 or
     lh2==0x0C or
     lh2==0x0E or
     lh2==0x10 or
     lh2==0x13 or
     lh2==0x1A or
     lh2==0x1D or
     lh2==0x23 or
     lh2==0x27 or
     lh2==0x28 or
     lh2==0x2F or
     lh2==0x34 or
     lh2==0x35 or
     lh2==0x37 or
     lh2==0x39 or
     lh2==0x3C

    then

    if lh3==0x00 then
      drop="Heart"
    elseif lh3==0x01 then
      drop="Heart"
    elseif lh3==0x02 then
      drop="Heart"
    elseif lh3==0x03 then
      drop="Heart"
    elseif lh3==0x04 then
      drop="Heart"
    elseif lh3==0x05 then
      drop="Heart"
    elseif lh3==0x06 then
      drop="Heart"
    elseif lh3==0x07 then
      drop="Heart"
    elseif lh3==0x08 then
      drop="Heart"
    elseif lh3==0x09 then
      drop="Heart"
    elseif lh3==0x0A then
      drop="Heart"
    elseif lh3==0x0B then
      drop="Heart"
    elseif lh3==0x0C then
      drop="Heart"
    elseif lh3==0x0D then
      drop="Heart"
    elseif lh3==0x0E then
      drop="Heart"
    elseif lh3==0x0F then
      drop="Heart"
    elseif lh3==0x10 then
      drop="Heart"
    elseif lh3==0x11 then
      drop="Heart"
    elseif lh3==0x12 then
      drop="Heart"
    elseif lh3==0x13 then
      drop="Heart"
    elseif lh3==0x14 then
      drop="Heart"
    elseif lh3==0x15 then
      drop="Heart"
    elseif lh3==0x16 then
      drop="Heart"
    elseif lh3==0x17 then
      drop="Heart"
    elseif lh3==0x18 then
      drop="Heart"
    elseif lh3==0x19 then
      drop="Heart"
    elseif lh3==0x1A then
      drop="Heart"
    elseif lh3==0x1B then
      drop="Heart"
    elseif lh3==0x1C then
      drop="Heart"
    elseif lh3==0x1D then
      drop="Heart"
    elseif lh3==0x1E then
      drop="Heart"
    elseif lh3==0x1F then
      drop="Heart"
    end

  else drop = "-"
  end


  gui.text(0,16,drop)
  emu.frameadvance()
end