Module:Attributes

From Exiled Kingdoms Wiki
Revision as of 18:59, 7 June 2017 by M3lkor (talk | contribs) (Created page with "p = {} Arg1 = mw.getCurrentFrame().args[1] Arg2 = mw.getCurrentFrame().args[2] ArmAttr = {'Detection', 'Gossip', 'Stability', 'Stun Immunity', 'Tinkering', 'Wisdom', 'Shield...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

p = {}

Arg1 = mw.getCurrentFrame().args[1] Arg2 = mw.getCurrentFrame().args[2]

ArmAttr = {'Detection', 'Gossip', 'Stability', 'Stun Immunity', 'Tinkering', 'Wisdom', 'Shield'}

WpnAttr = {'Beast Slayer', 'Holy', 'Orc Slayer', 'Paralysis', 'Silver', 'Slow', 'Stun', 'Vicious'}

function p.Disp()

   txtout = 
   attribs = mw.text.split(Arg1,',',true)
   if (Arg2 == 'a') then
       for i, attr in pairs(attribs) do
           if (tonumbet(attr) > 0) then
               if (txtout ~= ) then
                   txtout = string.format('%s; %s %s', txtout, ArmAttr[i], attr)
               else
                   txtout = string.format('%s %s',ArmAttr[i], attr)
               end
           end
       end
   elseif (Arg2 == 'w') then
       
   end
   return txtout

end


return p