Page 1 of 1

757 Changelog

Posted: Wed Apr 17, 2013 6:36 am
by rock5
- include and loadPaths can now find files relative to the WP file.
  • What this means is if you move any chained files, as long as you move them together, they will still work without the need to change the folders of all the file names in the files.
- getText now supports ids as substrings.
  • getText gets the ingame "TEXT" string. It already translated substrings within strings but the strings can also use ids instead of substring. Now the ids are translated also.
- Have camera class find it's own address instead of as an argument.
  • Minor change. Unimportant.
- Fixed a couple of small bugs with using ids in the autosell item ignore list.
  • This means that before now you couldn't use ids in the autosell INV_AUTOSELL_IGNORE option even though you were supposed to. Now it works. Thanks Alex0711.
- Added 'Runes' to the item class.
  • Just like items had the 'Stats' table they now also have the 'Runes' table that has the id and names of runes in the items.
- Added a duration argument to player:sleep(duraction).
  • This is so that you can use it like yrest but take advantage of it's ability to fight back if attacked. duration is in seconds.

Re: 757 Changelog

Posted: Thu Apr 18, 2013 3:38 pm
by Germangold
cannot open scripts/rom/scripts/rom/userfunctions/addon_AOE.lua

error since update

Re: 757 Changelog

Posted: Thu Apr 18, 2013 3:47 pm
by rock5
Is there anything unusual about the way that userfunction is called? Is it installed normally or are you calling it in a script? If you are calling it, tell me a bit more about the situation. Where is the file that is calling it? What is the command you are using? Where is the userfunction actually located?

Re: 757 Changelog

Posted: Thu Apr 18, 2013 8:46 pm
by zbynio
Hi

batch file located: 'c:\micromacro\scripts\rom\batchfile.bat'

code inside batch file:
@echo off
START ../../micromacro.exe scripts/rom/bot.lua profile:knight

When run the batch file is the following error:

Image

scripts/rom/scripts/rom/userfunctions/addon_Rock5s_Mail_Functions.lua: No such file or directory
^^^^^^^^^^^^^^^^^^
It looks like romglobal contains twice the same path: 'scripts/rom/'
It can work the include () function? It is clearly shortened.
When restore a previous version of the include () error not occur

File location addons has not changed and is located in the directory 'c:\micromacro\scripts\rom\userfunctions'

Earlier this error was not.

Re: 757 Changelog

Posted: Fri Apr 19, 2013 3:46 am
by rock5
I can reproduce it so I'll see what is going on and fix it.

Re: 757 Changelog

Posted: Fri Apr 19, 2013 5:32 am
by rock5
I found out what's happening. When you start MM from a bat file like you did, the execution path gets set to the file name you use. In your example it gets set to "scripts/rom". Normally it is something like "c:\micromacro\scripts\rom". The new function I added, to find the files, needs to return the full file path because it doesn't know if it is for an "include" or "loadPaths" command and include expects a file in the 'rom' folder and 'loadPaths' expects a file in the waypoints folder so findFile function returns a full path including the execution path. So in your case it returns "scripts/rom/userfunctions/addon_Rock5s_Mail_Functions.lua". The original include function sees this and thinks it is not a full path so it also adds the execution path, so you get the double "scripts/rom".

I'm not sure if this is a bug in micromacro. I could probably fix the findFile function so it would work but the incorrect execution path will always cause problems.

I suggest you look at the other batch files in the rom folder, such as the startbot.bat file, and use them as an example. They use full path names when starting micromacro so the execution path gets set correctly. Try this

Code: Select all

@echo off
FOR /F "tokens=1 delims=" %%A in ('cd') do SET folder=%%A
START ../../micromacro.exe "%folder%/bot.lua" profile:knight

Re: 757 Changelog

Posted: Sat Apr 20, 2013 10:09 pm
by lisa
I did a full revert and update.

Been getting in game errors since I did.
bot is sending these as macro

Code: Select all

CastSme("Shot")
Castame("Hiden Peril")
Cayname("Charged Chop")
CastSpellByName("S
CastSpellByName("Charged;
CastSpellByName("Savage
CastSpe("Shot")
So MM isn't erroring but these "macros" are being sent to game, obviously something is a little messed up.

Re: 757 Changelog

Posted: Sun Apr 21, 2013 2:14 am
by rock5
They look weird. Did you rule out the userfunctions? Also check it's not a corrupt macro.bsd file.

Re: 757 Changelog

Posted: Sun Apr 21, 2013 5:30 am
by botje
i actually see this much more often, the error button ingame appears, and when i check, it has that misspelled cmds in it.

like it doesnt get the whole cmd all the time O.o