Sobeman459
Member
Oki have this fishlist = [142, 143, 144, 145, 146, 147, 148, 149, 150, 152] i want later one in the script to randomly place one of these items into the player inventory, but also be able to display what item it was in a window. The item should be @fish and i made this little class to do so.
class Fish
attr_reader :base_id
def initialize(base_id)
@base_id = base_id
base = $data_items[base_id]
end
def icon_name
return $data_items[@base_id].icon_name
end
def name
return $data_items[@base_id].name
end
end
Thanks again
-Sobe
class Fish
attr_reader :base_id
def initialize(base_id)
@base_id = base_id
base = $data_items[base_id]
end
def icon_name
return $data_items[@base_id].icon_name
end
def name
return $data_items[@base_id].name
end
end
Thanks again
-Sobe