Repeat once only..?
 

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

Repeat once only..?

Started by kepp, 30 November, 2003, 03:26:58

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kepp

  function NewUserConnected(user)
      local randomPhrase = random(14)
         if randomPhrase == 1 then
      SendToAll("<[BBB]Micke> Jag Beh?ver lite h?lp h?r tack...!")
         elseif randomPhrase == 2 then
      SendToAll("<(uK)TheBiggestTwat> Sorry?")
         elseif randomPhrase == 3 then
      SendToAll("<(uK)TheBiggestTwat> Speak english so i can understand!!!")
         elseif randomPhrase == 4 then
      SendToAll("<[SwE]G?ran_1912> Ah, Shat the fack upp m? daj..")
         elseif randomPhrase == 5 then
      SendToAll(" I don't understant, i get a erorr, \"No slots Available\"")
         elseif randomPhrase == 6 then
      SendToAll("<(uK)TheBiggestTwat> Please, speak english..")
         elseif randomPhrase == 7 then
      SendToAll("<[BBB]Micke> Kan man f? lite hj?lp?")
         elseif randomPhrase == 8 then
      SendToAll("<[BBB]Micke> I need some help")
         elseif randomPhrase == 9 then
      SendToAll("<(uK)TheBiggestTwat> Hey [BBB]Micke, Can i help you m8?")
         elseif randomPhrase == 10 then
      SendToAll(" Please help me....")
         elseif randomPhrase == 11 then
      SendToAll("<[SwE]G?ran_1912> Du kan inte h?lla flabben va? J?vla n?t")
         elseif randomPhrase == 12 then
      SendToAll(" Howdy ya'll")
         elseif randomPhrase == 13 then
      SendToAll("<[SwE]G?ran_1912> ?r h?r bara s?nna Caboysare h?r eller vad ?r det fr?gan om?")
         elseif randomPhrase == 14 then
      SendToAll(" Im gunna tell ya'll a story, Whein i wos a kid, i allwuzy played mah gewtahr")
   end
end

I want to make a script for my dead main...
and therefor to get a good delay between each message im using it in NewUserConnected()

Problem is, This will look like sh*t..
i want it to send one, after one til the end, Then it's gonna end

If possible i would be very glad if you could explain how to do so.. :D

// Kepp
Guarding    

pHaTTy

But you can use a timer....See the thing is because then you are using a timer is can repea itslef several timers..

function Main()
SetTimer(1*60000)
end

function OnTimer()
      local randomPhrase = random(14)
         if randomPhrase == 1 then
      SendToAll("<[BBB]Micke> Jag Beh?ver lite h?lp h?r tack...!")
         elseif randomPhrase == 2 then
      SendToAll("<(uK)TheBiggestTwat> Sorry?")
         elseif randomPhrase == 3 then
      SendToAll("<(uK)TheBiggestTwat> Speak english so i can understand!!!")
         elseif randomPhrase == 4 then
      SendToAll("<[SwE]G?ran_1912> Ah, Shat the fack upp m? daj..")
         elseif randomPhrase == 5 then
      SendToAll(" I don't understant, i get a erorr, \"No slots Available\"")
         elseif randomPhrase == 6 then
      SendToAll("<(uK)TheBiggestTwat> Please, speak english..")
         elseif randomPhrase == 7 then
      SendToAll("<[BBB]Micke> Kan man f? lite hj?lp?")
         elseif randomPhrase == 8 then
      SendToAll("<[BBB]Micke> I need some help")
         elseif randomPhrase == 9 then
      SendToAll("<(uK)TheBiggestTwat> Hey [BBB]Micke, Can i help you m8?")
         elseif randomPhrase == 10 then
      SendToAll(" Please help me....")
         elseif randomPhrase == 11 then
      SendToAll("<[SwE]G?ran_1912> Du kan inte h?lla flabben va? J?vla n?t")
         elseif randomPhrase == 12 then
      SendToAll(" Howdy ya'll")
         elseif randomPhrase == 13 then
      SendToAll("<[SwE]G?ran_1912> ?r h?r bara s?nna Caboysare h?r eller vad ?r det fr?gan om?")
         elseif randomPhrase == 14 then
      SendToAll(" Im gunna tell ya'll a story, Whein i wos a kid, i allwuzy played mah gewtahr")
	StopTimer()
   end

end

function NewUserConnected()
StartTimer()
end

Now this is not it, this will rpeat itsel but will go thru msgs until it randomly hits the 14th msg then it will stop, so not you need to think of a way of making sure it does 1 msg after the other, give it a shot and i can help more *bissy* but can help as much as a can

*hint* Randomiser wont work for 1 msg after the other ;)
Resistance is futile!

kepp

I like the idea bout the timer :)
only problem now, been trying now alot and can't figure it out, is to get it, one after one..
anyway,
NO hurry, i will try to figure out
Guarding    

kepp

Do i need to store them in a table, then if that message has been sent it won't send it again?
My brain is boiling..
i know randomizer won't work as you said...
what i've been looking for is something Like random()
exept that it will, like i said, go trough one after one.
without any results
Guarding    

SMF spam blocked by CleanTalk