Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Thu Nov 21, 2024 8:15 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: INT macro (need help)
Thanked: 0 time(s)  Unread post Posted: Fri Nov 26, 2010 4:01 pm 
New User
New User



Joined: Thu Jun 10, 2010 4:32 pm
Posts: 16
Been thanked: 1 time(s)
Has thanked: 0 time(s)
Contribution Points: 156
I am attempting to make a macro that will make my player heal another character who is being hit by a brick or 2 to in order to take damage, and then my character heals that character to gain INT, + blue magic and staff skill.

Here’s what I’m trying to achieve

1) It will first locate the other character (who is going to be healed) using colour recognition then it will Auto fast cast heal onto the player. ( done)

2) It will also monitor Mana and auto pot mana potions when necessary (done)

3) Then it will Read from memory to see the value of pots in the bar to see when they run out / pause the fast cast

4) When pots run out (value = 0) the character will already be standing next to the warehouse and will auto withdraw more mana pots and equip to bar

5) When the value of pots reaches a certain number (value = 150) the process will start again.


The problem I am having is with the base pointer for the pots, I have found the base pointer for mana pots equipped in the bar but the number is different to the original value, so if mana pots = 20 base pointer value = 65544 I might have the wrong base pointer but I’m pretty sure its correct as when I use 1 pot it will go down from 65544 to 65543, could any one help me ?


Top
 Profile  
Reply with quote  
 Post subject: Re: INT macro (need help)
Thanked: 0 time(s)  Unread post Posted: Fri Nov 26, 2010 4:04 pm 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Sat Apr 24, 2010 12:51 pm
Posts: 355
Location: Tallinn
Been thanked: 18 time(s)
Has thanked: 1 time(s)
Contribution Points: 4647
why you just wont set loops to the "pots amount", lets say you start with 50 pots = loop 50 times, end of loop youll take 50 pots at warehouse :)

_________________
Full time IT student/worker - BE showed me the way, so may the code be with you all!
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: INT macro (need help)
Thanked: 0 time(s)  Unread post Posted: Fri Nov 26, 2010 4:16 pm 
New User
New User



Joined: Thu Jun 10, 2010 4:32 pm
Posts: 16
Been thanked: 1 time(s)
Has thanked: 0 time(s)
Contribution Points: 156
Could you explain what you mean by

"why you just wont set loops to the "pots amount", lets say you start with 50 pots = loop 50 times, end of loop youll take 50 pots at warehouse :)"

what I want to do is when my character runs out of mana potions from using the healing spell, is to take out 50 more pots out the warehouse/ bank but I can't find a way to find out when the pots run out (in order to take more potions out) unless I use colour recognition but using memory will be better cause i wanna use windowed mode.


Top
 Profile  
Reply with quote  
 Post subject: Re: INT macro (need help)
Thanked: 0 time(s)  Unread post Posted: Fri Nov 26, 2010 4:17 pm 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4525
Been thanked: 1346 time(s)
Has thanked: 133 time(s)
Contribution Points: 33209
You could just keep the count of your remaining pots in an internal variable, and just make sure to decrease the variable everytime you use a potion.

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: INT macro (need help)
Thanked: 0 time(s)  Unread post Posted: Fri Nov 26, 2010 4:24 pm 
New User
New User



Joined: Thu Jun 10, 2010 4:32 pm
Posts: 16
Been thanked: 1 time(s)
Has thanked: 0 time(s)
Contribution Points: 156
thanks for the suggestions i think i'll just do it in full screen and use colour, when the colour changes from blue to grey it will pause the fast cast activate the get more potions macro, drag the potions to the bar and when the colour changes back to blue healing will start again. :)


Top
 Profile  
Reply with quote  
 Post subject: Re: INT macro (need help)
Thanked: 0 time(s)  Unread post Posted: Fri Nov 26, 2010 5:37 pm 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4525
Been thanked: 1346 time(s)
Has thanked: 133 time(s)
Contribution Points: 33209
You don't have to run full screen, there is an instruction to calculate absolute coordinates based on the relative coordinates in the window.

Then you use those coordinates to check the color.

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
 Post subject: Re: INT macro (need help)
Thanked: 0 time(s)  Unread post Posted: Fri Nov 26, 2010 7:37 pm 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Sat Apr 24, 2010 12:51 pm
Posts: 355
Location: Tallinn
Been thanked: 18 time(s)
Has thanked: 1 time(s)
Contribution Points: 4647
thecdawg wrote:
Could you explain what you mean by

Code:
 begin
     Variable.Set("totalmppots", "50")
     begin loop("{mppotcount}")
          code here
     end
 end

_________________
Full time IT student/worker - BE showed me the way, so may the code be with you all!
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: INT macro (need help)
Thanked: 0 time(s)  Unread post Posted: Sat Dec 04, 2010 4:13 pm 
New User
New User



Joined: Thu Jun 10, 2010 4:32 pm
Posts: 16
Been thanked: 1 time(s)
Has thanked: 0 time(s)
Contribution Points: 156
Any suggestions to make this script work, it works for 1 loop but the next loop doesn’t I’ve probably done something obviously wrong but can't see what.

Code:
 begin
     Macro.Execute new("demos", "Fast cast heal", "no")
     Macro.Execute new("demos", "mp bot", "no")
     Macro.Pause("250")
     if  Color.At coordinate is not within (RGB range)("49", "28", "255", "3", "316", "672")
          begin
               Macro.Abort all other macros()
               Macro.Pause("250")
               Macro.Execute new("demos", "pot withdrawel", "yes")
          end
 end


Top
 Profile  
Reply with quote  
 Post subject: Re: INT macro (need help)
Thanked: 0 time(s)  Unread post Posted: Sat Dec 04, 2010 5:18 pm 
Partner / License admin
Partner / License admin
User avatar



Joined: Sun Oct 10, 2010 5:16 pm
Posts: 2259
Location: USA
Been thanked: 535 time(s)
Has thanked: 38 time(s)
Contribution Points: 17741
As it's written there it will only run once; either check "infinite" on loops in code view or add "macro.restart("yes")" after the first "end"...see if that helps. Or are you having a problem with it functioning properly on the second run? The only other thing that I see is:
Code:
Macro.Execute new("demos", "pot withdrawel", "yes")
I would run your "pot withdrawel" macro and check the log to see if it's getting hung up because that "yes" value will cause it to hang there if it is.

_________________
----------------------------------------Syrifina---------------------------------------------------
PM me for licenses and/or licensing information: Click Here
[Be sure to include and update your profile with your BE ID]

Forum Rules
Reminder of rules regarding Contribution points
Getting started in 1, 2, 3
Virtual Drivers; Manual Installers


Top
 Profile  
Reply with quote  
 Post subject: Re: INT macro (need help)
Thanked: 0 time(s)  Unread post Posted: Sun Dec 05, 2010 10:36 am 
Partner / Developer
Partner / Developer
User avatar



Joined: Mon Jan 18, 2010 11:51 am
Posts: 4525
Been thanked: 1346 time(s)
Has thanked: 133 time(s)
Contribution Points: 33209
Change the very first "begin" to "begin loop()" then It will keep running.

Are you sure you want to run the "Fast cast heal" + the "mp bot" macro at the same time? if you specify "yes" in the wait argument, they will execute one at a time, so the macro Fast cast heal will be allowed to finish before executing the "mp bot".

Right now your executing both macros at the same time.

_________________
Blue Eye - Developer / Moderator
Code:
Gigus


Please read the rules about contribution points - click here

Do you know everything about BE, the forum, licenses and contribution points?
Please take a minute to read this introduction & guidelines.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group