Page 2 of 3
Re: svn updates for userfunctions
Posted: Thu Apr 18, 2013 8:56 pm
by lisa
updated Rock's login stuff,
updated setwindow to allow usage for AH and also xp, there is a table at the top of file to add items for the AH so you can get an idea of your gold/hour if farming items you would sell on AH.
Re: svn updates for userfunctions
Posted: Tue May 28, 2013 12:33 pm
by CanceR
hello Lisa, i updated to version 16 and have last version of the userfunction.
i usually start my MM with shortcut to mm.exe, and in "Target" field have filled "C:\Games\micromacro\micromacro.exe scripts/rom/bot path:path_name" - to start path_name with last focused game client, but i have error like in attachment.
can you give me a hint how to fix this?
thanks in advance
Re: svn updates for userfunctions
Posted: Tue May 28, 2013 6:55 pm
by lisa
ok 2 things to try.
Update Micromacro to 1.03
http://www.solarstrike.net/micromacro
Next I would try moving the userfunctions to the global folder, the ones from SVN anyway, the rest can just stay in the normal rom/userfunctions folder.
micromacro/scripts/romglobal/userfunctions
Rock made some changes to the loading of userfunctions and it may be causing your issue but I have no issues with it with the userfunctions in the romglobal folder.
I think I added pics on the first post for doing this, can't remember.
Re: svn updates for userfunctions
Posted: Wed May 29, 2013 3:54 pm
by CanceR
it does not work both ways, which you proposed.
i think there is major bug with loading rom/bot.lua script, and this is after i updated rom/scripts to latest version 757. but this is only when i try to start micromacro from its shortcut as descibed it below: in "Target" field have filled "C:\Games\micromacro\micromacro.exe scripts/rom/bot path:path_name". If I remove section "path:path_name" - it ends up with same error as in screeshot below.
and it does not matter of micromacro version - tried it with 1.02 and 1.03 also.
but i can start in normal way: start script with "rom/bot" command
PS(edit): problem comes from version 757 of scripts, with 756 - no issue
Re: svn updates for userfunctions
Posted: Wed May 29, 2013 6:13 pm
by lisa
If it still didn't work using the romglobal folder then rock will have to work it out, as it is probably an issue with the changes he made to improve loading userfunctions, for me to work it out I'd have to go through all the changes to get to the issue.
Re: svn updates for userfunctions
Posted: Thu May 30, 2013 2:37 am
by rock5
I don't know what you can or could do but the bot was never intended to be started that way.
The proper way to set up a auto start shortcut is to create a bat file similar to the existing "startbot.bat". Modify it to your needs and make a shortcut of that.
Example:
Code: Select all
@echo off
FOR /F "tokens=1 delims=" %%A in ('cd') do SET folder=%%A
START ../../micromacro.exe "%folder%/bot.lua" path:path_name
Re: svn updates for userfunctions
Posted: Thu May 30, 2013 2:54 am
by rock5
In regards to using MM shortcuts, I can confirm that
"C:\Program Files (x86)\micromacro\micromacro.exe" "scripts/rom/bot" "path:path_name"
seems to work with 756 but not 757. The reason is because it messes up "getExecutionPath" because it uses the prefix of "bot" as the execution path which should be a fully qualified path. It has always been like this but most scripts used to still run regardless but there was always situations that this could cause a problem. The correct way to do a shortcut is to specify the fully path to the bot so "getExecutionPath" will have the correct value, then all scripts should work. Eg.
"C:\Program Files (x86)\micromacro\micromacro.exe" "C:/Program Files (x86)/micromacro/scripts/rom/bot" "path:path_name"
This will work with both 756 and 757.
Now, the reason 757 didn't work anyway, like 756 could, is because the extra code added that searches relative folders needs getExecutionPath to return the correct path.
Re: svn updates for userfunctions
Posted: Tue Jun 11, 2013 6:25 pm
by lisa
Added rock's travelTo userfunction.
Not sure how up to date I can keep this as I don't play RoM anymore.
Re: svn updates for userfunctions
Posted: Wed Jul 17, 2013 11:57 am
by Lamkefyned
hi i want to ask how to install the userfuncions because I can .... please anyone can help me?
sorry for my bad English.
Re: svn updates for userfunctions
Posted: Wed Jul 17, 2013 1:11 pm
by rock5
Usually you put userfunction files into the "rom/userfunctions" folder. They then get automatically loaded when you start the bot. Any functions in the file would then be available for you to use in your scripts.
If you are talking about Lisas "svn update for userfunctions" then follow the instructions on the first post of this topic. I don't use it so, if you need more information, you'll have to wait until she is back online tomorrow.
Re: svn updates for userfunctions
Posted: Wed Jul 17, 2013 1:24 pm
by Lamkefyned
hello rock5
I want to apply this script speedhack
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<waypoints>
<!-- Updated>12/31/2011 9:00 AM PST<-->
<onLoad>
DQ1 = GetIdName(424179);
DQ2 = GetIdName(424205);
DQNPC12 = "Wernika Diyazi";
DQ3 = GetIdName(424181);
DQ4 = GetIdName(424180);
DQNPC34 = "Robbie Butcher";
function tgtInRange(_target, _range)
if not _range then
_range = 300;
end
local objectList = CObjectList();
objectList:update();
player:update();
local objSize = objectList:size();
cprintf(cli.lightgreen,"Checking if any %s are in range.\n",_target)
local _closest = 1000;
for i = 0,objSize do
obj = objectList:getObject(i);
if obj.Name == _target then
local _tmpDist = distance(obj.X,obj.Z,player.X,player.Z);
if _closest > _tmpDist then
_closest = _tmpDist
end
end
end
if _range >= _closest then
cprintf(cli.lightgreen,"%s in range.\n",_target)
return true;
else
cprintf(cli.lightgreen,"%s NOT in range.\n",_target)
return false;
end
end
function getDailyComplete()
return RoMScript("Daily_count();");
end
function checkDQCount()
local _tmpQC = getDailyComplete();
cprintf(cli.lightblue,"%s quests completed.\n",tostring(_tmpQC));
if (_tmpQC == 10) then
cprintf(cli.lightblue,"Completed max number of daily quests, logging out.\n");
player:logout();
end
end
settings.profile.friends = {"Ogest","Kupferg\132rtner","Dunkelritenmagier","Dunkelriten-Akolyth","Dunkelritenhexenmeister","Dunkelritenausbilder","Seelenkern","Knochenmahlblume","Wanderskelett"};
changeProfileOption("EGGPET_ENABLE_ASSIST",false);
changeProfileOption("LOOT_ALL",true);
changeProfileOption("TARGET_LEVELDIF_BELOW",30)
</onLoad>
<!-- # 1 --><waypoint x="6789" z="6301" y="92" tag="teleportFLCamp">
</waypoint>
<!-- # 2 --><waypoint x="6794" z="6354" y="88"> </waypoint>
<!-- # 3 --><waypoint x="6663" z="6508" y="92" tag="questGiver">
__WPL:setForcedWaypointType("RUN")
dailyQuest1 = getQuestStatus(DQ1);
dailyQuest2 = getQuestStatus(DQ2);
if (dailyQuest1 == "complete") then
checkDQCount();
player:target_NPC(DQNPC12);
CompleteQuestByName(DQ1);
end
if (dailyQuest2 == "complete") then
checkDQCount();
player:target_NPC(DQNPC12);
CompleteQuestByName(DQ2);
end
checkDQCount();
player:target_NPC(DQNPC12);
AcceptQuestByName(DQ1);
player:target_NPC(DQNPC12);
AcceptQuestByName(DQ2);
cprintf(cli.lightblue,"Quests accepted, moving to objective.\n");
</waypoint>
<!-- # 4 --><waypoint x="6481" z="6442" y="89"> player:mount(); </waypoint>
<!-- # 5 --><waypoint x="6387" z="6297" y="90"> </waypoint>
<!-- # 6 --><waypoint x="6395" z="6086" y="95">
dailyQuest3 = getQuestStatus(DQ3);
dailyQuest4 = getQuestStatus(DQ4);
if (dailyQuest3 ~= "not accepted") and (dailyQuest4 ~= "not accepted") then
__WPL:setWaypointIndex(__WPL:findWaypointTag("skipAcceptButterflies"));
end
</waypoint>
<!-- # 7 --><waypoint x="6428" z="5438" y="154" tag="acceptButterflies">
dailyQuest1 = getQuestStatus(DQ1);
dailyQuest2 = getQuestStatus(DQ2);
dailyQuest3 = getQuestStatus(DQ3);
dailyQuest4 = getQuestStatus(DQ4);
if (dailyQuest1 == "complete") or (dailyQuest2 == "complete") then
__WPL:setWaypointIndex(__WPL:findWaypointTag("skipButterflyTurnin"));
end
if dailyQuest3 == "complete" then
checkDQCount();
player:target_NPC(DQNPC34);
CompleteQuestByName(DQ3);
yrest(100);
dailyQuest3 = getQuestStatus(DQ3);
end
if dailyQuest4 == "complete" then
checkDQCount();
player:target_NPC(DQNPC34);
CompleteQuestByName(DQ4);
yrest(100);
dailyQuest4 = getQuestStatus(DQ4);
end
if (dailyQuest3 == "not accepted") then
checkDQCount();
player:target_NPC(DQNPC34);
AcceptQuestByName(DQ3);
end
if (dailyQuest4 == "not accepted") then
checkDQCount();
player:target_NPC(DQNPC34);
AcceptQuestByName(DQ4);
end
</waypoint>
<!-- # 8 --><waypoint x="6254" z="5187" y="168" tag="skipAcceptButterflies">
</waypoint>
<!-- # 9 --><waypoint x="6348" z="4789" y="168">
__WPL:setWaypointIndex(__WPL:findWaypointTag("enterGarden"));
</waypoint>
<!-- # 10 --><waypoint x="6530" z="4792" y="168" tag="walkAround1"> player:mount(); </waypoint>
<!-- # 11 --><waypoint x="6638" z="4338" y="167"> </waypoint>
<!-- # 12 --><waypoint x="6635" z="4268" y="168"> </waypoint>
<!-- # 13 --><waypoint x="6506" z="4183" y="168" tag="enterGarden">
</waypoint>
<!-- # 14 --><waypoint x="6583" z="3889" y="190"> </waypoint>
<!-- # 19 --><waypoint x="6381" z="3183" y="176"> </waypoint>
<!-- # 20 --><waypoint x="6373" z="2893" y="168"> </waypoint>
<!-- # 21 --><waypoint x="6381" z="2760" y="168"> </waypoint>
<!-- # 22 --><waypoint x="6225" z="2783" y="168"> </waypoint>
<!-- # 23 --><waypoint x="6135" z="2867" y="168"> </waypoint>
<!-- # 24 --><waypoint x="6086" z="2761" y="168"> </waypoint>
<!-- # 25 --><waypoint x="6110" z="2654" y="168"> </waypoint>
<!-- # 26 --><waypoint x="6133" z="2549" y="168"> </waypoint>
<!-- # 29 --><waypoint x="6405" z="1763" y="168"> </waypoint>
<!-- # 30 --><waypoint x="6527" z="1080" y="168"> </waypoint>
<!-- # 31 --><waypoint x="6906" z="1223" y="168">
__WPL:setForcedWaypointType("TRAVEL");
</waypoint>
<!-- # 32 --><waypoint x="7195" z="1333" y="168"> </waypoint>
<!-- # 33 --><waypoint x="7227" z="1226" y="190"> </waypoint>
<!-- # 34 --><waypoint x="7245" z="1133" y="190"> </waypoint>
<!-- # 35 --><waypoint x="7332" z="746" y="176" tag="startQuestKills">
player:update();
if player.Battling and tgtInRange("Ogest",500) then
local _tmpChannel = tonumber(RoMScript("GetLeaderChannelID();"));
if _tmpChannel == 3 then
_tmpChannel = 1;
else
_tmpChannel = _tmpChannel + 1;
end
RoMScript("ChangeParallelID(" .. tostring(_tmpChannel) .. ");");
yrest(25000);
end
__WPL:setForcedWaypointType("NORMAL");
</waypoint>
<!-- # 36 --><waypoint x="7074" z="736" y="175" tag="startFirstKilling">
</waypoint>
<!-- # 37 --><waypoint x="6953" z="656" y="175"> </waypoint>
<!-- # 38 --><waypoint x="6855" z="484" y="175"> </waypoint>
<!-- # 39 --><waypoint x="6752" z="522" y="175"> </waypoint>
<!-- # 40 --><waypoint x="6548" z="403" y="175"> </waypoint>
<!-- # 41 --><waypoint x="6463" z="511" y="175"> </waypoint>
<!-- # 42 --><waypoint x="6583" z="572" y="175" tag="lastFirstKilling">
dailyQuest1 = getQuestStatus(DQ1);
dailyQuest2 = getQuestStatus(DQ2);
if (dailyQuest1 ~= "incomplete") and (dailyQuest2 ~= "incomplete") then
__WPL:setWaypointIndex(__WPL:findWaypointTag("endQuestKilling"));
__WPL:setForcedWaypointType("RUN")
elseif not (tgtInRange("Schatten des Abgrunds") or tgtInRange("Dunkler Nachtgargoyle")) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("startSecondKilling"));
else
__WPL:setWaypointIndex(__WPL:findWaypointTag("startFirstKilling"));
end
</waypoint>
<!-- # 43 --><waypoint x="7714" z="846" y="175" tag="startSecondKilling">
</waypoint>
<!-- # 44 --><waypoint x="7865" z="769" y="175"> </waypoint>
<!-- # 45 --><waypoint x="8042" z="797" y="175"> </waypoint>
<!-- # 46 --><waypoint x="8229" z="873" y="175"> </waypoint>
<!-- # 47 --><waypoint x="7991" z="898" y="175"> </waypoint>
<!-- # 48 --><waypoint x="7731" z="855" y="175"> </waypoint>
<!-- # 49 --><waypoint x="7725" z="853" y="175"> </waypoint>
<!-- # 50 --><waypoint x="7725" z="853" y="175" tag="lastSecondKilling">
dailyQuest1 = getQuestStatus(DQ1);
dailyQuest2 = getQuestStatus(DQ2);
if (dailyQuest1 ~= "incomplete") and (dailyQuest2 ~= "incomplete") then
__WPL:setWaypointIndex(__WPL:findWaypointTag("endQuestKilling"));
__WPL:setForcedWaypointType("RUN")
elseif not (tgtInRange("Schatten des Abgrunds") or tgtInRange("Dunkler Nachtgargoyle")) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("startFirstKilling"));
else
__WPL:setWaypointIndex(__WPL:findWaypointTag("startSecondKilling"));
end
</waypoint>
<!-- # 51 --><waypoint x="7328" z="774" y="174" tag="endQuestKilling" >
cprintf(cli.lightblue,"Quests completed, moving to turnin.\n");
__WPL:setForcedWaypointType("RUN");
</waypoint>
<!-- # 52 --><waypoint x="7291" z="948" y="167">
__WPL:setForcedWaypointType("TRAVEL");
</waypoint>
<!-- # 53 --><waypoint x="7245" z="1130" y="190"> player:mount (); </waypoint>
<!-- # 54 --><waypoint x="7228" z="1253" y="190"> </waypoint>
<!-- # 55 --><waypoint x="7198" z="1218" y="190"> </waypoint>
<!-- # 56 --><waypoint x="7051" z="1258" y="168"> </waypoint>
<!-- # 57 --><waypoint x="6570" z="1137" y="168"> </waypoint>
<!-- # 58 --><waypoint x="6478" z="1337" y="168"> </waypoint>
<!-- # 59 --><waypoint x="6405" z="1763" y="168"> </waypoint>
<!-- # 60 --><waypoint x="6337" z="2314" y="168"> </waypoint>
<!-- # 61 --><waypoint x="6128" z="2574" y="168"> </waypoint>
<!-- # 62 --><waypoint x="6077" z="2826" y="168"> </waypoint>
<!-- # 63 --><waypoint x="6183" z="2855" y="168"> </waypoint>
<!-- # 64 --><waypoint x="6253" z="2747" y="168"> </waypoint>
<!-- # 65 --><waypoint x="6400" z="2774" y="168"> </waypoint>
<!-- # 66 --><waypoint x="6390" z="2873" y="168"> </waypoint>
<!-- # 67 --><waypoint x="6378" z="3149" y="176"> </waypoint>
<!-- # 68 --><waypoint x="6333" z="3379" y="173"> </waypoint>
<!-- # 69 --><waypoint x="6597" z="3765" y="158"> </waypoint>
<!-- # 70 --><waypoint x="6549" z="3986" y="190"> </waypoint>
<!-- # 71 --><waypoint x="6503" z="4177" y="168">
__WPL:setForcedWaypointType("RUN");
__WPL:setWaypointIndex(__WPL:findWaypointTag("exitGarden"));
</waypoint>
<!-- # 72 --><waypoint x="6338" z="4189" y="168" tag="walkAround2">
</waypoint>
<!-- # 73 --><waypoint x="6212" z="4721" y="168"> </waypoint>
<!-- # 74 --><waypoint x="6347" z="4800" y="168" tag="exitGarden">
dailyQuest3 = getQuestStatus(DQ3);
dailyQuest4 = getQuestStatus(DQ4);
if dailyQuest3 ~= "complete" and dailyQuest4 ~= "complete" then
__WPL:setWaypointIndex(__WPL:findWaypointTag("skipButterflyTurnin"));
end
</waypoint>
<!-- # 75 --><waypoint x="6428" z="5438" y="154" tag="completeButterflies">
if dailyQuest3 == "complete" then
checkDQCount();
player:target_NPC(DQNPC34);
CompleteQuestByName(DQ3);
end
if dailyQuest4 == "complete" then
checkDQCount();
player:target_NPC(DQNPC34);
CompleteQuestByName(DQ4);
end
__WPL:setWaypointIndex(__WPL:findWaypointTag("skipBounce"));
</waypoint>
<!-- # 76 --><waypoint x="6207" z="5485" y="125" tag="skipButterflyTurnin">
</waypoint>
<!-- # 77 --><waypoint x="6310" z="5985" y="98" tag="skipBounce"> </waypoint>
<!-- # 78 --><waypoint x="6415" z="6136" y="96"> </waypoint>
<!-- # 79 --><waypoint x="6388" z="6239" y="88"> </waypoint>
<!-- # 80 --><waypoint x="6461" z="6429" y="91"> </waypoint>
<!-- # 81 --><waypoint x="6660" z="6515" y="92" tag="questReciever">
__WPL:setWaypointIndex(__WPL:findWaypointTag("questGiver"));
</waypoint>
<!-- # 82 --><waypoint x="6776" z="6299" y="92">
isTeleport("next","Ailic's Aide",1);
</waypoint>
</waypoints>
Where would you put the code and what I put?
Sincerely ambolia
Re: svn updates for userfunctions
Posted: Wed Jul 17, 2013 1:38 pm
by rock5
That is not a speed hack. That is a waypoint file. It looks like it is for doing the 4 dailies in the Infernal Gardens. You would put it in the "rom/waypoints" folder, start the bot with "rom/bot" and then select the file from t he list.
Re: svn updates for userfunctions
Posted: Wed Jul 17, 2013 1:41 pm
by Lamkefyned
already
but what I want to know is if I can go super fast in the gardens of hell?
Re: svn updates for userfunctions
Posted: Wed Jul 17, 2013 2:40 pm
by rock5
Ah. You might get banned though. And you might not be able to go 'super fast'.
To go faster, add the speed hack file to the userfunctions folder. Then in the waypoint file <onload> section add
That will default to a speed of 100 which is double the standard speed of 50. Use 'speed(num)' to set a specific speed. On long runs you will most likely get pulled back so I'm not sure if it's worth it. I think the highest speed you can use for long runs on an unbuffed player is 59. While staying in one area you might be able to use a higher value.
Play around with it and see if it's of any use.
Re: svn updates for userfunctions
Posted: Wed Jul 17, 2013 2:44 pm
by Lamkefyned
thanks will try
Re: svn updates for userfunctions
Posted: Thu Jul 18, 2013 10:14 am
by Lamkefyned
not work rock5
the test script is this:
<?xml version="1.0" encoding="utf-8"?>
<waypoints>
<!-- Updated>17/07/2013 9:00 AM PST<-->
<onLoad>
speed(100)
</onLoad>
<!-- # 1 --><waypoint x="-3233" z="-8202" y="213"> </waypoint>
<!-- # 2 --><waypoint x="-2502" z="-8209" y="213"> </waypoint>
<!-- # 3 --><waypoint x="-2692" z="-8579" y="214"> </waypoint>
<!-- # 4 --><waypoint x="-3024" z="-8205" y="215"> </waypoint>
<!-- # 5 --><waypoint x="-3581" z="-7816" y="194"> </waypoint>
<!-- # 6 --><waypoint x="-3640" z="-8062" y="222"> </waypoint>
</waypoints>
I put this:
Re: svn updates for userfunctions
Posted: Thu Jul 18, 2013 10:41 am
by rock5
The spped hack is not part of the bot. You will need to install the userfunction located here.
http://www.solarstrike.net/phpBB3/viewt ... 410#p24410. There are a few hacks there, make sure you install the right one.
Re: svn updates for userfunctions
Posted: Thu Jul 18, 2013 10:59 am
by Lamkefyned
Download this:
userfunction_speedhack.lua
try
Re: svn updates for userfunctions
Posted: Thu Jul 18, 2013 11:43 am
by Lamkefyned
're a crack
thanks
want to join the Spanish forum?
Re: svn updates for userfunctions
Posted: Wed Jul 24, 2013 4:40 am
by hagenleu
Hi Lisa
userfunction_login.lua in SVN updates is ver 3.2, while that in Rock5 post is 3.3 / 3.4
Thank for your work/help