I know this has been covered a thousand times, and I've tried modifying the scripts that cover the same type of deal from this site, but I've failed...

I want people to be able to do !player <name> in a channel and get the player info from an online search.

The link to the search is http://herald.uthgard-server.net/daoc/sig.php?name=<charname>&txt=on

So, for a character named 'Fighter' it would be http://herald.uthgard-server.net/daoc/sig.php?name=Fighter&txt=on

I would like to get the output like:
.msg $chan <name> <lastname> (<level>, <class>) - <guild> - <realmlevel> (<realmpoints>)

For Example:
.msg $chan Fighter DoesTheFighting (43, Armsman) - The Legendary Knights - 2.5 (26685)

This is what I have so far:

Code:
on *:TEXT:*!player*:#: {
  if ($1 == %c $+ player) {
    set %playerurl /daoc/sig.php?name= $+ $+($replace($2-,$chr(32),+),&txt=on)
    playerlookup
  }
}

alias playerlookup {
  sockopen player herald.uthgard-server.net 80
}

on *:SOCKOPEN:player: {
  sockwrite -nt $sockname GET %playerurl HTTP/1.1
  sockwrite -nt $sockname Accept-Language: en-us
  sockwrite -nt $sockname User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; rv:1.7.3) Gecko/20040913 Firefox/0.10.1
  sockwrite -nt $sockname Host: herald.uthgard-server.net
  sockwrite -nt $sockname Connection: keep-alive
  sockwrite -t $sockname $str($crlf,2)
}



Any help would be greatly appreciated.

Last edited by Borg8401; 08/06/09 01:37 AM.