Dynamic Stats Greet [RuneScape]

By Testor on Oct 25, 2009

Grabs your stat information from RScript.org and sets your greet according to your skill information!
E: Shows percentage to 99.

@Spam: [Five] Slayer Statistics: Level: 87 | Rank: 32,684 | Exp: 4,143,747 (8,890,684 To 99 (31.79%))

on *:Connect: { DynamicGreet }
Alias DynamicGreet {
  if ($Sock(Greet)) { SockClose Greet }
  if (!%Greet-RSN) { Set %Greet-RSN $?="Insert RSN Here." }
  if (!%Greet-Skill) { Set %Greet-Skill $?="Pick a skill! If the skill is Overall the script won't function correctly." }
  SockOpen Greet rscript.org 80 
}
on *:SockOpen:Greet: {
  SockWrite -nt Greet GET $+(/Lookup.php?type=stats&user=,%Greet-RSN) HTTP/1.1
  SockWrite -nt Greet Host: rscript.org
  SockWrite -nt Greet $crlf
}
on *:SockRead:Greet: {
  if ($SockErr) { SockClose Greet | SockOpen Greet rscript.org 80 }
  Else {
    Var %Greet
    SockRead %Greet
    if (%Greet-Skill isin %Greet) {
      Tokenize 32 $GetTok(%Greet,2-,32)
      Set %Greet.Rank $Bytes($1,bd) | Set %Greet.Level $Bytes($2,bd)
      Set %Greet.Exp $Bytes($3,bd) | Set %Greet.99 $Bytes($Calc(13034431 - $3),bd) 
      Ns set greet %Greet-Skill Statistics: Level: %Greet.Level $(|) $&
        Rank: %Greet.Rank $(|) Exp: %Greet.Exp $+($Chr(40),%Greet.99 To 99 $Chr(40), $&
        $Round($Calc(($3 /13034431)*100),2),%,$chr(41),$Chr(41))
      Unset %Greet.*
      SockClose Greet
    }
  }
}
Menu Channel {
Refresh Stats Info: DynamicGreet
}

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.