[15:29] No syntax errors in script file RoboCopv10.023.lua
[15:30] No syntax errors in the script.
[15:30] RoboCopv10.023.lua loaded.
is this error? bec i add anti advert in lua folder with this robocop script but anti advert not work
No, this message means the script has no syntactical error, so it can be loaded, but you can't be sure it will work, because it checks just the syntax, as the message says. But you loaded just RoboCop, which hasn't got antiadvertise modul, so load that script.
tnx Mutor problem solve but one thing i want to know about advert script i use this script
-- anti advertise
-- OPs cannot post adverts in PM but Master can :P
--------------------------------------------------------------------------------
antiadds = {"gotdns","bounceme.net","hopto.org","myftp.biz","myftp.org","myvnc.com",
"ip.biz","ip.info", "ip.org","redirectme.net","servebeer.com","servecounterstrike.com",
"serveftp.com","servegame.com","servehalflife.com","servehttp.com","servemp3.com",
"servepics.com","servequake.com","sytes.net","zapto.org","ciscofreak.com","damnserver.com",
"http://","ditchyourip.com","dnsiskinky.com","geekgalaxy.com","freaks.com","ip.ca",
"ip.co.uk","ip.com","ip.net","point2this.com","securityexploits.com","securitytactics.com",
"servehumour.com","servep2p.com","servesarcasm.com","stufftoread.com","workisborring.com",
"musicdvdworld","dchub://","www.","hub","no-ip","dash","dot",}
--------------------------------------------------------------
Bot = frmHub:GetHubBotName()
function ToArrival(user, data)
if user.iProfile ~= 0 and user.iProfile ~= 4 and user.iProfile ~= 5 then
for key,a in antiadds do
if( string.find(string.lower(data), key) ) then
user:SendPM(Bot, "Sorry, your PM was blocked. Please use main chat to post adverts!")
return 1
end
end
end
end
-- EOF
i want some diffrent script like if some one advert in main chat or pm then bot only showing to me wat they advertise in hub or any user whitout knowing them tat i got all his/her chat data by bot or wat they advertise tat is that possible
Got this error please chaeck it
[20:57] Syntax ...IRDAR\Desktop\Hub\terminator\scripts\AscIIArtBot.lua:14: attempt to call global 'execute' (a nil value)
thanks :)
-- ![AscIIArtBot]!? V:1.1 by [ES]latinmusic
-- Some improvements inside the code
-- Old AscII files have been retouched for better display
-- New cool art files have been added
-- To download the new ASCII files use the same link as before
-- Enjoy
botName = "![AscIIArtBot]!?"
DirArray = {}
TimerStatus = 0
CommandStatus = 1
file = "ArtList.txt"
ErrorMsg = "You do not have enough privileges to execute this command."
function Main()
execute("dir AscIIArtFiles > ArtList.txt /B")
MakeArray(curUser)
local version = botName.." V:1.1 by [ES]latinmusic"
SendToAll(botName, "Script restarted.\r\n "..version..date(" launched at day: %d/%m/%Y. Local Hub Time: %X."))
SendToAll(botName, "The 'AscII Art List File' have been generated.")
end
function DataArrival(curUser, data)
if strsub(data, 1, 1) ~= "<" then return end
local s, e, cmd, args = strfind(data, "^%b<> %-(%a+)%s*(.*)%|$")
if not s then return end
cmd = strlower(cmd)
if cmd == "showart" then
if CommandStatus == 1 then
variable = DirArray[random(1,getn(DirArray))]
local result = Show(TheFile)
curUser:SendData(botName,result)
else
curUser:SendData(botName,"The command '-showart' is temporarily deactivated.")
end
return 1
elseif cmd == "reloadart" then
if (curUser.iProfile ~= 0) then curUser:SendData(botName,ErrorMsg) return 1 end
execute("dir AscIIArtFiles > ArtList.txt /B")
MakeArray(curUser)
SendToAll(botName,"The 'AscII Art List File' have been updated.\r\n")
return 1
elseif cmd == "showhelp" then
curUser:SendData(botName,"List of the commands available for "..botName.."\r\n\r\nCommands --> Description\r\n-reloadart --> Reload the AscII art files\r\n-startimer --> Start the timer\r\n-stoptimer --> Stop the timer\r\n-showart --> Display AscII art files ramdomly on user request\r\n-showhelp --> Display this help\r\n")
elseif cmd == "startimer" then
if not curUser.bOperator then curUser:SendData(botName,ErrorMsg) return 1 end
if TimerStatus == 0 then
local s,e,_,minutes = strfind( data, "%b<>%s+(%S+)%s+(%S+)%|$")
if not s then curUser:SendData(botName,"Syntax: -startimer <TimeInMinutes>") return 1 end
TimerStatus = 1
CommandStatus = 0
SetTimer(minutes*60000)
StartTimer()
curUser:SendData(botName,"The 'Timer' function have been activated. First 'AscII Art' will be displayed in "..minutes.." minute(s) from now.")
SendToAll(botName,"The command '-showart' have been temporarily deactivated.")
else
curUser:SendData(botName,"The 'Timer' function is already active.")
end
return 1
elseif cmd == "stoptimer" then
if not curUser.bOperator then curUser:SendData(botName,ErrorMsg) return 1 end
if TimerStatus == 1 then
TimerStatus = 0
CommandStatus = 1
StopTimer()
curUser:SendData(botName,"The 'Timer' function have been deactivated.")
SendToAll(botName,"The command '-showart' have been activated.")
else
curUser:SendData(botName,"The 'Timer' function is already deactivated.")
end
return 1
else return end
end
function MakeArray(curUser)
readfrom(file,"r")
while 1 do
local line = read()
if line == nil or line == "" then break
else
tinsert(DirArray, line)
end
end
readfrom()
return DirArray
end
function Show(TheFile)
readfrom("AscIIArtFiles/"..variable,"r")
local art = ""
while 1 do
local line = read()
if line == nil then break
else
art = art..line.."\r\n"
end
end
readfrom()
return art
end
function OnTimer()
variable = DirArray[random(1,getn(DirArray))]
local result = Show(TheFile)
SendToAll(botName,result)
end
This script is all in LUA4 ???
tanx lot for reply may get this for lua 5.1 same script?
if I rember correctly ArtBot 2 is what you want