Play alarm sound

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Post Reply
Message
Author
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Play alarm sound

#1 Post by lisa » Fri Nov 04, 2011 1:56 am

Ok I just put this together and it may evolve into more or it might just be kept simple.

Near the top of the userfunction has this.

Code: Select all

	local permanantadjust = 0
You can adjust that so it is always louder or softer by default.

Usage

Code: Select all

playalarm() -- default volume
playalarm(10) -- a little louder then default
playalarm(-10) -- a little softer then default
userfunction_soundalarm.lua
(1.14 KiB) Downloaded 356 times
alarm high volume.zip
save the alarm.wav file to the interface/addons/ingamefunctions folder
(9.05 KiB) Downloaded 322 times

I am going to add the usage of this userfunction into GMDetect.

--=== added suguestions ===--

start bot using commandline

Code: Select all

rom/bot path:commandline
At the prompt type

Code: Select all

playalarm()
to test the volume, if it seems to soft then add with increments of 10

Code: Select all

playalarm(10)
playalarm(20)
until you get a volume you like
If playalarm() seemed to loud then adjust with -5 increments.

Code: Select all

playalarm(-5)
until you get a volume you like

You can then open up the userfunction and adjust

Code: Select all

local permanantadjust = 0
replace the 0 with the value that made the sound seem a good volume.

Code: Select all

local permanantadjust = 10
local permanantadjust = -5
Then just use playalarm() and it should play the alarm at the volume you like any time you call the function.

--=== ideas for usage ===--

Obviously GMDetect and has been added in to V 2.3 of the userfunction, I made it do double play of the sound, to tell when GM and not just another usage of playalarm().

When you reach the end of a WP and use player:sleep()

Basically any time you want to hear the sound to get your attention.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Play alarm sound

#2 Post by rock5 » Fri Nov 04, 2011 2:14 am

So what is the range of values accepted by the function?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Play alarm sound

#3 Post by lisa » Fri Nov 04, 2011 2:17 am

Master volume is 20 by default.

So you can go -20 and +80

I did do a check though for the adjustment and if you do 1000000000 it will set to the max of 100.
same with less then -20, if you do -48753247863475 it will set to -20.


-20 is actually 0 on volume so you won't hear anything.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

spawni
Posts: 100
Joined: Wed Sep 28, 2011 11:21 am

Re: Play alarm sound

#4 Post by spawni » Thu Nov 17, 2011 5:53 am

think a nice feature for the function is to play a sound when bot gets stucked for more than x times...
So you can go to pc before bot logs out or shows unnormal behaviour "in the wild".

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Play alarm sound

#5 Post by lisa » Thu Nov 17, 2011 7:35 am

i added in calling a userfunction for unstick tries a while ago now.
3 choices to use can use 1 none or all.

Code: Select all

unStick3()
unStick6()
unStick9()
So you could make a userfunction with this

Code: Select all

function unStick9()
playalarm()
end
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

kuripot
Posts: 493
Joined: Mon Nov 07, 2011 9:14 pm

Re: Play alarm sound

#6 Post by kuripot » Thu Dec 27, 2012 3:32 pm

how can i use this when my client got crash??

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Play alarm sound

#7 Post by lisa » Thu Dec 27, 2012 5:48 pm

Code: Select all

atError(function(script, line, message)
playalarm()
playalarm()
end
Add that to an onload somewhere, be it profile or WP.
Basically it tells the bot when an error message is called to also do that code.
So assuming when client crashes MM will error with some message it will now also do the sound thing, keep in mind this userfunction uses the in game sound though so it won't work like that, it might still play the system speaker though, you will have to test it =)
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 1 guest