Konu: bot edit
Tekil Mesaj gösterimi
Alt 12 Şubat 2009, 03:54   #4
Çevrimdışı
QkLa
Kullanıcıların profil bilgileri misafirlere kapatılmıştır.
IF Ticaret Sayısı: (0)
IF Ticaret Yüzdesi:(%)
Cevap: bot edit




ben codeyi vereyim daha iyi anlasilir belki.bu code iki sekilde uygulanabiliyor.birincisi mircinda yuklu sahis !bul sureismi yazarak @kuran penceresinde goruyor yazilari.bunun kaldirmak istiyorum.dialog var diloguda kaldirmak istiyorum.ikinci bir uygulamada bot seklinde,kanalda !bul yazdiklarinda kullanabilecekleri komutlar siralaniyor,ona gore kanalda islem yapiliyor.bu komutu sadece gorevliler kullanabilecek sekilde duzenlemek istiyorum.birde code de belirli bir kullanimdan sonra sahsa baska kullanma imkani vermiyor.mesela bir kisi kanalda uc kez komut uygulayabiliyor.bu kaldirip gorevlilerin surekli kullanabilecegi bir hale getirebilirsek hos olur.biraz kapsamli bir code ama kusura bakmayin.

simdiden tesekkur ederim

Kod:   Kodu kopyalamak için üzerine çift tıklayın!
alias bekle { mode # +m } alias bul { set %sureno $null window -e @KURAN 500 275 350 200 if (($1 == $null) || ($2 == $null)) { ;echo 4 @kuran Hatali Giris Yaptiniz. echo 4 @kuran Bul komutu formati: echo 12 @kuran /bul sureadi yada numarasi ayet [bitis ayeti] echo 12 @kuran Ör1:/bul taha 114 --> Taha 114. ayeti gösterir. echo 12 @kuran Ör2:/bul taha 1 9 --> Taha [1-9]. ayetleri gösterir. echo 13 @kuran Ör3:/bul 20 1 9 --> Taha [1-9].ayetleri gösterir. halt } else { set %sure $1 set %ayet1 $2 } if ($3 == $null) { set %ayet2 %ayet1 } else { set %ayet2 $3 } if ($calc(%sure + 0) != 0) { set %sureno $1 set %sure $read(sureindex.txt,%sureno) goto dosyabul } set %sayac 1 set %topsat $lines(sureindex.txt) while (%sayac <= %topsat) { if (%sure == $read(sureindex.txt, %sayac)) { echo 4 @kuran Sure No: %sayac set %sureno %sayac } inc %sayac } :dosyabul if (%sureno == $null) { echo 4 @kuran %sure bulunamadi.Sure ismini farkli bir isimle ya da sure numarasi kullanarak belirtiniz.Tüm surelerin listesi için /sureler yaziniz... halt } set %sayiayet $read(ayetsayisi.txt,%sureno) if (%ayet2 > %sayiayet) { echo 4 @kuran Hatali Giris Yaptiniz echo 12 @kuran %sure Suresi %sayiayet ayettir... halt } if ((%ayet1 < 1) || (%sureno > 114) || (%ayet1 > %ayet2)) { echo 4 @kuran Hatali Giris Yaptiniz... halt } set %d1 3 - $len(%sureno) set %dosya sureler $+ \ $+ $str(0,%d1) $+ %sureno $+ .txt echo @kuran %dosya set %k 1 set %renk 12 while (%ayet1 <= %ayet2) { if ((%sureno == 2) && (%ayet1 == 282)) { set %bkr 1 while (%bkr <= $lines(sureler\bakara282.txt)) { echo @kuran $read(sureler\bakara282.txt,%bkr) inc %bkr } goto art } set %sonuc $read(%dosya,w,%ayet1 $+ . $+ *) if (%k != 1 ) goto gec echo 4 @kuran Sure: $upper(%sure) -- Toplam Ayet Sayisi: %sayiayet echo 4 @kuran Ayet: %ayet1 - %ayet2 ECHO 3 @kuran ------------------- :gec echo %renk @kuran %sonuc ;echo @kuran - if (%renk == 12) { set %renk 4 } else { set %renk 12 } :art inc %k inc %ayet1 } echo 12 @kuran ------------------------------------------0000----------------------------------- } alias sureler { set %t 1 while (%t < 115) { echo 4 @kuran %t - $read(sureindex.txt,%t) inc %t } } menu channel,menubar { - Bot .Açik :set %botdurum acik | echo -a bot açik | notice # Meal BOTu Kullanima Hazir | defs .Kapali:set %botdurum kapali | echo -a Bot Kapali | notice # Meal BOTu Kapatildi .Ayarlar:dialog -m BA BA } alias bulr { set %sureno $null set %curserver $server set %curchannel $chan if (($1 == $null) || ($2 == $null)) { msg # Bul komutu formati: msg # !bul sureadi yada numarasi ayet [bitis ayeti] msg # Ör1:!bul taha 114 --> Taha 114. ayeti gösterir. msg # Ör2:!bul taha 1 9 --> Taha [1-9]. ayetleri gösterir. msg # Ör3:!bul 20 1 9 --> Taha [1-9].ayetleri gösterir. halt } else { set %sure $1 set %ayet1 $2 } if ($3 == $null) { set %ayet2 %ayet1 } else { set %ayet2 $3 } if ($calc(%sure + 1) != 0) { set %sureno $1 set %sure $read(sureindex.txt,%sureno) goto dosyabul } set %sayac 1 set %topsat $lines(sureindex.txt) while (%sayac <= %topsat) { if (%sure == $read(sureindex.txt, %sayac)) { write temp.txt Sure No: %sayac set %sureno %sayac } inc %sayac } :dosyabul if (%sureno == $null) { msg # %sure bulunamadi.Sure ismini farkli bir isimle ya da sure numarasi kullanarak belirtiniz.Tüm surelerin listesi için /sureler yaziniz... halt } set %sayiayet $read(ayetsayisi.txt,%sureno) if (%ayet2 > %sayiayet) { msg # Hatali Giris Yaptiniz msg # %sure Suresi %sayiayet ayettir... halt } if ((%ayet1 < 1) || (%sureno > 114) || (%ayet1 > %ayet2)) { msg # Hatali Giris Yaptiniz... halt } if ($calc(%ayet2 - %ayet1 +1) > %mva) { msg # $nick Simdiki ayarlara göre bir seferde en fazla %mva ayet isteyebilirsniz... halt } set %d1 3 - $len(%sureno) set %dosya sureler $+ \ $+ $str(0,%d1) $+ %sureno $+ .txt set %k 1 while (%ayet1 <= %ayet2) { if ((%sureno == 2) && (%ayet1 == 282)) { set %bkr 1 while (%bkr <= $lines(sureler\bakara282.txt)) { set %sonuc $read(sureler\bakara282.txt,%bkr) wordcheck inc %bkr } goto art } set %sonuc $read(%dosya,w,%ayet1 $+ . $+ *) if (%k != 1 ) goto gec write temp.txt $upper(%sure) -- Toplam Ayet Sayisi: %sayiayet write temp.txt Ayet: %ayet1 - %ayet2 $nick için yaziliyor... :gec wordcheck :art inc %k inc %ayet1 } write temp.txt -------------------------------0000------------------------ 12 [ %cp sn. durakladi ] -------------------------------0000----------------------------------- } alias sureler { set %t 1 while (%t < 115) { msg # %t - $read(sureindex.txt,%t) inc %t } } on *:playend:if (%moderate == 1) { /mode %curchannel -m } on *:exit:unsetall on *:disconnect:server %curserver on *:CONNECT:/join # $+ %curchannel on *:text:!bul*:#: { while (%botdurum == acik) { if ( %kul == ontanimli ) { set %usersay 1 while (%usersay <= $lines(botusers.txt)) { if ( $nick == $read(botusers.txt,%usersay)) { set %kim 1 } inc %usersay } } if ((%kim == $null) && (%kul == ontanimli)) { halt } else { set %kim $null } write -c temp.txt bulr $2 $3 $4 if (%moderate == 1) { bekle } play $chan temp.txt $calc(%ds * 1000) set %zaman $calc(%ds * 1000 * $lines(temp.txt) + %cp * 1000) set %zamandur $calc(%zaman / 1000) ignore -u $+ %zamandur *!*@* halt } } dialog BA { title "BOT AYARLARI" size -1 -1 380 280 ;combo 1,128 176 89 100,size edit drop button "Duzenle",102,124 176 48 30 radio " ÖnTanimli",2,24 176 97 25 radio "Herkes",3,24 143 65 25 edit "",4,304 80 25 19,autohs edit "",5,304 48 25 19,autohs edit "",6,112 80 25 19,autohs edit "",7,112 48 25 19,autohs box "Kullanici Tanimlari",8,16 128 160 81 text "sn.",10,336 80 17 17 text "Duraklama Süresi",11,192 80 89 17 text " kelime",12,328 48 33 25 text "Max. Veri Gönderme",13,192 48 97 25 box " Veri ",14,178 32 193 73 text "ayet",15,144 80 25 17 text "Max. Ayet Araligi",16,24 80 86 17 text "sn",17,144 48 25 17 text "Cevap Periyodu ",18,24 48 81 25 box " Bot ",19,16 32 161 73 button "Tamam",100,126 225 50 30,ok button "Vazgeç",101,180 225 50 30,cancel box " Diger Ayarlar",20,179 128 193 82 check "Moderate",30,190 150 65 11, } on *:dialog:ba:edit:*:{ if ($did == 4) { set %ds $did(4).text } if ($did == 5) { set %mvg $did(5).text } if ($did == 6) { set %mva $did(6).text } if ($did == 7) { set %cp $did(7).text } } on *:DIALOG:ba:init:0:{ if ((!%ds) || (!%mvg) || (!%mva) || (!%cp)) { did -ra ba 4 1 set %ds 3 did -ra ba 5 1 set %mvg 10 did -ra ba 6 1 set %mva 3 did -ra ba 7 1 set %cp 6 } if (%kul == $null) { did -c ba 3 set %kul herkes } if (%kul == herkes) { did -c ba 3 } else { did -c ba 2 set %kul ontanimli } did -o ba 4 1 %ds did -o ba 5 1 %mvg did -o ba 6 1 %mva did -o ba 7 1 %cp ;did -ra ba 4 test if ( %moderate == 1 ) { did -c ba 30 } } on *:dialog:ba:sclick:100: { set %cp $did(ba,7).text set %mva $did(ba,6).text set %mvg $did(ba,5).text set %ds $did(ba,4).text if ($did(ba,3).state == 1) { set %kul herkes } if ($did(ba,2).state == 1) { set %kul ontanimli } if ($did(ba,30).state == 1) { did -c ba 30 | set %moderate 1 } if ($did(ba,30).state == 0) { set %moderate 0 } } on *:dialog:ba:sclick:102: { run botusers.txt } alias wordcheck { set %twords $calc($numtok(%sonuc,32) + 1) if (%twords > %mvg) { set %blok $calc(%twords / %mvg) set %tamblok $calc($int(%blok) + 1) set %dng 1 set %baslangic 1 set %bitis %mvg while (%dng <= %tamblok) { set %aralik %baslangic $+ - $+ %bitis set %dizgi $gettok(%sonuc,%aralik,32) write temp.txt %dizgi set %baslangic $calc(%bitis + 1) set %bitis $calc(%bitis + %mvg ) inc %dng } } else { write temp.txt %sonuc } return } alias defs { if ((!%ds) || (!%mvg) || (!%mva) || (!%cp)) { set %ds 3 set %mvg 10 set %mva 3 set %cp 6 } } alias ara { window -e @ARAMA 500 275 350 200 clear @arama set %l 1 SET %phrase * $chr(32) $+ $1- $+ * ;set %md $mid(%phrase,2,1) ;$replace (%phrase ,%md , $upper( %md )) ;SET %phrase * $+ $1- echo @ARAMA 4,8 ARANAN KELIME: 1,8 %PHRASE echo @arama 8,7 Dikkat:Bulunan Sonuçlar Kelime Düzeyinde Kesin Sonuçlar Olmayabilir.Bu çalisma sadece fikir vermesi bakimindan hazirlanmistir... while (%l < 115) { set %d1 3 - $len(%l) set %dosya sureler $+ \ $+ $str(0,%d1) $+ %l $+ .txt ;echo -a %dosya ;filter -pfw %dosya @ARAMA %phrase filter -fwbp %dosya @arama %phrase if ($filtered != 0) { echo @arama 4 $read(sureindex.txt,%l) ( %l ) echo 4 @arama --------------------------------------------------------------------------------------- set %adet $calc(%adet + $filtered) } ;if ($filtered =! 0) echo @arama %dosya inc %l } echo @arama 1,8 %phrase ibaresi %adet adet sayildi.(Bu sonuç kelime düzeyinde kesin sonuç olmayabilir) set %adet 0 }


 
Alıntı ile Cevapla

IRCForumlari.NET Reklamlar
sohbet odaları reklam ver Benimmekan Mobil Sohbet