Untitled

 avatar
unknown
lua
3 years ago
327 B
7
Indexable
function AutoLoot.ExistItemByName(name)
	local items = io.open("data/items/items.xml", "r")
	if items then
		local contents = items:read("*all"):lower()
		local getItem = contents:match('name="' .. name:gsub('%p', ''):lower() ..'"')
		if (not getItem or getItem == "") then
			return false
		end
	end
	return true
end
Editor is loading...