RoM bot

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Locked
Message
Author
Zilvermoon
Posts: 104
Joined: Mon Jan 05, 2009 8:19 am

Re: RoM bot

#821 Post by Zilvermoon » Thu Apr 23, 2009 3:23 pm

executor wrote:did this and now i have error and it says that game was updated . i downloaded the 2.24 version and starded rom\update.lua but it isnt working
EDIT:I installed new version once again and now it only gives me e:\...player.lua:638: attempt to index local 'pawn' (a nil value) error.How can i fix this?
Confirming, 2.34 have this problem, happens on first target I encounter, also I didn't have anyone on my "friends" list, but put a couple of names in it, but it's not solving the problem...

I reverted to 2.33 (which I have no problem with running).

Zilvermoon

kokowiki
Posts: 16
Joined: Thu Feb 05, 2009 8:50 pm

Re: RoM bot

#822 Post by kokowiki » Thu Apr 23, 2009 4:18 pm

executor wrote:EDIT:I installed new version once again and now it only gives me e:\...player.lua:638: attempt to index local 'pawn' (a nil value) error.How can i fix this?
Same error, happens after it acquires a target.

executor
Posts: 3
Joined: Thu Apr 23, 2009 1:36 pm

Re: RoM bot

#823 Post by executor » Thu Apr 23, 2009 4:27 pm

provide me with link for 2.23 please i cant find where to download it

someone
Posts: 4
Joined: Sat Apr 18, 2009 2:08 pm

Re: RoM bot

#824 Post by someone » Thu Apr 23, 2009 4:30 pm

when i run the bot i keep getting this error. (with versions 2.33 and 2.34)

.../scripts/rom/functions.lua:13:

attempt to call a global variable 'findPatternInProcess' <a nil value>

i know that means the variable doesnt exist but i tried some things to fix it and i culdnt
figure it out so please respond as i wuld like to bot today xD

blademagical
Posts: 10
Joined: Tue Apr 21, 2009 12:14 pm

Re: RoM bot

#825 Post by blademagical » Thu Apr 23, 2009 4:49 pm

guys iam having a problem with the new bot (2.34), when i press DELETE to my char start wander got that error:

micromacro/scripts/rom/classes/player.lua:638: attempt to index local 'pawn' <a nil value>

how i fix that administrator plz?

ty =)

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

Re: RoM bot

#826 Post by Administrator » Thu Apr 23, 2009 4:53 pm

Just made another update to fix the error in 2.34. Go ahead and grab 2.35 now.

shavas
Posts: 28
Joined: Wed Apr 22, 2009 3:21 pm

Re: RoM bot

#827 Post by shavas » Thu Apr 23, 2009 4:56 pm

somone mentioned the combat lua scrip http://rom.curseforge.com/projects/ufau ... 2-01-5205/


I have used this always in conjunction with the bot.

The advantages here are that it Allows you to correctly implement the prior required effects on skills. Ie Bleed, weakend etc etc.

Anyways it is a great addon combined with the bot. I have all my skills set via uberflex and just get the bot to activate the uberflex macro. Also when swapping classes uberflex changes it's config. this means you can have one Bot profile and let uberflex handle all the skills. Allowing for easier botting all around.

Go take a look at it for those with more advanced skill requirements.

kokowiki
Posts: 16
Joined: Thu Feb 05, 2009 8:50 pm

Re: RoM bot

#828 Post by kokowiki » Thu Apr 23, 2009 5:23 pm

shavas wrote:Go take a look at it for those with more advanced skill requirements.
And the author is planning on implementing a lot of features too, he's just a bit busy these days it seems, from what i sensed anyway!

someone
Posts: 4
Joined: Sat Apr 18, 2009 2:08 pm

Re: RoM bot

#829 Post by someone » Thu Apr 23, 2009 8:15 pm

someone wrote:when i run the bot i keep getting this error. (with versions 2.33 and 2.34)

.../scripts/rom/functions.lua:13:

attempt to call a global variable 'findPatternInProcess' <a nil value>

i know that means the variable doesnt exist but i tried some things to fix it and i culdnt
figure it out so please respond as i wuld like to bot today xD
still getting this in 2.35 how do i fix it?

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

Re: RoM bot

#830 Post by Administrator » Thu Apr 23, 2009 8:36 pm

someone wrote:
someone wrote:when i run the bot i keep getting this error. (with versions 2.33 and 2.34)

.../scripts/rom/functions.lua:13:

attempt to call a global variable 'findPatternInProcess' <a nil value>

i know that means the variable doesnt exist but i tried some things to fix it and i culdnt
figure it out so please respond as i wuld like to bot today xD
still getting this in 2.35 how do i fix it?
Download MicroMacro 1.0 beta from the Announcements section of the forum.

haura
Posts: 20
Joined: Fri Jan 23, 2009 6:54 am

Re: RoM bot

#831 Post by haura » Fri Apr 24, 2009 3:33 am

This is just a direction for you to try. I offer no support for it so if you are not a good programmer then don't even bother with it.
blademagical wrote:what i must change in my micromacro to my char attack first the mobs that are attacking me first, because here my character are being attacked by 3 mobs and he got a new target and dont attack first the mobs that are attacking me first, plz what i can do to my char kill first all the mobs are already attacking me first to take after a new target? ty =)
Open player.lua and look at function function CPlayer:fight() for the section resembling the following code. (My local copy of this bot has drifted away from Elviron's code a little so you might not see an exact one to one correlation of lines of code.)

Code: Select all

	local target = self:getTarget();
	local lastHitTime = os.time();
	local lastTargetHP = target.HP;
	local PlayerHP = self.HP; -- will use to detect if being attacked by other than player's target
	local lastPlayerHP = PlayerHP;
	local dist = distance(self.X, self.Z, target.X, target.Z);

	while( self:haveTarget() ) do
		cprintf(cli.yellow,"DBG: target[%d] at dist (%d) has %d HP\n",target.Address,dist,target.HP);
		if( self.HP == 0 ) then -- If we die, break
			self.Fighting = false;
			-- QN why isn't unregisterTimer used before this return?
			if( settings.profile.options.COMBAT_TYPE == "melee" ) then
			    cprintf(cli.red,"DBG: unregisterTimer timedAttack\n");
				unregisterTimer("timedAttack");
			end
			return; -- function CPlayer:fight()
		end;

		PlayerHP = self.HP
		if( PlayerHP < lastPlayerHP ) then -- see if the current target has also targeted the player
			if( target:getTarget().Address == self.Address ) then 
				printf("Target is hostile\n");
			else -- reduction in HP must be due to another mob
				printf("Target is passive but player just lost %d HP\n",lastPlayerHP-self.HP);
				player:clearTarget(); -- allow a new target to be selected
				return; -- function CPlayer:fight
			end;		
		end;
		lastPlayerHP = PlayerHP

		target = self:getTarget();       
--		cprintf(cli.pink,"DBG: checking pots and skills\n");
		self:checkPotions();
The relevant piece is the code between
PlayerHP = self.HP
and
lastPlayerHP = PlayerHP
(you must scroll to see it)

If it is not obvious what this code does then please don't try using it.

You may also need to tweak the following within the function CPlayer:moveTo(waypoint, ignoreCycleTargets)

Code: Select all

	while( dist > 25.0 ) do
		if( self.HP == 0 ) then
			return; -- function CPlayer:moveTo
		end;
		-- after 1 SECOND (not 1mS) of movement allow the targeting of mobs enroute
		-- before this it was simply time to see if any mobs were attacking player
		if( canTarget == false and os.difftime(os.time(), startTime) > 2 ) then -- was 1 second
			canTarget = true;
		end
notice I allow 2 seconds before selecting new targets - the default of 1 second was too short for me

enjoy!

deedly
Posts: 17
Joined: Fri Feb 20, 2009 2:40 pm

Re: RoM bot

#832 Post by deedly » Fri Apr 24, 2009 7:46 am

Download the newest version (2.24), and manually load your profile. It's simple, just append the profile name when running the script: rom/bot.lua profile:Mynamë
arf, still getting same error "cannot open file... for reading"

frank
Posts: 26
Joined: Wed Apr 22, 2009 12:11 pm

Re: RoM bot

#833 Post by frank » Fri Apr 24, 2009 10:07 am

haura wrote:This is just a direction for you to try. I offer no support for it so if you are not a good programmer then don't even bother with it.
blademagical wrote:what i must change in my micromacro to my char attack first the mobs that are attacking me first, because here my character are being attacked by 3 mobs and he got a new target and dont attack first the mobs that are attacking me first, plz what i can do to my char kill first all the mobs are already attacking me first to take after a new target? ty =)
Open player.lua and look at function function CPlayer:fight() for the section resembling the following code. (My local copy of this bot has drifted away from Elviron's code a little so you might not see an exact one to one correlation of lines of code.)

Code: Select all

	local target = self:getTarget();
	local lastHitTime = os.time();
	local lastTargetHP = target.HP;
	local PlayerHP = self.HP; -- will use to detect if being attacked by other than player's target
	local lastPlayerHP = PlayerHP;
	local dist = distance(self.X, self.Z, target.X, target.Z);

	while( self:haveTarget() ) do
		cprintf(cli.yellow,"DBG: target[%d] at dist (%d) has %d HP\n",target.Address,dist,target.HP);
		if( self.HP == 0 ) then -- If we die, break
			self.Fighting = false;
			-- QN why isn't unregisterTimer used before this return?
			if( settings.profile.options.COMBAT_TYPE == "melee" ) then
			    cprintf(cli.red,"DBG: unregisterTimer timedAttack\n");
				unregisterTimer("timedAttack");
			end
			return; -- function CPlayer:fight()
		end;

		PlayerHP = self.HP
		if( PlayerHP < lastPlayerHP ) then -- see if the current target has also targeted the player
			if( target:getTarget().Address == self.Address ) then 
				printf("Target is hostile\n");
			else -- reduction in HP must be due to another mob
				printf("Target is passive but player just lost %d HP\n",lastPlayerHP-self.HP);
				player:clearTarget(); -- allow a new target to be selected
				return; -- function CPlayer:fight
			end;		
		end;
		lastPlayerHP = PlayerHP

		target = self:getTarget();       
--		cprintf(cli.pink,"DBG: checking pots and skills\n");
		self:checkPotions();
The relevant piece is the code between
PlayerHP = self.HP
and
lastPlayerHP = PlayerHP
(you must scroll to see it)

If it is not obvious what this code does then please don't try using it.

You may also need to tweak the following within the function CPlayer:moveTo(waypoint, ignoreCycleTargets)

Code: Select all

	while( dist > 25.0 ) do
		if( self.HP == 0 ) then
			return; -- function CPlayer:moveTo
		end;
		-- after 1 SECOND (not 1mS) of movement allow the targeting of mobs enroute
		-- before this it was simply time to see if any mobs were attacking player
		if( canTarget == false and os.difftime(os.time(), startTime) > 2 ) then -- was 1 second
			canTarget = true;
		end
notice I allow 2 seconds before selecting new targets - the default of 1 second was too short for me

enjoy!
Monsters that place a DOT on the player will trigger this script into thinking it's being attacked by another monster correct? There are mobs that DOT the player for 10~ seconds after the monster has died.

blademagical
Posts: 10
Joined: Tue Apr 21, 2009 12:14 pm

Re: RoM bot

#834 Post by blademagical » Fri Apr 24, 2009 11:17 am

haura wrote:This is just a direction for you to try. I offer no support for it so if you are not a good programmer then don't even bother with it.
blademagical wrote:what i must change in my micromacro to my char attack first the mobs that are attacking me first, because here my character are being attacked by 3 mobs and he got a new target and dont attack first the mobs that are attacking me first, plz what i can do to my char kill first all the mobs are already attacking me first to take after a new target? ty =)
Open player.lua and look at function function CPlayer:fight() for the section resembling the following code. (My local copy of this bot has drifted away from Elviron's code a little so you might not see an exact one to one correlation of lines of code.)

Code: Select all

	local target = self:getTarget();
	local lastHitTime = os.time();
	local lastTargetHP = target.HP;
	local PlayerHP = self.HP; -- will use to detect if being attacked by other than player's target
	local lastPlayerHP = PlayerHP;
	local dist = distance(self.X, self.Z, target.X, target.Z);

	while( self:haveTarget() ) do
		cprintf(cli.yellow,"DBG: target[%d] at dist (%d) has %d HP\n",target.Address,dist,target.HP);
		if( self.HP == 0 ) then -- If we die, break
			self.Fighting = false;
			-- QN why isn't unregisterTimer used before this return?
			if( settings.profile.options.COMBAT_TYPE == "melee" ) then
			    cprintf(cli.red,"DBG: unregisterTimer timedAttack\n");
				unregisterTimer("timedAttack");
			end
			return; -- function CPlayer:fight()
		end;

		PlayerHP = self.HP
		if( PlayerHP < lastPlayerHP ) then -- see if the current target has also targeted the player
			if( target:getTarget().Address == self.Address ) then 
				printf("Target is hostile\n");
			else -- reduction in HP must be due to another mob
				printf("Target is passive but player just lost %d HP\n",lastPlayerHP-self.HP);
				player:clearTarget(); -- allow a new target to be selected
				return; -- function CPlayer:fight
			end;		
		end;
		lastPlayerHP = PlayerHP

		target = self:getTarget();       
--		cprintf(cli.pink,"DBG: checking pots and skills\n");
		self:checkPotions();
The relevant piece is the code between
PlayerHP = self.HP
and
lastPlayerHP = PlayerHP
(you must scroll to see it)

If it is not obvious what this code does then please don't try using it.

You may also need to tweak the following within the function CPlayer:moveTo(waypoint, ignoreCycleTargets)

Code: Select all

	while( dist > 25.0 ) do
		if( self.HP == 0 ) then
			return; -- function CPlayer:moveTo
		end;
		-- after 1 SECOND (not 1mS) of movement allow the targeting of mobs enroute
		-- before this it was simply time to see if any mobs were attacking player
		if( canTarget == false and os.difftime(os.time(), startTime) > 2 ) then -- was 1 second
			canTarget = true;
		end
notice I allow 2 seconds before selecting new targets - the default of 1 second was too short for me

enjoy!
HAURA plz can u send me your player.lua in messenger? ivandelconte@hotmail.com!

I tried to substitute what was below of function fight but gave error when I went to bind bot spoke that end was very close to function in the line 101, plz send me ur player.lua =) cya and ty for help!

kenoo123
Posts: 2
Joined: Fri Apr 24, 2009 11:54 am

Re: RoM bot

#835 Post by kenoo123 » Fri Apr 24, 2009 11:57 am

My Problem is "/micromacro/scripts/rom/funktions.lua:13:attempt to call global 'findPatternInProcess' (a nil value)

What can I do?

Thanks

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

Re: RoM bot

#836 Post by Administrator » Fri Apr 24, 2009 11:59 am

deedly wrote:
Download the newest version (2.24), and manually load your profile. It's simple, just append the profile name when running the script: rom/bot.lua profile:Mynamë
arf, still getting same error "cannot open file... for reading"
Try renaming the profile and place an 'e' instead of 'ë'. Now, run rom/bot.lua profile:Charname where Charname is the same as the profile name. Works for me.
My Problem is "/micromacro/scripts/rom/funktions.lua:13:attempt to call global 'findPatternInProcess' (a nil value)

What can I do?

Thanks
Get MicroMacro 1.0 beta from the announcements section of the forum.

kenoo123
Posts: 2
Joined: Fri Apr 24, 2009 11:54 am

Re: RoM bot

#837 Post by kenoo123 » Fri Apr 24, 2009 12:04 pm

I have 1.0 an then take everthing from 2.35 in 1.0 but the problem is always there..

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

Re: RoM bot

#838 Post by Administrator » Fri Apr 24, 2009 12:07 pm

kenoo123 wrote:I have 1.0 an then take everthing from 2.35 in 1.0 but the problem is always there..
Post your log.txt from the micromacro folder.

deedly
Posts: 17
Joined: Fri Feb 20, 2009 2:40 pm

Re: RoM bot

#839 Post by deedly » Fri Apr 24, 2009 12:08 pm

Try renaming the profile and place an 'e' instead of 'ë'. Now, run rom/bot.lua profile:Charname where Charname is the same as the profile name. Works for me.
Bloody cowpoo, STILL doesnt work? can the problem be that i use MM 0.99?


EDIT*

It works with MM 1.0, and with your help, thank you so much <3

haura
Posts: 20
Joined: Fri Jan 23, 2009 6:54 am

Re: RoM bot

#840 Post by haura » Fri Apr 24, 2009 2:59 pm

frank wrote: Monsters that place a DOT on the player will trigger this script into thinking it's being attacked by another monster correct? There are mobs that DOT the player for 10~ seconds after the monster has died.
The code stops your character from attacking any new non-hostile targets while your character is still losing health.
Of course, if it finds a target that is hostile then it allows your character to start fighting the hostile target.

It is a feature of the the game (not the bot) that a second or two after you are being attacked you automatically target the mob that is attacking you. The above code fragment allows that game feature to kick in before starting any new fights.

blademagical - sorry! no. I made this clear before posting the fragment of code.
If my suggested direction does not give you what you are looking for then please do not use it.

Locked

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest