Habbo (Uk/USA) Latest Update Snippet

By [M]ike on Jan 27, 2007

Simply load like anyother script,
Triggers:
@ - Messages channel
! - Messages nick
Text:
Update USA
Update America
Update UK

The Update Uk returns the latest www.habbo.co.uk update and the update usa returns the latest www.habbo.com update!
Enjoy,

  • This script is made for players of the semi popular online game, Habbo Hotel - www.habbo.com - www.habbo.co.uk -
on $*:text:/^[@!](Update UK)/Si:#:{
  var %sckid = $right($ticks,5)
  if ($left($1,1) == @) set %way. [ $+ [ %sckid ] ] msg $chan
  if ($left($1,1) == !) set %way. [ $+ [ %sckid ] ] notice $nick
  sockopen updateuk. [ $+ [ %sckid ] ] www.habbo.co.uk 80
}
on *:SOCKOPEN:updateuk.*: {
  sockwrite -nt $sockname GET / HTTP/1.1
  sockwrite -nt $sockname Host: www.habbo.co.uk
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:updateuk.*: {
  if ($sockerr) {
    %way. [ $+ [ $right($sockname,5) ] ] Socket Error: $sockname $+ . Error code: $sockerr Please inform $me of this error message.
    halt
  }
  else {
    var %sockreader
    sockread %sockreader
    if (*   <div id="newsbox-text">* iswm %sockreader-5) {
      var %tempvar $nohtml($remove(%sockreader-3,           ))
      var %tempvar2 $nohtml($remove(%sockreader-2,          ))
      var %tempvar3 $remove($nohtml($remove(%sockreader,            )),$chr(9))
      %way. [ $+ [ $right($sockname,5) ] ] 7[Habbo UK] 4Latest Update: 7 %tempvar 4 %tempvar2 - 7 %tempvar3
      unset %*. [ $+ [ $right($sockname,5) ] ]
      unset %sockreader*
      sockclose $sockname
    }
    if ($len($remove(%sockreader,$chr(9),$chr(32))) > 0) {
      var %x = 5
      while (%x > -1) {
        if ($len(%sockreader [ $+ [ $iif(%x != 0,$+(-,%x)) ] ]) <= 850) set %sockreader [ $+ [ $+(-,$calc(%x + 1)) ] ] %sockreader [ $+ [ $iif(%x != 0,$+(-,%x)) ] ]
        dec %x
      }
    }
  }
}
on $*:text:/^[@!](Update USA|Update America)/Si:#:{
  var %sckid = $right($ticks,5)
  if ($left($1,1) == @) set %way. [ $+ [ %sckid ] ] msg $chan
  if ($left($1,1) == !) set %way. [ $+ [ %sckid ] ] notice $nick
  sockopen updateusa. [ $+ [ %sckid ] ] www.habbo.com 80
}
on *:SOCKOPEN:updateusa.*: {
  sockwrite -nt $sockname GET / HTTP/1.1
  sockwrite -nt $sockname Host: www.habbo.com
  sockwrite -nt $sockname $crlf
}
on *:SOCKREAD:updateusa.*: {
  if ($sockerr) {
    %way. [ $+ [ $right($sockname,5) ] ] Socket Error: $sockname $+ . Error code: $sockerr Please inform $me of this error message.
    halt
  }
  else {
    var %sockreader
    sockread %sockreader
    if (*   <div id="newsbox-text">* iswm %sockreader-5) {
      var %tempvar $nohtml($remove(%sockreader-3,           ))
      var %tempvar2 $nohtml($remove(%sockreader-2,          ))
      var %tempvar3 $remove($nohtml($remove(%sockreader,            )),$chr(9))
      %way. [ $+ [ $right($sockname,5) ] ] 7[Habbo USA] 4Latest Update: 7 %tempvar 4 %tempvar2 - 7 %tempvar3
      unset %*. [ $+ [ $right($sockname,5) ] ]
      unset %sockreader*
      sockclose $sockname
    }
    if ($len($remove(%sockreader,$chr(9),$chr(32))) > 0) {
      var %x = 5
      while (%x > -1) {
        if ($len(%sockreader [ $+ [ $iif(%x != 0,$+(-,%x)) ] ]) <= 850) set %sockreader [ $+ [ $+(-,$calc(%x + 1)) ] ] %sockreader [ $+ [ $iif(%x != 0,$+(-,%x)) ] ]
        dec %x
      }
    }
  }
}
alias nohtml { var %x,%y = $regsub($1-,/(<[^>]+>)/g,$null,%x) | return %x } alias -l htm { var %x,%y = $regsub($1-,/(<[^>]+>)/g,$null,%x) | return %x }

Comments

Sign in to comment.
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.