Jump to content

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

Script to press a key then hold another key



  • Please log in to reply
15 replies to this topic
Holophonist
  • Members
  • 9 posts
  • Last active: Apr 25 2014 01:36 AM
  • Joined: 30 Mar 2014

Hi all -

 

I'm trying to create a weapon swap hotkey that will then hold my parry key in Darkfall Unholy wars.

 

Basically what I'd like to do is have my right mouse button press a key on the keyboard, wait about a quarter of a second and then HOLD another key until I release the right mouse button. Is this possible?



floodindahood
  • Members
  • 383 posts
  • Last active: Apr 20 2018 01:45 PM
  • Joined: 21 Oct 2011

It is possible and should take around 5 lines of code in total. You should start by looking at http://www.autohotke...ocs/Hotkeys.htm and then if your attempts won't succeed then post back here with what you've come up with and someone will surely give a hand.



Holophonist
  • Members
  • 9 posts
  • Last active: Apr 25 2014 01:36 AM
  • Joined: 30 Mar 2014

Thanks for the reply.

 

Here's how far I got:

RButton::

Send {F12}

Sleep 250

While Getkeystate("RButton","P")

Send {F10}

return
 

I think this may be a problem with Darkfall but it seems difficult to even get simple scripts to work in the game. So if a script doesn't work, I'm not sure if it's a problem with Darkfall, or a problem with something I did.... usually the latter.



Sanctus
  • Members
  • 283 posts
  • Last active: Dec 06 2014 04:05 PM
  • Joined: 30 Nov 2012

Can't find my df uw scripts :(

 

If I still had a subscription running in DF I could get this done for you in a jiffy but stopped playing like 6 months ago :p

Hoping AV gets it shit together :) Might resub then..


Check out ALL My Scripts  ;)


Holophonist
  • Members
  • 9 posts
  • Last active: Apr 25 2014 01:36 AM
  • Joined: 30 Mar 2014

They have a huge patch incoming in the next week or so. The game has made a lot of progress since launch. They've added like 10 ships, half a dozen dungeons, 4 new schools (1 for each class), sea towers, prowess monoliths, re-worked how harvesting drops work, made transfers more powerful, increased movement speed (mainly strafing), added weather effects, completely revamped how village capturing works, added the market to NPC cities, and just recently added clan markets, that work between clan/alliance holdings.

 

This next patch is going to be dealing with territory control. You can find the patch notes here: 

https://forums.darkf...964#post6267964

 

Basically you get a buff for being nearby your clan/alliance's holdings, and those buffs stack if you have holdings that are close to each other. The idea is to create more regional conflict/alliances and give more of a reason to have holdings and to cap villages.



Sanctus
  • Members
  • 283 posts
  • Last active: Dec 06 2014 04:05 PM
  • Joined: 30 Nov 2012

They have a huge patch incoming in the next week or so. The game has made a lot of progress since launch. They've added like 10 ships, half a dozen dungeons, 4 new schools (1 for each class), sea towers, prowess monoliths, re-worked how harvesting drops work, made transfers more powerful, increased movement speed (mainly strafing), added weather effects, completely revamped how village capturing works, added the market to NPC cities, and just recently added clan markets, that work between clan/alliance holdings.
 
This next patch is going to be dealing with territory control. You can find the patch notes here: 
https://forums.darkf...964#post6267964
 
Basically you get a buff for being nearby your clan/alliance's holdings, and those buffs stack if you have holdings that are close to each other. The idea is to create more regional conflict/alliances and give more of a reason to have holdings and to cap villages.

Yeah saw the next patch, but unless it has a huge impact on PvP I'm not that interested :)
Also seeing SUN have this many holdings makes me sigh significantly :p
DF truly is dead and on its way out if it doesn't get a significant player boost.
 
Wish they would try to adapt a free to play with monetization, Do the same as Path of Exile is doing.

Need another Hardcore MMORPG game.. but DF isnt an option for me atm..


Check out ALL My Scripts  ;)


Holophonist
  • Members
  • 9 posts
  • Last active: Apr 25 2014 01:36 AM
  • Joined: 30 Mar 2014

I didn't know you played on EU. I hear that server is pretty dead.



Sanctus
  • Members
  • 283 posts
  • Last active: Dec 06 2014 04:05 PM
  • Joined: 30 Nov 2012

I didn't know you played on EU. I hear that server is pretty dead.

It truly is :(

Played on both EU and NA in DF 1.0


Check out ALL My Scripts  ;)


floodindahood
  • Members
  • 383 posts
  • Last active: Apr 20 2018 01:45 PM
  • Joined: 21 Oct 2011

Incase you're still struggling, I stumbled upon this site accidentally.

http://www.ahkgaming...splay.php?fid=4

 

Probably the best place to get get some results with ahk+darkfall



Holophonist
  • Members
  • 9 posts
  • Last active: Apr 25 2014 01:36 AM
  • Joined: 30 Mar 2014

Incase you're still struggling, I stumbled upon this site accidentally.

http://www.ahkgaming...splay.php?fid=4

 

Probably the best place to get get some results with ahk+darkfall

I am still struggling and will check that out. Thanks very much!



Holophonist
  • Members
  • 9 posts
  • Last active: Apr 25 2014 01:36 AM
  • Joined: 30 Mar 2014
Bump. That site didn't have what I was looking for.


Anybody have any insight?

floodindahood
  • Members
  • 383 posts
  • Last active: Apr 20 2018 01:45 PM
  • Joined: 21 Oct 2011

I don't have Darkfall so can't help much but on that site I checked couple scripts and one thing in common was the following snippet

if not A_IsAdmin
{
Run *RunAs "%A_ScriptFullPath%"
ExitApp
}

On some other game related thread someone mentioned that if the game is running as admin then the script will need admin rights to "access" the game. If that won't yield any results then you could try RHCP's script in "South Park Stick of Truth" topic. 



Holophonist
  • Members
  • 9 posts
  • Last active: Apr 25 2014 01:36 AM
  • Joined: 30 Mar 2014

Hi guys -

 

I'm still not sure how to make this happen. It seems like a very simple thing to do, I'm just not sure how to do it.

F9::F12

Sleep 250

While Getkeystate("F9","P")
	Send {F10}


return

That's what I have right now. It will obviously work for the first part (pressing F12). I just don't really know where to start with the second part, which is after it fires F12, I want it to then hold down F10 until I let go of F9. Not that it matters but I'm just using F9 for now for ease of testing. In reality I'll be using RButton.



Ruevil2
  • Members
  • 226 posts
  • Last active: Dec 04 2015 11:05 PM
  • Joined: 27 Mar 2012
✓  Best Answer

This may have to be tweaked to run fast enough for the game you are playing but one of these methods will work. i think the problem you are having is the behavior of the F10 send. It is hammering F10 instead of holding it down one time.

 

Try this: 

F9::
Send {F12}
Sleep 250
Send {F10 down}
Loop
{
    press := Getkeystate("F9","P")
    If press = 0
    {
        Send {F10 up}
        break
    }
}

If I helped you out and you would like to show appreciation, feel free to buy me a beer.  grin.png   btn_donateCC_LG.gif


Holophonist
  • Members
  • 9 posts
  • Last active: Apr 25 2014 01:36 AM
  • Joined: 30 Mar 2014
Thanks a lot. I'm at work right now but will try it as soon as I get home and let you know how it works.

Tweaking things and playing around is fine, I just wasn't sure where to start, as I'm very much a complete novice.