Do the wave, man, do the wave
 

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

Do the wave, man, do the wave

Started by yepyepyep4711, 25 March, 2004, 19:56:27

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

yepyepyep4711

Hi all,

this is a script with a big WOW effect when you launch it. I promise :D

I post it here because it's working. It would be nice though if someone could add a on/off function, which it lacks. Previous tries of adding an on/off-switch were discarded because they caused the wave to carry only single words and no phrase anymore. Who's up to it?

-- Wave by DirtyFingers

wavepart = "??..??''???``''??..??_"

--          1234567890123456789012

pos = 1

wholewave = strrep(wavepart,4)


function Main()

SetTimer(200)

StartTimer()

end

function OnTimer()

if pos > 1 then 

pos = pos-1

else 

pos = 22

end

local c = strsub(wavepart,pos,pos)

wholewave = c..strsub(wholewave,1,strlen(wholewave)-1)

--SendToAll("",c.."\t"..strsub(wholewave,strlen(wholewave)-1,strlen(wholewave)-1))

SendToAll("*",wholewave.." <*>")

end


function DataArrival (curUser, sData)

local s,i

_,i = (strfind(sData,"<"..curUser.sName.."> "))

s = strsub(sData,i+1,strlen(sData)-1)

if strlen(s) < strlen(wholewave) then

wholewave = s .. strsub(wholewave,strlen(s))

else

wholewave = strsub(s,strlen(wholewave))

end

end

cheers

??????Hawk??????

-- Wave by DirtyFingers

wavepart = "??..??''???``''??..??_"

--          1234567890123456789012

pos = 1

wholewave = strrep(wavepart,4)


function Main()

SetTimer(200)

StartTimer()

end

function OnTimer()

if pos > 1 then 

pos = pos-1

else 

pos = 22

end

local c = strsub(wavepart,pos,pos)

wholewave = c..strsub(wholewave,1,strlen(wholewave)-1)

--SendToAll("",c.."\t"..strsub(wholewave,strlen(wholewave)-1,strlen(wholewave)-1))

SendToAll("*",wholewave.." <*>")

end


function DataArrival (curUser, sData)
command=strsub(sData,1,strlen(sData)-1)
s,e,cmd = strfind(command,"%b<>%s+(%S+)")
	if cmd=="+waveon" then
		StartTimer()
	elseif cmd=="+waveoff" then
		  StopTimer()
	end

local s,i

_,i = (strfind(sData,"<"..curUser.sName.."> "))

s = strsub(sData,i+1,strlen(sData)-1)

if strlen(s) < strlen(wholewave) then

wholewave = s .. strsub(wholewave,strlen(s))

else

wholewave = strsub(s,strlen(wholewave))

end

end

yepyepyep4711

That was veeeeeeeeery quick. And it works! Thanks Hawk : )

I made it to accept the commands only from ops, because that's how I use it. Cheers and thanks again!

-- Wave by DirtyFingers
-- on/off by Hawk
-- only ops can start/stop the wave by yepyepyep4711 (no, I don't expect anyone to be impressed ;D)



wavepart = "??..??''???``''??..??_"



--          1234567890123456789012



pos = 1



wholewave = strrep(wavepart,4)





function Main()



SetTimer(200)



StartTimer()



end



function OnTimer()



if pos > 1 then 



pos = pos-1



else 



pos = 22



end



local c = strsub(wavepart,pos,pos)



wholewave = c..strsub(wholewave,1,strlen(wholewave)-1)



--SendToAll("",c.."\t"..strsub(wholewave,strlen(wholewave)-1,strlen(wholewave)-1))



SendToAll("*",wholewave.." <*>")



end





function DataArrival (curUser, sData)

command=strsub(sData,1,strlen(sData)-1)

s,e,cmd = strfind(command,"%b<>%s+(%S+)")

if curUser.bOperator then

if cmd=="+waveon" then

StartTimer()

elseif cmd=="+waveoff" then

  StopTimer()

end

end


local s,i



_,i = (strfind(sData,"<"..curUser.sName.."> "))



s = strsub(sData,i+1,strlen(sData)-1)



if strlen(s) < strlen(wholewave) then



wholewave = s .. strsub(wholewave,strlen(s))



else



wholewave = strsub(s,strlen(wholewave))



end



end

yepyepyep4711

shit, I have to tamper that good mood. The sript works flawlessly, only PtokaX gives a
Syntax error: attempt to perform arithmetic on local `i' (a nil value)
stack traceback:
   1:  function `DataArrival' at line 116 [file `...gramme\PtokaX-0.330.b15.25.dbg\scripts\wave.lua']

any ideas?

H?LL?L?L??nG?L

#4
Its WOW definately ..Users were like this  8o  8o  8o Really fun script....... have the same error on the arithmetic tho :(

??????Hawk??????

sorry for delay .   wife took over mi  puter :-(

-- Wave by DirtyFingers
-- on/off by Hawk
-- only ops can start/stop the wave by yepyepyep4711 (no, I don't expect anyone to be impressed ;D)

wavepart = "??..??''???``''??..??_"
--          1234567890123456789012
pos = 1
wholewave = strrep(wavepart,4)

function Main()
SetTimer(200)
StartTimer()
end


function OnTimer()
if pos > 1 then 
pos = pos-1
else 
pos = 22
end
local c = strsub(wavepart,pos,pos)
wholewave = c..strsub(wholewave,1,strlen(wholewave)-1)
--SendToAll("",c.."\t"..strsub(wholewave,strlen(wholewave)-1,strlen(wholewave)-1))
SendToAll("*",wholewave.." <*>")
end


function DataArrival (curUser, sData)
	command=strsub(sData,1,strlen(sData)-1)
	s,e,cmd = strfind(command,"%b<>%s+(%S+)")
		if curUser.bOperator then
			if cmd=="+waveon" then
				StartTimer()
			elseif cmd=="+waveoff" then
  				StopTimer()
			end
		end
	local s,i
	_,i = (strfind(sData,"<"..curUser.sName.."> "))
		if i ~= nil then
			s = strsub(sData,i+1,strlen(sData)-1)
				if strlen(s) < strlen(wholewave) then
					wholewave = s .. strsub(wholewave,strlen(s))
				else
					wholewave = strsub(s,strlen(wholewave))
				end
		end
end

??????Hawk??????

try this one...

removed auto start and removed users message from disturbing the wave  

 -- Wave by DirtyFingers
-- on/off by Hawk
-- only ops can start/stop the wave by yepyepyep4711 (no, I don't expect anyone to be impressed ;D)

wavepart = "??..??''???``''??..??_"
--          1234567890123456789012
pos = 1
wholewave = strrep(wavepart,4)
active = 0
function Main()
SetTimer(200)
end


function OnTimer()
if pos > 1 then 
pos = pos-1
else 
pos = 22
end
local c = strsub(wavepart,pos,pos)
wholewave = c..strsub(wholewave,1,strlen(wholewave)-1)
--SendToAll("",c.."\t"..strsub(wholewave,strlen(wholewave)-1,strlen(wholewave)-1))
SendToAll("*",wholewave.." <*>")
end


function DataArrival (curUser, sData)
	command=strsub(sData,1,strlen(sData)-1)
	s,e,cmd = strfind(command,"%b<>%s+(%S+)")
		if curUser.bOperator then
			if cmd=="+waveon" then
				StartTimer()
				active = 1
			elseif cmd=="+waveoff" then
  				StopTimer()
				active = 0
			end
		end
			if active ~= 0 then
				local s,i
				_,i = (strfind(sData,"<"..curUser.sName.."> "))
					if i ~= nil then
						s = strsub(sData,i+1,strlen(sData)-1)
							if strlen(s) < strlen(wholewave) then
								wholewave = s .. strsub(wholewave,strlen(s))
							else
								wholewave = strsub(s,strlen(wholewave))
							end
					end
					return 1
			end
end

yepyepyep4711

oops, I hadn't realised it was capturing the pms as well.

It's not working though. The return 1 is a bad idea because it still posts the pms in the wave, but it also prevents them from reaching their destination. Both could cause major irritation.

So what we need is telling it to capture only the main chat, not any input.

Should anyone care, here's the last functioning version. Use wisely, because it's still posting the pms in the main at the moment.

-- Wave by DirtyFingers
-- on/off switch, off at start by Hawk
-- commands op only, debugging by yepyepyep4711

-- commands are +waveon/+waveoff, guess what they do ;)

wavepart = "??..??''???``''??..??_"

--          1234567890123456789012

pos = 1

wholewave = strrep(wavepart,4)

active = 0

function Main()

SetTimer(200)

end





function OnTimer()

if pos > 1 then 

pos = pos-1

else 

pos = 22

end

local c = strsub(wavepart,pos,pos)

wholewave = c..strsub(wholewave,1,strlen(wholewave)-1)

--SendToAll("",c.."\t"..strsub(wholewave,strlen(wholewave)-1,strlen(wholewave)-1))

SendToAll("*",wholewave.." <*>")

end





function DataArrival (curUser, sData)

command=strsub(sData,1,strlen(sData)-1)

s,e,cmd = strfind(command,"%b<>%s+(%S+)")

if curUser.bOperator then

if cmd=="+waveon" then

StartTimer()

active = 1

elseif cmd=="+waveoff" then

  StopTimer()

active = 0

end

end

if active ~= 0 then

local s,i

_,i = (strfind(sData,"<"..curUser.sName.."> "))

if i ~= nil then

s = strsub(sData,i+1,strlen(sData)-1)

if strlen(s) < strlen(wholewave) then

wholewave = s .. strsub(wholewave,strlen(s))

else

wholewave = strsub(s,strlen(wholewave))

end

end

--return 1

end

end

??????Hawk??????

#8
OK  i tested this  briefly   lemmi know if theres any probs:-))



-- Wave by DirtyFingers
-- on/off and more.. by Hawk 
-- only ops can start/stop the wave by yepyepyep4711 (no, I don't expect anyone to be impressed ;D)

wavepart = "??..??''???``''??..??_"
--          1234567890123456789012
pos = 1
wholewave = strrep(wavepart,4)
active = 0
function Main()
SetTimer(200)
end


function OnTimer()
if pos > 1 then 
pos = pos-1
else 
pos = 22
end
local c = strsub(wavepart,pos,pos)
wholewave = c..strsub(wholewave,1,strlen(wholewave)-1)
--SendToAll("",c.."\t"..strsub(wholewave,strlen(wholewave)-1,strlen(wholewave)-1))
SendToAll("*",wholewave.." <*>")
end


function DataArrival (curUser, sData)
		command=strsub(sData,1,strlen(sData)-1)
		s,e,cmd = strfind(command,"%b<>%s+(%S+)")
			if curUser.bOperator then
				if cmd=="+waveon" then
					StartTimer()
					active = 1
				elseif cmd=="+waveoff" then
  					StopTimer()
					active = 0
				end
			end
				if active ~= 0 then
					local s,i
					_,i = (strfind(sData,"<"..curUser.sName.."> "))
						if i ~= nil then
							s = strsub(sData,i+1,strlen(sData)-1)
								if ( strsub(sData, 1, 4) == "$To:" ) then
									s,e,g,h,j = strfind(sData,"$To:%s+(%S+)%s+From:%s+(%S+)%s+$%b<>%s+(.*)")
									j = strsub(j,1,strlen(j)-1)
									SendPmToNick(g,h,j)			
 								else	
									if strlen(s) < strlen(wholewave) then
										wholewave = s .. strsub(wholewave,strlen(s))
									else
										wholewave = strsub(s,strlen(wholewave))
									end
								end
						end
						return 1
				end
end

H?LL?L?L??nG?L

#9
Doesnt half make yer eyes go funny 8o   excellent sscript  tho...keepem coming  :P  :P  :P

H?LL?L?L??nG?L

Elo again been playing around with the script and discovered this
If u overload the wave with example:- an ascii (kinda big one) u loose your users. When i did it 1 by 1 my users dissapeared before my very eyes as i watched.......LOL strange 8o

gazzer

hi folks, how the hell do ya start it lol???
ive installed it and tried !waveon !wave !on and of course
!yepyepyep4711

nowt works for me lol
-=U=K=?=E=T=-???? the friendly network from good old blighty.

gazzer

ok its sorted i just need to wake up and read bloody script LOL
-=U=K=?=E=T=-???? the friendly network from good old blighty.

acethecase

:D  :D  :D LOL FUNNY SHIT!!! :D  :D  :D

??????Hawk??????

#14
QuoteIf u overload the wave with example:- an ascii (kinda big one) u loose your users. When i did it 1 by 1 my users dissapeared before my very eyes as i watched.......LOL strange

he he he  yea  its quite heavy on the hub you will lose users by connection timeout.  not the actual script disconnecting them but the hub being soo maxed out it cant reply to the users client

yepyepyep4711

YES!! Hawk, you're damn fast and you're the man. Congrats!

It's working, it does what it should, and doesn't generate errors.

Bravo :D

[NL]Pur

wooowooow

??..??''???``''??..??_??..??''???``''??..??_

SMF spam blocked by CleanTalk