Sogma 89 Posted May 15 Share Posted May 15 Hi, this is a small feature which starts a recovery/refill event on auto potions when the player is near a given NPC. In my example i use a range of 1500 units and NPC 9001 (Weapons Dealer), but you can change it as you want. Maybe add a new config token if you want. When you enter the radius of 1500 units around the npc the refill event will start and restore 10% of the auto potions max value every 3 seconds. When you leave the radius the event stops. If there are any questions/suggestions let me know. This is the hidden content, please Sign In or Sign Up Alternative download links → This is the hidden content, please Sign In or Sign Up 46 7 1 17 Link to comment Share on other sites More sharing options...
Active+ Member HFWhite 495 Posted May 16 Active+ Member Share Posted May 16 Do you have a video/gif of the system ? I don;t really understand what it does. Link to comment Share on other sites More sharing options...
Foxxielove 3 Posted May 17 Share Posted May 17 12 hours ago, HFWhite said: Do you have a video/gif of the system ? I don;t really understand what it does. When you are within a certain radius of NPC x, your Auto Potion will be refilled. This means if your Auto Potion only has 5% remaining, it will regenerate/refill your potion. 1 Link to comment Share on other sites More sharing options...
treizen 0 Posted May 26 Share Posted May 26 (edited) Hi, thank you. But what's the item ID please? Edited May 26 by treizen Link to comment Share on other sites More sharing options...
Sogma 89 Posted May 29 Author Share Posted May 29 On 5/26/2024 at 7:32 PM, treizen said: Hi, thank you. But what's the item ID please? I have used the default values from unique_item.h ITEM_AUTO_HP_RECOVERY_S = 72723, ITEM_AUTO_HP_RECOVERY_M = 72724, ITEM_AUTO_HP_RECOVERY_L = 72725, ITEM_AUTO_HP_RECOVERY_X = 72726, ITEM_AUTO_SP_RECOVERY_S = 72727, ITEM_AUTO_SP_RECOVERY_M = 72728, ITEM_AUTO_SP_RECOVERY_L = 72729, ITEM_AUTO_SP_RECOVERY_X = 72730, and simply re-assigned them to the enum enum EAutoPotion { ITEM_AUTO_HP_POTION_1 = ITEM_AUTO_HP_RECOVERY_S, ITEM_AUTO_HP_POTION_2 = ITEM_AUTO_HP_RECOVERY_M, ITEM_AUTO_HP_POTION_3 = ITEM_AUTO_HP_RECOVERY_L, ITEM_AUTO_HP_POTION_4 = ITEM_AUTO_HP_RECOVERY_X, ITEM_AUTO_SP_POTION_1 = ITEM_AUTO_SP_RECOVERY_S, ITEM_AUTO_SP_POTION_2 = ITEM_AUTO_SP_RECOVERY_M, ITEM_AUTO_SP_POTION_3 = ITEM_AUTO_SP_RECOVERY_L, ITEM_AUTO_SP_POTION_4 = ITEM_AUTO_SP_RECOVERY_X, AUTO_POTION_MAX_NUM = 8, }; If you use other vnums just change them in the enum. If you add or remove enum values make sure to adjust AUTO_POTION_MAX_NUM 1 Link to comment Share on other sites More sharing options...
treizen 0 Posted May 31 Share Posted May 31 Nice, thank you bro Link to comment Share on other sites More sharing options...
Sogma 89 Posted June 1 Author Share Posted June 1 16 hours ago, treizen said: Nice, thank you bro You're welcome Link to comment Share on other sites More sharing options...
Recommended Posts