Before you start adding this to your page I must warn you! This isn't a Perfect script!
This script is based of Znote Automatic Donation script.
Anyways, if you want an example before adding this script visit: Panchira - The World of Epics
How to install:
Create a new file in views page folder in modern AAC.
Call it: spells.php
Add this code:
Edit the DIR path to your server path, Example:
Then you should be finnished!
Once again, see the example site before using this code, coz this isn't 100% perfect.
(Php isn't my thing! )
You may modify it how every you want it!
This script is based of Znote Automatic Donation script.
Anyways, if you want an example before adding this script visit: Panchira - The World of Epics
How to install:
Create a new file in views page folder in modern AAC.
Call it: spells.php
Add this code:
PHP:
<style type="text/css">
td {
color: white;
height: 20px;
color: #666;
}
</style>
<?php
if(!defined('BASEPATH')) exit('No direct script access allowed');
$DIR = '*:/*/*/data/spells/';
if(is_dir($DIR)) {
$spells = simplexml_load_file($DIR.'spells.xml');
$table_color_1 = 'black';
$table_color_2 = '#080808';
?>
<h2>Spells </h2>
<table style= border="0px" cellspacing="0px" cellpadding="4px" width="100%">
<tr bgcolor="#101010 ">
<th style="color: #FF4500">Spell Name</th>
<th style="color: #FF4500">Words</th>
<th style="color: #FF4500">Mana Cost</th>
<th style="color: #FF4500">Level Required</th>
</tr>
<?php
$i = 1;
foreach($spells as $spell) {
$color = ($i % 2 ? $table_color_1 : $table_color_2);
$i++;
echo '
<tr bgcolor="'.$color.'" id="spell_list">
<td style="font-size: 10pt;">'.$spell['name'].'</td>
<td style="font-size: 10pt;">'.$spell['words'].'</td>
<td style="font-size: 10pt;">'.$spell['mana'].'</td>
<td style="font-size: 10pt;">'.$spell['lvl'].'</td>
</tr>';
}
}
else{alert('Error loading spells. Directory address must be correct.');}
?>
</table>
Edit the DIR path to your server path, Example:
Code:
$DIR = 'C:/coke/tibia/otserv/data/spells/';
Then you should be finnished!
Once again, see the example site before using this code, coz this isn't 100% perfect.
(Php isn't my thing! )
You may modify it how every you want it!