Jump to content
News Ticker
  • Developer applications are still open
  • Helper applications are still open
  • ba-rp.net:7777
RNSS

AHK - The RNSS Way

Recommended Posts

RNSS

I was going to make an AHK guide, but I got bored halfway through the first section because it's like the 4th time I'm posting a similar guide. So instead, I'm showcasing some of the scripts I've made and making them publicly available for everyone to use, and I'm also taking requests for new ideas or custom scripts.

 

Dynkeys

Dynkeys is a shitty name for a script I made that have dynamic hotkeys. It's quite simple to use, a GUI opens up and you set your own hotkey combinations and outputs.

So far it supports a maximum of 10 hotkeys, but if you place more than one version of the script in multiple folders then you can an infinite number of hotkeys. I do plan on making a system that will allow you to have an infinite number of hotkeys with a single file.

 

Screemshots:
3tc9Fzy.png

Gui scale and style may vary based on OS and screen resolution.

DL: Click


 

Fishing Snippet

Not a complete script, just a snippet of code that will help you during your fishing.

Code:

 

Spoiler
/*
=======================
		CONFIG
=======================
Settings, change to your heart's content
*/

MaxFish = 0 ; Max fish per trip, 0 or less = unlimited
Cooldown = 1 ; Cooldown between sending command. Decimals supported (up to 0.01). Reccommended to add 0.2-0.5 seconds for lag. Also recommended to set this no lower than 1 second.
cmd = /fish ; command to send everytime you want to fish.
HotkeyVar = !1 ; What hotkey to use. I highly recommend Googling how to set a hotkey properly in AHK before changing this setting.


/*
=======================
		Script
=======================
If you decide to change whatever's below this line, I sure as hell hope you know what you're doing.
*/

SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Cooldown*=1000

MaxFish-=1

Hotkey, %HotkeyVar%, FishingTog
Return

FishingTog:
	If Fishing
	{
		Fishing:=False
		SetTimer, FishingLoop, Off
	}
	Else
	{
		Fishing:=True
		i = 0
		SetTimer, FishingLoop, 0
		SetTimer, FishingLoop, On
	}
Return

FishingLoop:
	Send, t^a%cmd%`n
	If MaxFish > -1
	{
		i+=1
		Send, %i%
		If i > %MaxFish%
		{
			Fishing:=False
			SetTimer, FishingLoop, Off
		}
	}
	If Cooldown
		Sleep, %Cooldown%
Return

You can change the 4 lines in the config to whatever they need to be, but don't bother changing the rest.

All ya gotta do is hit the hotkey once, and it'll start fishing for you. Once it hits the max number of fish (As set in the config section), it'll stop fishing. If you happen to be typing when it sends a /fish command, it'll clear everything you just typed and fish instead. Bit annoying if you're not fishing by yourself, but if that's really an issue then just use This code instead:

 

!1:: SendInput, t^a/fish`n


More scripts to come, but I'm bored now.

 

Edited by RNSS

Share this post


Link to post
Share on other sites
Cargo

(clap)

Share this post


Link to post
Share on other sites
Boss

I would suggest you post this under "Community Guides" section.

Share this post


Link to post
Share on other sites
Alpay

I bet a lot of people are struggling with AHK and this will help them a lot!

Good stuff.

  • Like 1

Share this post


Link to post
Share on other sites
RNSS
4 hours ago, Boss said:

I would suggest you post this under "Community Guides" section.

I would, but it's not really a guide. More of a showcase and request thread.

Share this post


Link to post
Share on other sites
SergeantRick

Make a script for long and commonly typed /me's or /ame's..etc

Share this post


Link to post
Share on other sites
RNSS
3 hours ago, SergeantRick said:

Make a script for long and commonly typed /me's or /ame's..etc

Give me a list and I'll make it, but I haven't RP'd in a good while, so it might be hard to come up with a list like that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×