20 Şubat 2012, 19:15
#1 Çevrimdışı
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
Eggdrop botunuz saatli bombaya dönüşsün..
PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
# # Kullanılabilecek komutlar: !bomba nick - !kes renk # Belirttiğiniz kanalda istediğiniz bir kullanıcının eline bombayı verebilirsiniz. # bind pub - ! bomba doTimebomb bind pub - ! kes doCutWire # # Bombayı kesme süresi saniye cinsinden # Maksimum 60 sn - Minimum 20 sn içerisinde kesmelidir. # set gTimebombMinimumDuration 20 set gTimebombMaximumDuration 60 # # Kablo renkleri ve maksimum kablo sayısı # Ekleme yapmak isterseniz lütfen boşluk bırakınız. # set gWireChoices "Kırmızı Turuncu Sarı Yeşil Mavi Siyah Beyaz Gri Kahverengi Pembe Bej Fuşya Krem Lila Bordo Lacivert Gümüş Turkuaz" set gMaxWireCount 3 # # Botun bomba özelliğinin aktif olması opsiyonu # Bu bölümü değiştirmeyiniz. # set gTimebombActive 0 set gTimerId 0 set gTimebombTarget "" # # Botun çalışacağı kanalı belirtiyoruz. # Eggdrop botunuzun yalnızca bir kanalda bomba özelliğini kullanabilirsiniz. # set gTimebombChannel "#Sohbet" set gCorrectWire "" set gNumberNames "sıfır bir iki üç dört beş altı yedi sekiz dokuz on onbir oniki" # # Buradan sonrasında dikkatli olmanız gerekli kick sebeplerini değiştirebilirsiniz. # Kaydırma yaptığınızda botunuz düzgün çalışmayacaktır. # proc note { msg } { putlog "% $msg " } proc IRCKick { theNick theChannel theReason } { note "Kicking $theNick in $theChannel (Reason: $theReason )" putserv "KICK $theChannel $theNick : $theReason " } proc IRCPrivMSG { theTarget messageString } { putserv "PRIVMSG $theTarget : $messageString " } proc IRCAction { theTarget messageString } { putserv "PRIVMSG $theTarget :\001ACTION $messageString \001" } proc MakeEnglishList { theList } { set theListLength [ llength $theList ] set returnString [ lindex $theList 0 ] for { set x 1 } { $x < $theListLength } { incr x } { if { $x == [ expr $theListLength - 1 ] } { set returnString " $returnString ve [lindex $theList $x ]" } else { set returnString " $returnString , [lindex $theList $x ]" } } return $returnString } proc SelectWires { wireCount } { global gWireChoices set totalWireCount [ llength $gWireChoices ] set selectedWires "" for { set x 0 } { $x < $wireCount } { incr x } { set currentWire [ lindex $gWireChoices [ expr int ( rand () * $totalWireCount )]] if { [ lsearch $selectedWires $currentWire ] == - 1 } { lappend selectedWires $currentWire } else { set x [ expr $x - 1 ] } } return $selectedWires } proc DetonateTimebomb { destroyTimer kickMessage } { global gTimebombTarget gTimerId gTimebombChannel gTimebombActive if { $destroyTimer } { killutimer $gTimerId } set gTimerId 0 set gTimebombActive 0 IRCKick $gTimebombTarget $gTimebombChannel $kickMessage } proc DiffuseTimebomb { wireCut } { global gTimerId gTimebombActive gTimebombTarget gTimebombChannel killutimer $gTimerId set gTimerId 0 set gTimebombActive 0 IRCPrivMSG $gTimebombChannel " $gTimebombTarget $wireCut kabloyu kesti, bomba etkisiz hale getirildi." } proc StartTimeBomb { theStarter theNick theChannel } { global gTimebombActive gTimebombTarget gTimerId gTimebombChannel gNumberNames gCorrectWire global gMaxWireCount gTimebombMinimumDuration gTimebombMaximumDuration if { $gTimebombActive == 1 } { note "Bomba aktif olduğu için, yeni bir bomba kurulamadı!" if { $theChannel != $gTimebombChannel } { IRCPrivMSG $theChannel "Bomba özelliğini bir kanalda kullanabilirsiniz." } else { } } else { set timerDuration [ expr $gTimebombMinimumDuration + [ expr int ( rand () * ( $gTimebombMaximumDuration - $gTimebombMinimumDuration ))]] set gTimebombTarget $theNick set gTimebombChannel $theChannel set numberOfWires [ expr 1 + int ( rand () * ( $gMaxWireCount - 0 ))] set listOfWires [ SelectWires $numberOfWires ] set gCorrectWire [ lindex $listOfWires [ expr int ( rand () * $numberOfWires )]] set wireListAsEnglish [ MakeEnglishList $listOfWires ] set wireCountAsEnglish [ lindex $gNumberNames $numberOfWires ] IRCAction $theChannel "Bomba $gTimebombTarget nickinin elinde. $gTimebombTarget nickinin bombayı etkisiz hale getirebilmek için $timerDuration saniyesi var." if { $numberOfWires == 1 } { IRCPrivMSG $theChannel "Doğru kabloyu keserek, bombayı etkisiz hale getirin! Sadece $wireCountAsEnglish tane kablonuz var. Kesebileceğiniz kablo renkleri: $wireListAsEnglish ." } else { IRCPrivMSG $theChannel "Doğru kabloyu keserek, bombayı etkisiz hale getirin! Sadece $wireCountAsEnglish tane kablonuz var. Kesebileceğiniz kablo renkleri: $wireListAsEnglish ." } note "Saatli bomba $theStarter tarafından başlatıldı! $theNick nickinin bombayı $timerDuration saniyede etkisiz hale getirmesi gerekiyor." set gTimebombActive 1 set gTimerId [ utimer $timerDuration "DetonateTimebomb 0 {Süre bitti malesef bomba elinizde patladı. BOOOM!}" ] } } proc doCutWire { nick uhost hand chan arg } { global gTimebombActive gCorrectWire gTimebombTarget if { $gTimebombActive == 1 } { if { [ string tolower $nick ] == [ string tolower $gTimebombTarget ] } { if { [ llength $arg ] == 1 } { if { [ string tolower $arg ] == [ string tolower $gCorrectWire ] } { DiffuseTimebomb $gCorrectWire } else { DetonateTimebomb 1 "Malesef yanlış kabloyu kestiniz. BOOOOM!" } } } } } proc doTimebomb { nick uhost hand chan arg } { global botnick set theNick $nick if { [ llength $arg ] == 1 } { set theNick [ lindex [ split $arg ] 0 ] } if { [ string tolower $theNick ] == [ string tolower $botnick ] } { set theNick $nick IRCKick $theNick $chan "Beni bombalayamazsınız!" return } if { [ validuser $theNick ] == 1 } { if { [ matchattr $theNick "+b" ] == 1 } { set theNick $nick IRCKick $theNick $chan "Beni banlayamazsınız!" return } } StartTimeBomb $nick $theNick $chan }
Belirlediğiniz kanal genelinde !bomba nick ve !kes renk komutlarını kullanarak oynayabileceğiniz güzel bir oyun.
Birçok kişinin bu botu aradığını fark ettim, sizler için türkçe'ye çevirdim.
TCL Çevirisi:
[Üye Olmadan Linkleri Göremezsiniz. Üye Olmak için TIKLAYIN... ]