Spot Random Time
 

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

Spot Random Time

Started by DorianG, 07 February, 2004, 17:43:19

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DorianG

This Bot send each 30 minutes (that you can set) a Spot.
You can write yours spots in txt file and the Bot send the Spot's message .. Random..


BotName = "???[Bot]TimeSpot???"      --//Here you can set the name of the Bot

Minuti = 30   --//Set time in minutes

Time = Minuti*60000   --//Time in minutes * milliseconds (don't touch)

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

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

--//If you want spotting more file "txt", add a new function for exemple:
--//      function Spot4()
--//              readfrom("Spot/Spot4.txt")
--//              ReadLine()
--//      end

function Spot1()
        readfrom("Spot/Spot1.txt")
        ReadLine()
end

function Spot2()
        readfrom("Spot/Spot2.txt")
        ReadLine()
end

function Spot3()
        readfrom("Spot/Spot3.txt")
        ReadLine()
end

--//Then you add a new msgspot and in random set the number of messages that the Bot must send in mainchat
--//for exemple:
--//elseif (msgspot == 4) then
--//        Spot4()
--//end
--//remember that random must be setting in ---> random(4)

function MsgSpot()
        local msgspot = random(3)
        if (msgspot == 1) then
                Spot1()
        elseif (msgspot == 2) then
                Spot2()
        elseif (msgspot == 3) then
                Spot3()
        end
end

function OnTimer()
        MsgSpot()
end

gOOfus

Not sure how to make this work. Where does the text go? Do I make a folder in the scripts folder called Spot and put separate text files in it called Spot1 Spot2 etc.? Or do I insert the text directly into the LUA somewhere?

DorianG

You copy my code To Ptokax, Sassion Script then you Save it. Then Create a Directory and nominate it Spot.
In this directory you save the txt files and called it Spot1 ecc..
Now you insert the file lua and the directory Spot in the Directory Script that you find in the Ptokax Directory. :D
if you have others problems  send me a message here.
Se sei italiano puoi postare i tuoi problemi nel mio forum
Berlusca & Pierfido Revolution

kazi

Hi  i took the profiles.dat file out and placed it in the scripts folder.

still i get to see this message:  Error missing profiles, Install the provided profiles.dat that can be found in folder scripts/profiles!

What I do wrong?

thnx

Psycho_Chihuahua

try placing it in "scripts/profiles/"
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

kazi

#5
seems to work thanx

now somehow users got this message???

[00:38:24] Your nick should start with one of the following tags:
[00:38:24] Change it and you are welcome back.
[00:38:24] Disconnects...

How can i turn this check off?

SMF spam blocked by CleanTalk