Use potions starting at lower limit until upper limit

For everything NOT server specific support. Do NOT ask for connectivity help here!.

Moderator: Moderators

Message
Author
12manytimes
Noob
Noob
Posts: 9
Joined: 14 Mar 2017, 20:47
Noob?: Yes

Use potions starting at lower limit until upper limit

#1 Post by 12manytimes »

I saw a small snippet somewhere (I believe on this forum) that was supposed to make your bot use potions starting at an upper limit (say, 50%), and continue to use them until an upper limit (say 90%), rather than spamming them non-stop as they hover around the potion use barrier. I can't find it again, and I can't figure out how to set it up. Anyone know or remember or can link the original article/post?

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: Use potions starting at lower limit until upper limit

#2 Post by Mortimal »

hp 50%..90% ?

http://openkore.com/index.php/Reference ... _Operators

try using Manual sometimes...
Please use pin function for uploading your file contents!

12manytimes
Noob
Noob
Posts: 9
Joined: 14 Mar 2017, 20:47
Noob?: Yes

Re: Use potions starting at lower limit until upper limit

#3 Post by 12manytimes »

Reading the manual it seems to imply that it would simply start using them at 90 instead of at 50, and *stop* if it was below 50.. Am I mistaken?

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: Use potions starting at lower limit until upper limit

#4 Post by Mortimal »

Than i don't understand u... u need to heal to 90% just use hp < 90% or u want when 50% heal to 90%? than i must ask - why? this is stupid use 5 heals at once or 5 in 5 minutes... it is the same...
Please use pin function for uploading your file contents!

12manytimes
Noob
Noob
Posts: 9
Joined: 14 Mar 2017, 20:47
Noob?: Yes

Re: Use potions starting at lower limit until upper limit

#5 Post by 12manytimes »

I want to look more natural. It's normal as a player to use 3-5 HP heals at once, from the time your HP gets low until it gets close to full.
Without resorting to a macro, can the player be configured to use an item 3-5 times in a row using useSelf_item blocks only? I reckon I could write a macro to do it easily enough, but that seems overkill.

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: Use potions starting at lower limit until upper limit

#6 Post by Mortimal »

No it is impossible via standard openkore build:

openkore/src/Misc.pm line #3917:

Code: Select all

if ($config{$prefix . "_hp"}) {								#if set hp condition
		if ($config{$prefix."_hp"} =~ /^(.*)\%$/) {				#if percents
			return 0 if (!inRange($char->hp_percent, $1));			#check
		} else {																		#if not percents
			return 0 if (!inRange($char->{hp}, $config{$prefix."_hp"}));	#check
		}
	}
Kore AI is cycled it won't remember why he healed last time. It only knows it need to heal now. U can manually write it to %config hash but it will be inappropriate.
Please use pin function for uploading your file contents!

Post Reply