Module:Inventory: Difference between revisions

From Exiled Kingdoms Wiki
(Created page with "p = {} invName = mw.getCurrentFrame().args[0] invItm = mw.getCurrentFrame().args[1] invArm = mw.getCurrentFrame().args[2] invWpn = mw.getCurrentFrame().args[3] invMark = mw.ge...")
 
mNo edit summary
Line 1: Line 1:
p = {}
p = {}
invName = mw.getCurrentFrame().args[0]
invName = mw.getCurrentFrame().args[1]
invItm = mw.getCurrentFrame().args[1]
invItm = mw.getCurrentFrame().args[2]
invArm = mw.getCurrentFrame().args[2]
invArm = mw.getCurrentFrame().args[3]
invWpn = mw.getCurrentFrame().args[3]
invWpn = mw.getCurrentFrame().args[4]
invMark = mw.getCurrentFrame().args[4]
invMark = mw.getCurrentFrame().args[5]
invFunc = mw.getCurrentFrame().args[5]
invFunc = mw.getCurrentFrame().args[6]


function getItems()
function getItems()
     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)
         tmptbl ={invItm, invArm, invWpn, invMark}
         tmptbl ={invItm, invArm, invWpn, invMark}
         return mw.getCurrentFrame().expandTemplate{ title = invName, args = tmptbl }
         return mw.getCurrentFrame().expandTemplate{ title = invName, args = tmptbl }

Revision as of 04:12, 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 (invItm ~= nil) then
       Items = mw.text.split(invItm,',',true)
       invName = string.format(':%s',invName)
       tmptbl ={invItm, invArm, invWpn, invMark}
       return mw.getCurrentFrame().expandTemplate{ title = invName, args = tmptbl }
   end
   if (invArm ~= nil) then
       
       
   end
   if (invWpn ~= nil) then
       
       
   end

end return p