Any mods you use or recommend? Discuss them here.
 #145385  by Frog
 
Either this sounds really stupid or I may just have a idea yet!

So, well, I'm not computer geek, but I am wondering: Is it possible to program connecting IP's in the server to trigger a music theme? I've been wanting to do this for awhile. Not only would Saki not be able to sneak up on me anymore, but I could hear a scary music theme along with it!

I'd appreciate any replies :)
 #145391  by MasterM
 
Dunno about IP's, but I would imagine you could do something similar through UU or a similar utility using player names. It already checks if a connecting player is in the clan for instance, and displays a special greeting message. By extension, since there is a music player integrated, I imagine you could get it to play some sort of sound or song when a player with a certain name connects.
 #145757  by Zabuza
 
You could write a program that listens to the console's text via Win32 api. With the text, you can parse out the name/connected combo and play a sound file.

IPs of other players are not available at the client level.
 #145786  by Raz0r
 
Zabuza wrote:You could write a program that listens to the console's text via Win32 api. With the text, you can parse out the name/connected combo and play a sound file.
Much simpler: write a JA++ Lua plugin

This should work, untested..
lua/cl/connection-sound/plugin.lua
Code: Select all
local cs = RegisterPlugin( 'ConnectionSound', '1.0.0' )
cs.connectionSound = RegisterSound( 'sound/effects/fireburst' )

AddListener( 'JPLUA_EVENT_CLIENTCONNECT', function( player )
	if JPUtil.StripColours( player.name ):find( 'sakito' ) ~= nil then
		StartLocalSound( cs.connectionSound, SoundChannel.LocalSound )
	end
end )
 #145832  by Zabuza
 
Raz0r wrote:
Zabuza wrote:You could write a program that listens to the console's text via Win32 api. With the text, you can parse out the name/connected combo and play a sound file.
Much simpler: write a JA++ Lua plugin

This should work, untested..
lua/cl/connection-sound/plugin.lua
Code: Select all
local cs = RegisterPlugin( 'ConnectionSound', '1.0.0' )
cs.connectionSound = RegisterSound( 'sound/effects/fireburst' )

AddListener( 'JPLUA_EVENT_CLIENTCONNECT', function( player )
	if JPUtil.StripColours( player.name ):find( 'sakito' ) ~= nil then
		StartLocalSound( cs.connectionSound, SoundChannel.LocalSound )
	end
end )
What he said
 #145837  by Frog
 
Idk how any of this stuff works. Remember, I have the imagination of a three year old and the mental capacity of one as well. Can you explain what I am to do with all this code information?