View Single Post
  #1  
Old 10-28-2010, 12:11 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default CharBrowser 2.1 for Bots

I have added the ability to use CharBrowser for Bots, using PEQ and the built in Bots system. Maudigan asked that I post the changes in the forums because it won't be added to the stock download, but anyone can add these files if access to bots is wanted. (I couldn't get the code to work on his forums within the Code Tags). This was done for a personal server, so permissions may need to be addressed, if for some reason you wouldn't want players to see other's bots.

When viewing a character's profile, there's a new link labeled Bots that takes you to the list of that character's bots. Select the bot's name, and you will be taken to their profile. The buttons on the left still act as if you are viewing the character, as right now, you can't view their skills, etc. The profile button at the top takes you back to the Character's profile.

I think these are the only files I changed. If you have any problems, post here to let me know. Thanks!

** NEW FILES **
/searchbots.php

Code:
<?php
/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   Portions of this program are derived from publicly licensed software
 *   projects including, but not limited to phpBB, Magelo Clone, 
 *   EQEmulator, EQEditor, and Allakhazam Clone.
 *
 *                                  Author:
 *                           Maudigan(Airwalking) & Bad_Captain 
 *
 ***************************************************************************/
 
 
 
 
define('INCHARBROWSER', true);
include_once("include/config.php");
include_once("include/global.php");
include_once("include/language.php");
include_once("include/functions.php");



$start		= (($_GET['start'])		? $_GET['start'] 	: "0");
$orderby	= (($_GET['orderby'])		? $_GET['orderby'] 	: "name");
$direction	= (($_GET['direction']=="DESC")	? "DESC" 		: "ASC");
$char	        = $_GET['char'];
$name	        = $_GET['name'];
$guild	        = $_GET['guild'];

//build baselink
$baselink="searchbots.php?char=$char&guild=$guild";




//security for injection attacks
if (!IsAlphaSpace($char)) message_die($language['MESSAGE_ERROR'],$language['MESSAGE_NAME_ALPHA']);
if (!IsAlphaSpace($name)) message_die($language['MESSAGE_ERROR'],$language['MESSAGE_NAME_ALPHA']);
if (!IsAlphaSpace($guild)) message_die($language['MESSAGE_ERROR'],$language['MESSAGE_GUILD_ALPHA']);
if (!IsAlphaSpace($orderby)) message_die($language['MESSAGE_ERROR'],$language['MESSAGE_ORDER_ALPHA']);
if (!is_numeric($start)) message_die($language['MESSAGE_ERROR'],$language['MESSAGE_START_NUMERIC']);





$select = "SELECT character_.name AS charname, bots.class, bots.botlevel, bots.name, guilds.name AS guildname
           FROM bots
	     LEFT JOIN character_
           ON character_.id = bots.botownercharacterid
           LEFT JOIN guild_members
           ON character_.id = guild_members.char_id
           LEFT JOIN guilds
           ON guilds.id = guild_members.guild_id "; 

$where = "";
$divider = "WHERE ";
if ($char) {
  $where .= $divider."character_.name LIKE '%".str_replace("_", "%", str_replace(" ","%",$char))."%'";
  $divider = "AND ";
}
if ($name) {
  $where .= $divider."bots.name LIKE '%".str_replace("_", "%", str_replace(" ","%",$name))."%'";
  $divider = "AND ";
}
if ($guild) {
  $where .= $divider."guilds.name LIKE '%".str_replace("_", "%", str_replace(" ","%",$guild))."%'";
    $divider = "AND ";
}

$query = $select.$where;
$results = mysql_query($query);
$totalbots = mysql_num_rows($results);
if (!$totalbots) message_die($language['MESSAGE_ERROR'],$language['MESSAGE_NO_RESULTS']);


$query = $select.$where."ORDER BY $orderby $direction LIMIT $start, $numToDisplay;";
$results = mysql_query($query);

//drop page
$d_title = " - ".$language['PAGE_TITLES_SEARCH'];
include("include/header.php");

//build body template
$template->set_filenames(array(
  'body' => 'searchbots_body.tpl')
);

$template->assign_vars(array(  
  'ORDER_LINK' => $baselink."&start=$start&direction=".(($direction=="ASC") ? "DESC":"ASC"), 
  'PAGINATION' => generate_pagination("$baselink&orderby=$orderby&direction=$direction", $totalbots, $numToDisplay, $start, true),
  'L_RESULTS' => $language['SEARCH_RESULTS'],
  'L_NAME' => $language['SEARCH_NAME'],
  'L_LEVEL' => $language['SEARCH_LEVEL'],
  'L_CLASS' => $language['SEARCH_CLASS'],
  'L_DONE' => $language['BUTTON_DONE'],
  'CHARNAME' => $char,)
);

if(mysql_num_rows($results) > 0) { 
  while($row = mysql_fetch_array($results)) { 
    $template->assign_block_vars("characters", array( 
      'CLASS' => $dbclassnames[$row["class"]],	   
      'LEVEL' => $row["botlevel"],
      'NAME' => $row["name"],
      'CHARNAME' => $row["charname"],
      'GUILD_NAME' => (($row["guildname"]) ? "&lt;".$row["guildname"]."&gt;":"") )
    );
  }
}

$template->pparse('body');

//dump footer
include("include/footer.php");

?>


/bots.php

Code:
<?php
/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   Portions of this program are derived from publicly licensed software
 *   projects including, but not limited to phpBB, Magelo Clone, 
 *   EQEmulator, EQEditor, and Allakhazam Clone.
 *
 *                                  Author:
 *                           Maudigan(Airwalking) & Bad_Captain 
 *
 ***************************************************************************/
 
 
 
 
define('INCHARBROWSER', true);
include_once("include/config.php");
include_once("include/global.php");
include_once("include/language.php");
include_once("include/functions.php");
include_once("include/profile.php");
include_once("include/botprofile.php");
include_once("include/itemclass.php");
include_once("include/statsclass.php");
include_once("include/calculatestats.php");

																							
//if character name isnt provided post error message and exit
if(!$_GET['bot']) message_die($language['MESSAGE_ERROR'],$language['MESSAGE_NO_BOT']);
else $bot = $_GET['bot'];

if(!$_GET['char']) message_die($language['MESSAGE_ERROR'],$language['MESSAGE_NO_CHAR']);
else $char = $_GET['char'];
    

//security against sql injection  
if (!IsAlphaSpace($bot)) message_die($language['MESSAGE_ERROR'],$language['MESSAGE_NAME_ALPHA']);
if (!IsAlphaSpace($char)) message_die($language['MESSAGE_ERROR'],$language['MESSAGE_NAME_ALPHA']);

// pull the characters ID and profile from the database
$results = mysql_query("SELECT botid from bots where name='$bot' limit 1;");
if (!($row = mysql_fetch_array($results))) message_die($language['MESSAGE_ERROR'],$language['MESSAGE_NO_FIND']);    
$botID = $row['botid'];
$charID = $row['botownercharacterid'];
$bot = new botprofile;
$bot->LoadBotProfile($botID);

// pull the characters ID and profile from the database
$charprof = new profile;
$charprof->LoadProfile($charID);
$mypermission = GetPermissions($charprof->GetValue('gm'), $charprof->GetValue('anon'));

//block view if user level doesnt have permission
if ($mypermission['inventory']) message_die($language['MESSAGE_ERROR'],$language['MESSAGE_ITEM_NO_VIEW']);


//load profile information for the character
$name 		= $bot->name();
$last_name 	= $bot->last_name();
$ownername 	= $char;
$level 		= $bot->level();
$baseSTR 	= $bot->baseSTR();
$baseSTA 	= $bot->baseSTA();
$baseAGI 	= $bot->baseAGI();
$baseDEX 	= $bot->baseDEX();
$baseWIS 	= $bot->baseWIS();
$baseINT 	= $bot->baseINT();
$baseCHA 	= $bot->baseCHA();
$defense 	= $bot->defense();
$offense 	= $bot->offense();
$race 		= $bot->race();
$botclass		= $bot->botclass();
$guild_id 	= $bot->guildid();

//load guild name
if ($guild_id) {
      $results = mysql_query("SELECT name from guilds where id = ".$guild_id." LIMIT 1");
      $row = mysql_fetch_array($results);
      $guild_name = "&lt;".$row['name']."&gt;";
}

//place where all the items stats are added up
$itemstats = new stats();

//holds all of the items and info about them
$allitems = array();

// pull characters inventory slotid is loaded as
// "myslot" since items table also has a slotid field.
$results = mysql_query("SELECT items.*, botinventory.augslot1, botinventory.augslot2, botinventory.augslot3, botinventory.augslot4, botinventory.augslot5, botinventory.slotid AS myslot from items, botinventory where botinventory.botid = '$botID' AND  items.id = botinventory.itemid;");
// loop through inventory results saving Name, Icon, and preload HTML for each
// item to be pasted into its respective div later
while ($row = mysql_fetch_array($results)) {
  $tempitem = new item($row);
  for ($i = 1; $i <= 5; $i++) {
    if ($row["augslot".$i]) {
      $augresults = mysql_query("SELECT * from items where id = ".$row["augslot".$i]." LIMIT 1");
      $augrow = mysql_fetch_array($augresults);
      $tempitem->addaug($augrow);
      $itemstats->additem($augrow);
    }
  }

  if ($tempitem->type() == EQUIPMENT)
    $itemstats->additem($row);
  
  if ($tempitem->type() == EQUIPMENT || $tempitem->type() == INVENTORY)
    $itemstats->addWT($row['weight']);
  
  $allitems[$tempitem->slot()] = $tempitem;
}



//drop page
$d_title = " - ".$name.$language['PAGE_TITLES_BOT'];
include("include/header.php");


//build body template
$template->set_filenames(array(
  'bot' => 'bot_body.tpl')
);

$template->assign_vars(array(  
  'HIGHLIGHT_GM' => (($highlightgm && $gm)? "GM":""),
  'REGEN' => $itemstats->regen(),
  'FT' => $itemstats->FT(),
  'DS' => $itemstats->DS(),
  'HASTE' => $itemstats->haste(),
  'FIRST_NAME' => $ownername,
  'BOTNAME' => $name,
  'LAST_NAME' => $last_name,
  'GUILD_NAME' => $guild_name,
  'LEVEL' => $level,
  'CLASS' => $dbclassnames[$botclass],
  'CLASS_NUM' => $botclass,
  'HP' => GetMaxHP($level,$botclass,($baseSTA+$itemstats->STA()),$itemstats->hp()),
  'MANA' => GetMaxMana($level,$botclass,($baseINT+$itemstats->INT()),($baseWIS+$itemstats->WIS()),+$itemstats->mana()),
  'ENDR' => GetMaxEndurance(($baseSTR+$itemstats->STR()),($baseSTA+$itemstats->STA()),($baseDEX+$itemstats->DEX()),($baseAGI+$itemstats->AGI()),$level,$itemstats->endurance()),
  'AC' => GetMaxAC(($baseAGI+$itemstats->AGI()), $level, $defense, $botclass, $itemstats->AC(), $race),
  'ATK' => GetMaxAtk($itemstats->attack(), ($baseSTR+$itemstats->STR()), $offense),
  'STR' => ($baseSTR+$itemstats->STR()),
  'STA' => ($baseSTA+$itemstats->STA()),
  'DEX' => ($baseDEX+$itemstats->DEX()),
  'AGI' => ($baseAGI+$itemstats->AGI()),
  'INT' => ($baseINT+$itemstats->INT()),
  'WIS' => ($baseWIS+$itemstats->WIS()),
  'CHA' => ($baseCHA+$itemstats->CHA()),
  'POISON' => (PRbyRace($race)+$PRbyClass[$botclass]+$itemstats->PR()),
  'FIRE' => (FRbyRace($race)+$FRbyClass[$botclass]+$itemstats->FR()),
  'MAGIC' => (MRbyRace($race)+$MRbyClass[$botclass]+$itemstats->MR()),
  'DISEASE' => (DRbyRace($race)+$DRbyClass[$botclass]+$itemstats->DR()),
  'COLD' => (CRbyRace($race)+$CRbyClass[$botclass]+$itemstats->CR()),
  'WEIGHT' => round($itemstats->WT()/10),

  
 
  'L_HEADER_INVENTORY' => $language['CHAR_INVENTORY'],
  'L_REGEN' => $language['CHAR_REGEN'],
  'L_FT' => $language['CHAR_FT'],
  'L_DS' => $language['CHAR_DS'],
  'L_HASTE' => $language['CHAR_HASTE'],
  'L_HP' => $language['CHAR_HP'],
  'L_MANA' => $language['CHAR_MANA'],
  'L_ENDR' => $language['CHAR_ENDR'],
  'L_AC' => $language['CHAR_AC'],
  'L_ATK' => $language['CHAR_ATK'],
  'L_STR' => $language['CHAR_STR'],
  'L_STA' => $language['CHAR_STA'],
  'L_DEX' => $language['CHAR_DEX'],
  'L_AGI' => $language['CHAR_AGI'],
  'L_INT' => $language['CHAR_INT'],
  'L_WIS' => $language['CHAR_WIS'],
  'L_CHA' => $language['CHAR_CHA'],
  'L_POISON' => $language['CHAR_POISON'],
  'L_MAGIC' => $language['CHAR_MAGIC'],
  'L_DISEASE' => $language['CHAR_DISEASE'],
  'L_FIRE' => $language['CHAR_FIRE'],
  'L_COLD' => $language['CHAR_COLD'],
  'L_WEIGHT' => $language['CHAR_WEIGHT'],
  'L_AAS' => $language['BUTTON_AAS'],
  'L_FLAGS' => $language['BUTTON_FLAGS'],
  'L_SKILLS' => $language['BUTTON_SKILLS'],
  'L_CORPSE' => $language['BUTTON_CORPSE'],
  'L_INVENTORY' => $language['BUTTON_INVENTORY'],
  'L_FACTION' => $language['BUTTON_FACTION'],
  'L_BOOKMARK' => $language['BUTTON_BOOKMARK'],
  'L_CHARMOVE' => $language['BUTTON_CHARMOVE'],
  'L_BOTS' => $language['BUTTON_BOTS'],
  'L_CONTAINER' => $language['CHAR_CONTAINER'],
  'L_DONE' => $language['BUTTON_DONE'])
);



//dump inventory items ICONS
foreach ($allitems as $value) {
  if ($value->type() == INVENTORY && $mypermission['bags']) continue; 
  if ($value->type() == EQUIPMENT || $value->type() == INVENTORY)
    $template->assign_block_vars("invitem", array( 
      'SLOT' => $value->slot(),	   
      'ICON' => $value->icon(),
      'ISBAG' => (($value->slotcount() > 0) ? "true":"false"))
    );
}


//dump items WINDWOS
foreach ($allitems as $value) {
  if ($value->type() == INVENTORY && $mypermission['bags']) continue; 
  if ($value->type() == BANK && $mypermission['bank']) continue;
    $template->assign_block_vars("item", array(
      'SLOT' => $value->slot(),	   
      'NAME' => $value->name(),
      'ID' => $value->id(),
      'HTML' => $value->html())
    );
    for ( $i = 0 ; $i < $value->augcount() ; $i++ ) {
      $template->assign_block_vars("item.augment", array( 	   
        'AUG_NAME' => $value->augname($i),
        'AUG_ID' => $value->augid($i),
        'AUG_HTML' => $value->aughtml($i))
      );
    }
}




$template->pparse('bot');

$template->destroy;



include("include/footer.php");


?>


/include/botprofile.php

Code:
<?php
/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   Portions of this program are derived from publicly licensed software
 *   projects including, but not limited to phpBB, Magelo Clone, 
 *   EQEmulator, EQEditor, and Allakhazam Clone.
 *
 *                                  Author:
 *                           Maudigan(Airwalking) & Bad_Captain 
 *
 ***************************************************************************/
 
 
 
 
 if ( !defined('INCHARBROWSER') )
{
	die("Hacking attempt");
}


// Edit the 'Profile' of the bot
class botprofile {

	// Variables
	var $account_id;
	var $char_id;
	var $bot_id;
	var $name;
	var $last_name;
	var $ownername;
	var $level;
	var $baseSTR;
	var $baseSTA;
	var $baseAGI;
	var $baseDEX;
	var $baseWIS;
	var $baseINT;
	var $baseCHA;
	var $race;
	var $botclass;
	var $offense;
	var $defense;
	var $guild_id;
	
	
	// Return Account ID
	function accountid(){
		return $this->account_id;
	}
	
	// Return char ID
	function charid(){
		return $this->char_id;
	}

	// Return bot ID
	function botid(){
		return $this->bot_id;
	}

	// Return name
	function name(){
		return $this->name;
	}

	// Return lastname
	function last_name(){
		return $this->last_name;
	}

	// Return ownername
	function ownername(){
		return $this->ownername;
	}


	// Return level
	function level(){
		return $this->level;
	}

	// Return baseSTR
	function baseSTR(){
		return $this->baseSTR;
	}

	// Return baseSTA
	function baseSTA(){
		return $this->baseSTA;
	}

	// Return baseAGI
	function baseAGI(){
		return $this->baseAGI;
	}

	// Return baseDEX
	function baseDEX(){
		return $this->baseDEX;
	}

	// Return baseWIS
	function baseWIS(){
		return $this->baseWIS;
	}

	// Return baseINT
	function baseINT(){
		return $this->baseINT;
	}

	// Return baseCHA
	function baseCHA(){
		return $this->baseCHA;
	}

	// Return race
	function race(){
		return $this->race;
	}

	// Return class
	function botclass(){
		return $this->botclass;
	}

	// Return offense
	function offense(){
		return $this->offense;
	}

	// Return defense
	function defense(){
		return $this->defense;
	}


	// Return guild_id
	function guildid(){
		return $this->guild_id;
	}

	
	// Load Profile
	function LoadBotProfile($id){

  	  $Query = sprintf("SELECT bots.*, botguildmembers.guild_id, character_.name FROM `bots` LEFT JOIN `character_` ON bots.botownercharacterid = character_.id LEFT JOIN `botguildmembers` ON bots.botid = botguildmembers.char_id WHERE bots.botid = '%d'", mysql_real_escape_string($id));
	  $QueryResult = mysql_query($Query) or message_die('botprofile.php',$Query,mysql_error());
	  if(mysql_num_rows($QueryResult) != 0){ 
	    $row = mysql_fetch_array($QueryResult);
	    $this->account_id = $row['account_id'];
	    $this->char_id = $row['BotOwnerCharacterID'];
	    $this->bot_id = $id;
	    $this->name = $row['Name'];
	    $this->last_name = $row['LastName'];
	    $this->ownername = $row['first_name'];
	    $this->level = $row['BotLevel'];
	    $this->baseSTR = $row['STR'];
	    $this->baseSTA = $row['STA'];
	    $this->baseAGI = $row['AGI'];
	    $this->baseDEX = $row['DEX'];
	    $this->baseWIS = $row['WIS'];
	    $this->baseINT = $row['_INT'];
	    $this->baseCHA = $row['CHA'];
	    $this->race = $row['Race'];
	    $this->botclass = $row['Class'];
	    $this->offense = $row['ATK'];
	    $this->defense = $row['AC'];
	    $this->guild_id = $row['guild_id'];

	  }

	}
	

}


?>


/templates/searchbots_body.tpl

Code:
<center>
  <div class='FlagOuter'>
    <div class='FlagTitle'>
      <div class='FlagTitleLeft'></div>
      <div class='FlagTitleMid'>{L_RESULTS}</div>
      <div class='FlagTitleRight'></div>
    </div>
    <div class='FlagInner'>
      <table class='StatTable' style='width:90%;'>
          <tr>
            <td width='25%' class='ColumnHead'><a href="{ORDER_LINK}&orderby=name" style='color:#8aa3ff ;'>{L_NAME}</a></td>	      
            <td width='25%' class='ColumnHead'><a href="{ORDER_LINK}&orderby=guildname" style='color:#8aa3ff ;'>{L_GUILD}</a></td>	      
            <td width='25%' class='ColumnHead'><a href="{ORDER_LINK}&orderby=level" style='color:#8aa3ff ;'>{L_LEVEL}</a></td>
            <td width='25%' class='ColumnHead'><a href="{ORDER_LINK}&orderby=class" style='color:#8aa3ff ;'>{L_CLASS}</a></td>
          </tr>
        <!-- BEGIN characters -->
          <tr>
            <td><a href="bot.php?char={characters.CHARNAME}&bot={characters.NAME}">{characters.NAME}</a></td>
            <td>{characters.GUILD_NAME}</td>	      
            <td>{characters.LEVEL}</td>
            <td>{characters.CLASS}</td>
          </tr>
        <!-- END characters -->
      </table>
      <br>
      {PAGINATION}
	<br>
	<table>
		<tr><td align='center'><div class='FreeButton' onclick="window.location='character.php?char={CHARNAME}';">{L_DONE}</div></td></tr>
	</table>
    </div>
  </div>
</center>


/templates/bot_body.tpl

Code:
<script type="text/javascript">

function display(type, id, prefix) {
  if (target = document.getElementById(prefix + id))
    if (type) target.style.display = (target.style.display == 'none') ? 'block' : 'none';
  else {
    for(var i=0; i < 2190; i++) if (hideme = document.getElementById(prefix + i)) hideme.style.display = 'none';	    
    target.style.display = 'block';
  }
}
</script>
<div class='NavOuter'>
<div class='NavInner'>
  <div class='FreeButton' onclick="window.location='character.php?char={FIRST_NAME}';" style="margin:3px">{L_INVENTORY}</div>
  <div class='FreeButton' onclick="window.location='aas.php?char={FIRST_NAME}';" style="margin:3px">{L_AAS}</div>
  <div class='FreeButton' onclick="window.location='flags.php?char={FIRST_NAME}';" style="margin:3px">{L_FLAGS}</div>
  <div class='FreeButton' onclick="window.location='skills.php?char={FIRST_NAME}';" style="margin:3px">{L_SKILLS}</div>
  <div class='FreeButton' onclick="window.location='corpse.php?char={FIRST_NAME}';" style="margin:3px">{L_CORPSE}</div>
  <div class='FreeButton' onclick="window.location='factions.php?char={FIRST_NAME}';" style="margin:3px">{L_FACTION}</div>
  <div class='FreeButton' onclick="window.location='charmove.php?char={FIRST_NAME}';" style="margin:3px">{L_CHARMOVE}</div>
  <div class='FreeButton' onclick="window.location='searchbots.php?char={FIRST_NAME}';" style="margin:3px">{L_BOTS}</div>
  <div class='FreeButton' onclick="window.external.AddFavorite(location.href, document.title);" style="margin:3px">{L_BOOKMARK}</div>
</div>
</div>
<center>
<table>
  <tr>
    <td width='200px' align='right'>
      &nbsp;
    </td>
    <td width='460px' align='center'>
      <div class='IventoryOuter{HIGHLIGHT_GM}'> 
	<div class='IventoryTitle'> 
	  <div class='IventoryTitleLeft'></div>
	  <div class='IventoryTitleMid'>{L_HEADER_INVENTORY}</div>
	  <div class='IventoryTitleRight'></div>
	</div>
	<div class='InventoryInner'>
	
	  <div class='InventoryStats2'>
	    <table class='StatTable'>
	      <tr>
                <td nowrap>
                  {L_REGEN}<br>{L_FT}<br>{L_DS}<br>{L_HASTE}
                </td>
                <td>
                  {REGEN}<br>{FT}<br>{DS}<br>{HASTE}%
                </td>
              </tr>
	    </table>
	  </div>

	  <div class='InventoryStats'>
	    <table class='StatTable'>
              <tr><td colspan='2'>{BOTNAME}</td></tr>
              <tr><td colspan='2' style='height: 3px'></td></tr>
              <tr><td colspan='2'>{LEVEL} {CLASS}<br>{DEITY}</td></tr>
              <tr><td colspan='2' style='height: 3px'></td></tr>
              <tr>
                <td>{L_HP}<br>{L_MANA}<br>{L_ENDR}<br>{L_AC}<br>{L_ATK}</td>
                <td width='100%'>{HP}<br>{MANA}<br>{ENDR}<br>{AC}<br>{ATK}</td>
              </tr>
	      <tr><td class='Divider' colspan='2'></td></tr>
	      <tr>
	        <td>{L_STR}<br>{L_STA}<br>{L_AGI}<br>{L_DEX}</td>
		<td width='100%'>{STR}<br>{STA}<br>{AGI}<br>{DEX}</td>
	      </tr>
	      <tr><td class='Divider' colspan='2'></td></tr>
	      <tr>
		<td>{L_WIS}<br>{L_INT}<br>{L_CHA}</td>
		<td width='100%'>{WIS}<br>{INT}<br>{CHA}</td>
	      </tr>
	      <tr><td class='Divider' colspan='2'></td></tr>
	      <tr>
		<td>{L_POISON}<br>{L_MAGIC}<br>{L_DISEASE}<br>{L_FIRE}<br>{L_COLD}</td>
		<td>{POISON}<br>{MAGIC}<br>{DISEASE}<br>{FIRE}<br>{COLD}</td>
	      </tr>
	      <tr><td class='Divider' colspan='2'></td></tr>
	      <tr>
		<td>{L_WEIGHT}</td>
		<td nowrap>{WEIGHT} / {STR}</td>
	      </tr>
	    </table>
	  </div>

	  <div class='InventoryMonogram'><img src='images/monograms/{CLASS_NUM}.gif'></div>

	  <div class="Slot slotloc0 slotimage0"></div>
	  <div class="Slot slotloc1 slotimage1"></div>
	  <div class='Slot slotloc2 slotimage2'></div>
	  <div class='Slot slotloc3 slotimage3'></div>
	  <div class='Slot slotloc4 slotimage4'></div>
	  <div class='Slot slotloc5 slotimage5'></div>
	  <div class='Slot slotloc6 slotimage6'></div>
	  <div class='Slot slotloc7 slotimage7'></div>
	  <div class='Slot slotloc8 slotimage8'></div>
	  <div class='Slot slotloc9 slotimage9'></div>
	  <div class='Slot slotloc10 slotimage10'></div>
	  <div class='Slot slotloc11 slotimage11'></div>
	  <div class='Slot slotloc12 slotimage12'></div>
	  <div class='Slot slotloc13 slotimage13'></div>
	  <div class='Slot slotloc14 slotimage14'></div>
	  <div class='Slot slotloc15 slotimage15'></div>
	  <div class='Slot slotloc16 slotimage16'></div>
	  <div class='Slot slotloc17 slotimage17'></div>
	  <div class='Slot slotloc18 slotimage18'></div>
	  <div class='Slot slotloc19 slotimage19'></div>
	  <div class='Slot slotloc20 slotimage20'></div>
	  <div class='Slot slotloc21 slotimage21'></div> 


          <!-- BEGIN invitem -->
	  <div onclick="display(0, {invitem.SLOT}, 'slot');if ({invitem.ISBAG}) display(0, {invitem.SLOT}, 'bag');" class='Slot slotloc{invitem.SLOT}' style='background-image: url(images/items/item_{invitem.ICON}.gif);'></div>
          <!-- END invitem -->
        </div>
      </div>
    </td>
    <td width='200px' align='left'>
	&nbsp;
    </td>
  </tr>
  <tr>
    <td colspan='3' align='center'>
      <br>
      <br>
      <br>
      <!-- BEGIN item -->
      <div class='ItemOuter' id='slot{item.SLOT}' style='display:none;'>
	<div class='ItemTitle'>
	  <div class='ItemTitleLeft'></div>
	  <div class='ItemTitleMid'><a href='http://mqemulator.net/item.php?id={item.ID}'>{item.NAME}</a></div>
	  <div class='ItemTitleRight'></div>
	</div>
	<div class='ItemInner' style='text-align:left;'>	
          {item.HTML}
          <!-- BEGIN augment -->
          <center>
            <br>
            <table class='AugTable'>
              <tr>
                <td align='center'>
                  <a href='http://mqemulator.net/item.php?id={item.augment.AUG_ID}'>{item.augment.AUG_NAME}</a>
                </td>
              </tr>
              <tr>
                <td align='left'>
                  {item.augment.AUG_HTML}
                </td>
              </tr>
            </table>
          </center>
          <!-- END augment -->
	</div>
      </div>
      <!-- END item -->
    </td>
  </tr>
</table>
</center>



There are also a couple of other changes that need to be made to some of the other files, mostly for the links to the bots page.

** EDITED FILES **

/include/language.php
Code:
$language['BUTTON_BOTS'] = "Bots";
/templates/character_body.php
/templates/aas_body.php
/templates/corpse_body.php
/templates/factions_basic_body.php
/templates/factions_advanced_body.php
/templates/flags_body.php
/templates/skills_body.php
Code:
<div class='FreeButton' onclick="window.location='searchbots.php?char={NAME}';" style="margin:3px">{L_BOTS}</div>
(I put this button just above 'add favorites')

/character.php
/aas.php
/corpse.php
/factions.php
/flags.php
/skills.php
Code:
'L_BOTS' => $language['BUTTON_BOTS']
(within $template->assign_vars(array( )))
Reply With Quote