Hoşgeldin Misafir

ileti yazıyor - iletildi - okundu vs.

Enyalios

21 Eki 2020
873 Mesaj

Aktiflik

Seviye

Deneyim

TIM / GÖREV:
-paslarımızı dökelim birazcık..--
-eksik gedik bişiler görürseniz öneriniz de varsa başlık altına yazın..--
-iyi eglenceler.--


Kod:
;*** Olaylar
on *:START: read_t
on *:CLOSE:?: { $iif($hget(read_t,$target),$read_t($target).cls) }
on *:OPEN:?: $read_t($nick).ilt
on *:ACTIVE:*: { if $window($active).type == Query { $read_t($active).akt  } }
;on *:APPACTIVE: { if $appactive && $window($active).type == Query { read_t  APP $window($active)  } }
on ^*:TEXT:*:?: {
  if $window($active) == $nick || $mouse.win == $nick { $read_t($nick).win }
  if $window($active) != $nick && $query($nick) { $read_t($nick).ilt }
  hadd -m read_t $nick $md5($1-) 
}

;**** durum motoru
alias  read_t {
  if $prop == ilt { .timer_i 1 1 .ctcp $1 \\ccrc ilt  }
  if $prop == cls { .timer_o 1 1 .ctcp $1 \\ccrc ret  }
  if $prop == akt && $hget(read_t,$1) || $prop == win {  .timer_a 1 1 .ctcp $1 \\ccrc ok | hdel read_t $1 }
  if !$isid  { 
    .timer_typ_w 0 3 read_t 
    if $window($active).type == Query && $editbox($active,0)  && $md5($editbox($active,0)) != $hget(read_typ,$active)  {
      hadd -mu10 read_typ $active $md5($editbox($active,0))
      .ctcp $window($active) \\ccrc  typ
    }
  }
}

;**** eylem yorumlama

CTCP *:\\ccrc*:?: {
  haltdef
  if $2 == ilt { titlebar $nick iletildi.. }
  if $2 == ret { titlebar $nick reddedildi.! }
  if $2 == ok { titlebar $nick okundu }
  if $2 == typ { _typ $nick ileti yazıyor }
}

;**** ileti yaziyor animasyonu
alias _typ {  
  inc %:o 
  if %:o < 5 { titlebar $1 $+($active Ileti yaziyor,$left(....,%:o),$gettok(|./.\,$r(1,3),46)) | .timer_anim -m 1 300 _typ  } 
  if %:o > 4 { unset %:o | titlebar $1 }
}