Jump to content
  • Sign Up
Sign in to follow this  
ArcherRojas

Need some help

Recommended Posts

So hello im new to this ac tool thing im actually looking to make some basic funciton macro for granado espada

as far as Ive alrady try i got this working for me

 

While 1=1
  keys {space}
  delay 100
  keydown @{q} //jack char 3
  leftclick
  delay 1000
  keydown @{w}
  leftclick
  delay 1000
  keydown @{e}
  leftclick
  delay 1000
  keydown @{r}
  leftclick
  delay 1000
  keydown @{t}
  leftclick
  delay 1000
  keydown @{u}
  keydown @{u}
  keydown @{u}
  keydown @{u}
  keydown @{i}
  keydown @{i}
  keydown @{i}
  keydown @{i}
  keydown @{m}
  keydown @{m}
   keydown @{m}
  keydown @{m}
   keydown @{j}
  keydown @{j}
   keydown @{j}
  keydown @{j}
  delay 3000
  keydown @{A}//principal
  delay 2000
  keydown @{n}
  delay 2000
  keydown @{x}
  delay 500
   //jack char 3
end
 
 
but this only a part i would really appreciate your help on telling me how can i make differente procedures on a loop
i have already tried the function thing but its not working i made this script as well but this ona was a total failure
 
 
SetActiveWindow Renaissance
 
Procedure Jack_AC
while 1=1
keydown @{q}
delay 2000
LeftClick
delay 2000
keydown @{w}
delay 2000
LeftClick
delay 2000
keydown @{e}
delay 2000
LeftClick
delay 2000
keydown @{r}
delay 2000
LeftClick
delay 2000
keydown @{t}
delay 2000
LeftClick
delay 2000
 
end
end
 
Procedure Auto_ET
while 1=1
keydown @{a}
delay 300000
end
end
 
Procedure Personal_skill
while 1=1
keydown @{y}
delay 300000
end
end
 
Procedure Auto_Pot_HP
while 1=1
keydown @{u}//HP POT
delay 1000
keydown @{j}//HP POT
delay 1000
keydown @{m}//HP POT
delay 1000
end
end
 
Procedure Auto_Mana
while 1=1
keydown @{i}
delay 1000
keydown @{k}
delay 1000
end
end
 
 
call Jack_AC
call Auto_Mana
call Auto_Pot_HP
call Auto_ETc
call Personal_skill
 

 

Share this post


Link to post
Share on other sites

It is good that you are trying to learn to code with AC Tool. And it is even better that you have posted your code for us to help you fix the problems.

 

  1. You are using KeyDown incorrectly. The KeyDown is used to hold a single key, with Shift/Ctrl/Alt key if needed, down for a certain length of time. Plus you would need to add a time value to the end to say how long you want the key to be pressed for.  So instead of KeyDown @{w} it should be KeyDown @w 500. This will hold down the Shift+w key for 500 milliseconds.
  2. You do not need to surround the keys that you are sending to the game with '{' '}'. Only special keys, as listed in the Help file, need to have '{' '}' surrounding them, as shown in the help file. Unless the game you are playing requires you to press '{' prior to, and the '}' after, pressing the w key. There is no need for it.
  3. Instead of using the KeyDown you should use the Keys command.  This is more for what you seem to be doing in your script.  example: Keys @w
  4. The reason your second script failed is because you are placing the code of each procedure withing a While 1=1 statement block. Because of that, when you execute the first procedure. it will continue to execute that code only. And will never stop until you stop AC Tool from running the script.  My suggestion is this:
  • Either remove the While 1=1 and the corresponding end statements. And this will allow you to run each procedure in turn.
  • Or put within each While 1=1 statement block a  condition to check to see when it is time to stop executing this code. And then use the Break command to break out of the While 1=1 statement block.
  • The condition can be a If statement block for how many times to execute the code, the checking for a specific color pixel on the screen (by IsRed, or other IsColor statements), or checking for a Object on the screen. On the condition is found the Break statement well cause you to exit the While 1=1 statement block and continue with the script.

Share this post


Link to post
Share on other sites

 

 

It is good that you are trying to learn to code with AC Tool. And it is even better that you have posted your code for us to help you fix the problems.

  • You are using KeyDown incorrectly. The KeyDown is used to hold a single key, with Shift/Ctrl/Alt key if needed, down for a certain length of time. Plus you would need to add a time value to the end to say how long you want the key to be pressed for. So instead of KeyDown @{w} it should be KeyDown @w 500. This will hold down the Shift+w key for 500 milliseconds.
  • You do not need to surround the keys that you are sending to the game with '{' '}'. Only special keys, as listed in the Help file, need to have '{' '}' surrounding them, as shown in the help file. Unless the game you are playing requires you to press '{' prior to, and the '}' after, pressing the w key. There is no need for it.
  • Instead of using the KeyDown you should use the Keys command. This is more for what you seem to be doing in your script. example: Keys @w
  • The reason your second script failed is because you are placing the code of each procedure withing a While 1=1 statement block. Because of that, when you execute the first procedure. it will continue to execute that code only. And will never stop until you stop AC Tool from running the script. My suggestion is this:
  • Either remove the While 1=1 and the corresponding end statements. And this will allow you to run each procedure in turn.
  • Or put within each While 1=1 statement block a condition to check to see when it is time to stop executing this code. And then use the Break command to break out of the While 1=1 statement block.
  • The condition can be a If statement block for how many times to execute the code, the checking for a specific color pixel on the screen (by IsRed, or other IsColor statements), or checking for a Object on the screen. On the condition is found the Break statement well cause you to exit the While 1=1 statement block and continue with the script.

Thanks a lot for the quick reply me wabbit so I have one more doubt before I rewrite my second code is can I put all the calls in a while statement? I need them to run on an infinite loop..

 

 

So here is an update i have tried the keys command and well for a certaiin reason the game doesnt recognize the key stroke only with keydown command

Share this post


Link to post
Share on other sites

Until you have check conditions in each of the infinite loops, to know when it is time to stop executing the current code, NO.

Share this post


Link to post
Share on other sites

Until you have check conditions in each of the infinite loops, to know when it is time to stop executing the current code, NO.

Okay I'm redoing the code once again the main idea is to spam the keys in the next order:

 

For the first character I need to spawn+CLICK:

Q,E,R,T

And use the keys U,I to consume HP & MP potions

Wich is most likely what I'm planning to use the macro

 

I assume that I can make a function or procedure to spam the first series of keys something like:

 

Procedure builder

Keys q

Delay 800

Leftclick

Delay 800

....

 

And then I'm not sure if I can do something like another procedure on a IF statement so I can consume the option on a certain porcentage I think I saw a code Like than on the forum

 

Update: I found the code is something like this

 

While 1 = 1

IsGreen 245, 588

Keys {F9}

End

delay 100

End

Share this post


Link to post
Share on other sites

while 1 = 1

MousePos 640, 746

delay $timer2 sec

isobject outwarp at 649, 733

break

End

End

 

Need a break command because your code you found above finds green it will press F9 over and over.

 

You want to spam Q, E, R and T keys in that order?

Any time period?

Anything the code needs to wait for before pressing the next key?

 

And use the keys U and I to consume HP & MP potions when something gets low, a health bar and mana bar?

 

Just trying to get an idea on what you trying to do.

And we can see English is not your first language, but we can work around that :)

 

The code below will call q, e, r and t keys, then call health looking for red at the mouse position if red do nothing, if no red f8,

same with mana and green no nothing if no green press f9.

 

Call keys

procedure keys

while 1 = 1

keys q

delay .2 sec

keys e

delay .2 sec

keys r

delay .2 sec

keys t

delay .2 sec

call health

call mana

End

End

procedure health

delay .2 sec

IsRed 250, 500

else

Keys {F8}

delay 1 sec

End

End

procedure mana

delay .2 sec

IsGreen 270, 500

else

Keys {F9}

delay 1 sec

End

End

Share this post


Link to post
Share on other sites

while 1 = 1

MousePos 640, 746

delay $timer2 sec

isobject outwarp at 649, 733

break

End

End

 

Need a break command because your code you found above finds green it will press F9 over and over.

 

You want to spam Q, E, R and T keys in that order?

Any time period?

Anything the code needs to wait for before pressing the next key?

 

And use the keys U and I to consume HP & MP potions when something gets low, a health bar and mana bar?

 

Just trying to get an idea on what you trying to do.

And we can see English is not your first language, but we can work around that :)

 

The code below will call q, e, r and t keys, then call health looking for red at the mouse position if red do nothing, if no red f8,

same with mana and green no nothing if no green press f9.

 

Call keys

procedure keys

while 1 = 1

keys q

delay .2 sec

keys e

delay .2 sec

keys r

delay .2 sec

keys t

delay .2 sec

call health

call mana

End

End

procedure health

delay .2 sec

IsRed 250, 500

else

Keys {F8}

delay 1 sec

End

End

procedure mana

delay .2 sec

IsGreen 270, 500

else

Keys {F9}

delay 1 sec

End

End

First of all thanks for the reply Mr.Ego, my english is not the best I know haha as you can see it is not my primary language, anyway I will answer the questions on the same order you made em.

 

You want to spam Q, E, R and T keys in that order?

-yes the idea is to spam keys in that order and after the key is pressed click on a certain postion of the screen I already manage to solve that using the "LeftClick" and leaving the mouse pointer on the spot i want the char to spam the skills that are linked to the keys.

Any time period?

-yes the skills have a time period, given the fact that the character is a builder/summoner one all the "summons" have certain amount of hp but those summons can be killed very fast so I want to spam the key+click every 3 seconds in a loop so the character can keep building/summoning when one of those summons is killed.

 

Anything the code needs to wait for before pressing the next key?

-only for the game window to be active

 

And use the keys U and I to consume HP & MP potions when something gets low, a health bar and mana bar?

-yes the use of the keys U and I to consume the potions is for the health bar (red) and mana bar (blue)

 

I will try the code that you provided me when I get out of work and let you know the results, also i have some questions about the delay time I understand that the delay is in miliseconds but I can see that you use something like "delay .2 sec" if I change it to "delay 2 sec" this will spam the keystrokes every 2 seconds? also the game for a unknown reason it does not recognize the F1,F2, etc. keys

 

 

here is an example of the ui

p1_91205062341357.jpg

 

 

So here is another update, I read somewhere on the forum that AC Tool did not work for this game, but I've been testing the program on the game and it works.

Edited by ArcherRojas

Share this post


Link to post
Share on other sites

what games is this? That way I or someone else, well I hope that someone else, can test AC Tool with it to see what problems AC Tools has with the game. But as is, AC Tool should work with about 95 to 98% of the games out there as it is.

 

as for another update for AC Tools. No, there will not be another update to it. I have been working on the next version of AC Tool, that I have code named Divide. It is currently in Beta testing, although it does not seem to be being tested.

 

As for the F keys, are they the only keys that are not working with the game? or Is there other keys not working too? F keys are a special key in AC Tool. So you need to use Keys {F1}, Keys {F2}, etc. to send them. If the game is still not getting them, then try the sKeys alternate to Keys.

 

sKeys {F1}       is the same as the      Keys {F1}

sKeys {F2}       is the same as the      Keys {F2}

sKeys a            is the same as the      Keys a

sKeys b            is the same as the      Keys b

 

 

The difference between the two is the sKeys uses a different way to send the keys to the game. Some games will not receive keys, or mouse, input from the standard ways. Instead they require the keys, or mouse, input to be received by another means. Keys uses the standard way of receiving the keys, or mouse, input. The sKeys uses the other means that many games now require.

 

So, give the sKeys a try it might work better for your game.

Share this post


Link to post
Share on other sites

what games is this? That way I or someone else, well I hope that someone else, can test AC Tool with it to see what problems AC Tools has with the game. But as is, AC Tool should work with about 95 to 98% of the games out there as it is.

 

as for another update for AC Tools. No, there will not be another update to it. I have been working on the next version of AC Tool, that I have code named Divide. It is currently in Beta testing, although it does not seem to be being tested.

 

As for the F keys, are they the only keys that are not working with the game? or Is there other keys not working too? F keys are a special key in AC Tool. So you need to use Keys {F1}, Keys {F2}, etc. to send them. If the game is still not getting them, then try the sKeys alternate to Keys.

 

sKeys {F1}       is the same as the      Keys {F1}

sKeys {F2}       is the same as the      Keys {F2}

sKeys a            is the same as the      Keys a

sKeys b            is the same as the      Keys b

 

 

The difference between the two is the sKeys uses a different way to send the keys to the game. Some games will not receive keys, or mouse, input from the standard ways. Instead they require the keys, or mouse, input to be received by another means. Keys uses the standard way of receiving the keys, or mouse, input. The sKeys uses the other means that many games now require.

 

So, give the sKeys a try it might work better for your game.

 

Sorry Mr. Wabbit I didnt explain myself quite well I'm not looking for newest updates of AC Tool, I dont really know what version I'm using but it works amazing, the game is called "Granado Espada" but its a private server version I will leave the link of the game here its free to play you only need to create an account https://roguege.com/info/downloads, as far as I've been testing the only ones not working for me right now are the F keys haven't tested other special keys since I have no need to use them, but when I get home I will test the other special keys and report what happens, what I did saw yesterday is that if you use the "KEYS" command it takes a little while for the game to recognize the keys , but if I use the "KEYDOWN" command the game recognize the keys faster.

 

 

 

Also I have tried  the special keys : ESC, F keys, Num keys dont work on the game

Share this post


Link to post
Share on other sites

So again here I am, I've  been doing some work and I managed to make a working script that work pretty much the way I wanted:

 

SetActiveWindow Renaissance
Procedure 1 //builder/summoner 1
  keys {space}
  delay 1 sec
  keydown @{a}
  leftclick
  delay 2 sec
  keydown @{s}
  leftclick
  delay 2 sec
  keydown @{d}
  leftclick
  delay 2 sec
  keydown @{f}
  leftclick
  delay 2 sec
  keydown @{g}
  leftclick
  delay 1 sec
end
Procedure 2 // builder/summoner 2
  keys {space}
  delay 1 sec
  keydown @{z}
  leftclick
  delay 2 sec
  keydown @{x}
  leftclick
  delay 2 sec
  keydown @{c}
  leftclick
  delay 2 sec
  keydown @{v}
  leftclick
  delay 2 sec
  keydown @{b}
  leftclick
  delay 1 sec
end  
Procedure 3 // buffer
  keys {space}
  delay 1 sec
  keydown @{Q}
  //leftclick
  ///delay 2 sec
  //keydown @{W}
  //leftclick
  //delay 2 sec
  //keydown @{E}
  //leftclick
  //delay 2 sec
  //keydown @{R}
  //leftclick
  //delay 2 sec
  //keydown @{T}
  //leftclick
  delay 1 sec
end  
procedure 4 // Hp Potion
Keydown @{u}
Keydown @{j}
Keydown @{u}
Keydown @{j}
Keydown @{u}
Keydown @{j}
delay 1 sec
End
procedure 5 // Mp Potion
Keydown @{i}
Keydown @{k}
Keydown @{i}
Keydown @{k}
Keydown @{i}
Keydown @{k}
delay 1 sec
End
  while 1 = 1
call 3
call 1
call 5
call 4
call 2
call 4
call 5
end
 

 

As you can see I still use the keydown code, because for a reason unknown for me this one works faster than the skeys or keys commands, I tried the code given here with the color commands doesnt actually work on the game maybe I'm using them incorrectly but I have managed to make a fully working script.

Share this post


Link to post
Share on other sites

Good on you.

Only thing I can suggest for your last two is a loop, just to shorten the code a little.

Apart from playing the game and coding what you are doing. A good go at making a macro.

 

procedure 4 // Hp Potion

Loop 3

Keydown @{u}

Keydown @{j}

End

delay 1 sec

End

procedure 5 // Mp Potion

Loop 3

Keydown @{i}

Keydown @{k}

End

delay 1 sec

End

Share this post


Link to post
Share on other sites

Good on you.

Only thing I can suggest for your last two is a loop, just to shorten the code a little.

Apart from playing the game and coding what you are doing. A good go at making a macro.

 

procedure 4 // Hp Potion

Loop 3

Keydown @{u}

Keydown @{j}

End

delay 1 sec

End

procedure 5 // Mp Potion

Loop 3

Keydown @{i}

Keydown @{k}

End

delay 1 sec

End

Thanks Mr Ego I have tested the code and works fine, by the way I need some advice in the game there's and inventory and the limit is 400/400 is there a way so I can map this so I can link it to a certain action? Like sending a notification let's say opening another program like WhatsApp to send me a notification or a mail

Share this post


Link to post
Share on other sites

If you can open inventory and it can show the last inventory spot. When it is full

iscolor x, y

MAILTO person@someplace.net

end

 

You might be able to use [MAILTO person@someplace.net]. I have never used it so cannot say if it works.

 

Look at mail in help screen.

Share this post


Link to post
Share on other sites

If you can open inventory and it can show the last inventory spot. When it is full

iscolor x, y

MAILTO person@someplace.net

end

 

You might be able to use [MAILTO person@someplace.net]. I have never used it so cannot say if it works.

 

Look at mail in help screen.

okay so lets just say here is the inventory

elelord_boss.jpg

as you can see on the right side of the window there is the inventory  and it haves 194/248 i dont think it show the last spot it basically start filling the inventory until you reach the limit, when you  fill your inventory to the top a window appears at the center of the game so maybe i could map to the window that action also I'm assuming that the x,y coords are the same that you with the CTRL+M command for the mouse pos ¿? after that i gues the while code would end up like this:

 

  while 1 = 1

if iscolor x, y //the full inventory notice window

MAILTO person@someplace.net

end

else

call 3

call 1

call 5

call 4

call 2

call 4

call 5

end

 

 

or something like this I guess

Share this post


Link to post
Share on other sites

you are getting there, if iscolor doesn't work, you could try isobject at x, y

 

In the macro below,

 

Change line 1 [game name] to game name.

Change lines 5 and 7 [name] to your chosen name.

Change line 9 to where you want the object code to be stored [C:\objects\] and change [name] to same as lines 5 and 7.

Change lines 11 and 12 [position] to x and y coords

Change lines 14 and 15 to the size of the object you want.

 

Run.

 

 

object maker.zip

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...