TheLeetCoder

XML get info

Oct 28th, 2013
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. if tfm.get.room.xmlMapInfo then
  2. for object in tfm.get.room.xmlMapInfo.xml:gmatch('<P P="0,0" [^/]+ T="81" [^/]+ />') do -- <P P="0,0" Y="98" T="81" X="20" />
  3. x=tonumber(object:match('X="(%d+)"'))
  4. y=tonumber(object:match('Y="(%d+)"'))
  5. tfm.exec.addShamanObject(27, x, y)
  6. end
  7. end
Advertisement
Add Comment
Please, Sign In to add comment