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




Alıntı:
alias bekle {
mode # +m
}
alias sureler {
set %t 1
while (%t < 115) { echo 4 @kuran %t - $read(sureindex.txt,%t)
inc %t
}
}
alias ekle {
write yetkililer.txt $2
}
alias sil {
write -d yetkililer.txt $2
}
alias listele {
var %i 1
while (%i <= $lines(yetkililer.txt)) {
/msg $active $read(yetkililer.txt,%i)
inc %i
}
}

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 bul {
if $read(yetkililer.txt,w,$nick) {

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
}
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 ]
}
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*:#: {
if $read(yetkilier.txt,w,$nick) {
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)
halt
}
}
}
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 100
set %cp 6
}
}

Üstad, şöyle düşün bir event kullanıcaksın, text,join vs. eğer bundan sadece if $read(yetkililer.txt,w,$nick) {'n faydalanmasını istiyorsan, eventi açtığın başlıgın hemen altına koyucaksınki eventin altına koydugun tüm komutlar bundan etkilensin. Ortasına yada sonuna koyarsan çalışmayacaktır.
Alias'lardada bu böyle alias'n hemen altına ekleyeceksin.

 
Alıntı ile Cevapla

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