SVN 128: autorepair with the bot and ingame addon streamline

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

SVN 128: autorepair with the bot and ingame addon streamline

#1 Post by d003232 » Wed Aug 05, 2009 6:12 pm

There is a small solution for autorepair or automatic delivery of quests with the bot. To doing that, you need the ingame addon streamline. After that you can use a function within your waypoint file.

NEW:

Code: Select all

player:target_NPC( npc_name );
It will try to target the nearest NPC's and find the NPC by name. After that, the bot will open the dialog windown. It will also work on multibotting.

OUTDATED:
This function is quite similar to the harvesting scan function. It uses the harvesting configuration parameters to define the scan area.

Code: Select all

player:scan_for_NPC( [npc_name] );
It will scan the area and click the found NPC. If there are more npc next together, you should define a part of the name to avoid clicking the wrong npc.

e.g.

Code: Select all

<waypoints>
	<!-- Thats a demo to interact with the NPC York Harris in Logar -->
	<!-- For autorepairs you need the addon 'streamline'            -->	
	<!-- # 1 --><waypoint x="-808" z="-6067">
	player:rest(5);
	player:scan_for_NPC("York");
	player:rest(2);
	<!-- The coordinates depends from your screen resolution/window -->
	<!-- size. We recalculate them for the actual RoM windows size  -->	
	<!-- hence we need the original values (here 800x617)           -->		
	player:mouseclickL(130, 200, 800, 617);
	player:rest(2);
	player:mouseclickL(130, 300, 800, 617);
	</waypoint>
</waypoints>
In that case we click some of the dialog. If it would be a merchant, the store window would open and streamline will autorepair. As you see, you can also use:

Code: Select all

player:mouseclickL(x, y [RoM window wide, RoM window high]);
to left click an point and by that, interact with the npc. x, y is relative to the RoM window. So it is your fiddly task to find the right values to click the right buttons. We remember the RoM windows size (800 x 617) for that click positions. By doing that, we can later recalculate the mouse click points if we run the bot in a different RoM windows size.

You can use a Mouse Locator Tool to find the click points more easy. You just have to subtract the position of your RoM window (upper left corner) to get the relative values for within the RoM window. The values are depending from your screen resolution or windows size. As noted before, please insert them also into the function call.

Caution: Similar to the harvesting function, the RoM window has to be in the foreground.

EDIT: Now you can also use target_NPC(). That function don't need the RoM window in the foreground.
Last edited by d003232 on Sat Aug 15, 2009 5:52 pm, edited 8 times in total.
The RoM Bot Online Wiki needs your help!

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: SVN 128: autorepair with the bot and ingame addon streamline

#2 Post by d003232 » Wed Aug 05, 2009 7:46 pm

Here a demo file for the daily quest delivery of scorpion in Obsidian.

You have to take the Q from the Osidian bulletin board. Go to the teleporter and then deliver the Q to Albion at the "Handwerksplatz".

Code: Select all

<waypoints>
	<!-- # 1 --><waypoint x="-23458" z="4077">
	player:rest(2);
	if( player.free_counter1 > 10 ) then
		player.free_flag1 = 0;
		error("DQ delivery finished", 0);	<!-- Not really an error, but it will drop us back to shell. -->
	end
	</waypoint>
	<!-- # 1 --><waypoint x="-23151" z="4524">
		player:rest(4);
		player:mouseclickL(440, 280, 825, 582);player:rest(1);	<!-- Blackboard -->
		player:mouseclickL(440, 280, 825, 582);player:rest(1);	<!-- Blackboard -->		
		player:mouseclickL(150, 195, 825, 582);player:rest(1);	<!-- Blackboard -->
	</waypoint>
	<!-- # 2 --><waypoint x="-23214" z="4483">
	player:rest(4);
	player:scan_for_NPC("Maylen");
	player:mouseclickL(150, 214, 825, 582);
	</waypoint>
	<!-- # 3 --><waypoint x="-22875" z="6330"></waypoint>
	<!-- # 4 --><waypoint x="-22954" z="6667">
	player:rest(4);
	player:scan_for_NPC("Albion");
	player.free_counter1 = player.free_counter1 + 1;
	</waypoint>
	<!-- # 5 --><waypoint x="-22888" z="6371"></waypoint>
	<!-- # 6 --><waypoint x="-23642" z="5807">
	player:rest(4);
	player:scan_for_NPC("Maya");
	player:mouseclickL(150, 197, 825, 582);
	</waypoint>
</waypoints>
Before we scan for a NPC, we rest a view seconds, to give the camera time for the zoom in / zoom out bug while using quickturn.
The RoM Bot Online Wiki needs your help!

master121
Posts: 45
Joined: Mon Dec 29, 2008 10:40 am

Re: SVN 128: autorepair with the bot and ingame addon streamline

#3 Post by master121 » Fri Aug 14, 2009 6:23 am

<waypoints type="TRAVEL" >
<!-- # 1 --><waypoint x="-5549" z="3295">
keyboardPress(settings.profile.hotkeys.RES_MACRO.key);
yrest(3000);
player:mouseclickL(170, 260);
</waypoint>
</waypoints>

On the Res Macro Key i have this Macro :
/wait 1;
/script TargetNearestFriend()
/script if(UnitName("target") == "Miles") then UseAction(6); else UseAction(9);end
6 = Attack to start a conversion
9 = Macro again

But then i get this error : Attempt to call method "mouseclickL" ( a nil value)

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: SVN 128: autorepair with the bot and ingame addon streamline

#4 Post by d003232 » Fri Aug 14, 2009 6:28 am

master121 wrote:<waypoints type="TRAVEL" >
<!-- # 1 --><waypoint x="-5549" z="3295">
keyboardPress(settings.profile.hotkeys.RES_MACRO.key);
yrest(3000);
player:mouseclickL(170, 260);
</waypoint>
</waypoints>

On the Res Macro Key i have this Macro :
/wait 1;
/script TargetNearestFriend()
/script if(UnitName("target") == "Miles") then UseAction(6); else UseAction(9);end
6 = Attack to start a conversion
9 = Macro again

But then i get this error : Attempt to call method "mouseclickL" ( a nil value)
That function is part of one of the last SVN updates. So first do a SVN update. And please use [ CODE] tags for posting code.
The RoM Bot Online Wiki needs your help!

CrazyGuy
Posts: 63
Joined: Mon Mar 23, 2009 10:41 am

Re: SVN 128: autorepair with the bot and ingame addon streamline

#5 Post by CrazyGuy » Tue Aug 25, 2009 11:45 am

Is there some other tool other than the Mouse Pointer Locater gadget you would suggest for people with XP?

Ive tried the one that comes with AutoIT but for some reason it never clicks where the cords that i give it.

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

Re: SVN 128: autorepair with the bot and ingame addon streamline

#6 Post by Administrator » Tue Aug 25, 2009 12:45 pm

CrazyGuy wrote:Is there some other tool other than the Mouse Pointer Locater gadget you would suggest for people with XP?

Ive tried the one that comes with AutoIT but for some reason it never clicks where the cords that i give it.

Code: Select all

function main()
    local lastx, lasty = 0,0;
    while(true) do
        local mx, my = mouseGetPos();
        local win = foregroundWindow();
        local wx, wy = windowRect(win);
        mx = mx - wx; my = my - wy;

        if( mx ~= lastx or my ~= lasty ) then
            printf("\rPos: (%d, %d)\t", mx, my);
            lastx = mx; lasty = my;
        end
        yrest(100);
    end
end
startMacro(main, true);

fredgsanford
Posts: 8
Joined: Thu Sep 24, 2009 7:45 am

Re: SVN 128: autorepair with the bot and ingame addon streamline

#7 Post by fredgsanford » Thu Sep 24, 2009 8:48 am

Best way to do daily quests would prob to get addon called dailynotes from curse and set it to auto quest and tell it which dailies you want to do and to only accept if you have enough items to do the daily quest then all you would need to do it open bulletin board and it will accept that quest if you have items needed and at the turn in npc all you would need to do it click or talk to him.
Sorry new here and have not even used bot yet but thought i would point this out as it might make it easier to do dailies at least.
From what i read so far this would help alot for them at least.

S3v3n11
Posts: 91
Joined: Thu Jul 09, 2009 7:37 am

Re: SVN 128: autorepair with the bot and ingame addon streamline

#8 Post by S3v3n11 » Mon Oct 19, 2009 8:19 am

fredgsanford wrote:Best way to do daily quests would prob to get addon called dailynotes from curse and set it to auto quest and tell it which dailies you want to do and to only accept if you have enough items to do the daily quest then all you would need to do it open bulletin board and it will accept that quest if you have items needed and at the turn in npc all you would need to do it click or talk to him.
Sorry new here and have not even used bot yet but thought i would point this out as it might make it easier to do dailies at least.
From what i read so far this would help alot for them at least.
What about something like the Supply Delivery quest in Harf which gives you the item after you get the quest? Would dailynotes work with that?

j_schlott
Posts: 119
Joined: Tue Aug 18, 2009 11:42 pm

Re: SVN 128: autorepair with the bot and ingame addon streamline

#9 Post by j_schlott » Mon Oct 19, 2009 1:51 pm

the problem with that plugin is, i am guessing that it doesnt click the board/npc or run on its own, i guess it would work if you were manually doing dailies. but its useless for automation, you might aswell do everything with the bot

User avatar
droppen
Posts: 179
Joined: Mon Aug 03, 2009 10:32 pm

Re: SVN 128: autorepair with the bot and ingame addon streamline

#10 Post by droppen » Mon Oct 19, 2009 2:32 pm

yeah, this addon is totally useless for the bot right now. this was new in SVN version 128, the newest version is numbered over 360, so this is old and not worth discussing and confusing the noobs about.

S3v3n11
Posts: 91
Joined: Thu Jul 09, 2009 7:37 am

Re: SVN 128: autorepair with the bot and ingame addon streamline

#11 Post by S3v3n11 » Mon Oct 19, 2009 2:34 pm

This noob thanks you for your feedback. :)

S3v3n11
Posts: 91
Joined: Thu Jul 09, 2009 7:37 am

Re: SVN 128: autorepair with the bot and ingame addon streamline

#12 Post by S3v3n11 » Wed Oct 21, 2009 11:16 am

d003232 wrote:Here a demo file for the daily quest delivery of scorpion in Obsidian.

You have to take the Q from the Osidian bulletin board. Go to the teleporter and then deliver the Q to Albion at the "Handwerksplatz".

Code: Select all

<waypoints>
	<!-- # 1 --><waypoint x="-23458" z="4077">
	player:rest(2);
	if( player.free_counter1 > 10 ) then
		player.free_flag1 = 0;
		error("DQ delivery finished", 0);	<!-- Not really an error, but it will drop us back to shell. -->
	end
	</waypoint>
	<!-- # 1 --><waypoint x="-23151" z="4524">
		player:rest(4);
		player:mouseclickL(440, 280, 825, 582);player:rest(1);	<!-- Blackboard -->
		player:mouseclickL(440, 280, 825, 582);player:rest(1);	<!-- Blackboard -->		
		player:mouseclickL(150, 195, 825, 582);player:rest(1);	<!-- Blackboard -->
	</waypoint>
	<!-- # 2 --><waypoint x="-23214" z="4483">
	player:rest(4);
	player:scan_for_NPC("Maylen");
	player:mouseclickL(150, 214, 825, 582);
	</waypoint>
	<!-- # 3 --><waypoint x="-22875" z="6330"></waypoint>
	<!-- # 4 --><waypoint x="-22954" z="6667">
	player:rest(4);
	player:scan_for_NPC("Albion");
	player.free_counter1 = player.free_counter1 + 1;
	</waypoint>
	<!-- # 5 --><waypoint x="-22888" z="6371"></waypoint>
	<!-- # 6 --><waypoint x="-23642" z="5807">
	player:rest(4);
	player:scan_for_NPC("Maya");
	player:mouseclickL(150, 197, 825, 582);
	</waypoint>
</waypoints>
Before we scan for a NPC, we rest a view seconds, to give the camera time for the zoom in / zoom out bug while using quickturn.

This post is pretty old. Is this still the way we would get a quest from the bulletin board and turn them in to an NPC?

I will like to build a waypoint file for the Harf delivery daily quest. ( Anyone have one? ) :)

Thanks!

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: SVN 128: autorepair with the bot and ingame addon streamline

#13 Post by d003232 » Wed Oct 21, 2009 11:22 am

S3v3n11 wrote:Is this still the way we would get a quest from the bulletin board and turn them in to an NPC?

I will like to build a waypoint file for the Harf delivery daily quest. ( Anyone have one? ) :)

Thanks!
I suppose yes. We could open the blackboard without mouseclick. We could show the Q details for one Q (I think even accept it) but if we try to open a second Q we will still see the first one. If we use mouseclicks, it will work without that problem.
The RoM Bot Online Wiki needs your help!

User avatar
droppen
Posts: 179
Joined: Mon Aug 03, 2009 10:32 pm

Re: SVN 128: autorepair with the bot and ingame addon streamline

#14 Post by droppen » Wed Oct 21, 2009 10:21 pm

d003232 wrote:I suppose yes. We could open the blackboard without mouseclick. We could show the Q details for one Q (I think even accept it) but if we try to open a second Q we will still see the first one. If we use mouseclicks, it will work without that problem.
How do you open the billboard without clicking?

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: SVN 128: autorepair with the bot and ingame addon streamline

#15 Post by d003232 » Thu Oct 22, 2009 12:11 am

How do you open the billboard without clicking?[/quote]It's a view weeks ago, so I'm not anymore sure what I tested. Is was something with the speakframe. Just stand next to the blackboard and try something like:

Code: Select all

SpeakFrame_Show();
SpeakFrame_LoadQuest();
BulletinBoardContentText:Show();
The RoM Bot Online Wiki needs your help!

User avatar
droppen
Posts: 179
Joined: Mon Aug 03, 2009 10:32 pm

Re: SVN 128: autorepair with the bot and ingame addon streamline

#16 Post by droppen » Thu Oct 22, 2009 2:57 am

d003232 wrote:
droppen wrote:How do you open the billboard without clicking?
It's a view weeks ago, so I'm not anymore sure what I tested. Is was something with the speakframe. Just stand next to the blackboard and try something like:

Code: Select all

SpeakFrame_Show();
SpeakFrame_LoadQuest();
BulletinBoardContentText:Show();
I looked into this, and i found out that that function does not use the billboard, it only opens the speak frame that all NPC's and billboards use. That means that if you compleate a quest to an NPC, and then call SpeakFrame_Show(); anywhere, you will see the speak frame of the NPC you just talked to, so you need to click the billboard to get its info.

d003232
Posts: 1252
Joined: Wed Jun 03, 2009 4:27 pm

Re: SVN 128: autorepair with the bot and ingame addon streamline

#17 Post by d003232 » Thu Oct 22, 2009 4:22 am

droppen wrote:
d003232 wrote:
droppen wrote:How do you open the billboard without clicking?
It's a view weeks ago, so I'm not anymore sure what I tested. Is was something with the speakframe. Just stand next to the blackboard and try something like:

Code: Select all

SpeakFrame_Show();
SpeakFrame_LoadQuest();
BulletinBoardContentText:Show();
I looked into this, and i found out that that function does not use the billboard, it only opens the speak frame that all NPC's and billboards use. That means that if you compleate a quest to an NPC, and then call SpeakFrame_Show(); anywhere, you will see the speak frame of the NPC you just talked to, so you need to click the billboard to get its info.
You can load the Q list for that board without clicking it. And if you debug the functions, you will be in the speakframe functions (you can copy the speakframe functions in a own addon to overwrite them und use debuging statements) and you also can accept one of the Qs. Only if you try to take a second one, you will still get the information of the first one. It seems to be the same as with the NPC Lehman in the classhall. We need to mouseclick to get the actual informations. Like as a important 'reload' function is missing.

There was also something like:

Code: Select all

OnEvent_SpeakOptionFrame( " ", "SHOW_QUESTLIST", "Schwarzes Brett von Logar" )
but I can't rember how it was used.
The RoM Bot Online Wiki needs your help!

j_schlott
Posts: 119
Joined: Tue Aug 18, 2009 11:42 pm

Re: SVN 128: autorepair with the bot and ingame addon streamline

#18 Post by j_schlott » Wed Oct 28, 2009 5:01 pm

so from what i see that works for opening the board, as long as u manually open the board the 1st time.

now how do we select quests off the board list?

User avatar
droppen
Posts: 179
Joined: Mon Aug 03, 2009 10:32 pm

Re: SVN 128: autorepair with the bot and ingame addon streamline

#19 Post by droppen » Wed Oct 28, 2009 9:47 pm

j_schlott wrote:so from what i see that works for opening the board, as long as u manually open the board the 1st time.

now how do we select quests off the board list?
http://www.solarstrike.net/phpBB3/viewt ... f=21&t=769

j_schlott
Posts: 119
Joined: Tue Aug 18, 2009 11:42 pm

Re: SVN 128: autorepair with the bot and ingame addon streamline

#20 Post by j_schlott » Thu Oct 29, 2009 9:04 am

oh ok so it doesnt work for more than 1 quest for now

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 47 guests