EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Tools (https://www.eqemulator.org/forums/forumdisplay.php?f=593)
-   -   PEQ Database Editor 1.0 (for servers 0.6.4 and up) (https://www.eqemulator.org/forums/showthread.php?t=20073)

cavedude 12-29-2012 12:02 PM

If they are, it's because I forgot to remove them. KLS changed factions to get rid of those stupid columns and make the table dynamic. So, that particular table isn't used anymore.

joligario 12-29-2012 12:04 PM

No, I was mistaken. You're good.

EDIT: I'll work on the change.

blindaviator 12-29-2012 04:26 PM

Thx you two. Glad to know it wasn't something I did this time.

joligario 12-29-2012 11:06 PM

Newest files in SVN should be functional with faction changes.

cavedude 12-30-2012 12:25 AM

Quote:

Originally Posted by joligario (Post 215736)
Newest files in SVN should be functional with faction changes.

Thanks a lot for getting that in! The only change I made was the race/class/deity name will now display under faction mods. We'll have to come up with a decent solution for editing/adding mods.

blindaviator 12-30-2012 02:35 AM

Nix this question... I found it finally... Sorry to be a bother...

joligario 12-30-2012 09:08 AM

Quote:

Originally Posted by cavedude (Post 215744)
Thanks a lot for getting that in! The only change I made was the race/class/deity name will now display under faction mods. We'll have to come up with a decent solution for editing/adding mods.

Too easy. When I get a chance I will work in selectors.

blindaviator 01-01-2013 04:20 PM

Hehe another one found.

Code:

Fatal error: Call to undefined function update_faction_values() in C:\xampp\htdocs\eqemu_editor\lib\faction.php on line 80

joligario 01-01-2013 04:43 PM

What were you doing so I can troubleshoot? I may have missed other npc faction functions...

EDIT: Ah, I see it. Working on it now.

victurus 01-04-2013 02:36 PM

I am still receiving these errors when attempting to run the index.php.

http://www.victurus.com/images/phperror.jpg

I have changed the error_reporting, restarted services, restarted comp.
This solution does not seem to be working.

If i ignore all those errors and go to the login box and type in admin/password, it gives me another page with about 40 errors.

Any help would be appreciated.

joligario 01-04-2013 02:41 PM

Based on the above, I assume you must not have changed the error_reporting correctly (or possibly even the right file). Did you get the proper php.ini file and uncomment (remove ';')? I recommend: error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

victurus 01-04-2013 03:27 PM

Sweet, I am using wamp.. and those tricky bastages put 3 different .ini files with the same stuff in each. Then they hid the correct one! lol, thanks for the assistance.

victurus 01-04-2013 05:35 PM

OK, so now that it is letting me login, once I login to it, it just sits at this page and does nothing.
http://www.victurus.com/images/phpeditor.jpg

And I am receiving no error logs on any of my services.

joligario 01-04-2013 08:05 PM

Set your short open tags to "on" in php.ini

victurus 01-04-2013 08:38 PM

Awesome, thanks for the help man!

Gregk 01-09-2013 09:51 PM

Up and working. Thank you to everyone.

Kingmen30264 02-05-2013 09:05 AM

I am interested in using this, but every time I go to load index.php in Firefox, Chrome, or whichever browser, it asks me if I want to download the file that I am opening.

Any help? I followed the instructions on the README.txt file.

Thanks,
Kingmen

wolfwalkereci 02-05-2013 02:51 PM

You install php and apache or wamp or some other web server?

Kingmen30264 02-05-2013 04:51 PM

Quote:

Originally Posted by wolfwalkereci (Post 217724)
You install php and apache or wamp or some other web server?

I followed the instructions and installed Apache (httpd-2.0.64-win32-x86-openssl.0.9.8.o.msi ) and PHP ( php-5.3.21-nts-Win32-VC9-x86.msi ).

It told me to edit my php.ini file to allow short_open_tag = on, and I did that... I sourced the install directory and then made that change to it.

On Apache it tells me to install the Apache HTTP server, and I did that. I have a little icon running (on startup) that I can load at anytime.

It told me to "Source schema.sql (in the ditor's /sql directory) into your database." I took this as "Run the sql query so it shows in your database", and so that is what I did. The result of this was a table called "peq_admin" which shows the columns (id, login, password, administrator).

Next it tells me to unzip the files in peq_editor into a public html directory... For this I just have them unzipped in a folder on my desktop. I did not really understand what it meant by "public html directory".

Then it tells me to rename config.php.dist as config.php and then edit it based on my needs, so I put in my DB name, username, and password, along with the IP address for it (local machine address [same network]). (There was already a file called config.php in the zipped file that I got, along with another one called config.php.dist.)

I have done everything that it has asked, and I am thinking the issue lies with the "public html directory". Once I have an understanding of that, then all should be working the way it was intended.

Thanks,
Kingmen

joligario 02-05-2013 05:06 PM

Quote:

Originally Posted by Kingmen30264 (Post 217731)
... I am thinking the issue lies with the "public html directory"...

That is correct. When you install apache, there should have been a folder created called "htdocs" somewhere in your folder hierarchy whether it be in apache or web or whatever you used during installation. Anything under that folder will appear as the base for your localhost url. For example: htdocs/index.html will translate to http://localhost/index.html in your web browser. When you create an editor folder, it will be something like htdocs/peqedit/ will translate to http://localhost/peqedit/.

Kingmen30264 02-05-2013 06:27 PM

Quote:

Originally Posted by joligario (Post 217732)
That is correct. When you install apache, there should have been a folder created called "htdocs" somewhere in your folder hierarchy whether it be in apache or web or whatever you used during installation. Anything under that folder will appear as the base for your localhost url. For example: htdocs/index.html will translate to http://localhost/index.html in your web browser. When you create an editor folder, it will be something like htdocs/peqedit/ will translate to http://localhost/peqedit/.

Alright, I got that done, and now that I understand that, I am wondering one thing. Am I supposed to only put the index.php file into c:\Program Files\Apache Group\Apache2\htdocs alone, or am I supposed to put the entire folder in there? Or am I supposed to just make a shortcut to the index.php file?

If I put just the index.php file into the folder, this is what I see:

http://i215.photobucket.com/albums/c...EQBox-Copy.jpg

If I put the entire phpeditor folder into the htdocs folder, then this is what I see:

http://i215.photobucket.com/albums/c...tireFolder.jpg

I used /localhost/peqphpeditor/index.php because if I didn't, then I would end up with the same thing as I did when I did the shortcut below.

If I make a shortcut to the index.php file, then this is what I see:

http://i215.photobucket.com/albums/c...x-Shortcut.jpg


Is there something else that I can do to maybe get it to work?


Thanks
Kingmen

c0ncrete 02-05-2013 06:41 PM

first, get this to work in the directory you are trying to use. if it doesn't work, something is wrong with your apache/php installation or configuration and it has nothing to do with the editor.

index.php

Code:

<?php

phpinfo();

?>

http://php.net/manual/en/install.windows.php

Kingmen30264 02-05-2013 08:01 PM

Quote:

index.php

Code:

<?php

phpinfo();

?>


I did that, and all I keep seeing is the what is written in the php file in the browser. When I do /localhost/index.html.en it loads and shows me a page from apache that says "This page is here because the site administrator has changed the configuration...." So I am guessing that means that my apache is working?

Quote:

if it doesn't work, something is wrong with your apache/php installation or configuration and it has nothing to do with the editor.
When I installed PHP, it asked me what I wanted it to install under the extensions and I told it to install what was defaulted out, expect for the first one which was PHP and in the tree it was "associate all *.php files with php" which I told it to install that as well.

Then it asked me what kind of server did I want to install, IIS FastCGI, CGI, or No server, in which I selected CGI as IIS FastCGI told me to go to some server config and change some values and I didn't know where it was talking about.
After that, I just installed the rest of the program as normal following the prompts and when it was done, it closed.

I am still confused with the last line of the instructions, "Open up index.php in your web browser"... Does this mean for me to click on Index.php and load it like that, or am I supposed to click File>Open>Index.php, or do I simply add only the index.php in apache2/htdocs directory, or do I add the entire folder, and source it from there by entering /localhost/peqedit/index.php?

Here is what my index.php looks like:

Code:

#!C:/php/php.exe
<?php

phpinfo();

?>

$current_revision = "r358";

require_once("config.php");
require_once("lib/logging.php");
require_once("classes/mysql.php");
require_once("classes/template.php");
require_once("classes/session.php");
require_once("lib/common.php");
require_once("lib/data.php");

$editor = (isset($_GET['editor']) ? $_GET['editor'] : '');
$action = (isset($_GET['action']) ? $_GET['action'] : 0);
$npcid = (isset($_GET['npcid']) ? $_GET['npcid'] : null);
$z = (isset($_GET['z']) ? $_GET['z'] : '');
$zoneid = (isset($_GET['zoneid']) ? $_GET['zoneid'] : '');
$fid = (isset($_GET['fid']) ? $_GET['fid'] : '');
$tskid = (isset($_GET['tskid']) ? $_GET['tskid'] : '');
$ts = (isset($_GET['ts']) ? $_GET['ts'] : '');
$rec = (isset($_GET['rec']) ? intval($_GET['rec']) : '0');
$spellset = (isset($_GET['spellset']) ? $_GET['spellset'] : '');
$playerid = (isset($_GET['playerid']) ? $_GET['playerid'] : null);
$acctid = (isset($_GET['acctid']) ? $_GET['acctid'] : null);
$guildid = (isset($_GET['guildid']) ? $_GET['guildid'] : null);
$aaid = (isset($_GET['aaid']) ? $_GET['aaid'] : null);

$searchbar = '';
$body = '';
$javascript = '';
$breadcrumbs = '';
$headbar = '';

require_once('lib/headbars.php');
require_once('lib/breadcrumbs.php');

if (isset($_GET['admin'])) {
  if (session::is_admin()) {
    require_once('lib/admin.php');
  }
}

switch ($editor) {
  case '':
    $body = new Template("templates/intro.tmpl.php");
    $body->set('current_revision', $current_revision);
    break;
  case 'loot':
    require_once('lib/loot.php');
    break;
  case 'npc':
    require_once('lib/npc.php');
    break;
  case 'spawn':
    require_once('lib/spawn.php');
    break;
  case 'merchant':
    require_once('lib/merchant.php');
    break;
  case 'faction':
    require_once('lib/faction.php');
    break;
  case 'spellset':
    require_once('lib/spellset.php');
    break;
  case 'tradeskill':
    require_once('lib/tradeskill.php');
    break;
  case 'zone':
    require_once('lib/zone.php');
    break;
  case 'misc':
    require_once('lib/misc.php');
    break;
  case 'server':
    require_once('lib/server.php');
    break;
  case 'adventures':
    require_once('lib/adventures.php');
    break;
  case 'tasks':
    require_once('lib/tasks.php');
    break;
  case 'items':
    require_once('lib/items.php');
    break;
  case 'player':
    require_once('lib/player.php');
    break;
  case 'spells':
    require_once('lib/spellenums.php');
    require_once('lib/spells.php');
    break;
  case 'spellops':
    require_once('lib/spellops.php');
    break;
  case 'account':
    require_once('lib/account.php');
    break;
  case 'guild':
    require_once('lib/guild.php');
    break;
  case 'mail':
    require_once('lib/mail.php');
    break;
  case 'aa':
    require_once('lib/aa.php');
    break;
  case 'qglobal':
    require_once('lib/qglobal.php');
    break;
  case 'util':
    require_once('lib/util.php');
    break;
  case 'altcur':
    require_once('lib/altcur.php');
    break;
  case 'quest':
    require_once('lib/quest.php');
    break;
}

$tmpl->set('javascript', $javascript);
$tmpl->set('headbar', $headbar);
$tmpl->set('searchbar', $searchbar);
$tmpl->set('breadcrumbs', $breadcrumbs);
$tmpl->set('body', $body);

echo $tmpl->fetch('templates/index.tmpl.php');

?>

And here is what my Config.php looks like:

Code:

<?php

// Database Information:
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = '********';
$db = 'peq';

/*  Limit zone lists to a specified expansion
 *  (i.e. setting $expansion_limit to 2 would cause only Classic and Kunark zones
 *  to appear in zone drop-down lists)
 *    1 = EQ Classic
 *    2 = Kunark
 *    3 = Velious
 *    4 = Luclin
 *    5 = Planes of Power
 *    6 = Legacy of Ykesha
 *    7 = Lost Dungeons of Norrath
 *    8 = Gates of Discord
 *    9 = Omens of War
 *    10 = Dragons of Norrath
 *    11 = Depths of Darkhollow
 *    12 = Prophecy of Ro
 *    13 = The Serpents Spine
 *    14 = The Buried Sea
 *    15 = Secrets of Faydwer
 *    16 = Seeds of Destruction
 *    17 = Underfoot
 *    18 = House of Thule
 *    19 = Veil of Alaris
 *    20 = Rain of Fear
 *    99 = Other
 */
$expansion_limit = 20;

// How NPCs are listed. 1 = by NPCID (zoneidnumber*1000), 2 = By spawn2 entry
$npc_list = 1;

// Spawngroup list limit. Limits how many spawngroups are displayed as result of a Coord/NPC search. Specific NPC lists are not effected.
$spawngroup_limit = 150;

// Dont want to have to type the username and password every time you start the editor?
// Set the two variables below to the values you want to be in the form when you start it up.
// (default login: admin  pw: password)
$login = '';
$password = '';

// Log SQL queries:  1 = on, 0 = off
$logging = 1;

// $log_file = path to the file your sql logs will be saved in.
// If you want a single log file, uncomment next line and comment the two monthly log options.
//$log_file = "logs/sql_log.sql";

// Automatically create new logs monthly.
$filetime = date("m-Y");
$log_file = "logs/sql_log_$filetime.sql";

// Log all MySQL queries (If disabled only write entries are logged - recommended.)
$log_all = 0;

// Log all MySQL queries that result in an error.
$log_error = 0;

// Enable or disable user logins.
$enable_user_login = 1;

// Enable or disable read only guest mode log in.
$enable_guest_mode = 1;

// Path for quests without trailing slash.
$quest_path = "/home/administrator/run/quests"

?>

I am not sure how to tell if the PHP program is installed properly.

I am kind of curious as to why it keeps showing the lines of code when I do /localhost/index.php


Thanks,
Kingmen

c0ncrete 02-05-2013 08:08 PM

it's because apache isn't configured correctly to execute/handle the contents of the php file, and instead is providing them as plain text files.

also, you only want to open the file via a network address through apache, not using file->open.

again, don't worry about getting the database editor to work until you get a simple php document like the one with phpinfo in it to be correctly translated by apache. otherwise, you'll just end up confusing yourself further.

you're likely missing something like this
Quote:

#
LoadModule php5_module "c:/php/php5apache2.dll"
AddHandler application/x-httpd-php .php

# configure the path to php.ini
PHPIniDir "C:/php"
found @ http://php.net/manual/en/install.windows.apache2.php

wolfwalkereci 07-15-2013 03:12 PM

So the changes to npcspecialattks kind of broke part of the peqeditor and since I use this tool more then any other I thought I would attempt to fix it on my end.
This is all probably wrong in terms of how the peq team would do it but it does work.
Here is a patch file against current svn revision:

Code:

Index: lib/data.php
===================================================================
--- lib/data.php    (revision 370)
+++ lib/data.php    (working copy)
@@ -890,41 +890,41 @@
 );
 
 $specialattacks = array(
- "S" => "Summon",
- "E" => "Enrage",
- "R" => "Rampage",
- "r" => "AE Rampage",
- "F" => "Flurry",
- "T" => "Triple Attack",
- "Q" => "Quad Attack",
- "m" => "Magic Attack",
- "b" => "Bane Attack",
- "U" => "Unslowable",
- "M" => "Unmezable",
- "C" => "Uncharmable",
- "N" => "Unstunable",
- "I" => "Unsnareable",
- "D" => "Unfearable",
- "p" => "Unpacifiable",
- "A" => "Immune to Melee",
- "B" => "Immune to Magic",
- "f" => "Immune to Fleeing",
- "W" => "Immune to non-Magical Melee",
- "O" => "Immune to non-Bane Melee",
- "H" => "Will Not Aggro",
- "g" => "Resist Ranged Spells",
- "d" => "See through Feign Death",
- "L" => "Dual Wield",
- "G" => "Immune to Aggro",
- "Y" => "Ranged Attack",
- "t" => "Tunnel Vision",
- "i" => "Immune to Taunt",
- "n" => "Does NOT buff/heal friends",
- "j" => "Tethered",
- "J" => "Leashed",
- "o" => "Destructible Object",
- "Z" => "No Harm from Players",
- "K" => "Immune to Dispell"
+ "1,1^" => "Summon",
+ "2,1^" => "Enrage",
+ "3,1^" => "Rampage",
+ "4,1^" => "AE Rampage",
+ "5,1^" => "Flurry",
+ "6,1^" => "Triple Attack",
+ "7,1^" => "Quad Attack",
+ "10,1^" => "Magic Attack",
+ "9,1^" => "Bane Attack",
+ "12,1^" => "Unslowable",
+ "13,1^" => "Unmezable",
+ "14,1^" => "Uncharmable",
+ "15,1^" => "Unstunable",
+ "16,1^" => "Unsnareable",
+ "17,1^" => "Unfearable",
+ "31,1^" => "Unpacifiable",
+ "19,1^" => "Immune to Melee",
+ "20,1^" => "Immune to Magic",
+ "21,1^" => "Immune to Fleeing",
+ "23,1^" => "Immune to non-Magical Melee",
+ "22,1^" => "Immune to non-Bane Melee",
+ "24,1^" => "Will Not Aggro",
+ "26,1^" => "Resist Ranged Spells",
+ "27,1^" => "See through Feign Death",
+ "8,1^" => "Dual Wield",
+ "25,1^" => "Immune to Aggro",
+ "11,1^" => "Ranged Attack",
+ "29,1^" => "Tunnel Vision",
+ "28,1^" => "Immune to Taunt",
+ "30,1^" => "Does NOT buff/heal friends",
+ "33,1^" => "Tethered",
+ "32,1^" => "Leashed",
+ "34,1^" => "Destructible Object",
+ "35,1^" => "No Harm from Players",
+ "18,1^" => "Immune to Dispell"
 );
 
 $tradeskills = array(
Index: lib/npc.php
===================================================================
--- lib/npc.php    (revision 370)
+++ lib/npc.php    (working copy)
@@ -1162,7 +1162,7 @@
      $new_specialattks .= $_POST["$k"];
    }
  }
-  if ($npcspecialattks != $new_specialattks) {
+  if ($special_abilities != $new_specialattks) {
    $flag = 1;
  }
 
@@ -1189,7 +1189,7 @@
  if ($mindmg != $_POST['mindmg']) $fields .= "mindmg=\"" . $_POST['mindmg'] . "\", ";
  if ($maxdmg != $_POST['maxdmg']) $fields .= "maxdmg=\"" . $_POST['maxdmg'] . "\", ";
  if ($attack_count != $_POST['attack_count']) $fields .= "attack_count=\"" . $_POST['attack_count'] . "\", ";
-  if ($flag == 1) $fields .= "npcspecialattks=\"$new_specialattks\", ";
+  if ($flag == 1) $fields .= "special_abilities=\"$new_specialattks\", ";
  if ($aggroradius != $_POST['aggroradius']) $fields .= "aggroradius=\"" . $_POST['aggroradius'] . "\", ";
  if ($face != $_POST['face']) $fields .= "face=\"" . $_POST['face'] . "\", ";
  if ($luclin_hairstyle != $_POST['luclin_hairstyle']) $fields .= "luclin_hairstyle=\"" . $_POST['luclin_hairstyle'] . "\", ";
@@ -1253,7 +1253,9 @@
 
  if ($fields != '') {
    $query = "UPDATE npc_types SET $fields WHERE id=$npcid";
+    $query2 = "UPDATE npc_types SET special_abilities = TRIM(TRAILING '^' FROM special_abilities)";
    $mysql->query_no_result($query);
+    $mysql->query_no_result($query2);
  }
 }
 
@@ -1272,7 +1274,7 @@
  if ($_POST['isquest'] != 1) $_POST['isquest'] = 0;
 
  foreach ($specialattacks as $k => $v) {
-    if (isset($_POST["$k"])) $npcspecialattks .= $_POST["$k"];
+    if (isset($_POST["$k"])) $special_abilities .= $_POST["$k"];
  }
 
  $fields = "id=\"" . $_POST['id']. "\", ";
@@ -1296,7 +1298,7 @@
  $fields .= "mindmg=\"" . $_POST['mindmg'] . "\", ";
  $fields .= "maxdmg=\"" . $_POST['maxdmg'] . "\", ";
  $fields .= "attack_count=\"" . $_POST['attack_count'] . "\", ";
-  $fields .= "npcspecialattks=\"$npcspecialattks\", ";
+  $fields .= "special_abilities=\"$special_abilities\", ";
  $fields .= "aggroradius=\"" . $_POST['aggroradius'] . "\", ";
  $fields .= "face=\"" . $_POST['face'] . "\", ";
  $fields .= "luclin_hairstyle=\"" . $_POST['luclin_hairstyle'] . "\", ";
@@ -1359,7 +1361,9 @@
 
  if ($fields != '') {
    $query = "INSERT INTO npc_types SET $fields";
+    $query2 = "UPDATE npc_types SET special_abilities = TRIM(TRAILING '^' FROM special_abilities)";
    $mysql->query_no_result($query);
+    $mysql->query_no_result($query2);
  }
 }
 
@@ -1390,7 +1394,7 @@
 $fields .= "mindmg=\"" . $_POST['mindmg'] . "\", ";
 $fields .= "maxdmg=\"" . $_POST['maxdmg'] . "\", ";
 $fields .= "attack_count=\"" . $_POST['attack_count'] . "\", ";
-$fields .= "npcspecialattks=\"" . $_POST['npcspecialattks'] . "\", ";
+$fields .= "special_abilities=\"" . $_POST['special_abilities'] . "\", ";
 $fields .= "aggroradius=\"" . $_POST['aggroradius'] . "\", ";
 $fields .= "face=\"" . $_POST['face'] . "\", ";
 $fields .= "luclin_hairstyle=\"" . $_POST['luclin_hairstyle'] . "\", ";
@@ -1455,7 +1459,9 @@
 
  if ($fields != '') {
    $query = "INSERT INTO npc_types SET $fields";
+    $query2 = "UPDATE npc_types SET special_abilities = TRIM(TRAILING '^' FROM special_abilities)";
    $mysql->query_no_result($query);
+    $mysql->query_no_result($query2);
  }
 }
 
Index: templates/npc/npc.edit.tmpl.php
===================================================================
--- templates/npc/npc.edit.tmpl.php    (revision 370)
+++ templates/npc/npc.edit.tmpl.php    (working copy)
@@ -150,45 +150,45 @@
            <table cellpadding="20px">
              <tr>
                <td valign="top" align="left">
-                  <input type="checkbox" name="S" value="S"<?echo (strpos($npcspecialattks,"S") === false) ? "" : " checked"?>> Summon<br>
-                  <input type="checkbox" name="E" value="E"<?echo (strpos($npcspecialattks,"E") === false) ? "" : " checked"?>> Enrage<br>
-                  <input type="checkbox" name="R" value="R"<?echo (strpos($npcspecialattks,"R") === false) ? "" : " checked"?>> Rampage<br>
-                  <input type="checkbox" name="r" value="r"<?echo (strpos($npcspecialattks,"r") === false) ? "" : " checked"?>> AE Rampage<br>
-                  <input type="checkbox" name="F" value="F"<?echo (strpos($npcspecialattks,"F") === false) ? "" : " checked"?>> Flurry<br>
-                  <input type="checkbox" name="T" value="T"<?echo (strpos($npcspecialattks,"T") === false) ? "" : " checked"?>> Triple Attack<br>
-                  <input type="checkbox" name="Q" value="Q"<?echo (strpos($npcspecialattks,"Q") === false) ? "" : " checked"?>> Quad Attack<br>
-                  <input type="checkbox" name="m" value="m"<?echo (strpos($npcspecialattks,"m") === false) ? "" : " checked"?>> Magic Attack<br>
-                  <input type="checkbox" name="b" value="b"<?echo (strpos($npcspecialattks,"b") === false) ? "" : " checked"?>> Bane Attack<br>
-                  <input type="checkbox" name="L" value="L"<?echo (strpos($npcspecialattks,"L") === false) ? "" : " checked"?>> Dual Wield<br>
-                  <input type="checkbox" name="Y" value="Y"<?echo (strpos($npcspecialattks,"Y") === false) ? "" : " checked"?>> Ranged Attack<br>
+                  <input type="checkbox" name="1,1^" value="1,1^"<?echo (strpos($special_abilities,"1,1^") === false) ? "" : " checked"?>> Summon<br>
+                  <input type="checkbox" name="2,1^" value="2,1^"<?echo (strpos($special_abilities,"2,1^") === false) ? "" : " checked"?>> Enrage<br>
+                  <input type="checkbox" name="3,1^" value="3,1^"<?echo (strpos($special_abilities,"3,1^") === false) ? "" : " checked"?>> Rampage<br>
+                  <input type="checkbox" name="4,1^" value="4,1^"<?echo (strpos($special_abilities,"4,1^") === false) ? "" : " checked"?>> AE Rampage<br>
+                  <input type="checkbox" name="5,1^" value="5,1^"<?echo (strpos($special_abilities,"5,1^") === false) ? "" : " checked"?>> Flurry<br>
+                  <input type="checkbox" name="6,1^" value="6,1^"<?echo (strpos($special_abilities,"6,1^") === false) ? "" : " checked"?>> Triple Attack<br>
+                  <input type="checkbox" name="7,1^" value="7,1^"<?echo (strpos($special_abilities,"7,1^") === false) ? "" : " checked"?>> Quad Attack<br>
+                  <input type="checkbox" name="10,1^" value="10,1^"<?echo (strpos($special_abilities,"10,1^") === false) ? "" : " checked"?>> Magic Attack<br>
+                  <input type="checkbox" name="9,1^" value="9,1^"<?echo (strpos($special_abilities,"9,1^") === false) ? "" : " checked"?>> Bane Attack<br>
+                  <input type="checkbox" name="8,1^" value="8,1^"<?echo (strpos($special_abilities,"8,1^") === false) ? "" : " checked"?>> Dual Wield<br>
+                  <input type="checkbox" name="11,1^" value="11,1^"<?echo (strpos($special_abilities,"11,1^") === false) ? "" : " checked"?>> Ranged Attack<br>
                </td>
                <td valign="top" align="left">
-                  <input type="checkbox" name="U" value="U"<?echo (strpos($npcspecialattks,"U") === false) ? "" : " checked"?>> Unslowable<br>
-                  <input type="checkbox" name="M" value="M"<?echo (strpos($npcspecialattks,"M") === false) ? "" : " checked"?>> Unmezable<br>
-                  <input type="checkbox" name="C" value="C"<?echo (strpos($npcspecialattks,"C") === false) ? "" : " checked"?>> Uncharmable<br>
-                  <input type="checkbox" name="N" value="N"<?echo (strpos($npcspecialattks,"N") === false) ? "" : " checked"?>> Unstunable<br>
-                  <input type="checkbox" name="I" value="I"<?echo (strpos($npcspecialattks,"I") === false) ? "" : " checked"?>> Unsnareable<br>
-                  <input type="checkbox" name="D" value="D"<?echo (strpos($npcspecialattks,"D") === false) ? "" : " checked"?>> Unfearable<br>
-                  <input type="checkbox" name="p" value="p"<?echo (strpos($npcspecialattks,"p") === false) ? "" : " checked"?>> Unpacifiable<br>
-                  <input type="checkbox" name="K" value="K"<?echo (strpos($npcspecialattks,"K") === false) ? "" : " checked"?>> Immune to Dispell<br>
-                  <input type="checkbox" name="Z" value="Z"<?echo (strpos($npcspecialattks,"Z") === false) ? "" : " checked"?>> No Harm from Players<br>
-                  <input type="checkbox" name="g" value="g"<?echo (strpos($npcspecialattks,"g") === false) ? "" : " checked"?>> Resist Ranged Spells<br>
-                  <input type="checkbox" name="t" value="t"<?echo (strpos($npcspecialattks,"t") === false) ? "" : " checked"?>> Tunnel Vision<br>
-                  <input type="checkbox" name="i" value="i"<?echo (strpos($npcspecialattks,"i") === false) ? "" : " checked"?>> Immune to Taunt<br>
+                  <input type="checkbox" name="12,1^" value="12,1^"<?echo (strpos($special_abilities,"12,1^") === false) ? "" : " checked"?>> Unslowable<br>
+                  <input type="checkbox" name="13,1^" value="13,1^"<?echo (strpos($special_abilities,"13,1^") === false) ? "" : " checked"?>> Unmezable<br>
+                  <input type="checkbox" name="14,1^" value="14,1^"<?echo (strpos($special_abilities,"14,1^") === false) ? "" : " checked"?>> Uncharmable<br>
+                  <input type="checkbox" name="15,1^" value="15,1^"<?echo (strpos($special_abilities,"15,1^") === false) ? "" : " checked"?>> Unstunable<br>
+                  <input type="checkbox" name="16,1^" value="16,1^"<?echo (strpos($special_abilities,"16,1^") === false) ? "" : " checked"?>> Unsnareable<br>
+                  <input type="checkbox" name="17,1^" value="17,1^"<?echo (strpos($special_abilities,"17,1^") === false) ? "" : " checked"?>> Unfearable<br>
+                  <input type="checkbox" name="31,1^" value="31,1^"<?echo (strpos($special_abilities,"31,1^") === false) ? "" : " checked"?>> Unpacifiable<br>
+                  <input type="checkbox" name="18,1^" value="18,1^"<?echo (strpos($special_abilities,"18,1^") === false) ? "" : " checked"?>> Immune to Dispell<br>
+                  <input type="checkbox" name="35,1^" value="35,1^"<?echo (strpos($special_abilities,"35,1^") === false) ? "" : " checked"?>> No Harm from Players<br>
+                  <input type="checkbox" name="26,1^" value="26,1^"<?echo (strpos($special_abilities,"26,1^") === false) ? "" : " checked"?>> Resist Ranged Spells<br>
+                  <input type="checkbox" name="29,1^" value="29,1^"<?echo (strpos($special_abilities,"29,1^") === false) ? "" : " checked"?>> Tunnel Vision<br>
+                  <input type="checkbox" name="28,1^" value="28,1^"<?echo (strpos($special_abilities,"28,1^") === false) ? "" : " checked"?>> Immune to Taunt<br>
                </td>
                <td valign="top" align="left">
-                  <input type="checkbox" name="A" value="A"<?echo (strpos($npcspecialattks,"A") === false) ? "" : " checked"?>> Immune to Melee<br>
-                  <input type="checkbox" name="B" value="B"<?echo (strpos($npcspecialattks,"B") === false) ? "" : " checked"?>> Immune to Magic<br>
-                  <input type="checkbox" name="f" value="f"<?echo (strpos($npcspecialattks,"f") === false) ? "" : " checked"?>> Immune to Fleeing<br>
-                  <input type="checkbox" name="W" value="W"<?echo (strpos($npcspecialattks,"W") === false) ? "" : " checked"?>> Immune to non-Magical Melee<br>
-                  <input type="checkbox" name="O" value="O"<?echo (strpos($npcspecialattks,"O") === false) ? "" : " checked"?>> Immune to non-Bane Melee<br>
-                  <input type="checkbox" name="H" value="H"<?echo (strpos($npcspecialattks,"H") === false) ? "" : " checked"?>> Will Not Aggro<br>
-                  <input type="checkbox" name="G" value="G"<?echo (strpos($npcspecialattks,"G") === false) ? "" : " checked"?>> Immune to Aggro<br>
-                  <input type="checkbox" name="d" value="d"<?echo (strpos($npcspecialattks,"d") === false) ? "" : " checked"?>> See through Feign Death<br>
+                  <input type="checkbox" name="19,1^" value="19,1^"<?echo (strpos($special_abilities,"19,1^") === false) ? "" : " checked"?>> Immune to Melee<br>
+                  <input type="checkbox" name="20,1^" value="20,1^"<?echo (strpos($special_abilities,"20,1^") === false) ? "" : " checked"?>> Immune to Magic<br>
+                  <input type="checkbox" name="21,1^" value="21,1^"<?echo (strpos($special_abilities,"21,1^") === false) ? "" : " checked"?>> Immune to Fleeing<br>
+                  <input type="checkbox" name="23,1^" value="23,1^"<?echo (strpos($special_abilities,"23,1^") === false) ? "" : " checked"?>> Immune to non-Magical Melee<br>
+                  <input type="checkbox" name="22,1^" value="22,1^"<?echo (strpos($special_abilities,"22,1^") === false) ? "" : " checked"?>> Immune to non-Bane Melee<br>
+                  <input type="checkbox" name="24,1^" value="24,1^"<?echo (strpos($special_abilities,"24,1^") === false) ? "" : " checked"?>> Will Not Aggro<br>
+                  <input type="checkbox" name="25,1^" value="25,1^"<?echo (strpos($special_abilities,"25,1^") === false) ? "" : " checked"?>> Immune to Aggro<br>
+                  <input type="checkbox" name="27,1^" value="27,1^"<?echo (strpos($special_abilities,"27,1^") === false) ? "" : " checked"?>> See through Feign Death<br>
                  <input type="checkbox" name="npc_aggro" value="1"<?echo ($npc_aggro == 1) ? "checked" : "";?>> Can Aggro NPCs<br>
-                  <input type="checkbox" name="n" value="n"<?echo (strpos($npcspecialattks,"n") === false) ? "" : " checked"?>> Does NOT buff/heal friends<br>
-                  <input type="checkbox" name="j" value="j" onClick="sanityCheck();"<?echo (strpos($npcspecialattks,"j") === false) ? "" : " checked"?>> Tethered<br>
-                  <input type="checkbox" name="J" value="J" onClick="sanityCheck();"<?echo (strpos($npcspecialattks,"J") === false) ? "" : " checked"?>> Leashed<br>
+                  <input type="checkbox" name="30,1^" value="30,1^"<?echo (strpos($special_abilities,"30,1^") === false) ? "" : " checked"?>> Does NOT buff/heal friends<br>
+                  <input type="checkbox" name="33,1^" value="33,1^" onClick="sanityCheck();"<?echo (strpos($special_abilities,"33,1^") === false) ? "" : " checked"?>> Tethered<br>
+                  <input type="checkbox" name="32,1^" value="32,1^" onClick="sanityCheck();"<?echo (strpos($special_abilities,"32,1^") === false) ? "" : " checked"?>> Leashed<br>
                </td>
              </tr>
            </table>
@@ -272,7 +272,7 @@
                </td>
                <td valign="top" align="left">
                  <input type="checkbox" name="underwater" value="1"<?echo ($underwater == 1) ? " checked" : "";?>> Underwater NPC<br>
-                  <input type="checkbox" name="o" value="o"<?echo (strpos($npcspecialattks,"o") === false) ? "" : " checked"?>> Destructible Object<br>
+                  <input type="checkbox" name="34,1^" value="34,1^"<?echo (strpos($special_abilities,"34,1^") === false) ? "" : " checked"?>> Destructible Object<br>
                  <input type="checkbox" name="isquest" value="1"<?echo ($isquest == 1) ? " checked" : "";?>> Has Quest File<br/>
                </td>
              </tr>
Index: templates/npc/npc.editlevel.tmpl.php
===================================================================
--- templates/npc/npc.editlevel.tmpl.php    (revision 370)
+++ templates/npc/npc.editlevel.tmpl.php    (working copy)
@@ -145,34 +145,34 @@
            <table cellpadding="20px">
              <tr>
                <td valign="top" align="left">
-                  <input type="checkbox" name="S" value="S"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "S") ? "checked" : "";}}?>> Summon<br>
-                  <input type="checkbox" name="E" value="E"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "E") ? "checked" : "";}}?>> Enrage<br>
-                  <input type="checkbox" name="R" value="R"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "R") ? "checked" : "";}}?>> Rampage<br>
-                  <input type="checkbox" name="r" value="r"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "r") ? "checked" : "";}}?>> AE Rampage<br>
-                  <input type="checkbox" name="F" value="F"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "F") ? "checked" : "";}}?>> Flurry<br>
-                  <input type="checkbox" name="T" value="T"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "T") ? "checked" : "";}}?>> Triple Attack<br>
-                  <input type="checkbox" name="Q" value="Q"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "Q") ? "checked" : "";}}?>> Quad Attack<br>
-                  <input type="checkbox" name="m" value="m"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "m") ? "checked" : "";}}?>> Magic Attack<br>
-                  <input type="checkbox" name="b" value="b"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "b") ? "checked" : "";}}?>> Bane Attack<br>
+                  <input type="checkbox" name="1,1^" value="1,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "1,1^") ? "checked" : "";}}?>> Summon<br>
+                  <input type="checkbox" name="2,1^" value="2,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "2,1^") ? "checked" : "";}}?>> Enrage<br>
+                  <input type="checkbox" name="3,1^" value="3,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "3,1^") ? "checked" : "";}}?>> Rampage<br>
+                  <input type="checkbox" name="4,1^" value="4,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "4,1^") ? "checked" : "";}}?>> AE Rampage<br>
+                  <input type="checkbox" name="5,1^" value="5,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "5,1^") ? "checked" : "";}}?>> Flurry<br>
+                  <input type="checkbox" name="6,1^" value="6,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "6,1^") ? "checked" : "";}}?>> Triple Attack<br>
+                  <input type="checkbox" name="7,1^" value="7,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "7,1^") ? "checked" : "";}}?>> Quad Attack<br>
+                  <input type="checkbox" name="10,1^" value="10,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "10,1^") ? "checked" : "";}}?>> Magic Attack<br>
+                  <input type="checkbox" name="9,1^" value="9,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "9,1^") ? "checked" : "";}}?>> Bane Attack<br>
                  </td>
                <td valign="top" align="left">
-                  <input type="checkbox" name="U" value="U"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "U") ? "checked" : "";}}?>> Unslowable<br>
-                  <input type="checkbox" name="M" value="M"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "M") ? "checked" : "";}}?>> Unmezable<br>
-                  <input type="checkbox" name="C" value="C"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "C") ? "checked" : "";}}?>> Uncharmable<br>
-                  <input type="checkbox" name="N" value="N"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "N") ? "checked" : "";}}?>> Unstunable<br>
-                  <input type="checkbox" name="I" value="I"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "I") ? "checked" : "";}}?>> Unsnareable<br>
-                  <input type="checkbox" name="D" value="D"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "D") ? "checked" : "";}}?>> Unfearable<br>
-                  <input type="checkbox" name="K" value="K"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "K") ? "checked" : "";}}?>> Immune to Dispell<br>
-                  <input type="checkbox" name="g" value="g"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "g") ? "checked" : "";}}?>> Resist ranged spells<br>
+                  <input type="checkbox" name="12,1^" value="12,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "12,1^") ? "checked" : "";}}?>> Unslowable<br>
+                  <input type="checkbox" name="13,1^" value="13,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "13,1^") ? "checked" : "";}}?>> Unmezable<br>
+                  <input type="checkbox" name="14,1^" value="14,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "14,1^") ? "checked" : "";}}?>> Uncharmable<br>
+                  <input type="checkbox" name="15,1^" value="15,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "15,1^") ? "checked" : "";}}?>> Unstunable<br>
+                  <input type="checkbox" name="16,1^" value="16,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "16,1^") ? "checked" : "";}}?>> Unsnareable<br>
+                  <input type="checkbox" name="17,1^" value="17,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "17,1^") ? "checked" : "";}}?>> Unfearable<br>
+                  <input type="checkbox" name="18,1^" value="18,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "18,1^") ? "checked" : "";}}?>> Immune to Dispell<br>
+                  <input type="checkbox" name="26,1^" value="26,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "26,1^") ? "checked" : "";}}?>> Resist ranged spells<br>
                </td>
                <td valign="top" align="left">
-                  <input type="checkbox" name="A" value="A"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "A") ? "checked" : "";}}?>> Immune to Melee<br>
-                  <input type="checkbox" name="B" value="B"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "B") ? "checked" : "";}}?>> Immune to Magic<br>
-                  <input type="checkbox" name="f" value="f"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "f") ? "checked" : "";}}?>> Immune to Fleeing<br>
-                  <input type="checkbox" name="W" value="W"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "W") ? "checked" : "";}}?>> Immune to non-Magical Melee<br>
-                  <input type="checkbox" name="O" value="O"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "O") ? "checked" : "";}}?>> Immune to non-Bane Melee<br>
-                  <input type="checkbox" name="H" value="H"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "H") ? "checked" : "";}}?>> Will Not Aggro<br>
-                  <input type="checkbox" name="d" value="d"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "d") ? "checked" : "";}}?>> See through Feign Death<br>
+                  <input type="checkbox" name="19,1^" value="19,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "19,1^") ? "checked" : "";}}?>> Immune to Melee<br>
+                  <input type="checkbox" name="20,1^" value="20,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "20,1^") ? "checked" : "";}}?>> Immune to Magic<br>
+                  <input type="checkbox" name="21,1^" value="21,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "21,1^") ? "checked" : "";}}?>> Immune to Fleeing<br>
+                  <input type="checkbox" name="23,1^" value="23,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "23,1^") ? "checked" : "";}}?>> Immune to non-Magical Melee<br>
+                  <input type="checkbox" name="22,1^" value="22,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "22,1^") ? "checked" : "";}}?>> Immune to non-Bane Melee<br>
+                  <input type="checkbox" name="24,1^" value="24,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "24,1^") ? "checked" : "";}}?>> Will Not Aggro<br>
+                  <input type="checkbox" name="27,1^" value="27,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "27,1^") ? "checked" : "";}}?>> See through Feign Death<br>
                  <input type="checkbox" name="npc_aggro" value="1"<?echo ($npc_aggro == 1) ? "checked" : "";?>> Can Aggro NPCs<br>
                  &nbsp;   
                </td>
@@ -258,7 +258,7 @@
                </td>
            <td valign="top" align="left">
            <input type="checkbox" name="underwater" value="1"<?echo ($underwater == 1) ? "checked" : "";?>> Underwater NPC<br>
-          <input type="checkbox" name="o" value="o"<?if ($npcspecialattks != '') {for ($x=0; $x<strlen($npcspecialattks); $x++) { echo ($npcspecialattks[$x] == "o") ? "checked" : "";}}?>> Destructible Object<br>
+          <input type="checkbox" name="34,1^" value="34,1^"<?if ($special_abilities != '') {for ($x=0; $x<strlen($special_abilities); $x++) { echo ($special_abilities[$x] == "34,1^") ? "checked" : "";}}?>> Destructible Object<br>
                </td>
              </tr>
            </table>
Index: templates/npc/npc.tmpl.php
===================================================================
--- templates/npc/npc.tmpl.php    (revision 370)
+++ templates/npc/npc.tmpl.php    (working copy)
@@ -177,7 +177,7 @@
                  <tr>
                    <td align="left" width="33%">Aggro: <?=$aggroradius?></td>
                    <td align="left" width="33%">Atk Speed: <?=$attack_speed?>%</td>
-                    <td align="left" width="34%">Special Atks: <?echo ($npcspecialattks) ? $npcspecialattks : "None";?></td>
+                    <td align="left" width="34%">Special Atks: <?echo ($special_abilities) ? $special_abilities : "None";?></td>
                  </tr>
                  <tr>
                    <td align="left" width="33%">Slow Mit: <?=$slow_mitigation?> (<?=$slotmit?>%)</td>
@@ -327,7 +327,7 @@
        <input type="hidden" name="adventure_template_id" value="<?=$adventure_template_id?>">
        <input type="hidden" name="trap_template" value="<?=$trap_template?>">
        <input type="hidden" name="armortint_id" value="<?=$armortint_id?>">
-        <input type="hidden" name="npcspecialattks" value="<?=$npcspecialattks?>">
+        <input type="hidden" name="special_abilities" value="<?=$special_abilities?>">
        <input type="hidden" name="slow_mitigation" value="<?=$slow_mitigation?>">
        <input type="hidden" name="maxlevel" value="<?=$maxlevel?>">
        <input type="hidden" name="scalerate" value="<?=$scalerate?>">


KLS 07-20-2013 04:16 AM

Cavedude has been busy lately but I'll see what we can do about getting official support for the new special abilities system.

wolfwalkereci 07-20-2013 05:35 AM

Quote:

Originally Posted by KLS (Post 222607)
Cavedude has been busy lately but I'll see what we can do about getting official support for the new special abilities system.

If you use that patch I forgot to modify destructible object or it didnt work when I did and also as written you can create a npc but on creation it wont set special_abilities. Have to edit it after creation. I figured I would just throw that up for others to use and the smart people that maintain the editor would either figure a better way to do it or figure a better way to do it. :)

KLS 07-20-2013 08:20 PM

Yeah I think your patch is a nice stopgap but we need better support across the board cause we need to support the params. Also this is basically the reason PEQ is actually behind versions -.-

wolfwalkereci 07-21-2013 03:12 PM

Was looking at something else inside the editor and discovered why on creation I was not seeing special_abilities saved to the npc.
So until you can get support in for the params here is another patch which corrects that issue.

Code:

Index: templates/npc/npc.add.tmpl.php
===================================================================
--- templates/npc/npc.add.tmpl.php    (revision 370)
+++ templates/npc/npc.add.tmpl.php    (working copy)
@@ -146,45 +146,45 @@
            <table cellpadding="20px">
              <tr>
                <td valign="top" align="left">
-                  <input type="checkbox" name="S" value="S"/> Summon<br/>
-                  <input type="checkbox" name="E" value="E"/> Enrage<br/>
-                  <input type="checkbox" name="R" value="R"/> Rampage<br/>
-                  <input type="checkbox" name="r" value="r"/> AE Rampage<br/>
-                  <input type="checkbox" name="F" value="F"/> Flurry<br/>
-                  <input type="checkbox" name="T" value="T"/> Triple Attack<br/>
-                  <input type="checkbox" name="Q" value="Q"/> Quad Attack<br/>
-                  <input type="checkbox" name="m" value="m"/> Magic Attack<br/>
-                  <input type="checkbox" name="b" value="b"/> Bane Attack<br/>
-                  <input type="checkbox" name="L" value="L"/> Dual Wield<br/>
-                  <input type="checkbox" name="Y" value="Y"/> Ranged Attack<br/>
+                  <input type="checkbox" name="1,1^" value="1,1^"/> Summon<br/>
+                  <input type="checkbox" name="2,1^" value="2,1^"/> Enrage<br/>
+                  <input type="checkbox" name="3,1^" value="3,1^"/> Rampage<br/>
+                  <input type="checkbox" name="4,1^" value="4,1^"/> AE Rampage<br/>
+                  <input type="checkbox" name="5,1^" value="5,1^"/> Flurry<br/>
+                  <input type="checkbox" name="6,1^" value="6,1^"/> Triple Attack<br/>
+                  <input type="checkbox" name="7,1^" value="7,1^"/> Quad Attack<br/>
+                  <input type="checkbox" name="10,1^" value="10,1^"/> Magic Attack<br/>
+                  <input type="checkbox" name="9,1" value="9,1"/> Bane Attack<br/>
+                  <input type="checkbox" name="8,1^" value="8,1^"/> Dual Wield<br/>
+                  <input type="checkbox" name="11,1^" value="11,1^"/> Ranged Attack<br/>
                </td>
                <td valign="top" align="left">
-                  <input type="checkbox" name="U" value="U"/> Unslowable<br/>
-                  <input type="checkbox" name="M" value="M"/> Unmezable<br/>
-                  <input type="checkbox" name="C" value="C"/> Uncharmable<br/>
-                  <input type="checkbox" name="N" value="N"/> Unstunable<br/>
-                  <input type="checkbox" name="I" value="I"/> Unsnareable<br/>
-                  <input type="checkbox" name="D" value="D"/> Unfearable<br/>
-                  <input type="checkbox" name="p" value="p"/> Unpacifiable<br/>
-                  <input type="checkbox" name="K" value="K"/> Immune to Dispell<br/>
-                  <input type="checkbox" name="Z" value="Z"/> No Harm from Players<br/>
-                  <input type="checkbox" name="g" value="g"/> Resist Ranged Spells<br/>
-                  <input type="checkbox" name="t" value="t"/> Tunnel Vision<br/>
-                  <input type="checkbox" name="i" value="i"/> Immune to Taunt<br/>
+                  <input type="checkbox" name="12,1^" value="12,1^"/> Unslowable<br/>
+                  <input type="checkbox" name="13,1^" value="13,1^"/> Unmezable<br/>
+                  <input type="checkbox" name="14,1^" value="14,1^"/> Uncharmable<br/>
+                  <input type="checkbox" name="15,1^" value="15,1^"/> Unstunable<br/>
+                  <input type="checkbox" name="16,1^" value="16,1^"/> Unsnareable<br/>
+                  <input type="checkbox" name="17,1^" value="17,1^"/> Unfearable<br/>
+                  <input type="checkbox" name="31,1^" value="31,1^"/> Unpacifiable<br/>
+                  <input type="checkbox" name="18,1^" value="18,1^"/> Immune to Dispell<br/>
+                  <input type="checkbox" name="35,1^" value="35,1^"/> No Harm from Players<br/>
+                  <input type="checkbox" name="26,1^" value="26,1^"/> Resist Ranged Spells<br/>
+                  <input type="checkbox" name="29,1^" value="29,1^"/> Tunnel Vision<br/>
+                  <input type="checkbox" name="28,1^" value="28,1^"/> Immune to Taunt<br/>
                </td>
                <td valign="top" align="left">
-                  <input type="checkbox" name="A" value="A"/> Immune to Melee<br/>
-                  <input type="checkbox" name="B" value="B"/> Immune to Magic<br/>
-                  <input type="checkbox" name="f" value="f"/> Immune to Fleeing<br/>
-                  <input type="checkbox" name="W" value="W"/> Immune to non-Magical Melee<br/>
-                  <input type="checkbox" name="O" value="O"/> Immune to non-Bane Melee<br/>
-                  <input type="checkbox" name="H" value="H"/> Will Not Aggro<br/>
-                  <input type="checkbox" name="G" value="G"/> Immune to Aggro<br/>
-                  <input type="checkbox" name="d" value="d"/> See through Feign Death<br/>
+                  <input type="checkbox" name="19,1^" value="19,1^"/> Immune to Melee<br/>
+                  <input type="checkbox" name="20,1^" value="20,1^"/> Immune to Magic<br/>
+                  <input type="checkbox" name="21,1^" value="21,1^"/> Immune to Fleeing<br/>
+                  <input type="checkbox" name="23,1^" value="23,1^"/> Immune to non-Magical Melee<br/>
+                  <input type="checkbox" name="22,1^" value="22,1^"/> Immune to non-Bane Melee<br/>
+                  <input type="checkbox" name="24,1^" value="24,1^"/> Will Not Aggro<br/>
+                  <input type="checkbox" name="25,1^" value="25,1^"/> Immune to Aggro<br/>
+                  <input type="checkbox" name="27,1^" value="27,1^"/> See through Feign Death<br/>
                  <input type="checkbox" name="npc_aggro" value="1"<?echo ($npc_aggro == 1) ? "checked" : "";?>/> Can Aggro NPCs<br/>
-                  <input type="checkbox" name="n" value="n"> Does NOT buff/heal friends<br/>
-                  <input type="checkbox" name="j" value="j" onClick="sanityCheck();"/> Tethered<br/>
-                  <input type="checkbox" name="J" value="J" onClick="sanityCheck();"/> Leashed<br/>
+                  <input type="checkbox" name="30,1^" value="30,1^"> Does NOT buff/heal friends<br/>
+                  <input type="checkbox" name="33,1^" value="33,1^" onClick="sanityCheck();"/> Tethered<br/>
+                  <input type="checkbox" name="32,1^" value="32,1^" onClick="sanityCheck();"/> Leashed<br/>
                </td>
              </tr>
            </table>


cavedude 07-24-2013 01:16 PM

The newest editor has quick support added for special abilities (including editing those with params) and also lua quests. It's up on SVN now, or the daily dump can be grabbed tomorrow.

wolfwalkereci 07-24-2013 09:36 PM

Quote:

Originally Posted by cavedude (Post 222708)
The newest editor has quick support added for special abilities (including editing those with params) and also lua quests. It's up on SVN now, or the daily dump can be grabbed tomorrow.

Great news! Thanks to those that actually know what they are doing with the editor. Love that tool.

wolfwalkereci 07-29-2013 07:58 AM

Cavedude or KLS
Another thing I noticed was adding lootdrops either did not let you specify mindrop, droplimit, multiplier, probability or if it did would ignore your input.

I understand that PEQ DB pulls everything off of magelo now in terms of the loot but for doing custom loot it was annoying to have to create then edit.
Not sure if this is correct but it works and here is a patch against r371.
Just noticed r372 is on svn but nothing effected by this patch was touched in r372.

Code:

Index: templates/loot/lootdrop.add.tmpl.php
===================================================================
--- templates/loot/lootdrop.add.tmpl.php    (revision 371)
+++ templates/loot/lootdrop.add.tmpl.php    (working copy)
@@ -13,13 +13,13 @@
              Suggested Name:<br>
              <input type="text" name="name" size="25" value="<?=$name?>"><br><br>
              Mindrop: <br>
-              <input type="text" name="mindrop" size="25" value="0"><br><br>
+              <input type="text" name="mindrop" size="25" value="<?=$mindrop?>"><br><br>
              Droplimit: <br>
-              <input type="text" name="droplimit" size="25" value="0"><br><br>
+              <input type="text" name="droplimit" size="25" value="<?=$droplimit?>"><br><br>
              Multiplier: <br>
-              <input type="text" name="multiplier" size="25" value="1"><br><br>
-        Probability: <br>
-              <input type="text" name="probability" size="25" value="100"><br><br>
+              <input type="text" name="multiplier" size="25" value="<?=$multiplier?>"><br><br>
+              Probability: <br>
+              <input type="text" name="probability" size="25" value="<?=$probability?>"><br><br>
              <center>
                <input type="submit" name="submit" value="Submit Changes">
              </center>
Index: templates/loot/lootdrop.changebyid.tmpl.php
===================================================================
--- templates/loot/lootdrop.changebyid.tmpl.php    (revision 371)
+++ templates/loot/lootdrop.changebyid.tmpl.php    (working copy)
@@ -1,27 +1,27 @@
-      <table class="edit_form">
-        <tr>
-          <td class="edit_form_header">
-            Change Lootdrop
-          </td>
-        </tr>
-        <tr>
-          <td class="edit_form_content">
-            <form name="addlootdrop" method="post" action="index.php?editor=loot&z=<?=$currzone?>&zoneid=<?=$currzoneid?>&npcid=<?=$npcid?>&action=24">
-              <input type="hidden" name="ltid" value="<?=$ltid?>">
-              Enter Lootdrop ID:<br>
-              <input type="text" name="ldid" size="10"><br><br>
-              Mindrop: <br>
-              <input type="text" name="mindrop" size="5" value="0"><br><br>
-              Droplimit: <br>
-              <input type="text" name="droplimit" size="5" value="0"><br><br>
-              Multiplier: <br>
-              <input type="text" name="multiplier" size="5" value="1"><br><br>
-        Probability: <br>
-              <input type="text" name="probability" size="5" value="100"><br><br>
-              <center>
-                <input type="submit">
-              </center>
-            </form>
-          </td>
-        </tr>
-      </table>
+      <table class="edit_form">
+        <tr>
+          <td class="edit_form_header">
+            Change Lootdrop
+          </td>
+        </tr>
+        <tr>
+          <td class="edit_form_content">
+            <form name="addlootdrop" method="post" action="index.php?editor=loot&z=<?=$currzone?>&zoneid=<?=$currzoneid?>&npcid=<?=$npcid?>&action=24">
+              <input type="hidden" name="ltid" value="<?=$ltid?>">
+              Enter Lootdrop ID:<br>
+              <input type="text" name="ldid"><br><br>
+              Probability:<br>
+              <input type="text" name="probability"><br><br>
+              Multiplier:<br>
+              <input type="text" name="multiplier"><br><br>
+              Droplimit:<br>
+              <input type="text" name="droplimit"><br><br>
+              Mindrop:<br>
+              <input type="text" name="mindrop"><br><br>
+              <center>
+                <input type="submit">
+              </center>
+            </form>
+          </td>
+        </tr>
+      </table>
Index: templates/loot/lootdrop.changebysearch.tmpl.php
===================================================================
--- templates/loot/lootdrop.changebysearch.tmpl.php    (revision 371)
+++ templates/loot/lootdrop.changebysearch.tmpl.php    (working copy)
@@ -11,9 +11,13 @@
                Lootdrop ID:<br>
                <input type="text" name="ldid" value="<?=$ldid?>"><br><br>
                Probability:<br>
-              <input type="text" name="prob"><br><br>
+              <input type="text" name="probability"><br><br>
                Multiplier:<br>
-              <input type="text" name="mult"><br><br>
+              <input type="text" name="multiplier"><br><br>
+              Droplimit:<br>
+              <input type="text" name="droplimit"><br><br>
+              Mindrop:<br>
+              <input type="text" name="mindrop"><br><br>
                <center>
                  <input type="submit">
                </center>
Index: templates/loot/loottable.edit.entry.tmpl.php
===================================================================
--- templates/loot/loottable.edit.entry.tmpl.php    (revision 371)
+++ templates/loot/loottable.edit.entry.tmpl.php    (working copy)
@@ -9,8 +9,10 @@
            <strong>LootTable:</strong> <?=$ltid?><br>
            <strong>LootDrop:</strong> <?=$ldid?><br><br>
            <form name="loottable" id="loottable" method="post" action="index.php?editor=loot&z=<?=$currzone?>&zoneid=<?=$currzoneid?>&action=8&npcid=<?=$npcid?>&ltid=<?=$ltid?>&ldid=<?=$ldid?>">
-              Probability: <br><input type="text" name="prob" value="<?=$probability?>"><br><br>
-              Multiplier: <br><input type="text" name="mult" value="<?=$multiplier?>"><br><br>
+              Probability: <br><input type="text" name="probability" value="<?=$probability?>"><br><br>
+              Multiplier: <br><input type="text" name="multiplier" value="<?=$multiplier?>"><br><br>
+              Droplimit: <br><input type="text" name="droplimit" value="<?=$droplimit?>"><br><br>
+              Mindrop: <br><input type="text" name="mindrop" value="<?=$mindrop?>"><br><br>
              <center>
                <input type="submit" name="submit" value="Submit Changes">
              </center>


cavedude 07-29-2013 10:24 AM

Could you tell me exactly where the problem is? It seems to be working fine for me.

wolfwalkereci 07-29-2013 11:16 AM

When you click on loot, select the zone and npc.
LootDrops associated with this LootTable: 3 http://127.0.0.1/peqedit/images/add.gif
Click on add and in this example lets say I am adding a new lootdrop and I want to set probability to 50.
It would save as 0 and I would have to then click on that 0 value which brings up the edit page and enter it there and then it would save.

Minor issue but I noticed it earlier when populating loot in a custom zone and wanted to fix it.

Personal preference is all.
I also changed my copy so when I add items to a loot drop I can set everything on that screen instead of adding a item then having to go in and change stuff like minlvl maxlvl charges and chance.

edit: I probably should be pulling from your daily dump more often but its not like anything is really broken and generating patches seems best off the svn revision.

sorvani 07-29-2013 11:59 AM

The daily dump is best for starting new. or never changing. the SVN is good when you have existing and want to see what changed. Also posting diff for changes = awesome

wolfwalkereci 07-29-2013 12:02 PM

Quote:

Originally Posted by sorvani (Post 222857)
The daily dump is best for starting new. or never changing. the SVN is good when you have existing and want to see what changed. Also posting diff for changes = awesome

Better then going "I changed XYZ and broke it can you fix it for me."
I've been guilty of that in the past :D

cavedude 07-29-2013 12:13 PM

Hmm, the only option I see broken is when adding an existing lootdrop from search. The options to create a new lootdrop or add an existing one by ID both work fine for me.

wolfwalkereci 07-29-2013 12:49 PM

Hmm looking at lootdrop.add.tmpl.php I see how it is written for default values of 0,0,1,100.
I wonder if by putting anything into those fields instead of leaving them blank was what caused it to create lootdrops with 0,0,0,0 in the fields.
Since that patch works I'm going to be lazy and not revert and check but that might be why I was seeing zero across the board.

cavedude 07-29-2013 01:14 PM

Oh, I wanted to mention that. Your changes to lootdrop.add.tmpl.php should be reverted. You replaced the default values (which exist only to save on typing for the user) to variables that aren't even defined yet. The input field itself is what creates those variables, so it's referencing a variable it hasn't even submitted yet. PHP is very forgiving of course, but another language like C++ wouldn't like that too much and crash.

This change creates NULLs for the input boxes (since the variable doesn't exist yet), so if you clicked submit without filling out all the boxes the DB would fill with default values, which are 0s. If that's not the problem, then there may be something else going on for you else where.

wolfwalkereci 07-29-2013 01:32 PM

Quote:

Originally Posted by cavedude (Post 222865)
Oh, I wanted to mention that. Your changes to lootdrop.add.tmpl.php should be reverted. You replaced the default values (which exist only to save on typing for the user) to variables that aren't even defined yet. The input field itself is what creates those variables, so it's referencing a variable it hasn't even submitted yet. PHP is very forgiving of course, but another language like C++ wouldn't like that too much and crash.

This change creates NULLs for the input boxes (since the variable doesn't exist yet), so if you clicked submit without filling out all the boxes the DB would fill with default values, which are 0s. If that's not the problem, then there may be something else going on for you else where.

Ok I am tracking with that. Myself I am in the habit of filling in all the fields with something so I'm not sure if that would be an issue. I'll revert later today and check if not inputing anything would generate a default value (0,0,1,100). -- if so I might just remove the ability to even input anything since every time I do put something in the fields it generates the lootdrop as mindrop through probability with value of 0.

I did take a look at \lib\loot.php and saw in function assign_lootdrop that droplimit, mindrop, multiplier and probability are defined which is why I made the changes to lootdrop.add.tmpl.php


All times are GMT -4. The time now is 06:29 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.