Untitled

mail@pastecode.io avatar
unknown
lua
a year ago
327 B
3
Indexable
Never
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