Jump to content

Coding Skill Calcualtors!!


Earpy

Recommended Posts

Well, ive been wondering for a while now. What language do people use to make Skill calcualtors. I spoke to Oblivion590 and he said he made his in Flash or something using ActionScript. Is there any easier ways to do these and would anyone be willing to make me one? I suppose they could have a staff postion at my site :)

 

 

 

pm me in game (Sir Earpster) or reply here,

 

 

 

Thanks Alot :D

Link to comment
Share on other sites

php mainly, javascript from time to time... If you dont know what that is, and it confussed you, i suggest you make some lessons/read some books/visit some websites about this before you even try...

 

 

 

The tip.it calcs are mainly made in javascript to lessen the server load, and to make it faster for our users, however, the calcs with formulas we want to hide (since it takes us like a year or more to get them right we don't want people going on and stealing them the minut they go online...) like the max hit calc and the combat calc, are written in php (combat calc by me, max hit calc by michael (posted above)) ;)

 

 

 

Hopefully that'll help a bit, but seriously, do some more research if you really are confussed about this...

Link to comment
Share on other sites

grabbing stats all depends on what language you are using. It's pretty complicated for someone that doesn't know anything about programming it seems and you really have to figure what language you are going to make the calc in first. PHP uses fopen() I believe, Visual Basic on the other hand (for clients and such) uses different functions. Learn the basics then work up to this level.

Link to comment
Share on other sites

Yeah, php is the easy option with a little help from javascript.

 

 

 

<?php

$username = "bolter99";

$highscores = file_get_contents("http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user1=".$username);

//Then some code here to split up the scores and display them.



//Thats the hard part lol.

?>

Link to comment
Share on other sites

Heres a messy little code i just knocked up.... it works but i wouldnt recommend using it as it is. It needs a littl work.

 

 

 

<?



//USAGE: index.php?username=zezima&skill=attack



function CCase($string) {

$string = strtoupper(substr($string,0,1)).strtolower(substr($string,1,strlen($string)));

return $string;

}

$username = $_GET['username'];

$skill = $_GET['skill'];

$scores = file_get_contents("http://hiscore.runescape.com/lang/en/aff/runescape/hiscorepersonal.ws?user1=".$username);

$scores = str_replace("","\n",$scores);



$scores = str_replace("","",$scores);



$scores = split("\n",$scores);

$i = 0;



while ($i
if (strpos($scores[$i],$_GET['skill'])>0) {

$result = $scores[$i];

$result = substr($result,strpos($result,'.gif">')+6);

$result = str_replace("","",$result);

$result = str_replace("","",$result);

$result = substr($result,strpos($result,$_GET['username'].'">')+2+strlen($_GET['username']));

$result = str_replace("","",$result);

$result = str_replace(CCase($_GET['skill'])." ","",$result);

$result = str_replace("","|",$result);

$result = str_replace(" ","",$result);

$result = str_replace(" ","",$result);

$result = substr($result,1,strlen($result));

//After all that crap its ready to split once again. In this format: Rank(0),level(1),experience(2)

$result = split("\|",$result);

}

$i++;

}





echo "Rank: ".$result[0]."
";

echo "Level: ".$result[1]."
";

echo "Experience: ".$result[2]."
";





?>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.