Page 37 of 111

Re: RoM bot

Posted: Mon Apr 13, 2009 6:14 pm
by elroy72
Abisbowa wrote:Alright, I followed the instructions to the letter. It works until after the first mob then the bot starts running off at a tangent. Is something wrong with the create path script? My values seem to be off or something.
I had a similar problem at first; are your wasd and qe keys all binded to defaults? meaning:
W= walk forward
A= Strafe Left
S= Walk Backwards
D= Strafe Right
Q= Turn Left
E= Turn Right

if not you can either change them back to defaults or edit settings.xml

so if you wanted to have "A" turn left rather than strafe (if that's how you have it set up in game) you would change

Code: Select all

<hotkey description="ROTATE_LEFT" key="VK_Q" modifier="" />
to

Code: Select all

<hotkey description="ROTATE_LEFT" key="VK_A" modifier="" />
and so on for the rest of the keys.

Re: RoM bot

Posted: Mon Apr 13, 2009 10:31 pm
by Abisbowa
Thanks man! If this forum had kudos I would give you at least over 9000 :D

Re: RoM bot

Posted: Tue Apr 14, 2009 9:08 am
by Rajinn
elroy72 wrote:
Rajinn wrote:thanks for the reply!
I'll try out what you said, hope it works :)

edit:
how does priority work exactly?
is it 0-100, whats the default priority? is it based on the skill? //answered it myself, its defined in the database for skills.

if skill A is priority 15 and skill B is priority 16, will B get cast first or A? (aka low to high or high to low cast order?)

im trying to set my skills to work in an exact order and its tricky XD, they are casting in reverse order regardless of priority.
I'm pretty sure 100 priority would go first, 1 or 0 going last.

New version! I'm definitely looking forward to it..
thats what i had thought, but it appears i have found a bug ;)
anyways YEAH NEW VERSION!
I actually have free time starting this afternoon until like friday, so i'll try to make some additions to the script and see what all i can do :)
im gonna start with trying to make sure you kill aggro before moving on XD

Re: RoM bot

Posted: Tue Apr 14, 2009 11:47 am
by Abisbowa
Would it be possible to code in a function that makes the bot jump randomly when moving? Since most human players jump when they are running somewhere, may be a way to make the bot look more human.

Re: RoM bot

Posted: Tue Apr 14, 2009 1:42 pm
by Rajinn
Abisbowa wrote:Would it be possible to code in a function that makes the bot jump randomly when moving? Since most human players jump when they are running somewhere, may be a way to make the bot look more human.
in rom/classes/player.lua, go to the moveTo function (line 384, ctrl+g 384)
insert

Code: Select all

keyboardPress(key.VK_SPACE); 
inside the while loop [while( dist > 25.0 ) do]

ie
change:

Code: Select all

	while( dist > 25.0 ) do
		if( self.HP == 0 ) then
			return;
		end;
to

Code: Select all

	while( dist > 25.0 ) do
		if( self.HP == 0 ) then
			return;
		end;

keyboardPress(key.VK_SPACE); 

should do it

edit:
you can make it more random by doing something like

Code: Select all

if (math.random(75) < 15) then
	keyboardPress(key.VK_SPACE); 
end;
instead, making 75 larger or 15 smaller will decrease the chances of jumping, vice versa

edit for admin:
if you do include the return to hunting grounds on death navigation blah blah stuff done (onDeath fixed) you should add a death counter to it.
that way you know if you died once in an hour or 20 times... it would be even better to list if you were PKed or not. (monitor death penalty... if dead + no increase, pk)

Re: RoM bot

Posted: Thu Apr 16, 2009 4:07 am
by darthjiggles
Brilliant work Admin, I look forward to future editions 8-)

Re: RoM bot

Posted: Thu Apr 16, 2009 8:54 am
by Administrator
Newest version uploaded. Contains a few new features, and a few updates. If you aren't sure how the new features work, re-read the first post in this thread; there are specific directions given.

New features:
  • Resurrect and return to your waypoints when you die
    Random wander-type movement
    Waypoint deviation - makes you look less like a bot
Updates:
  • update.lua is (should) be working again
    Bug fixes
    Skill fixes
    Setting defaults (no more errors when you don't specify all possible settings in your profile)

Re: RoM bot

Posted: Thu Apr 16, 2009 9:21 am
by Rajinn
sweet an update, if i find any bugs i'll make sure to correct them lol.

Re: RoM bot

Posted: Thu Apr 16, 2009 12:16 pm
by elroy72
Awesome! Thanks!

I honestly think this is the only smallish project that has so much attention and effort put into it. any other project die after the first release or when something changes takes a week to a month for a decent update!

So again, Thanks!

Re: RoM bot

Posted: Thu Apr 16, 2009 2:47 pm
by Jovaras
HAve you changed waypoints.xml coding? BEcause using my old one it's running completely out of waypoints.
My waypoints:

Code: Select all

<waypoints>
	<waypoint x="14005" z="3062" />
	<waypoint x="14148" z="3133" />
	<waypoint x="14381" z="3259" />
	<waypoint x="14491" z="3380" />
	<waypoint x="14586" z="3510" />
	<waypoint x="14669" z="3692" />
	<waypoint x="14789" z="3767" />
	<waypoint x="14858" z="3947" />
	<waypoint x="14818" z="4157" />
	<waypoint x="14642" z="4560" />
	<waypoint x="14818" z="4157" />
	<waypoint x="14858" z="3947" />
	<waypoint x="14789" z="3767" />
	<waypoint x="14669" z="3692" />
	<waypoint x="14586" z="3510" />
	<waypoint x="14491" z="3380" />
	<waypoint x="14381" z="3259" />
	<waypoint x="14148" z="3133" />
</waypoints>
Profile:

Code: Select all

<profile>
	<options>
		<option name="HP_LOW" value="85" />
		<option name="MP_LOW_POTION" value="50" />
		<option name="HP_LOW_POTION" value="60" />

		<option name="COMBAT_TYPE" value="ranged" />
		<option name="COMBAT_DISTANCE" value="200" />
		<option name="ANTI_KS" value="true" />
		<option name="WAYPOINTS" value="scealok.xml" />
		<option name="RETURNPATH" value="testing.xml" />
		<option name="PATH_TYPE" value="waypoints" />
		<option name="WANDER_RADIUS" value="300" />
		<option name="WAYPOINT_DEVIATION" value="50" />
		<option name="LOOT" value="true" />
		<option name="LOOT_TIME" value="2000" />
		<option name="ENERGY_STORAGE_1" value="concentration" />
		<option name="ENERGY_STORAGE_2" value="energy" />
		<option name="POTION_COOLDOWN" value="15" />
		<option name="MAX_FIGHT_TIME" value="30" />
		<option name="DOT_PERCENT" value="90" />
	</options>

	<friends>
		<friend name="MyOtherCharacter1" />
		<friend name="MyOtherCharacter2" />
	</friends>

	<hotkeys>
		<hotkey name="HP_POTION" key="VK_MINUS" modifier="" />
		<hotkey name="MP_POTION" key="VK_EQUAL" modifier="" />
		<hotkey name="ATTACK" key="VK_0" modifier="" />
		<hotkey name="RES_MACRO" key="VK_9" modifier="" />
	</hotkeys>

	<skills>
		<skill name="SCOUT_VAMPIRE_ARROWS" hotkey="VK_4" type="dot" />
		<skill name="ROGUE_SHADOWSTAB" hotkey="VK_6" energy="30" range="50" type="damage" target="enemy" />
		<skill name="SCOUT_WIND_ARROWS" hotkey="VK_3" concentration="8" range="225" type="damage" target="enemy" />
		<skill name="SCOUT_FROST_ARROW" hotkey="VK_EQUAL" concentration="20" cooldown="300" type="buff" target="self" />
		<skill name="SCOUT_SHOT" priority="100" hotkey="VK_2" consumable="1" range="20" cooldown="4" type="damage" target="enemy" />
	</skills>

	<onDeath>
		-- Additional Lua code to execute on death
		pauseOnDeath(); -- Stop the script
	</onDeath>

	<onLeaveCombat>
		-- Additional Lua code to execute after killing an enemy
	</onLeaveCombat>

	<onSkillCast>
		-- Additional Lua code to execute when casting a skill
		-- Note: arg1 contains the skill being used.
		-- i.e. arg1.Name will be the name of the skill being cast.
	</onSkillCast>
</profile>

Re: RoM bot

Posted: Thu Apr 16, 2009 4:33 pm
by kokowiki
Jovaras wrote:HAve you changed waypoints.xml coding? BEcause using my old one it's running completely out of waypoints.
I thought so at first, but then changed the 'waypoint deviation' and 'wander radius' to 5 (zero doesn't work), and it now sticks to my waypoints.

Re: RoM bot

Posted: Thu Apr 16, 2009 8:05 pm
by Rajinn
hrm.. doesnt seem to do anything at all when i die, could be a fluke. i let it run for 7 hours and it died in 15 minutes XD

Re: RoM bot

Posted: Thu Apr 16, 2009 10:43 pm
by darthjiggles
I continue to get the error
micromacro/scripts/rom/classes/waypointlist.lua:54: bad argument #1 to 'random' (interval is empty)

I am using default settings straight from the zip.

Re: RoM bot

Posted: Thu Apr 16, 2009 11:57 pm
by Administrator
darthjiggles wrote:I continue to get the error
micromacro/scripts/rom/classes/waypointlist.lua:54: bad argument #1 to 'random' (interval is empty)

I am using default settings straight from the zip.
And what's in your profile? Try changing your WAYPOINT_DEVIATION to 2. I am making a fix for 0 (or 1) deviation to disable waypoint deviation all-together now, that seems to work. In the meantime, though, a deviation of 2 should work just fine.

Re: RoM bot

Posted: Fri Apr 17, 2009 4:02 am
by darthjiggles
Ah, thank you :mrgreen:

Re: RoM bot

Posted: Fri Apr 17, 2009 10:29 am
by Rajinn
when i die its not doing anything, its just like the previous release or it doesnt even realize i died.

i have the res macro and i have it set up in the profile, i have the return path and that works just peachy if i res myself (and unpause the bot sometimes), but half the time it just dies and is clueless, the other half it dies and pauses. i tried commenting pauseOnDeath(); but it still just doesnt recognize its dead.

edit:
50 waypoint deviation seems like a lot, it put me halfway across the map from where i was botting!

Re: RoM bot

Posted: Fri Apr 17, 2009 10:32 am
by Administrator
What does it say in your log (on the times that it pauses)? Does it make note of your character dieing, take a screenshot, and then refuse to resurrect, and after 1 minute try to continue? Or does it try to continue on it's way as if it were still alive to begin with?
edit:
50 waypoint deviation seems like a lot, it put me halfway across the map from where i was botting!
Seems like a bug. This should not be happening. 50 units is roughly the distance between you and your enemy when you are meleeing. Can you provide a copy of your log and profile?

EDIT: Found it. Line 51 of classes/waypointlist.lua

Code: Select all

	local tmp = self.Waypoints[self.CurrentWaypoint];
Change to:

Code: Select all

	local tmp = CWaypoint(self.Waypoints[self.CurrentWaypoint]);

Re: RoM bot

Posted: Fri Apr 17, 2009 11:21 am
by UnRegistered
Got the same problem whit waipoint but, whit that DEVIATION work correctly. TY!
Administrator wrote:
darthjiggles wrote:I continue to get the error
micromacro/scripts/rom/classes/waypointlist.lua:54: bad argument #1 to 'random' (interval is empty)

I am using default settings straight from the zip.
And what's in your profile? Try changing your WAYPOINT_DEVIATION to 2. I am making a fix for 0 (or 1) deviation to disable waypoint deviation all-together now, that seems to work. In the meantime, though, a deviation of 2 should work just fine.
Is thee any posibility to make more than 10 Hotkey's ? 1-0 + ? othe bars ?
Ty My Reguards.

Re: RoM bot

Posted: Fri Apr 17, 2009 11:45 am
by Administrator
UnRegistered wrote:Got the same problem whit waipoint
Re-download the scripts for the fix.
Is thee any posibility to make more than 10 Hotkey's ? 1-0 + ? othe bars ?quote]
Under interface options in-game you will find how to do this.

Re: RoM bot

Posted: Fri Apr 17, 2009 1:04 pm
by Rajinn
next time it dies i'll grab the log for you.
atm its just trying to climb walls like mad XD i'll change what you said and see if it helps.

it makes no indication that it knows im dead, its still spinning around and going "moving to waypoint failed"
no pic, no pause, no death msg, nothing. if it does make note that i died, it just says "you died press delete when ready to continue" or whatever your little note was, pauses it, and doesnt continue. i havent died since i removed commented out pauseOnDeath(); so that might be the fix.

i dont die much so it might be a while XD

edit:
i redid the update.lua pattern and it seems to find it fine, after the next patch i'll run it and try it out again.
i dont know about if yours does or doesnt work. mine updated my addresses correctly for this patch.