Dragon-Knight/server/templates/guide/items.php

86 lines
5.0 KiB
PHP
Raw Normal View History

2024-07-02 12:40:18 -05:00
<table>
<thead>
<tr>
<th>Type</th> <th>Name</th> <th>Cost</th> <th>Attribute</th> <th>Special</th>
</tr>
</thead>
</table>
<table width="60%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
<tr><td colspan="5" bgcolor="#ffffff"><center><b>Items</b></center></td></tr>
<tr><td><b>Type</b></td><td><b>Name</b></td><td><b>Cost</b></td><td><b>Attribute</b></td><td><b>Special</b></td></tr>
<?
$count = 1;
$itemsquery = doquery("SELECT * FROM {{table}} ORDER BY id", "items");
while ($itemsrow = mysql_fetch_array($itemsquery)) {
if ($count == 1) { $color = "bgcolor=\"#ffffff\""; $count = 2; } else { $color = ""; $count = 1; }
if ($itemsrow["type"] == 1) { $image = "weapon"; $power = "Attack"; } elseif ($itemsrow["type"] == 2) { $image = "armor"; $power = "Defense"; } else { $image = "shield"; $power = "Defense"; }
if ($itemsrow["special"] != "X") {
$special = explode(",",$itemsrow["special"]);
if ($special[0] == "maxhp") { $attr = "Max HP"; }
elseif ($special[0] == "maxmp") { $attr = "Max MP"; }
elseif ($special[0] == "maxtp") { $attr = "Max TP"; }
elseif ($special[0] == "goldbonus") { $attr = "Gold Bonus (%)"; }
elseif ($special[0] == "expbonus") { $attr = "Experience Bonus (%)"; }
elseif ($special[0] == "strength") { $attr = "Strength"; }
elseif ($special[0] == "dexterity") { $attr = "Dexterity"; }
elseif ($special[0] == "attackpower") { $attr = "Attack Power"; }
elseif ($special[0] == "defensepower") { $attr = "Defense Power"; }
else { $attr = $special[0]; }
if ($special[1] > 0) { $stat = "+" . $special[1]; } else { $stat = $special[1]; }
$bigspecial = "$attr $stat";
} else { $bigspecial = "<span class=\"light\">None</span>"; }
2017-02-05 10:55:54 -06:00
echo "<tr><td $color width=\"5%\"><img src=\"images/icon_$image.gif\" alt=\"$image\"></td><td $color width=\"30%\">".$itemsrow["name"]."</td><td $color width=\"20%\">".$itemsrow["buycost"]." Gold</td><td $color width=\"20%\">".$itemsrow["attribute"]." $power Power</td><td $color width=\"25%\">$bigspecial</td></tr>\n";
}
?>
</table>
<br />
<br />
<table width="60%" style="border: solid 1px black" cellspacing="0" cellpadding="0">
<tr><td colspan="4" bgcolor="#ffffff"><center><b>Drops</b></center></td></tr>
<tr><td><b>Name</b></td><td><b>Monster Level</b></td><td><b>Attribute 1</b></td><td><b>Attribute 2</b></td></tr>
<?
$count = 1;
$itemsquery = doquery("SELECT * FROM {{table}} ORDER BY id", "drops");
while ($itemsrow = mysql_fetch_array($itemsquery)) {
if ($count == 1) { $color = "bgcolor=\"#ffffff\""; $count = 2; } else { $color = ""; $count = 1; }
if ($itemsrow["attribute1"] != "X") {
$special1 = explode(",",$itemsrow["attribute1"]);
if ($special1[0] == "maxhp") { $attr1 = "Max HP"; }
elseif ($special1[0] == "maxmp") { $attr1 = "Max MP"; }
elseif ($special1[0] == "maxtp") { $attr1 = "Max TP"; }
elseif ($special1[0] == "goldbonus") { $attr1 = "Gold Bonus (%)"; }
elseif ($special1[0] == "expbonus") { $attr1 = "Experience Bonus (%)"; }
elseif ($special1[0] == "strength") { $attr1 = "Strength"; }
elseif ($special1[0] == "dexterity") { $attr1 = "Dexterity"; }
elseif ($special1[0] == "attackpower") { $attr1 = "Attack Power"; }
elseif ($special1[0] == "defensepower") { $attr1 = "Defense Power"; }
else { $attr1 = $special1[0]; }
if ($special1[1] > 0) { $stat1 = "+" . $special1[1]; } else { $stat1 = $special1[1]; }
$bigspecial1 = "$attr1 $stat1";
} else { $bigspecial1 = "<span class=\"light\">None</span>"; }
if ($itemsrow["attribute2"] != "X") {
$special2 = explode(",",$itemsrow["attribute2"]);
if ($special2[0] == "maxhp") { $attr2 = "Max HP"; }
elseif ($special2[0] == "maxmp") { $attr2 = "Max MP"; }
elseif ($special2[0] == "maxtp") { $attr2 = "Max TP"; }
elseif ($special2[0] == "goldbonus") { $attr2 = "Gold Bonus (%)"; }
elseif ($special2[0] == "expbonus") { $attr2 = "Experience Bonus (%)"; }
elseif ($special2[0] == "strength") { $attr2 = "Strength"; }
elseif ($special2[0] == "dexterity") { $attr2 = "Dexterity"; }
elseif ($special2[0] == "attackpower") { $attr2 = "Attack Power"; }
elseif ($special2[0] == "defensepower") { $attr2 = "Defense Power"; }
else { $attr2 = $special2[0]; }
if ($special2[1] > 0) { $stat2 = "+" . $special2[1]; } else { $stat2 = $special2[1]; }
$bigspecial2 = "$attr2 $stat2";
} else { $bigspecial2 = "<span class=\"light\">None</span>"; }
echo "<tr><td $color width=\"25%\">".$itemsrow["name"]."</td><td $color width=\"15%\">".$itemsrow["mlevel"]."</td><td $color width=\"30%\">$bigspecial1</td><td $color width=\"30%\">$bigspecial2</td></tr>\n";
}
?>
</table>
<br />
<table class="copyright" width="100%"><tr>
<td width="50%" align="center">Powered by <a href="http://dragon.se7enet.com/dev.php" target="_new">Dragon Knight</a></td><td width="50%" align="center">&copy; 2003-2006 by renderse7en</td>
</tr></table>
</body>
</html>