Blue Eye Logo

Blue Eye Macro

Automation is freedom
It is currently Sat Nov 23, 2024 10:20 am

All times are UTC




Post new topic Reply to topic  [ 15 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Not So Perfect Bot V1
Thanked: 1 time(s)  Unread post Posted: Tue Nov 15, 2011 11:10 pm 
Contributor
Contributor



Joined: Sun Jun 12, 2011 9:44 am
Posts: 76
Location: France
Been thanked: 4 time(s)
Has thanked: 1 time(s)
Contribution Points: 105
Hi !
Here's my 2nd game macro ...
Today it's Perfect World a nice MMORPG!
I didn't even realize Gigus made a really perfect bot for this game but I post mine anyway, maybe someone will use the new memory adresses to update Gigus' bot :)

Code:
 // fullscreen mode | resolution : 1280x800
 // attack action on 1
 // 1st skill on 2
 // 2nd skill on 3
 // MP potions on 7
 // HP potions on 8
 // looting action on 9
 begin
     Window.Bring to front("Perfect World", "No")
     Window.Set location("Perfect World", "No", "0", "0")
     Color.Flush screen dump cache()
     // just reminders for the memory base pointers for HP and MP
     Memory.Get value("elementclient", "elementclient.exe+729184,34,4D0", "4", "totalHP")
     Memory.Get value("elementclient", "elementclient.exe+729184,34,490", "4", "currentHP")
     Memory.Get value("elementclient", "elementclient.exe+729184,34,4D4", "4", "totalMP")
     Memory.Get value("elementclient", "elementclient.exe+729184,34,494", "4", "currentMP")
     Function.Execute("quit")
     // stopwatch for skill 1
     Macro.Start stopwatch("SWskill1")
     // stopwatch for skill 2
     Macro.Start stopwatch("SWskill2")
     // stopwatch for fight timeout (eg: if the mob is behind a wall or can't be reached, the macro changes the target after a certain amount of time)
     Macro.Start stopwatch("FTO")
     begin loop()
          // main : aim,kill,loot (and heal while killing mobs and after looting)
          Color.Flush screen dump cache()
          Function.Execute("Aim")
          Function.Execute("Hit")
          Function.Execute("Loot")
          Function.Execute("Heal")
          Function.Execute("quit")
     end
 end

function("Heal")
     begin
          // HP potions on 8
          Memory.Get value("elementclient", "elementclient.exe+729184,34,4D0", "4", "totalHP")
          Memory.Get value("elementclient", "elementclient.exe+729184,34,490", "4", "currentHP")
          Variable.Evaluate (Math)("{currentHP}/{totalHP}", "ratioHP")
          if  Variable.Is less than (Math)("ratioHP", "0,5")
               begin
                    Keyboard.Press key("8")
                    Macro.Pause("300")
               end
          Memory.Get value("elementclient", "elementclient.exe+729184,34,4D4", "4", "totalMP")
          Memory.Get value("elementclient", "elementclient.exe+729184,34,494", "4", "currentMP")
          Variable.Evaluate (Math)("{currentMP}/{totalMP}", "ratioMP")
          if  Variable.Is less than (Math)("ratioMP", "0,5")
               begin
                    Keyboard.Press key("7")
                    Macro.Pause("300")
               end
     end
function

function("Aim")
     begin
          Color.Flush screen dump cache()
          while  Color.At coordinate is not within (RGB range)("0", "255", "25", "5", "568", "27")
               begin
                    Keyboard.Press key("1")
                    Keyboard.Press key("{<TAB>}")
                    Macro.Pause("400")
                    Color.Flush screen dump cache()
                    Function.Execute("Heal")
                    Function.Execute("quit")
               end
     end
function

function("Loot")
     begin
          if  Color.At coordinate is not within (RGB range)("0", "255", "25", "5", "568", "27")
               begin
                    Macro.Pause("500")
                    begin loop("10")
                         Keyboard.Press key("9")
                         Macro.Pause("450")
                    end
               end
     end
function

function("Hit")
     begin
          // this stopwatch avoid
          Macro.Reset stopwatch("FTO")
          while  Color.At coordinate is within (RGB range)("0", "255", "25", "5", "568", "27")
               begin
                    Macro.Read stopwatch("FTO", "Vfight")
                    if  Variable.Is greater than (Math)("Vfight", "40000")
                         begin
                              Macro.Reset stopwatch("FTO")
                              // dunno why, If I don't read the stopwatch here, TAB key is pressed infinitely ...
                              Macro.Read stopwatch("FTO", "Vfight")
                              Keyboard.Press key("{<TAB>}")
                              Macro.Pause("500")
                         end
                    Function.Execute("Aim")
                    Keyboard.Press key("1")
                    Macro.Pause("200")
                    Function.Execute("Heal")
                    Function.Execute("skill1")
                    Function.Execute("skill2")
                    Function.Execute("quit")
               end
     end
function

function("skill1")
     begin
          Macro.Read stopwatch("SWskill1", "Vskill1")
          if  Variable.Is greater than (Math)("Vskill1", "8050")
               begin
                    // maddly press "2" key :)
                    Keyboard.Press key("2")
                    Macro.Pause("200")
                    Keyboard.Press key("2")
                    Macro.Pause("200")
                    Keyboard.Press key("2")
                    Macro.Pause("200")
                    Macro.Reset stopwatch("SWskill1")
                    Macro.Read stopwatch("SWskill1", "Vskill1")
                    Function.Execute("Heal")
                    Keyboard.Press key("1")
                    Macro.Pause("300")
               end
     end
function

function("skill2")
     begin
          Macro.Read stopwatch("SWskill2", "Vskill2")
          if  Variable.Is greater than (Math)("Vskill2", "3050")
               begin
                    // maddly press "3" key :)
                    Keyboard.Press key("3")
                    Macro.Pause("200")
                    Keyboard.Press key("3")
                    Macro.Pause("200")
                    Keyboard.Press key("3")
                    Macro.Pause("200")
                    Macro.Reset stopwatch("SWskill2")
                    Macro.Read stopwatch("SWskill2", "Vskill2")
                    Function.Execute("Heal")
                    Keyboard.Press key("1")
                    Macro.Pause("300")
               end
     end
function

function("quit")
     begin
          if  Keyboard.Keys has been pressed within (ms)("Q", "10000")
               begin
                    Macro.Break from loop("no")
               end
     end
function
 


Later I plan to search the memory pointer adress for the "targeted monster" and send directly keys to the game so the bot will be able to run even with minimized game !


Top
 Profile  
Reply with quote  
 Post subject: Re: Not So Perfect Bot V1
Thanked: 0 time(s)  Unread post Posted: Tue Nov 15, 2011 11:13 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
Nicely done!

Thank you for sharing - its been a while since mine was updated as you can tell :)

Would be nice to see it brought to life again with some new memory pointers.

_________________
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: Not So Perfect Bot V1
Thanked: 0 time(s)  Unread post Posted: Tue Nov 15, 2011 11:44 pm 
Contributor
Contributor



Joined: Sun Jun 12, 2011 9:44 am
Posts: 76
Location: France
Been thanked: 4 time(s)
Has thanked: 1 time(s)
Contribution Points: 105
Thanks a lot :)
I play PWi with my wife, and I'm making a bot for her on her computer:
Her bot will be mostly for buff and heal my character with her character ^^
Maybe I'll post it here in a few days!


Top
 Profile  
Reply with quote  
 Post subject: Re: Not So Perfect Bot V1
Thanked: 0 time(s)  Unread post Posted: Wed Nov 16, 2011 6:44 am 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Mon Sep 26, 2011 9:38 am
Posts: 1703
Location: Space Australia
Been thanked: 78 time(s)
Has thanked: 6 time(s)
Contribution Points: 9994
Having your wife bot for your own benefit :roll: anyway i wouldnt call your bot a negative name like that it Nearly put me off.

_________________
ImageImageImageImage
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Not So Perfect Bot V1
Thanked: 0 time(s)  Unread post Posted: Wed Nov 16, 2011 2:20 pm 
VIP Contributor
VIP Contributor
User avatar



Joined: Wed Oct 12, 2011 12:46 am
Posts: 656
Location: Athens
Been thanked: 183 time(s)
Has thanked: 43 time(s)
Contribution Points: 13216
I see no problem with the name. It just means he would like to improve upon it. I actually found it kind of funny, because Gigus already posted his "Perfect bot" for PWI. :lol:

As long as it's not vulgar, I think users should be able to name their bots whatever they want :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Not So Perfect Bot V1
Thanked: 0 time(s)  Unread post Posted: Wed Nov 16, 2011 9:19 pm 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Mon Sep 26, 2011 9:38 am
Posts: 1703
Location: Space Australia
Been thanked: 78 time(s)
Has thanked: 6 time(s)
Contribution Points: 9994
Well it lowers expectations for tha bot but if he didnt change it and got the bot good unless people were in the know a large quantity of his audience would just skip him.

_________________
ImageImageImageImage
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Not So Perfect Bot V1
Thanked: 0 time(s)  Unread post Posted: Wed Nov 16, 2011 10:00 pm 
VIP Contributor
VIP Contributor
User avatar



Joined: Mon Sep 12, 2011 8:36 pm
Posts: 1307
Location: Steins;Gate
Been thanked: 91 time(s)
Has thanked: 0 time(s)
Contribution Points: 15369
The title can also be interpretative as a comedic twist, making people curious enough as to say "How is it 'not so perfect'?" and *click*, they're reading his thread. Plus in the past, people will admit it's their first time with BEM, etc. The users can sort themselves out from there and eventually, someone will try their macro out and leave a comment. I don't really see this as a problem with titles unless it's profanity / dirty to the extreme (and then I'll step in to make the change).

_________________
Image
Code:
> Meanwhile at Blue Eye Macro...
> BEM Video Games Department - Moderator, Coder, Debugger, Math/Physics & Algorithm Enthusiast - USA
Current Project: Mod Duty


Top
 Profile  
Reply with quote  
 Post subject: Re: Not So Perfect Bot V1
Thanked: 1 time(s)  Unread post Posted: Thu Nov 17, 2011 7:46 am 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Mon Sep 26, 2011 9:38 am
Posts: 1703
Location: Space Australia
Been thanked: 78 time(s)
Has thanked: 6 time(s)
Contribution Points: 9994
Theres no problem with the name it just doesnt portrait the full potential of the bot. But thats just my opinion but one way you could turn it around is at the end of the developmwnt cycle you could change the name to "not so perfect bot evolved into perfect bot" this would show both that you have improved and add a pokemon reference in for good measure.

_________________
ImageImageImageImage
Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Not So Perfect Bot V1
Thanked: 0 time(s)  Unread post Posted: Mon Nov 28, 2011 2:15 pm 
Contributor
Contributor



Joined: Sun Jun 12, 2011 9:44 am
Posts: 76
Location: France
Been thanked: 4 time(s)
Has thanked: 1 time(s)
Contribution Points: 105
You have philosophical discussions guys xD

That's just a tiny bot I made
And Yes It's just a counterfeit of Gigus' bot title :D

By the way, I have a problem with my bot.
I try to find the base pointer to know if a monster is targeted but I can't find it...

Here's part of Gigus code :

Code:
Variable.Set("maxHPMemoryAddress", "elementclient.exe+65BFCC,20,4b4")
Variable.Set("maxMPMemoryAddress", "elementclient.exe+65BFCC,20,4b8")
Variable.Set("hasTargetMemoryAddress", "elementclient.exe+65BFCC,20,1088,38")


Here's mine :

Code:
Variable.Set("totalHP", "elementclient.exe+729184,34,4D0")
Variable.Set("totalMP", "elementclient.exe+729184,34,490")
Variable.Set("target", "???")


Have you got any tips for me to find this "???" ?
CE drives me crazy :shock: :shock:


Top
 Profile  
Reply with quote  
 Post subject: Re: Not So Perfect Bot V1
Thanked: 0 time(s)  Unread post Posted: Mon Nov 28, 2011 9:22 pm 
Lifetime VIP Contributor
Lifetime VIP Contributor
User avatar



Joined: Mon Sep 26, 2011 9:38 am
Posts: 1703
Location: Space Australia
Been thanked: 78 time(s)
Has thanked: 6 time(s)
Contribution Points: 9994
I could help you a bit by saying your already half way there.

But now i have a question for you are those 4byte pointers if so the offsets should be.
Total hp 4D0
Total Mp = total hp + 4 = 4D4 current mp + 4 = 4D8 total mp.

Also from what i can see in gigus pointers the target pointer is in the same memory region as health so if you click browse this memory region and scroll down till you find target you will get one of the offsets.

_________________
ImageImageImageImage
Image


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ]  Go to page 1, 2  Next

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