MultiAdvertBot
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

MultiAdvertBot

Started by Cêñoßy†ê, 16 February, 2004, 22:04:04

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Cêñoßy†ê

Hope someone likes this... My first "job"  :P
------------------------------------------------------------------------------------------------------------
---// MultiAdvertBot v.0.3 Made by Cyberbob (made from bots that i found from http://board.univ-angers.fr)
---// This Bot send each XX minutes (that you can set) a Advert.
---// You can write yours advert's in txt file or use scripts own txt files like (rules/addmessage)
---// and the Bot send the Advert message .. Random..
-----------------------------------------------------------------------------------------------------------
BotName = "?Robocop?"                        ---// Set here Botname
HubOwner = ""                                ---// Set here Hub Owner name
HubAdr = ""                                  ---// Set here Hub Address
WebAd = "?Under Construction?"               ---// Set here Hub's Web Address
HubEm = "?Under Construction?"               ---// Set here Hub E-mail Address
HubR = "!rules"                              ---// Set here hub rules command
NetW = ""                                    ---// Set here hub network command or name of the network
Minute = 1                                   ---// Here you can set time in minutes
Command = "!uptime"                          ---// Set here command that shows hub current uptime
Adds = "2"                                   ---// Set here how many txt add's will be in use 1=only hubinfo
Add2 = "txt/rules.txt"                       ---// Set here first txt add directory like (txt/rules.txt)
Add3 = ""                                    ---// Set here second txt add directory like (txt/rules.txt)
Add4 = ""                                    ---// Set here third txt add directory like (txt/rules.txt)
Add5 = ""                                    ---// Set here fourth txt add directory like (txt/rules.txt)
-----------------------------------------------------------------------------------------------------------
ScriptVersion = "0.3"             ---// Script version (don't touch)
Timer = Minute*60000              ---// Time in minutes * milliseconds (don't touch)

function Main()
frmHub:RegBot(BotName)
SetTimer(Timer)
StartTimer()
end

function ReadLine()
while 1 do
local line = read()
if (line == nil) then
break
else
SendToAll(BotName, line)  
end
end
readfrom()
end

function Spot1()
SendToAll(BotName,"")
        SendToAll("")
   SendToAll("?==================?H?U?B??I?N?F?O?=================?")
   SendToAll("   ?Hub Name:   "..frmHub:GetHubName().."")
   SendToAll("   ?Hub Owner:   "..HubOwner.."")
        SendToAll("   ?Hub Address:   "..HubAdr.."")
        SendToAll("   ?Hub Rules:   "..HubR.."")
   SendToAll("   ?Hub E-Mail:   "..HubEm.."")
   SendToAll("   ?Web Address:   "..WebAd.."")
   SendToAll("   ?Network:   "..NetW.."")
   SendToAll("   ?Hub Uptime :   "..Command.."")
   SendToAll("   ?Usercount:   "..frmHub:GetUsersCount().." of  "..frmHub:GetMaxUsers().." Users Connected")   
   SendToAll("?====================================================?")
        SendToAll("")
        SendToAll("")
end
function Spot2()
readfrom(Add2)
ReadLine()
end

function Spot3()
readfrom(Add3)
ReadLine()
end

function Spot4()
readfrom(Add4)
ReadLine()
end
 
function Spot5()
readfrom(Add5)
ReadLine()
end

function MsgSpot()
local msgspot = random(Adds)
if (msgspot == 1) then
Spot1()
elseif (msgspot == 2) then
Spot2()
elseif (msgspot == 3) then
Spot3()
elseif (msgspot == 4) then
Spot4()
elseif (msgspot == 5) then
Spot5()
end
end

function OnTimer()
MsgSpot()
end

function DataArrival(user, data)
   data=strsub(data,1,strlen(data)-1)
   _,_,cmd=strfind(data, "%b<>%s+(%S+)")
   if(cmd == Command) then
      local sec = clock()
      local days = floor(sec/86400)
      local hrs = floor((sec-(days*86400))/3600)
      local min = floor((sec-(days*86400)-(hrs*3600))/60)
      sec = floor(sec-(days*86400)-(hrs*3600)-(min*60))
      user:SendData(BotName, "***Hubs current uptime "..days.." days, "..hrs.." hrs. "..min.." min. and "..sec.." sec.***")
      return 1
   end
end
Powered By Leviathan™ 2nd Generation v. 1.9

TiMeTrAVelleR

Wel done  for youre first  script  m8

TiMe 8)

Andersk33

Hi

I have tried your script and it works fine....
Well done and keep it up..... :)

A happy user......

DarkieTampie

hi, i tried the script, but when the advert is more then 1 line, the botname appears on every line. example:
<=4dd-T4Mp0n=>                      \/\/\/\/
<=4dd-T4Mp0n=>                      (  ?   ? )
<=4dd-T4Mp0n=>  ,--------------oOOo-(_)-oOOo------------,
<=4dd-T4Mp0n=>  I   ***D4rkTeMpl4r'S HuB***  I
<=4dd-T4Mp0n=>  '----------------------- Oohoo--------------'
<=4dd-T4Mp0n=>               ooooO   ((    ))
<=4dd-T4Mp0n=>               ((    ))     )   /
<=4dd-T4Mp0n=>                \   (      (_/
<=4dd-T4Mp0n=>                  \_)    

do you know what i mean? can you tell me how to fix that or fix it by urself?  :)

thnx advance,
DT

Alexei

i think all you need is to put \n\r att the end of each line...

i havent looked at all these scripts for a looong time... but i think its "\r\n" or "\n\r"

or was it just \n or \n
test and you will see :D

Good luck ;)

DarkieTampie

doesnt work... then i get \n\r in the txt.

anyways thnx for fast reply

DT

plop

it's "\r\n".
but this won't help you solving this problem, what you need 2 do is change the function ReadLine.
that sends every single line, change it so it sends the full file.
how ??, that can be found on the forum.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

DorianG

it resemble to a script that I had posted  :-)

My Old script

DarkieTampie

okey thnx Plop ill try to find it  :] , btw nice time you posted 0.00  ;)

DT

Cp6uja

Cy?e??o? nice copy
This script is copy of RoBoCoP  :D
Buahahahahha !

SMF spam blocked by CleanTalk