Module:Inventory: Difference between revisions

From Exiled Kingdoms Wiki
mNo edit summary
mNo edit summary
Line 8: Line 8:


function getItems()
function getItems()
    if invMark == nil then
        invMark = 1
    end
     if (invItm ~= nil) then
     if (invItm ~= nil) then
         Items = mw.text.split(invItm,',',true)
         Items = mw.text.split(invItm,';',true)
         invName = string.format(':%s',invName)
         itmtxt = ''
         tmptbl ={invItm, invArm, invWpn, invMark}
        argtbl = { 'ItmCityTblx', string.format('Markup=%s',invMark)}
        return mw.getCurrentFrame().expandTemplate{ title = invName, args = tmptbl }
         for itm in Items do
            inm = string.format(':%s',itm)
            itmtxt = itmtxt + mw.getCurrentFrame().expandTemplate{ title = inm, args = argtbl }
        end
        return itmtxt
     end
     end
     if (invArm ~= nil) then
     if (invArm ~= nil) then

Revision as of 04:23, 7 June 2017

p = {} invName = mw.getCurrentFrame().args[1] invItm = mw.getCurrentFrame().args[2] invArm = mw.getCurrentFrame().args[3] invWpn = mw.getCurrentFrame().args[4] invMark = mw.getCurrentFrame().args[5] invFunc = mw.getCurrentFrame().args[6]

function getItems()

   if invMark == nil then
       invMark = 1
   end
   if (invItm ~= nil) then
       Items = mw.text.split(invItm,';',true)
       itmtxt = 
       argtbl = { 'ItmCityTblx', string.format('Markup=%s',invMark)}
       for itm in Items do
           inm = string.format(':%s',itm)
           itmtxt = itmtxt + mw.getCurrentFrame().expandTemplate{ title = inm, args = argtbl }
       end
       return itmtxt
   end
   if (invArm ~= nil) then
       
       
   end
   if (invWpn ~= nil) then
       
       
   end

end return p