hi ppl
i make one anti advertise ( with help from others antiadvertises)
i get this error :
[17:22] Syntax ...r\Ambiente de trabalho\0.3.3.0.b17.08.nt.dbg\scripts\antipub simples.lua:48: expected near `end'
the script is this :
BotName = "?GNR??"
adverTable = {"dns2go","myftpsite","servebeer","mine.nu","ip.com","dynip","depecheconnect.com","zapto.org",
"staticip","serveftp","ipactive","ip.org","no-ip","servegame","gotdns.org","ip.net","ip.co.uk",
"ath.cx","dyndns","68.67.18.75","clanpimp","idlegames","sytes","unusualperson.com",
"24.184.64.48","uni.cc","151.198.149.60","homeunix","24.209.232.97","ciscofreak.com",
"deftonzs.com","24.187.50.121","flamenap","xs4all","serveftp","point2this.com","ip.info",
"myftp","d2g","151.198.149.60","24.184.64.48","orgdns","myip.org","stufftoread.com",
"ip.biz","dynu.com","mine.org","kick-ass.net","darkdata.net","ipme.net","udgnet.com","homeip.net",
"e-net.lv","newgnr.com","bst.net","bsd.net","ods.org","x-host","bounceme.net","myvnc.com",
"kyed.com","lir.dk","finx.org","sheckie.net","vizvaz.net","snygging.net","kicks-ass.com","nerdcamp.net",
"cicileu.","3utilities.com","myftp.biz","redirectme.net","servebeer.com","servecounterstrike.com",
"servehalflife.com","servehttp.com","serveirc.com","servemp3.com","servepics.com","servequake.com",
"damnserver.com","ditchyourip.com","dnsiskinky.com","geekgalaxy.com","net-freaks.com","ip.ca",
"securityexploits.com","securitytactics.com","servehumour.com","servep2p.com","servesarcasm.com",
"workisboring.com","hopto","64.246.26.135","213.145.29.222","dnsalias"}
validtrigs = {"Bop2Bop.sytes.net","http://p2p-pt.com/listadinamica/PublicHubList.config"}
function Main()
frmHub:RegBot(BotName)
SetTimer(60000)
StartTimer()
end
function OnTimer()
for key, value in tabAdvert do
if (adverTable[key].iClock > os.clock()+60) then
adverTable[key]=nil
end
end
end
function ChatArrival(user,data)
if not user.bOperator then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|")
if checkForAdvertising(msg) then
SendToAll( BotName, user.sName.." levou kom BAN pk: | -=PUB=- UsersIP: "..user.sIP.." \r\n ________________________]_ ` . ' . ? \r\n -__////_(____)_______________0 ---------S? kero anunciar k o user "..user.sName.." foi kickado por fazer PUB---------=> \r\n ) @ ___9mm___ _______\_/ . ? . ` . \r\n /-------/( __ // \r\n / xxx /___// \r\n / xxxxx // \r\n / xxxxx // \r\n /____ _/ \r\n ")
user:SendData(BotName,"*** You have been kicked for advertising !!")
SendPmToOps(BotName,"*** User "..user.sName.." has been kicked for advertising: "..msg)
user:Disconnect();
user:TimeBan(90);
end
end
end
end
function ToArrival(user,data)
if not user.bOperator then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|$")
if checkForAdvertising(msg) then
if Verify(userdata, msg) then
SendToAll( BotName, user.sName.." levou kom BAN pk: | -=PUB=- UsersIP: "..user.sIP.." \r\n ________________________]_ ` . ' . ? \r\n -__////_(____)_______________0 ---------S? kero anunciar k o user "..user.sName.." foi kickado por fazer PUB---------=> \r\n ) @ ___9mm___ _______\_/ . ? . ` . \r\n /-------/( __ // \r\n / xxx /___// \r\n / xxxxx // \r\n / xxxxx // \r\n /____ _/ \r\n ")
user:SendData(BotName,"*** You have been kicked for advertising !!")
SendPmToOps(BotName,"*** User "..user.sName.." has been kicked for advertising: "..msg)
user:Disconnect();
user:TimeBan(90);
end
end
end
end
function checkForAdvertising(msg)
for i = 1,table.getn(adverTable) do
if string.find( msg , adverTable[i] , 1 , true ) then
return 1
end
end
return
end
and i want to add a safe advertise and
this:
no-
ip.
com
you now what i mean
but i cant find the error and i cant make this options , i tried but i cant
help me please
Loading
hi ppl
i resolved the error :)
but i want to get the safe advertise ( validtrigs ) and this:
no-
ip.
com
can anyone help me ?
Give this a try:BotName = "?GNR??"
adverTable = {"dns2go","myftpsite","servebeer","mine.nu","ip.com","dynip","depecheconnect.com","zapto.org",
"staticip","serveftp","ipactive","ip.org","no-ip","servegame","gotdns.org","ip.net","ip.co.uk",
"ath.cx","dyndns","68.67.18.75","clanpimp","idlegames","sytes","unusualperson.com",
"24.184.64.48","uni.cc","151.198.149.60","homeunix","24.209.232.97","ciscofreak.com",
"deftonzs.com","24.187.50.121","flamenap","xs4all","serveftp","point2this.com","ip.info",
"myftp","d2g","151.198.149.60","24.184.64.48","orgdns","myip.org","stufftoread.com",
"ip.biz","dynu.com","mine.org","kick-ass.net","darkdata.net","ipme.net","udgnet.com","homeip.net",
"e-net.lv","newgnr.com","bst.net","bsd.net","ods.org","x-host","bounceme.net","myvnc.com",
"kyed.com","lir.dk","finx.org","sheckie.net","vizvaz.net","snygging.net","kicks-ass.com","nerdcamp.net",
"cicileu.","3utilities.com","myftp.biz","redirectme.net","servebeer.com","servecounterstrike.com",
"servehalflife.com","servehttp.com","serveirc.com","servemp3.com","servepics.com","servequake.com",
"damnserver.com","ditchyourip.com","dnsiskinky.com","geekgalaxy.com","net-freaks.com","ip.ca",
"securityexploits.com","securitytactics.com","servehumour.com","servep2p.com","servesarcasm.com",
"workisboring.com","hopto","64.246.26.135","213.145.29.222","dnsalias"}
validtrigs = {"Bop2Bop.sytes.net","http://p2p-pt.com/listadinamica/PublicHubList.config"}
function Main()
frmHub:RegBot(BotName)
SetTimer(60000)
StartTimer()
end
function OnTimer()
for key, value in tabAdvert do
if (adverTable[key].iClock > os.clock()+60) then
adverTable[key]=nil
end
end
end
function ChatArrival(user,data)
if not user.bOperator then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|")
if checkForAdvertising(msg) then
SendToAll( BotName, user.sName.." levou kom BAN pk: | -=PUB=- UsersIP: "..user.sIP.." \r\n ________________________]_ ` . ' . ? \r\n -__////_(____)_______________0 ---------S? kero anunciar k o user "..user.sName.." foi kickado por fazer PUB---------=> \r\n ) @ ___9mm___ _______\_/ . ? . ` . \r\n /-------/( __ // \r\n / xxx /___// \r\n / xxxxx // \r\n / xxxxx // \r\n /____ _/ \r\n ")
user:SendData(BotName,"*** You have been kicked for advertising !!")
SendPmToOps(BotName,"*** User "..user.sName.." has been kicked for advertising: "..msg)
user:Disconnect();
user:TimeBan(90);
end
end
end
function ToArrival(user,data)
if not user.bOperator then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|$")
if checkForAdvertising(msg) then
if Verify(userdata, msg) then
SendToAll( BotName, user.sName.." levou kom BAN pk: | -=PUB=- UsersIP: "..user.sIP.." \r\n ________________________]_ ` . ' . ? \r\n -__////_(____)_______________0 ---------S? kero anunciar k o user "..user.sName.." foi kickado por fazer PUB---------=> \r\n ) @ ___9mm___ _______\_/ . ? . ` . \r\n /-------/( __ // \r\n / xxx /___// \r\n / xxxxx // \r\n / xxxxx // \r\n /____ _/ \r\n ")
user:SendData(BotName,"*** You have been kicked for advertising !!")
SendPmToOps(BotName,"*** User "..user.sName.." has been kicked for advertising: "..msg)
user:Disconnect();
user:TimeBan(90);
end
end
end
end
function checkForAdvertising(msg)
for i = 1,table.getn(adverTable) do
if string.find( msg , adverTable[i] , 1 , true ) then
return 1
end
end
return
end
I suggest edit your scripts using NotePad++ (http://sourceforge.net/projects/notepad-plus/) , it will help you much..
hi GeceBekcisi for help me in one of my problems
but i get this error :
[18:05] Syntax ...ho\0.3.3.0.b17.08.nt.dbg\scripts\antipub simples.lua:53: attempt to call field `iClock' (a nil value)
so i make the script like this :
BotName = "?GNR??"
adverTable = {"dns2go","myftpsite","servebeer","mine.nu","ip.com","dynip","depecheconnect.com","zapto.org",
"staticip","serveftp","ipactive","ip.org","no-ip","servegame","gotdns.org","ip.net","ip.co.uk",
"ath.cx","dyndns","68.67.18.75","clanpimp","idlegames","sytes","unusualperson.com",
"24.184.64.48","uni.cc","151.198.149.60","homeunix","24.209.232.97","ciscofreak.com",
"deftonzs.com","24.187.50.121","flamenap","xs4all","serveftp","point2this.com","ip.info",
"myftp","d2g","151.198.149.60","24.184.64.48","orgdns","myip.org","stufftoread.com",
"ip.biz","dynu.com","mine.org","kick-ass.net","darkdata.net","ipme.net","udgnet.com","homeip.net",
"e-net.lv","newgnr.com","bst.net","bsd.net","ods.org","x-host","bounceme.net","myvnc.com",
"kyed.com","lir.dk","finx.org","sheckie.net","vizvaz.net","snygging.net","kicks-ass.com","nerdcamp.net",
"cicileu.","3utilities.com","myftp.biz","redirectme.net","servebeer.com","servecounterstrike.com",
"servehalflife.com","servehttp.com","serveirc.com","servemp3.com","servepics.com","servequake.com",
"damnserver.com","ditchyourip.com","dnsiskinky.com","geekgalaxy.com","net-freaks.com","ip.ca",
"securityexploits.com","securitytactics.com","servehumour.com","servep2p.com","servesarcasm.com",
"workisboring.com","hopto","64.246.26.135","213.145.29.222","dnsalias"}
validtrigs = {"Bop2Bop.sytes.net","http://p2p-pt.com/listadinamica/PublicHubList.config"}
function Main()
frmHub:RegBot(BotName)
end
function ChatArrival(user,data)
if not user.bOperator then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|")
if checkForAdvertising(msg) then
SendToAll( BotName, user.sName.." levou kom BAN pk: | -=PUB=- UserIP: "..user.sIP.." \r\n ________________________]_ ` . ' . ? \r\n -__////_(____)_______________0 ---------S? kero anunciar k o user "..user.sName.." foi kickado por fazer PUB---------=> \r\n ) @ ___9mm___ _______\_/ . ? . ` . \r\n /-------/( __ // \r\n / xxx /___// \r\n / xxxxx // \r\n / xxxxx // \r\n /____ _/ \r\n ")
user:SendData(BotName,"*** You have been kicked for advertising !!")
user:SendPM(BotName, "Bom, komo v?s fazer PUB nao kompensa. Para a pr?xima pensa duas Vezes ( [NET]Loading ).")
SendPmToOps(BotName,"*** O User "..user.sName.." com o IP "..user.sIP.." Foi kikado por fazer publicidade, ele disse: "..msg)
user:Disconnect();
user:TimeBan(120);
end
end
end
function ToArrival(user,data)
if not user.bOperator then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|$")
if checkForAdvertising(msg) then
if Verify(userdata, msg) then
SendToAll( BotName, user.sName.." levou kom BAN pk: | -=PUB=- UserIP: "..user.sIP.." \r\n ________________________]_ ` . ' . ? \r\n -__////_(____)_______________0 ---------S? kero anunciar k o user "..user.sName.." foi kickado por fazer PUB---------=> \r\n ) @ ___9mm___ _______\_/ . ? . ` . \r\n /-------/( __ // \r\n / xxx /___// \r\n / xxxxx // \r\n / xxxxx // \r\n /____ _/ \r\n ")
user:SendData(BotName,"*** You have been kicked for advertising !!")
user:SendPM(BotName, "Bom, komo v?s fazer PUB nao kompensa. Para a pr?xima pensa duas Vezes ( [NET]Loading ).")
SendPmToOps(BotName,"*** O User "..user.sName.." com o IP "..user.sIP.." Foi kikado por fazer publicidade, ele disse: "..msg)
user:Disconnect();
user:TimeBan(120);
end
end
end
end
function checkForAdvertising(msg)
for i = 1,table.getn(adverTable) do
if string.find( msg , adverTable[i] , 1 , true ) then
return 1
end
end
return
end
but can you tell me what you modified to stop the error ?
i want to learn :)
but i want to get the safe advertise ( validtrigs ) and stop this:
no-
ip.
com
can anyone help ?
Loading
have a look at lucifer 666, it should help u
hi dessamator
i use the lucifer 666 script and is very functional , but i want to make my own script with the same functions or better
if you know a way to make this script more simple them lucifer
help me please
i just need a validtrigs and a advertise block to:
no-
ip.
com
( and other adresses in the same way )
i make this script based in lucifer script
best regards
Loading
Just removed an "end" from line 47. I am learning too; so I am not knowing enough to stop advertising messages divided by lines.
Just give this a try m8..BotName = "?GNR??"
adverTable = {"dns2go","myftpsite","servebeer","mine.nu","ip.com","dynip","depecheconnect.com","zapto.org",
"staticip","serveftp","ipactive","ip.org","no-ip","servegame","gotdns.org","ip.net","ip.co.uk",
"ath.cx","dyndns","68.67.18.75","clanpimp","idlegames","sytes","unusualperson.com",
"24.184.64.48","uni.cc","151.198.149.60","homeunix","24.209.232.97","ciscofreak.com",
"deftonzs.com","24.187.50.121","flamenap","xs4all","serveftp","point2this.com","ip.info",
"myftp","d2g","151.198.149.60","24.184.64.48","orgdns","myip.org","stufftoread.com",
"ip.biz","dynu.com","mine.org","kick-ass.net","darkdata.net","ipme.net","udgnet.com","homeip.net",
"e-net.lv","newgnr.com","bst.net","bsd.net","ods.org","x-host","bounceme.net","myvnc.com",
"kyed.com","lir.dk","finx.org","sheckie.net","vizvaz.net","snygging.net","kicks-ass.com","nerdcamp.net",
"cicileu.","3utilities.com","myftp.biz","redirectme.net","servebeer.com","servecounterstrike.com",
"servehalflife.com","servehttp.com","serveirc.com","servemp3.com","servepics.com","servequake.com",
"damnserver.com","ditchyourip.com","dnsiskinky.com","geekgalaxy.com","net-freaks.com","ip.ca",
"securityexploits.com","securitytactics.com","servehumour.com","servep2p.com","servesarcasm.com",
"workisboring.com","hopto","64.246.26.135","213.145.29.222","dnsalias"
}
validtrigs = {"Bop2Bop.sytes.net","http://p2p-pt.com/listadinamica/PublicHubList.config"}
function Main()
frmHub:RegBot(BotName)
end
function ChatArrival(user,data)
if not user.bOperator then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|")
if SafeAdCheck(msg) then
return 0
else
if checkForAdvertising(msg) then
SendToAll( BotName, user.sName.." levou kom BAN pk: | -=PUB=- UserIP: "..user.sIP.." \r\n ________________________]_ ` . ' . ? \r\n -__////_(____)_______________0 ---------S? kero anunciar k o user "..user.sName.." foi kickado por fazer PUB---------=> \r\n ) @ ___9mm___ _______\_/ . ? . ` . \r\n /-------/( __ // \r\n / xxx /___// \r\n / xxxxx // \r\n / xxxxx // \r\n /____ _/ \r\n ")
user:SendData(BotName,"*** You have been kicked for advertising !!")
user:SendPM(BotName, "Bom, komo v?s fazer PUB nao kompensa. Para a pr?xima pensa duas Vezes ( [NET]Loading ).")
SendPmToOps(BotName,"*** O User "..user.sName.." com o IP "..user.sIP.." Foi kikado por fazer publicidade, ele disse: "..msg)
user:Disconnect();
user:TimeBan(120);
end
end
end
end
function ToArrival(user,data)
if not user.bOperator then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|$")
if SafeAdCheck(msg) then
return 0
else
if checkForAdvertising(msg) then
SendToAll( BotName, user.sName.." levou kom BAN pk: | -=PUB=- UserIP: "..user.sIP.." \r\n ________________________]_ ` . ' . ? \r\n -__////_(____)_______________0 ---------S? kero anunciar k o user "..user.sName.." foi kickado por fazer PUB---------=> \r\n ) @ ___9mm___ _______\_/ . ? . ` . \r\n /-------/( __ // \r\n / xxx /___// \r\n / xxxxx // \r\n / xxxxx // \r\n /____ _/ \r\n ")
user:SendData(BotName,"*** You have been kicked for advertising !!")
user:SendPM(BotName, "Bom, komo v?s fazer PUB nao kompensa. Para a pr?xima pensa duas Vezes ( [NET]Loading ).")
SendPmToOps(BotName,"*** O User "..user.sName.." com o IP "..user.sIP.." Foi kikado por fazer publicidade, ele disse: "..msg)
user:Disconnect();
user:TimeBan(120);
end
end
end
end
function checkForAdvertising(msg)
for i = 1,table.getn(adverTable) do
if string.find( msg , adverTable[i] , 1 , true ) then
return 1
end
end
end
function SafeAdCheck(msg)
for i = 1,table.getn(validtrigs) do
if string.find( msg , validtrigs[i] , 1 , true ) then
return 1
end
end
end
thanks GeceBekcisi for the help :)
the script i know ho make this antiadvertise divided in lines is the lucifer 666 script
but y wanto to make one script ho make the same thing but more simple and make validtrigs in the script ( like my hub and the public list )
validtrigs = {"Bop2Bop.sytes.net","http://p2p-pt.com/listadinamica/PublicHubList.config"}
best regards
Loading
maybe lucifer was made in that way because its the simplest !
ok i found a way to make safe advertises but
i get this error :
[20:28] Syntax ...abalho\0.3.3.0.b17.08.nt.dbg\scripts\DevilScript.lua:87: attempt to call global `SaveToFile' (a nil value)
this error apears when i make the command : !addsafe
the script is now like this :
BotName = "?Bop2Bop??" --Nome do bot antipub
adverTable = {"dns2go","myftpsite","servebeer","mine.nu","ip.com","dynip","depecheconnect.com","zapto.org",
"staticip","serveftp","ipactive","ip.org","no-ip","servegame","gotdns.org","ip.net","ip.co.uk",
"ath.cx","dyndns","68.67.18.75","clanpimp","idlegames","sytes","unusualperson.com",
"24.184.64.48","uni.cc","151.198.149.60","homeunix","24.209.232.97","ciscofreak.com",
"deftonzs.com","24.187.50.121","flamenap","xs4all","serveftp","point2this.com","ip.info",
"myftp","d2g","151.198.149.60","24.184.64.48","orgdns","myip.org","stufftoread.com",
"ip.biz","dynu.com","mine.org","kick-ass.net","darkdata.net","ipme.net","udgnet.com","homeip.net",
"e-net.lv","newgnr.com","bst.net","bsd.net","ods.org","x-host","bounceme.net","myvnc.com",
"kyed.com","lir.dk","finx.org","sheckie.net","vizvaz.net","snygging.net","kicks-ass.com","nerdcamp.net",
"cicileu.","3utilities.com","myftp.biz","redirectme.net","servebeer.com","servecounterstrike.com",
"servehalflife.com","servehttp.com","serveirc.com","servemp3.com","servepics.com","servequake.com",
"damnserver.com","ditchyourip.com","dnsiskinky.com","geekgalaxy.com","net-freaks.com","ip.ca",
"securityexploits.com","securitytactics.com","servehumour.com","servep2p.com","servesarcasm.com",
"workisboring.com","hopto","64.246.26.135","213.145.29.222","dnsalias"}
vFile = "validtrigs.tbl" -- file where the safe advertise triggs are stored
vTrigs = {} -- don't change this
controltrigs={["boi"]=1,["speed"]=2,["eski"]=3, ["grime"]=4, ["bbv"]=5, ["bigboi"]=6} --insert here addresses you want to be informed (no kick)
tabAdvert = {}
function Main()
frmHub:RegBot(BotName)
end
function ChatArrival(user,data)
local data = string.sub(data,1,-2)
if user.bOperator then
local s,e,cmd = string.find(data,"%b<>%s+(%S+)")
if cmd == "!showsafe" then
if not next(vTrigs) then
user:SendData(BotName,"*** Error: There aren't any Safe Addresses.")
else
local msg = "\r\n\r\n".."\t??????????????????????????????????".."\r\n"
msg = msg.."\t ? Current Safe Addresses ?".."\r\n"
msg = msg.."\t??????????????????????????????????".."\r\n"
local address,value
for address, value in vTrigs do msg = msg.."\t ? "..address.."\r\n" end
user:SendPM(BotName,msg)
end
return 1
end
local s,e,trig = string.find(data,"%b<>%s+%S+%s+(%S+)")
if cmd and trig then
if cmd == "!addsafe" then
vTrigs[trig] = 1
user:SendData(BotName,trig.." has been successfully added to the Safe Address List.")
SaveToFile(vFile,vTrigs,"vTrigs")
return 1
elseif cmd == "!delsafe" then
if vTrigs[trig] == 1 then
vTrigs[trig] = nil
user:SendData(BotName,trig.." has been successfully removed from the Safe Address List.")
SaveToFile(vFile,vTrigs,"vTrigs")
else
user:SendData(BotName,"There is no Safe Address: "..trig)
end
return 1
end
end
end
if not user.bOperator then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|")
if checkForAdvertising(msg) then
SendToAll( BotName, user.sName.." levou kom BAN pk: | -=PUB=- UserIP: "..user.sIP.." \r\n ________________________]_ ` . ' . ? \r\n -__////_(____)_______________0 ---------S? kero anunciar k o user "..user.sName.." foi kickado por fazer PUB---------=> \r\n ) @ ___9mm___ _______\_/ . ? . ` . \r\n /-------/( __ // \r\n / xxx /___// \r\n / xxxxx // \r\n / xxxxx // \r\n /____ _/ \r\n ")
user:SendData(BotName,"*** Foste Kikado por fazer Publicidade !!")
user:SendPM(BotName, "Bom, komo v?s fazer PUB nao kompensa. Para a pr?xima pensa duas Vezes ( [NET]Loading ).")
SendPmToOps(BotName,"*** O User "..user.sName.." com o IP: "..user.sIP.." Foi kikado por fazer publicidade, ele disse: "..msg)
user:Disconnect();
user:TimeBan(120);
end
end
end
function ToArrival(user,data)
if not user.bOperator then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|$")
if checkForAdvertising(msg) then
if Verify(userdata, msg) then
SendToAll( BotName, user.sName.." levou kom BAN pk: | -=PUB=- UserIP: "..user.sIP.." \r\n ________________________]_ ` . ' . ? \r\n -__////_(____)_______________0 ---------S? kero anunciar k o user "..user.sName.." foi kickado por fazer PUB---------=> \r\n ) @ ___9mm___ _______\_/ . ? . ` . \r\n /-------/( __ // \r\n / xxx /___// \r\n / xxxxx // \r\n / xxxxx // \r\n /____ _/ \r\n ")
user:SendData(BotName,"*** Foste Kikado por fazer Publicidade !!")
user:SendPM(BotName, "Bom, komo v?s fazer PUB nao kompensa. Para a pr?xima pensa duas Vezes ( [NET]Loading ).")
SendPmToOps(BotName,"*** O User "..user.sName.." com o IP: "..user.sIP.." Foi kikado por fazer publicidade, ele disse: "..msg)
user:Disconnect();
user:TimeBan(120);
end
end
end
end
function checkForAdvertising(msg)
for i = 1,table.getn(adverTable) do
if string.find( msg , adverTable[i] , 1 , true ) then
return 1
end
end
return
end
anyone ca help me with this error ?
best regards
Loading
i make the script like this :
BotName = "?Bop2Bop??" --Nome do bot antipub
adverTable = {"dns2go","myftpsite","servebeer","mine.nu","ip.com","dynip","depecheconnect.com","zapto.org",
"staticip","serveftp","ipactive","ip.org","no-ip","servegame","gotdns.org","ip.net","ip.co.uk",
"ath.cx","dyndns","68.67.18.75","clanpimp","idlegames","sytes","unusualperson.com",
"24.184.64.48","uni.cc","151.198.149.60","homeunix","24.209.232.97","ciscofreak.com",
"deftonzs.com","24.187.50.121","flamenap","xs4all","serveftp","point2this.com","ip.info",
"myftp","d2g","151.198.149.60","24.184.64.48","orgdns","myip.org","stufftoread.com",
"ip.biz","dynu.com","mine.org","kick-ass.net","darkdata.net","ipme.net","udgnet.com","homeip.net",
"e-net.lv","newgnr.com","bst.net","bsd.net","ods.org","x-host","bounceme.net","myvnc.com",
"kyed.com","lir.dk","finx.org","sheckie.net","vizvaz.net","snygging.net","kicks-ass.com","nerdcamp.net",
"cicileu.","3utilities.com","myftp.biz","redirectme.net","servebeer.com","servecounterstrike.com",
"servehalflife.com","servehttp.com","serveirc.com","servemp3.com","servepics.com","servequake.com",
"damnserver.com","ditchyourip.com","dnsiskinky.com","geekgalaxy.com","net-freaks.com","ip.ca",
"securityexploits.com","securitytactics.com","servehumour.com","servep2p.com","servesarcasm.com",
"workisboring.com","hopto","64.246.26.135","213.145.29.222","dnsalias"}
vFile = "validtrigs.tbl" -- file where the safe advertise triggs are stored
vTrigs = {} -- don't change this
controltrigs={["boi"]=1,["speed"]=2,["eski"]=3, ["grime"]=4, ["bbv"]=5, ["bigboi"]=6} --insert here addresses you want to be informed (no kick)
tabAdvert = {}
function Main()
frmHub:RegBot(BotName)
end
function ChatArrival(user,data)
local data = string.sub(data,1,-2)
if user.bOperator then
local s,e,cmd = string.find(data,"%b<>%s+(%S+)")
if cmd == "!showsafe" then
if not next(vTrigs) then
user:SendData(BotName,"*** Error: There aren't any Safe Addresses.")
else
local msg = "\r\n\r\n".."\t??????????????????????????????????".."\r\n"
msg = msg.."\t ? Current Safe Addresses ?".."\r\n"
msg = msg.."\t??????????????????????????????????".."\r\n"
local address,value
for address, value in vTrigs do msg = msg.."\t ? "..address.."\r\n" end
user:SendPM(BotName,msg)
end
return 1
end
local s,e,trig = string.find(data,"%b<>%s+%S+%s+(%S+)")
if cmd and trig then
if cmd == "!addsafe" then
vTrigs[trig] = 1
user:SendData(BotName,trig.." has been successfully added to the Safe Address List.")
SaveToFile(vFile,vTrigs,"vTrigs")
return 1
elseif cmd == "!delsafe" then
if vTrigs[trig] == 1 then
vTrigs[trig] = nil
user:SendData(BotName,trig.." has been successfully removed from the Safe Address List.")
SaveToFile(vFile,vTrigs,"vTrigs")
else
user:SendData(BotName,"There is no Safe Address: "..trig)
end
return 1
end
end
end
if not user.bOperator then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|")
if checkForAdvertising(msg) then
SendToAll( BotName, user.sName.." levou kom BAN pk: | -=PUB=- UserIP: "..user.sIP.." \r\n ________________________]_ ` . ' . ? \r\n -__////_(____)_______________0 ---------S? kero anunciar k o user "..user.sName.." foi kickado por fazer PUB---------=> \r\n ) @ ___9mm___ _______\_/ . ? . ` . \r\n /-------/( __ // \r\n / xxx /___// \r\n / xxxxx // \r\n / xxxxx // \r\n /____ _/ \r\n ")
user:SendData(BotName,"*** Foste Kikado por fazer Publicidade !!")
user:SendPM(BotName, "Bom, komo v?s fazer PUB nao kompensa. Para a pr?xima pensa duas Vezes ( [NET]Loading ).")
SendPmToOps(BotName,"*** O User "..user.sName.." com o IP: "..user.sIP.." Foi kikado por fazer publicidade, ele disse: "..msg)
user:Disconnect();
user:TimeBan(120);
end
end
end
function checkForAdvertising(msg)
for i = 1,table.getn(adverTable) do
if string.find( msg , adverTable[i] , 1 , true ) then
return 1
end
end
return
end
function ToArrival(user,data)
if not user.bOperator then
local s,e,msg = string.find(data, "%b<>%s*(.*)%|$")
if checkForAdvertising(msg) then
if Verify(userdata, msg) then
SendToAll( BotName, user.sName.." levou kom BAN pk: | -=PUB=- UserIP: "..user.sIP.." \r\n ________________________]_ ` . ' . ? \r\n -__////_(____)_______________0 ---------S? kero anunciar k o user "..user.sName.." foi kickado por fazer PUB---------=> \r\n ) @ ___9mm___ _______\_/ . ? . ` . \r\n /-------/( __ // \r\n / xxx /___// \r\n / xxxxx // \r\n / xxxxx // \r\n /____ _/ \r\n ")
user:SendData(BotName,"*** Foste Kikado por fazer Publicidade !!")
user:SendPM(BotName, "Bom, komo v?s fazer PUB nao kompensa. Para a pr?xima pensa duas Vezes ( [NET]Loading ).")
SendPmToOps(BotName,"*** O User "..user.sName.." com o IP: "..user.sIP.." Foi kikado por fazer publicidade, ele disse: "..msg)
user:Disconnect();
user:TimeBan(120);
end
end
end
end
adCheck = function(Lines)
for i,v in vTrigs do
if string.find(Lines,i,1,1) then return nil end
end
return 1
end
Verify = function(userdata, msg)
if not msg then return end
tmp =""
string.gsub(string.lower(msg), "([a-z0-9.:%-])", function(x) tmp = tmp..x end)
if not tabAdvert[userdata] then
tabAdvert[userdata] = { iClock = os.clock(), l1 = "", l2 = "", l3 = "", l4= "", l5= "",l6= "",l7= "",l8= "",l9 = tmp}
else
adverTable[userdata].iClock = os.clock()
adverTable[userdata].l1 = adverTable[userdata].l2
adverTable[userdata].l2 = adverTable[userdata].l3
adverTable[userdata].l3 = adverTable[userdata].l4
adverTable[userdata].l4 = adverTable[userdata].l5
adverTable[userdata].l5 = adverTable[userdata].l6
adverTable[userdata].l6 = adverTable[userdata].l7
adverTable[userdata].l7 = adverTable[userdata].l8
adverTable[userdata].l8 = adverTablet[userdata].l9
adverTable[userdata].l9 = tmp
end
local Lines = adverTable[userdata].l1..adverTable[userdata].l2..adverTable[userdata].l3..adverTable[userdata].l4..adverTable[userdata].l5..adverTable[userdata].l6..adverTable[userdata].l7..adverTable[userdata].l8..adverTable[userdata].l9
for key, value in advtrigs do if (string.find(Lines, string.lower(value), 1, 1)) then return Lines end end
end
Serialize = function(tTable,sTableName,hFile,sTab)
sTab = sTab or "";
hFile:write(sTab..sTableName.." = {\n");
for key,value in tTable do
if (type(value) ~= "function") then
local sKey = (type(key) == "string") and string.format("[%q]",key) or string.format("[%d]",key);
if(type(value) == "table") then
Serialize(value,sKey,hFile,sTab.."\t");
else
local sValue = (type(value) == "string") and string.format("%q",value) or tostring(value);
hFile:write(sTab.."\t"..sKey.." = "..sValue);
end
hFile:write(",\n");
end
end
hFile:write(sTab.."}");
end
SaveToFile = function(file,table,tablename)
local hFile = io.open(file,"w+") Serialize(table,tablename,hFile); hFile:close()
end
the error i get i resolved but
the erros is like this :
i run the command !addsafe and its add a safe adress but when i run the command !showsafe the bot tells me is no safe adress stored but i open the validtrigs.tbl and is a safeadress stored inside the file and the command !delsafe make me the same thing its can find the safe adress.
onother problem is this :
[21:53] Syntax ...abalho\0.3.3.0.b17.08.nt.dbg\scripts\DevilScript.lua:140: bad argument #1 to `find' (string expected, got nil)
if anyone can help me i will apreciated
Best regards
Loading
hmm , from what i can see it should work, did u restart the script after u added the new address?
another thing ur missing, you are saving the tables but not loading them !
ok i se the error now
done
it works
and i find a way to stop advertising with spacelines
best regards
Loading
goody