• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Exp stages in www : )

Azi

Banned User
Joined
Aug 12, 2007
Messages
1,167
Reaction score
53
Location
Włocławek
it's auto get's exp stages from ots. ; )
add to htdocs with any name in format php like
stages.php

and past this code:
PHP:
<?PHP
$file = "stages.xml"; // stage.xml location
$worlds = array ( "Kenthera Very Fast", "Kenthera Fast", "Kenthera RPG" ); // If server dont have multiworld system - add only 1 server name ; )

$load_file = @simplexml_load_file($file);
	if($load_file){
		if ($load_file->world){
			for($w=0; $w<=count($load_file->world)-1; $w++){
			$stages = $load_file->world[$w]->stage;
			echo "<h2>Stages on ".($worlds[$w]?$worlds[$w]:"Unnamed Server")."</h2>";
				for($i=0; $i<=count($stages)-1; $i++){
					echo $stages[$i]["minlevel"]."".($stages[$i]["maxlevel"]?"-".$stages[$i]["maxlevel"]:"+")." = <b>".$stages[$i]["multiplier"]."x</b><br>";
				}
			echo "<br>";
			}
		}else{
		$stages = $load_file->stage;
		echo "<h2>Stages on ".($worlds[0]?$worlds[0]:"Unnamed Server")."</h2>";
			for($i=0; $i<=count($stages)-1; $i++){
				echo $stages[$i]["minlevel"]."".($stages[$i]["maxlevel"]?"-".$stages[$i]["maxlevel"]:"+")." = <b>".$stages[$i]["multiplier"]."x</b><br>";
			}
		}
	}else{
		echo "Cannot load stages.XML";
	}
?>

RESULT:
Code:
Stages on Kenthera Very Fast
1-8 = 1000x
9-20 = 800x
21-50 = 600x
51-100 = 400x
101+ = 200x

Stages on Kenthera Fast
1-8 = 100x
9-20 = 80x
21-50 = 60x
51-100 = 40x
101+ = 20x

Stages on Kenthera RPG
1-8 = 10x
9-20 = 8x
21-50 = 6x
51-100 = 4x
101+ = 2x

azi. :)
 
Last edited:
#up
writing stage multipler on your www.

like:

Min Level Max Level Exp Stage
1 19 100x
20 39 80x
40 59 50x
60 79 40x
80 99 20x
100 unlimited 10x
 
Sexi?
PHP:
<?php
$stages = new DOMDocument();
$stages->load('C:\ots\data\xml\stages.xml');
foreach($stages->getElementsByTagName('stage') as $stage)
{
    if($stage->getAttribute('maxlevel'))
        echo 'Minimum level: '.$stage->getAttribute('minlevel').' Maximum level: '.$stage->getAttribute('maxlevel').' Multiplier: '.$stage->getAttribute('multiplier').'<br/>';
    else
        echo 'Minimum level: '.$stage->getAttribute('minlevel').' Multiplier: '.$stage->getAttribute('multiplier').'<br/>';
}
?>
 
Last edited:
Sexi?
PHP:
<?php
$stages = new DOMDocument();
$stages->load('C:\ots\data\xml\stages.xml');
foreach($stages->getElementsByTagName('stage') as $stage)
{
    if($stage->getAttribute('maxlevel'))
        echo 'Minimum level: '.$stage->getAttribute('minlevel').' Maximum level: '.$stage->getAttribute('maxlevel').' Multiplier: '.$stage->getAttribute('multiplier').'<br/>';
    else
        echo 'Minimum level: '.$stage->getAttribute('minlevel').' Multiplier: '.$stage->getAttribute('multiplier').'<br/>';
}
?>

Thanks to both of you, now Im fagging with php+xml 8D
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<stages>
	<world id="0">
		<stage minlevel="1" maxlevel="8" multiplier="7"/>
		<stage minlevel="9" maxlevel="20" multiplier="6"/>
		<stage minlevel="21" maxlevel="50" multiplier="5"/>
		<stage minlevel="51" maxlevel="100" multiplier="4"/>
		<stage minlevel="101" multiplier="5"/>
	</world>
</stages>

i use this :eek:

maybe that <world id="0"></world>is that thing or somethin?
 
#up
i'm update now it, working with many worlds in multiworld. ; )
Look first post.
 
Cool! but i did not find it usefull, since you can only check it yourself if you are admin or use the "/serverinfo" if you are player to check your exp rate. And the most hosters/admins add the stages on the serverlist.
But still you did a great job for makeing this, someone can find it usefull Gesior for example to make an function to the "serverinfo section" on his acc maker webpage.
 
How do I add a extra button that when i click it, it would bring me to the exp stages?
 
Back
Top