Module:XC2 exchange listing

-- MNU_ShopChangeTask -- ID,Name,SetItem1,SetNumber1,SetItem2,SetNumber2,SetItem3,SetNumber3,SetItem4,SetNumber4,SetItem5,SetNumber5,HideReward,Reward,HideRewardFlag,AddFlagValue,forcequit,IraCraftIndex local listings_table = mw.loadData("Module:XC2 exchange listing/data")

local xc2_exchange_listing = {}

function xc2_exchange_listing.getExchangeListingData(frame) id = tonumber(frame.args[1]) listingEntry = listings_table[id] if listingEntry then -- this is probably better actually than trying to make a loop out of it		return listingEntry[1]..","..listingEntry[2]..","..listingEntry[3]..","..listingEntry[4]..","..listingEntry[5]..","..listingEntry[6]..","..listingEntry[7]..","..listingEntry[8]..","..listingEntry[9]..","..listingEntry[10]..","..listingEntry[11]..","..listingEntry[12]..","..listingEntry[13]..","..listingEntry[14]..","..listingEntry[15]..","..listingEntry[16]..","..listingEntry[17] else return "undefinedListing["..id.."]" end end

return xc2_exchange_listing