------------------------------------------------ -- Use food and check for its buff -- JDuarteDJ ------------------------------------------------ function UseFood(food, buff) if food == nil then cprintf(cli.yellow,"No food specified. Please use 'UseFood(foodname[,buffname])'.\n") return false end if buff == nil then buff = food; --Assume both have same name like in mounts end if player:hasBuff(buff) == false and inventory:itemTotalCount(food) > 0 then inventory:useItem(food); cprintf(cli.yellow,"Yum! Ate %s.\n",food) end return true end