채팅0

    형들 물약 스크립트 이거맞음?

    조회수 418

    -- Add a constant for potion item ID

    local HEALTH_POTION_ID = 2120000 -- Replace with the actual ID of your health potion item


    -- Add a function for automatic potion consumption

    local function autoConsumePotion()

    local playerHealth = _UserService.LocalPlayer.WsCharacterData.HP

    local potionThreshold = 50 -- Adjust the threshold as needed

    if playerHealth < potionThreshold then
        _ItemConsumeLogic:TryConsumeFromFuncKey(HEALTH_POTION_ID)
    end

    end


    -- ... (your existing code)


    -- Modify the existing user_check_func to include potion consumption

    zz_y7.user_check_func = function ()

    -- ... (your existing code)

    -- Add potion consumption check
    autoConsumePotion()

    end


    -- ... (your existing code)

    댓글1

    회원프로필

    되셨나요?

    2024.02.04 00:19

      게시글 리스트
      제목작성자작성일조회
      2746902-03334
      2746802-03219
      2746702-03293
      2746602-03419
      2746502-03344
      2746402-03647
      2746302-03358
      2746202-03519
      2746102-03292
      2746002-03252
      2745902-03225
      2745802-03244
      2745702-03245
      2745602-03278
      2745502-03327
      2745402-03398
      2745302-03448
      2745202-03483
      2745102-03256
      2745002-03598
      안내 배너 이미지