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

Need some help on this script

Recommended Posts

Objects are fun..... lol

That was a good teaching lesson, I learnt from that as well, thanks W.

Share this post


Link to post
Share on other sites
On 4/21/2020 at 9:17 PM, ArcherRojas said:

Okay I think I get it now I was also reading about it on the help section of the program, I will try and then come back, also I'm working with a few objects based on a few posts I found in here.

 

 

Using Objects is a more advance  advance. But, it would make your script a lot better. because then you can have your script activate the Buff skill only when the game shows that the buff skill is no longer in effect. This would be much better than waiting for a certain time period to pass.

Share this post


Link to post
Share on other sites
Just now, The WABBIT said:

 

Using Objects is a more advance  advance. But, it would make your script a lot better. because then you can have your script activate the Buff skill only when the game shows that the buff skill is no longer in effect. This would be much better than waiting for a certain time period to pass.

I tried this usgin paodas object mapper so far right now I managed to map the HP and MP bars and make the script consume the potions but I havent managed to cast the buff this way I dont know what symbology use: <>,<,> or = so far I've tried  different than and equal but it keeps pressing the skill button

Share this post


Link to post
Share on other sites
59 minutes ago, ArcherRojas said:

I tried this usgin paodas object mapper so far right now I managed to map the HP and MP bars and make the script consume the potions but I havent managed to cast the buff this way I dont know what symbology use: <>,<,> or = so far I've tried  different than and equal but it keeps pressing the skill button

 

Show your code for the Object and the checking for the object. plz

We can't help your with your code if we don't see your script.

 

Share this post


Link to post
Share on other sites

Now the fun begins :)

This is where I enjoy playing with code, to get it to do what I want.

Share this post


Link to post
Share on other sites

So the code looks like this right now:

// This command adjusts how quickly, or slowly, AC Tool
// presses a key. The lower the number the quicker the
// key is pressed. The higher the number the slower the
// key is pressed.
//
// Adjust the number up to slow down the
// pressing of the keys until your game recognizes
// that the key has been pressed.
//
// NOTE: No matter what game you are playing.
// KeyRate show not be higher than 50, and
// even then that is way to slow.
KeyRate 10

// Set the game window as the active window
SetActiveWindow Granado Espada Andromida

Delay 2 sec



while 1 = 1
	
	//call buff
	// Call the Builder_Summoner_1 procedure
	call Builder_Summoner_3
	// Call the Builder_Summoner_2 procedure
	//call Builder_Summoner_2
	// Call the Buff procedure
end

Procedure Builder_Summoner_1 //builder/summoner 1
	keys w //cast skill 1
	delay 1 sec
	leftclick
	delay 3 sec
	keys e //cast skill 2
	delay 1 sec
	leftclick
	delay 3 sec
	call health
	delay 1 sec
	keys r //cast skill 3
	delay 1 sec
	leftclick
	delay 3 sec
	keys q //cast skill 4
	delay 3 sec
	keys z
	delay 1 sec
	leftclick
	delay 3 sec
end

Procedure Builder_Summoner_2 //use when 2 summoners are in
	keys w
	delay 1 sec
	leftclick 
	delay 3 sec
	keys e
	delay 1 sec
	leftclick 
	delay 3 sec
	keys r
	delay 1 sec
	leftclick 
	delay 3 sec
	keys q
	delay 1 sec
	keys s
	delay 1 sec
	leftclick 
	delay 3 sec
	keys d
	delay 1 sec
	leftclick 
	delay 3 sec
	keys f
	delay 1 sec
	leftclick 
	delay 3 sec
	keys a
	delay 3 sec
	keys z
	delay 1 sec
	leftclick 
	delay 3 sec
end

Procedure Builder_Summoner_3 //builder/summoner 1
	keys z //cast skill 1
	delay 1 sec
	leftclick
	delay 4 sec
end

Object hp_bar   // Test at coords 264, 611
228=0,0|228=2,0|228=4,0|228=6,0|228=8,0|228=10,0|228=12,0|228=14,0|228=16,0|228=18,0|228=20,0|228=22,0|228=24,0|213=26,0|171=28,0|110=30,0|
210=0,2|210=2,2|210=4,2|210=6,2|210=8,2|210=10,2|210=12,2|210=14,2|210=16,2|210=18,2|210=20,2|210=22,2|210=24,2|193=26,2|159=28,2|112=30,2|
203=0,4|203=2,4|201=4,4|201=6,4|203=8,4|203=10,4|203=12,4|201=14,4|203=16,4|203=18,4|203=20,4|201=22,4|201=24,4|181=26,4|148=28,4|113=30,4|
210=0,6|210=2,6|209=4,6|210=6,6|210=8,6|210=10,6|210=12,6|209=14,6|210=16,6|210=18,6|210=20,6|209=22,6|210=24,6|185=26,6|151=28,6|114=30,6|
25=0,8|25=2,8|25=4,8|25=6,8|25=8,8|25=10,8|25=12,8|25=14,8|25=16,8|25=18,8|25=20,8|25=22,8|25=24,8|25=26,8|25=28,8|25=30,8|
End Object



procedure consume_mp // mp Potion
	keys i 
	delay 1 sec
End

procedure health every 30 sec
if mp_bar is > 285,623
call consume_mp
end if
end

Object mp_bar   // Test at coords 285, 623
219=0,0|219=2,0|219=4,0|219=6,0|219=8,0|219=10,0|219=12,0|219=14,0|219=16,0|219=18,0|219=20,0|205=22,0|160=24,0|
193=0,2|193=2,2|193=4,2|193=6,2|193=8,2|193=10,2|193=12,2|193=14,2|193=16,2|193=18,2|193=20,2|178=22,2|147=24,2|
179=0,4|179=2,4|180=4,4|180=6,4|180=8,4|179=10,4|180=12,4|180=14,4|180=16,4|179=18,4|179=20,4|160=22,4|133=24,4|
End Object 


procedure buff // buff
if principal_buff is > 172,545
keys q
end if
end

Object principal_buff// Test at coords 172, 545
24=0,0|29=2,0|30=4,0|24=6,0|16=8,0|35=10,0|36=12,0|35=14,0|
24=0,2|26=2,2|26=4,2|21=6,2|23=8,2|24=10,2|26=12,2|23=14,2|
152=0,4|140=2,4|209=4,4|222=6,4|181=8,4|217=10,4|218=12,4|134=14,4|
130=0,6|147=2,6|255=4,6|255=6,6|170=8,6|255=10,6|255=12,6|192=14,6|
108=0,8|139=2,8|84=4,8|120=6,8|181=8,8|78=10,8|91=12,8|168=14,8|
89=0,10|148=2,10|255=4,10|255=6,10|56=8,10|255=10,10|255=12,10|222=14,10|
71=0,12|132=2,12|228=4,12|241=6,12|193=8,12|246=10,12|253=12,12|141=14,12|
54=0,14|182=2,14|210=4,14|205=6,14|182=8,14|210=10,14|213=12,14|151=14,14|
35=0,16|165=2,16|172=4,16|190=6,16|206=8,16|132=10,16|178=12,16|156=14,16|
End Object 

Right now I've managed to map the HP and MP bars using them succesfully and with no problem it consumes hp or mp if it find that the bar has changed, but I sitll have the same problem with the buff, as you can see on the image of the object mapper that I posted the buff icon is the one I created as object so my idea on the code is that every time the buff icon disappears due to time expiring it will press the "q" key wich is linked to the skill buff and cast the skill again, my problem is that if I use the code the way it is right now the script keeps spamming the "q" even with the buff icon appears on the character.

om.PNG

Share this post


Link to post
Share on other sites

Okay, three things:

  1. remove the word Object in all the End Object lines. It is not needed. But, if you need to have this. Add it as a comment like below.
    end // end object

     

  2. you do not use the IF statement to check for the objects. What you need to use, is the IsObject command. Look it up in the Help file.
  3. Remove the If in all the End If lines. It is not needed.  But, if you need to have this. Add it as a comment like below.
    end // end if

     

Share this post


Link to post
Share on other sites
2 minutes ago, The WABBIT said:

Okay, two things:

  1. remove the word Object in all the End Object lines. It is not needed.
  2. you do not use the IF statement to check for the objects. What you need to use, is the IsObject command. Look it up in the Help file.

Okay lemme check into the help file

Share this post


Link to post
Share on other sites

Okay so it looks like this

procedure buff // buff
IsObject principal_buff at 172,545
delay 4 min
else
keys q
end
end

Object principal_buff// Test at coords 172, 545
24=0,0|29=2,0|30=4,0|24=6,0|16=8,0|35=10,0|36=12,0|35=14,0|
24=0,2|26=2,2|26=4,2|21=6,2|23=8,2|24=10,2|26=12,2|23=14,2|
152=0,4|140=2,4|209=4,4|222=6,4|181=8,4|217=10,4|218=12,4|134=14,4|
130=0,6|147=2,6|255=4,6|255=6,6|170=8,6|255=10,6|255=12,6|192=14,6|
108=0,8|139=2,8|84=4,8|120=6,8|181=8,8|78=10,8|91=12,8|168=14,8|
89=0,10|148=2,10|255=4,10|255=6,10|56=8,10|255=10,10|255=12,10|222=14,10|
71=0,12|132=2,12|228=4,12|241=6,12|193=8,12|246=10,12|253=12,12|141=14,12|
54=0,14|182=2,14|210=4,14|205=6,14|182=8,14|210=10,14|213=12,14|151=14,14|
35=0,16|165=2,16|172=4,16|190=6,16|206=8,16|132=10,16|178=12,16|156=14,16|
End

 

Share this post


Link to post
Share on other sites

In the Object definition there should be a space between the Object's name and the comment right after it. Make sure that all your Objects have that space too.

Share this post


Link to post
Share on other sites
Object principal_buff// Test at coords 172, 545

24=0,0|29=2,0|30=4,0|24=6,0|16=8,0|35=10,0|36=12,0|35=14,0|
24=0,2|26=2,2|26=4,2|21=6,2|23=8,2|24=10,2|26=12,2|23=14,2|
152=0,4|140=2,4|209=4,4|222=6,4|181=8,4|217=10,4|218=12,4|134=14,4|
130=0,6|147=2,6|255=4,6|255=6,6|170=8,6|255=10,6|255=12,6|192=14,6|
108=0,8|139=2,8|84=4,8|120=6,8|181=8,8|78=10,8|91=12,8|168=14,8|
89=0,10|148=2,10|255=4,10|255=6,10|56=8,10|255=10,10|255=12,10|222=14,10|
71=0,12|132=2,12|228=4,12|241=6,12|193=8,12|246=10,12|253=12,12|141=14,12|
54=0,14|182=2,14|210=4,14|205=6,14|182=8,14|210=10,14|213=12,14|151=14,14|
35=0,16|165=2,16|172=4,16|190=6,16|206=8,16|132=10,16|178=12,16|156=14,16|
End

 

Like this?

Share this post


Link to post
Share on other sites
6 minutes ago, The WABBIT said:

like this


Object principal_buff // Test at coords 172, 545

oh okay I've modified this part and what about this part? it it okay to work it like this?

procedure buff // buff
IsObject principal_buff at 172,545
delay 4 min
else
keys q
end
end
Edited by ArcherRojas
update

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.