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")
Code: Select all
printf(debug.traceback() .. "\n\n")
This is what I get when using the script with the line i added in player.lua :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):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.Code: Select all
printf(debug.traceback() .. "\n\n")
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)
Code: Select all
-- Move to tile
moveto(tile)
Code: Select all
for i,v in pairs(table) do
sprintf("%s => %s\n", i, type(v));
end
did you resolve problems with admin suggestion?Onche wrote: ↑Fri Oct 16, 2020 3:35 amWell yes, I'll give as much details as I can to make it clear for you.Administrator wrote: ↑Thu Oct 15, 2020 1:10 pmCould you give me some details to work off of?Still didn't manage to make it work by walking only, bot just crashes so I can't help much more.
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 functionHaunted_onload.luaCode: Select all
--fly() --Remove the flying part from the script
1. Started by changing all the wrong addresses names, for example :2. Replaced each call to teleport with a player:moveTo function, for example:Code: Select all
return memoryReadRepeat("float", getProc(), pawn.Address + addresses.game_root.pawn.fading) ~= 0 -- was addresses.pawnFading_offset
(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)Code: Select all
--teleport(player.X,player.Z,flyheight) player:moveTo(player.X,player.Z,flyheight)
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 #6I 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
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)
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).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
Attached you'll find the current modified files.
Thanks !
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?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'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?Supergala 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 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 ?Administrator wrote: ↑Sun Oct 18, 2020 10:10 am Thanks. That confirms my suspicion; it's dying here: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
-- Move to tile moveto(tile)
Code: Select all
for i,v in pairs(table) do sprintf("%s => %s\n", i, type(v)); end
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'
Code: Select all
for i,v in objectList.Objects do
Code: Select all
for i,v in pairs(objectList.Objects) do
Code: Select all
stack traceback:
J:/.../MicroMacro/scripts/rom/classes/player.lua:2882: in function 'moveTo'
scripts\rom/bot.lua:962: in function 'foo'
J:\...\MicroMacro\lib\lib.lua:570: in function <J:\...\MicroMacro\lib\lib.lua:568>
Creating tiles list... Total items: 18
1680 table: 0A9FE960
1680 table: 0A9FE408
1680 table: 0A9FE138
1680 table: 0A9FE7F8
1680 table: 0A9FE918
1680 table: 0A9FE3C0
1680 table: 0A9FE768
1680 table: 0A9FE498
1680 table: 0A9FE8D0
1680 table: 0A9FE0F0
1680 table: 0A9FE0A8
1680 table: 0A9FE570
1680 table: 0A9FE6D8
1680 table: 0A9FE888
1680 table: 0AA0EEF0
1680 table: 0AA0EF80
1680 table: 0AA0EF38
1680 table: 0AA0E680
Digging up tiles...
Clicking Tile 22
Calling moveto(pos); Received type `table`
Contained values:
Type number 4
Id number 111811
Address number 1258235904
Attackable boolean false
Name string Treasure Tile
Z number 3012.2104492188
Y number 9
X number 2594.833984375
stack traceback:
J:/.../MicroMacro/scripts/rom/classes/player.lua:2882: in function 'moveTo'
...ipts/rom/waypoints/.../Haunted_onload.lua:406: in function 'moveto'
...ipts/rom/waypoints/.../Haunted_onload.lua:264: 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: My Char
2020-10-26 08:36:01 - J:/.../MicroMacro/scripts/rom/classes/player.lua:2883: attempt to call method 'update' (a nil value)
Code: Select all
In main thread:
stack traceback:
...ipts/rom/waypoints/.../Haunted_onload.lua:250: 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>
----------TRACEBACK END----------
2020-10-27 15:16:50 : J:/.../MicroMacro/scripts/rom/classes/player.lua:2604: attempt to index local 'waypoint' (a number value)
2020-10-27 15:16:50 : Execution error: Runtime error
2020-10-27 15:16:51 : Loaded plugin 'lxp'
Code: Select all
player:moveTo(player.X,player.Z,flyheight)
Code: Select all
player:moveTo(CWaypoint(player.X,player.Z,flyheight))
Code: Select all
<skills_scout>
<skill name="WARDEN_BRIAR_SHIELD" hotkey="MACRO" priority="100"/>
<skill name="SCOUT_ENTLING_OFFERING" hotkey="MACRO" priority="95" />
<skill name="SCOUT_GRYPHON_BASH" hotkey="MACRO" priority="90" mobcount="3" />
<skill name="SCOUT_AUTOSHOT" hotkey="MACRO" priority="85" />
<skill name="SCOUT_COMBO_SHOT" hotkey="MACRO" priority="80" />
<skill name="SCOUT_REFLECTED_SHOT" hotkey="MACRO" priority="70" />
<skill name="SCOUT_THORN_ARROW" hotkey="MACRO" priority="65" />
<skill name="SCOUT_SHOT" hotkey="MACRO" priority="60" />
<skill name="SCOUT_PIERCING_ARROW" hotkey="MACRO" priority="55" />
<skill name="SCOUT_CHARGED_CHOP" hotkey="MACRO" priority="45" />
<skill name="SCOUT_HIDDEN_PERIL" hotkey="MACRO" priority="35" />
<skill name="SCOUT_SNIPE" hotkey="MACRO" priority="30" />
<skill name="SCOUT_VAMPIRE_ARROWS" hotkey="MACRO" priority="25" />
<skill name="WARDEN_SAVAGE_POWER" hotkey="MACRO" priority="20" autouse="false" />
<skill name="SCOUT_ARROW_OF_ESSENCE" hotkey="MACRO" priority="15" autouse="false" />
</skills_scout>
Exactly ! So basically the game is a 6x6 tiles square, and you have to dig all of those tiles. Under those tiles you can get random "rewards". I'm listing all of them as this issue could exist also on the other ones (the player:moveTo function is also there) :Administrator wrote: ↑Tue Oct 27, 2020 8:52 pm I think the next issue is line 250 of Haunted_onload.lua:player:moveTo() accepts waypoint, ignoreCycleTargets, dontStopAtEnd, and range, in that order, but it looks like only waypoint is required. So, I think that line would need to be changed to:Code: Select all
player:moveTo(player.X,player.Z,flyheight)
However... that would just tell the player to move to the position they are already at (except height, but the intent is to not fly anyways), therefore that line wouldn't do anything important and can probably just be removed.Code: Select all
player:moveTo(CWaypoint(player.X,player.Z,flyheight))
Can you tell me more about what that section is attempting to do? If reward.Id is spikes, then it looks like it teleports up a bit. I'm being lead to believe that the "reward" is actually a trap that you're trying to avoid, yeah?
I think you should be able to just remove the code on line 250 (the moveto call) entirely and it should (hopefully) just work.Onche wrote: ↑Thu Oct 29, 2020 6:55 am - spikes : a square dealing damages if you walk over - My guess is that line 250 tells the char to just fly a little bit higher so it doesn't receive any damage, before digging somewhere else. But because I don't want my char to fly and get banned, this part is not really necessary, better just tell my char to go to the next tile.
I noticed that on scouts, skill detection was a bit finicky. It seemed like the way the bot forces the game to load the skill info wasn't working great. Adding a slight delay after force-loading skills seems to improve things quite a bit and all skills are now being detected appropriately for me. Can you update and see if that has helped?ThulsaDoom wrote: ↑Wed Oct 28, 2020 8:29 am Since last adresses update, my Scout/Warden is facing difficulties to cast skills:
Could be a million things. Try adding this to your profile to turn up some ideas:Also, my Knight/Warrior is not targeting and attacking the enemies, only attack them when is detected by aggro.
Code: Select all
<option name="DEBUG_TARGET" value="true" />
Users browsing this forum: Ahrefs [Bot] and 1 guest