AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Making a script for MuOnline game....
Goto page 1, 2  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
BliND123



Joined: 02 Jul 2007
Posts: 19

PostPosted: Mon Jul 02, 2007 3:48 pm    Post subject: Making a script for MuOnline game.... Reply with quote

Hey, I have been using this other hotkey program to use in this game called MuOnline. It is really simple and it sort of works. I made two hotkeys on it for one to hold right until I press right again to do a skill in the game and another that is supposed to do a combo but it doesn't want to work. So now I heard about this program AutoHotkey and was wanting to see if I could get it working with this one but don't really understand how to use this.

I was trying to make a hotkey Ctrl+Shift+Z to hold the right mouse button until I press right mouse again. And then Ctrl+Shift+X to hold right mouse button and press 1, 2, 3, and 4 to go through the skills the character has when attacking. But with this I can't even figure out the simple hold right mouse Razz. And I am not sure why it was not working in the other program because if I press the chat button before my combo hotkey to test if its really typing the buttons I can see it is putting 1234 buttons. So I don't know...maybe it is using the buttons on the keypad which do not do anything in the game, I have the use the #s above the letters.


Last edited by BliND123 on Wed Jul 04, 2007 10:40 pm; edited 1 time in total
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Mon Jul 02, 2007 3:52 pm    Post subject: Reply with quote

the command to hold down the right mouse button is
Code:

Send {RButton, Down}
;or
Click, right, down



really, someone needs to make a tutorial just for games, so that I can just link to that.
_________________

(Common Answers)
Back to top
View user's profile Send private message Visit poster's website
BliND123



Joined: 02 Jul 2007
Posts: 19

PostPosted: Mon Jul 02, 2007 4:41 pm    Post subject: Reply with quote

I thought I was doing something wrong but its that Send {RButton. Down} that isn't working for me. So I am using the Click one which is working but with the first hotkey the Right mouse button doesn't stop with Click, Right, Up?

Code:

;
;MuOnline Combo and Skill Hotkey
;By: BliNDFury
;
XButton2::
Sendinput {1 Down}
Click, Right, Down
{
Sendinput {1 Down}
Sleep 100
Sendinput {1 Up}
Sleep 100
Sendinput {2 Down}
Sleep 100
Sendinput {2 Up}
Sleep 100
Sendinput {3 Down}
Sleep 100
Sendinput {3 Up}
Sleep 100
Sendinput {4 Down}
Sleep 100
Sendinput {4 Up}
Sleep 100
}
Click, Right, Up

XButton1::
Click, Right, Down


So what should I change for it to stop once it does the combo once? Now I just need to just get the timing right Very Happy.
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Mon Jul 02, 2007 4:43 pm    Post subject: Reply with quote

i shouldn't have had the comma in Send, {Rbutton down} - my mistake

Code:

;MuOnline Combo and Skill Hotkey
;By: BliNDFury
;
XButton2::
Sendinput {1 Down}
Click, Right, Down
;{   why {?
Sendinput {1 Down}
Sleep 100
Sendinput {1 Up}
Sleep 100
Sendinput {2 Down}
Sleep 100
Sendinput {2 Up}
Sleep 100
Sendinput {3 Down}
Sleep 100
Sendinput {3 Up}
Sleep 100
Sendinput {4 Down}
Sleep 100
Sendinput {4 Up}
Sleep 100
;}   why }?
Click, Right, Up
return


XButton1::
Click, Right, Down

return


Edit: Me, of all people, forgetting code tags! Sheesh.
_________________

(Common Answers)


Last edited by engunneer on Mon Jul 02, 2007 6:02 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Guest






PostPosted: Mon Jul 02, 2007 5:56 pm    Post subject: Reply with quote

Thank you.

Got the combo timed pretty good now.

Code:

;MuOnline Combo and Skill Hotkey
;By: BliNDFury
;
XButton2::
Sendinput {1 Down}
Click, Right, Down
Sleep 1000
;{ why {?
Sendinput {1 Down}
Sleep 20
Sendinput {1 Up}
Sleep 20
Sendinput {2 Down}
Sleep 20
Sendinput {2 Up}
Sleep 20
Sendinput {3 Down}
Sleep 20
Sendinput {3 Up}
Sleep 20
Sendinput {4 Down}
Sleep 20
Sendinput {4 Up}
Sleep 20
;} why }?
Click, Right, Up
Return


XButton1::
Sendinput {3 Down}
Click, Right, Down
Return
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Mon Jul 02, 2007 6:02 pm    Post subject: Reply with quote

since you are using the same sleep between all the kes, you can use SetKeyDelay, then string all the commands into one Send Line.
_________________

(Common Answers)
Back to top
View user's profile Send private message Visit poster's website
BliND123



Joined: 02 Jul 2007
Posts: 19

PostPosted: Mon Jul 02, 2007 6:16 pm    Post subject: Reply with quote

Actually I think I might mess with the timing a little more since the skills aren't all the same speed in the game I will have to set the speed differently. But right now the combo is working about 80% of the time the way it is.
Back to top
View user's profile Send private message
BliND123



Joined: 02 Jul 2007
Posts: 19

PostPosted: Wed Jul 04, 2007 5:59 pm    Post subject: Reply with quote

Hey, I've been changing it around and adding stuff and was wondering if there was anything obviously wrong here? And that last one on my script the Auto Add Health, the way I have it it should press Q 30 times, or is that wrong?

And I am having some problem with AutoHotkey....All of a sudden I can't run or compile any of my scripts I was trying without it crashing. I just tried to uninstall/reinstall it but the same thing is happening. Did I compile too many times? Razz

Edit: In Ahk2Exe it crashes when it says "Auto including any functions called from a library..."



Code:
;MuOnline Combo and Skill Hotkey
;By: BliNDFury
;

;Quick Combo Attack
*XButton2::
Click, Right, Down
Sleep 30
Sendinput, {1 Down}{Sleep 2}
Sendinput, {2 Down}{Sleep 2}
Sendinput, {3 Down}{Sleep 2}
Sendinput, {4 Down}{Sleep 2}
Sleep 5
Sendinput, {1 Up}
Sleep 5
Sendinput, {2 Up}
Sleep 5
Sendinput, {3 Up}
Sleep 5
Sendinput, {4 Up}
Sleep 5
Click, Right, Up
Sleep 5
Sendinput, {1 Down}
Sleep 50
Sendinput, {1 Up}
Return

;Auto Twisting Slash Skill
XButton1::
Sendinput, {3 Down}
Sendinput, {3 Up}
Click, Right, Down
Return

;Auto Add  Health
+Z::
Sendinput, {Q Down}
Sendinput, {Q Up}
Loop 30
Back to top
View user's profile Send private message
Sukarn



Joined: 16 Jun 2007
Posts: 35

PostPosted: Wed Jul 04, 2007 8:01 pm    Post subject: Reply with quote

BliND123 wrote:

Code:
;Auto Add  Health
+Z::
Sendinput, {Q Down}
Sendinput, {Q Up}
Loop 30


Make that
Code:

;Auto Add  Health
+Z::
Loop 30
{
SendInput, Q
}

But wouldn't this just send "Q" 30 times in a row?
Back to top
View user's profile Send private message
BliND123



Joined: 02 Jul 2007
Posts: 19

PostPosted: Wed Jul 04, 2007 8:29 pm    Post subject: Reply with quote

Yeah. It needs a lot of health after this power up skill which just takes too long when having to press Q 30 times and do the combo skill and attack another player at the same time Smile. But I am not sure I will be able to use it anymore, can't run the ahk file or compile it without getting that error every time. Uninstalling and reinstalling doesn't fix it Sad. So now I am trying to learn how to use Autoit and do the same over there.

Edit: I found a way I can still run my scripts but I am currently only able to use the ahk it automatically created in My Documents when I opened AutoHotkey. So it works now, sorta, but I would really like to be able to Compile this into an .exe file.
Back to top
View user's profile Send private message
BliND123



Joined: 02 Jul 2007
Posts: 19

PostPosted: Fri Jul 13, 2007 12:34 am    Post subject: Reply with quote

I changed it some more and now need some help with something I've been noticing. I have noticed that even after I close the script the mouse is acting weird....double clicking when I only click once and stuff or as I am dragging something its clicking. So I was trying to make it only work in Mu but I am not sure how to do that, but from what I read I added that part from IfWinExist to WinActivate. Can someone help me to get this to work ONLY inside Mu?

Code:

;MuOnline Combo and Skill Hotkey
;By: BliNDFury
;

IfWinExist Mu
{
    WinActivate
}
else
{
    WinWait Mu
    WinActivate
}


;Auto Skill Attack
XButton1::
Sendinput, {3 Down}
Sendinput, {3 Up}
Click, Right, Down
Return


;Quick Combo Attack
XButton2::
Click, Right, Down
Sleep 30
Sendinput, {1 Down}{Sleep 2}
Sendinput, {2 Down}{Sleep 2}
Sendinput, {3 Down}{Sleep 2}
Sendinput, {4 Down}{Sleep 2}
Sendinput, {1 Up}{Sleep 5}
Sendinput, {2 Up}{Sleep 5}
Sendinput, {3 Up}{Sleep 5}
Sendinput, {4 Up}{Sleep 5}
Sleep 5
Click, Right, Up
Sleep 5
Sendinput, {1 Down}
Sleep 50
Sendinput, {1 Up}
Return

;Quick Combo Attack PK
+z::
Click, Right, Down
Sendinput, {LCtrl Down}
Sleep 30
Sendinput, {1 Down}{Sleep 2}
Sendinput, {2 Down}{Sleep 2}
Sendinput, {3 Down}{Sleep 2}
Sendinput, {4 Down}{Sleep 2}
Sendinput, {1 Up}{Sleep 5}
Sendinput, {2 Up}{Sleep 5}
Sendinput, {3 Up}{Sleep 5}
Sendinput, {4 Up}{Sleep 5}
Sleep 5
Click, Right, Up
Sendinput, {LCtrl Up}
Sleep 5
Sendinput, {1 Down}
Sleep 50
Sendinput, {1 Up}
Return
Back to top
View user's profile Send private message
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Fri Jul 13, 2007 4:51 am    Post subject: Reply with quote

use #IfWinActive Mu at the very top of the script. It is different than IfWinActive
_________________

(Common Answers)
Back to top
View user's profile Send private message Visit poster's website
BliND123



Joined: 02 Jul 2007
Posts: 19

PostPosted: Fri Jul 13, 2007 7:50 pm    Post subject: Reply with quote

Thank you very much, that worked. Do you know why it was affecting my mouse even after I close the program by looking at my script? I was just wondering, but I don't have that problem anymore anyways.
Back to top
View user's profile Send private message
BliND123



Joined: 02 Jul 2007
Posts: 19

PostPosted: Fri May 16, 2008 3:39 am    Post subject: Reply with quote

BUMP!

Hey, it's me again....I built a new PC a while back and long story short lost my script. I found this post again and tried to use it but it's not working anymore. I am on Vista if that matters and I have a multimedia keyboard that uses IntelliType Pro. Would either of those things affect it or should it still be working? I remember I had changed a few things more than the last one I posted so I am not sure if that is why it's not working.
Back to top
View user's profile Send private message
vbuser26
Guest





PostPosted: Fri Oct 03, 2008 3:00 am    Post subject: Hi Reply with quote

Can you please email me the source code i want to learn how to do that is that C#? btw my email address is vbuser26@yahoo.com thanks in advanced. Smile
Back to top
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group