Bug after rev448

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Bug after rev448

#1 Post by Starrider »

Hello, after the update of rev448 my bot wait's now after every fight for 85-93 seconds.
my HP Rest value:
<option name="HP_REST" value="20" />
<option name="MP_REST" value="20" />

also when it goes to the next waypoints it will pause until the HP is full

i also can not use rev 447, when i download it from http://code.google.com/p/rom-bot/source/list
the I got this error message: scripts\rom\bot.lua:5: //micromacro.../classes/player.lua:4:unexpected symbol near "<"
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: Bug after rev448

#2 Post by Administrator »

Probably a bad update. Delete any bot.lua and the whole 'classes' folder, then run the update again.
Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: Bug after rev448

#3 Post by Starrider »

i still deleted all files and updated the complete bot with svn.
If I start the bot it begins with pause for xx seconds for manaregeneration, because it cast at the beginning enhanced armor an Holy Seal buff.
Then I had one fight and it paused for XX seconds for mana regeneration.

Update: I found another indicator. The bot paused directly after micromacro gives the massage stop waypoint, because another target has been found, then it paused for regeneration.
Last edited by Starrider on Sun May 30, 2010 2:17 pm, edited 1 time in total.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Bug after rev448

#4 Post by rock5 »

Now that I've updated to 448 I noticed this problem too.

It says "Resting up to nn to fill up mana and HP." even though my health and mana are 100 percent.
nn is always a big number about 50-90 but only rests for about 5 seconds

It always follows "Stopping waypoint: Target acquired" type message and before it starts to attack.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: Bug after rev448

#5 Post by Starrider »

i added manually this code from the documentation in the player.lua where it was before the release and it works again.
fast fix for all:

open player.lua
search for

Code: Select all

local hf_hp_rest   = (player.MaxHP   * settings.profile.options.HP_REST / 100);	-- rest if HP is lower then
after add:

Code: Select all

	if( player.Mana >= hf_mana_rest  and player.HP >= hf_hp_rest and
	_resttype == 'full' ) then	-- nothing to do

		return;   --go back

		end;
so the update rev448 is still buggy
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Bug after rev448

#6 Post by rock5 »

Starrider wrote:i added manually this code from the documentation in the player.lua where it was before the release and it works again.
fast fix for all:

open player.lua
search for

Code: Select all

local hf_hp_rest   = (player.MaxHP   * settings.profile.options.HP_REST / 100);	-- rest if HP is lower then
after add:

Code: Select all

	if( player.Mana >= hf_mana_rest  and player.HP >= hf_hp_rest and
	_resttype == 'full' ) then	-- nothing to do

		return;   --go back

		end;
so the update rev448 is still buggy
Yep, this fix worked for me. Thanks.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: Bug after rev448

#7 Post by Administrator »

This should be fixed in r449. Revert the changes you've made (or just delete the file) and update again. Let me know how it works.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Bug after rev448

#8 Post by rock5 »

Administrator wrote:This should be fixed in r449. Revert the changes you've made (or just delete the file) and update again. Let me know how it works.
Nope, still doesn't work. Does exactly the same thing.

Do you realize that you are assigning values to hf_mana_rest and hf_hp_rest but don't use them anywhere in your code?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: Bug after rev448

#9 Post by Administrator »

The only change was to bot.lua. Specifically, this:

Code: Select all

if( player.Mana/player.MaxMana*100 >= settings.profile.options.MP_REST
  and player.HP/player.MaxHP*100 >= settings.profile.options.HP_REST ) then
    player:rest( 50, 99, "full", 10 );		-- rest befor next fight
end
Don't know how I messed that up, but the '>'s should be '<'. Try that.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Bug after rev448

#10 Post by rock5 »

Administrator wrote:The only change was to bot.lua. Specifically, this:

Code: Select all

if( player.Mana/player.MaxMana*100 >= settings.profile.options.MP_REST
  and player.HP/player.MaxHP*100 >= settings.profile.options.HP_REST ) then
    player:rest( 50, 99, "full", 10 );		-- rest befor next fight
end
Don't know how I messed that up, but the '>'s should be '<'. Try that.
Seems to work correctly. I also changed the 'and' to an 'or' so the logic is correct.

The question remains, though, why do you assign values to 'hf_mana_rest' and 'hf_hp_rest' if you don't use them anywhere?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: Bug after rev448

#11 Post by Administrator »

I've changed the code some more to prevent problems with dividing by zero.

Code: Select all

			local manaRest, healthRest = false, false;
			if( player.MaxMana > 0 ) then
				manaRest = (player.Mana / player.MaxMana * 100) <= settings.profile.options.MP_REST;
			end
			healthRest = (player.HP / player.MaxHP * 100) <= settings.profile.options.HP_REST;

			if( manaRest or healthRest ) then
					player:rest( 50, 99, "full", 10 );		-- rest before next fight
			end
I didn't even check if those variables were used. I had assumed they were used even if the "full" option wasn't given. I'm actually not sure why that code was in the rest function.
Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: Bug after rev448

#12 Post by Starrider »

new version or where I have to change this code now?
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Bug after rev448

#13 Post by rock5 »

Starrider wrote:new version or where I have to change this code now?
I believe it hasn't been updated yet.

Find around line 464 of bot.lua

Code: Select all

			if( player.Mana/player.MaxMana*100 >= settings.profile.options.MP_REST
				and player.HP/player.MaxHP*100 >= settings.profile.options.HP_REST ) then
					player:rest( 50, 99, "full", 10 );		-- rest befor next fight
			end
Replace with

Code: Select all

			local manaRest, healthRest = false, false;
			if( player.MaxMana > 0 ) then
				manaRest = (player.Mana / player.MaxMana * 100) <= settings.profile.options.MP_REST;
			end
			healthRest = (player.HP / player.MaxHP * 100) <= settings.profile.options.HP_REST;

			if( manaRest or healthRest ) then
			   player:rest( 50, 99, "full", 10 );      -- rest before next fight
			end
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: Bug after rev448

#14 Post by Starrider »

thx
User avatar
Administrator
Site Admin
Posts: 5353
Joined: Sat Jan 05, 2008 4:21 pm

Re: Bug after rev448

#15 Post by Administrator »

Can you confirm this change to be working properly? Once you do, I'll commit the change.
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Bug after rev448

#16 Post by rock5 »

Administrator wrote:Can you confirm this change to be working properly? Once you do, I'll commit the change.
Yes, working for me.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
Starrider
Posts: 164
Joined: Sat May 01, 2010 7:04 am
Location: Germany

Re: Bug after rev448

#17 Post by Starrider »

I can also confirm that this code works with the new player.lua for me
Post Reply