Error entering house

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
j_schlott
Posts: 119
Joined: Tue Aug 18, 2009 11:42 pm

Error entering house

#1 Post by j_schlott » Tue Aug 18, 2009 11:59 pm

ok so im really lazy and have written macros to accept and hand in daily quests, they cycle 10 times and then pause

but now have a lv 13 guy that i want to powerlevel a little with fox tails in Lyk

it takes the quest from the board with my higher lvl class, uses the house fairy,
then it goes through the housekeepers menu and changes class with mouse clicks,
exits house and runs to the npc to hand the quest in,
runs back to housefairy enters, switches class back to primary
exits and starts all over

it all works fine except, i get a cpawn error when i enter house,
if i start the macro inside the house it gets no error when i leave house, just when entering

Code: Select all

<waypoints>
   <!-- # 1 --><waypoint x="-29632" z="-16748" type="RUN"></waypoint>
   <!-- # 2 --><waypoint x="-29591" z="-16648" type="RUN">
      player:mouseclickL(440, 280, 825, 582);   <!-- Blackboard --> 
      player:mouseclickL(440, 280, 825, 582);   <!-- Blackboard -->     
      player:mouseclickL(150, 250, 825, 582);   <!-- Blackboard -->
      player:mouseclickL(150, 390, 825, 582);   <!-- Blackboard -->
   </waypoint>
   <!-- # 3 --><waypoint x="-29632" z="-16748" type="RUN"></waypoint>
   <!-- # 4 --><waypoint x="-29551" z="-16680" type="RUN">
   player:scan_for_NPC("Fenati");
   player:mouseclickL(150, 195, 825, 582);   <!-- house fairy -->
   player:rest(10);
   </waypoint>
   <!-- # 5 --><waypoint x="-3" z="66" type="RUN"></waypoint>
   <!-- # 6 --><waypoint x="6" z="27" type="RUN">
   player:rest(1);
   player:mouseclickL(370, 310, 825, 582);   <!-- housekeeper -->
   player:mouseclickL(370, 310, 825, 582);   <!-- housekeeper -->
   player:rest(1);
   player:mouseclickL(150, 260, 825, 582);   <!-- change class option -->
   player:rest(1);
   player:mouseclickL(200, 120, 825, 582);   <!-- drop down menu on class select -->
   player:rest(1);
   player:mouseclickL(160, 170, 825, 582);   <!-- secondary class on drop down menu -->
   player:rest(1);
   player:mouseclickL(70, 220, 825, 582);   <!-- confirm -->
   player:rest(1);
   player:mouseclickL(370, 155, 825, 582);   <!-- yes -->
   player:rest(1);
   player:mouseclickL(370, 310, 825, 582);   <!-- housekeeper -->
   player:mouseclickL(370, 310, 825, 582);   <!-- housekeeper -->
   player:rest(1);
   player:mouseclickL(150, 275, 825, 582);   <!-- leave house -->
   player:rest(8);
   </waypoint>
   <!-- # 7 --><waypoint x="-29831" z="-16980" type="RUN"></waypoint>
   <!-- # 8 --><waypoint x="-29830" z="-17035" type="RUN">
   player:scan_for_NPC("Adair");
   player:mouseclickL(150, 340, 825, 582);   <!-- ADAIR -->
   </waypoint>
   <!-- # 9 --><waypoint x="-29632" z="-16748" type="RUN"></waypoint>
   <!-- # 10 --><waypoint x="-29551" z="-16680" type="RUN">
   player:scan_for_NPC("Fenati");
   player:mouseclickL(150, 195, 825, 582);   <!-- house fairy -->
   player:rest(8);
   </waypoint>
   <!-- # 11 --><waypoint x="-3" z="66" type="RUN"></waypoint>
   <!-- # 12 --><waypoint x="6" z="27" type="RUN">
   player:rest(1);
   player:mouseclickL(370, 310, 825, 582);   <!-- housekeeper -->
   player:mouseclickL(370, 310, 825, 582);   <!-- housekeeper -->
   player:rest(1);
   player:mouseclickL(150, 260, 825, 582);   <!-- change class option -->
   player:rest(1);
   player:mouseclickL(200, 120, 825, 582);   <!-- drop down menu on class select -->
   player:rest(1);
   player:mouseclickL(160, 160, 825, 582);   <!-- primary class on drop down menu -->
   player:rest(1);
   player:mouseclickL(70, 220, 825, 582);   <!-- confirm -->
   player:rest(1);
   player:mouseclickL(370, 155, 825, 582);   <!-- yes -->
   player:rest(1);
   player:mouseclickL(370, 310, 825, 582);   <!-- housekeeper -->
   player:mouseclickL(370, 310, 825, 582);   <!-- housekeeper -->
   player:rest(1);
   player:mouseclickL(150, 275, 825, 582);   <!-- leave house -->
   player:rest(8);
   </waypoint>
</waypoints>
this one is just looping infinitely for now, once i resolve problem, ill copy the waypoints x10 inside the file and add a pause at the end, so it hands in 10 dailies and then stops

the error when entering house is .....scripts/rom/classes/pawn.lua:201: Error reading memory in CPawn:update()


i also cannot seem to get the targetnpc by name to work, as you can see im using the harvest scan thing still, and inside the house , scanning doesnt work for the housekeeper, so i used 2 waypoints to line me up and mouse clicks to select and enter the inhouse menu

any help would be appreciated
Last edited by j_schlott on Wed Aug 19, 2009 12:37 pm, edited 2 times in total.

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

Re: Error entering house

#2 Post by d003232 » Wed Aug 19, 2009 1:22 am

it all works fine except, i get a cpawn error when i enter house,
if i start the macro inside the house it gets no error when i leave house, just when entering
...
this one is just looping infinitely for now, once i resolve problem, ill copy the waypoints x10 inside the file and add a pause at the end, so it hands in 10 dailies and then stops

the error when entering house is .....scripts/rom/classes/pawn.lua:201: Error reading memory in CPawn:update()


i also cannot seem to get the targetnpc by name to work, as you can see im using the harvest scan thing still, and inside the house , scanning doesnt work for the housekeeper, so i used 2 waypoints to line me up and mouse clicks to select and enter the inhouse menu

any help would be appreciated
That looks like a very good work!

I suppose the pawn error is coming while the bot tries to read the memory and still have the loading screen? You could try to insert a 'player:rest(10);' to be sure, there is enough time for the loading screen.

And for the target_NPC() you need to change the ingame key from CTRL+TAB to something with no modifier (e.g. J).

After you have everythink working, you can loop trough the waypoint. Means you don't need to copy them. Just insert at the start and end of the file:

Code: Select all

<!-- # 1 --><waypoint x="-14389" z="-380" type="TRAVEL">__WPL:reverse();</waypoint>...
<!-- #21 --><waypoint x="-18500" z="-2516" type="TRAVEL" >__WPL:reverse();
	player.free_counter1 = player.free_counter1 + 1;
	if(player.free_counter1 == 10) then
		player:sleep();
	end;
</waypoint>
The RoM Bot Online Wiki needs your help!

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

Re: Error entering house

#3 Post by Administrator » Wed Aug 19, 2009 2:16 am

Paste a copy of your log.txt after this error occurs so that it can be looked at.

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

Re: Error entering house

#4 Post by j_schlott » Wed Aug 19, 2009 10:58 am

I suppose the pawn error is coming while the bot tries to read the memory and still have the loading screen? You could try to insert a 'player:rest(10);' to be sure, there is enough time for the loading screen.

Code: Select all

   <!-- # 4 --><waypoint x="-29551" z="-16680" type="RUN">
   player:scan_for_NPC("Fenati");
   player:mouseclickL(150, 195, 825, 582);   <!-- house fairy -->
   player:rest(10);
   </waypoint>
theres already a rest in there for 10secs when entering house, so i dont think thats it, unless my code is wrong somewhere

ill post the log.txt asap

EDIT**

Code: Select all

Wed Aug 19 11:59:00 2009 : MicroMacro v1.0
Wed Aug 19 11:59:00 2009 : Processor Type: 2X 586, OS: Windows 7 
Wed Aug 19 11:59:00 2009 : LuaCoco is available.
Wed Aug 19 11:59:00 2009 : Lua glues exported.
Wed Aug 19 11:59:00 2009 : Keyboard layout: US English
Wed Aug 19 12:00:27 2009 : Executing script 'bot.lua'
==================================================

Wed Aug 19 12:00:28 2009 : RoM Bot Version 2.45
Wed Aug 19 12:00:28 2009 : Language: english
Wed Aug 19 12:00:28 2009 : Using static char address 0x8D85E0, player address 0x2B743400

stack traceback:
	C:\Users\nonono\Desktop\micromacro\lib\lib.lua:536: in function 'startMacro'
	scripts\rom\bot.lua:581: in main chunk

----------TRACEBACK END----------

Wed Aug 19 12:00:46 2009 : ...nonono/Desktop/micromacro/scripts/rom/classes/pawn.lua:202: Error reading memory in CPawn:update()
Wed Aug 19 12:00:46 2009 : Execution error: Runtime error

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

Re: Error entering house

#5 Post by j_schlott » Wed Aug 19, 2009 11:19 am

for the npc targetting, i had already switched the Target Nearest Ally to "Z" in the ingame keybindings, i think i had the coding messed up a bit

i was referencing this post:
NEW:

Code: Select all

player:target_NPC( npc_name );
i tried
player:target_NPC( Ittihad_Pisen );
player:target_NPC( Ittihad Pisen );
player:target_NPC("Ittihad_Pisen");

but apparently the format is :

Code: Select all

player:target_NPC("Ittihad Pisen");
so i did get that part working a little while ago, thanks=)

still having the enter house problem
Last edited by j_schlott on Wed Aug 19, 2009 12:51 pm, edited 1 time in total.

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

Re: Error entering house

#6 Post by j_schlott » Wed Aug 19, 2009 12:11 pm

i changed the rest upon entering/leaving house to a pause, which works, but i have to press del to continue which wont cut it for a final version, as that would be 4 pauses per daily hand in

This works and continues the macro perfectly but pauses arent going to cut it:

Code: Select all

<!-- # 4 --><waypoint x="-29551" z="-16680" type="RUN">
   player:target_NPC("Fenati");   <!-- house fairy -->
   player:rest(1);
   player:mouseclickL(150, 195, 825, 582);   <!-- enter house -->
   stopPE();
</waypoint>
This does not work (cpawn error):

Code: Select all

<!-- # 4 --><waypoint x="-29551" z="-16680" type="RUN">
   player:target_NPC("Fenati");   <!-- house fairy -->
   player:rest(1);
   player:mouseclickL(150, 195, 825, 582);   <!-- enter house -->
   player:rest(10);
</waypoint>
the error is instant when entering house, it does not wait for the rest
updated code with target_npc and a counter:

Code: Select all

<waypoints>
   <!-- # 1 --><waypoint x="-29632" z="-16748" type="RUN"></waypoint>
   <!-- # 2 --><waypoint x="-29591" z="-16648" type="RUN">
   player:mouseclickL(440, 280, 825, 582);   <!-- open Blackboard -->  
   player:mouseclickL(440, 280, 825, 582);   <!-- open Blackboard -->     
   player:mouseclickL(150, 250, 825, 582);   <!-- click fox daily -->
   player:mouseclickL(150, 390, 825, 582);   <!-- accept fox daily -->
   </waypoint>
   <!-- # 3 --><waypoint x="-29632" z="-16748" type="RUN"></waypoint>
   <!-- # 4 --><waypoint x="-29551" z="-16680" type="RUN">
   player:target_NPC("Fenati");   <!-- house fairy -->
   player:rest(.5);
   player:mouseclickL(150, 195, 825, 582);   <!-- enter house -->
   player:rest(10);
   </waypoint>
   <!-- # 5 --><waypoint x="-3" z="66" type="RUN"></waypoint>
   <!-- # 6 --><waypoint x="6" z="27" type="RUN">
   player:rest(1);
   player:target_NPC("Housekeeper");   <!-- housekeeper -->
   player:rest(.5);
   player:mouseclickL(150, 260, 825, 582);   <!-- change class option -->
   player:rest(.5);
   player:mouseclickL(200, 120, 825, 582);   <!-- drop down menu on class select -->
   player:rest(.5);
   player:mouseclickL(160, 170, 825, 582);   <!-- secondary class on drop down menu -->
   player:rest(.5);
   player:mouseclickL(70, 220, 825, 582);   <!-- confirm -->
   player:rest(.5);
   player:mouseclickL(370, 155, 825, 582);   <!-- yes -->
   player:rest(.5);
   player:target_NPC("Housekeeper"); <!-- housekeeper -->
   player:rest(.5);
   player:mouseclickL(150, 275, 825, 582);   <!-- leave house -->
   player:rest(10);
   </waypoint>
   <!-- # 7 --><waypoint x="-29831" z="-16980" type="RUN"></waypoint>
   <!-- # 8 --><waypoint x="-29830" z="-17035" type="RUN">
   player:target_NPC("Adair");  <!-- ADAIR -->
   player:rest(.5);
   player:mouseclickL(150, 340, 825, 582);   <!-- complete quest -->
   </waypoint>
   <!-- # 9 --><waypoint x="-29632" z="-16748" type="RUN"></waypoint>
   <!-- # 10 --><waypoint x="-29551" z="-16680" type="RUN">
   player:target_NPC("Fenati");   <!-- house fairy -->
   player:rest(.5);
   player:mouseclickL(150, 195, 825, 582);   <!-- enter house-->
   player:rest(10);
   </waypoint>
   <!-- # 11 --><waypoint x="-3" z="66" type="RUN"></waypoint>
   <!-- # 12 --><waypoint x="6" z="27" type="RUN">
   player:rest(.5);
   player:target_NPC("Housekeeper"); <!-- housekeeper -->
   player:rest(.5);
   player:mouseclickL(150, 260, 825, 582);   <!-- change class option -->
   player:rest(.5);
   player:mouseclickL(200, 120, 825, 582);   <!-- drop down menu on class select -->
   player:rest(.5);
   player:mouseclickL(160, 160, 825, 582);   <!-- primary class on drop down menu -->
   player:rest(.5);
   player:mouseclickL(70, 220, 825, 582);   <!-- confirm -->
   player:rest(.5);
   player:mouseclickL(370, 155, 825, 582);   <!-- yes -->
   player:rest(.5);
   player:target_NPC("Housekeeper"); <!-- housekeeper -->
   player:rest(.5);
   player:mouseclickL(150, 275, 825, 582);   <!-- leave house -->
   player:rest(10);
   player.free_counter1 = player.free_counter1 + 1;
   if(player.free_counter1 == 10) then
      player:sleep();
   end;
   </waypoint>

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

Re: Error entering house

#7 Post by Administrator » Wed Aug 19, 2009 1:28 pm

This should be fixed in SVN r162. Please update and make sure it is working OK for you.

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

Re: Error entering house

#8 Post by j_schlott » Wed Aug 19, 2009 2:00 pm

works prefectly now!

thanks =)

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

Re: Error entering house

#9 Post by d003232 » Wed Aug 19, 2009 3:08 pm

j_schlott wrote: This does not work (cpawn error):

Code: Select all

<!-- # 4 --><waypoint x="-29551" z="-16680" type="RUN">
   player:target_NPC("Fenati");   <!-- house fairy -->
   player:rest(1);
   player:mouseclickL(150, 195, 825, 582);   <!-- enter house -->
   player:rest(10);
</waypoint>
This was because 'player:rest(10);' was not a real stop of the bot. The bot although read the memory. For a real 'pause' you could use

Code: Select all

yrest(10000);
The RoM Bot Online Wiki needs your help!

Post Reply

Who is online

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