It's been over a year since I played with you and even longer since my last published script, but now I'm back (at least briefly) and due to the change about needing to eat to keep your regens, I decided to do my own version for EasyUO. The setup is commented in the script itself along with the features, so I'm not repeating those in this introduction. This script is set up for Fish Steaks, so the delay is 15 minutes (900s - 1s for the failsafe check) as hunger grows currently at the rate of 1% per minute and Fish Steak adds 15%. Just examine how many percentages your preferred food gives and you can easily find the decay time.
One more thing, I didn't include
Code: Select all
event macro 17 0
Code: Select all
; Shindaril's UO Excelsior eating sctips
; Date: 27.1.2018
; Version 1.02
; Features:
; -Timed automatic eating script to keep you fed
; -Failsafe in case another script or use manages to set #lObjectID while eating
; -Stores the #lObjectID and returns it after eating to prevent messing up in game macros
; Set up to Fish Steaks and my own bag of holding, so
; Pick your preferred food type, examine how much it feeds you (in percentage)
; multiply that with 60 and reduce it by 1s to get the wait time (as of now, 1% hunger = 1 minute)
; and set your storage container and food type and run the script
set %FoodStorage BGLWNPD ; Container with the food
set %FoodType HND ; Type of the food, in this case, fish steak
set %Stack 0
set #lpc 20
while #True
{
Start:
; Add event macro 17 0 for opening your food container here by setting the container position and uncommenting the following lines
; set #NextCPosX 0
; set #NextCPosY 0
; set %OldLObjectID #lObjectID
; set #lObjectID %FoodStorage
; event macro 17 0
; set #lObjectID %OldLObjectID
finditem %FoodType C_ , %FoodStorage
if #FindCnt < 1
{
event exmsg #charid 3 111 Out of Food!
wait 20
goto Start ; if the food container is closed or you're out of food, this will cause the script to loop back and spam
}
event exmsg #charid 3 111 Eating...
Eat:
set %Stack #FindStack
set %OldLObjectID #lObjectID
set #lObjectID #FindID
event macro 17 0
set #lObjectID %OldLObjectID
wait 20
finditem %FoodType C_ , %FoodStorage
if #FindKind <> -1
{ ; Let's check if we actually did eat
if #FindStack >= %Stack ; Yeah, let's eat again if the stack hasn't diminished
goto Eat
}
wait 899s ; Adjust to your need for food, fish steaks are 15% so 15 minutes = 900s
}