Jump to content
AC Tool Forums
Sign in to follow this  
orlando800

Object, wObject, CreateObject.

Recommended Posts

I'm on my laptop as my tower stopped working, has all my scripts on it. When I get it fixed, I can find a basic macro using object searching to upload for you to look at.

Share this post


Link to post
Share on other sites

This is a basic macro in a game that looks at the screen for an object called 100. When the code finds the object 100, moves to the next part of the code, which checks if the object 100 has gone. When the object 100 has gone, the code stops. As you can see the object 100 is 5 pixels by 5 pixels.

 

SetActiveWindow Earth & Beyond
delay 4 sec
ObjVar 3
call WaitForSector
//XXXXXXXXXXXXXXXXXXXXXXX  Wait For Sector  XXXXXXXXXXXXXXXXXXXXXXX
Procedure WaitForSector
  while 1 = 1
    IsObject 100 at 608, 795
      delay .2 sec
      Break
    Else
      Delay 1 sec
    End
  End
  while 1 = 1
    Delay 1 sec
    IsObject 100 at 608, 795
      Delay 1 sec
    Else
      Break
    End
  End
End
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Object 100  //  608, 795 Size: 5, 5  width x height
  66=0,0|241=2,0|93=4,0
  47=0,2|120=2,2|84=4,2
  24=0,4|109=2,4|71=4,4
End
//XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Share this post


Link to post
Share on other sites

with these basic code commands, everything is clear. But with the team
objloadwindow TRUE/FALSE nothing is clear. do you have any examples of writing code with it? And Examples of writing code with The list command?
ListAdd, ListAssign, ListClear, ListCount, ListDelete, ListFind, ListIndex, ListLoad, ListSave, ListSortOff, ListSortOn, ListToString.
Example of writing code with these commands?

 

Share this post


Link to post
Share on other sites
10 hours ago, orlando800 said:

And Examples of writing code with The list command?
ListAdd, ListAssign, ListClear, ListCount, ListDelete, ListFind, ListIndex, ListLoad, ListSave, ListSortOff, ListSortOn, ListToString.
Example of writing code with these commands?

Each of those List commands as shown in the Help file has example code on how to use each and every one of them. So, you do not need example code. You just need to go and use them to learn the use of those commands.

Share this post


Link to post
Share on other sites
10 hours ago, orlando800 said:

with these basic code commands, everything is clear. But with the team
objloadwindow TRUE/FALSE nothing is clear. do you have any examples of writing code with it?

Do not use this command, as I had already told you. It is not needed for what you are doing.

Share this post


Link to post
Share on other sites

clearly, i'm experimenting on my own. If you have any questions, I will write. Thank you for your answers. Can you tell me which programming language is close to writing AC Tool scripts?

Edited by orlando800

Share this post


Link to post
Share on other sites

Threw this code together a few minutes ago. cursor runs across the screen and then down.

I will use this myself as a starter for finding mobs etc on screen.

Not sure if it is what you are looking for, but, better than nothing. Good luck with it.

Would like to see your final macro when you are finished with it, to add to my collection.

constants
  TempLeftPos = 0
  TempTopPos  = 0
  TLeftPos    = 0
  TTopPos     = 0
end

set TempTopPos = {WindowTop}
set TempLeftPos = {WindowLeft}
compute TTopPos = $TempTopPos + 200
compute TLeftPos = $TempLeftPos + 100
loop 7
  loop 15
    compute TLeftPos = $TLeftPos + 100
    mousepos $TLeftPos, $TTopPos // shows where cursor is.
    delay .05 sec
  End
  set TLeftPos = {WindowLeft}
  compute TTopPos = $TTopPos + 55
  set TempTopPos = $TTopPos
End

Share this post


Link to post
Share on other sites
On 12/23/2020 at 9:26 AM, Ego said:

Threw this code together a few minutes ago. cursor runs across the screen and then down.

I will use this myself as a starter for finding mobs etc on screen.

Not sure if it is what you are looking for, but, better than nothing. Good luck with it.

Would like to see your final macro when you are finished with it, to add to my collection.

constants
  TempLeftPos = 0
  TempTopPos  = 0
  TLeftPos    = 0
  TTopPos     = 0
end

set TempTopPos = {WindowTop}
set TempLeftPos = {WindowLeft}
compute TTopPos = $TempTopPos + 200
compute TLeftPos = $TempLeftPos + 100
loop 7
  loop 15
    compute TLeftPos = $TLeftPos + 100
    mousepos $TLeftPos, $TTopPos // shows where cursor is.
    delay .05 sec
  End
  set TLeftPos = {WindowLeft}
  compute TTopPos = $TTopPos + 55
  set TempTopPos = $TTopPos
End

Thanks. I got the script, I'll try it in action.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and to our Privacy Policy.