Page 42 of 111

Re: RoM bot

Posted: Thu Apr 23, 2009 3:23 pm
by Zilvermoon
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

Re: RoM bot

Posted: Thu Apr 23, 2009 4:18 pm
by kokowiki
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.

Re: RoM bot

Posted: Thu Apr 23, 2009 4:27 pm
by executor
provide me with link for 2.23 please i cant find where to download it

Re: RoM bot

Posted: Thu Apr 23, 2009 4:30 pm
by someone
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

Re: RoM bot

Posted: Thu Apr 23, 2009 4:49 pm
by blademagical
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 =)

Re: RoM bot

Posted: Thu Apr 23, 2009 4:53 pm
by Administrator
Just made another update to fix the error in 2.34. Go ahead and grab 2.35 now.

Re: RoM bot

Posted: Thu Apr 23, 2009 4:56 pm
by shavas
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.

Re: RoM bot

Posted: Thu Apr 23, 2009 5:23 pm
by kokowiki
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!

Re: RoM bot

Posted: Thu Apr 23, 2009 8:15 pm
by someone
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?

Re: RoM bot

Posted: Thu Apr 23, 2009 8:36 pm
by Administrator
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.

Re: RoM bot

Posted: Fri Apr 24, 2009 3:33 am
by haura
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!

Re: RoM bot

Posted: Fri Apr 24, 2009 7:46 am
by deedly
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"

Re: RoM bot

Posted: Fri Apr 24, 2009 10:07 am
by frank
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.

Re: RoM bot

Posted: Fri Apr 24, 2009 11:17 am
by blademagical
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!

Re: RoM bot

Posted: Fri Apr 24, 2009 11:57 am
by kenoo123
My Problem is "/micromacro/scripts/rom/funktions.lua:13:attempt to call global 'findPatternInProcess' (a nil value)

What can I do?

Thanks

Re: RoM bot

Posted: Fri Apr 24, 2009 11:59 am
by Administrator
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.

Re: RoM bot

Posted: Fri Apr 24, 2009 12:04 pm
by kenoo123
I have 1.0 an then take everthing from 2.35 in 1.0 but the problem is always there..

Re: RoM bot

Posted: Fri Apr 24, 2009 12:07 pm
by Administrator
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.

Re: RoM bot

Posted: Fri Apr 24, 2009 12:08 pm
by deedly
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

Re: RoM bot

Posted: Fri Apr 24, 2009 2:59 pm
by haura
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.