standalone script needed :)
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

standalone script needed :)

Started by D-J Valhala, 22 July, 2004, 14:44:02

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

D-J Valhala

+np
<-PsYiBot-> DJ-Valhala Now Play: shulman_-_in_search_of_a_meaningful_moment-2003-psycz\01-Shulman_-_Inner_Selves-psycz.mp3 [Bitrate/Time/playtime]

it will send to all what the user play in my WinAmp  :D and all users can use this
 :D  :D  :D  :D  :D  :D  :D
for my users :)
My PsyIsrael Network
==================
--=[PsyIsrael DC Hub]=--
--=[PsyIsrael Website]=--
==================

nErBoS

Hi,

I beleive that already exist a script that does something like that, search in the finished scripts.

Best regards, nErBoS
--## nErBoS Spot ##--

D-J Valhala

i can't find one i found some script to control the winamp but not "Now Play: " :]
My PsyIsrael Network
==================
--=[PsyIsrael DC Hub]=--
--=[PsyIsrael Website]=--
==================

nErBoS

Hi,

Maybe is this what you are lookink for...

-- Shoutcast interface through PtokaX script
-- Author: RabidWombat
-- Requirements: the winamp source of the shoutcast server
-- is running on the hub server where this script is AND
-- you have installed Clever (a GREAT utility)
-- This is the version I downloaded for testing purposes
-- [URL]http://www.jukkis.net/clever/clever_2_98.zip[/URL]
-- This is site for all offered versions:
-- [URL]http://www.jukkis.net/[/URL]

sCleverDir = "C:\\clever\\";
sBotName = "ShoutCastBot";

low = strlower;

sHelpOutput = "Commands\r\n";
sOpHelpOutput = "Op Commands\r\n";

function Main()
	tCommands = {
		[low("!SC.next")] 	= { ShoutCastNext,	1,	"Play next song in playlist" },
		[low("!SC.prev")] 	= { ShoutCastPrev,	1,	"Play prev song in playlist" },
		[low("!SC.playlist")]	= { ShoutCastPlayList,	0,	"Display Playlist" },
		[low("!SC.play")]	= { ShoutCastPlay,	1,	"Play" },
		[low("!SC.pause")]	= { ShoutCastPause,	1,	"Pause" },
		[low("!SC.stop")]	= { ShoutCastStop,	1,	"Stop" },
		[low("!SC.status")]	= { ShoutCastStatus,	0,	"Display Status" },
		[low("!SC.help")]	= { ShoutCastHelp,	0,	"Help Message" },
	};

	for sCmd, tCmd in tCommands do
		if(tCmd[2] == 1) then
			sOpHelpOutput = sOpHelpOutput..sCmd.."-\t"..tCmd[3].."\r\n";
		else
			sHelpOutput = sHelpOutput..sCmd.."-\t"..tCmd[3].."\r\n";
		end
	end

	frmHub:RegBot(sBotName);
end

function DataArrival(curUser, sData)
	local s, e, cmd, args = strfind(sData, "%b<>%s+(%S+)%s*([^%|]*)%|$");

	if(cmd == nil) then return 0; end
	cmd = strlower(cmd);

	if(tCommands[cmd] and (tCommands[cmd][2] == 0 or curUser.bOperator)) then
		curUser:SendData(sData);
		tCommands[cmd][1](curUser, args);
		return 1;
	end
end

function ShoutCastNext()
	execute(sCleverDir.."clever.exe next");
end

function ShoutCastPrev()
	execute(sCleverDir.."clever.exe prev");
end

function ShoutCastPlayList(curUser)
	execute(sCleverDir.."clever.exe playlist > output.tmp");
	readfrom("output.tmp");

	local line = read("*a");

	if(line) then
		line = gsub(line, "\n", "\r\n");
		curUser:SendData(sBotName, "\r\n"..line);
	end

	readfrom();
end

function ShoutCastPlay()
	execute(sCleverDir.."clever.exe play");	
end

function ShoutCastPause()
	execute(sCleverDir.."clever.exe pause");
end

function ShoutCastStop()
	execute(sCleverDir.."clever.exe stop");
end

function ShoutCastStatus(curUser)
	execute(sCleverDir.."clever.exe status > output.tmp");

	readfrom("output.tmp");

	local line = read("*a");

	if(line) then
		line = gsub(line, "\n", "\r\n");
		curUser:SendData(sBotName, "\r\n"..line);
	end

	readfrom();
end

function ShoutCastHelp(curUser)
	curUser:SendData(sBotName, sHelpOutput);
	if(curUser.bOperator) then
		curUser:SendData(sBotName, sOpHelpOutput);
	end
end

Best regards, nErBoS
--## nErBoS Spot ##--

plop

QuoteOriginally posted by D-J Valhala
i can't find one i found some script to control the winamp but not "Now Play: " :]
take a look here.
or start using bcdc, there you can type /winamp and it'll show the current track winamp is playing.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

D-J Valhala

#5
nErBoS i tryed this script b4 and this script is not what i need i need only +np (Now Play: ) and i like it for all the users...
Plop huh? i dont understsnd what i need to do there :P lol :D
My PsyIsrael Network
==================
--=[PsyIsrael DC Hub]=--
--=[PsyIsrael Website]=--
==================

nErBoS

#6
Hi,

What plop said was that you need a client script to do that or bcdc++ that haves a command \winamp that already does that.

Best regards, nErBoS
--## nErBoS Spot ##--

D-J Valhala

ok but if i have the cliend i can use it but i like it for all my hub users not only me :)
My PsyIsrael Network
==================
--=[PsyIsrael DC Hub]=--
--=[PsyIsrael Website]=--
==================

nErBoS

Hi,

Try to use the program that plop has gave you, it works for mirc is probaly that it works for dc++ also.

Best regards, nErBoS
--## nErBoS Spot ##--

plop

QuoteOriginally posted by nErBoS Try to use the program that plop has gave you, it works for mirc is probaly that it works for dc++ also.
it should work everywhere.

@ D-J Valhala: let your users install amip.
all they need 2 so is changing a couple settings 2 adjust it 2 there needs.
next all left 2 do is press the shortcut key and amip types the line for them.
having a script on the hub do this would mean there was a HUUUUUUUUUGE securety leak in dc++.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

D-J Valhala

i dont understand... thanks anyway  :D
My PsyIsrael Network
==================
--=[PsyIsrael DC Hub]=--
--=[PsyIsrael Website]=--
==================

D-J Valhala

thank you but this script is not work on any user only on the server winamp and i need stand alone script for ALL my users NOT only for me  :D
My PsyIsrael Network
==================
--=[PsyIsrael DC Hub]=--
--=[PsyIsrael Website]=--
==================

plop

QuoteOriginally posted by D-J Valhala
thank you but this script is not work on any user only on the server winamp and i need stand alone script for ALL my users NOT only for me  :D
again the same answer as i said before.
thats imposible.

thats why i gave the link 2 amip, it's a tool which add's this kind of feature 2 every dc client.
but the users should install it themself on there compies.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

D-J Valhala

ohhhhhhh now i get it lol thanks  :]
My PsyIsrael Network
==================
--=[PsyIsrael DC Hub]=--
--=[PsyIsrael Website]=--
==================

plop

QuoteOriginally posted by D-J Valhala
ohhhhhhh now i get it lol thanks  :]
yw

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Psycho_Chihuahua

#15
adjusted Mutor's Version to show the current Title every x minutes in Mainchat :)

-- Shoutcast interface through PtokaX script 

-- Author:  RabidWombat

-- Modded by: yepyepyep4711, Blackfox

-- Requirements: the winamp source of the shoutcast server 

-- is running on the hub server where this script is AND 

-- you have installed Clever (a GREAT utility) 

-- This is the version I downloaded for testing purposes 

-- [URL]http://www.jukkis.net/clever/clever_2_98.zip[/URL] 

-- This is site for all offered versions: 

-- [URL]http://www.jukkis.net/[/URL] 

-- Small changes by yepyepyep4711: 

-- Bot does not appear in user list, line is commented. Uncomment it to see it again 

-- Playlist now comes as a PM. Handy when it's big ; ) 

-- Incorporated "Play track number x of the playlist" command. ALL credit to RabidWombat : ) 

-- Minor help layout and text changes 

-- Added "Now Playing" command. Don't forget to change the station or link in the code---> Blackfox

-- Commented code. ---> Blackfox

-- Add Automated Display of whats running with Link by Psycho_Chihuahua requested by Laura_Gruft

sCleverDir = "C:\\clever\\"; --// Path to Clever.exe

sBotName = "-=HubRadio=-";  --// Name of Bot comes here

TimeSpanInMinutes = 1 --// Define Timespan between Messagesl in minutes

low = strlower; 


sHelpOutput = "Commands\r\n"; 

sOpHelpOutput = "Op Commands\r\n"; 

function Main() 

tCommands = { 

[low("!SC.next")] = { ShoutCastNext,1,"Play next song in playlist" }, 

[low("!SC.prev")] = { ShoutCastPrev,1,"Play prev song in playlist" }, 

[low("!SC.playlist")]= { ShoutCastPlayList,0,"Display playlist as PM" }, 

[low("!SC.playn")]= { ShoutCastPlayNumber,1,"Play track number x of the playlist" }, 

[low("!SC.play")]= { ShoutCastPlay,1,"Play" }, 

[low("!SC.pause")]= { ShoutCastPause,1,"Pause" }, 

[low("!SC.stop")]= { ShoutCastStop,1,"Stop" }, 

[low("!SC.np")]= { ShoutCastNp,1,"Display Now Playing" }, 

[low("!SC.status")]= { ShoutCastStatus,0,"Display status (Play/Stop/Pause)" }, 

[low("!SC.help")]= { ShoutCastHelp,0,"Help message" }, 

}; 


for sCmd, tCmd in tCommands do 

if(tCmd[2] == 1) then 

sOpHelpOutput = sOpHelpOutput..sCmd.."\t\t-\t"..tCmd[3].."\r\n"; 

else 

sHelpOutput = sHelpOutput..sCmd.."\t-\t"..tCmd[3].."\r\n"; 

end 

end 
SetTimer(TimeSpanInMinutes*60000) 
StartTimer() 
end

-- frmHub:RegBot(sBotName); -- uncomment to see bot in user list 



function DataArrival(curUser, sData) 

local s, e, cmd, args = strfind(sData, "%b<>%s+(%S+)%s*([^%|]*)%|$"); 


if(cmd == nil) then return 0; end 

cmd = strlower(cmd); 


if(tCommands[cmd] and (tCommands[cmd][2] == 0 or curUser.bOperator)) then 

curUser:SendData(sData); 

tCommands[cmd][1](curUser, args); 

return 1; 

end 

end 
----------------------- [Next command]

function ShoutCastNext() 

execute(sCleverDir.."clever.exe next"); 

end 
----------------------- [Prev command]

function ShoutCastPrev() 

execute(sCleverDir.."clever.exe prev"); 

end 
----------------------- [Playlist command]

function ShoutCastPlayList(curUser) 

execute(sCleverDir.."clever.exe playlist > output.tmp"); 

readfrom("output.tmp"); 


local line = read("*a"); 


if(line) then 

line = gsub(line, "\n", "\r\n"); 

curUser:SendPM(sBotName, "\r\n"..line); 

end 


readfrom(); 

end 
----------------------- [Play command]

function ShoutCastPlay() 

execute(sCleverDir.."clever.exe play"); 

end 
----------------------- [Play Track command]

function ShoutCastPlayNumber(curUser, args) 

if(args and tonumber(args)) then 

execute(sCleverDir.."clever.exe play "..tonumber(args)); 

end 

end 
----------------------- [Pause command]

function ShoutCastPause() 

execute(sCleverDir.."clever.exe pause"); 

end 
----------------------- [Stop command]

function ShoutCastStop() 

execute(sCleverDir.."clever.exe stop"); 

end 
----------------------- [Status command]

function ShoutCastStatus(curUser) 

execute(sCleverDir.."clever.exe status > output.tmp"); 


readfrom("output.tmp"); 


local line = read("*a"); 


if(line) then 

line = gsub(line, "\n", "\r\n"); 

curUser:SendData(sBotName, "\r\n"..line); 

end 


readfrom(); 

end 
----------------------- [Automated Display]

function OnTimer() 

execute(sCleverDir.."clever.exe songtitle > output.tmp"); 


readfrom("output.tmp"); 


local line = read("*a"); 


if(line) then 

line = gsub(line, "\n", "\r\n"); 

SendToAll(sBotName, "\r\n NowPlaying on [URL]http://transistorhijack.no-ip.org:8080:[/URL] "..line);  --// Change to your Shoutcast Address

end 


readfrom(); 

end 
----------------------- [Now Playing command]

function ShoutCastNp(curUser) 

execute(sCleverDir.."clever.exe songtitle > output.tmp"); 


readfrom("output.tmp"); 


local line = read("*a"); 


if(line) then 

line = gsub(line, "\n", "\r\n"); 

curUser:SendData(sBotName, "\r\n NowPlaying on [URL]http://transistorhijack.no-ip.org:8080:[/URL] "..line);  --// Change to your Shoutcast Address 

end 


readfrom(); 

end 
----------------------- [Help command]

function ShoutCastHelp(curUser) 

curUser:SendData(sBotName, sHelpOutput); 

if(curUser.bOperator) then 

curUser:SendData(sBotName, sOpHelpOutput); 

end 

end

It's working fine, but is there a way of shortening the code without losing the functions? Or do i have to use
----------------------- [Automated Display]

function OnTimer() 

execute(sCleverDir.."clever.exe songtitle > output.tmp"); 


readfrom("output.tmp"); 


local line = read("*a"); 


if(line) then 

line = gsub(line, "\n", "\r\n"); 

SendToAll(sBotName, "\r\n NowPlaying on [URL]http://transistorhijack.no-ip.org:8080:[/URL] "..line);  --// Change to your Shoutcast Address

end 


readfrom(); 

end

Well if someone could help me get the Automated Display to check say every minute if Songtitel has changed. If yes the it should show a message in Mainchat. if not then it shouldnt display the message as it has been shown already at start.
i hope you understand what i'm thinking about
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

SMF spam blocked by CleanTalk