Jump to content

Welcome to Pure Warfare - The #1 Community for Pures

Welcome to Pure Warfare - The #1 Community for Pures, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of Pure Warfare - The #1 Community for Pures by signing in or creating an account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get email updates
  • Get your own profile page and make new friends
  • Send personal messages to other members.

[PHP]RuneScape Stat Signatures


Recommended Posts

I made this for the PC Site like 2 weeks ago, since the project I guess is dead now, I'm going to release everything I made.

 

Example: http://rspserver.com/marty/statsigs/

 

 

You can Download it as a .zip or copy & paste the code below.

 

 

& yes the images are very simple, I'm not very good at graphics so I didn't even try, you can make your own if you want to use it.

 

 

$x = array('27', '79', '134', '187', '239');

$y = array('9', '30', '53', '78', '101');

 

Those are the coordinates for where the levels will be displayed, so that you can make it fit in with your custom images.

 

 

index.php

<?/** Runescape Hiscore Lookup* By Marty(K L E O S)* www.epidemicclan.com*/$url = "http://rspserver.com/marty/statsigs/";?><form method="POST"><input type="textbox" name="username" value="K L E O S"><input type="submit" name="submit" value="Go"><br /><input type="radio" name="image" value="image1">Image 1<br /><input type="radio" name="image" value="image2">Image 2</form><?if(isset($_POST['submit'])){	$sr = $_POST['image'];	$username = $_POST['username'];	$username = str_replace(' ', '_', $username);		if($sr == "image1") {		echo('<b>Your Signature</b>:<br> <img src="'.$url.'sig.php?username='.$username.'&type=1"><br>');		echo('<b>For Forums:</b> <input type="textbox" value="[IMG='.$url.'sig.php?username='.$username.'&type=1]"><br>');		echo('<b>Direct Link:</b> <input type="textbox" value="'.$url.'sig.php?username='.$username.'&type=1"><br>');	} else if($sr == "image2") {		echo('<b>Your Signature</b>:<br> <img src="'.$url.'sig.php?username='.$username.'&type=2"><br>');		echo('<b>For Forums:</b> <input type="textbox" value="[IMG='.$url.'sig.php?username='.$username.'&type=2]"><br>');		echo('<b>Direct Link:</b> <input type="textbox" value="'.$url.'sig.php?username='.$username.'&type=2"><br>');	} else {		echo('<b><font color="red">You did not choose an image, so one was selected for you.</font></b><br /><br />');		echo('<b>Your Signature</b>:<br> <img src="'.$url.'sig.php?username='.$username.'&type=1"><br>');		echo('<b>For Forums:</b> <input type="textbox" value="[IMG='.$url.'sig.php?username='.$username.'&type=1]"><br>');		echo('<b>Direct Link:</b> <input type="textbox" value="'.$url.'sig.php?username='.$username.'&type=1"><br>');	}}?>

 

sig.php

<?php/** Runescape Hiscore Lookup* By Marty(K L E O S)* www.epidemicclan.com*/$username = $_GET['username'];$type = $_GET['type'];//$username = strtolower(str_replace(' ', '_', $username));if(!$username) {$username = "K L E O S";}$index = @file_get_contents('http://hiscore.runescape.com/index_lite.ws?player=' . $username);if ($index != "") {	$lulwut = explode("\n", $index);	$overall = explode(",", $lulwut[0]);	$lol['att'] = explode(",", $lulwut[1]);	$lol['def'] = explode(",", $lulwut[2]);	$lol['str'] = explode(",", $lulwut[3]);	$lol['hp'] = explode(",", $lulwut[4]);	$lol['rng'] = explode(",", $lulwut[5]);	$lol['pry'] = explode(",", $lulwut[6]);	$lol['mag'] = explode(",", $lulwut[7]);	$lol['ck'] = explode(",", $lulwut[8]);	$lol['wc'] = explode(",", $lulwut[9]);	$lol['flt'] = explode(",", $lulwut[10]);	$lol['fsh'] = explode(",", $lulwut[11]);	$lol['fm'] = explode(",", $lulwut[12]);	$lol['cra'] = explode(",", $lulwut[13]);	$lol['smi'] = explode(",", $lulwut[14]);	$lol['min'] = explode(",", $lulwut[15]);	$lol['her'] = explode(",", $lulwut[16]);	$lol['ag'] = explode(",", $lulwut[17]);	$lol['th'] = explode(",", $lulwut[18]);	$lol['sl'] = explode(",", $lulwut[19]);	$lol['frm'] = explode(",", $lulwut[20]);	$lol['rc'] = explode(",", $lulwut[21]);	$lol['hun'] = explode(",", $lulwut[22]);	$lol['cs'] = explode(",", $lulwut[23]);	$lol['sum'] = explode(",", $lulwut[24]);	if($type == 1) {		$image_URL = 'image.png';	}	if($type == 2) {		$image_URL = 'image2.png';	} else {		$image_URL = 'image.png';	}	$image = imagecreatefrompng($image_URL);	$fcolour = imagecolorallocate($image, 255, 255, 255);	$fsize = 5; 	$x = array('27', '79', '134', '187', '239');	$y = array('9', '30', '53', '78', '101'); 	$row = '0';	$column = '0';	foreach($lol as $s_key => $value){		$value[1] = str_replace('-1', '1', $value[1]);		imagestring($image, $fsize, $x[$row], $y[$column], $value[1], $fcolour);		$row++;			if($row == '5'){			$row = '0';			$column++;	   }	}	$overall[1] = str_replace('-1', '1', $overall[1]);	imagestring($image, $fsize, '230', '100', 'Overall:' . $overall[1], $fcolour);	$username = str_replace('_', ' ', $username);	imagestring($image, $fsize, '240', '115', '' . $username, $fcolour);	header('Content-type: image/png');	imagepng($image);	imagedestroy($image);} else {	echo("You have entered an invalid username or the username was not found on the hiscores.");}?>

 

2 images:

image.png

 

image2.png

Link to comment
Share on other sites

O yeah, we are working on this as I respond to this. Lets see if Karl sees this

{ Elder of The Last Pures }

11wacsx.jpg

{ Christ lived the life I should, and died the death I deserve. }

 

{ Proud Moderator Of PW }

Moderator.png

Link to comment
Share on other sites

  • 3 months later...
Guest
This topic is now closed to further replies.
×
  • Create New...