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>
</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?>">
|