April 14, 200620 yr 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
April 14, 200620 yr Javascript or PHP is the best way to go. That's what all my Calcs have been made with. Sometimes with a mixture of both.
April 16, 200620 yr U need a class to realy be able to create javascript programs. or alot of time to read. same with Flash or Actionscipt http://vashinred.googlepages.com/
April 17, 200620 yr 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...
April 18, 200620 yr Author Thanks for all your help. Just one more question. Can somebody PLEASE help me grab stats from the highscores? This is the one part im confused on :(
April 19, 200620 yr 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.
April 20, 200620 yr I use visual basic, but that is only for calcuators on my client Current Goals80/80 Fletching60/75 Woodcutting97/100 Combat
April 21, 200620 yr 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. ?>
April 21, 200620 yr 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]." "; ?>
April 21, 200620 yr Using regex to split it it way better than str_replace or explode... At least thats what i've found out... even though regex is a bit more complicated, too me some tries at least :P
April 22, 200620 yr Author Thanks for your help, everyone. I still dont know FULLY what to do but im sure this will help alot. Thanks everyone :D
Create an account or sign in to comment