Hello I have little problem... I have this script:
--Bot ideato da 6Marilyn6Manson6 per il suo splendido amore ???L&J??? il 24 / 12 / 2004 alle 11.42
--Solo ???L&J??? pu? usare il comando azione
--Ah... dimenticavo: ???L&J??? TI AMO by JO ^__^
BotName="???UnaGocciaNell'Oceano???"
botspeed = "???UnaGocciaNell'Oceano???"
function Main()
frmHub:RegBot(BotName)
end
function GetCommand(message)
s,e,command=strfind(message,"(%S+)")
return command
end
function GetOneParam(message)
s,e,param1=strfind(message,"%S+%s(.*)")
return param1
end
function DataArrival(curUser, data)
if( strsub(data, 1, 1) == "<" ) then
data=strsub(data,1,strlen(data)-1)
s,e,message = strfind( data, "%b<>%s+(.*)")
command=GetCommand(message)
if (curUser.iProfile) == 0 and (curUser.sName) == Scripter then
if (command=="!amore") then
masstext=GetOneParam(message)
if (masstext~=nil) then
curUser:SendPM(BotName,"Un dolce messaggio da ???L&J???:")
SendPmToAll(BotName,masstext.." by "..curUser.sName)
return 1
else
curUser:SendPM(BotName,"Amore mio... hai sbagliato comando. La stringa giusta ? : !amore [ricorda che TI AMO by JO]")
end
end
end
end
end
but... If I have this:
--Bot ideato da 6Marilyn6Manson6 per il suo splendido amore ???L&J??? il 24 / 12 / 2004 alle 11.42
--Solo ???L&J??? pu? usare il comando azione
--Ah... dimenticavo: ???L&J??? TI AMO by JO ^__^
BotName="???UnaGocciaNell'Oceano???"
botspeed = "???UnaGocciaNell'Oceano???"
function Main()
frmHub:RegBot(BotName)
end
function GetCommand(message)
s,e,command=strfind(message,"(%S+)")
return command
end
function GetOneParam(message)
s,e,param1=strfind(message,"%S+%s(.*)")
return param1
end
function DataArrival(curUser, data)
if( strsub(data, 1, 1) == "<" ) then
data=strsub(data,1,strlen(data)-1)
s,e,message = strfind( data, "%b<>%s+(.*)")
command=GetCommand(message)
if (curUser.iProfile) == 0 and (curUser.sName) == ???L&J??? then
if (command=="!amore") then
masstext=GetOneParam(message)
if (masstext~=nil) then
curUser:SendPM(BotName,"Un dolce messaggio da ???L&J???:")
SendPmToAll(BotName,masstext.." by "..curUser.sName)
return 1
else
curUser:SendPM(BotName,"Amore mio... hai sbagliato comando. La stringa giusta ? : !amore [ricorda che TI AMO by JO]")
end
end
end
end
end
I have error in line 24... why? thanks
change this line
if (curUser.iProfile) == 0 and (curUser.sName) == ???L&J??? then
to
if (curUser.iProfile) == 0 and (curUser.sName) == "???L&J???" then
happy X-mas 2@ll
Quotes,e,command=strfind(message,"(%S+)")
small improvement you could do is to make all stringfinds local
Example:
local s,e,command=strfind(message,"(%S+)")
local s,e,param1=strfind(message,"%S+%s(.*)")
local s,e,message = strfind( data, "%b<>%s+(.*)")
local command=GetCommand(message)
Cheers;)
Thanks a lot Optimus ;)
Thanks a lot XSTETIC
thanks thanks ;)
Hello, I have request for my script:
--Bot ideato da 6Marilyn6Manson6 per il suo splendido amore ???L&J??? il 24 / 12 / 2004 alle 11.42
--Solo ???L&J??? pu? usare il comando azione
--Ah... dimenticavo: ???L&J??? TI AMO by JO ^__^
BotName="???UnaGocciaNell'Oceano???"
botspeed = "???UnaGocciaNell'Oceano???"
function Main()
frmHub:RegBot(BotName)
end
function GetCommand(message)
local s,e,command=strfind(message,"(%S+)")
return command
end
function GetOneParam(message)
local s,e,param1=strfind(message,"%S+%s(.*)")
return param1
end
function DataArrival(curUser, data)
if( strsub(data, 1, 1) == "<" ) then
data=strsub(data,1,strlen(data)-1)
local s,e,message = strfind( data, "%b<>%s+(.*)")
local command=GetCommand(message)
if (curUser.iProfile) == 0 and (curUser.sName) == "???L&J???" then
if (command=="!amore") then
local masstext=GetOneParam(message)
if (masstext~=nil) then
curUser:SendPM(BotName,"Un dolce messaggio da ???L&J???:")
SendPmToAll(BotName,masstext.." by "..curUser.sName)
return 1
else
curUser:SendPM(BotName,"Amore mio... hai sbagliato comando. La stringa giusta ? : !amore [ricorda che TI AMO by JO]")
end
end
end
end
end
I want add information of bot... share, description, email, connection type... Thanks
I changed your script above so the variables are local that is better and faster. This way they are removed from memory after they are used.
Sorry had to do that lOOL
I don't understand :P
Take a closer look at the script you posted i changed it there. You will see what i changed then
Example I want this:
--Bot ideato da 6Marilyn6Manson6 per il suo splendido amore ???L&J??? il 24 / 12 / 2004 alle 11.42
--Solo ???L&J??? pu? usare il comando azione
--Ah... dimenticavo: ???L&J??? TI AMO by JO ^__^
BotName="???UnaGocciaNell'Oceano???"
botspeed = "???UnaGocciaNell'Oceano???"
function Main()
frmHub:RegBot(BotName)
Bot_Share_Size = 0.0 * 1024 *1024
Bot_email = "6marilyn6manson6@aliceposta.it"
Bot_Speed = "DSL"
Bot_TAG = "< AmOrE : V:0.1 >"
Bot_Descr = "< Made by: 6Marilyn6Manson6 >"
end
function GetCommand(message)
s,e,command=strfind(message,"(%S+)")
return command
end
function GetOneParam(message)
s,e,param1=strfind(message,"%S+%s(.*)")
return param1
end
function DataArrival(curUser, data)
if( strsub(data, 1, 1) == "<" ) then
data=strsub(data,1,strlen(data)-1)
s,e,message = strfind( data, "%b<>%s+(.*)")
command=GetCommand(message)
if (curUser.iProfile) == 0 and (curUser.sName) == "???L&J???" then
if (command=="!amore") then
masstext=GetOneParam(message)
if (masstext~=nil) then
curUser:SendPM(BotName,"Un dolce messaggio da ???L&J???:")
SendPmToAll(BotName,masstext.." by "..curUser.sName)
return 1
else
curUser:SendPM(BotName,"Amore mio... hai sbagliato comando. La stringa giusta ? : !amore [ricorda che TI AMO by JO]")
end
end
end
end
end
not have syntax error...... but information not found :(
--Bot ideato da 6Marilyn6Manson6 per il suo splendido amore ???L&J??? il 24 / 12 / 2004 alle 11.42
--Solo ???L&J??? pu? usare il comando azione
--Ah... dimenticavo: ???L&J??? TI AMO by JO ^__^
BotName="???UnaGocciaNell'Oceano???"
BotEmail = "6marilyn6manson6@aliceposta.it"
BotSpeed = "DSL"
BotTag = "< AmOrE : V:0.1 >"
MyInfoString = "$MyINFO $ALL "..BotName.." "..BotTag.."$ $"..BotSpeed..strchar( 1 ).."$"..BotEmail.."$"
function Main()
frmHub:RegBot(BotName)
SendToAll(MyInfoString)
end
function GetCommand(message)
local s,e,command=strfind(message,"(%S+)")
return command
end
function GetOneParam(message)
local s,e,param1=strfind(message,"%S+%s(.*)")
return param1
end
function DataArrival(curUser, data)
if( strsub(data, 1, 1) == "<" ) then
data=strsub(data,1,strlen(data)-1)
local s,e,message = strfind( data, "%b<>%s+(.*)")
local command=GetCommand(message)
if (curUser.iProfile) == 0 and (curUser.sName) == "???L&J???" then
if (command=="!amore") then
local masstext=GetOneParam(message)
if (masstext~=nil) then
curUser:SendPM(BotName,"Un dolce messaggio da ???L&J???:")
SendPmToAll(BotName,masstext.." by "..curUser.sName)
return 1
else
curUser:SendPM(BotName,"Amore mio... hai sbagliato comando. La stringa giusta ? : !amore [ricorda che TI AMO by JO]")
end
end
end
end
end
That should work... =)
No need to write BotShare, it will get 0 anyway...
madman thanks a lot ^__^
6Marilyn6Manson6 i need to say this.
if you wane learn something you need to listen better to the advice you have been given. I even gave away the hint how todo it.
And what do i see you post the same ugly script with out the locals again. hum hum
Is it so hard to read/listen and following advice you have been given.
You now give me the idea to not help you any more cause it is a wast of time.
Is that what you want?
You can learn so much on this forum but you just don't see it or care.
This is just a advice you don't need to follow it.
Greetingz Optimus
No optimus no no.... I want your help and of all... I'm not have seed your changes, and i'm really sorry for this. I'm sorry for all... It's don't happen again...Sorry