RoM bot

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Locked
Message
Author
User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: RoM bot

#1061 Post by Administrator » Thu May 28, 2009 2:17 pm

Go to line 400, you'll see yrest(10); Try changing that 10 to a 100. See if that improves anything. Now, try rom/bot.lua, line 304. You'll see another yrest(10). Change that to 100, too.


EDIT: Ok, that's very strange. What keyboard layout do you use? Did it work for you before?

kumpel100
Posts: 47
Joined: Sat May 09, 2009 11:12 am

Re: RoM bot

#1062 Post by kumpel100 » Thu May 28, 2009 3:07 pm

i did the changes with yrest(100); now it works with TAB aswell, is 100 = 100ms?

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

Re: RoM bot

#1063 Post by Administrator » Thu May 28, 2009 3:16 pm

Yes. yrest() accepts time in milliseconds. Can you test both changes separately and see which one fixes the TAB problem for you?

kumpel100
Posts: 47
Joined: Sat May 09, 2009 11:12 am

Re: RoM bot

#1064 Post by kumpel100 » Thu May 28, 2009 3:25 pm

ok, my problem is this:

Tabbing to Target
Moving to waypoint #
Moving to waypoint #
Moving to waypoint #
Moving to waypoint #
Tabbing to Target
Tabbing to Target
Moving to waypoint #
Moving to waypoint #
Moving to waypoint #
Moving to waypoint #
Moving to waypoint #
Moving to waypoint #
Moving to waypoint #
Moving to waypoint #
Tabbing to Target
Tabbing to Target


that means the bot didnt TAB every waypoint.

Edit: sometimes the bot moves 10 waypoints without use TAB ??

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

Re: RoM bot

#1065 Post by Administrator » Thu May 28, 2009 4:13 pm

You might have your waypoints placed too closely together. By default, it takes a short pause from attempting to target after each waypoint in order to give some time for aggro detection to work. Place your waypoints further apart and try again.

kumpel100
Posts: 47
Joined: Sat May 09, 2009 11:12 am

Re: RoM bot

#1066 Post by kumpel100 » Thu May 28, 2009 4:29 pm

ok, its true i have close waypoints because of to dont get to much double,tribble aggro.
i try with longer waypoints.

Edit: ok this was my problem, an other question after succefull kill an enemy is it possible to turn left check for other close mobs then turn right bevor head to next waypoint? i notice often to get aggro from behind by floading mobs.

<option name="ENABLE_FIGHT_SLOW_TURN" value="false" /> <-- what does this if i set to true? i didnt notice any diffrent from true to false.

bussdee
Posts: 37
Joined: Tue Apr 28, 2009 11:20 am

Re: RoM bot

#1067 Post by bussdee » Thu May 28, 2009 8:28 pm

I found the RoM-AddOn UberFlex AutoCombat System and combined it with your bot. This works really cool, you should try it.
"Erfahrung ist fast immer eine Parodie auf die Idee."
Johann Wolfgang von Goethe

Zilvermoon
Posts: 104
Joined: Mon Jan 05, 2009 8:19 am

Re: RoM bot

#1068 Post by Zilvermoon » Fri May 29, 2009 3:04 am

Administrator wrote:I need people to test the code below. Make changes to bot.lua, ine ~227. Directly below this code:

Code: Select all

			local target = player:getTarget();
			if( settings.profile.options.ANTI_KS ) then
				if( target:haveTarget() and target:getTarget().Address ~= player.Address and (not player:isFriend(CPawn(target.TargetPtr))) ) then
					cprintf(cli.red, language[5], target.Name);
				else
					player:fight();
				end
			else
				player:fight();
			end
Add this:

Code: Select all

			local aggroWaitStart = os.time();
			while(player.Battling) do
				if( player:haveTarget() ) then
					break;
				end;

				if( os.difftime(aggroWaitStart, os.time()) > 3 ) then
					--cprintf(cli.red, language[34]);
					printf("Aggro wait time out\n");
					break;
				end;

				yrest(10);
				player:update();
			end
I have now had a bit of time to test this code ... it's caursing an error related to "charTargetPtr_offset" or offset 0x260 ... I think it can be solved (untested, testing it off as I write this) like this:

Code: Select all

			local aggroWaitStart = os.time();
			while(player.Battling) do
				if( not player:haveTarget() ) then
					if( os.difftime(aggroWaitStart, os.time()) > 3 ) then
						--cprintf(cli.red, language[34]);
						printf("Aggro wait time out\n");
						break;
					end;
				else
					break;
				end;

				yrest(10);
				player:update();
			end
But note that this is an un-testet code suggestion...

Zilvermoon

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

Re: RoM bot

#1069 Post by Administrator » Fri May 29, 2009 3:45 am

kumpel100 wrote:ok, its true i have close waypoints because of to dont get to much double,tribble aggro.
i try with longer waypoints.

Edit: ok this was my problem, an other question after succefull kill an enemy is it possible to turn left check for other close mobs then turn right bevor head to next waypoint? i notice often to get aggro from behind by floading mobs.

<option name="ENABLE_FIGHT_SLOW_TURN" value="false" /> <-- what does this if i set to true? i didnt notice any diffrent from true to false.
You could, but it wouldn't work very well. Partly because you'd be getting really far away from your wapoints, and eventually stuck. It could even make things worse, as you'd be pulling monsters at your sides as well while monsters still attack from behind. Plus, it would be quite obvious of a bot if your character did that every time you killed an enemy.

ENABLE_FIGHT_SLOW_TURN enables or disables rotating to the enemy to attack him in combat. If you have click to move turned on, whenever you try to use a skill, your character automatically turns to your target instantly, so this is not needed. However, some people don't use click-to-move (although it causes other problems -- such as looting), so I left it as an option for now.

reloxx
Posts: 14
Joined: Sat Mar 21, 2009 5:00 am

Re: RoM bot

#1070 Post by reloxx » Sat May 30, 2009 3:01 am

Zilvermoon wrote:
Administrator wrote:I need people to test the code below. Make changes to bot.lua, ine ~227. Directly below this code:

Code: Select all

			local target = player:getTarget();
			if( settings.profile.options.ANTI_KS ) then
				if( target:haveTarget() and target:getTarget().Address ~= player.Address and (not player:isFriend(CPawn(target.TargetPtr))) ) then
					cprintf(cli.red, language[5], target.Name);
				else
					player:fight();
				end
			else
				player:fight();
			end
Add this:

Code: Select all

			local aggroWaitStart = os.time();
			while(player.Battling) do
				if( player:haveTarget() ) then
					break;
				end;

				if( os.difftime(aggroWaitStart, os.time()) > 3 ) then
					--cprintf(cli.red, language[34]);
					printf("Aggro wait time out\n");
					break;
				end;

				yrest(10);
				player:update();
			end
I have now had a bit of time to test this code ... it's caursing an error related to "charTargetPtr_offset" or offset 0x260 ... I think it can be solved (untested, testing it off as I write this) like this:

Code: Select all

			local aggroWaitStart = os.time();
			while(player.Battling) do
				if( not player:haveTarget() ) then
					if( os.difftime(aggroWaitStart, os.time()) > 3 ) then
						--cprintf(cli.red, language[34]);
						printf("Aggro wait time out\n");
						break;
					end;
				else
					break;
				end;

				yrest(10);
				player:update();
			end
But note that this is an un-testet code suggestion...

Zilvermoon

hey

i have admins code still in, and i get never errors with it.

UnRegistered
Posts: 14
Joined: Fri Apr 17, 2009 2:26 am

Re: RoM bot

#1071 Post by UnRegistered » Sat May 30, 2009 4:38 pm

Hi i got some problem with self buff ainy work any of them - QUICKNESS AURA and MAGIC MARRIER etc. work not ;<
Well my char move, fight and heal with NO problem but dont use any of self buff that i put on Profil/shortcut.
Thanx

Code: Select all

<profile>
   <options>
      <option name="HP_LOW" value="80" />
      <option name="MP_LOW_POTION" value="80" />
      <option name="HP_LOW_POTION" value="80" />

      <option name="COMBAT_TYPE" value="melee" />
      <option name="ANTI_KS" value="true" />
      <option name="WAYPOINTS" value="piraci.xml" />
      <option name="LOOT" value="true" />
      <option name="LOOT_TIME" value="3100" />
      <option name="ENERGY_STORAGE_1" value="energy" />
      <option name="ENERGY_STORAGE_2" value="concentration" />
      <option name="POTION_COOLDOWN" value="15" />
      <option name="MAX_FIGHT_TIME" value="25" />
      <option name="DOT_PERCENT" value="90" />
	<option name="WAYPOINT_DEVIATION" value="5" />
   </options>
   <hotkeys>
	<hotkey name="HP_POTION" key="VK_8" modifier="" />
	<hotkey name="MP_POTION" key="VK_EQUAL" modifier="" />
      <hotkey name="ATTACK" key="VK_1" modifier="0" />
   </hotkeys>


  <skills>
	<skill name="ROGUE_LOW_BLOW" hotkey="VK_2" modifier=""  />
	 <skill name="ROGUE_WOUND_ATTACK" hotkey="VK_3" modifier="" />

<skill name="ROGUE_KICK" hotkey="VK_4" modifier="" />
	 
	<skill name="ROGUE_SHADOWSTAB" hotkey="VK_5" modifier="" />
	
	<skill name="ROGUE_PREMEDITATION" hotkey="VK_6" modifier="" />
	 
	<skill name="ROGUE_INFORMER" hotkey="VK_9" modifier="" />

	<skill name="ROGUE_QUICKNESS_AURA" hotkey="VK_0" modifier="" />

	<skill name="PRIEST_MAGIC_BARRIER" hotkey="VK_7" modifier="" />

	

   </skills>
</profile>
[edit]
Ok sorry for that ;/.
Last edited by UnRegistered on Sun May 31, 2009 3:05 am, edited 1 time in total.

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

Re: RoM bot

#1072 Post by Administrator » Sat May 30, 2009 5:04 pm

UnRegistered wrote:Hi i got some problem with self buff ainy work any of them my Profile Quikcknes aura and Magice baeried work not ;<
What?

Try again. And don't make me edit your post to insert tags again.
The rules wrote:8. Always use code tags. Whether it be 1 line or 100,000. If you're posting code, precede it by [code] and end it with [/code]. Example:

Code: Select all

printf("Hello World");

kumpel100
Posts: 47
Joined: Sat May 09, 2009 11:12 am

Re: RoM bot

#1073 Post by kumpel100 » Sun May 31, 2009 12:53 pm

to make the Bot good working with my own harvest part i need a Pause/Unpause in the waypoint.xml

what i found is:

Code: Select all

<waypoint x="1234" z="4321">
        -- Code goes here
		os.execute("\"C:/Harvest.exe\" arguments");
        yrest(5000); 
    </waypoint>

what i need:
head to waypoint
start my own Harvest.exe with: os.execute("\"C:/Harvest.exe\" arguments");
halt bot until Harvest.exe isnt anymore in Taskmanager process
move to next waypoint.

possible to check for a running Process in Taskmanager ? and pause until the process is gone?

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

Re: RoM bot

#1074 Post by Administrator » Sun May 31, 2009 1:31 pm

You could check for the process by it's executable name, but this may have problems when running multiple harvesting bots.

Here's how you'd do that, though:

Code: Select all

while(true) do
  local foundProc = findProcessByExe("Harvest.exe");
  if( foundProc == 0 ) then
    break; -- break out, we don't have any Harvest.exe running
  end
 
  yrest(100);
end

kumpel100
Posts: 47
Joined: Sat May 09, 2009 11:12 am

Re: RoM bot

#1075 Post by kumpel100 » Mon Jun 01, 2009 9:16 am

this works very good:

Code: Select all

</waypoint>
	<waypoint x="-xxxx" z="-xxxx" >
	yrest(100);
     os.execute("\"C:/Harvest.exe\" arguments");
	  yrest(100);
	  while(true) do
  local foundProc = findProcessByExe("Harvest.exe");
  if( foundProc == 0 ) then
    break; -- break out, we don't have any Harvest.exe running
  end
  yrest(100);
end
yrest(100);
</waypoint>

thx Admin :)

Atticuse
Posts: 1
Joined: Mon Jun 01, 2009 4:21 pm

Re: RoM bot

#1076 Post by Atticuse » Mon Jun 01, 2009 4:27 pm

I am having a problem with my waypoints. I get it running but when it says its moving to a waypoint, it just stays there and moves one step back every couple seconds. Now if i face my guy in a certain direction he will start to move and kill something but then he just stays there and does the same thing until I move him around a bit again. Any suggestions on what might be causing this?

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

Re: RoM bot

#1077 Post by Administrator » Mon Jun 01, 2009 6:11 pm

Atticuse wrote:I am having a problem with my waypoints. I get it running but when it says its moving to a waypoint, it just stays there and moves one step back every couple seconds. Now if i face my guy in a certain direction he will start to move and kill something but then he just stays there and does the same thing until I move him around a bit again. Any suggestions on what might be causing this?
My only guess is that you didn't change your settings.xml to match the hotkeys you configured in-game.

Zilvermoon
Posts: 104
Joined: Mon Jan 05, 2009 8:19 am

Re: RoM bot

#1078 Post by Zilvermoon » Mon Jun 01, 2009 7:49 pm

reloxx wrote:
Zilvermoon wrote:
Administrator wrote:I need people to test the code below. Make changes to bot.lua, ine ~227. Directly below this code:

Code: Select all

			local target = player:getTarget();
			if( settings.profile.options.ANTI_KS ) then
				if( target:haveTarget() and target:getTarget().Address ~= player.Address and (not player:isFriend(CPawn(target.TargetPtr))) ) then
					cprintf(cli.red, language[5], target.Name);
				else
					player:fight();
				end
			else
				player:fight();
			end
Add this:

Code: Select all

			local aggroWaitStart = os.time();
			while(player.Battling) do
				if( player:haveTarget() ) then
					break;
				end;

				if( os.difftime(aggroWaitStart, os.time()) > 3 ) then
					--cprintf(cli.red, language[34]);
					printf("Aggro wait time out\n");
					break;
				end;

				yrest(10);
				player:update();
			end
I have now had a bit of time to test this code ... it's caursing an error related to "charTargetPtr_offset" or offset 0x260 ... I think it can be solved (untested, testing it off as I write this) like this:

Code: Select all

			local aggroWaitStart = os.time();
			while(player.Battling) do
				if( not player:haveTarget() ) then
					if( os.difftime(aggroWaitStart, os.time()) > 3 ) then
						--cprintf(cli.red, language[34]);
						printf("Aggro wait time out\n");
						break;
					end;
				else
					break;
				end;

				yrest(10);
				player:update();
			end
But note that this is an un-testet code suggestion...

Zilvermoon

hey

i have admins code still in, and i get never errors with it.
Yeah sorry, was another piece of code, creating the error ... my bad... (finally figured out what exactly was the course of the error)...

Zilvermoon

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

Re: RoM bot

#1079 Post by Administrator » Mon Jun 01, 2009 8:23 pm

Zilvermoon wrote: Yeah sorry, was another piece of code, creating the error ... my bad... (finally figured out what exactly was the course of the error)...

Zilvermoon
Where was the problem? Have you committed the changes to SVN (if necessary)?

Zilvermoon
Posts: 104
Joined: Mon Jan 05, 2009 8:19 am

Re: RoM bot

#1080 Post by Zilvermoon » Tue Jun 02, 2009 12:07 am

Administrator wrote:
Zilvermoon wrote: Yeah sorry, was another piece of code, creating the error ... my bad... (finally figured out what exactly was the course of the error)...

Zilvermoon
Where was the problem? Have you committed the changes to SVN (if necessary)?
I'm still in a testing phase, had done some custom code changes, but I'll get back with more information once I'm done debugging ... I'll need to do some 100% "clean SVN copy" testing ... and no I didn't commit anything to SVN yet.

Zilvermoon

Locked

Who is online

Users browsing this forum: Ahrefs [Bot] and 8 guests