IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası
  sohbet

Yeni Konu aç Cevapla
 
LinkBack Seçenekler Stil
Alt 07 Şubat 2007, 17:11   #1
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Oyun Botunda Soru Yansıtmama Hatası




Kod:   Kodu kopyalamak için üzerine çift tıklayın!
#===================================================================# # #=== # E G G D R O P C O N F I G BY P O W E R U S E R # ===# # #===================================================================# #===================== LINE NEEDED FOR LOADCONF ====================# #! /path/to/eggdrop #======================= GENERAL BOT SETTINGS ======================# set admin "ircpOLiCe <email:
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
>" set network "208.98.33.92" set timezone "EST" set offset "5" set my-hostname "208.98.33.92" set my-ip "208.98.33.92" #==================== GENERAL BOT LOGGING OPTIONS ==================# set max-logsize 0 set quick-logs 0 logfile mco * "logs/oyun.log" logfile bjk #Oyun "logs/oyun.log" set log-time 1 set keep-all-logs 0 set switch-logfiles-at 300 set quiet-save 0 set console "mkcobxs" #================ GENERAL BOT FILE/LOCATION SETTINGS ===============# set userfile "logs/Oyun.user" set sort-users 0 set help-path "help/" set temp-path "/tmp" set motd "motd" set telnet-banner "telnet-banner" #====================== GENERAL BOTNET OPTIONS =====================# #set botnet-nick "RoBoT" listen 3333 all set protect-telnet 0 set dcc-sanitycheck 0 set ident-timeout 5 set require-p 0 set open-telnets 0 set stealth-telnets 0 set use-telnet-banner 0 set connect-timeout 15 set dcc-flood-thr 3 set telnet-flood 5:60 set paranoid-telnet-flood 1 set resolve-timeout 15 #===================== ADVANCED SETTINGS FOR BOT ===================# #set firewall "proxy:178" #set nat-ip "127.0.0.1" #set reserved-port 9076 set ignore-time 0 set hourly-updates 00 set owner "eScaPe" set notify-newusers "$owner" set default-flags "hp" set whois-fields "url birthday" set remote-boots 2 set share-unlinks 1 set die-on-sighup 0 set die-on-sigterm 0 unbind dcc n tcl *dcc:tcl unbind dcc n set *dcc:set set must-be-owner 0 unbind dcc n simul *dcc:simul set max-dcc 50 set dcc-portrange 1024:65535 set enable-simul 1 set allow-dk-cmds 1 #==================== GENERAL BOT MODULE SETTINGS ==================# set mod-path "modules/" #==================== GENERAL BOT CHANNEL MODULES ==================# loadmodule channels set chanfile "logs/oyun.chan" set ban-time 0 set exempt-time 60 set invite-time 60 # set force-expire 0 set share-greet 0 set use-info 1 set global-flood-chan 5:3 set global-flood-deop 5:10 set global-flood-kick 0:0 set global-flood-join 8:30 set global-flood-ctcp 8:30 set global-chanset { +clearbans +enforcebans +dynamicbans +userbans +autoop -bitch +greet +nodesynch +statuslog -stopnethack -revenge -secret -autovoice +cycle +dontkickops -wasoptest -inactive +protectfriends +shared -seen +userexempts +dynamicexempts +userinvites +dynamicinvites } channel add #Oyun { need-op { putserv "MODE #Oyun +o $botnick " } chanmode "+nt" idle-kick 0 } set global-chanmode "" #==================== GENERAL BOT SERVER MODULES ===================# loadmodule server set net-type 0 set nick "Oyun" set realname "4Sunucu oyun Serveri" set username "Oyun" set init-server { putserv "PRIVMSG nickserv :identify @selcukedu.org" putserv "oper boting şifre" } set servers { 208.98.33.92:6667 } set keep-nick 1 set use-ison 1 set strict-host 0 set quiet-reject 1 set lowercase-ctcp 0 set answer-ctcp 3 set flood-msg 0:0 # how many CTCPs in how many seconds? set flood-ctcp 0:0 set never-give-up 1 set strict-servernames 0 set default-port 7000 set server-cycle-wait 30 set server-timeout 15 set servlimit 0 set check-stoned 1 set use-console-r 0 set debug-output 0 set serverror-quit 1 set max-queue-msg 300 set trigger-on-ignore 0 set double-mode 0 set double-server 0 set double-help 0 #set use-silence 1 #set check-mode-r 1 loadmodule ctcp set ctcp-mode 0 loadmodule irc set bounce-bans 1 set bounce-modes 0 set kick-bogus-bans 1 set bounce-bogus-bans 1 set max-bans 20 set max-modes 30 set allow-desync 0 set kick-bogus 0 set ban-bogus 0 set kick-fun 0 set ban-fun 0 set learn-users 0 set wait-split 600 set wait-info 180 set mode-buf-length 200 #unbind msg - hello *msg:hello #bind msg - myword *msg:hello unbind msg - ident *msg:ident unbind msg - addhost *msg:addhost #bind msg - myidentword *msg:ident set no-chanrec-info 0 set revenge-mode 1 set bounce-exempts 0 set bounce-invites 0 set max-exempts 20 set max-invites 20 set bounce-bogus-exempts 0 set kick-bogus-exempts 0 set bounce-bogus-invites 0 set kick-bogus-invites 0 # set use-exempts 0 # set use-invites 0 set prevent-mixing 1 #set kick-method 1 #set modes-per-line 3 #set use-354 0 #set rfc-compliant 1 #loadmodule transfer set max-dloads 3 set dcc-block 1024 set copy-to-tmp 1 set xfer-timeout 30 #==================== GENERAL BOT SHARE MODULES ====================# #loadmodule share #set allow-resync 0 #set resync-time 900 #set private-owner 0 #set private-global 0 #set private-globals "mnot" #set private-user 0 #================== GENERAL BOT FILESYSTEM MODULES =================# #loadmodule filesys set files-path "/home/sevenler/filesys" set incoming-path "/home/sevenler/filesys/incoming" set upload-to-pwd 0 set filedb-path "" set max-file-users 20 set max-filesize 1024 #===================== GENERAL BOT NOTES MODULES ===================# loadmodule notes set notefile "logs/oyun.notes" set max-notes 50 set note-life 60 set allow-fwd 0 set notify-users 1 set notify-onjoin 1 #==================== GENERAL BOT CONSOLE MODULES ==================# loadmodule console set console-autosave 1 set force-channel 0 set info-party 0 #==================== GENERAL BOT WOOBIE MODULES ===================# #loadmodule woobie #===================== GENERAL BOT SEEN MODULES ====================# #loadmodule seen #==================== GENERAL BOT BLOWFISH MODULES =================# checkmodule blowfish #===================== GENERAL BOT ASSOC MODULES ===================# #loadmodule assoc #===================== GENERAL BOT WRITE MODULES ===================# #loadmodule wire #======================== GENERAL BOT SCRIPTS ======================# source scripts/alltools.tcl source scripts/action.fix.tcl source scripts/userinfo.tcl source scripts/oyun.tcl source scripts/ping.tcl loadhelp userinfo.help #===================== GENERAL BOT HELP MODULES ====================# loadhelp scripts/userinfo.help

Yukarı kısım oyun.conf

Aşagı ise tcl
Kod:   Kodu kopyalamak için üzerine çift tıklayın!
# MasaLNeT IRC Network # Bilgiler set tgqdb "/home/selcuked/eggdrop/scripts/soru.bankasi" # Sorular dosyasinda sorulari cevaplardan ayirmak icin kullanilacak # olan karakter. set tgqdbsep "*" # Soru ve cevaplarin sorular dosyasindaki ayirimini duzenlemeye yarar. # Eger 1 olarak ayarli olursa soru*cevap # Eger 0 olarak ayarli olursa cevap*soru seklinde sorular sorulucaktir.! # Eger botunuz cevaplari soru olarak soruyorsa, bunu degistirin. set tgqdbquestionfirst 1 # Skorlarin tutulacagi dosyanin adi. set tgscf "trivia.skor" # Hatalarin admine nasil gonderilecegini ayarlar. Eger 1 olarak # ayarlanirsa bot admine hatalari mail ile gonderir. Botun mail # erisimi olmasi gereklidir.! Eger 0 olarak birakilirsa bot hatalari # dosyaya kayit eder. Duzenlemeye gerek yok. set tgerrmethod 0 # Botun hatalari kayit edecegi dosya. set tgerrfil "trivia.hata" # Botun admin`i nin Email Adresi. set tgerremail "
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
" # Eger bot hatalari mail ile gondericeks ebot gecici dosyalari # nereye koyucagini ayarlar. set tgerrmailtmp "/tmp" # Web istatistikleri icin olusturulacak dosyanin tam yolu ve ismi. # Ayrintili web istatistiklerinin nasil yapilacagini ogrenmek icin # sitemizi ziyaret edin. set tghtmlfile "/var/
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
Web istatistikleri kac saniyede bir yenilenecek.! set tghtmlrefresh 60 # Web sitesinin fontu. set tghtmlfont "verdana,helvetica,arial" # Oyunu oynanacagi kanal. Bu kanal sadece 1 tane olabilir. Ayrica ayni # botda 2 ayri script birlikte calismaz.!!! set tgchan "#Oyun" # Her dogru cevap icin verilicek puan. set tgpointsperanswer 5 # Maximum ipucu adedi. set tgmaxhint 4 # Botun her ipucu verildiginde soruyu tekrar gosterir gostermemesini ayarlar. # 1= her seferinde soruyu gosterir, 0= sadece 1 kere gosterir. set tgalwaysshowq 1 # Sorulari BUYUK harflerle sorar. ( 0= sorulari kucuk harfle sorar.) set tgcapsquestion 0 # Cevaplari BUYUK harfle yazar. (0= cevaplari kucuk harfle yazar.) set tgcapsanswer 0 # Ipuclarini BUYUK harfle yazar. (0= ipuclarini kucuk harfle yazar.) set tgcapshint 0 # Arka arkaya bilme rekorunun olabilmesi icin en az kac sorunun arka # arkaya bilinmesi gerektigini ayarlar. (0= iptal eder) set tgstreakmin 5 # Botu eger ayarlanan miktarda soruya cevap veren cikmazsa durur. 0 ayarlanirsa # bot hic durmadan soru sorar. set tgmaxmissed 0 # Sorularin kanalda sorulurken neyle sifrelenecegini ayarlar. set tghintchar "*" # Ipuclari arasindaki zaman farki. (saniye) set tgtimehint 10 # Eski soruyla yeni sorulucak soru arasindaki zaman farki. set tgtimenext 5 # Soru bilindiginde botun kullanacagi terimler. set tgcongrats[list "Tebrikler" "Yürü be" "Harika" "Iyi Gidiyorsun" "Kim tutar seni" "Basardin" "Iste Oyun Boyle Oynanir" "Herkese Goster Nasil Oynanir" ] # Kimse bilemediginde botun kullanacagi terimler. set tgnobodygotit[list "Canlanin Yaf.." "Kimse Dogru Bilemedi." "Canli Varmi Kanalda?" "Daha Cok Calismalisiniz Cokkk!" "Hehe Bu Sorular Zormu Geldi?" "Yoksa Yanlizmiyim kanalda?" "bu Sekilde giderse puan alamazsiniz.!" "Alo
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
herkes nerde" "Kültür manyağı yapıcam hepinizi"] # Eski soru bitip yenisi sorulurken kulanilan terimler. set tgtrythenextone[list "Bakalim Siradakini Bilebilecekmisiniz.." "Siradaki icin hazirlanin..." "Belkide Siradakini bilebilirsiniz..." "Siradakini Bilmeye Calisin bakalim..." "Ewt Siradaki geliyorrr..." "Hadi Baslayalım"] # Cevabin kac saniye surdugunu aktif eder. (0=kapatir) set tgtimeanswer 1 # Eger kimse dogru cevabi veremezse bot sorunun cevabini gosterir. (0=gostermez) set tgshowanswer 1 # Birisi sorulan soruya dogru cevap verdiginde, bot sadece o kisinin skorunumu yoksa # butun ilk 20 yimi gostericek. 1= sadece kisinin, 0= ilk 20nin. set tgshowallscores 0 # msglarda kalin yazi kullan(1) kullanma(0). set tgusebold 0 # msglar notice(0) ile mi yoksa msg(1) ilemi gonderilecek. ? set tgpriv2msg 1 # Botdan yardim almak icin kullanilalacak komut. set tgcmdhelp "!yardim" # Botu baslatma komutu. set tgcmdstart "!basla" # Oyunu baslatma yetkisi ayarlari. set tgflagsstart "-|-" # Oyunu durdurma komutu. set tgcmdstop "!dur" # Oyunu durdurma yetkisi ayarlari. set tgflagsstop "-|-" # Ipucu almak icin kullanilan komut. set tgcmdhint "!ipucu" # Ipucu almak icin yetki ayarlari. set tgflagshint "-|-" # Ipucu verildikten sonra kac diger ipucu icin kac saniye beklenicek. set tgtempnohint 5 # Sorulan soruyu gecmek icin kullanilan komut. set tgcmdskip "!gec" # Soruyu gecmek icin kullanilan yetki ayarlari. set tgflagsskip "o|o" # Ilk 10 nun gosterilme komutu. set tgcmdtop10 "!top10" # ilk 10 komutunu icin yetki ayari. set tgflagstop10 "-|-" # Skorlari resetlemek icin kullanilan komut. set tgcmdreset "resetleskorlaribebek" # reset komutunu kullanilbek icin yetki ayari. set tgflagsreset "m|m" # Skorlara bakmak icin kullanilan komut. set tgcmdlookup "!skor" # Sizden bir usttekine bakmak icin kullanilan komut. set tgcmdtarget "!hedef" # Hatalari bildirmek icin kullanilan komut. set tgcmderror "!hata" # Kurallari gormek icin kullanilan komutlar. set tgcmdrules "!kurallar" # Kanala Kurallari.! set tgrules "Oyunu Baslatmak icin !basla yaziniz.! Iyı Eglenceler Sunucu Yöneticileri" # Hatalari nasil bildirilecegini gonderen msg kac dakika da bir kanalda yazilicak.! set tgerrremindtime 15 # RENKLER # Mircdeki renk kodlari ile ayni kodlardir..! # 00:beyaz 01:siyah 02:koyu mavi 03:koyu yesil # 04:kirmizi 05:krengi 06:pembe 07:portakal # 08:sari 09:acik yesil 10:turkuaz 11:cyan # 12:acik mavi 13:magenta 14:koyu gri 15:acik gri set tgcolourstart "7,1" ;#Oyun baslatildi. set tgcolourstop "7,1" ;#Oyun durduruldu. set tgcolourskip "7,1" ;#Soru gecildi. set tgcolourerr "0,1" ;#Nasil hata bildirilir. set tgcolourmiss "9,1" ;#Kimse soruyu bilemedi. set tgcolourqhead "4,1" ;#Soru basligi. set tgcolourqbody "0,1" ;#Sorunun kendisi. set tgcolourhint "9,1" ;#Ipucu. set tgcolourstrk "3,1" ;#Arka arkaya bilme rekorunda olan kisi. set tgcolourscr1 "8,1" ;#1.Siradaki kisi. set tgcolourscr2 "9,1" ;#2.Siradaki kisi. set tgcolourscr3 "7,1" ;#3.Siradaki kisi. set tgcolourrset "0,1" ;#Skorlar Resetlendi. set tgcolourstend "1,15" ;#Arka arkaya bilme rekoru bitti. set tgcolourmisc1 "4,1" ;#Ara reng 1. set tgcolourmisc2 "9,1" ;#Ara reng 2. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # LUTFEN BURDAN SONRASINI EDITLEMEYINIZ..! # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #Misc checks & var initialisations set tgver "2.2" set tgrel "stable" if {[info tclversion]<8.2} { putlog "\002[file tail [info script]]\002 failed to load: in order to use this script, eggdrop needs to be compiled to use tcl 8.2 or higher (recommended: latest stable version)." return } if {$tgtimeanswer==1&&[info tclversion]<8.3} { putlog "\002[file tail [info script]]\002 warning: timing of answers has been automatically disabled. this feature requires tcl 8.3 or higher." set tgtimeanswer 0 } if {![info exists alltools_loaded]||$allt_version<205} { putlog "\002[file tail [info script]]\002 failed to load: please load alltools.tcl v1.14 or higher (available with eggdrop 1.6.13 or higher) before attempting to load this script." return } if {[utimerexists tghtml]!=""} {killutimer $tghtmlrefreshtimer} if {$tghtmlrefresh>0} { set tghtmlrefreshtimer [utimer $tghtmlrefresh tghtml] } if {![file exists $tgqdb]} { putlog "\002[file tail [info script]]\002 failed to load: $tgqdb does not exist." 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 ctcp-version "${ctcp-version} (Created By eScaPe )" set tgplaying 0 } if {![info exists tghintnum]} {set tghintnum 0} if {![info exists tgmissed]} {set tgmissed 0} #Binds bind pubm $tgflagsstart "$tgchan %$tgcmdstart" tgstart bind pubm $tgflagsstop "$tgchan %$tgcmdstop" tgstop proc tgbindhintcmd {} { global tgflagshint tgcmdhint bind pubm $tgflagshint "$::tgchan %$tgcmdhint" tgforcehint } proc tgunbindhintcmd {} { global tgflagshint tgcmdhint unbind pubm $tgflagshint "$::tgchan %$tgcmdhint" tgforcehint } tgbindhintcmd bind pubm $tgflagsskip "$tgchan %$tgcmdskip" tgskip bind pubm $tgflagstop10 "$tgchan %$tgcmdtop10" tgshowtop10 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 "[tgcolstart]$nick Oyunu baslatti.!" tgnextq set tgplaying 1 set tgstreak 0 set tgmissed 0 set tgerrremindtimer [timer $tgerrremindtime tgerrremind] } } } #stops the game if it's running. proc tgstop {nick host hand chan text} { global tghinttimer tgnextqtimer tgplaying tgchan tgcurrentanswer tgstreak tgstreakmin global tgerrremindtimer tgrebindhinttimer if {[strlwr $tgchan]==[strlwr $chan]} { if {$tgplaying==1} { tggamemsg "[tgcolstop] $nick oyunu durdu.!" if {$tgstreakmin>0&&[lindex [split $tgstreak ,] 1]>=$tgstreakmin} { tgstreakend } set tgstreak 0 set tgplaying 0 catch {unbind pubm -|- "$tgchan *" tgcheckanswer} if {[utimerexists tghint]!=""} {killutimer $tghinttimer} if {[utimerexists tgnextq]!=""} {killutimer $tgnextqtimer} if {[timerexists tgerrremind]!=""} {killtimer $tgerrremindtimer} if {[utimerexists tgrebindhinttimer]!=""} {killtimer $tgrebindhinttimer} } } } #gives a hint if there is currently a question to answer. proc tgforcehint {nick host hand chan text} { global tghinttimer tgnextqtimer tgplaying tgchan tgcurrentanswer tgstreak tgstreakmin global tgtempnohint tgmaxhintcurrent tghintnum tgrebindhinttimer tgtempnohint if {[strlwr $tgchan]==[strlwr $chan]} { if {$tgplaying==1&&[utimerexists tghint]!=""} { killutimer $tghinttimer tghint tgunbindhintcmd if {$tghintnum<$tgmaxhintcurrent} { set tgrebindhinttimer [utimer $tgtempnohint tgbindhintcmd] } } } } #skips the current question if one has been asked. proc tgskip {nick host hand chan text} { global tghinttimer tgnextqtimer tgplaying tgchan tgcurrentanswer tgstreak global tgstreakmin tgtimenext tgrebindhinttimer if {[strlwr $tgchan]==[strlwr $chan]} { if {$tgplaying==1&&[utimerexists tghint]!=""} { tggamemsg "[tgcolskip]Yeni Soruya geciliyot [tgcolmisc2]$nick's[tgcolskip] ole istedi.!" if {$tgstreakmin>0&&[lindex [split $tgstreak ,] 1]>=$tgstreakmin&&[strlwr [lindex [split $tgstreak ,] 0]]==[strlwr $nick]} { tgstreakend set tgstreak 0 } catch {unbind pubm -|- "$tgchan *" tgcheckanswer} killutimer $tghinttimer if {[utimerexists tgrebindhinttimer]!=""} {killtimer $tgrebindhinttimer} set tgnextqtimer [utimer $tgtimenext tgnextq] } } } #reminds channel how to report errors in questions/answers proc tgerrremind {} { global tgerrremindtimer tgerrremindtime botnick tgcmderror tggamemsg "[tgcolerr]UYARI: Hatalı soruları bize bildirmek için /msg $botnick $tgcmderror <Hatalı Soru No> \[Açıklama] yazmanız yeterlidir." 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 tgnextqtimer tgerrremindtimer global tgrebindhinttimer if {$tgplaying==1} { set tgstreak 0 set tgplaying 0 catch {unbind pubm -|- "$tgchan *" tgcheckanswer} if {[utimerexists tghint]!=""} {killutimer $tghinttimer} if {[utimerexists tgnextq]!=""} {killutimer $tgnextqtimer} if {[timerexists tgerrremind]!=""} {killtimer $tgerrremindtimer} if {[utimerexists tgrebindhinttimer]!=""} {killtimer $tgrebindhinttimer} } } #reads the question database. proc tgreadqdb {} { global tgqdb tgquestionstotal tgquestionslist set tgquestionstotal 0 set tgquestionslist "" set qfile [open $tgqdb r] set tgquestionslist [split [read -nonewline $qfile] "\n"] set tgquestionstotal [llength $tgquestionslist] close $qfile } #selects the next question. proc tgnextq {} { global tgqdb tgcurrentquestion tgcurrentanswer tgquestionnumber global tgquestionstotal tghintnum tgchan tgquestionslist tgqdbsep tgqdbquestionfirst global tgcapsquestion tgcapsanswer tgreadqdb set tgcurrentquestion "" set tgcurrentanswer "" while {$tgcurrentquestion == ""} { set tgquestionnumber [rand [llength $tgquestionslist]] set tgquestionselected [lindex $tgquestionslist $tgquestionnumber] set tgcurrentquestion [lindex [split $tgquestionselected $tgqdbsep] [expr $tgqdbquestionfirst^1]] if {$tgcapsquestion==1} { set tgcurrentquestion [strupr $tgcurrentquestion] } set tgcurrentanswer [string trim [lindex [split $tgquestionselected $tgqdbsep] $tgqdbquestionfirst]] if {$tgcapsanswer==1} { set tgcurrentanswer [strupr $tgcurrentanswer] } } unset tghintnum tghint bind pubm -|- "$tgchan *" tgcheckanswer return } #shows timed hints. proc tghint {} { global tgmaxhint tghintnum tgcurrentanswer tghinttimer tgchan global tgtimehint tghintchar tgquestionnumber tgquestionstotal global tgcurrentquestion tghintcharsused tgnextqtimer tgtimenext tgstreak tgstreakmin global tgnobodygotit tgtrythenextone tgmissed tgmaxmissed tgcmdstart tgshowanswer global tgtimestart tgtimeanswer tgalwaysshowq tgmaxhintcurrent tgtempnohint tgcapshint if {[catch {incr tghintnum}]!=0} { set tghintnum 0 regsub -all -- "\[^A-Za-z0-9\]" $tgcurrentanswer "" _hintchars set tgmaxhintcurrent [expr [strlen $_hintchars]<=$tgmaxhint?[expr [strlen $_hintchars]-1]:$tgmaxhint] catch {tgunbindhintcmd} if {$tgmaxhintcurrent>0} { set tgrebindhinttimer [utimer $tgtempnohint tgbindhintcmd] } } if {$tghintnum >= [expr $tgmaxhintcurrent+1]} { incr tgmissed set _msg "" append _msg "[tgcolmiss][lindex $tgnobodygotit [rand [llength $tgnobodygotit]]]" if {$tgshowanswer==1} { append _msg " Dogru Cevap [tgcolmisc2]$tgcurrentanswer[tgcolmiss]." } if {$tgmaxmissed>0&&$tgmissed>=$tgmaxmissed} { append _msg " Arka arkaya cevap verilmeyen $tgmissed soru. Bot otomatik olarak durucak. Tekrar calistirmak icin $tgcmdstart yaziniz.!" tgquietstop } else { append _msg " [lindex $tgtrythenextone [rand [llength $tgtrythenextone]]]" } tggamemsg "[tgcolmiss]$_msg" if {$tgstreakmin>0&&[lindex [split $tgstreak ,] 1]>=$tgstreakmin} { tgstreakend } set tgstreak 0 catch {unbind pubm -|- "$tgchan *" tgcheckanswer} if {$tgmaxmissed==0||$tgmissed<$tgmaxmissed} { set tgnextqtimer [utimer $tgtimenext tgnextq] } return } elseif {$tghintnum == 0} { set i 0 set _hint {} set tghintcharsused {} foreach word [split $tgcurrentanswer] { regsub -all -- "\[A-Za-z0-9\]" $word $tghintchar _current lappend _hint $_current } if {$tgtimeanswer==1} { 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 } } if {$tgcapshint==1} { set _hint [strupr $_hint] } tggamemsg "[tgcolqhead]===== Siradaki Soru: [expr $tgquestionnumber+1]/$tgquestionstotal [expr $tghintnum?"(Ipucu $tghintnum/$tgmaxhintcurrent)":""] =====" if {$tgalwaysshowq==1||$tghintnum==0} { tggamemsg "[tgcolqbody]$tgcurrentquestion" } tggamemsg "[tgcolhint]Ipucumuz: [join $_hint]" set tghinttimer [utimer $tgtimehint tghint] } #triggered when someone uses !top10 command proc tgshowtop10 {nick host hand chan text} { global tgscores tgchan tgscorestotal if {[strlwr $chan]==[strlwr $tgchan]} { tggetscores if {$tgscorestotal>0} { if {$tgscorestotal>9} { set _max 9 } else { set _max [expr $tgscorestotal-1] } set i 0 while {$i<=$_max} { set _item [lindex $tgscores $i] set _nick [join [lindex [split $_item ,] 2]] set _score [join [lindex [split $_item ,] 0]] if {$i==0} { append _scores "[tgcolscr1]$_nick $_score" } elseif {$i==1} { append _scores ", [tgcolscr2]$_nick $_score" } elseif {$i==2} { append _scores ", [tgcolscr3]$_nick $_score" } else { append _scores ", [tgcolmisc1]$_nick $_score" } incr i } tggamemsg "[tgcolmisc1]Top 10: $_scores" } else { tggamemsg "[tgcolmisc1]Score table is empty." } } } #checks if anyone has said the correct answer on channel. proc tgcheckanswer {nick host hand chan text} { global tgcurrentanswer if {[strlwr $tgcurrentanswer] == [tgstripcodes [strlwr [string trim $text]]]} { tgcorrectanswer $nick } } #triggered when someone says the correct answer. proc tgcorrectanswer {nick} { global tgcurrentanswer tghinttimer tgtimenext tgchan tgnextqtimer tgstreak tgstreakmin global tgscoresbyname tgranksbyname tgranksbynum tgcongrats tgscorestotal tgmissed global tgtimestart tgshowallscores tgrealnames tgscoresbyrank tgtimeanswer tggetscores if {![info exists tgranksbyname([strlwr $nick])]} { set _oldrank 0 } else { set _oldrank $tgranksbyname([strlwr $nick]) } tgincrscore $nick tggetscores set _newrank $tgranksbyname([strlwr $nick]) set _timetoanswer "" if {$tgtimeanswer==1} { set _timetoanswer [expr [expr [clock clicks -milliseconds]-$tgtimestart]/1000.00] } set _msg "[tgcolmisc1][lindex $tgcongrats [rand [llength $tgcongrats]]] [tgcolmisc2]$nick[tgcolmisc1]! Dogru Cevap [tgcolmisc2]$tgcurrentanswer[tgcolmisc1].[expr $tgtimeanswer==1?" Cevaplama suresi [tgcolmisc2]$_timetoanswer[tgcolmisc1] saniye.":""]" if {$_newrank<$_oldrank} { if {$_newrank==1} { append _msg " Helal, Suanda BIRINCI Siradasin" } else { if {$tgshowallscores==0} { append _msg " Listede Yuklelise gectin.!" } else { append _msg " Suandaki Siran [tgcolmisc2][ordnumber $tgranksbyname([strlwr $nick])][tgcolmisc1] [tgcolmisc2]$tgscorestotal[tgcolmisc1] dogru cevap ile, senin onunde [tgcolmisc2]$tgrealnames($tgranksbynum([expr $_newrank-1]))[tgcolmisc1] var, [tgcolmisc2]$tgscoresbyrank([expr $_newrank-1])[tgcolmisc1] dogru cevap ile." } } } 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 "[tgcolstrk][tgcolmisc2]$nick[tgcolstrk] is on a winning streak! [tgcolmisc2][lindex [split $tgstreak ,] 1] [tgcolstrk]in a row so far!" } } 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 $nick catch {unbind pubm -|- "$tgchan *" tgcheckanswer} killutimer $tghinttimer set tgnextqtimer [utimer $tgtimenext tgnextq] } #read current scores from file, sort and store in variable. proc tggetscores {} { global tgscf tgscorestotal tgscores tgscoresbyname tgranksbyname tgranksbynum global tgrealnames tgscoresbyrank 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] set tgranksbynum([expr $i+1]) $_lwrnick set tgscoresbyrank([expr $i+1]) $_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 {nick} { global tgscores tgchan tgscorestotal tgshowallscores tgranksbyname tgranksbynum global tgscoresbyname tgrealnames tgscoresbyrank tggetscores set i 0 if {$tgshowallscores} { 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 "[tgcolscr1]$_nick $_score" } elseif {$i==1} { append _scores ", [tgcolscr2]$_nick $_score" } elseif {$i==2} { append _scores ", [tgcolscr3]$_nick $_score" } elseif {[onchan $_nick $tgchan]} { append _scores ", [tgcolmisc1]$_nick $_score" } incr i } tggamemsg "[tgcolmisc1]Sonuclar: $_scores" } else { if {$tgranksbyname([strlwr $nick])==1} { set _tgt "." } else { set _tgt ", behind [tgcolmisc2]$tgrealnames($tgranksbynum([expr $tgranksbyname([strlwr $nick])-1]))[tgcolmisc1] with [tgcolmisc2]$tgscoresbyrank([expr $tgranksbyname([strlwr $nick])-1])[tgcolmisc1]." } tggamemsg "[tgcolmisc2]$nick [tgcolmisc1]now has [tgcolmisc2]$tgscoresbyname([strlwr $nick]) [tgcolmisc1][expr $tgscoresbyname([strlwr $nick])==1?"point":"points"] and is ranked [tgcolmisc2][ordnumber $tgranksbyname([strlwr $nick])] [tgcolmisc1]of [tgcolmisc2]$tgscorestotal[tgcolmisc1]$_tgt" } } #reset current scores. proc tgresetscores {nick host hand text} { global tgscf tgscorestotal tgscores tgplaying tgresetreqpw if {($tgresetreqpw==1 && [passwdok $hand $text]) || $tgresetreqpw==0} { if {[file exists $tgscf]&&[file size $tgscf]>2} { set _sfile [open $tgscf w] puts $_sfile "" close $_sfile set tgscores "" set tgscorestotal 0 } tggamemsg "[tgcolrset]===== Score table reset by $nick! =====" } } #triggered when a winning streak ends. proc tgstreakend {} { global tgstreak tgrealnames tggamemsg "[tgcolstend]So much for [tgcolmisc2]$tgrealnames([lindex [split $tgstreak ,] 0])'s[tgcolstend] winning streak." return } #triggered when someone joins trivia chan. proc tgjoinmsg {nick host hand chan} { global botnick tgplaying tgcmdhelp tgcmdstart tgflagsstart tgcmdstop tgflagsstop tgchan global tgscorelookupjoin tgscoresbyname tgranksbyname tgscorestotal tgrealnames global tgscoresbyrank tgscores tggetscores if {$nick != $botnick} { set _msg "" append _msg "" if {$tgplaying==1} { append _msg " \002Oyun şuanda oynaniyor.\002." } else { append _msg " \002Oyun şuanda kapali lütfen !basla yaziniz.\002." } if {[matchattr $hand $tgflagsstart $tgchan]&&$tgplaying==0} { append _msg "" } append _msg "" [tgpriv] $nick "$_msg" if {![info exists tgscoresbyname([strlwr $nick])]} { # tggamemsg "[tgcolmisc1]Welcome [tgcolmisc2]$nick [tgcolmisc1]! Sorry but you're not on the scorelist yet. Have a nice time!!! " } else { # tggamemsg "[tgcolmisc1]Hi [tgcolmisc2]$nick ![tgcolmisc1] You have -> [tgcolmisc2]$tgscoresbyname([strlwr $nick]) [tgcolmisc1]<- [expr $tgscoresbyname([strlwr $nick])==1?"point":"points"] ! You're ranked [tgcolmisc2][ordnumber $tgranksbyname([strlwr $nick])] [tgcolmisc1]of [tgcolmisc2]$tgscorestotal[tgcolmisc1], behind [tgcolmisc2]$tgrealnames($tgranksbynum([expr $tgranksbyname([strlwr $nick])-1]))[tgcolmisc1] with [tgcolmisc2]$tgscoresbyrank([expr $tgranksbyname([strlwr $nick])-1])[tgcolmisc1]." } 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<=9&&$nick==$_nick&&[botisop $tgchan]} { putserv "MODE $tgchan +v $nick" putserv "PRIVMSG $tgchan :[tgcolmisc1] Tebrikler [tgcolmisc2]$nick [tgcolmisc1]! Ilk10 Listesindesin, Bot size otomatik voice verdi.! Hadi simdi puanlarini yukseltme zamani. " } incr i } } } #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 "[tgcolmisc1]You are" } else { set _who "[tgcolmisc2]$text [tgcolmisc1]is" } [tgpriv] $nick "[tgbold]$_who [tgcolmisc1]not on the score list." } else { if {[strlwr $text]==[strlwr $nick]} { set _who "[tgcolmisc1]You have" } else { set _who "[tgcolmisc2]$tgrealnames([strlwr $text]) [tgcolmisc1]has" } [tgpriv] $nick "[tgbold]$_who [tgcolmisc2]$tgscoresbyname([strlwr $text])[tgcolmisc1] points, ranked [tgcolmisc2][ordnumber $tgranksbyname([strlwr $text])] [tgcolmisc1]of [tgcolmisc2]$tgscorestotal[tgcolmisc1]." } } #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 "[tgbold][tgcolmisc1]You are not on the score list yet." } elseif {$tgranksbyname([strlwr $nick])==1} { [tgpriv] $nick "[tgbold][tgcolmisc1]You are in first place!" } else { [tgpriv] $nick "[tgbold][tgcolmisc1]You are on [tgcolmisc2]$tgscoresbyname([strlwr $nick])[tgcolmisc1]. Your next target is [tgcolmisc2]$tgrealnames($tgranksbynum([expr $tgranksbyname([strlwr $nick])-1])) [tgcolmisc1]with [tgcolmisc2]$tgscoresbyname($tgranksbynum([expr $tgranksbyname([strlwr $nick])-1]))[tgcolmisc1], ranked [tgcolmisc2][ordnumber [expr $tgranksbyname([strlwr $nick])-1]] [tgcolmisc1]of [tgcolmisc2]$tgscorestotal[tgcolmisc1]." } } #triggered when someone /msgs the bot with the error reporting command. proc tgerror {nick host hand text} { global tgquestionstotal tgquestionslist tgerrmethod tgerrfil tgerremail tgerrmailtmp if {$text==""||![string is int [lindex [split $text] 0]]} { [tgpriv] $nick "[tgbold][tgcolmisc1]You need to specify the number of the question." return } tgreadqdb set _qnum [lindex [split $text] 0] if {$_qnum>$tgquestionstotal} { [tgpriv] $nick "[tgbold][tgcolmisc1]No such question." return } set _qques [lindex [split [lindex $tgquestionslist [expr $_qnum-1]] |] 1] set _qans [lindex [split [lindex $tgquestionslist [expr $_qnum-1]] |] 0] set _desc [join [lrange [split $text] 1 end]] if {$_desc==""} { set _desc "No further info given for this error." } if {$tgerrmethod==1} { set _fname $tgerrmailtmp\trivia[rand 100000].tmp set _file [open $_fname w] } else { set _file [open $tgerrfil a] } puts $_file "" puts $_file "Error report generated [strftime %A,\ %d\ %B\ %Y\ @\ %H:%M:%S]" puts $_file "Reported by:\t$nick!$host" puts $_file "Question #:\t$_qnum" puts $_file "Question:\t$_qques" puts $_file "Answer:\t\t$_qans" puts $_file "Comments:\t$_desc" puts $_file "------------------------------" close $_file if {$tgerrmethod==1} { exec mail -s "trivia.tcl error report from $nick" $tgerremail < $_fname file delete $_fname [tgpriv] $nick "[tgbold][tgcolmisc1]Thanks! Your error report has been e-mailed to my owner." } else { [tgpriv] $nick "[tgbold][tgcolmisc1]Thanks! Your error report has been logged and will be looked at as soon as possible." } } #triggered when someone /msgs the bot with the rules command. proc tgrulesmsg {nick host hand text} { global tgrules [tgpriv] $nick "The channel's rules are as follows: $tgrules" } #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 tgflagsstart if {$text==""} { [tgpriv] $nick "You have access to the following /MSG commands:" [tgpriv] $nick "To use, /MSG $botnick <command>" [tgpriv] $nick " \002[strupr $tgcmdrules]\002" [tgpriv] $nick " -- Lists the channel rules." [tgpriv] $nick " \002[strupr $tgcmdlookup]\002 \[nick\]" [tgpriv] $nick " -- Shows you the rank & score of \[nick\], if specified," [tgpriv] $nick " otherwise, shows you your own rank & score." [tgpriv] $nick " \002[strupr $tgcmdtarget]\002" [tgpriv] $nick " -- Shows you the rank & score of the person ranked" [tgpriv] $nick " one above you." [tgpriv] $nick " \002[strupr $tgcmderror]\002 <number> \[description\]" [tgpriv] $nick " -- Reports an error in question <number>" [tgpriv] $nick " The description is optional, but helpful." if {[matchattr $hand $tgflagsreset $tgchan]} { [tgpriv] $nick " \002[strupr $tgcmdreset]\002" [tgpriv] $nick " -- Resets the score table." } [tgpriv] $nick "For a list of channel commands, /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 -- starts the trivia game." } if {[matchattr $hand $tgflagsstop $tgchan]} { [tgpriv] $nick " \002$tgcmdstop\002 -- stops the trivia game." } if {[matchattr $hand $tgflagshint $tgchan]} { [tgpriv] $nick " \002$tgcmdhint\002 -- shows a hint." } if {[matchattr $hand $tgflagsskip $tgchan]} { [tgpriv] $nick " \002$tgcmdskip\002 -- skips current question." } [tgpriv] $nick "For a list of /MSG commands, /MSG $botnick [strupr $tgcmdhelp]" } } # Returns text without colour, bold, etc. control codes. # This is a stripped down version of the proc in MC_8's mc.moretools.tcl. proc tgstripcodes {text} { regsub -all -- "\003(\[0-9\]\[0-9\]?(,\[0-9\]\[0-9\]?)?)?" $text "" text set text "[string map -nocase[list \002 "" \017 "" \026 "" \037 ""] $text]" return $text } proc tggamemsg {what} { global tgchan putquick "PRIVMSG $tgchan :[tgbold]$what" } proc tgbold {} { global tgusebold if {$tgusebold==1} { return "\002" } } proc tgcolstart {} { global tgcolourstart if {$tgcolourstart!=""} { return "\003$tgcolourstart" } } proc tgcolstop {} { global tgcolourstop if {$tgcolourstop!=""} { return "\003$tgcolourstop" } } proc tgcolskip {} { global tgcolourskip if {$tgcolourskip!=""} { return "\003$tgcolourskip" } } proc tgcolerr {} { global tgcolourerr if {$tgcolourerr!=""} { return "\003$tgcolourerr" } } proc tgcolmiss {} { global tgcolourmiss if {$tgcolourmiss!=""} { return "\003$tgcolourmiss" } } proc tgcolqhead {} { global tgcolourqhead if {$tgcolourqhead!=""} { return "\003$tgcolourqhead" } } proc tgcolqbody {} { global tgcolourqbody if {$tgcolourqbody!=""} { return "\003$tgcolourqbody" } } proc tgcolhint {} { global tgcolourhint if {$tgcolourhint!=""} { return "\003$tgcolourhint" } } proc tgcolstrk {} { global tgcolourstrk if {$tgcolourstrk!=""} { return "\003$tgcolourstrk" } } proc tgcolscr1 {} { global tgcolourscr1 if {$tgcolourscr1!=""} { return "\003$tgcolourscr1" } } proc tgcolscr2 {} { global tgcolourscr2 if {$tgcolourscr2!=""} { return "\003$tgcolourscr2" } } proc tgcolscr3 {} { global tgcolourscr3 if {$tgcolourscr3!=""} { return "\003$tgcolourscr3" } } proc tgcolrset {} { global tgcolourrset if {$tgcolourrset!=""} { return "\003$tgcolourrset" } } proc tgcolstend {} { global tgcolourstend if {$tgcolourstend!=""} { return "\003$tgcolourstend" } } proc tgcolmisc1 {} { global tgcolourmisc1 if {$tgcolourmisc1!=""} { return "\003$tgcolourmisc1" } } proc tgcolmisc2 {} { global tgcolourmisc2 if {$tgcolourmisc2!=""} { return "\003$tgcolourmisc2" } } proc tgpriv {} { global tgpriv2msg if {$tgpriv2msg==1} { return "putmsg" } else { return "putnotc" } } #this generates an html file with all the people on the chan with #their score, as well as a list of all scores, sorted by rank proc tghtml {} { global tgchan botnick tghtmlfile tghtmlrefresh server tgscoresbyname tgranksbyname global tgscorestotal tgranksbyname tgrealnames tgscoresbyrank tgranksbynum tgplaying global tgquestionstotal tghtmlrefreshtimer tghtmlfont tggetscores tgreadqdb set _file [open $tghtmlfile~new w] puts $_file "<!DOCTYPE HTML PUBLIC \"-/W3C/DTD HTML 4.01 Transitional/EN\">" puts $_file "<html>" puts $_file " <head>" puts $_file " <title>$botnick's Sorucevap Kanali: $tgchan Istatistikleri.!</title>" puts $_file " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">" puts $_file " <meta http-equiv=\"refresh\" content=\"$tghtmlrefresh\">" puts $_file " <meta name=\"generator\" content=\"Turkce Trivia.tcl - oSSo Edited\">" puts $_file " <style type=\"text/css\">" puts $_file " <!--" puts $_file " body,td{font-family:$tghtmlfont;font-size:13px;}" puts $_file " a{text-decoration:none;color:#09f;}" puts $_file " -->" puts $_file " </style>" puts $_file " </head>" puts $_file " <body>" puts $_file " <b>Oyun [lindex [split $server :] 0] serverinda $tgchan kanalinda oynaniyor.!</b>" puts $_file " <hr size=\"1\" noshade>" if {![onchan $botnick $tgchan]} { puts $_file " <p>Suanda $tgchan kanalinda degilim.! Bu yuzden istatistikleri gosteremiyorum.!.</p>" } else { puts $_file " <p>Kanalda suanda oyun <b>[expr $tgplaying==1?"oynaniyor":"oynanmiyor"]</b>. Botun hafizasinda toplam olarak <b>$tgquestionstotal</b> soru bulunmakta." puts $_file " <p>Suanda $tgchan kanalinda bulunanlar:<br>" puts $_file " <table width=\"50%\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><table width=\"100%\" cellspacing=\"3\" border=\"0\">" puts $_file " <tr>" puts $_file " <td><b>Nick</b></td>" puts $_file " <td><b>Skor</b></td>" puts $_file " <td><b>Sira</b></td>" puts $_file " <td><b>Idle</b></td>" puts $_file " </tr>" foreach nick [lsort [chanlist $tgchan]] { puts $_file " <tr>" puts $_file <A href="mailto:" <td>[expr [isop $nick $tgchan]?"@":""][expr">" <td>[expr [isop $nick $tgchan]?"@":""][expr [isvoice $nick $tgchan]?"+":""]$nick[expr [string match $nick $botnick]?" (that's me!)":""]</td>" if {[info exists tgscoresbyname([strlwr $nick])]} { puts $_file " <td>$tgscoresbyname([strlwr $nick])</td>" } else { puts $_file " <td>-</td>" } if {[info exists tgranksbyname([strlwr $nick])]} { puts $_file " <td>$tgranksbyname([strlwr $nick])</td>" } else { puts $_file " <td>-</td>" } puts $_file " <td>[expr [getchanidle $nick $tgchan]>10?"[getchanidle $nick $tgchan]m":"-"]</td>" puts $_file " </tr>" } puts $_file " </table></td></tr></table>" } if {$tgscorestotal>0} { puts $_file " <p><small>There [expr $tgscorestotal==1?"is":"are"] currently <b>$tgscorestotal</b> [expr $tgscorestotal==1?"nick":"nicks"] in the score table:<br>" set _rank 1 while {$_rank<=$tgscorestotal} { puts $_file " <b>$_rank</b>. $tgrealnames($tgranksbynum($_rank)) $tgscoresbyrank($_rank)<br>" incr _rank } } else { puts $_file " <p><small>There are currently no nicks in the score table.<br>" } puts $_file " </small></p>" puts $_file " <hr size=\"1\" noshade>" puts $_file " <small>Bu sayfa [strftime %A,\ %d\ %B\ %Y\ @\ %H:%M:%S] tarihinde <a href=\"<A href="
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
Trivia.tcl</a> Tarafindan Olusturulmustur.!.<br>" puts $_file " Bu Sayfa her [expr $tghtmlrefresh==1?"second":"$tghtmlrefresh saniyede"] bir kendini yenilemektedir.1</small>" puts $_file " <br><img src="[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]"> puts $_file " </body>" puts $_file "</html>" close $_file file rename -force $tghtmlfile~new $tghtmlfile set tghtmlrefreshtimer [utimer $tghtmlrefresh tghtml] } putlog "=======================================================" putlog "* Sorubotu $tgver ($tgrel) by eScaPe " putlog "* Yapimci: by Souperman Düzenleyen : eScaPe " putlog "* SoruCevap Kanali: $tgchan" tgreadqdb putlog "* Toplam $tgquestionstotal soru $tgqdb ([file size $tgqdb] bytes) yuklendi." putlog "======================================================="

Arkadaşlar Ben bu tcl leri kullanıyorum fakat botyumda donma ve duraklama var soruları iyi göstermiyor ve sürekli bot duruyor hatta durmak değilde serverde yazıları gelmiyor !dur deyip !basla demedikten sonra düzelmiyor veya bazende killemek gerekiyor bu sorun neden olabilir arkadaşlar
Bi yardım eder misiniz Rica etsem hata benden mi kaynaklanıyor bi türlü çözemedim

 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları sohbet odaları Benimmekan Mobil Sohbet
Alt 07 Şubat 2007, 17:47   #2
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Yanıt: Oyun Botunda Soru Yansıtmama Hatası




TCL veya Conf Dosyalarınızda Hatalar oLsa Eggdrop ßotunuz Sunucunuz'a ßağLanmaz. Sizin Sorun ßotunuzun Sorularından KaynaklanabiLir ßu Donmalar durmalar FeLan Soru ßankanizi Değişip Tekrar CaListirmayı Denediniz'mi?

 
Alıntı ile Cevapla

Alt 07 Şubat 2007, 17:58   #3
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Yanıt: Oyun Botunda Soru Yansıtmama Hatası




Karde$ oLmaSSa ßuyur Sana TCL ve Soruları Vereyim SağLamdir ßunlar Kendi IRCD'ine Göre Editlersen Sorunsuz caLisacaktir.. ßuyur

Kod:   Kodu kopyalamak için üzerine çift tıklayın!
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]

Kod:   Kodu kopyalamak için üzerine çift tıklayın!
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN...]


 
Alıntı ile Cevapla

Alt 07 Şubat 2007, 20:37   #4
Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Yanıt: Oyun Botunda Soru Yansıtmama Hatası




Bi deneyeyim kardeşim ya Vallaha yordu benim soru botu sagolasın yardımın i&#231;in

 
Alıntı ile Cevapla

Cevapla

Etiketler
botunda, hatasi, hatası, oyun, soru, yansitmama, yansıtmama


Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir)
 
Seçenekler
Stil

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Açık
Refbacks are Açık


Benzer Konular
Konu Konuyu Başlatan Forum Cevaplar Son Mesaj
Bogus oyun botunda türkçe karakter sorunu (nasıl çözülür)? Keen Eggdrop, NeoStats, BNC 5 23 Mart 2012 14:36
Oyun Botunda Hata Joop Eggdrop, NeoStats, BNC 7 09 Şubat 2008 13:14
Oyun botunda 1 sorun türkçe kanallarda calismiyor? Mafya84 Eggdrop, NeoStats, BNC 1 31 Ağustos 2006 12:54
Soru botunda timer ların karışmaması ? F0X mIRC Scripting Sorunları 11 21 Temmuz 2006 22:40