mIRC Home    About    Download    Register    News    Help

Print Thread
#127985 19/08/05 02:53 AM
Joined: Aug 2005
Posts: 31
C
Caveman Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Aug 2005
Posts: 31
Hey all..

Im quite new to scripting.. i can do simple scripts but i need some serious help with a script that goes to a website enters some text and reports back to me if thats possible

basically when some1 types !reng <nick> i want the script to goto http://www.renguard.com/locator.php and type in <nick> then when the next page loads to report what the has says to me or to the person who typed it in a notice..

I have no clue even how to start this besides

on *:text:!reng:#: {

Thats about it..

Sorry about my noobish skill with scripting but if any1 could help i would be very greatful

Thanks,
Caveman

Joined: Aug 2005
Posts: 9
R
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
R
Joined: Aug 2005
Posts: 9
Actually it would be:
on *:text:!reng*:*: {

The * instead of # allows them to message you, and the * after !reng can't be done without.

And this would probably best be done with sockets. I'm afraid I don't know enough about them to help you though. Try and find a sockets tutorial, or look at the source for dudebot (dudebot.com), it has google and steamid search functions.

Last edited by ReK_; 19/08/05 03:47 AM.

"So long and thanks for all the fish"
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Ok, it's just a little test to show you how sockets work etc..

Code:
On *:Text:!veng:#: {
  %veng.nick = ""
  %veng.chan = $chan
  veng
}

On *:Text:!veng &amp;:#: {
  %veng.nick = $2
  %veng.chan = $chan
  veng
}

alias veng { 
  sockopen reng www.renguard.com 80
}

on *:sockopen:reng: {  
  .sockwrite -n $sockname GET $+(/locator.php?q=,%veng.nick) HTTP/1.1  
  .sockwrite -n $sockname Host: www.renguard.com $+ $crlf $+ $crlf  
} 

alias -l nohtml {
  var %x, %i = $regsub($1-,/(^[^&lt;]*&gt;|&lt;[^&gt;]*&gt;|&lt;[^&gt;]*$)/g,$null,%x), %x = $remove(%x,&amp;nbsp;)
  return %x
} 


on 1:sockread:reng:{
  if ($sockerr &gt; 0) return
  :nextread
  sockread %temp
  if ($sockbr == 0) return
  if (%temp == $null) %temp = -
  if ((*&lt;B&gt;*&lt;/B&gt;* iswm %temp) &amp;&amp; (Search found isin %temp)) {
    msg %veng.chan $nohtml($replace(%temp,&lt;B&gt;,$chr(32),&lt;/B&gt;,$chr(32)))
  }
  goto nextread
}


[21:59] <Andy> !veng danddddd
[21:59] <SladeKraven> Search found 1 results... danddddd XIL AOW Marathon Serv [Half-RG]

Have a play about and see what you can do.

-Andy

Joined: Aug 2005
Posts: 31
C
Caveman Offline OP
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Aug 2005
Posts: 31
Thanks for the support guys but all this scripting is like talking japanise to me.. goes in 1 ear and out the other..

What ill do is look about for some tutorials and see if they help..

Help is still very welcome though

Last edited by Caveman; 19/08/05 05:22 AM.

Link Copied to Clipboard