Sorry nvm
Forum rules
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
This is a sub-forum for things specific to MicroMacro.
This is not the place to ask questions about the RoM bot, which uses MicroMacro. There is a difference.
- Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
Re: Whats the best way to make a loop
You should constantly be gathering input (information about the player, it's target, etc.) and do logic based on what's happening. Instead of just looping through and doing the same thing over and over again, make it do a little bit of thinking and only act when it's the appropriate time. It's hard to suggest anything without seeing your loop. Basically, it should go like this:
Code: Select all
while( running ) do
updateGameInformation();
if( player HP is low ) then
use a heal spell, potion, or whatever else
yrest(1000); -- wait 1 second before continueing
end
if( skill is not on cooldown ) then
use skill
end
yrest(10); -- minimize CPU usage
end
Re: Whats the best way to make a loop
Ok, I guess I'm on the right track for sure. It seemed a bit sluggish but it's probably cause i'm still learning lua and memory editing all together. My loop is exactly like that. I haven't figured out how to get the monsters info yet but i did find a memory address that contains the amount of on screen monsters so I'm using that for now. It helps a lot with mana conservation but it ails because it detects dead monsters aswell and other players.
Who is online
Users browsing this forum: No registered users and 12 guests