채팅0

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

    조회수 419

    -- 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

      게시글 리스트
      제목작성자작성일조회
      공지10-2022113
      6166912:2221
      6166812:0335
      6166711-11154
      6166611-11171
      6166511-11184
      6166411-11301
      6166311-11236
      6166211-11361
      6166111-10306
      6166011-10323
      6165911-10313
      6165811-10352
      6165711-10470
      6165611-10461
      6165511-09520
      6165411-09485
      6165311-09516
      6165211-09570
      6165111-09517
      안내 배너 이미지