Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Tools

Development::Tools 3rd Party Tools for EQEMu (DB management tools, front ends, etc...)

Reply
 
Thread Tools Display Modes
  #1  
Old 11-18-2011, 04:17 PM
Dimorge02
Fire Beetle
 
Join Date: Sep 2004
Posts: 29
Default EqAllahkazzams Corrections

I thought I'd share a fix for the eqbrowser source.

When I installed the eqallahkazzams clone the spell and spells list did not work properly. Below are the fixes for the spell search functionality.


Change include/function.php
Line:
print " <li><a href='".$OpenObjectByIdPage."?id=".$row["id"]."'>".$row["name"]." (".$row["id"].")</a></li>\n";

To:
print " <li><a href='".$OpenObjectByIdPage."?id=".$row[$IdAttribute]."'>".$row[$NameAttribute]." (".$row[$IdAttribute].")</a></li>\n";

Change spell.php
Add : $id = $_GET["id"];
After: include($includes_dir.'mysql.php');


Replace spells.php code with:
<?php
/** Comment TODO Spells Remake **/

include('./includes/constantes.php');
include('./includes/config.php');
include($includes_dir.'mysql.php');
include($includes_dir.'functions.php');

$isearch = (isset($_GET[ 'isearch']) ? $_GET[ 'isearch'] : '');
$iname = (isset($_GET[ 'iname']) ? $_GET[ 'iname'] : '');
$iclass = (isset($_GET[ 'iclass']) ? $_GET[ 'iclass'] : 0);
$iminlevel = (isset($_GET[ 'iminlevel']) ? $_GET[ 'iminlevel'] : 0);
$imaxlevel = (isset($_GET[ 'imaxlevel']) ? $_GET[ 'imaxlevel'] : 0);
$ieffect = (isset($_GET[ 'ieffect']) ? $_GET[ 'ieffect'] : '');
$icvs = (isset($_GET[ 'icvs']) ? $_GET[ 'icvs'] : '');

if ($imin>$imax) { $n=$imin; $imin=$imax; $imax=$n; }
if ($ieffect != "") { $ieffect=-1; }

if($isearch != "" || $icvs != "")
{
if ($imin==0) { $imin=1; }
if ($imax==0) { $imax=80; }

if ($icsv != "") { print "<table border=0 width=100%><tr valign=top><td width=100%>"; }

$query = "SELECT $tbspells.spellid,$tbspells.name";
$query .= " FROM $tbspells";
$query .= " WHERE 1=1";

if ($iname!="") {
$iname=str_replace(' ','%',$iname);
$query.=" AND name like '%".str_replace(" ","%",$iname)."%'";
}
if ($iclass>0) { $query.=" AND level$iclass>=$imin AND level$iclass<=$imax ORDER BY level$iclass ASC,name ASC"; }
else { $query.=" ORDER BY name"; }

if ($ieffect>=0) {
$query.=" AND (";
$s="";
for ($i=1; $i<=12; $i++) { $query.=" $s buff$i=$ieffect"; $s="OR"; }
$query.=" )";
}


$QueryResult = mysql_query($query) or message_die('spells.php','MYSQL_QUERY',$query,mysq l_error());
if(mysql_num_rows($QueryResult) == 1)
{ $row = mysql_fetch_array($QueryResult);
header("Location: spell.php?id=".$row["spellid"]);
exit();
}
}
else
$iname = "";

$Title="Items List";
$XhtmlCompliant = TRUE;
include($includes_dir.'headers.php');

print "<center><table border=0 width=0%>";
print "<form method='GET' action='".$PHP_SELF."'>";
print "<tr><td nowrap><b>Name : </b></td><td><input type=text value=\"$iname\" size=30 name=iname class=form></td></tr>";
print "<tr><td nowrap><b>Class : </b></td><td>";
print SelectClass("iclass",$iclass);
print "</td></tr>";
print "<tr><td nowrap><b>Min Level : </b></td><td>";
print SelectLevel("imin",80,$imin);
print "</td></tr><tr><td nowrap><b>Max Level : </b></td><td>";
print SelectLevel("imax",80,$imax);
print "</td></tr>";
print "</td></tr><tr><td nowrap><b>Spell Effect : </b></td><td>";
print SelectSpellEffect("ieffect",$ieffect);
print "</td></tr>";
print "<tr align=center><td nowrap colspan=2><input type='submit' value='Search' name='isearch' class='form'>";
print "&nbsp;<input type='submit' value='CSV' name='icsv' class='form'>";
print "&nbsp;<input type='reset' value='Reset' class='form'>";
print "</td></tr>";
print "</form></table></center>";

if(isset($QueryResult))
PrintQueryResults($QueryResult, $MaxItemsReturned, "spell.php", "spell", "spells", "spellid", "name");

if ($icsv != "") {
print "</td><td><iframe src=spellscsv.php?iclass=$iclass&iname=$iname&ieff ect=$ieffect&imin=$imin&imax=$imax
width=0
border=0 frameborder=0
height=0>
</iframe></td></tr></table>";
}
include($includes_dir."footers.php");
?>
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:28 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3