Welcome Guest [Log In] [Register]
Welcome to COS. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Made this little snippet; Someone may find it useful
Topic Started: Oct 31 2009, 11:59 AM (134 Views)
Riffpilgrim
Member Avatar
Self proclaimed sexy guy
Members
Planning to expand on it so that it returns all forum statistics also but I havn't got round to doing that yet.
Anyway, it does grab event info from the calender listings.
To use type: [!@.~]cos
or /cos
Paste into mirc script editor (the remotes tab alt+r)

Quote:
 
[16:57] -Riffpilgrim- ((CoS)) Info: The Council of Saradomin is a RuneScape clan dedicated to brotherhood, ownage, and having fun. Our requirements are 100 f2p combat or higher.
[16:57] -Riffpilgrim- ((CoS)) Current calendar events: 30-October-09 King Daggannot 30-October-09 Armadyl boss 31-October-09 Halloween lil maratoon


Code:
 
alias -l c1 return $+($chr(3),07,$1-,$chr(3))
alias -l c2 return $+($chr(3),14,$1-,$chr(3))
alias -l logo return $remove($+($c1($chr(40),$chr(40),$c2($1-),$c1($chr(41),$chr(41)))),$chr(32))
alias -l nohtml var %a,%b = $regsub($1-,/(<[^>]+>)/g,$null,%a) | return %a
alias cos { var %f = $right($ticks,5),%sn $+(cos.,%f) | sockopen %sn z10.invisionfree.com 80 | hadd -m  %sn how echo -a
}
on $*:text:/^[!@.~]cos/Si:#cosclan: {
 var %f = $right($ticks,5),%sn $+(cos.,%f)
 hadd -m  %sn how $iif($left($1,1) == @,.msg $chan,.notice $nick)
 sockopen %sn z10.invisionfree.com 80
}
on *:SOCKOPEN:cos.*: {
 sockwrite -nt $sockname GET /COS/index.php HTTP/1.1
 sockwrite -nt $sockname Host: z10.invisionfree.com
 sockwrite -nt $sockname $str($crlf,2)
}
on *:SOCKREAD:cos.*: {
 var %c
 sockread %c
 if ($regex(%c,Our)) {
   hadd $sockname info $gettok(%c,4,34)
 }
 if (*http://i145.photobucket.com/albums/r222/IcieJuicy/Calendar.gif* iswm %c) {
   var %c | sockread %c | tokenize 61 %c | var %a $9 $15 $21 $27 $33 $39 $45
   hadd $sockname events $replace($remove(%a,>,<,/a,/td,title,$chr(44),a href),',$chr(32))
   $hget($sockname,how) $logo(CoS) $c1(Info:) $c2($hget($sockname,info))
   $hget($sockname,how) $logo(CoS) $c1(Current calendar events:) $c2($iif($hget($sockname,events),$v1,No events currently listed))
   hfree $sockname | sockclose $sockname
 }
}
<center>
Posted Image
</center>
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · COS Archive · Next Topic »
Add Reply