hey @all
i have a idea 4 a script
but i can?t write it alone
the idea is
if user "ted" write in mainchat
hello
it looks like
hello
and now the script takes a random-name from the
users.dat maybe there is a user called "al"
the script makes it
hello
the script also exchanges the nicks in mainchat
additionally not only the nicks from users.dat
so some nicks from script
so nobody knows what nick comes next
i called it nickparty
i prefer the comands !npon
and !npoff
so i can turn on and off the nickparty
names = {
"Eddi",
"Fish",
"Faker",
"Leecher"
}
thats what i have but i really can?t write it alone for now
because im not good enought in lua
if party > 0 then
s,e,mes = strfind(data, "%b<> (.*)")
if mes == nil then
else
name=names[random(1, getn(names))]
SendToAll(name, mes)
return 1
end
is there one who will write this script?
HaL
Hi,
If i understood you want a script which changes the nick of a user when is talking, eg:
user writes hello it should appear this..
hello
but the script will make this ...
hello
and you want commands to turn on and off this ??
This command it should only be use by Operatores, right ??
Best regards, nErBoS
yes thats it
but the script should not only change the nicks with the nicks of the names table
there is a useres.dat in ptokax in this are all names of all registered users
the script also changes nicks with registered users and nicks from the table
thx 4 your reply nErBoS
Hi,
You are talking about RegisteredUser.dat it think is not a good ideia to work on that file.
ok can you tell me why do you think so?
its no problem for me to add the reg users to the names table , so you can forget the regusers.dat
:-)
HaL
Hi,
The script that i'm think on doing is no need to use the registereduser.dat the script will work to all connected users, execpt ops.
Best regards, nErBoS
Hi,
Hope it helps.....
--Requested by HaL
--Made by nErBoS
Bot = "Playing-Bot"
names = {
"Eddi",
"Fish",
"Faker",
"Leecher"
}
affect = {
"nErBoS"
} --Users that will be affected
play = "off" --Every time you restart script or hub the option play will be off
function Main()
frmHub:RegBot(Bot)
end
function DataArrival(user, data)
if (play == "on") then
for i=1, getn(affect) do
if strfind(data, affect[i]) then
s,e,msg = strfind(data,"%b<>%s+(.*)")
name=names[random(1, getn(names))]
SendToAll(name, msg)
return 1
end
end
end
if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if (cmd=="!play") then
s,e,opt = strfind(data,"%b<>%s+%S+%s+(%S+)")
if (opt == "on" or opt == "off") then
play = opt
user:SendPM(Bot, "The play has been put "..opt)
return 1
else
user:SendPM(Bot, "Syntax error, !play . ")
return 1
end
end
end
end
Best regards, nErBoS
thx nerbos the script works
but could you do some little changes?
the script does for now only change nicks that listet in affected nicks better is that every connected users nick would be changed
if the connected users nicks will be changed with nicks from connected users too would be perfect ;-)
turn on and off the script is allowed for every user better will be only for ops.
great job nErBoS
Hi,
Done..
--Requested by HaL
--Made by nErBoS
Bot = "Playing-Bot"
names = {
"Eddi",
"Fish",
"Faker",
"Leecher"
}
affect = {
"nErBoS"
} --Users that will be affected
play = "off" --Every time you restart script or hub the option play will be off
function Main()
frmHub:RegBot(Bot)
end
function DataArrival(user, data)
if (play == "on") then
for i=1, getn(affect) do
if strfind(data, affect[i]) or (not user.bOperator and strfind(data, user.sName)) then
s,e,msg = strfind(data,"%b<>%s+(.*)")
name=names[random(1, getn(names))]
SendToAll(name, msg)
return 1
end
end
end
if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if (cmd=="!play") then
if (user.bOperator) then
s,e,opt = strfind(data,"%b<>%s+%S+%s+(%S+)")
if (opt == "on" or opt == "off") then
play = opt
user:SendPM(Bot, "The play has been put "..opt)
return 1
else
user:SendPM(Bot, "Syntax error, !play . ")
return 1
end
else
user:SendPM(Bot, "You don't have permission to use this command.")
return 1
end
end
end
end
Best regards, nErBoS
thx nErBoS
that script was funny
great work :-)
i have one problem with the script :-)
i can?t stop it *lol
could some one fix it?
thx HaL
now i see i need a nick that was not affected
that could stop the nickparty :-)
:-)
Hi,
Any op can stop the script, if the op nick isn?t in the affect list of course, if you have all ops in the affected list the only way to stop it is to restart the script :)
Best regards, nErBoS
hi nErBoS
but the only way to restart the script ist to restart the hub
and the !restartscripts + !restart cmd does not work too
HaL
Hi,
The restartscript should do because i put the play = "off" to start off, instead of using a command try to do manualy. But don?t you have a op that isn?t affect with command to shut down ?? It?s hard that way to urn off the command.
Best regards, nErBoS