tip of the day
 

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

tip of the day

Started by skandaluz, 15 September, 2004, 18:19:52

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

skandaluz

ok my last request was not possible but i got an idea not sure if it exsits have looked but found nothing
since my hub isnt a really talkative one i was thinking of adding a bot/script that when a specified number of users is reached it types out a random user configured message to the channel sumthing like "Tip of the Day: Find a Faker or Someone Violating the !rules Report Him/Her by Typin in Main Chat !report " but then it waits a set amount of time before chekin if the number of users is reached again before saying another message
i know u could just add the message to your welcome or rules txt but who really reads that haha
if sumone could help out it would be great
---> theonez.no-ip.com <-- MAC - Linux users Welcomed

bastya_elvtars

Try SensiBot, it speaks when no main event occurs in 20 mins or whatever u set.

http://www.plop.nl/ptokaxbots/Guibs.php
Everything could have been anything else and it would have just as much meaning.

skandaluz

not quite what i was lookin for i dont want the bot to respond to users and i would like it to type the msg when a certain number of users are in the hub as i have 2 diff peak times and would like to have as many users as possible able to read the message without having to pm them and without having to reapeat the message too many times cause noone talks in my hub therefore the message would always stay there at least for the ppl already in there
---> theonez.no-ip.com <-- MAC - Linux users Welcomed

skandaluz

That is excellent ...thnx Mutor havent tried it but i'm suer it will work good i'll let u know
---> theonez.no-ip.com <-- MAC - Linux users Welcomed

BoJlk

#4
Hi Mutor!

It works Fine!

BTW i tried to add some sentences
and got Syntex Error...

I just duplicated the lines with the sentences
Exactly like they are and wirted of my own

Just for fun...

Quote--What Should this bot say in main chat when enough users have logged in.
--
Echoes = {
"Tip of the Day: Find a Faker or Someone Violating the !rules Report Him/Her by Typin in Main Chat !report ",
"Help I've fallen and I...   ...hey nice carpet.",
"***Another Funny sentence HERE!",
"24 hours in a day ... 24 beers in a case ... coincidence?",
"Multitasking : Screwing up several things at once.",
"The reason talk is cheap is that supply exceeds demand.",
"Support bacteria - they're the only culture some people have.",
"BE ALERT! ...The world needs more lerts.",
"Shin: a device for finding furniture in the dark",
"Nothing is fool-proof to a sufficiently talented fool.",
"If ignorance is bliss, you must be orgasmic.",
"Stealth means never having to say you're sorry.",
"Send Mutor all your money"
}
--End User Settings----------------------------------------------------------------------------------

BoJlk

#5
I'm Sorry to Post the entire Script again... :D

I wanted you to instruct me where do i add
The needed lines to be displayed...?

Quote--Echo 1.0
--by Mutor The Ugly
--Request by skandaluz
--
--Sends random messages to main after a specified number of users have logged in.
--
--User Settings-------------------------------------------------------------------------------------
Bot = "[Sentry]"      -- Rename to your main Px bot.
Mins = 2         -- Interval [in minutes] between usercounts before 'Logins' reached.
Pause = 5         -- Interval [in minutes] between usercounts after 'Logins' reached.
Logins = 10         -- Equal to or more than this number of connected users, bot shall speak.
CommOn = "+speak"      -- Start script and check usercount.
CommOff = "+hush"      -- Stop the script.
EchoOn = "1"      -- Start script on or off  ["1"=on "0"=off].
--
--
--What Should this bot say in main chat when enough users have logged in.
--
Echoes = {
"Tip of the Day: Find a Faker or Someone Violating the !rules Report Him/Her by Typin in Main Chat !report ",
"Help I've fallen and I...   ...hey nice carpet.",
"** i need to add here?.",
Like this???
"The Lua Language Board = http://board.univ-angers.fr..."
"24 hours in a day ... 24 beers in a case ... coincidence?",
"Multitasking : Screwing up several things at once.",
"The reason talk is cheap is that supply exceeds demand.",
"Support bacteria - they're the only culture some people have.",
"BE ALERT! ...The world needs more lerts.",
"Shin: a device for finding furniture in the dark",
"Nothing is fool-proof to a sufficiently talented fool.",
"If ignorance is bliss, you must be orgasmic.",
"Stealth means never having to say you're sorry.",
"Send Mutor all your money"
}
--End User Settings----------------------------------------------------------------------------------

function Main()
   SetTimer(Mins*60000)
   CheckCount()
end

function NewUserConnected(user, data)
   CheckCount()
end

function UserDisconnected(user, data)
   CheckCount()
end

OpConnected = NewUserConnected
OpDisconnected = UserDisconnected

function DataArrival(user, data)
   s,e,cmd = strfind(data, "%b<>%s+(%S+)(%S+)")
   if (cmd==CommOn) and user.bOperator then
      EchoOn = "1"
      user:SendData(Bot,"\r\n\r\n\t--<< [ Echo Started ] >>--   Timer Settings: Primary = "..Mins.." minutes. Pause = "..Pause.." minutes.\r\n\tType '"..CommOff.."' to stop script.\r\n\r\n")
      CheckCount()
   return 1
   elseif (cmd==CommOff) and user.bOperator then
      EchoOn = "0"  
      user:SendData(Bot,"\r\n\r\n\t--<< [ Echo Stopped ] >>--   Script has been stopped. Type '"..CommOn.."' to start script.\r\n\r\n")
      CheckCount()
   return 1
   end

end

function CheckCount()
if EchoOn ~= "1" then return 1 end
local UserCount = frmHub:GetUsersCount()
   if UserCount >= Logins then
      Enough = "yes"
      StartTimer()
   else
      Enough = ""
      SendToAll(Bot,"\r\n\r\n\tEcho paused, not enough users logged in.\r\n\tUser count will be checked again at next user login.   8-)\r\n\r\n")
      StopTimer()
   end
end

function OnTimer()
   echo = Echoes[random(1, getn(Echoes))]
      SendToAll(echo)
      StopTimer()
         if Enough == "yes" then
            SetTimer(Pause*60000)
         end
      CheckCount()
end

skandaluz

this message appears in the main chat to all i would like know if it has to be there and if so can it be looped back to the bot in a way that it does not disturb users or ops
i'm using the exact code above thnx

"Echo paused, not enough users logged in.
   User count will be checked again at next user login.   8-) "
---> theonez.no-ip.com <-- MAC - Linux users Welcomed

Typhoon

about this line in the script ...

"The Lua Language Board = http://board.univ-angers.fr..."



you are missing the most IMPORTANT for it to work

a COMMA after each line  in the table  .... everything else wont work !



skandaluz

Not sure why but its not workin for me i still get the
 
 
 
   Echo paused, not enough users logged in.
   User count will be checked again at next user login. 8-)  
even when theres enough users online ... ive set the logins to 130 and there was 137 users still nothing 8/ not sure whats wrong
 heres the code i'm workin with




--Echo 1.0
--by Mutor The Ugly
--Request by skandaluz
--
--Sends random messages to main after a specified number of users have logged in.
--
--User Settings-------------------------------------------------------------------------------------
Bot = "?Robocop?"      -- Rename to your main Px bot.
Mins = 1         -- Interval [in minutes] between usercounts before 'Logins' reached.
Pause = 720         -- Interval [in minutes] between usercounts after 'Logins' reached.
Logins = 130         -- Equal to or more than this number of connected users, bot shall speak.
CommOn = "!speak"      -- Start script and check usercount.
CommOff = "!hush"      -- Stop the script.
EchoOn = "1"      -- Start script on or off  ["1"=on "0"=off].
--
--
--What Should this bot say in main chat when enough users have logged in.
--
Echoes = {
"Tip of the Day: Find a Faker or Someone Violating the !rules Report Him/Her by Typin in Main Chat !report ",
"Tip of the Day: Most Users Search with Too Many Words this is NOT a Very Efficient Search Method...Try Searching with only One or Two Words if Too Many Results Then Add Another Word.",
"Tip of the Day: This Hub is Growng Fast Eventualy We Will Reach Our User Limit and Unregisterd Users Will Not be able to get in if its Full...To Prevent this Type !regme in main Chat to Get an OP to Register U so u can come in Even if the Hub is Full",
"Tip of the Day: Hey Did You Know That by Typin !slots u can Find out Who Has Free Slots...SweeT!",
"Tip of the Day: Type !help to see a List of Commands Available to All",
"Tip of the Day: To See a List of All Other Excelent Hubs in our Network Type !network",
"Tip of the Day: Want Your Voice Heard? Go to http://www.hublist.org/?p=hub&id=80126 and Leave Your Comments/Suggestions",
"Shin: a device for finding furniture in the dark",
"Nothing is fool-proof to a sufficiently talented fool.",
"If ignorance is bliss, you must be orgasmic.",
"Stealth means never having to say you're sorry.",
"Send Mutor all your money"
}
--End User Settings----------------------------------------------------------------------------------

function Main()
   SetTimer(Mins*60000)
   CheckCount()
end

function NewUserConnected(user, data)
   CheckCount()
end

function UserDisconnected(user, data)
   CheckCount()
end

OpConnected = NewUserConnected
OpDisconnected = UserDisconnected

function DataArrival(user, data)
   s,e,cmd = strfind(data, "%b<>%s+(%S+)(%S+)")
   if (cmd==CommOn) and user.bOperator then
      EchoOn = "1"
      user:SendData(Bot,"\r\n\r\n\t--<< [ Echo Started ] >>--   Timer Settings: Primary = "..Mins.." minutes. Pause = "..Pause.." minutes.\r\n\tType '"..CommOff.."' to stop script.\r\n\r\n")
      CheckCount()
   return 1
   elseif (cmd==CommOff) and user.bOperator then
      EchoOn = "0"  
      user:SendData(Bot,"\r\n\r\n\t--<< [ Echo Stopped ] >>--   Script has been stopped. Type '"..CommOn.."' to start script.\r\n\r\n")
      CheckCount()
   return 1
   end

end

function CheckCount()
if EchoOn ~= "1" then return 1 end
local UserCount = frmHub:GetUsersCount()
   if UserCount >= Logins then
      Enough = "yes"
      StartTimer()
   else
      Enough = ""
      SendToAll(Bot,"\r\n\r\n\tEcho paused, not enough users logged in.\r\n\tUser count will be checked again at next user login. 8-)\r\n\r\n")
      StopTimer()
   end
end

function OnTimer()
   echo = Echoes[random(1, getn(Echoes))]
      SendToAll(echo)
      StopTimer()
         if Enough == "yes" then
            SetTimer(Pause*60000)
         end
      CheckCount()
end
---> theonez.no-ip.com <-- MAC - Linux users Welcomed

skandaluz

Everything works Great :]  Now do u think it would be possible to add hub command to change Mins, Pause, Logins ex. - !ELogin    etc..
---> theonez.no-ip.com <-- MAC - Linux users Welcomed


skandaluz

i guess no in hub commands to be added here?  ?(
---> theonez.no-ip.com <-- MAC - Linux users Welcomed

Boostland

Nice script seems to be working well now, I might put it on the rest of the Axis hubs.
Great for those quiet times when there is no chat going on.

SMF spam blocked by CleanTalk