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
-- 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
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
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?
Its WOW definately ..Users were like this 8o 8o 8o Really fun script....... have the same error on the arithmetic tho :(
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
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
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
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
Doesnt half make yer eyes go funny 8o excellent sscript tho...keepem coming :P :P :P
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
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
ok its sorted i just need to wake up and read bloody script LOL
:D :D :D LOL FUNNY SHIT!!! :D :D :D
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
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
wooowooow
??..??''???``''??..??_??..??''???``''??..??_