Tekil Mesaj gösterimi
Alt 17 Şubat 2008, 02:52   #1
Çevrimdışı
CroAtoN
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Bilmece TCL ve Sorulari. Buyrun..




set tgqdb "scripts/bilmece.txt"
set tgscf "scripts/bilmecepuan.txt"
set tgerrfil "scripts/bilmecehata.txt"
set tgchan "#Bilmece"
set tgpointsperanswer 50
set tgmaxhint 4
set tgstreakmin 3
set tgmaxmissed 0
set tghintchar "*"
set tgtimehint 25
set tgtimenext 10
set tgcongrats[list "Harikasin" "Bilmeceyi Bildin"]
set tgnobodygotit[list ".."]
set tgtrythenextone[list ".."]
set tgshowanswer 1
set tgpriv2msg 1
set tgcmdhelp "?"
set tgcmdstart "!basla"
set tgflagsstart -|-
set tgcmdstop "!basla"
set tgflagsstop -o|o-
set tgcmdhint "ipucu"
set tgflagshint -|-
set tgcmdskip "atlkllka"
set tgflagsskip -|-
set tgcmdreset "resklklet"
set tgflagsreset -|-
set tgcmdlookup "skor"
set tgcmdtarget "hedef"
set tgcmderror "hata"
set tgcmdrules "kural"
set tgrules "Kanal Kuralımız : Size Yapılmasını İstemediğiniz Davranışı Başkasına Yapmamanız...!"
set tgerrremindtime 5


# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Burdan Sonrasini Degismeniz Riske Sebeb Olur
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.

Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
: #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#Misc checks & var initialisations
if {![file exists $tgqdb]} {
putlog "\002[file tail [info script]]\002 failed to load: $tgqdb does not exist."
return
}
if {![info exists alltools_loaded]||$allt_version<204} {
putlog "\002[file tail [info script]]\002 failed to load: please load alltools.tcl v1.6 or higher before attempting to use this script."
return
}
if {[llength [split $tgchan]]!=1} {
putlog "\002[file tail [info script]]\002 failed to load: too many channels specified."
return
}
if {![info exists tgplaying]} {set tgplaying 0}
if {![info exists tghintnum]} {set tghintnum 0}
if {![info exists tgmissed]} {set tgmissed 0}
#Binds
bind pub $tgflagsstart $tgcmdstart tgstart
bind pub $tgflagsstop $tgcmdstop tgstop
bind pub $tgflagshint $tgcmdhint tgforcehint
bind pub $tgflagsskip $tgcmdskip tgskip
bind join -|- "$tgchan *" tgjoinmsg
bind msg - $tgcmdhelp tggivehelp
bind msg - $tgcmdlookup tgscorelookup
bind msg - $tgcmdtarget tgtargetlookup
bind msg - $tgcmderror tgerror
bind msg - $tgcmdrules tgrulesmsg
bind msg $tgflagsreset "$tgcmdreset" tgresetscores
bind kick - "$tgchan $botnick" tgbotgotkicked
bind evnt - disconnect-server tgbotgotdisconnected
#starts the game if it isn't running.
proc tgstart {nick host hand chan text} {
global tgplaying tgstreak tgchan tgerrremindtime tgerrremindtimer tgmissed
if {[strlwr $tgchan]==[strlwr $chan]} {
if {$tgplaying==0} {
tggamemsg "4,1 Dikkat!8 Bilmece Oyun 4'8u Baslatildi.. "
tgnext
set tgplaying 1
set tgstreak 0
set tgmissed 0
set tgerrremindtimer [timer $tgerrremindtime tgerrremind]
}
return 1
}
}
#stops the game if it's running.
proc tgstop {nick host hand chan text} {
global tghinttimer tgnexttimer tgplaying tgchan tgcurrentanswer tgstreak tgstreakmin
global tgerrremindtimer
if {[strlwr $tgchan]==[strlwr $chan]} {
if {$tgplaying==1} {
tggamemsg "Oyunu Durduran $nick!"
if {$tgstreakmin>0&&[lindex [split $tgstreak ,] 1]>=$tgstreakmin} { tgstreakend }
set tgstreak 0
set tgplaying 0
catch {unbind pubm -|- "$tgchan $tgcurrentanswer" tgcorrectanswer}
if {[utimerexists tghint]!=""} {killutimer $tghinttimer}
if {[utimerexists tgnext]!=""} {killutimer $tgnexttimer}
if {[timerexists tgerrremind]!=""} {killtimer $tgerrremindtimer}
}
return 1
}
}
#gives a hint if there is currently a question to answer.
proc tgforcehint {nick host hand chan text} {
global tghinttimer tgnexttimer tgplaying tgchan tgcurrentanswer tgstreak tgstreakmin
global tgtempnohint tghintmax tghintnum
if {[strlwr $tgchan]==[strlwr $chan]} {
if {$tgplaying==1&&[utimerexists tghint]!=""} {
killutimer $tghinttimer
tghint
}
return 1
}
}
#skips the current question if one has been asked.
proc tgskip {nick host hand chan text} {
global tghinttimer tgnexttimer tgplaying tgchan tgcurrentanswer tgstreak tgstreakmin tgtimenext
if {[strlwr $tgchan]==[strlwr $chan]} {
if {$tgplaying==1&&[utimerexists tghint]!=""} {
tggamemsg "4Soru 2$nick Tarafından Direkt Olarak Geçildi!"
if {$tgstreakmin>0&&[lindex [split $tgstreak ,] 1]>=$tgstreakmin} { tgstreakend }
set tgstreak 0
unbind pubm -|- "$tgchan $tgcurrentanswer" tgcorrectanswer
killutimer $tghinttimer
set tgnexttimer [utimer $tgtimenext tgnext]
}
return 1
}
}
#reminds channel how to report errors in questions/answers
proc tgerrremind {} {
global tgerrremindtimer tgerrremindtime botnick tgcmderror
tggamemsg "9,1 Yazgulu4.9Com 8Aşk 4'8a ve Sevgiye Dair Hersey4.. "
set tgerrremindtimer [timer $tgerrremindtime tgerrremind]
}
#bot got kicked. stop the game.
proc tgbotgotkicked {nick host hand chan targ text} {
tgquietstop
}
#bot got disconnected. stop the game.
proc tgbotgotdisconnected {disconnect-server} {
tgquietstop
}
#stops the game without telling the channel.
proc tgquietstop {} {
global tgplaying tgstreak tgchan tgcurrentanswer tghinttimer tgnexttimer tgerrremindtimer
if {$tgplaying==1} {
set tgstreak 0
set tgplaying 0
catch {unbind pubm -|- "$tgchan $tgcurrentanswer" tgcorrectanswer}
if {[utimerexists tghint]!=""} {killutimer $tghinttimer}
if {[utimerexists tgnext]!=""} {killutimer $tgnexttimer}
if {[timerexists tgerrremind]!=""} {killtimer $tgerrremindtimer}
}
}
#reads the question database.
proc tgreadqdb {} {
global tgqdb tgquestionstotal tgquestionslist
set tgquestionstotal 0
set tgquestionslist ""
set qfile [open $tgqdb r]
while {![eof $qfile]} {
lappend tgquestionslist [gets $qfile]
incr tgquestionstotal
}
close $qfile
}
#selects the next question.
proc tgnext {} {
global tgqdb tgcurrentquestion tgcurrentanswer tgquestionnumber tgquestionstotal
global tghintnum tgchan tgquestionslist
tgreadqdb
set tgquestionnumber [rand [llength $tgquestionslist]]
set tgquestionselected [lindex $tgquestionslist $tgquestionnumber]
set tgcurrentquestion [lindex [split $tgquestionselected |] 1]
set tgcurrentanswer [strlwr [lindex [split $tgquestionselected |] 0]]
unset tghintnum
tghint
bind pubm -|- "$tgchan $tgcurrentanswer" tgcorrectanswer
return
}
#shows timed hints.
proc tghint {} {
global tgmaxhint tghintnum tgcurrentanswer tghinttimer tgchan
global tgtimehint tghintchar tgquestionnumber tgquestionstotal
global tgcurrentquestion tghintcharsused tgnexttimer tgtimenext tgstreak tgstreakmin
global tgnobodygotit tgtrythenextone tgmissed tgmaxmissed tgcmdstart tgshowanswer
global tgtimestart
if {[catch {incr tghintnum}]!=0} {set tghintnum 0}
if {$tghintnum >= [expr $tgmaxhint+4]} {
incr tgmissed
set _msg ""
append _msg "7,1 Zaman Doldu! 15,1 Bir Sonraki Bilmece İçin Hazırlanın "
if {$tgmaxmissed>0&&$tgmissed>=$tgmaxmissed} {
append _msg " 8,1 Bilmece Çözmeye Niyetiniz Yoksa Dinleniyim Biraz
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
!"
} else {
append _msg " [lindex $tgtrythenextone [rand [llength $tgtrythenextone]]]"
}
tggamemsg "$_msg"
if {$tgstreakmin>0&&[lindex [split $tgstreak ,] 1]>=$tgstreakmin} { tgstreakend }
set tgstreak 0
catch {unbind pubm -|- "$tgchan $tgcurrentanswer" tgcorrectanswer}
if {$tgmaxmissed==0||$tgmissed<$tgmaxmissed} {
set tgnexttimer [utimer $tgtimenext tgnext]
}
return
} elseif {$tghintnum == 0} {
set i 0
set _hint {}
set tghintcharsused {}
regsub -all -- "\[A-Za-z0-9\]" $tgcurrentanswer $tghintchar _hint
set tgtimestart [clock clicks -milliseconds]
} elseif {$tghintnum == 1} {
set i 0
set _hint {}
while {$i<[llength [split $tgcurrentanswer]]} {
set _word [lindex [split $tgcurrentanswer] $i]
set j 0
set _newword {}
while {$j<[strlen $_word]} {
if {$j==0} {
append _newword [stridx $_word $j]
lappend tghintcharsused $i,$j
} else {
if {[string is alnum [stridx $_word $j]]} {
append _newword $tghintchar
} else {
append _newword [stridx $_word $j]
lappend tghintcharsused $i,$j
}
}
incr j
}
lappend _hint $_newword
incr i
}
} else {
set i 0
set _hint {}
while {$i<[llength [split $tgcurrentanswer]]} {
set _word [lindex [split $tgcurrentanswer] $i]
set j 0
set _newword {}
set _selected [rand [strlen $_word]]
regsub -all -- "\[^A-Za-z0-9\]" $_word "" _wordalnum
if {[strlen $_wordalnum]>=$tghintnum} {
while {[lsearch $tghintcharsused $i,$_selected]!=-1||[string is alnum [stridx $_word $_selected]]==0} {
set _selected [rand [strlen $_word]]
}
}
lappend tghintcharsused $i,$_selected
while {$j<[strlen $_word]} {
if {[lsearch $tghintcharsused $i,$j]!=-1||[string is alnum [stridx $_word $j]]==0} {
append _newword [stridx $_word $j]
} else {
if {[string is alnum [stridx $_word $j]]} {
append _newword $tghintchar
}
}
incr j
}
lappend _hint $_newword
incr i
}
}
tggamemsg "13,1 Sorunuz:15 [strupr $tgcurrentquestion] "
tggamemsg "9,1 ipucu: 8 [join $_hint] 4,1 25 Puan "
set tghinttimer [utimer $tgtimehint tghint]
}
#triggered when someone says the correct answer.
proc tgcorrectanswer {nick host hand chan text} {
global tgcurrentanswer tghinttimer tgtimenext tgchan tgnexttimer tgstreak tgstreakmin
global tgscoresbyname tgranksbyname tgranksbynum tgcongrats tgscorestotal tgmissed
global tgtimestart
tggetscores
if {![info exists tgranksbyname([strlwr $nick])]} {
set _oldrank 0
} else {
set _oldrank [lindex [split $tgranksbyname([strlwr $nick]) ,] 0]
}
tgincrscore $nick
tggetscores
set _newrank [lindex [split $tgranksbyname([strlwr $nick]) ,] 0]
set _timetoanswer [expr [expr [clock clicks -milliseconds]-$tgtimestart]/1000.00]
set _msg "14,1 Tebrikler7 $nick 4Doğru Cevap 7 [strupr $tgcurrentanswer] 14 25 Puan Kazandınız. "
if {$_newrank<$_oldrank} {
if {$_newrank==1} {
append _msg " Tebrikler "
} else {
append _msg ""
}
}
tggamemsg "$_msg"
if {$tgstreak!=0} {
if {[lindex [split $tgstreak ,] 0]==[strlwr $nick]} {
set tgstreak [strlwr $nick],[expr [lindex [split $tgstreak ,] 1]+1]
if {$tgstreakmin>0&&[lindex [split $tgstreak ,] 1]>=$tgstreakmin} {
tggamemsg "14,1 Bravo 8$nick 14Bilmeceyi Ard Arda Siz Bildiniz! 10Diğerleriyle Aranızda Fark Oluşmaya Başladı! "
}
} else {
if {$tgstreakmin>0&&[lindex [split $tgstreak ,] 1]>=$tgstreakmin} { tgstreakend }
set tgstreak [strlwr $nick],1
}
} else {
set tgstreak [strlwr $nick],1
}
set tgmissed 0
tgshowscores
unbind pubm -|- "$tgchan $tgcurrentanswer" tgcorrectanswer
killutimer $tghinttimer
set tgnexttimer [utimer $tgtimenext tgnext]
return 1
}
#read current scores from file, sort and store in variable.
proc tggetscores {} {
global tgscf tgscorestotal tgscores tgscoresbyname tgranksbyname tgranksbynum tgrealnames
if {[file exists $tgscf]&&[file size $tgscf]>2} {
set _sfile [open $tgscf r]
set tgscores [lsort -dict -decreasing [split [gets $_sfile]]]
close $_sfile
set tgscorestotal [llength $tgscores]
} else {
set tgscores ""
set tgscorestotal 0
}
if {[info exists tgscoresbyname]} {unset tgscoresbyname}
if {[info exists tgranksbyname]} {unset tgranksbyname}
if {[info exists tgrealnames]} {unset tgrealnames}
if {[info exists tgranksbynum]} {unset tgranksbynum}
set i 0
while {$i<[llength $tgscores]} {
set _item [lindex $tgscores $i]
set _nick [lindex [split $_item ,] 2]
set _lwrnick [lindex [split $_item ,] 3]
set _score [lindex [split $_item ,] 0]
set tgscoresbyname($_lwrnick) $_score
set tgrealnames($_lwrnick) $_nick
set tgranksbyname($_lwrnick) [expr $i+1],$_score
set tgranksbynum([expr $i+1]) $_lwrnick,$_score
incr i
}
return
}
#increment someone's score.
proc tgincrscore {who} {
global tgscores tgscf tgpointsperanswer tgscorestotal tgscoresbyname
tggetscores
if {$tgscorestotal>0} {
set i 0
if {![info exists tgscoresbyname([strlwr $who])]} {
append _newscores "1,[expr 1000000000000.0/[unixtime]],$who,[strlwr $who] "
}
while {$i<[llength $tgscores]} {
set _item [lindex $tgscores $i]
set _nick [lindex [split $_item ,] 2]
set _time [lindex [split $_item ,] 1]
set _score [lindex [split $_item ,] 0]
if {[strlwr $who]==[strlwr $_nick]} {
append _newscores "[expr $_score+$tgpointsperanswer],[expr 1000000000000.0/[unixtime]],$who,[strlwr $who][expr [expr [llength $tgscores]-$i]==1?"":"\ "]"
} else {
append _newscores "$_score,$_time,$_nick,[strlwr $_nick][expr [expr [llength $tgscores]-$i]==1?"":"\ "]"
}
incr i
}
} else {
append _newscores "1,[expr 1000000000000.0/[unixtime]],$who,[strlwr $who]"
}
set _sfile [open $tgscf w]
puts $_sfile "$_newscores"
close $_sfile
return
}
#shows the current scores on channel.
proc tgshowscores {} {
global tgscores tgchan tgscorestotal
tggetscores
set i 0
while {$i<[llength $tgscores]} {
set _item [lindex $tgscores $i]
set _nick [lindex [split $_item ,] 2]
set _score [lindex [split $_item ,] 0]
if {$i==0} {
append _scores "3$_nick $_score"
} elseif {$i==1} {
append _scores " , 7$_nick $_score"
} elseif {$i==2} {
append _scores " , 4$_nick $_score"
} elseif {[onchan $_nick $tgchan]} {
append _scores " , 14$_nick $_score"
}
incr i
}
tggamemsg "4,1 Sonuclar:14,1 $_scores "
}
#reset current scores.
proc tgresetscores {nick host hand text} {
global tgscf tgscorestotal tgscores
if {[file exists $tgscf]&&[file size $tgscf]>2} {
set _sfile [open $tgscf w]
puts $_sfile ""
close $_sfile
set tgscores ""
set tgscorestotal 0
}
tggamemsg "4===== Skor Tablosu $nick! Tarafından Resetlendi ====="
return 1
}
#triggered when a winning streak ends.
proc tgstreakend {} {
global tgstreak tgrealnames
tggamemsg "4Bravo $tgrealnames([lindex [split $tgstreak ,] 0]) Çok Fazla Strike ye Sahipsiniz.. Tebrikler!"
return
}
#triggered when someone joins trivia chan.
proc tgjoinmsg {nick host hand chan} {
global botnick tgplaying tgcmdhelp tgcmdstart tgflagsstart tgcmdstop tgflagsstop tgchan
if {$nick != $botnick} {
set _msg ""
append _msg "Welcome to $botnick's Bilmece Channel. Bilmece Oyunu Şuanda"
if {$tgplaying==1} {
append _msg " \002on\002."
} else {
append _msg " \002off\002."
}
if {[matchattr $hand $tgflagsstart $tgchan]&&$tgplaying==0} {
append _msg " Bilmece Oyununu Başlatmak İçin, Lütfen \002$tgcmdstart\002 Yazınız"
}
append _msg " Yardıma İhtiyacınız Olursa \002/MSG $botnick [strupr
$tgcmdhelp]\002 Yazınız! :-) (
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
)"
[tgpriv] $nick "$_msg"
}
}
#triggered when someone /msgs the bot with the score lookup command.
proc tgscorelookup {nick host hand text} {
global tgscoresbyname tgranksbyname tgscorestotal tgrealnames
if {$text==""} { set text $nick } else { set text [lindex [split $text] 0] }
tggetscores
if {![info exists tgscoresbyname([strlwr $text])]} {
if {[strlwr $text]==[strlwr $nick]} {
set _who "4Siz"
} else {
set _who "4$text 4is"
}
[tgpriv] $nick "Skor Tablosunda Yoksunuz!"
} else {
if {[strlwr $text]==[strlwr $nick]} {
set _who "4Siz"
} else {
set _who "4$tgrealnames([strlwr $text]) 4is"
}
[tgpriv] $nick "$tgscoresbyname([strlwr $text]) Bilmece Bildiniz , Ranked 4[tgordnum [lindex [split $tgranksbyname([strlwr $text]) ,] 0]] of 4$tgscorestotal."
}
return 1
}
#triggered when someone /msgs the bot with the target lookup command.
proc tgtargetlookup {nick host hand text} {
global tgscoresbyname tgranksbyname tgscorestotal tgranksbynum tgrealnames
tggetscores
if {![info exists tgscoresbyname([strlwr $nick])]} {
[tgpriv] $nick "Siz Bilmece Skor Tablosunda Yoksunuz!"
} else {
set _myrank [lindex [split $tgranksbyname([strlwr $nick]) ,] 0]
set _myscore [lindex [split $tgscoresbyname([strlwr $nick]) ,] 0]
set _tgtrank [expr [lindex [split $tgranksbyname([strlwr $nick]) ,] 0]-1]
set _tgtnick [lindex [split $tgranksbynum($_tgtrank) ,] 0]
set _tgtscore [lindex [split $tgranksbynum($_tgtrank) ,] 1]
[tgpriv] $nick "Şuandaki Bildiğiniz Bilmece Sayısı \00304$_myscore\00306. "
}
return 1
}
#triggered when someone /msgs the bot with the error reporting command.
proc tgerror {nick host hand text} {
global tgquestionstotal tgquestionslist tgerrfil
if {$text==""||![string is int [lindex $text 0]]} {
[tgpriv] $nick "Bilmece Numarasını belirtmelisiniz...!"
return
}
tgreadqdb
set _qnum [lindex $text 0]
if {$_qnum>$tgquestionstotal} {
[tgpriv] $nick "Böyle Bir Bilmece Bulunamadı."
return
}
set _qques [lindex [split [lindex $tgquestionslist [expr $_qnum-1]] |] 1]
set _qans [lindex [split [lindex $tgquestionslist [expr $_qnum-1]] |] 0]
set _desc [lrange $text 1 end]
if {$_desc==""} { set _desc "No further info given for this error." }
set _file [open $tgerrfil a]
puts $_file "Reported by:\t$nick"
puts $_file "Bezirgan #:\t$_qnum"
puts $_file "Bezirgan:\t$_qques"
puts $_file "Answer:\t\t$_qans"
puts $_file "Comments:\t$_desc"
puts $_file "--------------------------------------------------------------------------------"
close $_file
[tgpriv] $nick "Bilmece Hatasini Bildirdiğiniz İçin Teşekkür Ederiz."
return 1
}
#triggered when someone /msgs the bot with the rules command.
proc tgrulesmsg {nick host hand text} {
global tgrules
[tgpriv] $nick "Bilmece Kanal Kuralları: $tgrules"
return 1
}
#triggered when someone /msgs the bot with the help command.
proc tggivehelp {nick host hand {text ""}} {
global botnick tgcmdlookup tgcmdhelp tgcmdstart tgcmdstop tgchan tgflagsstop
global tgcmdstop tgflagshint tgcmdhint tgflagsskip tgcmdskip tgflagsreset tgcmdreset
global tgcmdtarget tgcmderror tgcmdrules
if {$text==""} {
[tgpriv] $nick "Yardım Almak İçin Kullanacağınız Komut /MSG commands:"
[tgpriv] $nick "Komutları command Yerine Yazınız, /MSG $botnick <command>"
[tgpriv] $nick " \002[strupr $tgcmdrules]\002"
[tgpriv] $nick " -- Bilmece Kanal Kurallarını Listelemek İçin"
[tgpriv] $nick " \002[strupr $tgcmdlookup]\002 \[nick\]"
[tgpriv] $nick " -- Bilmece Skorunuzu Öğrenmek İçin \[nick\], "
[tgpriv] $nick " Sadece Kendi Skorunuzu Görüntüler."
[tgpriv] $nick " \002[strupr $tgcmdtarget]\002"
[tgpriv] $nick " -- Bilmece botundaki Hedefinizi Gösterir"
[tgpriv] $nick " Kimin Sizin Önünüzde Olduğunu Yada Arkanızdakinin Kim Olduğunu Görmek İçin"
[tgpriv] $nick " \002[strupr $tgcmderror]\002 <number> \[description\]"
[tgpriv] $nick " -- Bilmece Hataları bizlere Bildirmenize Yarar <number>"
[tgpriv] $nick "
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
"
if {[matchattr $hand $tgflagsreset $tgchan]} {
[tgpriv] $nick " \002[strupr $tgcmdreset]\002"
[tgpriv] $nick " -- Bilmece Skor Tablosunu Resetlemek İçin."
}
[tgpriv] $nick "Kanal Komutlarını Listelemek İçin, /MSG $botnick [strupr $tgcmdhelp] PUBCMDS"
}
if {[strlwr $text]=="pubcmds"} {
[tgpriv] $nick "You have access to the following channel commands:"
if {[matchattr $hand $tgflagsstart $tgchan]} {
[tgpriv] $nick " \002$tgcmdstart\002 -- Bilmece Oyununu Baslatır."
}
if {[matchattr $hand $tgflagsstop $tgchan]} {
[tgpriv] $nick " \002$tgcmdstop\002 -- Bilmece Oyununu Durdurur."
}
if {[matchattr $hand $tgflagshint $tgchan]} {
[tgpriv] $nick " \002$tgcmdhint\002 -- İpucu Verir."
}
if {[matchattr $hand $tgflagsskip $tgchan]} {
[tgpriv] $nick " \002$tgcmdskip\002 -- Bilmeceyi Atlar."
}
[tgpriv] $nick "For a list of /MSG commands, /MSG $botnick [strupr $tgcmdhelp]"
}
return 1
}
#misc procs
proc tggamemsg {what} {
global tgchan
putquick "PRIVMSG $tgchan :$what"
}
#Returns ordinal version of number passed to it.
#i.e. [tgordnum 1] returns "1st", [tgordnum 33] returns "33rd"
#Surely there's an easier way to do this?
proc tgordnum {num} {
set _last1 [string range $num [expr [strlen $num]-1] end]
set _last2 [string range $num [expr [strlen $num]-2] end]
if {$_last1=="1"&&$_last2!="11"} {
return "[expr $num]st"
} elseif {$_last1=="2"&&$_last2!="09"} {
return "[expr $num]nd"
} elseif {$_last1=="3"&&$_last2!="13"} {
return "[expr $num]rd"
} else {
return "[expr $num]th"
}
}
proc tgpriv {} {
global tgpriv2msg
if {$tgpriv2msg==1} {
return "putmsg"
} else {
return "putnotc"
}
}
putlog "* [file tail [info script]] By CroAtoN <
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
> Yuklendi."
tgreadqdb
putlog "* $tgquestionstotal Bilmece basariyla yuklendi"

 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları eglen sohbet sohbet