Castle Penguins

 Welcome to Castle Penguins


Usergroups Check your PMs Log in
Register

Home | Forum

Go Back Post new topic Reply to topic  
Author Message
smooth_dudes



Joined: 11 Nov 2006
Posts: 5

PostPosted: Sat Nov 11, 2006 2:43 pm    Post subject: hello there first script on this forum :) Reply with quote

well hello there... let me be the first to post here? i got this (kinda ugly) stats script using slushpuppys parser! enjoy

Code:

on $*:TEXT:/^[!@]stats */Si:*: {
  if ($2) set %stat.target $2-
  elseif ($readini(DefRSN.ini,RSNs,$mask($fulladdress,3))) set %stat.target $ifmatch
  elseif ($readini(DefRSN.ini,RSNs,$nick)) set %stat.target $ifmatch
  set %stat.return $iif($left($1,1) == @,msg $chan,notice $nick)
  if ($len($2-) > 12) { %stat.return 7runescape 14nicknames can only contain up to7 12 14letters. | halt
  }
  else { sockopen statlook www.slushpuppy.silverinterlocution.org 80
  }
}
on *:SOCKOPEN:statlook*:{
  sockwrite -nt $sockname GET /rsstats.php?stats= $+ %stat.target HTTP/1.1
  sockwrite -nt $sockname Host: www.slushpuppy.silverinterlocution.org $+ $crlf $+ $crlf
}
on *:SOCKREAD:statlook*:{
  if ($sockerr) {
    echo -a Error.
    halt
  }
  else {
    var %stat.html
    sockread %stat.html
    if (overall: isin %stat.html) {
      set %stat.overall $gettok($htmlfree(%stat.html),1,32)
      set %stat.overall.2 $gettok($htmlfree(%stat.html),2,32)
      ;:attack;:
      set %stat.attack $gettok($htmlfree(%stat.html),3,32)
      set %stat.attack.2 $gettok($htmlfree(%stat.html),4,32)
      ;:defence;:
      set %stat.defence $gettok($htmlfree(%stat.html),5,32)
      set %stat.defence.2 $gettok($htmlfree(%stat.html),6,32)
      ;:strength;:
      set %stat.strength $gettok($htmlfree(%stat.html),7,32)
      set %stat.strength.2 $gettok($htmlfree(%stat.html),8,32)
      ;:hitpoints;:
      set %stat.hitpoints $gettok($htmlfree(%stat.html),9,32)
      set %stat.hitpoints.2 $gettok($htmlfree(%stat.html),10,32)
      ;:ranged;:
      set %stat.ranged $gettok($htmlfree(%stat.html),11,32)
      set %stat.ranged.2 $gettok($htmlfree(%stat.html),12,32)
      ;:prayer;:
      set %stat.prayer $gettok($htmlfree(%stat.html),13,32)
      set %stat.prayer.2 $gettok($htmlfree(%stat.html),14,32)
      ;:magic;:
      set %stat.magic $gettok($htmlfree(%stat.html),15,32)
      set %stat.magic.2 $gettok($htmlfree(%stat.html),16,32)
      ;:cooking;:
      set %stat.cooking $gettok($htmlfree(%stat.html),17,32)
      set %stat.cooking.2 $gettok($htmlfree(%stat.html),18,32)
      ;:woodcutting;:
      set %stat.woodcutting $gettok($htmlfree(%stat.html),19,32)
      set %stat.woodcutting.2 $gettok($htmlfree(%stat.html),20,32)
      ;:fletching;:
      set %stat.fletching $gettok($htmlfree(%stat.html),21,32)
      set %stat.fletching.2 $gettok($htmlfree(%stat.html),22,32)
      ;:fishing;:
      set %stat.fishing $gettok($htmlfree(%stat.html),23,32)
      set %stat.fishing.2 $gettok($htmlfree(%stat.html),24,32)
      ;:firemaking;:
      set %stat.firemaking $gettok($htmlfree(%stat.html),25,32)
      set %stat.firemaking.2 $gettok($htmlfree(%stat.html),26,32)
      ;:crafting;:
      set %stat.crafting $gettok($htmlfree(%stat.html),27,32)
      set %stat.crafting.2 $gettok($htmlfree(%stat.html),28,32)
      ;:smithing;:
      set %stat.smithing $gettok($htmlfree(%stat.html),29,32)
      set %stat.smithing.2 $gettok($htmlfree(%stat.html),30,32)
      ;:mining;:
      set %stat.mining $gettok($htmlfree(%stat.html),31,32)
      set %stat.mining.2 $gettok($htmlfree(%stat.html),32,32)
      ;:herblore;:
      set %stat.herblore $gettok($htmlfree(%stat.html),33,32)
      set %stat.herblore.2 $gettok($htmlfree(%stat.html),34,32)
      ;:agility;:
      set %stat.agility $gettok($htmlfree(%stat.html),35,32)
      set %stat.agility.2 $gettok($htmlfree(%stat.html),36,32)
      ;:thieving;:
      set %stat.thieving $gettok($htmlfree(%stat.html),37,32)
      set %stat.thieving.2 $gettok($htmlfree(%stat.html),38,32)
      ;:slayer;:
      set %stat.slayer $gettok($htmlfree(%stat.html),39,32)
      set %stat.slayer.2 $gettok($htmlfree(%stat.html),40,32)
      ;:farming;:
      set %stat.farming $gettok($htmlfree(%stat.html),41,32)
      set %stat.farming.2 $gettok($htmlfree(%stat.html),42,32)
      ;:runecrafting;:
      set %stat.runecraft $gettok($htmlfree(%stat.html),43,32)
      set %stat.runecraft.2 $gettok($htmlfree(%stat.html),44,32)
      ;:construction;:
      set %stat.construction $gettok($htmlfree(%stat.html),45,32)
      set %stat.construction.2 $gettok($htmlfree(%stat.html),46,32)
      ;:send to channel;:
      var %stat.half 14 %stat.attack $+ 7 %stat.attack.2 $+ 14 %stat.defence $+ 7 %stat.defence.2 $+ 14 %stat.strength $+ 7 %stat.strength.2 $+ 14 %stat.hitpoints $+ 7 %stat.hitpoints.2 $+ 14 %stat.ranged $+ 7 %stat.ranged.2 $+ 14 %stat.prayer $+ 7 %stat.prayer.2 $+ 14 %stat.magic $+ 7 %stat.magic.2 $+ 14 %stat.cooking $+ 7 %stat.cooking.2 $+ 14 %stat.woodcutting $+ 7 %stat.woodcutting.2 $+ 14 %stat.fletching $+ 7 %stat.fletching.2 $+ 14 %stat.fishing $+ 7 %stat.fishing.2 $+ 14 %stat.firemaking $+ 7 %stat.firemaking.2
      var %stat.half1 14 %stat.crafting $+ 7 %stat.crafting.2 $+ 14 %stat.smithing $+ 7 %stat.mining.2 $+ 14 %stat.mining $+ 7 %stat.mining.2 $+ 14 %stat.herblore $+ 7 %stat.herblore.2 $+ 14 %stat.agility $+ 7 %stat.agility.2 $+ 14 %stat.thieving $+ 7 %stat.thieving.2 $+ 14 %stat.slayer $+ 7 %stat.slayer.2 $+ 14 %stat.farming $+ 7 %stat.farming.2 $+ 14 %stat.runecraft $+ 7 %stat.runecraft.2 $+ 14 %stat.construction $+ 7 %stat.construction.2
      %stat.return 14runescape stats for7 %stat.target
      %stat.return 14 $+ %stat.overall $+ 7 %stat.overall.2
      %stat.return %stat.half %stat.half1
      timer 1 1 unset %stat.*
      sockclose statlook
      halt
    }
  }
}
alias -l htmlfree {
  var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x,&nbsp;)
  return %x
}


Last edited by smooth_dudes on Sat Nov 18, 2006 1:43 pm; edited 2 times in total
Back to top
View user's profile Send private message
Adee
Site Admin


Joined: 24 Oct 2006
Posts: 16
Location: Scotland

PostPosted: Sat Nov 11, 2006 3:15 pm    Post subject: Reply with quote

wow erm... quite a long script isnt it... a bit... excessively long. But its cool.
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
smooth_dudes



Joined: 11 Nov 2006
Posts: 5

PostPosted: Sat Nov 11, 2006 3:54 pm    Post subject: Reply with quote

yeah i know way too long but i had a bug then shortening it that forced me to make a var for each stat lvl and name Sad
and i tried some $replace and stuff but just kept getting insuficient parameters Razz
_________________

:O)
Back to top
View user's profile Send private message
AgentAustin
Site Admin


Joined: 24 Oct 2006
Posts: 24

PostPosted: Mon Nov 13, 2006 4:03 am    Post subject: Reply with quote

Its a socket its gona be LONG
Back to top
View user's profile Send private message Send e-mail AIM Address
xl mattb lx
Site Admin


Joined: 10 Nov 2006
Posts: 12

PostPosted: Tue Nov 14, 2006 12:19 am    Post subject: Reply with quote

what is it??
Back to top
View user's profile Send private message
Adee
Site Admin


Joined: 24 Oct 2006
Posts: 16
Location: Scotland

PostPosted: Thu Nov 16, 2006 11:53 am    Post subject: Reply with quote

It can be shortened to a lot shorter than that but if it works, hey who cares Very Happy
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Adee
Site Admin


Joined: 24 Oct 2006
Posts: 16
Location: Scotland

PostPosted: Thu Nov 16, 2006 11:54 am    Post subject: Reply with quote

xl mattb lx wrote:
what is it??
Its a runescape skills script
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
xl mattb lx
Site Admin


Joined: 10 Nov 2006
Posts: 12

PostPosted: Thu Nov 16, 2006 9:04 pm    Post subject: Reply with quote

oh i still dont know what that is either
Back to top
View user's profile Send private message
smooth_dudes



Joined: 11 Nov 2006
Posts: 5

PostPosted: Sat Nov 18, 2006 1:27 pm    Post subject: Reply with quote

xl mattb lx wrote:
oh i still dont know what that is either

lol! :p do you know mirc?
_________________

:O)
Back to top
View user's profile Send private message
xl mattb lx
Site Admin


Joined: 10 Nov 2006
Posts: 12

PostPosted: Sun Nov 19, 2006 2:59 pm    Post subject: Reply with quote

no
Back to top
View user's profile Send private message
smooth_dudes



Joined: 11 Nov 2006
Posts: 5

PostPosted: Tue Nov 21, 2006 11:27 am    Post subject: Reply with quote

xl mattb lx wrote:
no

then its gonna be kinda hard to explain then Very Happy
_________________

:O)
Back to top
View user's profile Send private message
AgentAustin
Site Admin


Joined: 24 Oct 2006
Posts: 24

PostPosted: Thu Nov 23, 2006 3:16 am    Post subject: Reply with quote

lol
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic   Reply to topic   Forum Index.   Home.
(Page 1 of 1)  
     
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Jump to:  



Powered by phpBB © 2001, 2005 phpBB Group
Effex-Media Web Resources
phpbb template by zig zag web design
© 2005 Copyright zig zag web design. All rights reserved.



Free Forum Free Top Site List
Make this Forum Ad-Free