Module:Animal species data

-- local p = {}

local specielist = { {'rabbit',17,'Small','Seeds, vegetables, fruits, flowers',5,'minutes',0,'minutes',15,'minutes',15,'minutes',15,'minutes',0,100,175,225,25}, {'chicken',28,'Small','Seeds, vegetables, fruits',1,'hour',30,'minutes',30,'minutes',30,'minutes',30,'minutes',250,375,750,1125,25}, {'chinchompa',54,'Small','Seeds, vegetables, fruits, flowers, mushrooms, meat, fish',4,'hours',0,'minutes',8,'hours',16,'hours',20,'hours',0,6000,10500,13500,250}, {'sheep',35,'Medium','Vegetables, fruits, flowers',1,'hour',0,'minutes',30,'minutes',30,'minutes',30,'minutes',0,250,437,562,80}, {'spider',64,'Medium','Seeds, meat',6,'hours',2,'hours',4,'hours',8,'hours',8,'hours',2000,3000,6000,9000,250}, {'zygomite',81,'Medium','Mushrooms',8,'hours',0,'minutes',18,'hours',30,'hours',30,'hours',0,16000,28000,36000,850}, {'cow',49,'Large','Vegetables, fruits, flowers',5,'hours',0,'minutes',90,'minutes',2,'hours',2,'hours',0,1000,1750,2250,170}, {'yak',71,'Large','Vegetables, fruits, flowers',5,'hours',0,'minutes',15,'hours',15,'hours',15,'hours',0,13000,22750,29250,850}, {'dragon',92,'Large','Meat, fish',18,'hours',18,'hours',24,'hours',48,'hours',72,'hours',20000,30000,60000,90000,2000}, }

local tables = require('Module:Tables')

local globalframe = ''

function p.giveinfo(frame) globalframe = frame local args = frame:getParent.args local specie = args.specie or '' specie = specie:lower local param = args.param or '' param = param:lower if specie ~=  and param ~=  then local level = 0 local pen = '' local food = '' local breeding = 0 local breedingunit = '' local babytime = 0 local babytimeunit = '' local adolescenttime = 0 local adolescenttimeunit = '' local adulttime = 0 local adulttimeunit = '' local eldertime = 0 local eldertimeunit = '' local babyxp = 0 local adolescentxp = 0 local adultxp = 0 local elderxp = 0 local beans = 0 for i=1,10 do           if specie == specielist[i][1] then specielist[i][2] = level specielist[i][3] = pen specielist[i][4] = food specielist[i][5] = breeding specielist[i][6] = breedingunit specielist[i][7] = babytime specielist[i][8] = babytimeunit specielist[i][9] = adolescenttime specielist[i][10] = adolescenttimeunit specielist[i][11] = adulttime specielist[i][12] = adulttimeunit specielist[i][13] = eldertime specielist[i][14] = eldertimeunit specielist[i][15] = babyxp specielist[i][16] = adolescentxp specielist[i][17] = adultxp specielist[i][18] = elderxp specielist[i][19] = beans break end end if param == 'level' then return level elseif param == 'pen' then return pen elseif param == 'food' then return food elseif param == 'breeding' then return breeding elseif param == 'breedingunit' then return breedingunit elseif param == 'babytime' then return babytime elseif param == 'babytimeunit' then return babytimeunit elseif param == 'adolescenttime' then return adolescenttime elseif param == 'adolescenttimeunit' then return adolescenttimeunit elseif param == 'adulttime' then return adulttime elseif param == 'adulttimeunit' then return adulttimeunit elseif param == 'eldertime' then return eldertime elseif param == 'eldertimeunit' then return eldertimeunit elseif param == 'babyxp' then return babyxp elseif param == 'adolescentxp' then return adolescentxp elseif param == 'adultxp' then return adultxp elseif param == 'elderxp' then return elderxp elseif param == 'beans' then return beans end end end

return p