עמוד ראשי מירק סקריפטינג פרסום קודים ומדריכים Counter Strike 1.6 Rcon Tracker

Counter Strike 1.6 Rcon Tracker

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

הצטרף: 12 אוגוסט 2011, 17:01
הודעות: 23
פורסם: 16 פברואר 2018, 10:46
שם הקוד: Counter Strike 1.6 Rcon Tracker
יוצר: interSys
גירסא: 1.0
תיאור: מעקב אחרי השרת והמשתמשים שנכנסים לשרת
שימוש: אחרי שהגדרתם את האייפי והרקון של השרת תשתמשו בפקודה
/Startrcon


תמונה


PasteBin: https://pastebin.com/iPvt3SpB
קוד:

;;;Counter Strike 1.6 Server Rcon Tracker;;;
;;;By interSys;;;

;;;;Dialog;;;;

alias RTrack $iif(!$dialog(RTrack),dialog -m RTrack RTrack,echo -a 04Error! 14The dialog already open ...)
dialog RTrack {
  title "Rcon Tracker"
  size -1 -1 253 330
  option dbu
  text "Rcon Tracker By interSys", 1, 87 3 80 8, disable center
  text "SteamID:", 2, 10 22 26 8, center
  edit "", 3, 38 21 75 10
  button "Search", 4, 114 21 50 10
  text "Previous Nicknames", 5, 16 62 55 8, center
  list 6, 8 73 76 72, size vsbar
  edit "SteamID Status", 7, 10 43 156 10, disable read center
  text "Previous ips", 8, 102 62 44 8, center
  list 9, 86 73 76 72, size vsbar
  button "Remove all the tracks", 10, 8 148 236 10
  text "Date And Time", 12, 180 62 39 8, center
  list 13, 165 73 76 72, size vsbar
  box "", 14, 4 14 166 42
  box "", 15, 4 55 245 109
  box "Blacklist Panel Control", 16, 4 167 245 119
  list 17, 8 195 188 70, size
  text "SteamID:", 11, 9 180 26 8, center
  edit "", 18, 38 178 75 10
  button "Search", 19, 118 178 39 10
  button "Add Blacklist", 20, 198 196 46 12
  button "Remove Blacklist", 21, 198 215 47 12
  button "Clear Blacklist", 23, 198 234 47 12
  button "Show all Blacklist", 24, 9 269 76 12
  button "Clear Blacklist Window", 25, 88 269 76 12
  button "Clear windows", 26, 88 33 76 9
  button "Open tracks file", 27, 10 33 76 9
  box "Search steamid by nick/ip", 28, 171 14 78 42
  edit "", 29, 174 23 73 10
  button "Search", 30, 174 34 73 9
  edit "status win", 31, 174 44 73 10, read autohs center
  box "Rcon Command", 32, 4 286 245 40
  text "Send rcon command to the server:", 33, 8 299 84 8
  edit "", 34, 95 298 150 10
  button "Send ", 35, 10 312 234 10
  button "Open blacklist file", 22, 198 252 47 12
}

on *:dialog:RTrack:*:*:{
  if ($devent == init) {
    showblist
  }
  if ($devent == sclick) {
    if ($did = 4) {
      did -r $dname 6,9,13,7
      if ($ini(Tracks.ini,$did($dname,3).text) == 0) { did -a $dname 6,7,9,13 The SteamID not found! }
      else {
        did -a $dname 7 Last connection from the user was in $readini(Tracks.ini,$did($dname,3).text,$+(Date,$var($+(%,$did($dname,3).text),1).value))) $&
          - $readini(Tracks.ini,$did($dname,3).text,$+(time,$var($+(%,$did($dname,3).text),1).value)))
        var %x = 1
        while (%x <= $var($+(%,$did($dname,3).text),1).value) {
          did -a $dname 6 $+(Nick,%x,:) $readini(Tracks.ini,$did($dname,3).text,$+(nick,%x))
          did -a $dname 9 $+(IP,%x,:) $readini(Tracks.ini,$did($dname,3).text,$+(IP,%x))
          did -a $dname 13 $+(%x,:) $readini(Tracks.ini,$did($dname,3).text,$+(Date,%x)) - $readini(Tracks.ini,$did($dname,3).text,$+(time,%x))
          inc %x
        }
      }
    }
    elseif ($did = 26) { did -r $dname 6,9,13,7 | did -a $dname 7 SteamID Status }
    elseif ($did = 10) { did -r $dname 6,9,13,7 | did -a $dname 7 All the tracks removed, You can find them in recycle bin for restore. | remove -b Tracks.ini }
    elseif ($did = 27) { run Tracks.ini }
    elseif ($did = 22) { run Blacklist.ini }   
    elseif ($did = 19) {
      if ($ini(Blacklist.ini,$did($dname,18).text) == 1) {
        did -ra $dname 17 Nick: $readini(blacklist.ini,$did($dname,18).text,Nick) $chr(124) SteamID: $did($dname,18).text $chr(124) Reason: $readini(blacklist.ini,$did($dname,18).text,Reason)
      }
      else { did -ra $dname 17 SteamID Not Found! }
    }
    elseif ($did = 30) { did -ra $dname 31 $iif($srcsid($did($dname,29).text) != $false,$srcsid($did($dname,29).text),SteamID Not Found!) }
    elseif ($did = 20) {
      var %stmid = $$?="Enter a SteamID:" | if (%stmid) { var %nck = $$?="Enter a Nickname:" |  if (%nck) { var %rsn = $$?="Enter a Reason:"
          writeini -n Blacklist.ini %stmid Nick %nck
          writeini -n Blacklist.ini %stmid Reason %rsn
          echo -ag $+(04,%nck,01) added to the blacklist with the steamid: $+(04,%stmid,01,$chr(44)) and the reason: $+(04,%rsn,01,.)
        }
      }
    }
    elseif ($did = 21) {
      if ($did($dname,17).sel) {
        noop $regex($did($dname,17).seltext,/SteamID:(.+)\|/i)
        .remini -n blacklist.ini $regml(1)
        echo -ag $+(04,$regml(1),01) has Removed Succsesfuly!
        showblist
      }
      elseif (!$did($dname,17)) {
        var %x = $$?="Enter the SteamID of the user:"
        if ($ini(blacklist.ini,%x)) { remini -n blacklist.ini %x | echo -ag $+(04,%x,01) has Removed Succsesfuly! | showblist }
        else { echo -ag $+(04,%x,01) has Not Found! }
      }
    }
    elseif ($did = 25) { did -ra $dname 17 }
    elseif ($did = 24) { showblist }
    elseif ($did = 35) { rcon $did(34) }
  }
  if ($devent == dclick) {
    if ($did = 6) { noop $regex($did($dname,6).seltext,/Nick([\d]):(.+)/i) | clipboard $regml(2) | echo -s $+(04,$cb,01) copied to you clipboard. }
    elseif ($did = 9) { noop $regex($did($dname,9).seltext,/IP([\d]):(.+)/i) | clipboard $regml(2) | echo -s $+(04,$cb,01) copied to you clipboard. }
    elseif ($did = 13) { noop $regex($did($dname,13).seltext,/([\d]):(.+)/i) | clipboard $regml(2) | echo -s $+(04,$cb,01) copied to you clipboard. }
  }
}
alias showblist {
  did -r RTrack 17
  var %i = 1
  while ($ini(blacklist.ini,%i)) {
    did -a RTrack 17 Nick: $readini(blacklist.ini,$ifmatch,Nick) $chr(124) SteamID: $ini(blacklist.ini,%i) $chr(124) Reason: $readini(blacklist.ini,$ifmatch,Reason)
    inc %i
  }
}
alias srcsid {
  if ($regex($read(tracks.ini,w,$+(*,$1,*)),/(.+?)=(.+)/g)) {
    var %x = 1
    while ($ini(tracks.ini,%x)) {
      if ($readini(tracks.ini,$ifmatch,$regml(1)) == $regml(2)) {
        return $ini(tracks.ini,%x)
      }
      inc %x
    }
  }
  else return $false
}
;;;;Get Rcon Logs;;;;

alias challengercon {
  sockudp -k rcon $gettok(%iport,1,58) $gettok(%iport,2,58) ÿÿÿÿChallenge Rcon
  window @kills
  window @joined
  window @Console
  window @say
}
alias getchall {
  var %i = 1
  while ($mid($mid($1-,%i,1),1) != $null) {
    if ($v1 isnum) { var %c = %c $+ $v1 }
    inc %i
  }
  return %c
}
on *:udpread:rcon:{
  sockread &t | breplace &t 0 254 32 160
  tokenize 160 $bvar(&t,1-).text
  if ($getchall($1-) isnum) { 
    set %challnum $getchall($1-)
    echo -a %challnum
  }
  rcon logaddress $ip 1337
  sockclose rcon
}

alias rcon {
  sockudp rcon.cmd $gettok(%iport,1,58) $gettok(%iport,2,58) ÿÿÿÿrcon %challnum $+(",%SRcon,") $1-
}

;/startrcon <port>
alias startrcon {
  sockudp -k rcon.cmd 1337
  challengercon
}
on *:UDPREAD:rcon.cmd:{
  sockread &x | breplace &x 0 254 32 160
  tokenize 160 $bvar(&x,1-).text
  var %action = $gettok($gettok($1-,3,34),1,32), %steamid = $gettok($gettok($1-,3,$asc(<)),1,$asc(>)), %userid = $gettok($gettok($1-,2,$asc(<)),1,$asc(>))
  var %nick = $gettok($gettok($1-,2,$asc(")),1,$asc(<)), %team = $iif($gettok($gettok($1-,4,$asc(<)),1,$asc(>)) == CT,12CT,4T)

  if (%action == say) {
    aline @say Nick: %nick (USERID: %userid STEAMID: %steamid TEAM: %team $+ ) said: $gettok($1-,4,$asc("))
  }
  elseif (%action == killed) {
    aline @kills Nick: %nick (USERID: %userid STEAMID: %steamid TEAM: %team $+ ) killed $gettok($gettok($1-,4,$asc(")),1,$asc(<)) $&
      (USERID: $gettok($gettok($1-,5,$asc(<)),1,$asc(>)) STEAMID: $gettok($gettok($1-,6,$asc(<)),1,$asc(>)) $&
      TEAM: $iif($gettok($gettok($1-,7,$asc(<)),1,$asc(>)) == CT,12CT,4T) $+ ) Gun: $gettok($1-,6,$asc("))
  }
  elseif (%action == connected,) {
    noop $regex($1-,/address "(.+?):/i)
    aline @joined Nick: %nick (USERID: %userid STEAMID: %steamid TEAM: None) Connected with address $regml(1)
    set $+(%,%steamid) $iif($+(%,%steamid), $calc($+(%,%steamid) +1), 1)
    writeini -n Tracks.ini %steamid IP $+ $var($+(%,%steamid),1).value $regml(1)
    writeini -n Tracks.ini %steamid Date $+ $var($+(%,%steamid),1).value $date
    writeini -n Tracks.ini %steamid Time $+ $var($+(%,%steamid),1).value $time
    writeini -n Tracks.ini %steamid Nick $+ $var($+(%,%steamid),1).value %nick
  }
  elseif (%action == entered) {
    if ($ini(blacklist.ini,%steamid)) {
      rcon kick %nick
      rcon admin_command admin_kick %steamid
      rcon admin_command admin_ssay [AUTOKICK] %nick ( $+ %steamid $+ ) blacklist user.
    }
    aline @joined Nick: %nick (USERID: %userid STEAMID: %steamid TEAM: None $+ ) Entered the game
  }
  elseif (%action == joined) {
    aline @joined nick: %nick (USERID: %userid STEAMID: %steamid TEAM: %team $+ ) Joined team %team
  }
  elseif ($gettok($1-,6,32) == World) {
    $iif($gettok($1-,2,34) == Round_Start,aline @Console New Round started!,$iif($gettok($1-,2,34) == Round_End,aline @Console End of New ROUND))
  }
  else {
    aline @Console $1-
  }
}

;;;;Menu;;;;
menu * {
  Rcon Tracks: RTrack
  Set Server IPort: Set %IPort $$?="Type The Server ip and the port"
  Set Server Rcon Password: Set %SRcon $$?="Type The Server Rcon Password"
}

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