Auto Defense

11/05/2009 15:35 cloudkiller2006#16
do you have auto-combat on?
11/05/2009 18:26 Infamy^^#17
It's an AI. I think he's _supposed_ to have auto-combat on.
11/05/2009 20:34 cloudkiller2006#18
o yea xD forgot

all ai's have that as bug, they can't load the skill -> they attack
11/05/2009 20:49 Kefkai#19
Quote:
Originally Posted by princealtiar View Post
My character still attacked back :/
I just used something simple for my script in autohotkey since when I was writing mine back when I was doing my mastery, where F1 was my defense key, F4 was HP potions and F5 was Stamina Potions (using the attach items to hotkey option in the options menu). It's really gross code but at the time I didn't want to try any image searches or anything since it didn't seem worth my time.

Code:
while , 1 == 1
{
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100	
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100	
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 100
	Send, {F1}
	Sleep, 500
	Send, {F4}
	Sleep, 100
	Send, {F4}
	Sleep, 100
	Send, {F5}
	Sleep, 100
	Send, {F5}
	Sleep, 100
	Send, {F5}
	Sleep, 500
	
}
11/06/2009 00:13 Infamy^^#20
^ so you mean...
Code:
Loop
{
Loop, 50
{
Send, {F1}
Sleep, 100
}
Send, {F4}
Sleep, 100
Send, {F4}
Sleep, 100
Send, {F5}
Sleep, 100
Send, {F5}
Sleep, 100
}
11/06/2009 00:48 lostmage333#21
Na, using loops like that makes no sense. Why would you do it the easy way using less code? Geez -_-
11/06/2009 02:47 princealtiar#22
ima mess around with image search and see if i can get it to auto pot and stuff.
11/06/2009 05:51 princealtiar#23
i cant get it to start? >>;
11/06/2009 06:38 Kefkai#24
Quote:
Originally Posted by Infamy^^ View Post
^ so you mean...
Code:
Loop
{
Loop, 50
{
Send, {F1}
Sleep, 100
}
Send, {F4}
Sleep, 100
Send, {F4}
Sleep, 100
Send, {F5}
Sleep, 100
Send, {F5}
Sleep, 100
}
I did it like half a year ago when I wasn't playing mabi as much (also made a simple firework box bot like that too), as I said the code was messy, if I actually cared I would have added more functionality to it. Bots are fun but I just didn't have the time or care to learn the syntax originally I actually used a counter for it and then just gave up because it wouldn't detect some of the commands a lot of the time so I just made it spam them so that they were recognizable.
11/06/2009 12:29 princealtiar#25
whats the key i have to press to start it?


Edit: i got it to work,with some copying and pasting lol. It just gets cut short half way thro
11/06/2009 20:51 Dark Raccoon#26
Quote:
Originally Posted by Kefkai View Post
I did it like half a year ago when I wasn't playing mabi as much (also made a simple firework box bot like that too), as I said the code was messy, if I actually cared I would have added more functionality to it. Bots are fun but I just didn't have the time or care to learn the syntax originally I actually used a counter for it and then just gave up because it wouldn't detect some of the commands a lot of the time so I just made it spam them so that they were recognizable.
I cant believe thats one single sentence.
11/06/2009 21:00 Kefkai#27
Quote:
Originally Posted by Dark Raccoon View Post
I cant believe thats one single sentence.
Only the second half of it, I think I wrote it when I was tired last night, atleast I didn't comma splice it several times, almost like this sentence.
11/06/2009 22:08 princealtiar#28
lol wow xD

i got it working,but it didnt do the heal or stam pot :/

thanks neways,i got it looping. Should i post it?
11/07/2009 04:20 uniquemabi#29
Quote:
Originally Posted by lostmage333 View Post
You could just write a script...

Code:
F1::
Loop
{
Send s
Sleep 100
}
return
That'll do in (in autohotkey) if s is your defense key.
uhhh ok sooo? where do you put this code? lul im so confused (is it in a notepad?) :O if it is ima b pissed
11/07/2009 07:05 Dark Raccoon#30
Quote:
Originally Posted by uniquemabi View Post
uhhh ok sooo? where do you put this code? lul im so confused (is it in a notepad?) :O if it is ima b pissed
Its AHK.

People on here sadly dont bother compiling the finished Script into .exe-Files, so you have to do it yourself.