Need some help for automatioc dailyquestroutine
Posted: Fri Jun 25, 2010 6:35 am
thx for help
MicroMacro home
https://www.solarstrike.net/phpBB3/
If you got the mm message saying "We successfully target NPC" then it did target the NPC. Having another MMProgram running shouldn't cause a problem unless it is attached to the same RoM client and is running a script that clashes with it.Starrider wrote:hello, I need some help for a daily quest routine.
i want that my npc automatically accept and finish DQ on the elven isle. There is a DQ you can take form the NPC Blinsik where you must "wash" some food in the water at the rocks.
but i have the problem:
i got the MM-massage that the bot opens the Dialog window, but it doesnt happen. Does this work only with one MMProgram open? (Had another Bot runing during i wanted to test this)Code: Select all
<!-- # 3 --><waypoint x="31859" z="4591"> player:target_NPC("Blinsik"); player:rest(3); sendMacro("ChoiceOption(2);"); player:rest(3); </waypoint>
You should use the harvest command. Using rom/getid.lua I got the item id of 112976 so you would use player:harvest(112976). Those coordinates are a bit too close so back up a bit. You also need to fine tune the scanning settings because the crystal is a bit small (Harvest expert options). And, yes, the window needs to be on top.Starrider wrote:Second how can i select the object where I have to transform the DQ-Item, its a cristall <!-- # 13 --><waypoint x="31418" z="5715">. Need to run window in foreground? use the mouseclick option etc.?
Code: Select all
local dailyQuestCount, dailyQuestsPerDay= Daily_count();
DEFAULT_CHAT_FRAME:AddMessage("You've completed "..dailyQuestCount.." out of " .. dailyQuestsPerDay ..
" daily quests, leaving " .. dailyQuestsPerDay - dailyQuestCount .. " quests.");The obvious place would be after you talk to the npc and complete a daily quest. Then check if you have finished. That command should work fine in any client language.Starrider wrote:hi got now working it, but how to work with theWorks this code also with the german chat text?Code: Select all
local dailyQuestCount, dailyQuestsPerDay= Daily_count(); DEFAULT_CHAT_FRAME:AddMessage("You've completed "..dailyQuestCount.." out of " .. dailyQuestsPerDay .. " daily quests, leaving " .. dailyQuestsPerDay - dailyQuestCount .. " quests.");
I want that the bot counts the DQs an then log out...
where to put the code in the WP list, after the queststauts checks?
Something like this;Starrider wrote:make changes on this code or only put it like this, i dont kno how to code the if/then syntax.
Code: Select all
local dailyQuestCount, dailyQuestsPerDay= RoMScript("Daily_count()");
print("You've completed "..dailyQuestCount.." out of " .. dailyQuestsPerDay ..
" daily quests, leaving " .. dailyQuestsPerDay - dailyQuestCount .. " quests.");
if (dailyQuestsPerDay - dailyQuestCount) == 0 then -- finished, log out
player:logout()
endCode: Select all
-- Complete quest
player:target_NPC();
sendMacro("CompleteQuest()"); yrest(2000);
local dqCount, dqPerDay= RoMScript("Daily_count()");
if (dqPerDay - dqCount) == 0 then -- finished, log out
player:logout()
end
-- Accept questCode: Select all
-- Complete quest
player:target_NPC();
sendMacro("CompleteQuest()"); yrest(2000);
local dqCount, dqPerDay= RoMScript("Daily_count()");
if (dqPerDay - dqCount) == 0 then -- finished, log out
sendMacro("}LoginNextToon=true;a={")
sendMacro("Logout();"); yrest(3*60*1000) -- wait 3m for next character to load
-- Re-initialize player
player = CPlayer.new();
settings.load();
settings.loadProfile("l1-10"); -- Profile name
yrest (4000)
loadPaths(" "); -- First script
end
-- Accept quest
It's a known issue with RoMScript(), sometimes it returns nil. A fix was implemented awhile ago to make it less likely to happen but it will still sometimes happen. You can make sure it's not nil by changing;Starrider wrote: worked perektly, but one time I got at remaining 2 DQs this error:
[string "...":8: attemp to perform arithmetic on local 'dqPerDay' a nil value
Code: Select all
local dqCount, dqPerDay= RoMScript("Daily_count()");Code: Select all
repeat
dqCount, dqPerDay= RoMScript("Daily_count()");
until dqCount and dqPerDayYes. It closes the 'if' statement.Starrider wrote:how has to look the code with autologin to next char? like this?:is the "end" correct?Code: Select all
-- Complete quest player:target_NPC(); sendMacro("CompleteQuest()"); yrest(2000); local dqCount, dqPerDay= RoMScript("Daily_count()"); if (dqPerDay - dqCount) == 0 then -- finished, log out sendMacro("}LoginNextToon=true;a={") sendMacro("Logout();"); yrest(3*60*1000) -- wait 3m for next character to load -- Re-initialize player player = CPlayer.new(); settings.load(); settings.loadProfile("l1-10"); -- Profile name yrest (4000) loadPaths(" "); -- First script end -- Accept quest
If it's just for dailies you don't need to use customized character profiles. They are only needed to personalize the attack sequence. For dailies you can just use 'l1-10' or 'default'.Starrider wrote:If I want that the characters loaded not l1-10 do i need for every character an own WP list, where stand at settings.loadProfile("l1-10") substitudes by settings.loadProfile("CharA"), and loadPaths("WaypointCharA"), an at the end of WP script of CharA: settings.loadProfile("CharB") and loadPaths("WaypointCharB") etc. pp.?
If it's still moving when it starts the transformation, just put a pause before it, say 500ms? For the rest, try this;Starrider wrote:next issue:
sometimes it doesn't harvest the object because it still moves a little bit when it already startet to harvest and got a break up or another player is at the object. If the transfomration is finished I got the obejct with the ID 204840, how to code at the Waypoint to check the inventuory for the object with ID 204840 an when true to go on else to wait 2 seconds to try again in a loop until true?
Code: Select all
repeat
player:target_Object(112976,8000)
inventory:update()
until inventory:itemTotalCount(204840) > 0 I don't know what to say. When using this codeStarrider wrote:but one time I had again a nil value by comparing dqPerDay - dqCount
i still got the error often at the last DQ...
Code: Select all
repeat
dqCount, dqPerDay= RoMScript("Daily_count()");
until dqCount and dqPerDayMiesterMan worked out a solution for that. Read his thread here.Starrider wrote:I use your modified Autologin 1.3.1 now its switches all charakaters from 1-8
is it with this script and the bot possible that at the end of Char8 the bot logs out completly an login into another account and start the same procedure again?