Page 1 of 1

Mail bot help

Posted: Fri Nov 11, 2011 1:26 am
by halfbanana
Hi, I'm trying to put together a bot that stands at the auction house and runs to the mailbox when it comes in. I'm having some trouble just getting the bot to recognize when the mail comes in (via event monitor checking). I am currently using the sleep() function and I think that is part of the problem - it seems to override just about everything. However I don't want to use a function like yrest() because I want him to just stand and wait for incoming mail. Can anyone point me in the right direction? Here's what I have written so far:



<onLoad>


function DetectMail()
repeat
local time, moreToCome, msg = EventMonitorCheck("SystemMsgLog", "1")
if msg ~= nil then
if string.find(msg,"New mail") then
DEFAULT_CHAT_FRAME:AddMessage("new mail detected");
end
end
until moreToCome == false
end


function startMailDetect()
unregisterTimer("mailinc");
printf("mailinc detection started\n");
EventMonitorStart("SystemMsgLog", "CHAT_MSG_SYSTEM");
registerTimer("mailinc", secondsToTimer(5), DetectMail);
end

startMailDetect()

</onLoad>


This is the waypoint file I load initially upon starting my bot:

<waypoints>

<!-- # 1 --><waypoint x="-427" z="-6002" y="21">
<!-- # 2 --><waypoint x="-1275" z="-5847" y="65">
player:sleep();
</waypoint>



ANY HELP WILL BE GREATLY APPRECIATED, THANKS!

Re: Mail bot help

Posted: Fri Nov 11, 2011 1:30 am
by lisa
I am just going to quote the big blue writing at the top of the page.....
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
You need to go to the Runes of Magic section
http://www.solarstrike.net/phpBB3/viewforum.php?f=21