עמוד ראשי מירק סקריפטינג פרסום קודים ומדריכים רשימת חברים ואויבים - Friends/Enemies

רשימת חברים ואויבים - Friends/Enemies

בפורום זה יפורסמו הקודים והמדריכים על ידי המשתמשים, לאחר בדיקת הקודים יועברו הקודים/המדריכים לפורום המתאים להם ע"י צוות האתר.

הצטרף: 13 אוגוסט 2010, 12:44
הודעות: 41
פורסם: 13 אוקטובר 2012, 13:16
שם הקוד: Friends/Enemies System
יוצר: Reality
גרסה: 1.0
תיאור: רשימת חברים ואויבים
הפעלה: כנסו למירק ולחצו במקלדת ALT + R, לחצו למעלה בצד שמאל File ואז New, תעתיקו את הסקריפט ותאשרו.
dialog FE {
  title "Friends/Enemies System By Reality"
  size -1 -1 227 115
  option dbu
  box "Friends/Enemies List", 2, 2 0 170 100
  button "Close", 3, 2 101 43 13, ok cancel
  box "Add User", 4, 175 0 50 55
  radio "Friend", 5, 180 8 38 10
  radio "Enemy", 6, 180 18 33 10
  button "Add User", 7, 180 40 41 12, disable
  box "Options", 8, 175 55 50 57
  button "Delete", 9, 180 64 37 12, disable
  button "Clear list", 10, 180 80 37 12
  button "User Options", 11, 180 96 37 12, disable
  edit "", 12, 46 102 128 12, read
  edit "", 13, 179 28 42 10, autohs
}
on *:dialog:FE:*:*:{
  if ($did($dname,13)) && ($did($dname,5).state || $did($dname,6).state) { did -e FE 7 }
  if (!$did(FE,13)) { did -b FE 7 }
  if ($devent == init) {
    dcx Mark $dname Fecallback
    xdialog -c $dname 1 listview 8 15 330 178 tabstop report fullrow showsel singlese singlesel grid
    xdid -t $dname 1 +l 0 63 Nickname $chr(9) +l 0 44 Type $chr(9) +l 0 45 Action $chr(9) +l 0 174 Address
    xdid -f $dname 1 +a ansi 8 Tahoma 
    FEReadini
  }
  if ($devent == sclick) {
    if ($did == 7) {
      set %Add.Nickname $did(13)
      .whois %Add.Nickname
    }
    if ($did == 11) { set %fe.address $xdid(FE,1,4).seltext | dialog -m $+(FE,%fe.dialog) $+(FE,%fe.dialog) | dialog -s $+(FE,%fe.dialog) 870 475 131 106 }
    if ($did == 9) {
      set %fe.name $xdid(FE,1,1).seltext
      set %fe.address $xdid(FE,1,4).seltext
      .remini -n ini\FE.ini %fe.address
      FEReadini
      did -ra FE 12 %fe.name has Been Removed From The List.
      if ($dialog(FE)) { .timer 1 2.5 did -r FE 12 }
      did -b FE 9
      did -b FE 11
      unset %fe.dialog
      unset %fe.address
      unset %fe.name
    }
    if ($did == 10) {
      var %x $?!"Are You Sure You Want to Remove Your Friends/Enemies List?"
      if (%x) { write -c ini\FE.ini | did -ra FE 12 Your Friends/Enemies List has been Removed. | .timer 1 2.5 did -r FE 12 | .timer 1 0.5 FEReadini }
    }
  }
}
alias Fecallback {
  if ($2 == sclick) {
    if ($3 == 1) {
      if (!$4) { did -b FE 11 | did -b FE 9 }
      else {
        did -e FE 11
        did -e FE 9
        set %fe.dialog $replace($xdid(FE,1,$4,2).text,friend,1,enemy,2)
      }
    }
  }
}
dialog FE1 {
  title "Options"
  size -1 -1 66 53
  option dbu
  box "Friend Options", 1, 2 1 62 50
  radio "OP Friend (@)", 2, 6 12 50 10
  radio "Voice Friend (+)", 3, 6 24 50 10
  button "Save Options", 4, 6 36 54 12, disable
}
on *:dialog:FE1:*:*:{
  if ($did($dname,2).state || $did($dname,3).state) { did -e FE1 4 }
  if ($devent == sclick) {
    if ($did == 4) {
      if ($did(FE1,2).state) {
        .writeini -n ini\FE.ini %FE.Address Action OP
        .dialog -x FE1 FE1
        FEReadini
        did -ra FE 12 User Options Has Been Saved.
        .timer 1 2.5 did -r FE 12
        .unset %fe.*
      }
      elseif ($did(FE1,3).state) {
        .writeini -n ini\FE.ini %fe.address Action Voice
        .dialog -x FE1 FE1
        FEReadini
        did -ra FE 12 User Options Has Been Saved.
        .timer 1 2.5 did -r FE 12
        .unset %fe.*
      }
    }
  }
}
dialog FE2 {
  title "Options"
  size -1 -1 66 53
  option dbu
  box "Enemy Options", 1, 2 1 62 50
  radio "Kick Enemy ", 2, 6 12 50 10
  radio "Ban Enemy (+b)", 3, 6 24 50 10
  button "Save Options", 4, 6 36 54 12, disable
}
on *:dialog:FE2:*:*:{
  if ($did($dname,2).state || $did($dname,3).state) { did -e FE2 4 }
  if ($devent == sclick) {
    if ($did == 4) {
      if ($did(FE2,2).state) {
        .writeini -n ini\FE.ini %FE.Address Action Kick
        .dialog -x FE2 FE2
        FEReadini
        did -ra FE 12 User Options Has Been Saved.
        .timer 1 2.5 did -r FE 12
      }
      elseif ($did(FE2,3).state) {
        .writeini -n ini\FE.ini %fe.address Action Ban
        .dialog -x FE2 FE2
        FEReadini
        did -ra FE 12 User Options Has Been Saved.
        .timer 1 2.5 did -r FE 12
      }
    }
  }
}
raw 311:*:{
  if (%Add.Nickname) {
    set %Add.Address *!*@ $+ $4
    if ($did(FE,5).state) { set %Add.Type Friend | set %Add.Type2 Friends }
    if ($did(FE,6).state) { set %Add.Type Enemy | set %Add.Type2 Enemies }
    if (!$readini(ini\FE.ini,%Add.Address,Address)) {
      .writeini -n ini\FE.ini %Add.Address Nickname %Add.Nickname
      .writeini -n ini\FE.ini %Add.Address Type %Add.Type
      .writeini -n ini\FE.ini %Add.Address Action N/A
      .writeini -n ini\FE.ini %Add.Address Address %Add.Address
      did -ra FE 12 %Add.Nickname Has Been Added to Your %Add.Type2 List.
      did -u FE 5
      did -u FE 6
      did -r FE 13
      FEReadini
      unset %Add.*
      .timer 1 2.5 did -r FE 12
    }
    else { did -ra FE 12 %Add.Nickname is Already in Your Friends/Enemies List. | unset %Add.* | .timer 1 2.5 did -r FE 12 }
  }
}
on !*:join:#:{
  if (N/A == $readini(ini\FE.ini,$address($nick,2),Action)) && ($readini(ini\FE.ini,$address($nick,2),Type == Friend)) { .msg $chan 1» 14[07Friend14]1: 07H14ello07 $nick 14 $+ $+([07,$replace($address,@,14@07),14]) 07Y14ou 07A14re 07I14n 07M14y 07F14riends 07L14ist | echo -t # $darga 1» 14[07Friend14]1: 07H14ello07 $nick 14 $+ $+([07,$replace($address,@,14@07),14]) 07Y14ou 07A14re 07I14n 07M14y 07F14riends 07L14ist }
  if (N/A == $readini(ini\FE.ini,$address($nick,2),Action)) && ($readini(ini\FE.ini,$address($nick,2),Type == Enemy)) { .msg $chan 14[07Enemy14]1: $nick 14 $+ $+([07,$replace($address,@,14@07),14]) 07Y14ou 07A14re 07I14n 07M14y 07E14nemies 07L14ist | echo -t # $darga 14[07Enemy14]1: $nick 14 $+ $+([07,$replace($address,@,14@07),14]) 07Y14ou 07A14re 07I14n 07M14y 07E14nemies 07L14ist }
  if ($me isop $chan) {
    if (OP == $readini(ini\FE.ini,$address($nick,2),Action)) { .msg $chan 1» 14[07Friend14]1: 07H14ello07 $nick 14 $+ $+([07,$replace($address,@,14@07),14]) 07Y14ou 07A14re 07I14n 07M14y 07F14riends 07L14ist | echo -t # $darga 1» 14[07Friend14]1: 07H14ello07 $nick 14 $+ $+([07,$replace($address,@,14@07),14]) 07Y14ou 07A14re 07I14n 07M14y 07F14riends 07L14ist | mode # +o $nick }
    if (Voice == $readini(ini\FE.ini,$address($nick,2),Action)) { .msg $chan 1» 14[07Friend14]1: 07H14ello07 $nick 14 $+ $+([07,$replace($address,@,14@07),14]) 07Y14ou 07A14re 07I14n 07M14y 07F14riends 07L14ist | echo -t # $darga 1» 14[07Friend14]1: 07H14ello07 $nick 14 $+ $+([07,$replace($address,@,14@07),14]) 07Y14ou 07A14re 07I14n 07M14y 07F14riends 07L14ist | mode # +v $nick }
    if (Ban == $readini(ini\FE.ini,$address($nick,2),Action)) { ban -k # $nick 2 14[07Enemy14]1: 07Y14ou 07A14re 07I14n 07M14y 07E14nemies 07L14ist 07-14 BANNED 07- $+ 1 }
    if (Kick == $readini(ini\FE.ini,$address($nick,2),Action)) { kick # $nick 14[07Enemy14]1: 07Y14ou 07A14re 07I14n 07M14y 07E14nemies 07L14ist 07-14 KICKED 07- $+ 1 }
  }
}
alias FEReadini {
  xdid -r FE 1
  var %x 1
  while ($ini(ini\FE.ini,%x)) {
    var %Nick $readini(ini\fe.ini,$v1,nickname)
    var %Type $readini(ini\fe.ini,$v1,type)
    var %Action $readini(ini\fe.ini,$v1,Action)
    var %Address $readini(ini\fe.ini,$v1,Address)
    xdid -a FE 1 1 0 + 1 0 0 0 $rgb(170,213,255) $rgb(0,255,255) %Nick $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) %Type $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) %Action $chr(9) + 0 -1 $rgb(10,210,250) $rgb(255,0,255) %Address
    inc %x
  }
}

יש למצוא גם: pastebin.php?mode=view&s=39
Main Editor
Server: irc.quakanet.org - Channel: #mIRCs
Automatically connect: irc://irc.quakenet.org/mIRCs

חזור אל פרסום קודים ומדריכים