Page 1 of 1
RoM bot make it Faster
Posted: Thu Nov 03, 2011 7:32 am
by Lordnika
Hello ,
I was wandering if is something u can do to reduce time lag between
actions ( targeting , attack, loot ,moving ...and so on )
For ex character moving see target he STOP target kill move to loot STOP loot STOP..etc
And here is my question , how to remove all this times delays.
My second question is ( i'm Scout/warr ) how can u make bot to attk on the move ( if it is possible)
Like : spot target , get in attak range , attak ( if any loot then loot else move to next target/wp )
all this time never stop unless he loots.
I ask this question becouse it well look more human like and a lot faster .
Thnx and i hope for rply ( sry if it is a double post but i cant find it my answers )
Re: RoM bot make it Faster
Posted: Thu Nov 03, 2011 9:29 am
by lisa
Short answer is the bot is making 1000's of calculations and decisions every second, might be hundreds but you get the point.
First it looks at every single object in memory, that is everything.
Then it decides if any are mobs it can kill.
Then it decides if any are attacking you or anyone in your party
then it decides if it is a mob with red name or yellow name. Red will attack you, yellow won't
Then it decides which have lower HP.
Then it decides which are closer.
So finally in the end it attacks the mob that has the most potential to kill the bot(character).
So after it decided what to attack it then goes through all of your skills 1 by 1 and deciding which skills to use according to the settings.
I know exactly what you are saying though and I have been spending quite a bit of time trying to decide a better way to go about using bot with less strain on the resources.
My original thought was to basically strip the files down to bare minimum so you end up with 2 folders, so like a rombot lite version. This would take months to get stable.
So I looked at other ways.
1 thing we came up with is by setting WP to TRAVEL it disables all of the code that looks for enemies. So in millers use type="TRAVEL" as you won't ever have to kill anything.
I have also been playing with party bot and also doing work on some other more intense WP files. I am now concidering a rewrite of key functions inside the WP onload. So basically use new code that better suits the WP. Like if you just want to kill everything in sight then negate all of the checks in findenemy and just kill the closest, bamm.
Something to keep in mind though is the bot is evolving and expanding with more and more functionality and with that comes more load on resources. Another thing is at the same time the game itself is also evolving and also becoming more of a strain on PC resources.
I have an old machine and before chap 4 it could run 1 client and MM without issue. Now since chap 4 came out I can barely run the client even without MM at all. This is an indication of how the game itself is making PCs work harder, add in also rombot and you have a bigger pull on the PC.
Re: RoM bot make it Faster
Posted: Thu Nov 03, 2011 2:07 pm
by Lordnika
Thnx Lisa .
I have no ideea how write code but u'r answer is exactly what i was thinking off .
Skip all the checks just kill all ( what is left is the user must make WP route vry exact )
And , i don't know if it is possible , doo all the killing while on the move this would be a charm.
Only stop for loot if is any .
But yet again is the perfect solution to skip all and just kill :p
thnx again .
i have to learn to write cod in MM :p
Re: RoM bot make it Faster
Posted: Thu Nov 03, 2011 10:35 pm
by rock5
The problem with killing on the move, is there is no way for the bot to know if it can kill that fast. It would be great if it could but I can't see how we could implement it.
Hm... Maybe we could have a STOP_DISTANCE as well as the COMBAT_DISTANCE. COMBAT_DISTANCE is the distance it starts casting and STOP_DISTANCE is the distance it stops at to finish the job if the mob isn't dead yet.
Re: RoM bot make it Faster
Posted: Fri Nov 04, 2011 12:19 am
by Lordnika
ok here is what i try to do , make a route were i finde 2 types of mobs and only kill 1 type
( like Mob list in profile , only mabe it will be faster )
This is what i was thinking off ( i just HUTNS me

)
(i idont know the funcions )
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
- <waypoints type="RUN">
- <!-- # 1 -->
<waypoint x="2258" z="23472" y="-299">
Usemacro(VK_TAB);
if ( player:target().name == "some name" ) then
KillTarget(); // Killtarget() can be a easy use of just 1 skill or 2;
if ( player:Loot() == true ) then
Loot();
else move_to_next_WP ();
end
else move_to_next_WP();
end
</waypoint>
- <!-- # 2 -->
<waypoint x="2138" z="23361" y="-296" />
- <!-- # 3 -->
<waypoint x="2274" z="23205" y="-293" />
- <!-- # 4 -->
<waypoint x="2253" z="23454" y="-297" />
</waypoints>
Now this it will be faster then :
<?xml version="1.0" encoding="utf-8" ?>
- <waypoints type="NORMAL">
- <!-- # 1 -->
<waypoint x="2258" z="23472" y="-299"></waypoint>
- <!-- # 2 -->
<waypoint x="2138" z="23361" y="-296" />
- <!-- # 3 -->
<waypoint x="2274" z="23205" y="-293" />
- <!-- # 4 -->
<waypoint x="2253" z="23454" y="-297" />
</waypoints>
Is soo mutch stuff u can do with MM and a lot of info , my head spins like crazy
if u can direct me were i can learn basic function ( Read wiki dint find what i was looking for sry )
and with some eg.
Mabe just mabe If WP is set to TRAVEL and use keys ( TAB ) to target ,it will not stop ,
and if u can killmob in 1 hit , duno .
If what is top u find any use can u replace with real funcions ?
thnx for replys
I love this forum !!!
Re: RoM bot make it Faster
Posted: Fri Nov 04, 2011 1:13 am
by lisa
Issue with tab targeting is it ONLY targets a mob infront of your view, very limiting.
Re: RoM bot make it Faster
Posted: Fri Nov 04, 2011 1:16 am
by Lordnika
I know but it a start ( if WP are corect then is np )
But my thinking might work ?
Re: RoM bot make it Faster
Posted: Fri Nov 04, 2011 1:31 am
by Lordnika
i try to target a mob and cant make character to target anything.
can u give me a tip /function to target in TRAVEL/RUN mode ?
Re: RoM bot make it Faster
Posted: Fri Nov 04, 2011 1:55 am
by Lordnika
i manage to target mob with :
player:target_Object("Cow Beetle");
but i think the function is too complex and is pause for a fraction of a sec
still a big step for me

Oh ...and he target and attak the target
i will go see on bigger mobs to see what it will do
Re: RoM bot make it Faster
Posted: Fri Nov 04, 2011 12:18 pm
by Lordnika
Ok here is what i manage to do so far . Not near perfect but i test if it can move and shoot
and it dose :
<?xml version="1.0" encoding="utf-8"?><waypoints type="RUN">
<!-- # 1 --><waypoint x="6926" z="3668" y="158">
player:target(player:findEnemy())
if player:haveTarget() then
keyboardHold(settings.hotkeys.MOVE_FORWARD.key);
sendMacro("/cast Wind Arrows");
yrest(1000);
keyboardRelease(key.VK_W);
end
</waypoint>
.............................................
<!-- # 9 --><waypoint x="6708" z="3575" y="158">
player:target(player:findEnemy())
if player:haveTarget() then
keyboardHold(settings.hotkeys.MOVE_FORWARD.key);
sendMacro("/cast Wind Arrows");
yrest(1000);
keyboardRelease(key.VK_W);
end
</waypoint>
</waypoints>
The thing is WP must be perfect ( not in my case

) and
keyboardHold(settings.hotkeys.MOVE_FORWARD.key); is the same with keyboardHold(key.VK_W); ?
the character shot while in move but he moves in the rong direction .
question : can i put the code between WP ?
i mean to run the code not when it gets to WP but between ?
Re: RoM bot make it Faster
Posted: Fri Nov 04, 2011 12:38 pm
by Lordnika
this is better
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onLoad>
function MoveKill()
player:target(player:findEnemy())
if player:haveTarget() then
keyboardHold(settings.hotkeys.MOVE_FORWARD.key);
sendMacro("/cast Wind Arrows");
keyboardRelease(key.VK_W);
end
end
</onLoad>
<!-- # 1 --><waypoint x="6926" z="3668" y="158">
MoveKill();
</waypoint>
<!-- # 2 --><waypoint x="6784" z="3715" y="158">
MoveKill();
</waypoint>
<!-- # 3 --><waypoint x="6656" z="3724" y="158">
MoveKill();
</waypoint>
<!-- # 4 --><waypoint x="6580" z="3705" y="158">
MoveKill();
</waypoint>
<!-- # 5 --><waypoint x="6529" z="3673" y="158">
MoveKill();
</waypoint>
<!-- # 6 --><waypoint x="6454" z="3583" y="158">
MoveKill();
</waypoint>
<!-- # 7 --><waypoint x="6461" z="3527" y="158">
MoveKill();
</waypoint>
<!-- # 8 --><waypoint x="6484" z="3504" y="158">
MoveKill();
</waypoint>
<!-- # 9 --><waypoint x="6708" z="3575" y="158">
MoveKill();
</waypoint>
</waypoints>
Re: RoM bot make it Faster
Posted: Fri Nov 04, 2011 6:47 pm
by Lordnika
I made this (copy /paste from u'r work :p) :
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="TRAVEL">
<onload><![CDATA[
player:update();
target = player:getTarget();
function MoveKill()
RoMScript("TargetNearestEnemy();");
RoMScript("/cast Wind Arrows");
player:lootAll()
end
]]></onload>
but it dosent loot , LOOT_ALL and LOOT = true
i also try this :
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="RUN">
<onLoad>
function MoveKill()
player:target(player:findEnemy());
if ( player:haveTarget() ) then
sendMacro("/cast Wind Arrows");
end
player:lootAll();
end
</onLoad>
this 1 is looting but bot walks then it turns to loot
also try this 1
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints type="RUN">
<onLoad>
player:update();
local target = player:getTarget();
function MoveKill()
player:target(player:findEnemy());
if ( player:haveTarget() ) then
RoMScript("/cast Wind Arrows");
end;
target:update();
if target.Lootable then
printf("Looting /r");
RoMScript("UseSkill(1,1);");
-- player:lootAll();
else printf("No Loot /r");
end;
end
</onLoad>
kinda runs but same problem target.Lootable() = false always
put the printf to check if it get lootable but all i get is "No loot"
I know until now must be a joke for u guys but from 100% noob to actualy make the bot do something
for is a big step.
Sry if make u to lose your time
and sry for my BAD eng