Advertisement
Guest User

Untitled

a guest
Sep 1st, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.55 KB | None | 0 0
  1.  
  2. function SettingsTag(name,options)
  3.    
  4.     local list = {"<%s",name}
  5.     local star = false
  6.     for k,v in pairs(options) do
  7.         list[1] = list[1] .. " " .. k .. " =%q"
  8.         table.insert(list,v)
  9.     end
  10.     list[1] = list[1] .. "/>"
  11.     table.insert(list,"")
  12.     What(unpack(list))
  13.     return string.format(unpack(list))
  14. end
  15.  
  16.  
  17. print(SettingsTag("item",{spell = "exura ico", mana = 40, vcomp = 0, vsign = 1, vrandom = 1, vvalue = 75, enable = 1})))
  18.  
  19. --[[
  20.  Prints : <item spell ="exura ico" vrandom ="1" vvalue ="75" enable ="1" mana ="40" vsign
  21. ="1" vcomp ="0"/>
  22.  
  23. ]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement