PDA

View Full Version : sound for scriptcheck?



RAR
03-25-2014, 05:16 PM
Would anyone know how to add a sound to scriptcheck so that when it does it's thing it also plays a sound on your computer? I love scriptcheck but a sound might be an extra layer of protection and allow you to move around the room you are playing in instead of having to be glued to your screen. Four days straight of trying to get my last forging-crafting rank is killing me and I find myself getting distracted and not watching the screen. Thx

Code...

=begin

This script echo's every line to the familiar window, unless it
has been seen more than five times before.

because script checks can't be seen without a script...

tillmen@lichproject.org

=end

hide_me
CharSettings['count'] ||= Hash.new

if $frontend == 'stormfront'
fam_window_begin = "<pushStream id=\"familiar\" ifClosedStyle=\"watching\"/>"
fam_window_end = "<popStream/>\r\n"
else
fam_window_begin = "\034GSe\r\n"
fam_window_end = "\034GSf\r\n"
end

while line = get

# ignore chats
next if line =~ /^\[.*?\]\-[A-z]+\:|^\[server\]\: "/

# ignore numbers when considering if a line has been seen before
mod_line = line.gsub(/[0-9\s]+/, '')

# increment the number of times the line has been seen
CharSettings['count'][mod_line] = CharSettings['count'][mod_line].to_i + 1

# echo the line to the familiar window, unless it has been seen more than 5 times
unless CharSettings['count'][mod_line] > 5
puts("#{fam_window_begin}#{line}\r\n#{fam_window_end}")
end

end

Tgo01
03-25-2014, 05:22 PM
I imagine you could highlight each vowel in Stormfront and have it play a sound when the vowel is seen then disable sounds for the story window and enable sounds for the familiar window.

I think that would work. Not sure.

Just make sure you set up the highlight in Stormfront to match partial words and ignore case for each vowel.

RAR
03-25-2014, 05:30 PM
I use the wizard fe and I don't quite follow but you have me thinking now. Maybe I could have a code word put into my text strings and add a sound to it via the wizard fe. Then somehow have the lich script output that code word along with the new line that it sees when it does it's thing in this part of the code...

# echo the line to the familiar window, unless it has been seen more than 5 times
unless CharSettings['count'][mod_line] > 5
puts("#{fam_window_begin}#{line}\r\n#{fam_window_e nd}")
end

Thx!

Tgo01
03-25-2014, 05:33 PM
I was just thinking since it only sends lines to the familiar window that haven't been seen at least five times then you could highlight each vowel and if it ever sees a vowel (which like...should be every word sent there) then it would fire off a sound.

Not sure how highlights work in wizard though so it might not work.

But if you've found a way to do it anyways even more groovy :p

kutter
03-25-2014, 05:40 PM
Do people actually get script checked for forging, I have had characters run for days without interruption and never been checked. I always thought that the GM's, being so few and sort of task saturated as is, did not bother too much with scripters unless they were being a nuisance.

Anebriated
03-25-2014, 05:47 PM
Do people actually get script checked for forging, I have had characters run for days without interruption and never been checked. I always thought that the GM's, being so few and sort of task saturated as is, did not bother too much with scripters unless they were being a nuisance.

Yes, I was asked if I needed some water and a towel once.

RAR
03-25-2014, 07:57 PM
It works! In the wizard fe I went into configuration...text strings...strings and added a string ("grrrr"). I tried to add a sound to the string but there weren't any in the sounds drop down list so I just did a search on my C drive for .wav files and found "drumroll.wav" which was a pretty good drum roll sound. I copied the .wav file and pasted it in the c:/program files/arcsoft/showbiz 2/gemstone/sounds directory and it showed up in the sounds drop down list so that I could attach the sound to my "grrrr" string. Then I just added a line to the lich script...

# echo the line to the familiar window, unless it has been seen more than 5 times
unless CharSettings['count'][mod_line] > 5
puts("#{fam_window_begin}#{line}\r\n#{fam_window_end}")
put 'grrrr'
end

So when the lich script sees a new line of text it puts the line out to the familiar window and also puts "grrrr" to my game window which sets off the drumroll sound via the wizard fe. I'm sure there's an easier way to just code the sound directly in the lich script but this seems to work well for now.