채팅0

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

    조회수 437

    -- 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-2022377
      6179012-26246
      6178912-25355
      6178812-25351
      6178712-24632
      6178612-23917
      6178512-22963
      6178412-221076
      6178312-22955
      6178212-211036
      6178112-211189
      6178012-211112
      6177912-191312
      6177812-181416
      6177712-181968
      6177612-161920
      6177512-142022
      6177412-142388
      6177312-142277
      6177212-132142
      안내 배너 이미지