Page 1 of 2
758 Changelog
Posted: Sat Jun 08, 2013 11:25 am
by rock5
- Modified the IGF to be able to run multiline slash commands.
- So now you can effectively run macros from the bot without having to use a SlashCommand per line. Eg.
Code: Select all
SlashCommand("/script TargetNearestFriend()/script UseSkill(1,1)/Script ChoiceOption(8)")
If you want to use this feature you will need to update the 'ingamefunctions' folder in 'interface/addons'.[/i]
- Fixed CompleteQuestByName. Now if the quest id is used, it has no issues if there are 2 quests with the same name.
- This is to solve the issue of public and daily quests with the same name. Use the quest id and you should be fine.
- Modified getTEXT to search memory. On average it should be about 1/10 faster.
- Added getCurrency command to get all types of currency on the currency list.
- Syntax: amount, spaceleft = getCurrency(currencyName)
currencyName - can be 'shell', 'eoj', 'sigil', 'mem', 'proof', 'honor', 'trial' or 'warrior' as well as other abbreviations. If you are interested in the other abbreviations, check out the function at the bottom of functions.lua. For international language support currencyName can also equal the exact name in the local language, eg. currencyName("phirius-muschel"), caps don't matter.
amount - is the amount of that currency you have
spaceleft - is how much more you can hold.
- Tidied up the language files a bit
- A few other insignificant or cosmetic changes.
Re: 758 Changelog
Posted: Sat Jun 08, 2013 1:48 pm
by grande
Thank you Rock. One thing I noticed after doing the SVN update was that the address file was conflicted. I reverted it and then there were no issues. So all is well so far. I imagine it may have something to do with the update to the addresses that was already ran.. or.. there was a type-O? seems I recall it saying something about a "/" in the wrong place... sorry i don't recall exactly.
Re: 758 Changelog
Posted: Sun Jun 09, 2013 12:50 am
by rock5
Because the addresses were already updated from your use of the bot and the bot tried to update the same addresses you get the conflict. Usually if the changes are exactly the same it resolves the conflict but I added an address so it couldn't resolve it.
Re: 758 Changelog
Posted: Sat Jun 15, 2013 9:15 am
by rock5
I've updated the bot to 759.
Changes:
- - I put player:update() back in waitForLoadingScreen() so hopefully all the problems that caused are fixed.
- I think I managed to find the cause of "Undefined player.Class1 in settings.lua" error, which is why I removed player:update() from waitForLoadingScreen() in the first place. So hopefully that's fixed too.
Edit: Oops. Got distracted half way through commit and forgot I changed some extra files which I forgot to add
- - Added missed files in rev 760.
- Added variable constants for minimum and maximum player ids.
Re: 758 Changelog
Posted: Sun Jun 16, 2013 3:49 am
by grande
Thanks again Rock5
Re: 758 Changelog
Posted: Sun Jun 16, 2013 3:53 am
by grande
Not sleeping well tonight. Other than that... had this happen:
Code: Select all
Did not find any crashed game clients.
4:49am - ...Desktop/micromacro/scripts/rom/classes/player.lua:1803: Error
in your profile: onLeaveCombat error: ...Desktop/micromacro/scripts
/rom/functions.lua:756: bad argument #1 to 'memoryReadByte' ((null))
I guess that's my fault? Too much going on in my onLeaveCombat code?
Code: Select all
<onLeaveCombat><![CDATA[
if inventory:itemTotalCount(0) == 0 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("sell"));
end
if inventory:itemTotalCount("Arrowhead Carved with Name") > 499 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("sell"));
end
GuildDonate();
CheckLP();
-- Additional Lua code to execute after killing an enemy
catchCavy(cavy);
if player:findNearestNameOrId("Mysterious Bag") and inventory:itemTotalCount(0) ~= 0 then
player:target_Object("Mysterious Bag")
yrest(500) -- If not enough time to pick up bag, increase it.
player:target_Object("Mysterious Bag")
yrest(500)
elseif inventory:itemTotalCount(0) == 0 then
__WPL:setWaypointIndex(__WPL:findWaypointTag("sell"));
end
local dura = inventory:getDurability(1);
printf("Head durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(1)");
end
local dura = inventory:getDurability(0);
printf("Head durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(0)");
end
local dura = inventory:getDurability(16);
printf("Main hand durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(16)");
end
local dura = inventory:getDurability(2);
printf("Hands durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(2)");
end
local dura = inventory:getDurability(3);
printf("Feet durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(3)");
end
local dura = inventory:getDurability(4);
printf("Chest durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(4)");
end
local dura = inventory:getDurability(5);
printf("Chest durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(5)");
end
local dura = inventory:getDurability(6);
printf("Cloak durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(6)");
end
local dura = inventory:getDurability(7);
printf("Belt durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(7)");
end
local dura = inventory:getDurability(8);
printf("Shoulders durability:%s\n", dura);
if ( 90 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(8)");
end
local dura = inventory:getDurability(9);
printf("Necklace durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(9)");
end
-- Repair Ranged
local dura = inventory:getDurability(10);
printf("Head durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(10)");
end
local dura = inventory:getDurability(11);
printf("Ranged Weapon durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(11)");
end
local dura = inventory:getDurability(12);
printf("Ring Left durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(12)");
end
local dura = inventory:getDurability(13);
printf("Ring Right durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(13)");
end
local dura = inventory:getDurability(14);
printf("Earring Left durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(14)");
end
-- Repair main hand
local dura = inventory:getMainHandDurability(15);
printf("Earring Right durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(15)");
end
local dura = inventory:getDurability(17);
printf("Off hand durability:%s\n", dura);
if ( 95 > dura ) then
inventory:useItem("Simple Repair Hammer");
RoMScript("PickupEquipmentItem(17)");
end
if (not player:hasBuff("506690")) then
inventory:useItem(207206);
end
]]></onLeaveCombat>
Oh, and now I see it alluding to line 756 of the functions.lua but I have no idea what all this means:
Code: Select all
while( memoryReadByte(getProc(), macro_address + addresses.macroSize *(resultMacro - 1) + addresses.macroBody_offset) == 6 ) do
if( deltaTime(getTime(), startWaitTime) > 800 ) then
if settings.options.DEBUGGING then
printf("0x%X\n", addresses.editBoxHasFocus_address)
end
if memoryReadUInt(getProc(), addresses.editBoxHasFocus_address) == 0 then
keyboardPress(settings.hotkeys.ESCAPE.key); yrest(500)
if RoMScript("GameMenuFrame:IsVisible()") then
-- Clear the game menu and reset editbox focus
keyboardPress(settings.hotkeys.ESCAPE.key); yrest(300)
RoMCode("z = GetKeyboardFocus(); if z then z:ClearFocus() end")
end
end
tryagain = true
break
end;
rest(1);
end
Re: 758 Changelog
Posted: Sun Jun 16, 2013 4:03 am
by grande
Now that I cogitate on this more... I see the functions.lua file indicating various wait times such as 800, 500, and 300. I frequently get lag spikes in excess of 1 second. Would pushing out some of these "WaitTimes" or yrests to 1000 help my cause?
edit: i went ahead and just added a thousand to those waittime/rests to see how it goes.
edit: sleep is for pussies
Re: 758 Changelog
Posted: Sun Jun 16, 2013 4:22 am
by rock5
"argument #1" is getProc(). The only way getProc can return nil is if the bot looses communication with the game and thinks the current window id is invalid. If so, it will try to get proc again and because there is a communication problem it fails and returns nil. I'm not sure what can cause this. Maybe some other process uses 100% of the cpu for a few moments so the bot can't get a response from the game. Or it could be any other glitch. It's definitely not related to the 758 changes as I didn't change anything that would affect that.
Re: 758 Changelog
Posted: Sun Jun 16, 2013 4:26 am
by grande
Got this recently:
Code: Select all
Did not find any crashed game clients.
5:22am - ...s/n/Desktop/micromacro/scripts/rom/functions.lua:756: bad ar
gument #1 to 'memoryReadByte' ((null))
functions.lua:756 again. So, like you said, this has something to do with bot communication errors thinking the current window is invalid. Why is this check so important and how can I make it tolerate me better? I know, tall order. Was I onto anything with adjusting the yrests?
Re: 758 Changelog
Posted: Sun Jun 16, 2013 4:33 am
by rock5
Maybe you need a yrest after each romscript in your code. Each of those romscripts represents an action that takes at least a little bit of time. Try leaving some time for them to complete.
Re: 758 Changelog
Posted: Sun Jun 16, 2013 4:45 am
by grande
Okay, I'll try that. Just crashed again with this notice:
Code: Select all
Did not find any crashed game clients.
5:44am - .../Desktop/micromacro/scripts/rom/classes/pawn.lua:156: bad ar
gument #1 to 'readfunc' ((null))
Re: 758 Changelog
Posted: Sat Jul 18, 2015 5:49 am
by beanybabe
undefined player.Class1 in settings.lua
Also this one
memorytable.lua:213: attempt to concatenate a nil value
I do not think it has to do with putting yrest in. There was a yrest(500) between each line and still have this happening its has been happening more and more last few days.
Re: 758 Changelog
Posted: Sat Jul 18, 2015 8:11 am
by rock5
I think that means it is failing to read memory. I don't know much about how the read memory functions work. Are you using the latest version of micromacro 1.04.174?
Re: 758 Changelog
Posted: Sat Jul 18, 2015 8:54 am
by BlubBlab
rock5 wrote:I think that means it is failing to read memory. I don't know much about how the read memory functions work. Are you using the latest version of micromacro 1.04.174?
I know that after a few 100.000th items I scanned in with my userfunction it failed.
I simple changed the last line to :
Code: Select all
local second = memoryReadString(proc, nameaddress) or ""
name = name or "";
return name..second;
I think windows has intern racing conditions so that it can under heavy load fail.
Re: 758 Changelog
Posted: Sat Jul 18, 2015 9:44 am
by rock5
You're probably right.
I don't know if I would add that to the bot as you can't predict what problems it will cause. Of course it wont error but at least the error is telling you you are overtaxing your system. If it doesn't error then you could be having problems and have no idea what is causing it.
Re: 758 Changelog
Posted: Sat Jul 18, 2015 1:03 pm
by beanybabe
This may give some idea why rom has problems. Rom uses almost no error correction in it data im thinking. If you run this
http://www.pingstatus.net/ and poke in the ip address you find in the RuneDev.ini from your rom folder then let it run for a while you will see the errors happening.
It seems to me the newer the windows the less problems I seem to have. I was wondering if there is a way to take snapshots of the memory area that seems to be causing problems. I have idea that rom is moving data. If there was a way to detect that, a way to work around it might be found.
Re: 758 Changelog
Posted: Sat Jul 18, 2015 1:10 pm
by rock5
I don't know much about it but I don't think that's possible.
Re: 758 Changelog
Posted: Sat Jul 18, 2015 1:26 pm
by beanybabe
here is a nifty patch that I have used on rom just make a backup of your runesofmagic.exe before applying it you will need replace it to do updates later
http://www.ntcore.com/4gb_patch.php
it increases ram so you can run longer between crashes.
Re: 758 Changelog
Posted: Wed Jul 22, 2015 1:01 am
by beanybabe
undefined player.Class1 in settings.lua
Im getting this over and over when I enter the drill since this last patch. It happens in several spots.
MicroMacro v1.04.174
RoM Bot Version 3.29, Revision 785ñ
Re: 758 Changelog
Posted: Wed Jul 22, 2015 2:30 am
by rock5
You have something majorly wrong. Do you have any conflicts with your bot files?
Try running rom/update.