Jokes-Info v1.0 - Forum
Friday, 09 Dec 2016, 16:26:57
Welcome on westor (^WeSt) website!
Welcome NOT MEMBER | RSS
[ New messages · Members · Forum rules · Search · RSS ]
Page 1 of 11
Forum moderator: ^WeSt 
Forum » General » mIRC Codes » Jokes-Info v1.0 (Requested by UnknownX)
Jokes-Info v1.0
^WeStDate: Tuesday, 08 Apr 2014, 15:20:07 | Message # 1
ULTRA MEMBER
Group: Administrators
Messages: 13
Awards: 0
Reputation: 0
Status: Offline
To bazeis sta remotes ALT+R se ena new file.

ODHGIES:
1. Gia na doulepsi prepei na exis ena folder "Jokes" opou trexis to mIRC.exe soy (//run $mircdir) kai mesa na exis anekdota me .txt periexomeno (e.g: anekdoto-ksanthias-2.txt)
2. Gia na doulepsi sto kanali sou grafeis tin entoli : /set %my_chan #KANALI (e.g: /set %my_chan #test_chan)
3. Gia na allaksis ta deuterolepta pou tha leei to message efoson diabazei to anekdoto grafeis tin entoli: /set %play_delay SECONDS (e.g: /set %play_delay 6)
4. Gia na allaksis to kathe poso thes na dinei to epomeno anekdoto mesa sto kanali grafis tin entoli: /set %next_joke SECONDS (e.g: /set %next_joke 180)

NOTE: Ean den kaneis autes tis aparetites rythmisis to module auto dn tha peksi sosta.

Code
; Jokes-Info module v1.0
; Created on 07/04/2014
; by westor

ON *:JOIN:%my_chan: {
   if ($nick == $me) { stop_jokes | .timer[START_JOKES] 1 10 start_jokes }
}
ON *:PART:%my_chan: {  
   if ($nick == $me) { stop_jokes }
}
ON *:KICK:%my_chan: {
   if ($knick == $me) { stop_jokes }
}

alias stop_jokes { .timer[START_JOKE*] off | .timer[GIVE_JOKE] off | .play stop | unset %joke }
alias start_jokes {
   if (!%my_chan) { stop_jokes | return }
   if ($me !ison %my_chan) { stop_jokes | return }
   if (%joke) { return }
   var %f = $mircdirjokes
   if (!$isdir(%f)) { .msg %my_chan [Error]: JOKES -> Missing the "Jokes" folder and cannot start! - 4FAILED | stop_jokes | return }
   var %ff = $findfile(%f,*.txt,0)
   if (!%ff) { .msg %my_chan [Error]: JOKES -> There is NOT any joke into the " $+ %f $+ " folder and cannot start! - 4FAILED | stop_jokes | return }
   var %file = $rand(1,%ff)
   set -e %joke $findfile($mircdirjokes,*.txt,%file)
   if (%joke == %last_joke) { var %file = $rand(1,%ff) | set -e %joke $findfile($mircdirjokes,*.txt,%file) }
   .timer[START_JOKE] 1 5 .describe %my_chan Anekdoto!
   .timer[GIVE_JOKE] 1 8 give_joke
   set %last_joke %joke
}

alias give_joke {
   if (!%joke) { return }
   if (!%play_delay) { var %play_delay = $rand(3,6) }
   .play %my_chan $qt(%joke) %play_delay $+ 000
}

ON *:PLAYEND: {
   if (!%my_chan) { return }
   if (!%next_joke) { var %next_joke = 180 }
   unset %joke
   .describe %my_chan Telos Anekdotou!
   .timer[START_JOKE_AGAIN_NOTICE] 1 $calc(%next_joke / 2) .describe %my_chan -=- MHN Xasete se ligo to epomeno... -=-
   .timer[START_JOKE_AGAIN] 1 %next_joke start_jokes  
}
ON *:DISCONNECT: { stop_jokes }


- Thanks!


I Would Like To Kiss You But I Cant Tell Me Why Not My Baby ? ? ?
 
Forum » General » mIRC Codes » Jokes-Info v1.0 (Requested by UnknownX)
Page 1 of 11
Search:


Website builderuCoz