Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Script help



  • Please log in to reply
4 replies to this topic
jamesadam
  • New members
  • 4 posts
  • Last active: Oct 11 2015 01:48 PM
  • Joined: 28 Sep 2015

Basically i need a loop running with keys to hold down attack(d) then send left/right keys to reach most of the map but i need i need to run a separate set of keys to buff my character every time the counter increases by 5. Anyway here's the script any help is appreciated.

I'm pretty sure this isnt working at the minute. Line 22 - 26 are purely there to show you what im trying to achieve.

Edit - I've just had time to try some more differences in the script but im still not quite there. At the minute it currently runs the the full script everytime.

#SingleInstance Force
#Persistent
SetTitleMatchMode, 2
^r::
loop
{
	IfWinNotActive, MapleStory
		Continue
	    sleep 1500
    Send {d down}
    
	Send {Left down}
	sleep 6000
	Send {Left up}
	
	Send {Right down}
	sleep 6000
	Send {Right up}
	
	send {d up}
	Counter += 1
	a = 5
	b = 10
	c = 15
	d = 20
	If Counter = a, b, c, d
		
	
	Send {0 down}
	Sleep 250
	Send {0 up}
	
	sleep 2000
	
	Send {9 down}
	Sleep 250
	Send {9 up}
	
	sleep 2000
	
	Send {8 down}
	Sleep 250
	Send {8 up}
	
	sleep 2000
	
	Send {7 down}
	Sleep 250
	Send {7 up}
	
	sleep 2000
	
	Send {6 down}
	Sleep 250
	Send {6 up}
	
	sleep 2000
	
	Send {5 down}
	Sleep 250
	Send {5 up}
	
	sleep 2000
	
	Send {4 down}
	Sleep 250
	Send {4 up}
	
	sleep 2000
	
	Send {3 down}
	Sleep 250
	Send {3 up}
	
	}
	
^p::Pause
Esc::ExitApp


SnowFlake_FlowSnake
  • Members
  • 845 posts
  • Last active: Jan 24 2016 05:24 PM
  • Joined: 08 Oct 2012

hey

 

i didn't really understand what you want to do, something like this?

#SingleInstance Force
#Persistent
SetTitleMatchMode, 2

^R::

loop
{
	IfWinNotActive, MapleStory
		Continue
	    sleep 1500
    Send {d down}
    
	Send {Left down}
	sleep 6000
	Send {Left up}
	
	Send {Right down}
	sleep 6000
	Send {Right up}
	
	send {d up}
	
	a = 5
	b = 10
	c = 15
	d = 20
	
If (Counter = 5)
{
Key = A	
}

If (Counter = 10)
{
Key = B	
}

If (Counter = 15)
{
Key = C
}

If (Counter = 20)
{
Key = D	
}

    Send {0 down}
	Sleep 250
	Send {0 up}
	
	sleep 2000
	
	Send {9 down}
	Sleep 250
	Send {9 up}
	
	sleep 2000
	
	Send {8 down}
	Sleep 250
	Send {8 up}
	
	sleep 2000
	
	Send {7 down}
	Sleep 250
	Send {7 up}
	
	sleep 2000
	
	Send {6 down}
	Sleep 250
	Send {6 up}
	
	sleep 2000
	
	Send {5 down}
	Sleep 250
	Send {5 up}
	
	sleep 2000
	
	Send {4 down}
	Sleep 250
	Send {4 up}
	
	sleep 2000
	
	Send {3 down}
	Sleep 250
	Send {3 up}
Counter += 1
}
return


^p::Pause
Esc::ExitApp

  • Download link of my scripts on Autohotkey.com 2/10/2015 [DOWNLAND]
  • Contact Info:  https://github.com/floowsnaake //  FloowSnaake(A)gmail.com
  • IF you need Help send me a PM,Email or Post on Github

  • Quote by tank  Posted 29 September 2015 - 06:14 PM

  • "Eventually i will find a way to convert the DB back to PHPBB3. but i dont have the bandwidth right now. No one that has tried has had success. It is the Only way i can keep this open is if i could successfully convert it."

jamesadam
  • New members
  • 4 posts
  • Last active: Oct 11 2015 01:48 PM
  • Joined: 28 Sep 2015

 

hey

 

i didn't really understand what you want to do, something like this?

#SingleInstance Force
#Persistent
SetTitleMatchMode, 2

^R::

loop
{
	IfWinNotActive, MapleStory
		Continue
	    sleep 1500
    Send {d down}
    
	Send {Left down}
	sleep 6000
	Send {Left up}
	
	Send {Right down}
	sleep 6000
	Send {Right up}
	
	send {d up}
	
	a = 5
	b = 10
	c = 15
	d = 20
	
If (Counter = 5)
{
Key = A	
}

If (Counter = 10)
{
Key = B	
}

If (Counter = 15)
{
Key = C
}

If (Counter = 20)
{
Key = D	
}

    Send {0 down}
	Sleep 250
	Send {0 up}
	
	sleep 2000
	
	Send {9 down}
	Sleep 250
	Send {9 up}
	
	sleep 2000
	
	Send {8 down}
	Sleep 250
	Send {8 up}
	
	sleep 2000
	
	Send {7 down}
	Sleep 250
	Send {7 up}
	
	sleep 2000
	
	Send {6 down}
	Sleep 250
	Send {6 up}
	
	sleep 2000
	
	Send {5 down}
	Sleep 250
	Send {5 up}
	
	sleep 2000
	
	Send {4 down}
	Sleep 250
	Send {4 up}
	
	sleep 2000
	
	Send {3 down}
	Sleep 250
	Send {3 up}
Counter += 1
}
return


^p::Pause
Esc::ExitApp

No, its basically putting this code into where you put Key = A/B/C/D

Send {0 down}
	Sleep 250
	Send {0 up}
	
	sleep 2000
	
	Send {9 down}
	Sleep 250
	Send {9 up}
	
	sleep 2000
	
	Send {8 down}
	Sleep 250
	Send {8 up}
	
	sleep 2000
	
	Send {7 down}
	Sleep 250
	Send {7 up}
	
	sleep 2000
	
	Send {6 down}
	Sleep 250
	Send {6 up}
	
	sleep 2000
	
	Send {5 down}
	Sleep 250
	Send {5 up}
	
	sleep 2000
	
	Send {4 down}
	Sleep 250
	Send {4 up}
	
	sleep 2000
	
	Send {3 down}
	Sleep 250
	Send {3 up}


Exaskryz
  • Members
  • 3249 posts
  • Last active: Nov 20 2015 05:30 AM
  • Joined: 23 Aug 2012
✓  Best Answer

This is how I would do your script, assuming I understand your intentions:

 

#SingleInstance Force
#Persistent
SetTitleMatchMode, 2
^r::
loop
{
sleep 1500
    IfWinNotActive, MapleStory
        Continue
; Notice I moved the sleep 1500 to above the IfWinNotActive. This will keep the loop from being run as fast as possible when the active window is not MapleStory.
Send {d down}

    Send {Left down}
    sleep 6000
    Send {Left up}
    
    Send {Right down}
    sleep 6000
    Send {Right up}
    
    send {d up}
    Counter += 1
;    If !Mod(Counter,5) ; if the number is divisible by 5, the Mod() function returns 0. The ! is a Logica-Not operator and changes what is False (0 is considered false) to mean True, and what is True (a non-zero number) mean False
;    But that is not exactly what you asked for, so I have commented it out with semicolons. Instead, the line below is what you asked for for counter to match 5, 10, 15, or 20
    If (counter=5) || (counter=10) || (counter=15) || (counter=20) ; the || is equivalent to "OR"
    {
    Send {0 down}
    Sleep 250
    Send {0 up}
    
    sleep 2000
    
    Send {9 down}
    Sleep 250
    Send {9 up}
    
    sleep 2000
    
    Send {8 down}
    Sleep 250
    Send {8 up}
    
    sleep 2000
    
    Send {7 down}
    Sleep 250
    Send {7 up}
    
    sleep 2000
    
    Send {6 down}
    Sleep 250
    Send {6 up}
    
    sleep 2000
    
    Send {5 down}
    Sleep 250
    Send {5 up}
    
    sleep 2000
    
    Send {4 down}
    Sleep 250
    Send {4 up}
    
    sleep 2000
    
    Send {3 down}
    Sleep 250
    Send {3 up}
    }
}
return ; while technically this won't be executed, probably a good idea to use it habitually
^p::Pause
Esc::ExitApp

 

You'll notice at one part I commented out the lines because I felt it gets into a little bit of advanced material, and it made assumptions about how you wanted the script to work.

 

The key changes I made was moving the Sleep to the top of the loop instead of after the IfWinNotActive; changing the If expression for checking counter's value; putting all the Send {number down/up} lines inside of a Block.



jamesadam
  • New members
  • 4 posts
  • Last active: Oct 11 2015 01:48 PM
  • Joined: 28 Sep 2015

This is how I would do your script, assuming I understand your intentions:

#SingleInstance Force
#Persistent
SetTitleMatchMode, 2
^r::
loop
{
sleep 1500
    IfWinNotActive, MapleStory
        Continue
; Notice I moved the sleep 1500 to above the IfWinNotActive. This will keep the loop from being run as fast as possible when the active window is not MapleStory.
Send {d down}

    Send {Left down}
    sleep 6000
    Send {Left up}
    
    Send {Right down}
    sleep 6000
    Send {Right up}
    
    send {d up}
    Counter += 1
;    If !Mod(Counter,5) ; if the number is divisible by 5, the Mod() function returns 0. The ! is a Logica-Not operator and changes what is False (0 is considered false) to mean True, and what is True (a non-zero number) mean False
;    But that is not exactly what you asked for, so I have commented it out with semicolons. Instead, the line below is what you asked for for counter to match 5, 10, 15, or 20
    If (counter=5) || (counter=10) || (counter=15) || (counter=20) ; the || is equivalent to "OR"
    {
    Send {0 down}
    Sleep 250
    Send {0 up}
    
    sleep 2000
    
    Send {9 down}
    Sleep 250
    Send {9 up}
    
    sleep 2000
    
    Send {8 down}
    Sleep 250
    Send {8 up}
    
    sleep 2000
    
    Send {7 down}
    Sleep 250
    Send {7 up}
    
    sleep 2000
    
    Send {6 down}
    Sleep 250
    Send {6 up}
    
    sleep 2000
    
    Send {5 down}
    Sleep 250
    Send {5 up}
    
    sleep 2000
    
    Send {4 down}
    Sleep 250
    Send {4 up}
    
    sleep 2000
    
    Send {3 down}
    Sleep 250
    Send {3 up}
    }
}
return ; while technically this won't be executed, probably a good idea to use it habitually
^p::Pause
Esc::ExitApp

You'll notice at one part I commented out the lines because I felt it gets into a little bit of advanced material, and it made assumptions about how you wanted the script to work.

 

The key changes I made was moving the Sleep to the top of the loop instead of after the IfWinNotActive; changing the If expression for checking counter's value; putting all the Send {number down/up} lines inside of a Block.

Yes this part of the code is exactly what i was looking for thanks.

If !Mod(Counter,5)