-- 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 | 22113 | |
| 61669 | 12:22 | 21 | ||
| 61668 | 12:03 | 35 | ||
| 61667 | 11-11 | 154 | ||
| 61666 | 11-11 | 171 | ||
| 61665 | 11-11 | 184 | ||
| 61664 | 11-11 | 301 | ||
| 61663 | 11-11 | 236 | ||
| 61662 | 11-11 | 361 | ||
| 61661 | 11-10 | 306 | ||
| 61660 | 11-10 | 323 | ||
| 61659 | 11-10 | 313 | ||
| 61658 | 11-10 | 352 | ||
| 61657 | 11-10 | 470 | ||
| 61656 | 11-10 | 461 | ||
| 61655 | 11-09 | 520 | ||
| 61654 | 11-09 | 485 | ||
| 61653 | 11-09 | 516 | ||
| 61652 | 11-09 | 570 | ||
| 61651 | 11-09 | 517 |
댓글1
되셨나요?