Jump to content
Psychedelic

[NMZ] Awesome Prayer Alerter with AHK

Recommended Posts

Psychedelic

Hey guys, I had thought of this little script to aid me in my afk training at nmz on my OSRS Account. I had found that usually while afk-training at nmz, I would check to see if my prayer was due for a sip of potion way too early, or even multiple times too early. Which I realized kind of defeated the purpose of minimizing or attempting to browsing the web while training. This has helped me enormously to be able to browse, watch videos, or even type this tutorial, all while maintaining appropriate prayer in NMZ. Keep in mind I'm no scripter, nor do I have much experience with ahk or it's complex commands, all I know is this works well for me, and is easy to understand. I assume many of you also may not be too familiar with AHK, so this is for you guys specifically.

 

Firstly, you'll need AHK (AutoHotKeys), which is a free open source scripting program that can range from legal 1:1 scripts like those often used by runescape players to complex automated looped scripts which in theory could be used for botting, but would be both inefficient and a waste of time.

Now I'm sure many of you have heard of AHK, or even used some scripts. Although AHK is obscenely common, there are very few good scripts sources that I have found, so I recommend you at least read about how commands work on the AHK website, the tutorials and information are easy to understand, even for people with little to no experience in coding/scripting. A simple google search of something like "OSRS AHK Scripting" would yield the relevant results.

 

Although not necessary for this to work, I reccomend using OSbuddy PRO as it has a tray notification icon that displays your current prayer points which can assure you it's working properly. Follow these steps to make it appear at all times

 

First, go ahead and click your taskbar extension to see all of the task icons currently open, it should look like something like this, with two colored blocks with numbers in them, these are your healthpoints and prayer meters. If you don't see this and are using OSBuddy, go to osbuddy settings, and under General>Pro Plugins>Skill Tray Icons. Go ahead and slide this on and change the settings to fit your liking.

 

4dde5f906d.jpg

 

Now go ahead and click the Customize button highlighted above, and select the drop downs for either just prayer, or both prayer and hitpoints. You want it to now be set at Show Icon and Notifications as shown below. Then continue on to the next step.
 

07178f74fc.png

Your taskbar should now look somewhat like this, with whichever icons you already had in addition to this new prayer meter which is colored differently due to state of prayer from full points to low points. 

 

Now that this is set up, it should provide a easy visual way to check prayer point status with runescape minimized.

 

496716ee35.jpg

 

Ok, now onto the AHK Script, you should have AHK downloaded by now. So go ahead and open a brand new notepad on your desktop. This is where you would type or paste a script you're going to be using. Paste the script into the text document, and save as "name.ahk" to your desktop, or a folder or wherever you'd like.

 

Now, let me explain the script a bit first, although it's only a few lines, you may need to change some of the variables if desired.

 

First you need to find out how fast your prayer drains. This can be achieved using a prayer drain calculator, although it's just easiest the start the timer widget on OSBuddy with all the gear you'd wear, so you can stop it right when you're at the lowest possible number of points while still being able to efficiently refill with prayer potion doses.

 

An example of this is that I have the duration of the timer function in the script set as "220000" which is milliseconds, which equates to 220 seconds, or 3 minutes and 40 seconds. Just long enough for my prayer to go from full 44 prayer, down to 8 prayer, which allows me to take exactly two sips of prayer potion to restore my prayer back to 44.

 

Good, so now we have the duration of what the timer will be, and remember it will change if your prayer bonus changes, so it's best to re-use the most efficient gear, or at least the same gear each time. I aim for highest prayer bonus I can; ~29-34, which is pretty decent, considering how much it slows your prayer drain.

 

The last variables that may change depending on you are 1; the sound which plays at the end of the timer set, which is meant to alert you that your prayer has reached the point we dictated earlier to notify us at. It is currently set to a default beep that will work on all computers. But you can use a custom .wav, or .mp3 if desired, you would substitute the SoundBeep, for SoundPlay followed by the file in directory you wish to use. And 2; The only key we will be pressing in this AHK script, which can be anything from the "9" key like i've used, to the number nine on the number pad which would be "Numpad9". You can use any key you like, but i recommend a key that is convenient yet not used frequently.

 

And for the TL;DR people, and the people who have read through this is how you would use it;

  1.  Open up your .ahk script you've made and make sure the green "H" icon is now active on your taskbar
  2. Enter nmz, and as soon as you turn on your prayers, press your hotkey, in this case, 9.
  3. This will set the timer, which will lead to us being notified at the perfect time to re-open osrs and pot back up
  4. Pot up to full, or wherever you started the timer at, and then press the hotkey again, which will reset the timer.

Here is the script in the spoiler

#IfWinActive ahk_exe OSBuddy.exe

PrayerNotification:
SoundBeep, 750, 500
return

9::
SetTimer, PrayerNotification, 220000
return

 

 

Share this post


Link to post
Rolls
$ DONATOR $

Nice guide, i don't use AHK but i might have to start with click intensive skills

Share this post


Link to post
Iraq

Damn, this is beautiful I cried.

Share this post


Link to post
Psychedelic

Damn, this is beautiful I cried.

Thanks haha, my computer crashed right when I was done typing it and about to submit, I was so angry for 36 seconds while waiting for my computer to restart. Thanks god it autosaved.

Share this post


Link to post
Grabbin

Whilst this sound very useful, RuneloaderV2 has a built in prayer beep which does a sound at 30 points, 20, maybe 10 idk, never went down that far ;P

 

If you only use this for nmz, might aswell just use a different client :P

Share this post


Link to post
Sybren
$ DONATOR $

nice guide bro :o

 

time was spent on this topic :D

 

Appreciate the effort!

 

Using osb here

Share this post


Link to post
Psychedelic

Whilst this sound very useful, RuneloaderV2 has a built in prayer beep which does a sound at 30 points, 20, maybe 10 idk, never went down that far ;P

 

If you only use this for nmz, might aswell just use a different client :P

I disagree, this has visual notification while completely minimized, while using OSBuddy which I personally find to be the best client i've used.

Aswell as it being a fully customizable 4 lines of code... it's 4 lines, why would I just aswell use a different client, when it would take more time to download and set it up, then it did for me to write the entire script, or lack of one

 

 

 

nice guide bro :o

 

time was spent on this topic :D

 

Appreciate the effort!

 

Using osb here

Thanks dude, also I need to talk to you about a firecape!

Share this post


Link to post
Warriuh
$ DONATOR $

Damm really nice guide dude! 

Share this post


Link to post
Grabbin

 

Whilst this sound very useful, RuneloaderV2 has a built in prayer beep which does a sound at 30 points, 20, maybe 10 idk, never went down that far ;P

 

If you only use this for nmz, might aswell just use a different client :P

I disagree, this has visual notification while completely minimized, while using OSBuddy which I personally find to be the best client i've used.

Aswell as it being a fully customizable 4 lines of code... it's 4 lines, why would I just aswell use a different client, when it would take more time to download and set it up, then it did for me to write the entire script, or lack of one

 

I mean, you don't need any of the fancy plugins whilst in nmz.

And I'd use another client over having to press a starting key everytime I sip pray pots every day.

 

 

But I guess at this point it just comes down to personal preference.

Share this post


Link to post
Gonna
$ DONATOR $

Nice, you could also use runeloader which has a sound notification

Share this post


Link to post
Psychedelic

Nice, you could also use runeloader which has a sound notification

I just learned this a few minutes ago. Since I did learn this after I put the work into this tutorial and st00f. I have to say I prefer

this method. Can Runeloader have a sound notification that says "Prayer BITCH!"? Well this can! haha. And even though I don't want one that says

that. My hurt ego has to defend this method, lol.

 

But in all realness, I was sure there were other alternatives out there, i've always bee a DIY guy, and like to learn about different things

So it made me happy to do it, y'know.

Share this post


Link to post
Guest
This topic is now closed to further replies.

Discord

We use Voice Communication during our events, so it's mandatory to have Discord.

Download Discord

Sharkbrew

A Community Forum where all PvP Clans come together to share their adventures.

Go to Sharkbrew.com

RuneScape Forums

A direct link to our Clan Recruitment Topic on the official Runescape Forums.

Bump the Recruitment Topic

OSRS Client

Optimize your gaming experience with a client for OSRS:

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.