Version 7.4.0.2897 progress

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
Administrator
Site Admin
Posts: 5056
Joined: Sat Jan 05, 2008 4:21 pm

Re: Version 7.4.0.2897 progress

#801 Post by Administrator » Sat Oct 17, 2020 6:18 pm

Onche: I wonder if it could be the call to moveto(tile) on line 223 of Haunted_onload.lua. The others seem to be surrounded in checks to make sure they exist but this one does no.

It might also help if you add this line right above line 2882 (The waypoint:update() call in player.lua):

Code: Select all

printf(debug.traceback() .. "\n\n")
It will spam a lot leading up to the error, but when the error does happen at least we would have some real information to go on.

Onche
Posts: 46
Joined: Thu Jun 11, 2015 6:10 pm

Re: Version 7.4.0.2897 progress

#802 Post by Onche » Sun Oct 18, 2020 7:38 am

Administrator wrote: Sat Oct 17, 2020 6:18 pm Onche: I wonder if it could be the call to moveto(tile) on line 223 of Haunted_onload.lua. The others seem to be surrounded in checks to make sure they exist but this one does no.

It might also help if you add this line right above line 2882 (The waypoint:update() call in player.lua):

Code: Select all

printf(debug.traceback() .. "\n\n")
It will spam a lot leading up to the error, but when the error does happen at least we would have some real information to go on.
This is what I get when using the script with the line i added in player.lua :

Code: Select all

Digging up tiles...
Clicking Tile 22
stack traceback:
        J:/.../MicroMacro/scripts/rom/classes/player.lua:2882: in function 'moveTo'
        ...ipts/rom/waypoints/Haunted_onload.lua:351: in function 'moveto'
        ...ipts/rom/waypoints/Haunted_onload.lua:224: in function 'breaktiles'
        [string "..."]:10: in function 'actionchunk'
        scripts\rom/bot.lua:1006: in function 'foo'
        J:\...\MicroMacro\lib\lib.lua:570: in function <J:\...\MicroMacro\lib\lib.lua:568>

The game client did not crash.
Character: XXXXXXXXXX
2020-10-18 14:33:37 - J:/.../MicroMacro/scripts/rom/classes/player.lua:2883: attempt to call method 'update' (a nil value)
If I'm not wrong it has something to do with the waypoint:update(); when using the moveto function AND breaktiles ? But then I don't understand why it is working when using the teleport function (well I'm not sure about that because I crashed the bot when my char teleported on one tile an started digging to avoid ban), but not by walking only.
Last edited by Onche on Sun Oct 18, 2020 1:53 pm, edited 1 time in total.

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

Re: Version 7.4.0.2897 progress

#803 Post by Administrator » Sun Oct 18, 2020 10:10 am

Thanks. That confirms my suspicion; it's dying here:

Code: Select all

-- Move to tile
moveto(tile)
Presumably, `tile` is some object that does not adhere to the CWaypoint contract. Could you perhaps add some lines to print out what `tile` is at that location? Simply calling print and passing table is a good start. If it is reported as a table object, it might be worth adding this:

Code: Select all

for i,v in pairs(table) do
    sprintf("%s => %s\n", i, type(v));
end

silentz
Posts: 13
Joined: Thu Jun 04, 2009 5:49 pm

Re: Version 7.4.0.2897 progress

#804 Post by silentz » Sun Oct 18, 2020 6:54 pm

I'm having a problem where the character runs to the house maid to change job and it crashed. I'm using this daily script in sarlo

viewtopic.php?f=27&t=5198&p=57989&hilit=sarlo#p57989

Error:

2020-10-18 16:48:10 - ...ers/Desktop/micromacro/scripts/rom/functions.lua:2288: bad argument #1 to 'lower' (string expected, got nil)

nuk79
Posts: 391
Joined: Mon May 17, 2010 3:40 pm

Re: Version 7.4.0.2897 progress

#805 Post by nuk79 » Fri Oct 23, 2020 3:17 am

i don't know why but bot don't attak any mobs also in a specific section when you add a mobs name...any sugget?
<mobs>
<!-- names of mobs we want to attack -->
<!-- if no names defined we will attack all mobs -->
<mob name="" />
<mob name="" />
<mob name="" />
</mobs>

nuk79
Posts: 391
Joined: Mon May 17, 2010 3:40 pm

Re: Version 7.4.0.2897 progress

#806 Post by nuk79 » Fri Oct 23, 2020 3:41 am

Onche wrote: Fri Oct 16, 2020 3:35 am
Administrator wrote: Thu Oct 15, 2020 1:10 pm
Still didn't manage to make it work by walking only, bot just crashes so I can't help much more.
Could you give me some details to work off of?
Well yes, I'll give as much details as I can to make it clear for you.

So I took the scripts from this post, and tried to update it because :
- It was made with the old rom bot version so addresses names are outdated,
- The script is making the char to fly (easily detectable by GMs),
- The script is making the char to teleport (easily detectable by GMs),

Now what I did in the scripts (I'm writing everything here but I did write all the changes in the scripts) :

Haunted.xml
1. I just removed the call to fly function

Code: Select all

		--fly()
		--Remove the flying part from the script
Haunted_onload.lua
1. Started by changing all the wrong addresses names, for example :

Code: Select all

return memoryReadRepeat("float", getProc(), pawn.Address + addresses.game_root.pawn.fading) ~= 0 -- was addresses.pawnFading_offset
2. Replaced each call to teleport with a player:moveTo function, for example:

Code: Select all

--teleport(player.X,player.Z,flyheight)
player:moveTo(player.X,player.Z,flyheight)
(by the way, I did not remove flyheight, but just changed its value to 9, which is the ground level, that way I'm not modifying the script a lot)

3. Removed some part of the function moveto(pos) which was calling to teleport AND fly :


NOW THE RESULTS !


So basically when the scripts starts, it crashes on waypoint #6

Code: Select all

Digging up tiles...
Clicking Tile 22
The game client did not crash.
Character: XXXXXXXXXXXX
2020-10-16 10:23:08 - .../MicroMacro/scripts/rom/classes/player.lua:2882: attempt to call method 'update' (a nil value)
I think the issue has something to do with the function moveto(pos) because I removed some lines from it and If I don't, then the script works but my char teleports (didn't pay more attention and stopped the bot when I saw my char teleporting)

Code: Select all

function moveto(pos)
	-- Remove the fly function from the script
	-- if fly then fly() end
	player:updateXYZ()
	if distance(player, pos) > 10 then
		-- If I don't remove this part below, then the script works but the char teleports.
		 --if teleport then
			-- teleport(pos.X+1,pos.Z+1,18)
		 --else
			player:moveTo(pos,true)
		 --end
	end
	player:update()
	player:waitTillStopMoving()
end
The code looks quite simple, yet nothing seems to work, I tried to remove some parts, tried to change teleport( with player:moveTo in that function but then I get : MicroMacro/scripts/rom/classes/player.lua:2604: attempt to index local 'waypoint' (a number value).

Attached you'll find the current modified files.

Thanks !
did you resolve problems with admin suggestion?

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

Re: Version 7.4.0.2897 progress

#807 Post by Administrator » Sat Oct 24, 2020 10:28 am

silentz wrote: Sun Oct 18, 2020 6:54 pm I'm having a problem where the character runs to the house maid to change job and it crashed. I'm using this daily script in sarlo

viewtopic.php?f=27&t=5198&p=57989&hilit=sarlo#p57989

Error:

2020-10-18 16:48:10 - ...ers/Desktop/micromacro/scripts/rom/functions.lua:2288: bad argument #1 to 'lower' (string expected, got nil)
I've been digging into this one for awhile trying to figure out what could be going wrong. I'm not able to reproduce it, but I think I know what could be the culprit. I'm guessing that you used the addrupdate script after the last patch, but before the scripts have been updated, which might have tainted your text cache. If you open up cache/texts.lua in a text editor, what are the first few lines of the file?

If the file looks a bit mangled, you might be able to just delete that file then restart the bot.

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

Re: Version 7.4.0.2897 progress

#808 Post by Administrator » Sat Oct 24, 2020 10:41 am

nuk79 wrote: Fri Oct 23, 2020 3:17 am i don't know why but bot don't attak any mobs also in a specific section when you add a mobs name...any sugget?
<mobs>
<!-- names of mobs we want to attack -->
<!-- if no names defined we will attack all mobs -->
<mob name="" />
<mob name="" />
<mob name="" />
</mobs>
I'm not able to reproduce this. It seems to work just fine for me. Exactly which enemies do you have in that list, and which enemies are you trying to attack?

Onche
Posts: 46
Joined: Thu Jun 11, 2015 6:10 pm

Re: Version 7.4.0.2897 progress

#809 Post by Onche » Sat Oct 24, 2020 12:01 pm

Hey, well I didn't have much time this week sorry for the late answer.
Administrator wrote: Sun Oct 18, 2020 10:10 am Thanks. That confirms my suspicion; it's dying here:

Code: Select all

-- Move to tile
moveto(tile)
Presumably, `tile` is some object that does not adhere to the CWaypoint contract. Could you perhaps add some lines to print out what `tile` is at that location? Simply calling print and passing table is a good start. If it is reported as a table object, it might be worth adding this:

Code: Select all

for i,v in pairs(table) do
    sprintf("%s => %s\n", i, type(v));
end
I'm sorry but I'm not sure what to do exactly, do I have to put that code into the haunted_onload.lua ? I tried to put before "moveto(tile)" but nothing happened ingame nor in the micromacro window. Maybe I misunterstood something ! Could you give me more details please ?

Thank you so much,

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

Re: Version 7.4.0.2897 progress

#810 Post by Administrator » Sun Oct 25, 2020 11:05 am

Here, I added a bunch of debugging into the script for you. Run it and it should generate a bunch of log information; go ahead and post that either here or email it to me. Please be sure to include the information out of micromacro/log.txt!

This will include a bunch of information about the objectlist, tile list, and the state of the individual tile.

Onche
Posts: 46
Joined: Thu Jun 11, 2015 6:10 pm

Re: Version 7.4.0.2897 progress

#811 Post by Onche » Sun Oct 25, 2020 3:17 pm

Well,this is what I get :

Code: Select all

2020-10-25 21:10:48 : Processor Type: 8X AMD or Intel x64 @2592MHz, OS: Windows 7 
2020-10-25 21:10:48 : User privilege level: Administrator
2020-10-25 21:10:49 : Lua glues exported
2020-10-25 21:10:49 : MicroMacro v1.05.207
2020-10-25 21:10:49 : Loaded plugin 'lxp'
2020-10-25 21:10:49 : Keyboard layout: US English
2020-10-25 21:10:50 : Executing script 'bot.lua'
-------------------------------------------------------------------------------


2020-10-25 21:10:50 : Bot userfunction 'Rock5s_Mail_Functions' successfully loaded.
2020-10-25 21:10:50 : Bot userfunction 'SRSwap' successfully loaded.
2020-10-25 21:10:50 : Bot userfunction '30daymounts' successfully loaded.
2020-10-25 21:10:50 : Bot userfunction 'ALRPP' successfully loaded.
2020-10-25 21:10:50 : Bot userfunction 'BattleGround' successfully loaded.
2020-10-25 21:10:50 : Bot userfunction 'BuyFromItemShop' successfully loaded.
2020-10-25 21:10:50 : Bot userfunction 'CleanBag' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'countmobs' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'DN_AutoQuest' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'Dreamland' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'Fusion_Functions' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'GotoGuild' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'gotoportal' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'loadsvn' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'login' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'LoginNextChar' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'PlusItem' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'profilechange' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'questHelpers' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'QuestLogClass' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'Renumber' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'setwindow' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'Speedattack' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'speedhack' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'swimhack' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'teleport' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'travelTo' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'useGoodie_universal' successfully loaded.
2020-10-25 21:10:51 : Bot userfunction 'wallhack' successfully loaded.
2020-10-25 21:10:51 : Language: english
2020-10-25 21:10:54 : Function 'bitAnd' is deprecated.

2020-10-25 21:10:55 : Function 'bitLShift' is deprecated.

2020-10-25 21:10:55 : Function 'bitRShift' is deprecated.

2020-10-25 21:11:07 : QUICK_TURN = true
2020-10-25 21:11:07 : Keyboard settings are from bindings.txt:
[...]
2020-10-25 21:11:08 : Wrong value returned in update of item id: 1
[...]
2020-10-25 21:11:10 : Wrong value returned in update of item id: 30
2020-10-25 21:11:16 : findWindowList() returned 0 results. Window(s) not found or other error occurred.
2020-10-25 21:11:16 : Objectlist during tile list creation:
2020-10-25 21:11:16 : findWindowList() returned 0 results. Window(s) not found or other error occurred.
In main thread:
stack traceback:
	[string "..."]:9: in function 'actionchunk'
	scripts\rom/bot.lua:1006: in function 'foo'
	J:\...\MicroMacro\lib\lib.lua:570: in function <J:\...\MicroMacro\lib\lib.lua:568>

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

2020-10-25 21:11:16 : ...ipts/rom/waypoints/.../Haunted_onload.lua:147: attempt to call a table value
2020-10-25 21:11:16 : Execution error: Runtime error
2020-10-25 21:11:17 : Loaded plugin 'lxp'
Is this what you expected ?

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

Re: Version 7.4.0.2897 progress

#812 Post by Administrator » Sun Oct 25, 2020 3:52 pm

Sorry, my fault. I made a minor mistake there.
Line 147 needs to be changed from:

Code: Select all

for i,v in objectList.Objects do
to:

Code: Select all

for i,v in pairs(objectList.Objects) do
Attachments
Haunted_onload.lua
(15.56 KiB) Downloaded 1 time

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 36 guests