Aqui o novo Food System para 8.31
Como até o Eventide me lembro eu fiz um em vetores, porém ficou grande pois as comidas tem certas diferenças em falas
e em tempo de comer.
Ficou assim, substitua tudo o que você tem no other/food.lua por :
--Food system 340 by Ta4e (Soulblaster have some credits)-- --For tibia 8.31+-- local MAX_FOOD = 1200 local crunch = {2684,2687,2689,2690,2691,2787,2788,2789,2790,2791,2792,2793,2794,2795,2796} local mmmm = {2668,2688,6501,6278,6279,6393,6394,6569,6574,8839,8840,8843,8845,8847} local gulp = {2670,2695,5678,6541,6542,6543,6544,6545,7372,7373,7374,7375,7376,7377} local yum = {2673,2674,2675,2676,2677,2679,2680,2681,2682,5097,8841,8842} local munch = {2666,2667,2669,2683,2685,7158,7159,7909,7910,8838} local chomp = {2671,2672} local a0 = {2790,6393,6394,7372,7373,7374,7375,7376,7377} local a12 = {2677,2679,6569,8840,8841,8844} local a24 = {2680,2687,2688} local a48 = {2670,2788,5097,7909,7910} local a60 = {2673,2684,2796,6574,8839,8843,8845} local a72 = {2674,2685,2690,2695,2792,2793,2794,6541,6542,6543,6544,6545} local a96 = {2676,2691,5678} local a108 = {2681,2686,2696,2787,2791} local a120 = {2668,2689,6278,6279,8838,8847} local a180 = {2666,7159} local a240 = {2682,6501} function onUse(cid, item, frompos, item2, topos) if isInArray(munch, item.itemid) == TRUE then som = "munch." elseif isInArray(mmm, item.itemid) == TRUE then som = "Mmmm." elseif isInArray(gulp, item.itemid) == TRUE then som = "gulp." elseif isInArray(chomp, item.itemid) == TRUE then som = "chomp." elseif isInArray(yum, item.itemid) == TRUE then som = "Yum." elseif isInArray(crunch, item.itemid) == TRUE then som = "crunch." elseif item.itemid == 2696 then som = "smack." elseif item.itemid == 8844 then som = "Ouch." elseif item.itemid == 2678 then som = "slurp" food = 216 end if isInArray(a0, item.itemid) == TRUE then food = 0 elseif isInArray(a12, item.itemid) == TRUE then food = 12 elseif isInArray(a24, item.itemid) == TRUE then food = 24 elseif isInArray(a48, item.itemid) == TRUE then food = 48 elseif isInArray(a60, item.itemid) == TRUE then food = 60 elseif isInArray(a72, item.itemid) == TRUE then food = 72 elseif isInArray(a72, item.itemid) == TRUE then food = 96 elseif isInArray(a108, item.itemid) == TRUE then food = 108 elseif isInArray(a120, item.itemid) == TRUE then food = 120 elseif isInArray(a180, item.itemid) == TRUE then food = 180 elseif isInArray(a240, item.itemid) == TRUE then food = 240 elseif item.itemid == 8842 then food = 84 elseif item.itemid == 2667 then food = 144 elseif item.itemid == 2675 then food = 156 elseif item.itemid == 2683 then food = 204 elseif item.itemid == 2669 then food = 254 elseif item.itemid == 2789 then food = 264 elseif item.itemid == 7158 then food = 300 elseif item.itemid == 2671 then food = 360 elseif item.itemid == 2795 then food = 432 elseif item.itemid == 2672 then food = 720 end if getPlayerFood(cid) + food > MAX_FOOD then doPlayerSendCancel(cid, "You are full.") else doPlayerFeed(cid, food) doRemoveItem(item.uid,1) doCreatureSay(cid, som, TALKTYPE_ORANGE_1) end return 1 end
E em actions.xml adicione :
<!-- Food --> <action fromid="2362" toid="2363" script="other/food.lua"/> <action fromid="2666" toid="2691" script="other/food.lua"/> <action fromid="2695" toid="2696" script="other/food.lua"/> <action fromid="2787" toid="2796" script="other/food.lua"/> <action itemid="5097" script="other/food.lua"/> <action itemid="6125" script="other/food.lua"/> <action itemid="6278" script="other/food.lua"/> <action itemid="6279" script="other/food.lua"/> <action itemid="6394" script="other/food.lua"/> <action itemid="6501" script="other/food.lua"/> <action fromid="6541" toid="6545" script="other/food.lua"/> <action itemid="6569" script="other/food.lua"/> <action itemid="6574" script="other/food.lua"/> <action itemid="7158" script="other/food.lua"/> <action itemid="7159" script="other/food.lua"/> <action itemid="7709" script="other/food.lua"/> <action itemid="7710" script="other/food.lua"/> <action fromid="7372" toid="7377" script="other/food.lua"/> <action fromid="8838" toid="8845" script="other/food.lua"/> <action itemid="8847" script="other/food.lua"/>
É isso ai
--edited--
auhahua agora vi um jeito mais facil de fazer ainda
Depois eu coloco aqui
Mais funciona do mesmo jeito
Só que é menor