Nice edit Wims ,the script is working nice with it returning multiple results but it is gets flooded out if you do 2 or more requests in a row (straight after each other) that have multipule results.

I did note that when you search and get results for the gameid,the next query shows the name of the last search instead of the correct search.
Also some of the txt is coming back with non letters ,I pasted it below:

Code:
[11:49pm] <@D00M> !gameupdate BCUS98114
[11:49pm] *UPDBot* Game: Gran Turismo 5  <==(correct name)
[11:49pm] *UPDBot* UPD Version: 01.05 - URL: http://b0.ww.np.dl.playstation.net/tppkg/np/BCUS98114/BCUS98114_T52/926756a8e8e39359/UP9000-BCUS98114_00-0000000000000000-A0105-V0100-PE.pkg - File Size: 637423280 - Checksum (sha1): 1a154c8d1513f54f99782157be99b4e60af4cde1 - FW Version: 03.5000
[11:54pm] <@D00M> !gameupdate BLES01040
[11:54pm] *UPDBot* Game: Gran Turismo 5  <==(incorrect name)
[11:55pm] *UPDBot* UPD Version: 01.02 - URL: http://b0.ww.np.dl.playstation.net/tppkg/np/BLES01040/BLES01040_T2/74ef4755fbe429f3/EP0006-BLES01040_00-DEDSPC2PATCH0001-A0102-V0100-PE.pkg - File Size: 27265056 - Checksum (sha1): 9e6309f0c1eb21ac3c9ea370368eac8d388dd398 - FW Version: 03.4000
[11:55pm] <@D00M> !gameupdate BLES01040
[11:55pm] *UPDBot* Game:  Dead Space™ 2  <==(correct name but doesnt display correctly ,has non letters)
[11:55pm] *UPDBot* UPD Version: 01.02 - URL: http://b0.ww.np.dl.playstation.net/tppkg/np/BLES01040/BLES01040_T2/74ef4755fbe429f3/EP0006-BLES01040_00-DEDSPC2PATCH0001-A0102-V0100-PE.pkg - File Size: 27265056 - Checksum (sha1): 9e6309f0c1eb21ac3c9ea370368eac8d388dd398 - FW Version: 03.4000


How I have it atm:

Click to reveal..
Code:
#UPDFinder on
on *:LOAD:{
  if ($version < 7.14) {
    .unload -rs $+(",$script,")
    notice $nick 4PS3UPDFinder v1.00 Build 02 (Written By Wims) Requires mIRC v7.14 or newer to be installed successfully, script auto-unloaded.
  }
  else { notice $nick 3PS3UPDFinder v1.00 Build 02 (Written By Wims), Successfully loaded. }
}
on *:UNLOAD:{
  .unload -rs $+(",$script,")
  notice $nick 4PS3UPDFinder v1.00 Build 02 (Written By Wims), Successfully unloaded.
}
alias Game_id {
  sockclose game_id
  sockopen game_id yifan.lu 80
  sockmark game_id $1-
}
on *:sockopen:game_id:{ 
  sockwrite -n $sockname GET $+(/psn/?titleid=,$urlencode($gettok($sock(game_id).mark,3,32)),&env=np) HTTP/1.0
  sockwrite -n $sockname Host: yifan.lu
  sockwrite -n $sockname
  sockmark $sockname $gettok($sock($sockname).mark,1-2,32)
}
on *:sockread:game_id:{
  var %a,%c $sock($sockname).mark
  sockread -f %a
  while ($sockbr) {
    if (<tr><td><strong>* iswm %a) {
      if ($regml(parse,6)) %c 15Game:4 $html2ascii($v1)
      noop $regex(parse,$nohtml(%a),/^(\d+(?:\.\d+)?)(.+\.pkg)(\d+) Bytes(.{40})(\d+(?:\.\d+)?)(?:Game:(.+)&laquo; Back)?/iS)
      %c 15UPD Version:8 $regml(parse,1) - 15URL: $regml(parse,2) - 15File Size:4 $regml(parse,3) - 15FW Version:3 $regml(parse,5)
    }
    elseif (*Invalid title id or cannot find game* iswm %a) {
      %c Invalid title id
      sockclose $sockname
      return
    }
    sockread -f %a
  }
}

alias urlencode return $regsubex($$1,/([\W\s])/Sg,$+(%,$base($asc(\t),10,16,2)))
alias nohtml return $regsubex($1,/<[^>]+(?:>|$)|^[^<>]+>/g,)
alias HT2AS {
  var %A quot amp lt gt nbsp iexcl cent pound curren yen brvbar sect uml copy ordf $&
    laquo not shy reg macr deg plusmn sup2 sup3 acute micro para middot cedil sup1 $&
    ordm raquo frac14 frac12 frac34 iquest Agrave Aacute Acirc Atilde Auml Aring AElig $&
    Ccedil Egrave Eacute Ecirc Euml Igrave Iacute Icirc Iuml ETH Ntilde Ograve Oacute $&
    Ocirc Otilde Ouml times Oslash Ugrave Uacute Ucirc Uuml Yacute THORN szlig agrave $&
    aacute acirc atilde auml aring aelig ccedil egrave eacute ecirc euml igrave iacute $&
    icirc iuml eth ntilde ograve oacute ocirc otilde ouml divide oslash ugrave uacute $&
    ucirc uuml yacute thorn yuml trade
  var %B 34 38 60 62 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 $&
    177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 $&
    199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 $&
    221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 $&
    243 244 245 246 247 248 249 250 251 252 253 254 255 153
  return $chr($gettok(%B,$findtokcs(%a,$1,32),32))
}
alias html2ascii {
  var %r /&(.{2,6});/Ug
  return $regsubex($1-,%r, $iif(#* iswm \t, $chr($mid(\t,2) ), $HT2AS(\t) ))
}

on *:text:!gameupdate:#MY_CHAN:{
  notice $nick 15Invalid cmd, try again with !gameupdate <4GameID15> .
}
on *:text:?gameupdates:#MY_CHAN:{
msg $chan 15There has been3 %guds 15Total Game Updates Searched...
}
on *:text:!gameupdate &:#MY_CHAN:{
  inc %guds
  inc -u5 %ANTiQ
  if (%ANTiQ > 1) { notice $nick You must wait 5 seconds between searches | halt }
  if (!$sock(game_id)) game_id notice $nick $upper($2)
}
#UPDFinder end
Menu menubar,status,channel {
  .$iif($group(#UPDFinder) == on,$style(1)) PS3 UPDFinder
  ..$iif($group(#UPDFinder).status == on,$style(2)) Enable:/.enable #UPDFinder | echo -a ->-14[3UPDFinder3 Script have been Enabled14].
  ..$iif($group(#UPDFinder).status == off,$style(2)) Disable:/.disable #UPDFinder | echo -a ->-14[4UPDFinder3 Script have been Disabled14].
}


I tried playing around with it somewhat and changed the game name to the top of the results instead of the bottom, added the on load echo, made it show in the menu/right click on screen ,added some color (although I couldn't work out how to get red txt for 3.60 or higher), and also added the count back in but can't seem to get the Q working again either.

Code:
  if ($play(0)) { notice $nick 15y0 4 $nick 14-=15You're in Queue so sit tight.. 9(4Q'd14:9 $v1 ) 14=-. }


I think my problem with the Q is that it isnt playing a txt file so if ($play(0)) is wrong?

Last edited by D00M; 14/12/12 04:51 PM.