![]() |
| mIRC Scripting Hazır Kodlar mIRC Scriptinglerinizde kullanabileceğiniz hazır kodlara bu başlık altından ulaşabilirsiniz. |
| | Seçenekler | Stil |
| |
| | #1 |
Kodon $*:TEXT:/[\.!]global\s/iS:#testmsl: {
if ($regex($2, /^(add|del|list)$/i)) && ($nick isop #) {
var %action = $regml(1)
if (%action == add) {
var %message = $3-
if (%message != $null) {
if (!$exists(globalmesaj.txt)) { write globalmesaj.txt }
write globalmesaj.txt %message
msg $chan 2 Duyuru eklendi: %message
}
else {
msg $chan 4 Kullanım: !global add [mesaj]
}
}
elseif (%action == del) {
var %line = $3
if ($lines(globalmesaj.txt) >= %line) {
write -dl $+ %line globalmesaj.txt
msg $chan 10 Duyuru 4 %line 10 silindi.
}
else {
msg $chan 10 Geçerli bir satır numarası girin. (1 - $lines(globalmesaj.txt))
}
}
elseif (%action == list) {
if ($lines(globalmesaj.txt) > 0) {
msg $chan 4 --- Duyuru Listesi ---
var %i = 1
while (%i <= $lines(globalmesaj.txt)) {
msg $chan 4 $+([,%i,]) $read(globalmesaj.txt, %i)
inc %i
}
}
else {
msg $chan 10 Duyuru listesi boş.
}
}
}
else {
msg $chan 4 Kullanım: 10 !global [add/del/list][mesaj/satır numarası]
}
}
on *:START: {
.timerGlobal 0 60 GlobalMessage
}
alias -l GlobalMessage {
if ($lines(globalmesaj.txt) > 0) {
; Rastgele bir mesaj seç, bir önceki mesajı tekrar etme
var %randomLine = $rand(1, $lines(globalmesaj.txt))
while (%randomLine == %lastGlobalMessage) {
%randomLine = $rand(1, $lines(globalmesaj.txt))
}
var %message = $read(globalmesaj.txt, %randomLine)
if (%message != $null) {
msg #testmsl %message
set %lastGlobalMessage %randomLine
}
}
}
Kullanım; .global add mesaj => Duyuru listesine mesaj ekler .global del numara => Belirtilen numaraya ait duyuruyu siler. .global list => Eklenen duyuruları listelemenizi sağlar.
________________ Stay strong, trust your instincts. Set your spirit free, never forget your spiritual side. Even in the midst of hardships, there is always a light to guide your way. | |
| |
| | #2 |
| Emeğinize sağlık 👍 1
________________ 𝖎𝖘𝖙𝖊𝖉𝖎ğ𝖎𝖒 𝖖𝖎𝖇𝖎 𝖔𝖑𝖒𝖆𝖟𝖘𝖆 𝖎𝖘𝖙𝖊𝖒𝖊𝖒! ![]() | |
| |
| | #3 |
| Emeğine sağlık 👍 1 | |
| |
| Konuyu Toplam 1 Üye okuyor. (0 Kayıtlı üye ve 1 Misafir) | |
| |