Jump to content
  • 0

Food System Com Regen Proprio!


wenderotpoke

Question

Cara não sei se e possivel mas queria um sistema de regen fora o base que o proprio game ja tem né no vactions quando ta de barriga cheia. queria que o food tivesse um regen dele mesmo tipo por exemplo a Pizza dar 10 de vida /s e o hotdog dar 7.5. a ideia é usar esses numeros do proprio feed de cada item como regen base

 

Spoiler

local FOODS =
{
    [2362] = {80, "Crunch."},
    [2666] = {150, "Munch."},
    [2667] = {120, "Munch."},
    [2668] = {100, "Mmmm."},
    [2669] = {170, "Munch."},
    [2670] = {40, "Gulp."},
    [2671] = {300, "Chomp."},
    [2672] = {600, "Chomp."},
    [2673] = {50, "Yum."},
    [2674] = {60, "Yum."},
    [2675] = {130, "Yum."},
    [2676] = {80, "Yum."},
    [2677] = {10, "Yum."},
    [2678] = {180, "Slurp."},
    [2679] = {10, "Yum."},
    [2680] = {20, "Yum."},
    [2681] = {90, "Yum."},
    [2682] = {200, "Yum."},
    [2683] = {170, "Munch."},
    [2684] = {80, "Crunch."},
    [2685] = {60, "Munch."},
    [2686] = {90, "Crunch."},
    [2687] = {20, "Crunch."},
    [2688] = {90, "Munch."},
    [2689] = {100, "Crunch."},
    [2690] = {30, "Crunch."},
    [2691] = {80, "Crunch."},
    [2792] = {60, "Munch."},
    [2793] = {90, "Munch."},
    [2695] = {60, "Gulp."},
    [2696] = {90, "Smack."},
    [2787] = {90, "Munch."},
    [2788] = {40, "Munch."},
    [2789] = {220, "Munch."},
    [2790] = {300, "Munch."},
    [2791] = {300, "Munch."},
    [2792] = {60, "Munch."},
    [2794] = {30, "Munch."},
    [2795] = {360, "Munch."},
    [2796] = {50, "Munch."},
    [2793] = {90, "Munch."},
    [5097] = {40, "Yum."},
    [6125] = {80, "Gulp."},
    [6278] = {100, "Mmmm."},
    [6279] = {150, "Mmmm."},
    [6393] = {120, "Mmmm."},
    [6394] = {150, "Mmmm."},
    [6501] = {200, "Mmmm."},
    [6541] = {60, "Gulp."},
    [6542] = {60, "Gulp."},
    [6543] = {60, "Gulp."},
    [6544] = {60, "Gulp."},
    [6545] = {60, "Gulp."},
    --[6569] = {100, "Mmmm."}, Retirado para script de rare candy
    [6574] = {40, "Mmmm."},
    [7158] = {150, "Munch."},
    [7159] = {130, "Munch."},
    [7372] = {70, "Yum."},
    [7373] = {70, "Yum."},
    [7374] = {70, "Yum."},
    [7375] = {70, "Yum."},
    [7376] = {70, "Yum."},
    [7377] = {70, "Yum."},
    [7909] = {40, "Crunch."},
    [8838] = {70, "Gulp."},
    [8839] = {50, "Yum."},
    [8840] = {20, "Yum."},
    [8841] = {30, "Urgh."},
    [8842] = {30, "Munch."},
    [8843] = {30, "Crunch."},
    [8844] = {30, "Gulp."},
    [8845] = {20, "Munch."},
    [8847] = {110, "Yum."},
    [12211] = {180, "Mmmm."},
    [12213] = {130, "Munch."},
    [12214] = {80, "Crunch."},
    [12215] = {100, "Munch."},
    [12216] = {60, "Gulp."},
    [12217] = {50, "Yum."},
    [12218] = {150, "Crunch."},
    [12219] = {70, "Mmmm."},
    [12220] = {70, "Mmmm."},
    [12221] = {70, "Mmmm."},
    [12222] = {240, "Crunch."},
}

local pos = getThingPos(cid)
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local food = FOODS[item.itemid]
    if(not food) then
        return false
    end

    local thing = getCreatureSummons(cid)[1] or cid

        if isPlayer(thing) then

            if((getPlayerFood(cid) + food[1]) >= 1000) then
                doPlayerSendCancel(cid, "You are full.")
            return true
            end

            doPlayerFeed(cid, food[1] * 4)
            doCreatureSay(cid, food[2], TALKTYPE_ORANGE_1)
            doRemoveItem(item.uid, 1)

        elseif isSummon(thing) then

            local feed = food[1]

            if getPlayerStorageValue(thing, 1009) - feed < 0 then
                doSendMagicEffect(getThingPos(thing), 169)
                doSendMagicEffect(pos, 169)
                local newh = getPlayerStorageValue(thing, 1008) - math.ceil(feed / 😎
                if newh <= 1 then newh = 1 end
                setPlayerStorageValue(thing, 1008, newh)
            return true
            end

            setPlayerStorageValue(thing, 1009, getPlayerStorageValue(thing, 1009) - feed)
            setPlayerStorageValue(thing, 1008, getPlayerStorageValue(thing, 1008) + 1)
            doCreatureSay(thing, food[2], TALKTYPE_ORANGE_1)
            doRemoveItem(item.uid, 1)
        end
                
return true
end

 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
Em 05/11/2023 em 19:40, wenderotpoke disse:

Cara não sei se e possivel mas queria um sistema de regen fora o base que o proprio game ja tem né no vactions quando ta de barriga cheia. queria que o food tivesse um regen dele mesmo tipo por exemplo a Pizza dar 10 de vida /s e o hotdog dar 7.5. a ideia é usar esses numeros do proprio feed de cada item como regen base

 

  Ocultar conteúdo

local FOODS =
{
    [2362] = {80, "Crunch."},
    [2666] = {150, "Munch."},
    [2667] = {120, "Munch."},
    [2668] = {100, "Mmmm."},
    [2669] = {170, "Munch."},
    [2670] = {40, "Gulp."},
    [2671] = {300, "Chomp."},
    [2672] = {600, "Chomp."},
    [2673] = {50, "Yum."},
    [2674] = {60, "Yum."},
    [2675] = {130, "Yum."},
    [2676] = {80, "Yum."},
    [2677] = {10, "Yum."},
    [2678] = {180, "Slurp."},
    [2679] = {10, "Yum."},
    [2680] = {20, "Yum."},
    [2681] = {90, "Yum."},
    [2682] = {200, "Yum."},
    [2683] = {170, "Munch."},
    [2684] = {80, "Crunch."},
    [2685] = {60, "Munch."},
    [2686] = {90, "Crunch."},
    [2687] = {20, "Crunch."},
    [2688] = {90, "Munch."},
    [2689] = {100, "Crunch."},
    [2690] = {30, "Crunch."},
    [2691] = {80, "Crunch."},
    [2792] = {60, "Munch."},
    [2793] = {90, "Munch."},
    [2695] = {60, "Gulp."},
    [2696] = {90, "Smack."},
    [2787] = {90, "Munch."},
    [2788] = {40, "Munch."},
    [2789] = {220, "Munch."},
    [2790] = {300, "Munch."},
    [2791] = {300, "Munch."},
    [2792] = {60, "Munch."},
    [2794] = {30, "Munch."},
    [2795] = {360, "Munch."},
    [2796] = {50, "Munch."},
    [2793] = {90, "Munch."},
    [5097] = {40, "Yum."},
    [6125] = {80, "Gulp."},
    [6278] = {100, "Mmmm."},
    [6279] = {150, "Mmmm."},
    [6393] = {120, "Mmmm."},
    [6394] = {150, "Mmmm."},
    [6501] = {200, "Mmmm."},
    [6541] = {60, "Gulp."},
    [6542] = {60, "Gulp."},
    [6543] = {60, "Gulp."},
    [6544] = {60, "Gulp."},
    [6545] = {60, "Gulp."},
    --[6569] = {100, "Mmmm."}, Retirado para script de rare candy
    [6574] = {40, "Mmmm."},
    [7158] = {150, "Munch."},
    [7159] = {130, "Munch."},
    [7372] = {70, "Yum."},
    [7373] = {70, "Yum."},
    [7374] = {70, "Yum."},
    [7375] = {70, "Yum."},
    [7376] = {70, "Yum."},
    [7377] = {70, "Yum."},
    [7909] = {40, "Crunch."},
    [8838] = {70, "Gulp."},
    [8839] = {50, "Yum."},
    [8840] = {20, "Yum."},
    [8841] = {30, "Urgh."},
    [8842] = {30, "Munch."},
    [8843] = {30, "Crunch."},
    [8844] = {30, "Gulp."},
    [8845] = {20, "Munch."},
    [8847] = {110, "Yum."},
    [12211] = {180, "Mmmm."},
    [12213] = {130, "Munch."},
    [12214] = {80, "Crunch."},
    [12215] = {100, "Munch."},
    [12216] = {60, "Gulp."},
    [12217] = {50, "Yum."},
    [12218] = {150, "Crunch."},
    [12219] = {70, "Mmmm."},
    [12220] = {70, "Mmmm."},
    [12221] = {70, "Mmmm."},
    [12222] = {240, "Crunch."},
}

local pos = getThingPos(cid)
function onUse(cid, item, fromPosition, itemEx, toPosition)
    local food = FOODS[item.itemid]
    if(not food) then
        return false
    end

    local thing = getCreatureSummons(cid)[1] or cid

        if isPlayer(thing) then

            if((getPlayerFood(cid) + food[1]) >= 1000) then
                doPlayerSendCancel(cid, "You are full.")
            return true
            end

            doPlayerFeed(cid, food[1] * 4)
            doCreatureSay(cid, food[2], TALKTYPE_ORANGE_1)
            doRemoveItem(item.uid, 1)

        elseif isSummon(thing) then

            local feed = food[1]

            if getPlayerStorageValue(thing, 1009) - feed < 0 then
                doSendMagicEffect(getThingPos(thing), 169)
                doSendMagicEffect(pos, 169)
                local newh = getPlayerStorageValue(thing, 1008) - math.ceil(feed / 😎
                if newh <= 1 then newh = 1 end
                setPlayerStorageValue(thing, 1008, newh)
            return true
            end

            setPlayerStorageValue(thing, 1009, getPlayerStorageValue(thing, 1009) - feed)
            setPlayerStorageValue(thing, 1008, getPlayerStorageValue(thing, 1008) + 1)
            doCreatureSay(thing, food[2], TALKTYPE_ORANGE_1)
            doRemoveItem(item.uid, 1)
        end
                
return true
end

 

local FOODS =
{
    [2362] = {80, "Crunch.", 10},  -- Pizza
    [2666] = {150, "Munch.", 5},   -- Hamburger
    [2667] = {120, "Munch.", 7},   -- Cheeseburger
    [2668] = {100, "Mmmm.", 8},    -- Hot Dog
    [2669] = {170, "Munch.", 6},   -- Sandwich
    [2670] = {40, "Gulp.", 15},    -- Milkshake
    [2671] = {300, "Chomp.", 3},   -- Ice Cream
    [2672] = {600, "Chomp.", 2},   -- Cake
    [2673] = {50, "Yum.", 12},     -- Cookie
    [2674] = {60, "Yum.", 10},     -- Donut
    [2675] = {130, "Yum.", 7},     -- Chocolate Bar
    [2676] = {80, "Yum.", 9},      -- Candy
    [2677] = {10, "Yum.", 20},     -- Lollipop
    [2678] = {180, "Slurp.", 6},   -- Soda
    [2679] = {10, "Yum.", 18},     -- Chips
    [2680] = {20, "Yum.", 15},     -- Popcorn
    [2681] = {90, "Yum.", 8},      -- Pretzel
    [2682] = {200, "Yum.", 5},     -- Pie
    [2683] = {170, "Munch.", 5},   -- Pancake
    [2684] = {80, "Crunch.", 10},  -- Waffle
    [2685] = {60, "Munch.", 8},    -- French Fries
    [2686] = {90, "Crunch.", 10},  -- Onion Rings
    [2687] = {20, "Crunch.", 12},  -- Nachos
    [2688] = {90, "Munch.", 7},    -- Chicken Nuggets
    [2689] = {100, "Crunch.", 8},  -- Fish Sticks
    [2690] = {30, "Crunch.", 12},  -- Potato Chips
    [2691] = {80, "Crunch.", 9},   -- Tortilla Chips
    [2792] = {60, "Munch.", 8},    -- Brownie
    [2793] = {90, "Munch.", 6},    -- Cupcake
    [2695] = {60, "Gulp.", 8},     -- Smoothie
    [2696] = {90, "Smack.", 6},    -- Fruit Salad
    [2787] = {90, "Munch.", 7},    -- Salad
    [2788] = {40, "Munch.", 10},   -- Soup
    [2789] = {220, "Munch.", 4},   -- Ramen
    [2790] = {300, "Munch.", 3},   -- Sushi
    [2791] = {300, "Munch.", 3},   -- Burrito
    [2794] = {30, "Munch.", 10},   -- Tacos
    [2795] = {360, "Munch.", 2},   -- Pasta
    [2796] = {50, "Munch.", 8},    -- Mac & Cheese
    [5097] = {40, "Yum.", 10},     -- Bread
    [6125] = {80, "Gulp.", 7},     -- Milk
    [6278] = {100, "Mmmm.", 8},    -- Orange Juice
    [6279] = {150, "Mmmm.", 6},    -- Apple Juice
    [6393] = {120, "Mmmm.", 7},    -- Grape Juice
    [6394] = {150, "Mmmm.", 6},    -- Fruit Punch
    [6501] = {200, "Mmmm.", 5},    -- Energy Drink
    [6541] = {60, "Gulp.", 8},     -- Water
    [6542] = {60, "Gulp.", 8},     -- Coconut Water
    [6543] = {60, "Gulp.", 8},     -- Sports Drink
    [6544] = {60, "Gulp.", 8},     -- Tea
    [6545] = {60, "Gulp.", 8},     -- Coffee
    [6574] = {40, "Mmmm.", 10},    -- Milkshake (Strawberry)
    [7158] = {150, "Munch.", 6},   -- Milkshake (Vanilla)
    [7159] = {130, "Munch.", 6},   -- Milkshake (Chocolate)
    [7372] = {70, "Yum.", 9},      -- Milkshake (Banana)
    [7373] = {70, "Yum.", 9},      -- Milkshake (Mint Chocolate Chip)
    [7374] = {70, "Yum.", 9},      -- Milkshake (Caramel)
    [7375] = {70, "Yum.", 9},      -- Milkshake (Cookies & Cream)
    [7376] = {70, "Yum.", 9},      -- Milkshake (Peanut Butter)
    [7377] = {70, "Yum.", 9},      -- Milkshake (Strawberry Banana)
    [7909] = {40, "Crunch.", 10},  -- Milkshake (Blueberry)
    [8838] = {70, "Gulp.", 7},     -- Milkshake (Raspberry)
    [8839] = {50, "Yum.", 9},      -- Milkshake (Blackberry)
    [8840] = {20, "Yum.", 15},     -- Milkshake (Peach)
    [8841] = {30, "Urgh.", 20},    -- Milkshake (Mango)
    [8842] = {30, "Munch.", 10},   -- Milkshake (Pineapple)
    [8843] = {30, "Crunch.", 10},  -- Milkshake (Watermelon)
    [8844] = {30, "Gulp.", 12},    -- Milkshake (Cantaloupe)
    [8845] = {20, "Munch.", 10},   -- Milkshake (Kiwi)
  	[8847] = {110, "Yum.", 8},      -- Milkshake (Coconut)
    [12211] = {180, "Mmmm.", 6},   -- Milkshake (Mango-Peach)
    [12213] = {130, "Munch.", 7},   -- Milkshake (Berry Blast)
    [12214] = {80, "Crunch.", 9},   -- Milkshake (Tropical Twist)
    [12215] = {100, "Munch.", 7},   -- Milkshake (Pineapple-Banana)
    [12216] = {60, "Gulp.", 9},     -- Milkshake (Cherry)
    [12217] = {50, "Yum.", 10},     -- Milkshake (Orange)
    [12218] = {150, "Crunch.", 6},  -- Milkshake (Grape)
    [12219] = {70, "Mmmm.", 7},     -- Milkshake (Strawberry)
    [12220] = {70, "Mmmm.", 7},     -- Milkshake (Blueberry)
    [12221] = {70, "Mmmm.", 7},     -- Milkshake (Raspberry)
    [12222] = {240, "Crunch.", 5},  -- Milkshake (Mixed Berry) -- o 5 é a quantia de regen
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local food = FOODS[item.itemid]
    if not food then
        return false
    end

    local thing = getCreatureSummons(cid)[1] or cid

    if isPlayer(thing) then
        if getPlayerFood(cid) + food[1] >= 1000 then
            doPlayerSendCancel(cid, "You are full.")
            return true
        end
        doPlayerFeed(cid, food[1] * 4)
        doCreatureSay(cid, food[2], TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid, 1)

    elseif isSummon(thing) then
        local feed = food[1]
        local regeneration = food[3] or 0  -- Regeneração padrão

        if getPlayerStorageValue(thing, 1009) - feed < 0 then
            doSendMagicEffect(getThingPos(thing), 169)
            doSendMagicEffect(pos, 169)
            local newh = getPlayerStorageValue(thing, 1008) - math.ceil(feed / 😎
            if newh <= 1 then newh = 1 end
            setPlayerStorageValue(thing, 1008, newh)
            return true
        end

        setPlayerStorageValue(thing, 1009, getPlayerStorageValue(thing, 1009) - feed)
        setPlayerStorageValue(thing, 1008, getPlayerStorageValue(thing, 1008) + regeneration) -- Incremento baseado na regeneração específica da comida
        doCreatureSay(thing, food[2], TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid, 1)
    end

    return true
end

 

Link to comment
Share on other sites

  • 0
Em 27/03/2024 em 17:20, klbkevinklb disse:
local FOODS =
{
    [2362] = {80, "Crunch.", 10},  -- Pizza
    [2666] = {150, "Munch.", 5},   -- Hamburger
    [2667] = {120, "Munch.", 7},   -- Cheeseburger
    [2668] = {100, "Mmmm.", 8},    -- Hot Dog
    [2669] = {170, "Munch.", 6},   -- Sandwich
    [2670] = {40, "Gulp.", 15},    -- Milkshake
    [2671] = {300, "Chomp.", 3},   -- Ice Cream
    [2672] = {600, "Chomp.", 2},   -- Cake
    [2673] = {50, "Yum.", 12},     -- Cookie
    [2674] = {60, "Yum.", 10},     -- Donut
    [2675] = {130, "Yum.", 7},     -- Chocolate Bar
    [2676] = {80, "Yum.", 9},      -- Candy
    [2677] = {10, "Yum.", 20},     -- Lollipop
    [2678] = {180, "Slurp.", 6},   -- Soda
    [2679] = {10, "Yum.", 18},     -- Chips
    [2680] = {20, "Yum.", 15},     -- Popcorn
    [2681] = {90, "Yum.", 8},      -- Pretzel
    [2682] = {200, "Yum.", 5},     -- Pie
    [2683] = {170, "Munch.", 5},   -- Pancake
    [2684] = {80, "Crunch.", 10},  -- Waffle
    [2685] = {60, "Munch.", 8},    -- French Fries
    [2686] = {90, "Crunch.", 10},  -- Onion Rings
    [2687] = {20, "Crunch.", 12},  -- Nachos
    [2688] = {90, "Munch.", 7},    -- Chicken Nuggets
    [2689] = {100, "Crunch.", 8},  -- Fish Sticks
    [2690] = {30, "Crunch.", 12},  -- Potato Chips
    [2691] = {80, "Crunch.", 9},   -- Tortilla Chips
    [2792] = {60, "Munch.", 8},    -- Brownie
    [2793] = {90, "Munch.", 6},    -- Cupcake
    [2695] = {60, "Gulp.", 8},     -- Smoothie
    [2696] = {90, "Smack.", 6},    -- Fruit Salad
    [2787] = {90, "Munch.", 7},    -- Salad
    [2788] = {40, "Munch.", 10},   -- Soup
    [2789] = {220, "Munch.", 4},   -- Ramen
    [2790] = {300, "Munch.", 3},   -- Sushi
    [2791] = {300, "Munch.", 3},   -- Burrito
    [2794] = {30, "Munch.", 10},   -- Tacos
    [2795] = {360, "Munch.", 2},   -- Pasta
    [2796] = {50, "Munch.", 8},    -- Mac & Cheese
    [5097] = {40, "Yum.", 10},     -- Bread
    [6125] = {80, "Gulp.", 7},     -- Milk
    [6278] = {100, "Mmmm.", 8},    -- Orange Juice
    [6279] = {150, "Mmmm.", 6},    -- Apple Juice
    [6393] = {120, "Mmmm.", 7},    -- Grape Juice
    [6394] = {150, "Mmmm.", 6},    -- Fruit Punch
    [6501] = {200, "Mmmm.", 5},    -- Energy Drink
    [6541] = {60, "Gulp.", 8},     -- Water
    [6542] = {60, "Gulp.", 8},     -- Coconut Water
    [6543] = {60, "Gulp.", 8},     -- Sports Drink
    [6544] = {60, "Gulp.", 8},     -- Tea
    [6545] = {60, "Gulp.", 8},     -- Coffee
    [6574] = {40, "Mmmm.", 10},    -- Milkshake (Strawberry)
    [7158] = {150, "Munch.", 6},   -- Milkshake (Vanilla)
    [7159] = {130, "Munch.", 6},   -- Milkshake (Chocolate)
    [7372] = {70, "Yum.", 9},      -- Milkshake (Banana)
    [7373] = {70, "Yum.", 9},      -- Milkshake (Mint Chocolate Chip)
    [7374] = {70, "Yum.", 9},      -- Milkshake (Caramel)
    [7375] = {70, "Yum.", 9},      -- Milkshake (Cookies & Cream)
    [7376] = {70, "Yum.", 9},      -- Milkshake (Peanut Butter)
    [7377] = {70, "Yum.", 9},      -- Milkshake (Strawberry Banana)
    [7909] = {40, "Crunch.", 10},  -- Milkshake (Blueberry)
    [8838] = {70, "Gulp.", 7},     -- Milkshake (Raspberry)
    [8839] = {50, "Yum.", 9},      -- Milkshake (Blackberry)
    [8840] = {20, "Yum.", 15},     -- Milkshake (Peach)
    [8841] = {30, "Urgh.", 20},    -- Milkshake (Mango)
    [8842] = {30, "Munch.", 10},   -- Milkshake (Pineapple)
    [8843] = {30, "Crunch.", 10},  -- Milkshake (Watermelon)
    [8844] = {30, "Gulp.", 12},    -- Milkshake (Cantaloupe)
    [8845] = {20, "Munch.", 10},   -- Milkshake (Kiwi)
  	[8847] = {110, "Yum.", 8},      -- Milkshake (Coconut)
    [12211] = {180, "Mmmm.", 6},   -- Milkshake (Mango-Peach)
    [12213] = {130, "Munch.", 7},   -- Milkshake (Berry Blast)
    [12214] = {80, "Crunch.", 9},   -- Milkshake (Tropical Twist)
    [12215] = {100, "Munch.", 7},   -- Milkshake (Pineapple-Banana)
    [12216] = {60, "Gulp.", 9},     -- Milkshake (Cherry)
    [12217] = {50, "Yum.", 10},     -- Milkshake (Orange)
    [12218] = {150, "Crunch.", 6},  -- Milkshake (Grape)
    [12219] = {70, "Mmmm.", 7},     -- Milkshake (Strawberry)
    [12220] = {70, "Mmmm.", 7},     -- Milkshake (Blueberry)
    [12221] = {70, "Mmmm.", 7},     -- Milkshake (Raspberry)
    [12222] = {240, "Crunch.", 5},  -- Milkshake (Mixed Berry) -- o 5 é a quantia de regen
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local food = FOODS[item.itemid]
    if not food then
        return false
    end

    local thing = getCreatureSummons(cid)[1] or cid

    if isPlayer(thing) then
        if getPlayerFood(cid) + food[1] >= 1000 then
            doPlayerSendCancel(cid, "You are full.")
            return true
        end
        doPlayerFeed(cid, food[1] * 4)
        doCreatureSay(cid, food[2], TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid, 1)

    elseif isSummon(thing) then
        local feed = food[1]
        local regeneration = food[3] or 0  -- Regeneração padrão

        if getPlayerStorageValue(thing, 1009) - feed < 0 then
            doSendMagicEffect(getThingPos(thing), 169)
            doSendMagicEffect(pos, 169)
            local newh = getPlayerStorageValue(thing, 1008) - math.ceil(feed / 😎
            if newh <= 1 then newh = 1 end
            setPlayerStorageValue(thing, 1008, newh)
            return true
        end

        setPlayerStorageValue(thing, 1009, getPlayerStorageValue(thing, 1009) - feed)
        setPlayerStorageValue(thing, 1008, getPlayerStorageValue(thing, 1008) + regeneration) -- Incremento baseado na regeneração específica da comida
        doCreatureSay(thing, food[2], TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid, 1)
    end

    return true
end

 

Não pegou mano, a ideia e ele ficar curando tipo uma pot que dura o tempo do food

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...