Page 1 of 1

[EasyUO] Stay Stuffed Eating Script.

Posted: Tue May 29, 2018 2:09 am
by Stephen
Hello. This is a script that will always make sure you are stuffed, should never interfere with another script and requires no additional setup.

Many thanks to Shindaril for their work shown below:
http://uoex.net/forum/viewtopic.php?f=25&t=12023

Essentially once u stop being stuffed this will eat. It will also always make sure the buffs bar is open. If it close or is closed. It will open it back up. And put it in a specific location on the screen (x 990, y 350 is where I keep mine but if you want to move it you can. That's just where I default set it to open with #nextCPosX and #nextCPosY). It shouldn't mess with other scripts as I have set it to use the Exevent PopUp which is like clicking it and selecting eat, instead of trying to double click it. So enjoy it. Any problems let me know.

BE KNOWN YOU MUST HAVE THE CONTAINER THE FOOD IS IN OPEN OR IT WILL NOT EAT. (That means if your food is in a bag or backpack such as a bag of holding )

Code: Select all

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Auto Stay Stuffed Script                                                                       ;
; by Stephen of Excelsior shard                                                                  ;
; Version 2: Updates from brhanson2 put in. Thanks!                                              ;
; Using information given by Shindaril - link below                                              ;
; http://uoex.net/forum/viewtopic.php?f=25&t=12023                                               ;
; Very easy to use, target food to eat. and enjoy                                                ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
set %BuffType CKF    ; [buffs bar ID thanks goes to  Shindaril
set %HungerType MGG  ; Hunger Item ID thanks goes to Shindaril
set %FoodID 0  ; The food to use as source sets with target automatically no edits needed.

DISPLAY OK Target your food
event SysMessage Target your stack of food!
set #targCurs 1
targLoop:
if #targCurs = 1
goto targLoop
set %FoodID #lTargetID
wait 7
goto MainLooop
  
MainLoop:

finditem %BuffType C_ , #CharID
if #FindKind <> -1
{
   set %Buffs #FindID
   finditem %HungerType C_ , %Buffs
   if #FindKind <> -1
    {
       event Property #FINDID
	     if stuffed notin #PROPERTY
        {
          exevent Popup %FoodID 1
          wait 7
        }
    }
   else
    {
       set #nextCPosX 990
       set #nextCPosY 350
       event macro 1 0 [buffs
    }
}
wait 600
goto MainLoop

Re: [EasyUO] Stay Stuffed Eating Script.

Posted: Tue May 29, 2018 5:00 pm
by Yoda
slick that these are easyuo, life has calmed down I may get back into the hobby

Re: [EasyUO] Stay Stuffed Eating Script.

Posted: Thu May 31, 2018 2:02 am
by brhanson2
Just to clean up the code a bit the following 4 lines do not appear to be needed. It will find "stuffed" in the property tag with no string manipulation. Just an FYI :D

Code: Select all

;       str pos #PROPERTY $
;       set %endPos #STRRES - 1
;       str left #PROPERTY %endPos
;       set %foundString #STRRES
For myself I added the following "wait 600" before it loops since the eating satiated percent drops 1% a minute I found it only needed to check every 60 seconds. It will also help prevent disconnects since the script isn't running constantly against the client.

Code: Select all

}
wait 600
goto MainLoop
Other then that I love it, I find it very useful.

Re: [EasyUO] Stay Stuffed Eating Script.

Posted: Thu May 31, 2018 1:41 pm
by Stephen
Ahh. Thanks for the info on the string part. I did not know that. And i added those changes to it. I actually added a wait there after and forgot to add it in just not 30 seconds (isn't it 20 for 1 second, so 600 would be 30 seconds). got it in now. I guess someone could change it if they want now lol as long at is pausing some I guess. lol thanks!

Re: [EasyUO] Stay Stuffed Eating Script.

Posted: Thu May 31, 2018 2:36 pm
by brhanson2
Glad to help (and learn) about scripts! :)

I think the wait is in tenths of a second so just add a zero. But Ill check to make sure.

Re: [EasyUO] Stay Stuffed Eating Script.

Posted: Thu May 31, 2018 10:03 pm
by Stephen
brhanson2 wrote:Glad to help (and learn) about scripts! :)

I think the wait is in tenths of a second so just add a zero. But Ill check to make sure.

I looked to be sure its in 20 for 1 second. lol. I never remember with it cuz I use a program with Python for most of my scripts and using easyuo for anything 1 second or more i just use 1s or 20s for seconds lol


So it can be

Code: Select all

; Wait for 5 seconds
wait 5s

; Wait for 1 second
wait 20

; Wait for 2 seconds with a random length of 1 second
wait 2s 1s

Re: [EasyUO] Stay Stuffed Eating Script.

Posted: Fri Jun 01, 2018 1:49 pm
by brhanson2
Ahh you are correct sir! Thanks.