Page 54 of 111
Re: RoM bot
Posted: Thu May 28, 2009 2:17 pm
by Administrator
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?
Re: RoM bot
Posted: Thu May 28, 2009 3:07 pm
by kumpel100
i did the changes with yrest(100); now it works with TAB aswell, is 100 = 100ms?
Re: RoM bot
Posted: Thu May 28, 2009 3:16 pm
by Administrator
Yes. yrest() accepts time in milliseconds. Can you test both changes separately and see which one fixes the TAB problem for you?
Re: RoM bot
Posted: Thu May 28, 2009 3:25 pm
by kumpel100
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 ??
Re: RoM bot
Posted: Thu May 28, 2009 4:13 pm
by Administrator
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.
Re: RoM bot
Posted: Thu May 28, 2009 4:29 pm
by kumpel100
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.
Re: RoM bot
Posted: Thu May 28, 2009 8:28 pm
by bussdee
I found the RoM-AddOn
UberFlex AutoCombat System and combined it with your bot. This works really cool, you should try it.
Re: RoM bot
Posted: Fri May 29, 2009 3:04 am
by Zilvermoon
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
Re: RoM bot
Posted: Fri May 29, 2009 3:45 am
by Administrator
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.
Re: RoM bot
Posted: Sat May 30, 2009 3:01 am
by reloxx
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.
Re: RoM bot
Posted: Sat May 30, 2009 4:38 pm
by UnRegistered
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 ;/.
Re: RoM bot
Posted: Sat May 30, 2009 5:04 pm
by Administrator
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:
Re: RoM bot
Posted: Sun May 31, 2009 12:53 pm
by kumpel100
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?
Re: RoM bot
Posted: Sun May 31, 2009 1:31 pm
by Administrator
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
Re: RoM bot
Posted: Mon Jun 01, 2009 9:16 am
by kumpel100
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
Re: RoM bot
Posted: Mon Jun 01, 2009 4:27 pm
by Atticuse
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?
Re: RoM bot
Posted: Mon Jun 01, 2009 6:11 pm
by Administrator
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.
Re: RoM bot
Posted: Mon Jun 01, 2009 7:49 pm
by Zilvermoon
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
Re: RoM bot
Posted: Mon Jun 01, 2009 8:23 pm
by Administrator
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)?
Re: RoM bot
Posted: Tue Jun 02, 2009 12:07 am
by Zilvermoon
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