mIRC Script to search jkdf2.net

Jedi Knight: Dark Forces 2
AcidRain
Junior Member
Posts: 114
Joined: Thu Aug 21, 2008 7:15 am
Website: http://AcidShower.com
Location: jackson, tn

mIRC Script to search jkdf2.net

Postby AcidRain » Sat Apr 18, 2015 3:44 pm

Paste this into Tools -> Script Editor -> Remote
and Save it.

Now search with: /search sbx

Code: Select all

alias search {
  sockclose http
  sockopen http www.jkdf2.net 80
  set %theSearch $1-
  set %q $replace($1-, $chr(32), $chr(37) $+ $chr(50) $+ $chr(48))
  echo -a -----------------------------
  echo -a Searching jkdf2.net for %theSearch $+ ...
}

on *:SOCKOPEN:http: {
  sockwrite -n $sockname GET /mircSearch.php?q= $+ %q HTTP/1.1
  sockwrite -n $sockname Host: www.jkdf2.net
  sockwrite $sockname $crlf
}

on *:SOCKCLOSE:http: {
  tokenize 124 %theResults | set %maxTokes $0
  var %i = 1
  var %results 0
  :top
  if (%i <= %maxTokes) {
    %bits = $gettok(%theResults, %i, 124)
    if ($gettok(%bits, 1, 44) == 0) {
      echo -a 4Type: $gettok(%bits, 2, 44) 4Name: $gettok(%bits, 3, 44)  4Download: 12 $+ $gettok(%bits, 4, 44)
      %results = $calc(%results + 1)
    }
    %i = $calc(%i + 1)
    goto top
  }

  echo -a Search Results for $chr(34) $+ %theSearch $+ $chr(34) $+ : %results
  echo -a -----------------------------
  unset %q
  unset %theSearch
  unset %sendToChan
  unset %theResults
}

on *:SOCKREAD:http: {
  if ($sockerr > 0) {
    echo -a Socket Error
    return
  }

  :nextread
  sockread -f %temp

  if ($sockbr == 0) return

  if (%temp) {
    %theResults = %theResults $+ %temp
  }

  goto nextread
}
Special Thx to LSF_Nickz2000 for putting together the worlds largest jkdf2 archive, and making all of this possible.

Return to “Jedi Knight”

Who is online

Users browsing this forum: No registered users and 7 guests

cron