Hello,
var foodName = Lua.LuaDoString<string>(@"
local foodId = {113509,80610,80618,65499,43523,43518,34062,22019,65517,22895,65516,8076,65515,8075,65500,1487,1114,1113,5349}
local cid = 0;
local maxCount = 0;
for i, id in ipairs(foodId) do
local c = GetItemCount(id);
if c > maxCount then
maxCount = c;
cid = id;
end
end
if cid <= 0 then
return "";
end
local name = GetItemInfo(cid);
return name;
");
if (!string.IsNullOrWhiteSpace(foodName))
{
wManager.wManagerSetting.CurrentSetting.FoodPercent = 60;
wManager.wManagerSetting.CurrentSetting.FoodName = foodName;
}