Sorry nvm

Discuss, ask for help, share ideas, give suggestions, read tutorials, and tell us about bugs you have found with MicroMacro in here.

Do not post RoM-Bot stuff here. There is a subforum for that.
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.
Post Reply
Message
Author
Exempt
Posts: 197
Joined: Wed Jan 20, 2010 9:55 am

Sorry nvm

#1 Post by Exempt » Tue Feb 23, 2010 1:07 pm

Sorry nvm
Last edited by Exempt on Tue Nov 16, 2010 8:15 pm, edited 2 times in total.

User avatar
Administrator
Site Admin
Posts: 5307
Joined: Sat Jan 05, 2008 4:21 pm

Re: Whats the best way to make a loop

#2 Post by Administrator » Tue Feb 23, 2010 4:35 pm

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

Exempt
Posts: 197
Joined: Wed Jan 20, 2010 9:55 am

Re: Whats the best way to make a loop

#3 Post by Exempt » Tue Feb 23, 2010 5:22 pm

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests