• 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!

Another script request!

sebas182

New Member
Joined
Aug 10, 2008
Messages
121
Reaction score
1
I need a script for my website that does it:

classy.jpg


Please, i use the last version of TFS and Gesior Acc.
 
index.php:

Code:
	case "vocations";
		$subtopic = "vocations";
		$topic = "Vocations Information";
		include("vocations.php");
	break;

vocations.php:
Code:
<?

$vocations = simplexml_load_file($config['site']['server_path'].'/data/XML/vocations.xml') or die('<b>Could not load vocations!</b>'); 

$out = "<table width='100%' cellspacing='0'>
	<tr>
		<td>Name</td>
		<td>Damage Multipilers</td>
		<td>Health Gain</td>
		<td>Mana Gain</td>
		<td>From Voc. ID</td>
	</tr>";

foreach($vocations->vocation as $voc)
{
	$dmg = $vocations->vocation->formula;
	$out .= "<tr>
			<td>".$voc['name']."</td>
			<td>".$dmg['meleeDamage']." | ".$dmg['distDamage']." | ".$dmg['magDamage']."</td>
			<td>".$voc['gainhp']."</td>
			<td>".$voc['gainmana']."</td>
			<td>".$voc['fromvoc']."</td>
		</tr>";
}

$out .= "</table>";

$main_content .= $out;

?>

Hah! It's my first script based on XML file, and works!

Proud of myself xD
 
Last edited:
HOLY CRAP MAN! IT REALY WORKS!!!

but, may you do the "damage multiplier" become "Tipe" and "1.0 | 1.0 | 1.0" become "distance" or "melee" or "knowledge"???

melee if <skill id="1" multiplier="1.1"/>
distance if <skill id="4" multiplier="1.1"/>
knowledge if manamultiplier="1.1"

edit~
AND IN VOCATION ID, appers the name of vocation and NO the ID! =D

May you do that? xD

amazing script man, REP ++!
 
Back
Top