-- 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)
endend
-- ... (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)
| 제목 | 작성자 | 작성일 | 조회 | |
|---|---|---|---|---|
| 공지 | 게시판 이용 안내+156 | 10-20 | 22377 | |
| 61790 | 12-26 | 246 | ||
| 61789 | 12-25 | 355 | ||
| 61788 | 12-25 | 351 | ||
| 61787 | 12-24 | 632 | ||
| 61786 | 12-23 | 917 | ||
| 61785 | 12-22 | 963 | ||
| 61784 | 12-22 | 1076 | ||
| 61783 | 12-22 | 955 | ||
| 61782 | 12-21 | 1036 | ||
| 61781 | 12-21 | 1189 | ||
| 61780 | 12-21 | 1112 | ||
| 61779 | 12-19 | 1312 | ||
| 61778 | 12-18 | 1416 | ||
| 61777 | 12-18 | 1968 | ||
| 61776 | 12-16 | 1920 | ||
| 61775 | 12-14 | 2022 | ||
| 61774 | 12-14 | 2388 | ||
| 61773 | 12-14 | 2277 | ||
| 61772 | 12-13 | 2142 |
댓글1
되셨나요?