diff --git a/_module/are/aantiochfalls.are.json b/_module/are/aantiochfalls.are.json index 24633e1f..0ab4b2d2 100644 --- a/_module/are/aantiochfalls.are.json +++ b/_module/are/aantiochfalls.are.json @@ -6353,7 +6353,7 @@ }, "Version": { "type": "dword", - "value": 49 + "value": 50 }, "Width": { "type": "int", diff --git a/_module/are/aantiochfallscav.are.json b/_module/are/aantiochfallscav.are.json index 520b3735..d0cf97b8 100644 --- a/_module/are/aantiochfallscav.are.json +++ b/_module/are/aantiochfallscav.are.json @@ -1881,7 +1881,7 @@ }, "Version": { "type": "dword", - "value": 31 + "value": 32 }, "Width": { "type": "int", diff --git a/_module/are/area.are.json b/_module/are/area.are.json index 119f70fa..00084a8e 100644 --- a/_module/are/area.are.json +++ b/_module/are/area.are.json @@ -2913,7 +2913,7 @@ }, "Version": { "type": "dword", - "value": 45 + "value": 47 }, "Width": { "type": "int", diff --git a/_module/are/deepdarktunnel.are.json b/_module/are/deepdarktunnel.are.json index 112d83a9..f815eba9 100644 --- a/_module/are/deepdarktunnel.are.json +++ b/_module/are/deepdarktunnel.are.json @@ -4676,7 +4676,7 @@ }, "Version": { "type": "dword", - "value": 7 + "value": 8 }, "Width": { "type": "int", diff --git a/_module/dlg/weaponchange.dlg.json b/_module/dlg/weaponchange.dlg.json index 9dccd112..5cfa1778 100644 --- a/_module/dlg/weaponchange.dlg.json +++ b/_module/dlg/weaponchange.dlg.json @@ -9167,7 +9167,7 @@ "Text": { "type": "cexolocstring", "value": { - "0": "The first thing you need to know is the cost of reforging.\nThe starting cost is 1,000,000 gold for small and medium weapons.\nFor large weapons like greatswords, greataxes, and double bladed weapons is 1,500,000 gold.\nAll ranged weapons are 1,500,000 gold.\nWhy so expensive you may ask? Because reforging requires very expensive materials, and\na greatly modified forge that required upkeep. Not to mention my expertise in forging magical materials.\n\nThe second thing you need to know is to place the weapon you wish reforged into the forge\nthen speak to me after that. Once you close the forge, it locks. Remember that!\n\nThe third is not to place more than one weapon in the forge. \nThe magical properties from only one weapon can be reforged into a new one.\n\nThe fourth is to know if you put any items in the forge beside the weapon\nyou want reforged, you will lose your money and the item/s.\n\nThe fifth is to understand that most melee weapon item properties\nwill work on ranged weapons. Not all will." + "0": "The first thing you need to know is the cost of reforging.\nThe starting cost is 1,000,000 gold for small and medium weapons.\nFor large weapons like greatswords, greataxes, and double bladed weapons is 1,500,000 gold.\nAll ranged weapons are 1,500,000 gold.\nWhy so expensive you may ask? Because reforging requires very expensive materials, and\na greatly modified forge that required upkeep. Not to mention my expertise in forging magical materials.\n\nThe second thing you need to know is to place the weapon you wish reforged into the forge\nthen speak to me after that. You need to money on you to see the list!\n\nThe third is not to place more than one weapon in the forge. \nThe magical properties from only one weapon can be reforged into a new one.\n\nThe fourth is to know if you put any items in the forge beside the weapon\nyou want reforged, you will lose your money and the item/s.\n\nThe fifth is to understand that most melee weapon item properties\nwill work on ranged weapons. OnHit won't." } } } diff --git a/_module/fac/Repute.fac.json b/_module/fac/Repute.fac.json index 06fe7d28..7183cb09 100644 --- a/_module/fac/Repute.fac.json +++ b/_module/fac/Repute.fac.json @@ -317,6 +317,21 @@ "type": "dword", "value": 1 } + }, + { + "__struct_id": 21, + "FactionGlobal": { + "type": "word", + "value": 1 + }, + "FactionName": { + "type": "cexostring", + "value": "Generic" + }, + "FactionParentID": { + "type": "dword", + "value": 2 + } } ] }, @@ -627,15 +642,15 @@ "__struct_id": 20, "FactionID1": { "type": "dword", - "value": 1 + "value": 0 }, "FactionID2": { "type": "dword", - "value": 0 + "value": 21 }, "FactionRep": { "type": "dword", - "value": 100 + "value": 75 } }, { @@ -646,7 +661,7 @@ }, "FactionID2": { "type": "dword", - "value": 1 + "value": 0 }, "FactionRep": { "type": "dword", @@ -659,6 +674,21 @@ "type": "dword", "value": 1 }, + "FactionID2": { + "type": "dword", + "value": 1 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 23, + "FactionID1": { + "type": "dword", + "value": 1 + }, "FactionID2": { "type": "dword", "value": 2 @@ -669,7 +699,7 @@ } }, { - "__struct_id": 23, + "__struct_id": 24, "FactionID1": { "type": "dword", "value": 1 @@ -684,7 +714,7 @@ } }, { - "__struct_id": 24, + "__struct_id": 25, "FactionID1": { "type": "dword", "value": 1 @@ -699,7 +729,7 @@ } }, { - "__struct_id": 25, + "__struct_id": 26, "FactionID1": { "type": "dword", "value": 1 @@ -713,21 +743,6 @@ "value": 50 } }, - { - "__struct_id": 26, - "FactionID1": { - "type": "dword", - "value": 1 - }, - "FactionID2": { - "type": "dword", - "value": 6 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, { "__struct_id": 27, "FactionID1": { @@ -736,7 +751,7 @@ }, "FactionID2": { "type": "dword", - "value": 7 + "value": 6 }, "FactionRep": { "type": "dword", @@ -749,6 +764,21 @@ "type": "dword", "value": 1 }, + "FactionID2": { + "type": "dword", + "value": 7 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 29, + "FactionID1": { + "type": "dword", + "value": 1 + }, "FactionID2": { "type": "dword", "value": 8 @@ -759,7 +789,7 @@ } }, { - "__struct_id": 29, + "__struct_id": 30, "FactionID1": { "type": "dword", "value": 1 @@ -774,7 +804,7 @@ } }, { - "__struct_id": 30, + "__struct_id": 31, "FactionID1": { "type": "dword", "value": 1 @@ -788,21 +818,6 @@ "value": 25 } }, - { - "__struct_id": 31, - "FactionID1": { - "type": "dword", - "value": 1 - }, - "FactionID2": { - "type": "dword", - "value": 11 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, { "__struct_id": 32, "FactionID1": { @@ -811,7 +826,7 @@ }, "FactionID2": { "type": "dword", - "value": 12 + "value": 11 }, "FactionRep": { "type": "dword", @@ -824,6 +839,21 @@ "type": "dword", "value": 1 }, + "FactionID2": { + "type": "dword", + "value": 12 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 34, + "FactionID1": { + "type": "dword", + "value": 1 + }, "FactionID2": { "type": "dword", "value": 13 @@ -834,7 +864,7 @@ } }, { - "__struct_id": 34, + "__struct_id": 35, "FactionID1": { "type": "dword", "value": 1 @@ -849,7 +879,7 @@ } }, { - "__struct_id": 35, + "__struct_id": 36, "FactionID1": { "type": "dword", "value": 1 @@ -864,7 +894,7 @@ } }, { - "__struct_id": 36, + "__struct_id": 37, "FactionID1": { "type": "dword", "value": 1 @@ -879,7 +909,7 @@ } }, { - "__struct_id": 37, + "__struct_id": 38, "FactionID1": { "type": "dword", "value": 1 @@ -894,7 +924,7 @@ } }, { - "__struct_id": 38, + "__struct_id": 39, "FactionID1": { "type": "dword", "value": 1 @@ -909,7 +939,7 @@ } }, { - "__struct_id": 39, + "__struct_id": 40, "FactionID1": { "type": "dword", "value": 1 @@ -924,7 +954,7 @@ } }, { - "__struct_id": 40, + "__struct_id": 41, "FactionID1": { "type": "dword", "value": 1 @@ -938,34 +968,19 @@ "value": 0 } }, - { - "__struct_id": 41, - "FactionID1": { - "type": "dword", - "value": 2 - }, - "FactionID2": { - "type": "dword", - "value": 0 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, { "__struct_id": 42, "FactionID1": { "type": "dword", - "value": 2 + "value": 1 }, "FactionID2": { "type": "dword", - "value": 1 + "value": 21 }, "FactionRep": { "type": "dword", - "value": 10 + "value": 25 } }, { @@ -976,7 +991,7 @@ }, "FactionID2": { "type": "dword", - "value": 2 + "value": 0 }, "FactionRep": { "type": "dword", @@ -989,6 +1004,36 @@ "type": "dword", "value": 2 }, + "FactionID2": { + "type": "dword", + "value": 1 + }, + "FactionRep": { + "type": "dword", + "value": 10 + } + }, + { + "__struct_id": 45, + "FactionID1": { + "type": "dword", + "value": 2 + }, + "FactionID2": { + "type": "dword", + "value": 2 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 46, + "FactionID1": { + "type": "dword", + "value": 2 + }, "FactionID2": { "type": "dword", "value": 3 @@ -999,7 +1044,7 @@ } }, { - "__struct_id": 45, + "__struct_id": 47, "FactionID1": { "type": "dword", "value": 2 @@ -1014,7 +1059,7 @@ } }, { - "__struct_id": 46, + "__struct_id": 48, "FactionID1": { "type": "dword", "value": 2 @@ -1029,7 +1074,7 @@ } }, { - "__struct_id": 47, + "__struct_id": 49, "FactionID1": { "type": "dword", "value": 2 @@ -1043,36 +1088,6 @@ "value": 76 } }, - { - "__struct_id": 48, - "FactionID1": { - "type": "dword", - "value": 2 - }, - "FactionID2": { - "type": "dword", - "value": 7 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 49, - "FactionID1": { - "type": "dword", - "value": 2 - }, - "FactionID2": { - "type": "dword", - "value": 8 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, { "__struct_id": 50, "FactionID1": { @@ -1081,7 +1096,7 @@ }, "FactionID2": { "type": "dword", - "value": 9 + "value": 7 }, "FactionRep": { "type": "dword", @@ -1096,7 +1111,7 @@ }, "FactionID2": { "type": "dword", - "value": 10 + "value": 8 }, "FactionRep": { "type": "dword", @@ -1111,7 +1126,7 @@ }, "FactionID2": { "type": "dword", - "value": 11 + "value": 9 }, "FactionRep": { "type": "dword", @@ -1126,11 +1141,11 @@ }, "FactionID2": { "type": "dword", - "value": 12 + "value": 10 }, "FactionRep": { "type": "dword", - "value": 76 + "value": 75 } }, { @@ -1141,7 +1156,7 @@ }, "FactionID2": { "type": "dword", - "value": 13 + "value": 11 }, "FactionRep": { "type": "dword", @@ -1156,11 +1171,11 @@ }, "FactionID2": { "type": "dword", - "value": 14 + "value": 12 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 76 } }, { @@ -1171,7 +1186,7 @@ }, "FactionID2": { "type": "dword", - "value": 15 + "value": 13 }, "FactionRep": { "type": "dword", @@ -1186,11 +1201,11 @@ }, "FactionID2": { "type": "dword", - "value": 16 + "value": 14 }, "FactionRep": { "type": "dword", - "value": 76 + "value": 75 } }, { @@ -1201,7 +1216,7 @@ }, "FactionID2": { "type": "dword", - "value": 17 + "value": 15 }, "FactionRep": { "type": "dword", @@ -1214,6 +1229,36 @@ "type": "dword", "value": 2 }, + "FactionID2": { + "type": "dword", + "value": 16 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 60, + "FactionID1": { + "type": "dword", + "value": 2 + }, + "FactionID2": { + "type": "dword", + "value": 17 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 61, + "FactionID1": { + "type": "dword", + "value": 2 + }, "FactionID2": { "type": "dword", "value": 18 @@ -1224,7 +1269,7 @@ } }, { - "__struct_id": 60, + "__struct_id": 62, "FactionID1": { "type": "dword", "value": 2 @@ -1239,7 +1284,7 @@ } }, { - "__struct_id": 61, + "__struct_id": 63, "FactionID1": { "type": "dword", "value": 2 @@ -1254,7 +1299,22 @@ } }, { - "__struct_id": 62, + "__struct_id": 64, + "FactionID1": { + "type": "dword", + "value": 2 + }, + "FactionID2": { + "type": "dword", + "value": 21 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 65, "FactionID1": { "type": "dword", "value": 3 @@ -1269,7 +1329,7 @@ } }, { - "__struct_id": 63, + "__struct_id": 66, "FactionID1": { "type": "dword", "value": 3 @@ -1284,7 +1344,7 @@ } }, { - "__struct_id": 64, + "__struct_id": 67, "FactionID1": { "type": "dword", "value": 3 @@ -1298,51 +1358,6 @@ "value": 74 } }, - { - "__struct_id": 65, - "FactionID1": { - "type": "dword", - "value": 3 - }, - "FactionID2": { - "type": "dword", - "value": 4 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 66, - "FactionID1": { - "type": "dword", - "value": 3 - }, - "FactionID2": { - "type": "dword", - "value": 5 - }, - "FactionRep": { - "type": "dword", - "value": 50 - } - }, - { - "__struct_id": 67, - "FactionID1": { - "type": "dword", - "value": 3 - }, - "FactionID2": { - "type": "dword", - "value": 6 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, { "__struct_id": 68, "FactionID1": { @@ -1351,7 +1366,7 @@ }, "FactionID2": { "type": "dword", - "value": 7 + "value": 4 }, "FactionRep": { "type": "dword", @@ -1366,11 +1381,11 @@ }, "FactionID2": { "type": "dword", - "value": 8 + "value": 5 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 50 } }, { @@ -1381,7 +1396,7 @@ }, "FactionID2": { "type": "dword", - "value": 9 + "value": 6 }, "FactionRep": { "type": "dword", @@ -1396,7 +1411,7 @@ }, "FactionID2": { "type": "dword", - "value": 10 + "value": 7 }, "FactionRep": { "type": "dword", @@ -1411,11 +1426,11 @@ }, "FactionID2": { "type": "dword", - "value": 11 + "value": 8 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 74 } }, { @@ -1426,7 +1441,7 @@ }, "FactionID2": { "type": "dword", - "value": 12 + "value": 9 }, "FactionRep": { "type": "dword", @@ -1441,7 +1456,7 @@ }, "FactionID2": { "type": "dword", - "value": 13 + "value": 10 }, "FactionRep": { "type": "dword", @@ -1456,7 +1471,7 @@ }, "FactionID2": { "type": "dword", - "value": 14 + "value": 11 }, "FactionRep": { "type": "dword", @@ -1471,7 +1486,7 @@ }, "FactionID2": { "type": "dword", - "value": 15 + "value": 12 }, "FactionRep": { "type": "dword", @@ -1486,7 +1501,7 @@ }, "FactionID2": { "type": "dword", - "value": 16 + "value": 13 }, "FactionRep": { "type": "dword", @@ -1501,7 +1516,7 @@ }, "FactionID2": { "type": "dword", - "value": 17 + "value": 14 }, "FactionRep": { "type": "dword", @@ -1514,6 +1529,51 @@ "type": "dword", "value": 3 }, + "FactionID2": { + "type": "dword", + "value": 15 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 80, + "FactionID1": { + "type": "dword", + "value": 3 + }, + "FactionID2": { + "type": "dword", + "value": 16 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 81, + "FactionID1": { + "type": "dword", + "value": 3 + }, + "FactionID2": { + "type": "dword", + "value": 17 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 82, + "FactionID1": { + "type": "dword", + "value": 3 + }, "FactionID2": { "type": "dword", "value": 18 @@ -1524,7 +1584,7 @@ } }, { - "__struct_id": 80, + "__struct_id": 83, "FactionID1": { "type": "dword", "value": 3 @@ -1539,7 +1599,7 @@ } }, { - "__struct_id": 81, + "__struct_id": 84, "FactionID1": { "type": "dword", "value": 3 @@ -1553,64 +1613,19 @@ "value": 76 } }, - { - "__struct_id": 82, - "FactionID1": { - "type": "dword", - "value": 4 - }, - "FactionID2": { - "type": "dword", - "value": 0 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, - { - "__struct_id": 83, - "FactionID1": { - "type": "dword", - "value": 4 - }, - "FactionID2": { - "type": "dword", - "value": 1 - }, - "FactionRep": { - "type": "dword", - "value": 10 - } - }, - { - "__struct_id": 84, - "FactionID1": { - "type": "dword", - "value": 4 - }, - "FactionID2": { - "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, { "__struct_id": 85, "FactionID1": { "type": "dword", - "value": 4 + "value": 3 }, "FactionID2": { "type": "dword", - "value": 3 + "value": 21 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 100 } }, { @@ -1621,7 +1636,7 @@ }, "FactionID2": { "type": "dword", - "value": 4 + "value": 0 }, "FactionRep": { "type": "dword", @@ -1636,11 +1651,11 @@ }, "FactionID2": { "type": "dword", - "value": 5 + "value": 1 }, "FactionRep": { "type": "dword", - "value": 50 + "value": 10 } }, { @@ -1651,11 +1666,11 @@ }, "FactionID2": { "type": "dword", - "value": 6 + "value": 2 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 100 } }, { @@ -1666,7 +1681,7 @@ }, "FactionID2": { "type": "dword", - "value": 7 + "value": 3 }, "FactionRep": { "type": "dword", @@ -1681,11 +1696,11 @@ }, "FactionID2": { "type": "dword", - "value": 8 + "value": 4 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 100 } }, { @@ -1696,11 +1711,11 @@ }, "FactionID2": { "type": "dword", - "value": 9 + "value": 5 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 50 } }, { @@ -1711,11 +1726,11 @@ }, "FactionID2": { "type": "dword", - "value": 10 + "value": 6 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 74 } }, { @@ -1726,7 +1741,7 @@ }, "FactionID2": { "type": "dword", - "value": 11 + "value": 7 }, "FactionRep": { "type": "dword", @@ -1741,11 +1756,11 @@ }, "FactionID2": { "type": "dword", - "value": 12 + "value": 8 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 75 } }, { @@ -1756,7 +1771,7 @@ }, "FactionID2": { "type": "dword", - "value": 13 + "value": 9 }, "FactionRep": { "type": "dword", @@ -1771,7 +1786,7 @@ }, "FactionID2": { "type": "dword", - "value": 14 + "value": 10 }, "FactionRep": { "type": "dword", @@ -1786,7 +1801,7 @@ }, "FactionID2": { "type": "dword", - "value": 15 + "value": 11 }, "FactionRep": { "type": "dword", @@ -1801,7 +1816,7 @@ }, "FactionID2": { "type": "dword", - "value": 16 + "value": 12 }, "FactionRep": { "type": "dword", @@ -1816,7 +1831,7 @@ }, "FactionID2": { "type": "dword", - "value": 17 + "value": 13 }, "FactionRep": { "type": "dword", @@ -1831,7 +1846,7 @@ }, "FactionID2": { "type": "dword", - "value": 18 + "value": 14 }, "FactionRep": { "type": "dword", @@ -1844,6 +1859,66 @@ "type": "dword", "value": 4 }, + "FactionID2": { + "type": "dword", + "value": 15 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 102, + "FactionID1": { + "type": "dword", + "value": 4 + }, + "FactionID2": { + "type": "dword", + "value": 16 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 103, + "FactionID1": { + "type": "dword", + "value": 4 + }, + "FactionID2": { + "type": "dword", + "value": 17 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 104, + "FactionID1": { + "type": "dword", + "value": 4 + }, + "FactionID2": { + "type": "dword", + "value": 18 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 105, + "FactionID1": { + "type": "dword", + "value": 4 + }, "FactionID2": { "type": "dword", "value": 19 @@ -1854,7 +1929,7 @@ } }, { - "__struct_id": 102, + "__struct_id": 106, "FactionID1": { "type": "dword", "value": 4 @@ -1869,80 +1944,20 @@ } }, { - "__struct_id": 103, + "__struct_id": 107, "FactionID1": { "type": "dword", - "value": 5 + "value": 4 }, "FactionID2": { "type": "dword", - "value": 0 + "value": 21 }, "FactionRep": { "type": "dword", "value": 100 } }, - { - "__struct_id": 104, - "FactionID1": { - "type": "dword", - "value": 5 - }, - "FactionID2": { - "type": "dword", - "value": 1 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 105, - "FactionID1": { - "type": "dword", - "value": 5 - }, - "FactionID2": { - "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 106, - "FactionID1": { - "type": "dword", - "value": 5 - }, - "FactionID2": { - "type": "dword", - "value": 3 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 107, - "FactionID1": { - "type": "dword", - "value": 5 - }, - "FactionID2": { - "type": "dword", - "value": 4 - }, - "FactionRep": { - "type": "dword", - "value": 49 - } - }, { "__struct_id": 108, "FactionID1": { @@ -1951,7 +1966,7 @@ }, "FactionID2": { "type": "dword", - "value": 5 + "value": 0 }, "FactionRep": { "type": "dword", @@ -1966,11 +1981,11 @@ }, "FactionID2": { "type": "dword", - "value": 6 + "value": 1 }, "FactionRep": { "type": "dword", - "value": 50 + "value": 75 } }, { @@ -1981,11 +1996,11 @@ }, "FactionID2": { "type": "dword", - "value": 7 + "value": 2 }, "FactionRep": { "type": "dword", - "value": 50 + "value": 75 } }, { @@ -1996,11 +2011,11 @@ }, "FactionID2": { "type": "dword", - "value": 8 + "value": 3 }, "FactionRep": { "type": "dword", - "value": 25 + "value": 74 } }, { @@ -2011,7 +2026,7 @@ }, "FactionID2": { "type": "dword", - "value": 9 + "value": 4 }, "FactionRep": { "type": "dword", @@ -2026,11 +2041,11 @@ }, "FactionID2": { "type": "dword", - "value": 10 + "value": 5 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 100 } }, { @@ -2041,11 +2056,11 @@ }, "FactionID2": { "type": "dword", - "value": 11 + "value": 6 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 50 } }, { @@ -2056,11 +2071,11 @@ }, "FactionID2": { "type": "dword", - "value": 12 + "value": 7 }, "FactionRep": { "type": "dword", - "value": 25 + "value": 50 } }, { @@ -2071,7 +2086,7 @@ }, "FactionID2": { "type": "dword", - "value": 13 + "value": 8 }, "FactionRep": { "type": "dword", @@ -2086,11 +2101,11 @@ }, "FactionID2": { "type": "dword", - "value": 14 + "value": 9 }, "FactionRep": { "type": "dword", - "value": 51 + "value": 49 } }, { @@ -2101,7 +2116,7 @@ }, "FactionID2": { "type": "dword", - "value": 15 + "value": 10 }, "FactionRep": { "type": "dword", @@ -2114,6 +2129,81 @@ "type": "dword", "value": 5 }, + "FactionID2": { + "type": "dword", + "value": 11 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 120, + "FactionID1": { + "type": "dword", + "value": 5 + }, + "FactionID2": { + "type": "dword", + "value": 12 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 121, + "FactionID1": { + "type": "dword", + "value": 5 + }, + "FactionID2": { + "type": "dword", + "value": 13 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 122, + "FactionID1": { + "type": "dword", + "value": 5 + }, + "FactionID2": { + "type": "dword", + "value": 14 + }, + "FactionRep": { + "type": "dword", + "value": 51 + } + }, + { + "__struct_id": 123, + "FactionID1": { + "type": "dword", + "value": 5 + }, + "FactionID2": { + "type": "dword", + "value": 15 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 124, + "FactionID1": { + "type": "dword", + "value": 5 + }, "FactionID2": { "type": "dword", "value": 16 @@ -2124,7 +2214,7 @@ } }, { - "__struct_id": 120, + "__struct_id": 125, "FactionID1": { "type": "dword", "value": 5 @@ -2139,7 +2229,7 @@ } }, { - "__struct_id": 121, + "__struct_id": 126, "FactionID1": { "type": "dword", "value": 5 @@ -2154,7 +2244,7 @@ } }, { - "__struct_id": 122, + "__struct_id": 127, "FactionID1": { "type": "dword", "value": 5 @@ -2169,7 +2259,7 @@ } }, { - "__struct_id": 123, + "__struct_id": 128, "FactionID1": { "type": "dword", "value": 5 @@ -2183,94 +2273,19 @@ "value": 75 } }, - { - "__struct_id": 124, - "FactionID1": { - "type": "dword", - "value": 6 - }, - "FactionID2": { - "type": "dword", - "value": 0 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, - { - "__struct_id": 125, - "FactionID1": { - "type": "dword", - "value": 6 - }, - "FactionID2": { - "type": "dword", - "value": 1 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 126, - "FactionID1": { - "type": "dword", - "value": 6 - }, - "FactionID2": { - "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 127, - "FactionID1": { - "type": "dword", - "value": 6 - }, - "FactionID2": { - "type": "dword", - "value": 3 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 128, - "FactionID1": { - "type": "dword", - "value": 6 - }, - "FactionID2": { - "type": "dword", - "value": 4 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, { "__struct_id": 129, "FactionID1": { "type": "dword", - "value": 6 + "value": 5 }, "FactionID2": { "type": "dword", - "value": 5 + "value": 21 }, "FactionRep": { "type": "dword", - "value": 24 + "value": 75 } }, { @@ -2281,7 +2296,7 @@ }, "FactionID2": { "type": "dword", - "value": 6 + "value": 0 }, "FactionRep": { "type": "dword", @@ -2296,7 +2311,7 @@ }, "FactionID2": { "type": "dword", - "value": 7 + "value": 1 }, "FactionRep": { "type": "dword", @@ -2311,7 +2326,7 @@ }, "FactionID2": { "type": "dword", - "value": 8 + "value": 2 }, "FactionRep": { "type": "dword", @@ -2326,11 +2341,11 @@ }, "FactionID2": { "type": "dword", - "value": 9 + "value": 3 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 74 } }, { @@ -2341,11 +2356,11 @@ }, "FactionID2": { "type": "dword", - "value": 10 + "value": 4 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 25 } }, { @@ -2356,11 +2371,11 @@ }, "FactionID2": { "type": "dword", - "value": 11 + "value": 5 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 24 } }, { @@ -2371,11 +2386,11 @@ }, "FactionID2": { "type": "dword", - "value": 12 + "value": 6 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 100 } }, { @@ -2386,7 +2401,7 @@ }, "FactionID2": { "type": "dword", - "value": 13 + "value": 7 }, "FactionRep": { "type": "dword", @@ -2401,11 +2416,11 @@ }, "FactionID2": { "type": "dword", - "value": 14 + "value": 8 }, "FactionRep": { "type": "dword", - "value": 25 + "value": 75 } }, { @@ -2416,7 +2431,7 @@ }, "FactionID2": { "type": "dword", - "value": 15 + "value": 9 }, "FactionRep": { "type": "dword", @@ -2431,7 +2446,7 @@ }, "FactionID2": { "type": "dword", - "value": 16 + "value": 10 }, "FactionRep": { "type": "dword", @@ -2446,7 +2461,7 @@ }, "FactionID2": { "type": "dword", - "value": 17 + "value": 11 }, "FactionRep": { "type": "dword", @@ -2461,7 +2476,7 @@ }, "FactionID2": { "type": "dword", - "value": 18 + "value": 12 }, "FactionRep": { "type": "dword", @@ -2476,7 +2491,7 @@ }, "FactionID2": { "type": "dword", - "value": 19 + "value": 13 }, "FactionRep": { "type": "dword", @@ -2491,37 +2506,37 @@ }, "FactionID2": { "type": "dword", - "value": 20 + "value": 14 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 145, + "FactionID1": { + "type": "dword", + "value": 6 + }, + "FactionID2": { + "type": "dword", + "value": 15 }, "FactionRep": { "type": "dword", "value": 75 } }, - { - "__struct_id": 145, - "FactionID1": { - "type": "dword", - "value": 7 - }, - "FactionID2": { - "type": "dword", - "value": 0 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, { "__struct_id": 146, "FactionID1": { "type": "dword", - "value": 7 + "value": 6 }, "FactionID2": { "type": "dword", - "value": 1 + "value": 16 }, "FactionRep": { "type": "dword", @@ -2532,11 +2547,11 @@ "__struct_id": 147, "FactionID1": { "type": "dword", - "value": 7 + "value": 6 }, "FactionID2": { "type": "dword", - "value": 2 + "value": 17 }, "FactionRep": { "type": "dword", @@ -2547,60 +2562,60 @@ "__struct_id": 148, "FactionID1": { "type": "dword", - "value": 7 + "value": 6 }, "FactionID2": { "type": "dword", - "value": 3 + "value": 18 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 75 } }, { "__struct_id": 149, "FactionID1": { "type": "dword", - "value": 7 + "value": 6 }, "FactionID2": { "type": "dword", - "value": 4 + "value": 19 }, "FactionRep": { "type": "dword", - "value": 25 + "value": 75 } }, { "__struct_id": 150, "FactionID1": { "type": "dword", - "value": 7 + "value": 6 }, "FactionID2": { "type": "dword", - "value": 5 + "value": 20 }, "FactionRep": { "type": "dword", - "value": 24 + "value": 75 } }, { "__struct_id": 151, "FactionID1": { "type": "dword", - "value": 7 + "value": 6 }, "FactionID2": { "type": "dword", - "value": 6 + "value": 21 }, "FactionRep": { "type": "dword", - "value": 76 + "value": 75 } }, { @@ -2611,7 +2626,7 @@ }, "FactionID2": { "type": "dword", - "value": 7 + "value": 0 }, "FactionRep": { "type": "dword", @@ -2626,7 +2641,7 @@ }, "FactionID2": { "type": "dword", - "value": 8 + "value": 1 }, "FactionRep": { "type": "dword", @@ -2641,7 +2656,7 @@ }, "FactionID2": { "type": "dword", - "value": 9 + "value": 2 }, "FactionRep": { "type": "dword", @@ -2656,11 +2671,11 @@ }, "FactionID2": { "type": "dword", - "value": 10 + "value": 3 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 74 } }, { @@ -2671,11 +2686,11 @@ }, "FactionID2": { "type": "dword", - "value": 11 + "value": 4 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 25 } }, { @@ -2686,11 +2701,11 @@ }, "FactionID2": { "type": "dword", - "value": 12 + "value": 5 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 24 } }, { @@ -2701,11 +2716,11 @@ }, "FactionID2": { "type": "dword", - "value": 13 + "value": 6 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 76 } }, { @@ -2716,11 +2731,11 @@ }, "FactionID2": { "type": "dword", - "value": 14 + "value": 7 }, "FactionRep": { "type": "dword", - "value": 25 + "value": 100 } }, { @@ -2731,7 +2746,7 @@ }, "FactionID2": { "type": "dword", - "value": 15 + "value": 8 }, "FactionRep": { "type": "dword", @@ -2746,7 +2761,7 @@ }, "FactionID2": { "type": "dword", - "value": 16 + "value": 9 }, "FactionRep": { "type": "dword", @@ -2761,7 +2776,7 @@ }, "FactionID2": { "type": "dword", - "value": 17 + "value": 10 }, "FactionRep": { "type": "dword", @@ -2776,7 +2791,7 @@ }, "FactionID2": { "type": "dword", - "value": 18 + "value": 11 }, "FactionRep": { "type": "dword", @@ -2791,7 +2806,7 @@ }, "FactionID2": { "type": "dword", - "value": 19 + "value": 12 }, "FactionRep": { "type": "dword", @@ -2806,7 +2821,7 @@ }, "FactionID2": { "type": "dword", - "value": 20 + "value": 13 }, "FactionRep": { "type": "dword", @@ -2817,41 +2832,41 @@ "__struct_id": 166, "FactionID1": { "type": "dword", - "value": 8 + "value": 7 }, "FactionID2": { "type": "dword", - "value": 0 + "value": 14 }, "FactionRep": { "type": "dword", - "value": 100 + "value": 25 } }, { "__struct_id": 167, "FactionID1": { "type": "dword", - "value": 8 + "value": 7 }, "FactionID2": { "type": "dword", - "value": 1 + "value": 15 }, "FactionRep": { "type": "dword", - "value": 0 + "value": 75 } }, { "__struct_id": 168, "FactionID1": { "type": "dword", - "value": 8 + "value": 7 }, "FactionID2": { "type": "dword", - "value": 2 + "value": 16 }, "FactionRep": { "type": "dword", @@ -2862,26 +2877,26 @@ "__struct_id": 169, "FactionID1": { "type": "dword", - "value": 8 + "value": 7 }, "FactionID2": { "type": "dword", - "value": 3 + "value": 17 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 75 } }, { "__struct_id": 170, "FactionID1": { "type": "dword", - "value": 8 + "value": 7 }, "FactionID2": { "type": "dword", - "value": 4 + "value": 18 }, "FactionRep": { "type": "dword", @@ -2892,45 +2907,45 @@ "__struct_id": 171, "FactionID1": { "type": "dword", - "value": 8 + "value": 7 }, "FactionID2": { "type": "dword", - "value": 5 + "value": 19 }, "FactionRep": { "type": "dword", - "value": 76 + "value": 75 } }, { "__struct_id": 172, "FactionID1": { "type": "dword", - "value": 8 + "value": 7 }, "FactionID2": { "type": "dword", - "value": 6 + "value": 20 }, "FactionRep": { "type": "dword", - "value": 76 + "value": 75 } }, { "__struct_id": 173, "FactionID1": { "type": "dword", - "value": 8 + "value": 7 }, "FactionID2": { "type": "dword", - "value": 7 + "value": 21 }, "FactionRep": { "type": "dword", - "value": 76 + "value": 75 } }, { @@ -2941,7 +2956,7 @@ }, "FactionID2": { "type": "dword", - "value": 8 + "value": 0 }, "FactionRep": { "type": "dword", @@ -2956,11 +2971,11 @@ }, "FactionID2": { "type": "dword", - "value": 9 + "value": 1 }, "FactionRep": { "type": "dword", - "value": 73 + "value": 0 } }, { @@ -2971,7 +2986,7 @@ }, "FactionID2": { "type": "dword", - "value": 10 + "value": 2 }, "FactionRep": { "type": "dword", @@ -2986,11 +3001,11 @@ }, "FactionID2": { "type": "dword", - "value": 11 + "value": 3 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 74 } }, { @@ -3001,11 +3016,11 @@ }, "FactionID2": { "type": "dword", - "value": 12 + "value": 4 }, "FactionRep": { "type": "dword", - "value": 25 + "value": 75 } }, { @@ -3016,11 +3031,11 @@ }, "FactionID2": { "type": "dword", - "value": 13 + "value": 5 }, "FactionRep": { "type": "dword", - "value": 25 + "value": 76 } }, { @@ -3031,11 +3046,11 @@ }, "FactionID2": { "type": "dword", - "value": 14 + "value": 6 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 76 } }, { @@ -3046,11 +3061,11 @@ }, "FactionID2": { "type": "dword", - "value": 15 + "value": 7 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 76 } }, { @@ -3061,11 +3076,11 @@ }, "FactionID2": { "type": "dword", - "value": 16 + "value": 8 }, "FactionRep": { "type": "dword", - "value": 25 + "value": 100 } }, { @@ -3076,11 +3091,11 @@ }, "FactionID2": { "type": "dword", - "value": 17 + "value": 9 }, "FactionRep": { "type": "dword", - "value": 25 + "value": 73 } }, { @@ -3091,7 +3106,7 @@ }, "FactionID2": { "type": "dword", - "value": 18 + "value": 10 }, "FactionRep": { "type": "dword", @@ -3106,7 +3121,7 @@ }, "FactionID2": { "type": "dword", - "value": 19 + "value": 11 }, "FactionRep": { "type": "dword", @@ -3121,37 +3136,37 @@ }, "FactionID2": { "type": "dword", - "value": 20 + "value": 12 }, "FactionRep": { "type": "dword", - "value": 0 + "value": 25 } }, { "__struct_id": 187, "FactionID1": { "type": "dword", - "value": 9 + "value": 8 }, "FactionID2": { "type": "dword", - "value": 0 + "value": 13 }, "FactionRep": { "type": "dword", - "value": 100 + "value": 25 } }, { "__struct_id": 188, "FactionID1": { "type": "dword", - "value": 9 + "value": 8 }, "FactionID2": { "type": "dword", - "value": 1 + "value": 14 }, "FactionRep": { "type": "dword", @@ -3162,26 +3177,11 @@ "__struct_id": 189, "FactionID1": { "type": "dword", - "value": 9 + "value": 8 }, "FactionID2": { "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 48 - } - }, - { - "__struct_id": 190, - "FactionID1": { - "type": "dword", - "value": 9 - }, - "FactionID2": { - "type": "dword", - "value": 3 + "value": 15 }, "FactionRep": { "type": "dword", @@ -3189,78 +3189,93 @@ } }, { - "__struct_id": 191, + "__struct_id": 190, "FactionID1": { "type": "dword", - "value": 9 + "value": 8 }, "FactionID2": { "type": "dword", - "value": 4 + "value": 16 }, "FactionRep": { "type": "dword", - "value": 26 + "value": 25 + } + }, + { + "__struct_id": 191, + "FactionID1": { + "type": "dword", + "value": 8 + }, + "FactionID2": { + "type": "dword", + "value": 17 + }, + "FactionRep": { + "type": "dword", + "value": 25 } }, { "__struct_id": 192, "FactionID1": { "type": "dword", - "value": 9 + "value": 8 }, "FactionID2": { "type": "dword", - "value": 5 + "value": 18 }, "FactionRep": { "type": "dword", - "value": 76 + "value": 75 } }, { "__struct_id": 193, "FactionID1": { "type": "dword", - "value": 9 + "value": 8 }, "FactionID2": { "type": "dword", - "value": 6 + "value": 19 }, "FactionRep": { "type": "dword", - "value": 76 + "value": 75 } }, { "__struct_id": 194, "FactionID1": { "type": "dword", - "value": 9 + "value": 8 }, "FactionID2": { "type": "dword", - "value": 7 + "value": 20 }, "FactionRep": { "type": "dword", - "value": 76 + "value": 0 } }, { "__struct_id": 195, "FactionID1": { "type": "dword", - "value": 9 + "value": 8 }, "FactionID2": { "type": "dword", - "value": 8 + "value": 21 }, "FactionRep": { "type": "dword", - "value": 25 + "value": 75 } }, { @@ -3271,7 +3286,7 @@ }, "FactionID2": { "type": "dword", - "value": 9 + "value": 0 }, "FactionRep": { "type": "dword", @@ -3286,7 +3301,7 @@ }, "FactionID2": { "type": "dword", - "value": 10 + "value": 1 }, "FactionRep": { "type": "dword", @@ -3299,6 +3314,141 @@ "type": "dword", "value": 9 }, + "FactionID2": { + "type": "dword", + "value": 2 + }, + "FactionRep": { + "type": "dword", + "value": 48 + } + }, + { + "__struct_id": 199, + "FactionID1": { + "type": "dword", + "value": 9 + }, + "FactionID2": { + "type": "dword", + "value": 3 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 200, + "FactionID1": { + "type": "dword", + "value": 9 + }, + "FactionID2": { + "type": "dword", + "value": 4 + }, + "FactionRep": { + "type": "dword", + "value": 26 + } + }, + { + "__struct_id": 201, + "FactionID1": { + "type": "dword", + "value": 9 + }, + "FactionID2": { + "type": "dword", + "value": 5 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 202, + "FactionID1": { + "type": "dword", + "value": 9 + }, + "FactionID2": { + "type": "dword", + "value": 6 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 203, + "FactionID1": { + "type": "dword", + "value": 9 + }, + "FactionID2": { + "type": "dword", + "value": 7 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 204, + "FactionID1": { + "type": "dword", + "value": 9 + }, + "FactionID2": { + "type": "dword", + "value": 8 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 205, + "FactionID1": { + "type": "dword", + "value": 9 + }, + "FactionID2": { + "type": "dword", + "value": 9 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 206, + "FactionID1": { + "type": "dword", + "value": 9 + }, + "FactionID2": { + "type": "dword", + "value": 10 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 207, + "FactionID1": { + "type": "dword", + "value": 9 + }, "FactionID2": { "type": "dword", "value": 11 @@ -3309,7 +3459,7 @@ } }, { - "__struct_id": 199, + "__struct_id": 208, "FactionID1": { "type": "dword", "value": 9 @@ -3324,7 +3474,7 @@ } }, { - "__struct_id": 200, + "__struct_id": 209, "FactionID1": { "type": "dword", "value": 9 @@ -3339,7 +3489,7 @@ } }, { - "__struct_id": 201, + "__struct_id": 210, "FactionID1": { "type": "dword", "value": 9 @@ -3354,7 +3504,7 @@ } }, { - "__struct_id": 202, + "__struct_id": 211, "FactionID1": { "type": "dword", "value": 9 @@ -3369,7 +3519,7 @@ } }, { - "__struct_id": 203, + "__struct_id": 212, "FactionID1": { "type": "dword", "value": 9 @@ -3384,7 +3534,7 @@ } }, { - "__struct_id": 204, + "__struct_id": 213, "FactionID1": { "type": "dword", "value": 9 @@ -3399,7 +3549,7 @@ } }, { - "__struct_id": 205, + "__struct_id": 214, "FactionID1": { "type": "dword", "value": 9 @@ -3414,7 +3564,7 @@ } }, { - "__struct_id": 206, + "__struct_id": 215, "FactionID1": { "type": "dword", "value": 9 @@ -3429,7 +3579,7 @@ } }, { - "__struct_id": 207, + "__struct_id": 216, "FactionID1": { "type": "dword", "value": 9 @@ -3443,154 +3593,19 @@ "value": 75 } }, - { - "__struct_id": 208, - "FactionID1": { - "type": "dword", - "value": 10 - }, - "FactionID2": { - "type": "dword", - "value": 0 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, - { - "__struct_id": 209, - "FactionID1": { - "type": "dword", - "value": 10 - }, - "FactionID2": { - "type": "dword", - "value": 1 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 210, - "FactionID1": { - "type": "dword", - "value": 10 - }, - "FactionID2": { - "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 211, - "FactionID1": { - "type": "dword", - "value": 10 - }, - "FactionID2": { - "type": "dword", - "value": 3 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 212, - "FactionID1": { - "type": "dword", - "value": 10 - }, - "FactionID2": { - "type": "dword", - "value": 4 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 213, - "FactionID1": { - "type": "dword", - "value": 10 - }, - "FactionID2": { - "type": "dword", - "value": 5 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, - { - "__struct_id": 214, - "FactionID1": { - "type": "dword", - "value": 10 - }, - "FactionID2": { - "type": "dword", - "value": 6 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 215, - "FactionID1": { - "type": "dword", - "value": 10 - }, - "FactionID2": { - "type": "dword", - "value": 7 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 216, - "FactionID1": { - "type": "dword", - "value": 10 - }, - "FactionID2": { - "type": "dword", - "value": 8 - }, - "FactionRep": { - "type": "dword", - "value": 0 - } - }, { "__struct_id": 217, "FactionID1": { "type": "dword", - "value": 10 + "value": 9 }, "FactionID2": { "type": "dword", - "value": 9 + "value": 21 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 48 } }, { @@ -3601,7 +3616,7 @@ }, "FactionID2": { "type": "dword", - "value": 10 + "value": 0 }, "FactionRep": { "type": "dword", @@ -3616,7 +3631,7 @@ }, "FactionID2": { "type": "dword", - "value": 11 + "value": 1 }, "FactionRep": { "type": "dword", @@ -3631,11 +3646,11 @@ }, "FactionID2": { "type": "dword", - "value": 12 + "value": 2 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 75 } }, { @@ -3646,7 +3661,7 @@ }, "FactionID2": { "type": "dword", - "value": 13 + "value": 3 }, "FactionRep": { "type": "dword", @@ -3661,11 +3676,11 @@ }, "FactionID2": { "type": "dword", - "value": 14 + "value": 4 }, "FactionRep": { "type": "dword", - "value": 0 + "value": 75 } }, { @@ -3676,11 +3691,11 @@ }, "FactionID2": { "type": "dword", - "value": 15 + "value": 5 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 25 } }, { @@ -3691,7 +3706,7 @@ }, "FactionID2": { "type": "dword", - "value": 16 + "value": 6 }, "FactionRep": { "type": "dword", @@ -3706,7 +3721,7 @@ }, "FactionID2": { "type": "dword", - "value": 17 + "value": 7 }, "FactionRep": { "type": "dword", @@ -3719,6 +3734,156 @@ "type": "dword", "value": 10 }, + "FactionID2": { + "type": "dword", + "value": 8 + }, + "FactionRep": { + "type": "dword", + "value": 0 + } + }, + { + "__struct_id": 227, + "FactionID1": { + "type": "dword", + "value": 10 + }, + "FactionID2": { + "type": "dword", + "value": 9 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 228, + "FactionID1": { + "type": "dword", + "value": 10 + }, + "FactionID2": { + "type": "dword", + "value": 10 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 229, + "FactionID1": { + "type": "dword", + "value": 10 + }, + "FactionID2": { + "type": "dword", + "value": 11 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 230, + "FactionID1": { + "type": "dword", + "value": 10 + }, + "FactionID2": { + "type": "dword", + "value": 12 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 231, + "FactionID1": { + "type": "dword", + "value": 10 + }, + "FactionID2": { + "type": "dword", + "value": 13 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 232, + "FactionID1": { + "type": "dword", + "value": 10 + }, + "FactionID2": { + "type": "dword", + "value": 14 + }, + "FactionRep": { + "type": "dword", + "value": 0 + } + }, + { + "__struct_id": 233, + "FactionID1": { + "type": "dword", + "value": 10 + }, + "FactionID2": { + "type": "dword", + "value": 15 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 234, + "FactionID1": { + "type": "dword", + "value": 10 + }, + "FactionID2": { + "type": "dword", + "value": 16 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 235, + "FactionID1": { + "type": "dword", + "value": 10 + }, + "FactionID2": { + "type": "dword", + "value": 17 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 236, + "FactionID1": { + "type": "dword", + "value": 10 + }, "FactionID2": { "type": "dword", "value": 18 @@ -3729,7 +3894,7 @@ } }, { - "__struct_id": 227, + "__struct_id": 237, "FactionID1": { "type": "dword", "value": 10 @@ -3744,7 +3909,7 @@ } }, { - "__struct_id": 228, + "__struct_id": 238, "FactionID1": { "type": "dword", "value": 10 @@ -3758,165 +3923,15 @@ "value": 74 } }, - { - "__struct_id": 229, - "FactionID1": { - "type": "dword", - "value": 11 - }, - "FactionID2": { - "type": "dword", - "value": 0 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, - { - "__struct_id": 230, - "FactionID1": { - "type": "dword", - "value": 11 - }, - "FactionID2": { - "type": "dword", - "value": 1 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 231, - "FactionID1": { - "type": "dword", - "value": 11 - }, - "FactionID2": { - "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 232, - "FactionID1": { - "type": "dword", - "value": 11 - }, - "FactionID2": { - "type": "dword", - "value": 3 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 233, - "FactionID1": { - "type": "dword", - "value": 11 - }, - "FactionID2": { - "type": "dword", - "value": 4 - }, - "FactionRep": { - "type": "dword", - "value": 0 - } - }, - { - "__struct_id": 234, - "FactionID1": { - "type": "dword", - "value": 11 - }, - "FactionID2": { - "type": "dword", - "value": 5 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, - { - "__struct_id": 235, - "FactionID1": { - "type": "dword", - "value": 11 - }, - "FactionID2": { - "type": "dword", - "value": 6 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 236, - "FactionID1": { - "type": "dword", - "value": 11 - }, - "FactionID2": { - "type": "dword", - "value": 7 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 237, - "FactionID1": { - "type": "dword", - "value": 11 - }, - "FactionID2": { - "type": "dword", - "value": 8 - }, - "FactionRep": { - "type": "dword", - "value": 0 - } - }, - { - "__struct_id": 238, - "FactionID1": { - "type": "dword", - "value": 11 - }, - "FactionID2": { - "type": "dword", - "value": 9 - }, - "FactionRep": { - "type": "dword", - "value": 77 - } - }, { "__struct_id": 239, "FactionID1": { "type": "dword", - "value": 11 + "value": 10 }, "FactionID2": { "type": "dword", - "value": 10 + "value": 21 }, "FactionRep": { "type": "dword", @@ -3931,7 +3946,7 @@ }, "FactionID2": { "type": "dword", - "value": 11 + "value": 0 }, "FactionRep": { "type": "dword", @@ -3944,6 +3959,171 @@ "type": "dword", "value": 11 }, + "FactionID2": { + "type": "dword", + "value": 1 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 242, + "FactionID1": { + "type": "dword", + "value": 11 + }, + "FactionID2": { + "type": "dword", + "value": 2 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 243, + "FactionID1": { + "type": "dword", + "value": 11 + }, + "FactionID2": { + "type": "dword", + "value": 3 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 244, + "FactionID1": { + "type": "dword", + "value": 11 + }, + "FactionID2": { + "type": "dword", + "value": 4 + }, + "FactionRep": { + "type": "dword", + "value": 0 + } + }, + { + "__struct_id": 245, + "FactionID1": { + "type": "dword", + "value": 11 + }, + "FactionID2": { + "type": "dword", + "value": 5 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 246, + "FactionID1": { + "type": "dword", + "value": 11 + }, + "FactionID2": { + "type": "dword", + "value": 6 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 247, + "FactionID1": { + "type": "dword", + "value": 11 + }, + "FactionID2": { + "type": "dword", + "value": 7 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 248, + "FactionID1": { + "type": "dword", + "value": 11 + }, + "FactionID2": { + "type": "dword", + "value": 8 + }, + "FactionRep": { + "type": "dword", + "value": 0 + } + }, + { + "__struct_id": 249, + "FactionID1": { + "type": "dword", + "value": 11 + }, + "FactionID2": { + "type": "dword", + "value": 9 + }, + "FactionRep": { + "type": "dword", + "value": 77 + } + }, + { + "__struct_id": 250, + "FactionID1": { + "type": "dword", + "value": 11 + }, + "FactionID2": { + "type": "dword", + "value": 10 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 251, + "FactionID1": { + "type": "dword", + "value": 11 + }, + "FactionID2": { + "type": "dword", + "value": 11 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 252, + "FactionID1": { + "type": "dword", + "value": 11 + }, "FactionID2": { "type": "dword", "value": 12 @@ -3954,7 +4134,7 @@ } }, { - "__struct_id": 242, + "__struct_id": 253, "FactionID1": { "type": "dword", "value": 11 @@ -3969,7 +4149,7 @@ } }, { - "__struct_id": 243, + "__struct_id": 254, "FactionID1": { "type": "dword", "value": 11 @@ -3984,7 +4164,7 @@ } }, { - "__struct_id": 244, + "__struct_id": 255, "FactionID1": { "type": "dword", "value": 11 @@ -3999,7 +4179,7 @@ } }, { - "__struct_id": 245, + "__struct_id": 256, "FactionID1": { "type": "dword", "value": 11 @@ -4014,7 +4194,7 @@ } }, { - "__struct_id": 246, + "__struct_id": 257, "FactionID1": { "type": "dword", "value": 11 @@ -4029,7 +4209,7 @@ } }, { - "__struct_id": 247, + "__struct_id": 258, "FactionID1": { "type": "dword", "value": 11 @@ -4044,7 +4224,7 @@ } }, { - "__struct_id": 248, + "__struct_id": 259, "FactionID1": { "type": "dword", "value": 11 @@ -4059,7 +4239,7 @@ } }, { - "__struct_id": 249, + "__struct_id": 260, "FactionID1": { "type": "dword", "value": 11 @@ -4073,184 +4253,19 @@ "value": 74 } }, - { - "__struct_id": 250, - "FactionID1": { - "type": "dword", - "value": 12 - }, - "FactionID2": { - "type": "dword", - "value": 0 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, - { - "__struct_id": 251, - "FactionID1": { - "type": "dword", - "value": 12 - }, - "FactionID2": { - "type": "dword", - "value": 1 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 252, - "FactionID1": { - "type": "dword", - "value": 12 - }, - "FactionID2": { - "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 253, - "FactionID1": { - "type": "dword", - "value": 12 - }, - "FactionID2": { - "type": "dword", - "value": 3 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 254, - "FactionID1": { - "type": "dword", - "value": 12 - }, - "FactionID2": { - "type": "dword", - "value": 4 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, - { - "__struct_id": 255, - "FactionID1": { - "type": "dword", - "value": 12 - }, - "FactionID2": { - "type": "dword", - "value": 5 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, - { - "__struct_id": 256, - "FactionID1": { - "type": "dword", - "value": 12 - }, - "FactionID2": { - "type": "dword", - "value": 6 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 257, - "FactionID1": { - "type": "dword", - "value": 12 - }, - "FactionID2": { - "type": "dword", - "value": 7 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 258, - "FactionID1": { - "type": "dword", - "value": 12 - }, - "FactionID2": { - "type": "dword", - "value": 8 - }, - "FactionRep": { - "type": "dword", - "value": 0 - } - }, - { - "__struct_id": 259, - "FactionID1": { - "type": "dword", - "value": 12 - }, - "FactionID2": { - "type": "dword", - "value": 9 - }, - "FactionRep": { - "type": "dword", - "value": 77 - } - }, - { - "__struct_id": 260, - "FactionID1": { - "type": "dword", - "value": 12 - }, - "FactionID2": { - "type": "dword", - "value": 10 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, { "__struct_id": 261, "FactionID1": { "type": "dword", - "value": 12 + "value": 11 }, "FactionID2": { "type": "dword", - "value": 11 + "value": 21 }, "FactionRep": { "type": "dword", - "value": 76 + "value": 75 } }, { @@ -4261,7 +4276,7 @@ }, "FactionID2": { "type": "dword", - "value": 12 + "value": 0 }, "FactionRep": { "type": "dword", @@ -4274,6 +4289,186 @@ "type": "dword", "value": 12 }, + "FactionID2": { + "type": "dword", + "value": 1 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 264, + "FactionID1": { + "type": "dword", + "value": 12 + }, + "FactionID2": { + "type": "dword", + "value": 2 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 265, + "FactionID1": { + "type": "dword", + "value": 12 + }, + "FactionID2": { + "type": "dword", + "value": 3 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 266, + "FactionID1": { + "type": "dword", + "value": 12 + }, + "FactionID2": { + "type": "dword", + "value": 4 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 267, + "FactionID1": { + "type": "dword", + "value": 12 + }, + "FactionID2": { + "type": "dword", + "value": 5 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 268, + "FactionID1": { + "type": "dword", + "value": 12 + }, + "FactionID2": { + "type": "dword", + "value": 6 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 269, + "FactionID1": { + "type": "dword", + "value": 12 + }, + "FactionID2": { + "type": "dword", + "value": 7 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 270, + "FactionID1": { + "type": "dword", + "value": 12 + }, + "FactionID2": { + "type": "dword", + "value": 8 + }, + "FactionRep": { + "type": "dword", + "value": 0 + } + }, + { + "__struct_id": 271, + "FactionID1": { + "type": "dword", + "value": 12 + }, + "FactionID2": { + "type": "dword", + "value": 9 + }, + "FactionRep": { + "type": "dword", + "value": 77 + } + }, + { + "__struct_id": 272, + "FactionID1": { + "type": "dword", + "value": 12 + }, + "FactionID2": { + "type": "dword", + "value": 10 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 273, + "FactionID1": { + "type": "dword", + "value": 12 + }, + "FactionID2": { + "type": "dword", + "value": 11 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 274, + "FactionID1": { + "type": "dword", + "value": 12 + }, + "FactionID2": { + "type": "dword", + "value": 12 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 275, + "FactionID1": { + "type": "dword", + "value": 12 + }, "FactionID2": { "type": "dword", "value": 13 @@ -4284,7 +4479,7 @@ } }, { - "__struct_id": 264, + "__struct_id": 276, "FactionID1": { "type": "dword", "value": 12 @@ -4299,7 +4494,7 @@ } }, { - "__struct_id": 265, + "__struct_id": 277, "FactionID1": { "type": "dword", "value": 12 @@ -4314,7 +4509,7 @@ } }, { - "__struct_id": 266, + "__struct_id": 278, "FactionID1": { "type": "dword", "value": 12 @@ -4329,7 +4524,7 @@ } }, { - "__struct_id": 267, + "__struct_id": 279, "FactionID1": { "type": "dword", "value": 12 @@ -4344,7 +4539,7 @@ } }, { - "__struct_id": 268, + "__struct_id": 280, "FactionID1": { "type": "dword", "value": 12 @@ -4359,7 +4554,7 @@ } }, { - "__struct_id": 269, + "__struct_id": 281, "FactionID1": { "type": "dword", "value": 12 @@ -4374,7 +4569,7 @@ } }, { - "__struct_id": 270, + "__struct_id": 282, "FactionID1": { "type": "dword", "value": 12 @@ -4388,199 +4583,19 @@ "value": 75 } }, - { - "__struct_id": 271, - "FactionID1": { - "type": "dword", - "value": 13 - }, - "FactionID2": { - "type": "dword", - "value": 0 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, - { - "__struct_id": 272, - "FactionID1": { - "type": "dword", - "value": 13 - }, - "FactionID2": { - "type": "dword", - "value": 1 - }, - "FactionRep": { - "type": "dword", - "value": 0 - } - }, - { - "__struct_id": 273, - "FactionID1": { - "type": "dword", - "value": 13 - }, - "FactionID2": { - "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 274, - "FactionID1": { - "type": "dword", - "value": 13 - }, - "FactionID2": { - "type": "dword", - "value": 3 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 275, - "FactionID1": { - "type": "dword", - "value": 13 - }, - "FactionID2": { - "type": "dword", - "value": 4 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, - { - "__struct_id": 276, - "FactionID1": { - "type": "dword", - "value": 13 - }, - "FactionID2": { - "type": "dword", - "value": 5 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, - { - "__struct_id": 277, - "FactionID1": { - "type": "dword", - "value": 13 - }, - "FactionID2": { - "type": "dword", - "value": 6 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 278, - "FactionID1": { - "type": "dword", - "value": 13 - }, - "FactionID2": { - "type": "dword", - "value": 7 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 279, - "FactionID1": { - "type": "dword", - "value": 13 - }, - "FactionID2": { - "type": "dword", - "value": 8 - }, - "FactionRep": { - "type": "dword", - "value": 0 - } - }, - { - "__struct_id": 280, - "FactionID1": { - "type": "dword", - "value": 13 - }, - "FactionID2": { - "type": "dword", - "value": 9 - }, - "FactionRep": { - "type": "dword", - "value": 77 - } - }, - { - "__struct_id": 281, - "FactionID1": { - "type": "dword", - "value": 13 - }, - "FactionID2": { - "type": "dword", - "value": 10 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 282, - "FactionID1": { - "type": "dword", - "value": 13 - }, - "FactionID2": { - "type": "dword", - "value": 11 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, { "__struct_id": 283, "FactionID1": { "type": "dword", - "value": 13 + "value": 12 }, "FactionID2": { "type": "dword", - "value": 12 + "value": 21 }, "FactionRep": { "type": "dword", - "value": 76 + "value": 75 } }, { @@ -4591,7 +4606,7 @@ }, "FactionID2": { "type": "dword", - "value": 13 + "value": 0 }, "FactionRep": { "type": "dword", @@ -4604,6 +4619,201 @@ "type": "dword", "value": 13 }, + "FactionID2": { + "type": "dword", + "value": 1 + }, + "FactionRep": { + "type": "dword", + "value": 0 + } + }, + { + "__struct_id": 286, + "FactionID1": { + "type": "dword", + "value": 13 + }, + "FactionID2": { + "type": "dword", + "value": 2 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 287, + "FactionID1": { + "type": "dword", + "value": 13 + }, + "FactionID2": { + "type": "dword", + "value": 3 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 288, + "FactionID1": { + "type": "dword", + "value": 13 + }, + "FactionID2": { + "type": "dword", + "value": 4 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 289, + "FactionID1": { + "type": "dword", + "value": 13 + }, + "FactionID2": { + "type": "dword", + "value": 5 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 290, + "FactionID1": { + "type": "dword", + "value": 13 + }, + "FactionID2": { + "type": "dword", + "value": 6 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 291, + "FactionID1": { + "type": "dword", + "value": 13 + }, + "FactionID2": { + "type": "dword", + "value": 7 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 292, + "FactionID1": { + "type": "dword", + "value": 13 + }, + "FactionID2": { + "type": "dword", + "value": 8 + }, + "FactionRep": { + "type": "dword", + "value": 0 + } + }, + { + "__struct_id": 293, + "FactionID1": { + "type": "dword", + "value": 13 + }, + "FactionID2": { + "type": "dword", + "value": 9 + }, + "FactionRep": { + "type": "dword", + "value": 77 + } + }, + { + "__struct_id": 294, + "FactionID1": { + "type": "dword", + "value": 13 + }, + "FactionID2": { + "type": "dword", + "value": 10 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 295, + "FactionID1": { + "type": "dword", + "value": 13 + }, + "FactionID2": { + "type": "dword", + "value": 11 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 296, + "FactionID1": { + "type": "dword", + "value": 13 + }, + "FactionID2": { + "type": "dword", + "value": 12 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 297, + "FactionID1": { + "type": "dword", + "value": 13 + }, + "FactionID2": { + "type": "dword", + "value": 13 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 298, + "FactionID1": { + "type": "dword", + "value": 13 + }, "FactionID2": { "type": "dword", "value": 14 @@ -4614,7 +4824,7 @@ } }, { - "__struct_id": 286, + "__struct_id": 299, "FactionID1": { "type": "dword", "value": 13 @@ -4629,7 +4839,7 @@ } }, { - "__struct_id": 287, + "__struct_id": 300, "FactionID1": { "type": "dword", "value": 13 @@ -4644,7 +4854,7 @@ } }, { - "__struct_id": 288, + "__struct_id": 301, "FactionID1": { "type": "dword", "value": 13 @@ -4659,7 +4869,7 @@ } }, { - "__struct_id": 289, + "__struct_id": 302, "FactionID1": { "type": "dword", "value": 13 @@ -4674,7 +4884,7 @@ } }, { - "__struct_id": 290, + "__struct_id": 303, "FactionID1": { "type": "dword", "value": 13 @@ -4689,7 +4899,7 @@ } }, { - "__struct_id": 291, + "__struct_id": 304, "FactionID1": { "type": "dword", "value": 13 @@ -4703,214 +4913,19 @@ "value": 0 } }, - { - "__struct_id": 292, - "FactionID1": { - "type": "dword", - "value": 14 - }, - "FactionID2": { - "type": "dword", - "value": 0 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, - { - "__struct_id": 293, - "FactionID1": { - "type": "dword", - "value": 14 - }, - "FactionID2": { - "type": "dword", - "value": 1 - }, - "FactionRep": { - "type": "dword", - "value": 34 - } - }, - { - "__struct_id": 294, - "FactionID1": { - "type": "dword", - "value": 14 - }, - "FactionID2": { - "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, - { - "__struct_id": 295, - "FactionID1": { - "type": "dword", - "value": 14 - }, - "FactionID2": { - "type": "dword", - "value": 3 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 296, - "FactionID1": { - "type": "dword", - "value": 14 - }, - "FactionID2": { - "type": "dword", - "value": 4 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 297, - "FactionID1": { - "type": "dword", - "value": 14 - }, - "FactionID2": { - "type": "dword", - "value": 5 - }, - "FactionRep": { - "type": "dword", - "value": 50 - } - }, - { - "__struct_id": 298, - "FactionID1": { - "type": "dword", - "value": 14 - }, - "FactionID2": { - "type": "dword", - "value": 6 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 299, - "FactionID1": { - "type": "dword", - "value": 14 - }, - "FactionID2": { - "type": "dword", - "value": 7 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 300, - "FactionID1": { - "type": "dword", - "value": 14 - }, - "FactionID2": { - "type": "dword", - "value": 8 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 301, - "FactionID1": { - "type": "dword", - "value": 14 - }, - "FactionID2": { - "type": "dword", - "value": 9 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 302, - "FactionID1": { - "type": "dword", - "value": 14 - }, - "FactionID2": { - "type": "dword", - "value": 10 - }, - "FactionRep": { - "type": "dword", - "value": 0 - } - }, - { - "__struct_id": 303, - "FactionID1": { - "type": "dword", - "value": 14 - }, - "FactionID2": { - "type": "dword", - "value": 11 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 304, - "FactionID1": { - "type": "dword", - "value": 14 - }, - "FactionID2": { - "type": "dword", - "value": 12 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, { "__struct_id": 305, "FactionID1": { "type": "dword", - "value": 14 + "value": 13 }, "FactionID2": { "type": "dword", - "value": 13 + "value": 21 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 75 } }, { @@ -4921,7 +4936,7 @@ }, "FactionID2": { "type": "dword", - "value": 14 + "value": 0 }, "FactionRep": { "type": "dword", @@ -4936,11 +4951,11 @@ }, "FactionID2": { "type": "dword", - "value": 15 + "value": 1 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 34 } }, { @@ -4951,11 +4966,11 @@ }, "FactionID2": { "type": "dword", - "value": 16 + "value": 2 }, "FactionRep": { "type": "dword", - "value": 74 + "value": 100 } }, { @@ -4966,7 +4981,7 @@ }, "FactionID2": { "type": "dword", - "value": 17 + "value": 3 }, "FactionRep": { "type": "dword", @@ -4981,7 +4996,7 @@ }, "FactionID2": { "type": "dword", - "value": 18 + "value": 4 }, "FactionRep": { "type": "dword", @@ -4994,6 +5009,216 @@ "type": "dword", "value": 14 }, + "FactionID2": { + "type": "dword", + "value": 5 + }, + "FactionRep": { + "type": "dword", + "value": 50 + } + }, + { + "__struct_id": 312, + "FactionID1": { + "type": "dword", + "value": 14 + }, + "FactionID2": { + "type": "dword", + "value": 6 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 313, + "FactionID1": { + "type": "dword", + "value": 14 + }, + "FactionID2": { + "type": "dword", + "value": 7 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 314, + "FactionID1": { + "type": "dword", + "value": 14 + }, + "FactionID2": { + "type": "dword", + "value": 8 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 315, + "FactionID1": { + "type": "dword", + "value": 14 + }, + "FactionID2": { + "type": "dword", + "value": 9 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 316, + "FactionID1": { + "type": "dword", + "value": 14 + }, + "FactionID2": { + "type": "dword", + "value": 10 + }, + "FactionRep": { + "type": "dword", + "value": 0 + } + }, + { + "__struct_id": 317, + "FactionID1": { + "type": "dword", + "value": 14 + }, + "FactionID2": { + "type": "dword", + "value": 11 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 318, + "FactionID1": { + "type": "dword", + "value": 14 + }, + "FactionID2": { + "type": "dword", + "value": 12 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 319, + "FactionID1": { + "type": "dword", + "value": 14 + }, + "FactionID2": { + "type": "dword", + "value": 13 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 320, + "FactionID1": { + "type": "dword", + "value": 14 + }, + "FactionID2": { + "type": "dword", + "value": 14 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 321, + "FactionID1": { + "type": "dword", + "value": 14 + }, + "FactionID2": { + "type": "dword", + "value": 15 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 322, + "FactionID1": { + "type": "dword", + "value": 14 + }, + "FactionID2": { + "type": "dword", + "value": 16 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 323, + "FactionID1": { + "type": "dword", + "value": 14 + }, + "FactionID2": { + "type": "dword", + "value": 17 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 324, + "FactionID1": { + "type": "dword", + "value": 14 + }, + "FactionID2": { + "type": "dword", + "value": 18 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 325, + "FactionID1": { + "type": "dword", + "value": 14 + }, "FactionID2": { "type": "dword", "value": 19 @@ -5004,7 +5229,7 @@ } }, { - "__struct_id": 312, + "__struct_id": 326, "FactionID1": { "type": "dword", "value": 14 @@ -5019,230 +5244,20 @@ } }, { - "__struct_id": 313, + "__struct_id": 327, "FactionID1": { "type": "dword", - "value": 15 + "value": 14 }, "FactionID2": { "type": "dword", - "value": 0 + "value": 21 }, "FactionRep": { "type": "dword", "value": 100 } }, - { - "__struct_id": 314, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 1 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 315, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, - { - "__struct_id": 316, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 3 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 317, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 4 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 318, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 5 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, - { - "__struct_id": 319, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 6 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 320, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 7 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 321, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 8 - }, - "FactionRep": { - "type": "dword", - "value": 24 - } - }, - { - "__struct_id": 322, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 9 - }, - "FactionRep": { - "type": "dword", - "value": 77 - } - }, - { - "__struct_id": 323, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 10 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 324, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 11 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 325, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 12 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 326, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 13 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 327, - "FactionID1": { - "type": "dword", - "value": 15 - }, - "FactionID2": { - "type": "dword", - "value": 14 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, { "__struct_id": 328, "FactionID1": { @@ -5251,7 +5266,7 @@ }, "FactionID2": { "type": "dword", - "value": 15 + "value": 0 }, "FactionRep": { "type": "dword", @@ -5264,6 +5279,231 @@ "type": "dword", "value": 15 }, + "FactionID2": { + "type": "dword", + "value": 1 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 330, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 2 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 331, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 3 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 332, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 4 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 333, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 5 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 334, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 6 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 335, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 7 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 336, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 8 + }, + "FactionRep": { + "type": "dword", + "value": 24 + } + }, + { + "__struct_id": 337, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 9 + }, + "FactionRep": { + "type": "dword", + "value": 77 + } + }, + { + "__struct_id": 338, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 10 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 339, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 11 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 340, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 12 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 341, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 13 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 342, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 14 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 343, + "FactionID1": { + "type": "dword", + "value": 15 + }, + "FactionID2": { + "type": "dword", + "value": 15 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 344, + "FactionID1": { + "type": "dword", + "value": 15 + }, "FactionID2": { "type": "dword", "value": 16 @@ -5274,7 +5514,7 @@ } }, { - "__struct_id": 330, + "__struct_id": 345, "FactionID1": { "type": "dword", "value": 15 @@ -5289,7 +5529,7 @@ } }, { - "__struct_id": 331, + "__struct_id": 346, "FactionID1": { "type": "dword", "value": 15 @@ -5304,7 +5544,7 @@ } }, { - "__struct_id": 332, + "__struct_id": 347, "FactionID1": { "type": "dword", "value": 15 @@ -5319,7 +5559,7 @@ } }, { - "__struct_id": 333, + "__struct_id": 348, "FactionID1": { "type": "dword", "value": 15 @@ -5333,244 +5573,19 @@ "value": 75 } }, - { - "__struct_id": 334, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 0 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, - { - "__struct_id": 335, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 1 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 336, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, - { - "__struct_id": 337, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 3 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 338, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 4 - }, - "FactionRep": { - "type": "dword", - "value": 77 - } - }, - { - "__struct_id": 339, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 5 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, - { - "__struct_id": 340, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 6 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 341, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 7 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 342, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 8 - }, - "FactionRep": { - "type": "dword", - "value": 22 - } - }, - { - "__struct_id": 343, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 9 - }, - "FactionRep": { - "type": "dword", - "value": 77 - } - }, - { - "__struct_id": 344, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 10 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 345, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 11 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 346, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 12 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 347, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 13 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 348, - "FactionID1": { - "type": "dword", - "value": 16 - }, - "FactionID2": { - "type": "dword", - "value": 14 - }, - "FactionRep": { - "type": "dword", - "value": 24 - } - }, { "__struct_id": 349, "FactionID1": { "type": "dword", - "value": 16 + "value": 15 }, "FactionID2": { "type": "dword", - "value": 15 + "value": 21 }, "FactionRep": { "type": "dword", - "value": 75 + "value": 25 } }, { @@ -5581,7 +5596,7 @@ }, "FactionID2": { "type": "dword", - "value": 16 + "value": 0 }, "FactionRep": { "type": "dword", @@ -5594,6 +5609,246 @@ "type": "dword", "value": 16 }, + "FactionID2": { + "type": "dword", + "value": 1 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 352, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 2 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 353, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 3 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 354, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 4 + }, + "FactionRep": { + "type": "dword", + "value": 77 + } + }, + { + "__struct_id": 355, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 5 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 356, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 6 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 357, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 7 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 358, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 8 + }, + "FactionRep": { + "type": "dword", + "value": 22 + } + }, + { + "__struct_id": 359, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 9 + }, + "FactionRep": { + "type": "dword", + "value": 77 + } + }, + { + "__struct_id": 360, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 10 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 361, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 11 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 362, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 12 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 363, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 13 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 364, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 14 + }, + "FactionRep": { + "type": "dword", + "value": 24 + } + }, + { + "__struct_id": 365, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 15 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 366, + "FactionID1": { + "type": "dword", + "value": 16 + }, + "FactionID2": { + "type": "dword", + "value": 16 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 367, + "FactionID1": { + "type": "dword", + "value": 16 + }, "FactionID2": { "type": "dword", "value": 17 @@ -5604,7 +5859,7 @@ } }, { - "__struct_id": 352, + "__struct_id": 368, "FactionID1": { "type": "dword", "value": 16 @@ -5619,7 +5874,7 @@ } }, { - "__struct_id": 353, + "__struct_id": 369, "FactionID1": { "type": "dword", "value": 16 @@ -5634,7 +5889,7 @@ } }, { - "__struct_id": 354, + "__struct_id": 370, "FactionID1": { "type": "dword", "value": 16 @@ -5648,259 +5903,19 @@ "value": 75 } }, - { - "__struct_id": 355, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 0 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, - { - "__struct_id": 356, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 1 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 357, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, - { - "__struct_id": 358, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 3 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 359, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 4 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 360, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 5 - }, - "FactionRep": { - "type": "dword", - "value": 25 - } - }, - { - "__struct_id": 361, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 6 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 362, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 7 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 363, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 8 - }, - "FactionRep": { - "type": "dword", - "value": 24 - } - }, - { - "__struct_id": 364, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 9 - }, - "FactionRep": { - "type": "dword", - "value": 77 - } - }, - { - "__struct_id": 365, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 10 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 366, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 11 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 367, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 12 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 368, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 13 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 369, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 14 - }, - "FactionRep": { - "type": "dword", - "value": 24 - } - }, - { - "__struct_id": 370, - "FactionID1": { - "type": "dword", - "value": 17 - }, - "FactionID2": { - "type": "dword", - "value": 15 - }, - "FactionRep": { - "type": "dword", - "value": 73 - } - }, { "__struct_id": 371, "FactionID1": { "type": "dword", - "value": 17 + "value": 16 }, "FactionID2": { "type": "dword", - "value": 16 + "value": 21 }, "FactionRep": { "type": "dword", - "value": 0 + "value": 25 } }, { @@ -5911,7 +5926,7 @@ }, "FactionID2": { "type": "dword", - "value": 17 + "value": 0 }, "FactionRep": { "type": "dword", @@ -5926,11 +5941,11 @@ }, "FactionID2": { "type": "dword", - "value": 18 + "value": 1 }, "FactionRep": { "type": "dword", - "value": 58 + "value": 74 } }, { @@ -5941,7 +5956,7 @@ }, "FactionID2": { "type": "dword", - "value": 19 + "value": 2 }, "FactionRep": { "type": "dword", @@ -5956,7 +5971,7 @@ }, "FactionID2": { "type": "dword", - "value": 20 + "value": 3 }, "FactionRep": { "type": "dword", @@ -5967,67 +5982,7 @@ "__struct_id": 376, "FactionID1": { "type": "dword", - "value": 18 - }, - "FactionID2": { - "type": "dword", - "value": 0 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, - { - "__struct_id": 377, - "FactionID1": { - "type": "dword", - "value": 18 - }, - "FactionID2": { - "type": "dword", - "value": 1 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 378, - "FactionID1": { - "type": "dword", - "value": 18 - }, - "FactionID2": { - "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 379, - "FactionID1": { - "type": "dword", - "value": 18 - }, - "FactionID2": { - "type": "dword", - "value": 3 - }, - "FactionRep": { - "type": "dword", - "value": 74 - } - }, - { - "__struct_id": 380, - "FactionID1": { - "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6039,10 +5994,10 @@ } }, { - "__struct_id": 381, + "__struct_id": 377, "FactionID1": { "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6050,14 +6005,14 @@ }, "FactionRep": { "type": "dword", - "value": 50 + "value": 25 } }, { - "__struct_id": 382, + "__struct_id": 378, "FactionID1": { "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6069,10 +6024,10 @@ } }, { - "__struct_id": 383, + "__struct_id": 379, "FactionID1": { "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6084,10 +6039,10 @@ } }, { - "__struct_id": 384, + "__struct_id": 380, "FactionID1": { "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6095,14 +6050,14 @@ }, "FactionRep": { "type": "dword", - "value": 75 + "value": 24 } }, { - "__struct_id": 385, + "__struct_id": 381, "FactionID1": { "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6110,14 +6065,14 @@ }, "FactionRep": { "type": "dword", - "value": 76 + "value": 77 } }, { - "__struct_id": 386, + "__struct_id": 382, "FactionID1": { "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6129,10 +6084,10 @@ } }, { - "__struct_id": 387, + "__struct_id": 383, "FactionID1": { "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6144,10 +6099,10 @@ } }, { - "__struct_id": 388, + "__struct_id": 384, "FactionID1": { "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6159,10 +6114,10 @@ } }, { - "__struct_id": 389, + "__struct_id": 385, "FactionID1": { "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6174,10 +6129,10 @@ } }, { - "__struct_id": 390, + "__struct_id": 386, "FactionID1": { "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6185,14 +6140,14 @@ }, "FactionRep": { "type": "dword", - "value": 75 + "value": 24 } }, { - "__struct_id": 391, + "__struct_id": 387, "FactionID1": { "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6200,14 +6155,14 @@ }, "FactionRep": { "type": "dword", - "value": 76 + "value": 73 } }, { - "__struct_id": 392, + "__struct_id": 388, "FactionID1": { "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6215,14 +6170,14 @@ }, "FactionRep": { "type": "dword", - "value": 76 + "value": 0 } }, { - "__struct_id": 393, + "__struct_id": 389, "FactionID1": { "type": "dword", - "value": 18 + "value": 17 }, "FactionID2": { "type": "dword", @@ -6230,7 +6185,67 @@ }, "FactionRep": { "type": "dword", - "value": 76 + "value": 100 + } + }, + { + "__struct_id": 390, + "FactionID1": { + "type": "dword", + "value": 17 + }, + "FactionID2": { + "type": "dword", + "value": 18 + }, + "FactionRep": { + "type": "dword", + "value": 58 + } + }, + { + "__struct_id": 391, + "FactionID1": { + "type": "dword", + "value": 17 + }, + "FactionID2": { + "type": "dword", + "value": 19 + }, + "FactionRep": { + "type": "dword", + "value": 25 + } + }, + { + "__struct_id": 392, + "FactionID1": { + "type": "dword", + "value": 17 + }, + "FactionID2": { + "type": "dword", + "value": 20 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 393, + "FactionID1": { + "type": "dword", + "value": 17 + }, + "FactionID2": { + "type": "dword", + "value": 21 + }, + "FactionRep": { + "type": "dword", + "value": 25 } }, { @@ -6241,7 +6256,7 @@ }, "FactionID2": { "type": "dword", - "value": 18 + "value": 0 }, "FactionRep": { "type": "dword", @@ -6254,6 +6269,276 @@ "type": "dword", "value": 18 }, + "FactionID2": { + "type": "dword", + "value": 1 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 396, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 2 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 397, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 3 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 398, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 4 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 399, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 5 + }, + "FactionRep": { + "type": "dword", + "value": 50 + } + }, + { + "__struct_id": 400, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 6 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 401, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 7 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 402, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 8 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 403, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 9 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 404, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 10 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 405, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 11 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 406, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 12 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 407, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 13 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 408, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 14 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 409, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 15 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 410, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 16 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 411, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 17 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 412, + "FactionID1": { + "type": "dword", + "value": 18 + }, + "FactionID2": { + "type": "dword", + "value": 18 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 413, + "FactionID1": { + "type": "dword", + "value": 18 + }, "FactionID2": { "type": "dword", "value": 19 @@ -6264,7 +6549,7 @@ } }, { - "__struct_id": 396, + "__struct_id": 414, "FactionID1": { "type": "dword", "value": 18 @@ -6278,285 +6563,15 @@ "value": 76 } }, - { - "__struct_id": 397, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 0 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, - { - "__struct_id": 398, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 1 - }, - "FactionRep": { - "type": "dword", - "value": 10 - } - }, - { - "__struct_id": 399, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 2 - }, - "FactionRep": { - "type": "dword", - "value": 69 - } - }, - { - "__struct_id": 400, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 3 - }, - "FactionRep": { - "type": "dword", - "value": 100 - } - }, - { - "__struct_id": 401, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 4 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 402, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 5 - }, - "FactionRep": { - "type": "dword", - "value": 50 - } - }, - { - "__struct_id": 403, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 6 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 404, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 7 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 405, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 8 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 406, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 9 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 407, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 10 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 408, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 11 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 409, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 12 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 410, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 13 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 411, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 14 - }, - "FactionRep": { - "type": "dword", - "value": 75 - } - }, - { - "__struct_id": 412, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 15 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 413, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 16 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, - { - "__struct_id": 414, - "FactionID1": { - "type": "dword", - "value": 19 - }, - "FactionID2": { - "type": "dword", - "value": 17 - }, - "FactionRep": { - "type": "dword", - "value": 76 - } - }, { "__struct_id": 415, "FactionID1": { "type": "dword", - "value": 19 + "value": 18 }, "FactionID2": { "type": "dword", - "value": 18 + "value": 21 }, "FactionRep": { "type": "dword", @@ -6571,7 +6586,7 @@ }, "FactionID2": { "type": "dword", - "value": 19 + "value": 0 }, "FactionRep": { "type": "dword", @@ -6586,7 +6601,7 @@ }, "FactionID2": { "type": "dword", - "value": 20 + "value": 1 }, "FactionRep": { "type": "dword", @@ -6595,6 +6610,306 @@ }, { "__struct_id": 418, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 2 + }, + "FactionRep": { + "type": "dword", + "value": 69 + } + }, + { + "__struct_id": 419, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 3 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 420, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 4 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 421, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 5 + }, + "FactionRep": { + "type": "dword", + "value": 50 + } + }, + { + "__struct_id": 422, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 6 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 423, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 7 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 424, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 8 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 425, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 9 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 426, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 10 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 427, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 11 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 428, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 12 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 429, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 13 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 430, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 14 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 431, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 15 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 432, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 16 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 433, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 17 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 434, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 18 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 435, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 19 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 436, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 20 + }, + "FactionRep": { + "type": "dword", + "value": 10 + } + }, + { + "__struct_id": 437, + "FactionID1": { + "type": "dword", + "value": 19 + }, + "FactionID2": { + "type": "dword", + "value": 21 + }, + "FactionRep": { + "type": "dword", + "value": 69 + } + }, + { + "__struct_id": 438, "FactionID1": { "type": "dword", "value": 20 @@ -6609,7 +6924,7 @@ } }, { - "__struct_id": 419, + "__struct_id": 439, "FactionID1": { "type": "dword", "value": 20 @@ -6624,7 +6939,7 @@ } }, { - "__struct_id": 420, + "__struct_id": 440, "FactionID1": { "type": "dword", "value": 20 @@ -6639,7 +6954,7 @@ } }, { - "__struct_id": 421, + "__struct_id": 441, "FactionID1": { "type": "dword", "value": 20 @@ -6654,7 +6969,7 @@ } }, { - "__struct_id": 422, + "__struct_id": 442, "FactionID1": { "type": "dword", "value": 20 @@ -6669,7 +6984,7 @@ } }, { - "__struct_id": 423, + "__struct_id": 443, "FactionID1": { "type": "dword", "value": 20 @@ -6684,7 +6999,7 @@ } }, { - "__struct_id": 424, + "__struct_id": 444, "FactionID1": { "type": "dword", "value": 20 @@ -6699,7 +7014,7 @@ } }, { - "__struct_id": 425, + "__struct_id": 445, "FactionID1": { "type": "dword", "value": 20 @@ -6714,7 +7029,7 @@ } }, { - "__struct_id": 426, + "__struct_id": 446, "FactionID1": { "type": "dword", "value": 20 @@ -6729,7 +7044,7 @@ } }, { - "__struct_id": 427, + "__struct_id": 447, "FactionID1": { "type": "dword", "value": 20 @@ -6744,7 +7059,7 @@ } }, { - "__struct_id": 428, + "__struct_id": 448, "FactionID1": { "type": "dword", "value": 20 @@ -6759,7 +7074,7 @@ } }, { - "__struct_id": 429, + "__struct_id": 449, "FactionID1": { "type": "dword", "value": 20 @@ -6774,7 +7089,7 @@ } }, { - "__struct_id": 430, + "__struct_id": 450, "FactionID1": { "type": "dword", "value": 20 @@ -6789,7 +7104,7 @@ } }, { - "__struct_id": 431, + "__struct_id": 451, "FactionID1": { "type": "dword", "value": 20 @@ -6804,7 +7119,7 @@ } }, { - "__struct_id": 432, + "__struct_id": 452, "FactionID1": { "type": "dword", "value": 20 @@ -6819,7 +7134,7 @@ } }, { - "__struct_id": 433, + "__struct_id": 453, "FactionID1": { "type": "dword", "value": 20 @@ -6834,7 +7149,7 @@ } }, { - "__struct_id": 434, + "__struct_id": 454, "FactionID1": { "type": "dword", "value": 20 @@ -6849,7 +7164,7 @@ } }, { - "__struct_id": 435, + "__struct_id": 455, "FactionID1": { "type": "dword", "value": 20 @@ -6864,7 +7179,7 @@ } }, { - "__struct_id": 436, + "__struct_id": 456, "FactionID1": { "type": "dword", "value": 20 @@ -6879,7 +7194,7 @@ } }, { - "__struct_id": 437, + "__struct_id": 457, "FactionID1": { "type": "dword", "value": 20 @@ -6894,7 +7209,7 @@ } }, { - "__struct_id": 438, + "__struct_id": 458, "FactionID1": { "type": "dword", "value": 20 @@ -6907,6 +7222,351 @@ "type": "dword", "value": 100 } + }, + { + "__struct_id": 459, + "FactionID1": { + "type": "dword", + "value": 20 + }, + "FactionID2": { + "type": "dword", + "value": 21 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 460, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 0 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 461, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 1 + }, + "FactionRep": { + "type": "dword", + "value": 10 + } + }, + { + "__struct_id": 462, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 2 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } + }, + { + "__struct_id": 463, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 3 + }, + "FactionRep": { + "type": "dword", + "value": 74 + } + }, + { + "__struct_id": 464, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 4 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 465, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 5 + }, + "FactionRep": { + "type": "dword", + "value": 50 + } + }, + { + "__struct_id": 466, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 6 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 467, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 7 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 468, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 8 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 469, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 9 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 470, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 10 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 471, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 11 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 472, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 12 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 473, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 13 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 474, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 14 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 475, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 15 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 476, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 16 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 477, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 17 + }, + "FactionRep": { + "type": "dword", + "value": 76 + } + }, + { + "__struct_id": 478, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 18 + }, + "FactionRep": { + "type": "dword", + "value": 75 + } + }, + { + "__struct_id": 479, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 19 + }, + "FactionRep": { + "type": "dword", + "value": 69 + } + }, + { + "__struct_id": 480, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 20 + }, + "FactionRep": { + "type": "dword", + "value": 10 + } + }, + { + "__struct_id": 481, + "FactionID1": { + "type": "dword", + "value": 21 + }, + "FactionID2": { + "type": "dword", + "value": 21 + }, + "FactionRep": { + "type": "dword", + "value": 100 + } } ] } diff --git a/_module/gic/deepdarktunnel.gic.json b/_module/gic/deepdarktunnel.gic.json index 9860a7ba..6b8c4a10 100644 --- a/_module/gic/deepdarktunnel.gic.json +++ b/_module/gic/deepdarktunnel.gic.json @@ -18,11 +18,7 @@ }, "Encounter List": { "type": "list", - "value": [ - { - "__struct_id": 7 - } - ] + "value": [] }, "List": { "type": "list", @@ -240,6 +236,27 @@ "value": "" } }, + { + "__struct_id": 5, + "Comment": { + "type": "cexostring", + "value": "" + } + }, + { + "__struct_id": 5, + "Comment": { + "type": "cexostring", + "value": "" + } + }, + { + "__struct_id": 5, + "Comment": { + "type": "cexostring", + "value": "" + } + }, { "__struct_id": 5, "Comment": { diff --git a/_module/git/aantiochfallscav.git.json b/_module/git/aantiochfallscav.git.json index 77b7c499..160d7b68 100644 --- a/_module/git/aantiochfallscav.git.json +++ b/_module/git/aantiochfallscav.git.json @@ -1257,7 +1257,7 @@ "LocalizedName": { "type": "cexolocstring", "value": { - "0": "SP_SX01_PA_TM25M_RT_DS" + "0": "SP_SX01_PA_GT03_TM30M_RT_DS" } }, "MapNote": { diff --git a/_module/git/battlefield.git.json b/_module/git/battlefield.git.json index dddfb987..8b2c81c1 100644 --- a/_module/git/battlefield.git.json +++ b/_module/git/battlefield.git.json @@ -861,7 +861,7 @@ "__struct_id": 2, "Orientation": { "type": "float", - "value": -1.963489413261414 + "value": -1.963489174842835 }, "X": { "type": "float", diff --git a/_module/git/deepdarktunnel.git.json b/_module/git/deepdarktunnel.git.json index 46f2ace9..cdaead52 100644 --- a/_module/git/deepdarktunnel.git.json +++ b/_module/git/deepdarktunnel.git.json @@ -72,10 +72,6 @@ "type": "byte", "value": 0 }, - "Comment": { - "type": "cexostring", - "value": "" - }, "Conversation": { "type": "resref", "value": "" @@ -274,378 +270,7 @@ }, "Encounter List": { "type": "list", - "value": [ - { - "__struct_id": 7, - "Active": { - "type": "byte", - "value": 1 - }, - "CreatureList": { - "type": "list", - "value": [ - { - "__struct_id": 0, - "Appearance": { - "type": "int", - "value": 216 - }, - "CR": { - "type": "float", - "value": 15.0 - }, - "ResRef": { - "type": "resref", - "value": "nw_drowfight020" - }, - "SingleSpawn": { - "type": "byte", - "value": 0 - } - }, - { - "__struct_id": 0, - "Appearance": { - "type": "int", - "value": 215 - }, - "CR": { - "type": "float", - "value": 15.0 - }, - "ResRef": { - "type": "resref", - "value": "nw_drowcler020" - }, - "SingleSpawn": { - "type": "byte", - "value": 1 - } - }, - { - "__struct_id": 0, - "Appearance": { - "type": "int", - "value": 409 - }, - "CR": { - "type": "float", - "value": 15.0 - }, - "ResRef": { - "type": "resref", - "value": "x2_drow005" - }, - "SingleSpawn": { - "type": "byte", - "value": 1 - } - }, - { - "__struct_id": 0, - "Appearance": { - "type": "int", - "value": 407 - }, - "CR": { - "type": "float", - "value": 18.0 - }, - "ResRef": { - "type": "resref", - "value": "x2_drider003" - }, - "SingleSpawn": { - "type": "byte", - "value": 1 - } - }, - { - "__struct_id": 0, - "Appearance": { - "type": "int", - "value": 407 - }, - "CR": { - "type": "float", - "value": 24.0 - }, - "ResRef": { - "type": "resref", - "value": "x2_drider004" - }, - "SingleSpawn": { - "type": "byte", - "value": 1 - } - }, - { - "__struct_id": 0, - "Appearance": { - "type": "int", - "value": 407 - }, - "CR": { - "type": "float", - "value": 29.0 - }, - "ResRef": { - "type": "resref", - "value": "x2_drider005" - }, - "SingleSpawn": { - "type": "byte", - "value": 1 - } - } - ] - }, - "Difficulty": { - "type": "int", - "value": 0 - }, - "DifficultyIndex": { - "type": "int", - "value": 2 - }, - "Faction": { - "type": "dword", - "value": 1 - }, - "Geometry": { - "type": "list", - "value": [ - { - "__struct_id": 1, - "X": { - "type": "float", - "value": -6.716985702514648 - }, - "Y": { - "type": "float", - "value": -9.432361602783203 - }, - "Z": { - "type": "float", - "value": 0.02500005997717381 - } - }, - { - "__struct_id": 1, - "X": { - "type": "float", - "value": 35.55800628662109 - }, - "Y": { - "type": "float", - "value": -9.563787460327148 - }, - "Z": { - "type": "float", - "value": 0.172216922044754 - } - }, - { - "__struct_id": 1, - "X": { - "type": "float", - "value": 44.58934020996094 - }, - "Y": { - "type": "float", - "value": 1.429143905639648 - }, - "Z": { - "type": "float", - "value": 0.02500000037252903 - } - }, - { - "__struct_id": 1, - "X": { - "type": "float", - "value": 1.61427116394043 - }, - "Y": { - "type": "float", - "value": 1.562305450439453 - }, - "Z": { - "type": "float", - "value": 0.2750000059604645 - } - }, - { - "__struct_id": 1, - "X": { - "type": "float", - "value": -0.2382106781005859 - }, - "Y": { - "type": "float", - "value": -0.5758323669433594 - }, - "Z": { - "type": "float", - "value": 0.2778132259845734 - } - }, - { - "__struct_id": 1, - "X": { - "type": "float", - "value": 0.0 - }, - "Y": { - "type": "float", - "value": 0.0 - }, - "Z": { - "type": "float", - "value": 0.02500000037252903 - } - } - ] - }, - "LocalizedName": { - "id": 91359, - "type": "cexolocstring", - "value": { - "0": "Underdark Minions Encounter" - } - }, - "MaxCreatures": { - "type": "int", - "value": 4 - }, - "OnEntered": { - "type": "resref", - "value": "" - }, - "OnExhausted": { - "type": "resref", - "value": "" - }, - "OnExit": { - "type": "resref", - "value": "" - }, - "OnHeartbeat": { - "type": "resref", - "value": "" - }, - "OnUserDefined": { - "type": "resref", - "value": "" - }, - "PlayerOnly": { - "type": "byte", - "value": 1 - }, - "RecCreatures": { - "type": "int", - "value": 2 - }, - "Reset": { - "type": "byte", - "value": 1 - }, - "ResetTime": { - "type": "int", - "value": 600 - }, - "Respawns": { - "type": "int", - "value": -1 - }, - "SpawnOption": { - "type": "int", - "value": 0 - }, - "SpawnPointList": { - "type": "list", - "value": [ - { - "__struct_id": 2, - "Orientation": { - "type": "float", - "value": 2.282563447952271 - }, - "X": { - "type": "float", - "value": 65.94100189208984 - }, - "Y": { - "type": "float", - "value": 23.2784366607666 - }, - "Z": { - "type": "float", - "value": 9.5367431640625e-006 - } - }, - { - "__struct_id": 2, - "Orientation": { - "type": "float", - "value": -1.718057990074158 - }, - "X": { - "type": "float", - "value": 16.77839279174805 - }, - "Y": { - "type": "float", - "value": 11.70236110687256 - }, - "Z": { - "type": "float", - "value": 9.726732969284058e-006 - } - }, - { - "__struct_id": 2, - "Orientation": { - "type": "float", - "value": -0.5154173374176025 - }, - "X": { - "type": "float", - "value": 15.77799510955811 - }, - "Y": { - "type": "float", - "value": 6.414520740509033 - }, - "Z": { - "type": "float", - "value": 9.5367431640625e-006 - } - } - ] - }, - "Tag": { - "type": "cexostring", - "value": "X2_UNDERDARK001" - }, - "TemplateResRef": { - "type": "resref", - "value": "underdark002" - }, - "XPosition": { - "type": "float", - "value": 17.35004997253418 - }, - "YPosition": { - "type": "float", - "value": 14.70356369018555 - }, - "ZPosition": { - "type": "float", - "value": 0.0 - } - } - ] + "value": [] }, "List": { "type": "list", @@ -3360,6 +2985,189 @@ "type": "float", "value": -5.7220458984375e-006 } + }, + { + "__struct_id": 5, + "Appearance": { + "type": "byte", + "value": 2 + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "HasMapNote": { + "type": "byte", + "value": 0 + }, + "LinkedTo": { + "type": "cexostring", + "value": "" + }, + "LocalizedName": { + "type": "cexolocstring", + "value": { + "0": "SP_SX01_PA_TM15M_RT_DS" + } + }, + "MapNote": { + "type": "cexolocstring", + "value": {} + }, + "MapNoteEnabled": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "darkelfoutcas001" + }, + "TemplateResRef": { + "type": "resref", + "value": "sp_sx01_pa_tm15m" + }, + "XOrientation": { + "type": "float", + "value": 0.6152315735816956 + }, + "XPosition": { + "type": "float", + "value": 7.127950668334961 + }, + "YOrientation": { + "type": "float", + "value": 0.7883464694023132 + }, + "YPosition": { + "type": "float", + "value": 7.837350845336914 + }, + "ZPosition": { + "type": "float", + "value": -5.7220458984375e-006 + } + }, + { + "__struct_id": 5, + "Appearance": { + "type": "byte", + "value": 2 + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "HasMapNote": { + "type": "byte", + "value": 0 + }, + "LinkedTo": { + "type": "cexostring", + "value": "" + }, + "LocalizedName": { + "type": "cexolocstring", + "value": { + "0": "SP_SX01_PA_TM15M_RT_DS" + } + }, + "MapNote": { + "type": "cexolocstring", + "value": {} + }, + "MapNoteEnabled": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "darkelfoutcast" + }, + "TemplateResRef": { + "type": "resref", + "value": "sp_sx01_pa_tm15m" + }, + "XOrientation": { + "type": "float", + "value": -0.9951847195625305 + }, + "XPosition": { + "type": "float", + "value": 8.99604606628418 + }, + "YOrientation": { + "type": "float", + "value": 0.0980171337723732 + }, + "YPosition": { + "type": "float", + "value": 8.584590911865234 + }, + "ZPosition": { + "type": "float", + "value": -5.7220458984375e-006 + } + }, + { + "__struct_id": 5, + "Appearance": { + "type": "byte", + "value": 2 + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "HasMapNote": { + "type": "byte", + "value": 0 + }, + "LinkedTo": { + "type": "cexostring", + "value": "" + }, + "LocalizedName": { + "type": "cexolocstring", + "value": { + "0": "SP_SX01_PA_TM15M_RT_DS" + } + }, + "MapNote": { + "type": "cexolocstring", + "value": {} + }, + "MapNoteEnabled": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "darkelfoutcas002" + }, + "TemplateResRef": { + "type": "resref", + "value": "sp_sx01_pa_tm15m" + }, + "XOrientation": { + "type": "float", + "value": 0.02454144880175591 + }, + "XPosition": { + "type": "float", + "value": 7.501572608947754 + }, + "YOrientation": { + "type": "float", + "value": -0.99969881772995 + }, + "YPosition": { + "type": "float", + "value": 11.79772186279297 + }, + "ZPosition": { + "type": "float", + "value": -5.7220458984375e-006 + } } ] } diff --git a/_module/git/dragontunnels.git.json b/_module/git/dragontunnels.git.json index 30fb23da..45f355b3 100644 --- a/_module/git/dragontunnels.git.json +++ b/_module/git/dragontunnels.git.json @@ -294,7 +294,7 @@ }, "CR": { "type": "float", - "value": 17.0 + "value": 25.0 }, "ResRef": { "type": "resref", diff --git a/_module/git/drowdungeon.git.json b/_module/git/drowdungeon.git.json index 7e14ff1c..005ce0e7 100644 --- a/_module/git/drowdungeon.git.json +++ b/_module/git/drowdungeon.git.json @@ -2764,7 +2764,7 @@ "__struct_id": 2, "Orientation": { "type": "float", - "value": -2.724336385726929 + "value": -2.72433614730835 }, "X": { "type": "float", @@ -2783,7 +2783,7 @@ "__struct_id": 2, "Orientation": { "type": "float", - "value": 1.791682600975037 + "value": 1.791682362556458 }, "X": { "type": "float", @@ -2857,7 +2857,7 @@ }, "CR": { "type": "float", - "value": 7.0 + "value": 12.0 }, "ResRef": { "type": "resref", diff --git a/_module/git/soulreaverscrypt.git.json b/_module/git/soulreaverscrypt.git.json index 390a7a2b..0ca8aa01 100644 --- a/_module/git/soulreaverscrypt.git.json +++ b/_module/git/soulreaverscrypt.git.json @@ -684,7 +684,7 @@ "__struct_id": 2, "Orientation": { "type": "float", - "value": 3.11703634262085 + "value": 3.117035865783691 }, "X": { "type": "float", diff --git a/_module/git/templeofcyric.git.json b/_module/git/templeofcyric.git.json index 04c7af56..a28c5111 100644 --- a/_module/git/templeofcyric.git.json +++ b/_module/git/templeofcyric.git.json @@ -463,7 +463,7 @@ "__struct_id": 2, "Orientation": { "type": "float", - "value": 3.14158034324646 + "value": 3.141579866409302 }, "X": { "type": "float", diff --git a/_module/itp/creaturepalcus.itp.json b/_module/itp/creaturepalcus.itp.json index 9e4ac2b9..5ac7b5fa 100644 --- a/_module/itp/creaturepalcus.itp.json +++ b/_module/itp/creaturepalcus.itp.json @@ -2156,7 +2156,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 14.0 + "value": 15.0 }, "FACTION": { "type": "cexostring", @@ -2384,7 +2384,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 152.0 + "value": 26.0 }, "FACTION": { "type": "cexostring", @@ -2403,7 +2403,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 32.0 + "value": 25.0 }, "FACTION": { "type": "cexostring", @@ -2707,7 +2707,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 73.0 + "value": 27.0 }, "FACTION": { "type": "cexostring", @@ -2935,7 +2935,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 134.0 + "value": 26.0 }, "FACTION": { "type": "cexostring", @@ -2954,7 +2954,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 44.0 + "value": 16.0 }, "FACTION": { "type": "cexostring", @@ -3201,7 +3201,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 23.0 + "value": 14.0 }, "FACTION": { "type": "cexostring", @@ -3543,7 +3543,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 31.0 + "value": 21.0 }, "FACTION": { "type": "cexostring", @@ -3562,7 +3562,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 69.0 + "value": 31.0 }, "FACTION": { "type": "cexostring", @@ -3585,7 +3585,7 @@ }, "FACTION": { "type": "cexostring", - "value": "Hostile" + "value": "Generic" }, "NAME": { "type": "cexostring", @@ -8456,6 +8456,44 @@ "value": "drowslavemaste" } }, + { + "__struct_id": 0, + "CR": { + "type": "float", + "value": 16.0 + }, + "FACTION": { + "type": "cexostring", + "value": "Hostile" + }, + "NAME": { + "type": "cexostring", + "value": "Dark Elf Outcast" + }, + "RESREF": { + "type": "resref", + "value": "darkelfoutcas001" + } + }, + { + "__struct_id": 0, + "CR": { + "type": "float", + "value": 16.0 + }, + "FACTION": { + "type": "cexostring", + "value": "Hostile" + }, + "NAME": { + "type": "cexostring", + "value": "Dark Elf Outcast" + }, + "RESREF": { + "type": "resref", + "value": "darkelfoutcas002" + } + }, { "__struct_id": 0, "CR": { @@ -8536,7 +8574,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 15.0 + "value": 20.0 }, "FACTION": { "type": "cexostring", @@ -8555,7 +8593,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 22.0 + "value": 16.0 }, "FACTION": { "type": "cexostring", @@ -9813,7 +9851,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 39.0 + "value": 20.0 }, "FACTION": { "type": "cexostring", @@ -9832,7 +9870,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 39.0 + "value": 20.0 }, "FACTION": { "type": "cexostring", @@ -9851,7 +9889,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 43.0 + "value": 21.0 }, "FACTION": { "type": "cexostring", @@ -9870,7 +9908,7 @@ "__struct_id": 0, "CR": { "type": "float", - "value": 42.0 + "value": 20.0 }, "FACTION": { "type": "cexostring", @@ -10908,6 +10946,25 @@ "value": "fisherman" } }, + { + "__struct_id": 0, + "CR": { + "type": "float", + "value": 21.0 + }, + "FACTION": { + "type": "cexostring", + "value": "Commoner" + }, + "NAME": { + "type": "cexostring", + "value": "Forge Master" + }, + "RESREF": { + "type": "resref", + "value": "forgemaster" + } + }, { "__struct_id": 0, "CR": { @@ -11193,6 +11250,25 @@ "value": "olina" } }, + { + "__struct_id": 0, + "CR": { + "type": "float", + "value": 96.0 + }, + "FACTION": { + "type": "cexostring", + "value": "Merchant" + }, + "NAME": { + "type": "cexostring", + "value": "Order Member" + }, + "RESREF": { + "type": "resref", + "value": "ordermember" + } + }, { "__struct_id": 0, "CR": { @@ -11307,25 +11383,6 @@ "value": "ordermember006" } }, - { - "__struct_id": 0, - "CR": { - "type": "float", - "value": 96.0 - }, - "FACTION": { - "type": "cexostring", - "value": "Merchant" - }, - "NAME": { - "type": "cexostring", - "value": "Order Member" - }, - "RESREF": { - "type": "resref", - "value": "ordermember" - } - }, { "__struct_id": 0, "CR": { @@ -14650,7 +14707,7 @@ }, "NAME": { "type": "cexostring", - "value": "Dragon Guardians" + "value": "Dragon Guardian" }, "RESREF": { "type": "resref", diff --git a/_module/itp/itempalcus.itp.json b/_module/itp/itempalcus.itp.json index 64688cbf..27e0d55d 100644 --- a/_module/itp/itempalcus.itp.json +++ b/_module/itp/itempalcus.itp.json @@ -1609,7 +1609,7 @@ "__struct_id": 0, "NAME": { "type": "cexostring", - "value": "Rogues Leather" + "value": "Rogue Leather" }, "RESREF": { "type": "resref", @@ -1775,6 +1775,17 @@ "value": "crimsonchain" } }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "Dark Elf Chainmesh" + }, + "RESREF": { + "type": "resref", + "value": "drowchainmesh" + } + }, { "__struct_id": 0, "NAME": { @@ -1808,17 +1819,6 @@ "value": "drizztsmithril" } }, - { - "__struct_id": 0, - "NAME": { - "type": "cexostring", - "value": "Drow Chainmesh" - }, - "RESREF": { - "type": "resref", - "value": "drowchainmesh" - } - }, { "__struct_id": 0, "NAME": { @@ -8488,6 +8488,17 @@ "value": "air_skin" } }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "air_skinboss" + }, + "RESREF": { + "type": "resref", + "value": "air_skin001" + } + }, { "__struct_id": 0, "NAME": { @@ -8994,6 +9005,17 @@ "value": "earth_skin" } }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "earth_skinboss" + }, + "RESREF": { + "type": "resref", + "value": "earth_skin001" + } + }, { "__struct_id": 0, "RESREF": { @@ -9060,6 +9082,17 @@ "value": "fire_skin" } }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "fire_skinboss" + }, + "RESREF": { + "type": "resref", + "value": "fire_skin001" + } + }, { "__struct_id": 0, "NAME": { @@ -9797,6 +9830,17 @@ "value": "item" } }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "MOB-water_boss" + }, + "RESREF": { + "type": "resref", + "value": "mobwater_skin001" + } + }, { "__struct_id": 0, "NAME": { @@ -11507,6 +11551,17 @@ "value": "earthnoble_slam" } }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "firenobleslam" + }, + "RESREF": { + "type": "resref", + "value": "firenobleslam" + } + }, { "__struct_id": 0, "NAME": { @@ -11969,6 +12024,50 @@ "value": "water_slam" } }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "water_spike" + }, + "RESREF": { + "type": "resref", + "value": "water_spike" + } + }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "water_spike2" + }, + "RESREF": { + "type": "resref", + "value": "water_spike2" + } + }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "waternobleclaw" + }, + "RESREF": { + "type": "resref", + "value": "waternobleclaw" + } + }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "waternobleslam" + }, + "RESREF": { + "type": "resref", + "value": "waternobleslam" + } + }, { "__struct_id": 0, "RESREF": { @@ -36847,7 +36946,7 @@ "__struct_id": 0, "NAME": { "type": "cexostring", - "value": "Fire Knive" + "value": "Fire Knife" }, "RESREF": { "type": "resref", @@ -37694,6 +37793,17 @@ "value": "cutlass" } }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "Dark Elf Blade" + }, + "RESREF": { + "type": "resref", + "value": "drowblade" + } + }, { "__struct_id": 0, "NAME": { @@ -37727,17 +37837,6 @@ "value": "doomblade001" } }, - { - "__struct_id": 0, - "NAME": { - "type": "cexostring", - "value": "Drow Blade" - }, - "RESREF": { - "type": "resref", - "value": "drowblade" - } - }, { "__struct_id": 0, "NAME": { @@ -38517,7 +38616,7 @@ "__struct_id": 0, "NAME": { "type": "cexostring", - "value": "Drow Flail" + "value": "Dark Elf Flail" }, "RESREF": { "type": "resref", @@ -39101,6 +39200,17 @@ "value": "coldkiller" } }, + { + "__struct_id": 0, + "NAME": { + "type": "cexostring", + "value": "Dark Elf Battle Staff" + }, + "RESREF": { + "type": "resref", + "value": "drowbattlestaf" + } + }, { "__struct_id": 0, "NAME": { @@ -39167,17 +39277,6 @@ "value": "doubletrouble" } }, - { - "__struct_id": 0, - "NAME": { - "type": "cexostring", - "value": "Drow Battle Staff" - }, - "RESREF": { - "type": "resref", - "value": "drowbattlestaf" - } - }, { "__struct_id": 0, "NAME": { @@ -39939,22 +40038,22 @@ "__struct_id": 0, "NAME": { "type": "cexostring", - "value": "Drow Evoker Staff" + "value": "Druids Staff" }, "RESREF": { "type": "resref", - "value": "drowevokerstaff" + "value": "druidsstaff" } }, { "__struct_id": 0, "NAME": { "type": "cexostring", - "value": "Druids Staff" + "value": "Evoker Staff" }, "RESREF": { "type": "resref", - "value": "druidsstaff" + "value": "drowevokerstaff" } }, { diff --git a/_module/ncs/69_hench_heall.ncs b/_module/ncs/69_hench_heall.ncs index cb3e2357..0e87f4f5 100644 Binary files a/_module/ncs/69_hench_heall.ncs and b/_module/ncs/69_hench_heall.ncs differ diff --git a/_module/ncs/aa_rod_of_wonder.ncs b/_module/ncs/aa_rod_of_wonder.ncs index e11968fa..066cbb88 100644 Binary files a/_module/ncs/aa_rod_of_wonder.ncs and b/_module/ncs/aa_rod_of_wonder.ncs differ diff --git a/_module/ncs/area_spawner.ncs b/_module/ncs/area_spawner.ncs index 1fcaf596..854b0988 100644 Binary files a/_module/ncs/area_spawner.ncs and b/_module/ncs/area_spawner.ncs differ diff --git a/_module/ncs/barrel_ondeath.ncs b/_module/ncs/barrel_ondeath.ncs index 2a32c21e..15ca5149 100644 Binary files a/_module/ncs/barrel_ondeath.ncs and b/_module/ncs/barrel_ondeath.ncs differ diff --git a/_module/ncs/combatrndcreatur.ncs b/_module/ncs/combatrndcreatur.ncs new file mode 100644 index 00000000..109d1652 Binary files /dev/null and b/_module/ncs/combatrndcreatur.ncs differ diff --git a/_module/ncs/convo_script_sit.ncs b/_module/ncs/convo_script_sit.ncs index 033ed00d..30f115c8 100644 Binary files a/_module/ncs/convo_script_sit.ncs and b/_module/ncs/convo_script_sit.ncs differ diff --git a/_module/ncs/createheavymace.ncs b/_module/ncs/createheavymace.ncs index c7466ebd..9733253c 100644 Binary files a/_module/ncs/createheavymace.ncs and b/_module/ncs/createheavymace.ncs differ diff --git a/_module/ncs/dragonspawn.ncs b/_module/ncs/dragonspawn.ncs index ad2ffa0b..0378653b 100644 Binary files a/_module/ncs/dragonspawn.ncs and b/_module/ncs/dragonspawn.ncs differ diff --git a/_module/ncs/drow_ck_race.ncs b/_module/ncs/drow_ck_race.ncs index e76f9d0e..0547204a 100644 Binary files a/_module/ncs/drow_ck_race.ncs and b/_module/ncs/drow_ck_race.ncs differ diff --git a/_module/ncs/drow_merc_ck.ncs b/_module/ncs/drow_merc_ck.ncs index e801eb73..0ef7beb7 100644 Binary files a/_module/ncs/drow_merc_ck.ncs and b/_module/ncs/drow_merc_ck.ncs differ diff --git a/_module/ncs/dwarf_merc_ck.ncs b/_module/ncs/dwarf_merc_ck.ncs index dbe4b834..aac315bf 100644 Binary files a/_module/ncs/dwarf_merc_ck.ncs and b/_module/ncs/dwarf_merc_ck.ncs differ diff --git a/_module/ncs/explosive_death.ncs b/_module/ncs/explosive_death.ncs index b567a5f2..244ca12c 100644 Binary files a/_module/ncs/explosive_death.ncs and b/_module/ncs/explosive_death.ncs differ diff --git a/_module/ncs/gen_treasure1.ncs b/_module/ncs/gen_treasure1.ncs index 1ee4ac25..cd91015f 100644 Binary files a/_module/ncs/gen_treasure1.ncs and b/_module/ncs/gen_treasure1.ncs differ diff --git a/_module/ncs/gz_healer_spawn.ncs b/_module/ncs/gz_healer_spawn.ncs index c7c51463..cd298b6f 100644 Binary files a/_module/ncs/gz_healer_spawn.ncs and b/_module/ncs/gz_healer_spawn.ncs differ diff --git a/_module/ncs/henchlvl_arcanta.ncs b/_module/ncs/henchlvl_arcanta.ncs index 719b8f5d..ec4f7967 100644 Binary files a/_module/ncs/henchlvl_arcanta.ncs and b/_module/ncs/henchlvl_arcanta.ncs differ diff --git a/_module/ncs/henchlvl_dwrfdta.ncs b/_module/ncs/henchlvl_dwrfdta.ncs index 9c0ba961..490ca60f 100644 Binary files a/_module/ncs/henchlvl_dwrfdta.ncs and b/_module/ncs/henchlvl_dwrfdta.ncs differ diff --git a/_module/ncs/king_sit.ncs b/_module/ncs/king_sit.ncs index 718a11ea..9e419873 100644 Binary files a/_module/ncs/king_sit.ncs and b/_module/ncs/king_sit.ncs differ diff --git a/_module/ncs/lmpperfspawn.ncs b/_module/ncs/lmpperfspawn.ncs index 795d423e..cfa917dd 100644 Binary files a/_module/ncs/lmpperfspawn.ncs and b/_module/ncs/lmpperfspawn.ncs differ diff --git a/_module/ncs/no_ai_atk.ncs b/_module/ncs/no_ai_atk.ncs new file mode 100644 index 00000000..d396ab07 Binary files /dev/null and b/_module/ncs/no_ai_atk.ncs differ diff --git a/_module/ncs/no_ai_blk.ncs b/_module/ncs/no_ai_blk.ncs new file mode 100644 index 00000000..4187cdae Binary files /dev/null and b/_module/ncs/no_ai_blk.ncs differ diff --git a/_module/ncs/no_ai_cmb.ncs b/_module/ncs/no_ai_cmb.ncs new file mode 100644 index 00000000..c333f0b5 Binary files /dev/null and b/_module/ncs/no_ai_cmb.ncs differ diff --git a/_module/ncs/no_ai_cnv.ncs b/_module/ncs/no_ai_cnv.ncs new file mode 100644 index 00000000..a1c2f4ba Binary files /dev/null and b/_module/ncs/no_ai_cnv.ncs differ diff --git a/_module/ncs/no_ai_dam.ncs b/_module/ncs/no_ai_dam.ncs new file mode 100644 index 00000000..af37f3a8 Binary files /dev/null and b/_module/ncs/no_ai_dam.ncs differ diff --git a/_module/ncs/no_ai_dis.ncs b/_module/ncs/no_ai_dis.ncs new file mode 100644 index 00000000..3e925ad5 Binary files /dev/null and b/_module/ncs/no_ai_dis.ncs differ diff --git a/_module/ncs/no_ai_dth.ncs b/_module/ncs/no_ai_dth.ncs new file mode 100644 index 00000000..c9878374 Binary files /dev/null and b/_module/ncs/no_ai_dth.ncs differ diff --git a/_module/ncs/no_ai_hrt.ncs b/_module/ncs/no_ai_hrt.ncs new file mode 100644 index 00000000..e5b2a02a Binary files /dev/null and b/_module/ncs/no_ai_hrt.ncs differ diff --git a/_module/ncs/no_ai_per.ncs b/_module/ncs/no_ai_per.ncs new file mode 100644 index 00000000..c1540668 Binary files /dev/null and b/_module/ncs/no_ai_per.ncs differ diff --git a/_module/ncs/no_ai_rst.ncs b/_module/ncs/no_ai_rst.ncs new file mode 100644 index 00000000..f869d466 Binary files /dev/null and b/_module/ncs/no_ai_rst.ncs differ diff --git a/_module/ncs/no_ai_spt.ncs b/_module/ncs/no_ai_spt.ncs new file mode 100644 index 00000000..76036495 Binary files /dev/null and b/_module/ncs/no_ai_spt.ncs differ diff --git a/_module/ncs/no_scr_asclis.ncs b/_module/ncs/no_scr_asclis.ncs new file mode 100644 index 00000000..77142e54 Binary files /dev/null and b/_module/ncs/no_scr_asclis.ncs differ diff --git a/_module/ncs/no_scr_cleanvars.ncs b/_module/ncs/no_scr_cleanvars.ncs new file mode 100644 index 00000000..a1f44bdc Binary files /dev/null and b/_module/ncs/no_scr_cleanvars.ncs differ diff --git a/_module/ncs/no_scr_excorpse.ncs b/_module/ncs/no_scr_excorpse.ncs new file mode 100644 index 00000000..dad7af59 Binary files /dev/null and b/_module/ncs/no_scr_excorpse.ncs differ diff --git a/_module/ncs/no_scr_logeq.ncs b/_module/ncs/no_scr_logeq.ncs new file mode 100644 index 00000000..46566fda Binary files /dev/null and b/_module/ncs/no_scr_logeq.ncs differ diff --git a/_module/ncs/no_scr_logspnloc.ncs b/_module/ncs/no_scr_logspnloc.ncs new file mode 100644 index 00000000..a5a56b06 Binary files /dev/null and b/_module/ncs/no_scr_logspnloc.ncs differ diff --git a/_module/ncs/no_scr_shutdown.ncs b/_module/ncs/no_scr_shutdown.ncs new file mode 100644 index 00000000..b6a6beb2 Binary files /dev/null and b/_module/ncs/no_scr_shutdown.ncs differ diff --git a/_module/ncs/no_spn_beh.ncs b/_module/ncs/no_spn_beh.ncs new file mode 100644 index 00000000..b78b702e Binary files /dev/null and b/_module/ncs/no_spn_beh.ncs differ diff --git a/_module/ncs/no_spn_clr.ncs b/_module/ncs/no_spn_clr.ncs new file mode 100644 index 00000000..c2465272 Binary files /dev/null and b/_module/ncs/no_spn_clr.ncs differ diff --git a/_module/ncs/no_spn_fiend.ncs b/_module/ncs/no_spn_fiend.ncs new file mode 100644 index 00000000..71002acf Binary files /dev/null and b/_module/ncs/no_spn_fiend.ncs differ diff --git a/_module/ncs/no_spn_ftr.ncs b/_module/ncs/no_spn_ftr.ncs new file mode 100644 index 00000000..cb55dca4 Binary files /dev/null and b/_module/ncs/no_spn_ftr.ncs differ diff --git a/_module/ncs/no_spn_ftrfire.ncs b/_module/ncs/no_spn_ftrfire.ncs new file mode 100644 index 00000000..c948ce48 Binary files /dev/null and b/_module/ncs/no_spn_ftrfire.ncs differ diff --git a/_module/ncs/no_spn_ftrsize.ncs b/_module/ncs/no_spn_ftrsize.ncs new file mode 100644 index 00000000..c948ce48 Binary files /dev/null and b/_module/ncs/no_spn_ftrsize.ncs differ diff --git a/_module/ncs/no_spn_ftrwater.ncs b/_module/ncs/no_spn_ftrwater.ncs new file mode 100644 index 00000000..84dbb6a7 Binary files /dev/null and b/_module/ncs/no_spn_ftrwater.ncs differ diff --git a/_module/ncs/no_spn_melcast1.ncs b/_module/ncs/no_spn_melcast1.ncs new file mode 100644 index 00000000..593e2fd8 Binary files /dev/null and b/_module/ncs/no_spn_melcast1.ncs differ diff --git a/_module/ncs/no_spn_melcast2.ncs b/_module/ncs/no_spn_melcast2.ncs new file mode 100644 index 00000000..419fbad0 Binary files /dev/null and b/_module/ncs/no_spn_melcast2.ncs differ diff --git a/_module/ncs/no_spn_melcast3.ncs b/_module/ncs/no_spn_melcast3.ncs new file mode 100644 index 00000000..02c67c00 Binary files /dev/null and b/_module/ncs/no_spn_melcast3.ncs differ diff --git a/_module/ncs/no_spn_melenh.ncs b/_module/ncs/no_spn_melenh.ncs new file mode 100644 index 00000000..3a8243d5 Binary files /dev/null and b/_module/ncs/no_spn_melenh.ncs differ diff --git a/_module/ncs/no_spn_rftr.ncs b/_module/ncs/no_spn_rftr.ncs new file mode 100644 index 00000000..ecedba52 Binary files /dev/null and b/_module/ncs/no_spn_rftr.ncs differ diff --git a/_module/ncs/no_spn_rftrcast1.ncs b/_module/ncs/no_spn_rftrcast1.ncs new file mode 100644 index 00000000..19d23a1a Binary files /dev/null and b/_module/ncs/no_spn_rftrcast1.ncs differ diff --git a/_module/ncs/no_spn_rngcast3.ncs b/_module/ncs/no_spn_rngcast3.ncs new file mode 100644 index 00000000..7de31351 Binary files /dev/null and b/_module/ncs/no_spn_rngcast3.ncs differ diff --git a/_module/ncs/no_spn_rog.ncs b/_module/ncs/no_spn_rog.ncs new file mode 100644 index 00000000..86bff99f Binary files /dev/null and b/_module/ncs/no_spn_rog.ncs differ diff --git a/_module/ncs/no_spn_rogcast1.ncs b/_module/ncs/no_spn_rogcast1.ncs new file mode 100644 index 00000000..70f9b256 Binary files /dev/null and b/_module/ncs/no_spn_rogcast1.ncs differ diff --git a/_module/ncs/no_spn_rogcast3.ncs b/_module/ncs/no_spn_rogcast3.ncs new file mode 100644 index 00000000..35b31db2 Binary files /dev/null and b/_module/ncs/no_spn_rogcast3.ncs differ diff --git a/_module/ncs/no_spn_rogenh.ncs b/_module/ncs/no_spn_rogenh.ncs new file mode 100644 index 00000000..481cf0bf Binary files /dev/null and b/_module/ncs/no_spn_rogenh.ncs differ diff --git a/_module/ncs/no_spn_rogtel.ncs b/_module/ncs/no_spn_rogtel.ncs new file mode 100644 index 00000000..6108a3c4 Binary files /dev/null and b/_module/ncs/no_spn_rogtel.ncs differ diff --git a/_module/ncs/no_spn_summ.ncs b/_module/ncs/no_spn_summ.ncs new file mode 100644 index 00000000..22b929ec Binary files /dev/null and b/_module/ncs/no_spn_summ.ncs differ diff --git a/_module/ncs/no_spn_wiz.ncs b/_module/ncs/no_spn_wiz.ncs new file mode 100644 index 00000000..074af2a4 Binary files /dev/null and b/_module/ncs/no_spn_wiz.ncs differ diff --git a/_module/ncs/nw_c2_9icewraith.ncs b/_module/ncs/nw_c2_9icewraith.ncs index 0bd1d266..80d83f87 100644 Binary files a/_module/ncs/nw_c2_9icewraith.ncs and b/_module/ncs/nw_c2_9icewraith.ncs differ diff --git a/_module/ncs/nw_c2_9itigwrait.ncs b/_module/ncs/nw_c2_9itigwrait.ncs index dbce9ae7..81851427 100644 Binary files a/_module/ncs/nw_c2_9itigwrait.ncs and b/_module/ncs/nw_c2_9itigwrait.ncs differ diff --git a/_module/ncs/nw_c2_bossdie.ncs b/_module/ncs/nw_c2_bossdie.ncs index b7c8a5ad..1532115a 100644 Binary files a/_module/ncs/nw_c2_bossdie.ncs and b/_module/ncs/nw_c2_bossdie.ncs differ diff --git a/_module/ncs/nw_c2_defaul1b.ncs b/_module/ncs/nw_c2_defaul1b.ncs new file mode 100644 index 00000000..f407defb Binary files /dev/null and b/_module/ncs/nw_c2_defaul1b.ncs differ diff --git a/_module/ncs/nw_c2_defauldb.ncs b/_module/ncs/nw_c2_defauldb.ncs new file mode 100644 index 00000000..ecb1c72d Binary files /dev/null and b/_module/ncs/nw_c2_defauldb.ncs differ diff --git a/_module/ncs/nw_c2_default9_t.ncs b/_module/ncs/nw_c2_default9_t.ncs index 79223641..39a88ce9 100644 Binary files a/_module/ncs/nw_c2_default9_t.ncs and b/_module/ncs/nw_c2_default9_t.ncs differ diff --git a/_module/ncs/nw_c2_default9pr.ncs b/_module/ncs/nw_c2_default9pr.ncs index 6fbb5926..2efa9020 100644 Binary files a/_module/ncs/nw_c2_default9pr.ncs and b/_module/ncs/nw_c2_default9pr.ncs differ diff --git a/_module/ncs/nw_c2_default9si.ncs b/_module/ncs/nw_c2_default9si.ncs index 86bb6a67..887a2fac 100644 Binary files a/_module/ncs/nw_c2_default9si.ncs and b/_module/ncs/nw_c2_default9si.ncs differ diff --git a/_module/ncs/nw_c2_fastbuff9.ncs b/_module/ncs/nw_c2_fastbuff9.ncs new file mode 100644 index 00000000..f3b28dcb Binary files /dev/null and b/_module/ncs/nw_c2_fastbuff9.ncs differ diff --git a/_module/ncs/nw_c2_highai.ncs b/_module/ncs/nw_c2_highai.ncs index 8af5813e..5270b209 100644 Binary files a/_module/ncs/nw_c2_highai.ncs and b/_module/ncs/nw_c2_highai.ncs differ diff --git a/_module/ncs/nw_c2_water9.ncs b/_module/ncs/nw_c2_water9.ncs new file mode 100644 index 00000000..2118139d Binary files /dev/null and b/_module/ncs/nw_c2_water9.ncs differ diff --git a/_module/ncs/nw_c2_water9b.ncs b/_module/ncs/nw_c2_water9b.ncs new file mode 100644 index 00000000..fa5ddc98 Binary files /dev/null and b/_module/ncs/nw_c2_water9b.ncs differ diff --git a/_module/ncs/nw_o2_boss.ncs b/_module/ncs/nw_o2_boss.ncs index aeabdb71..8cca0fa8 100644 Binary files a/_module/ncs/nw_o2_boss.ncs and b/_module/ncs/nw_o2_boss.ncs differ diff --git a/_module/ncs/nw_o2_generalhig.ncs b/_module/ncs/nw_o2_generalhig.ncs index 105799a2..6ae43ab3 100644 Binary files a/_module/ncs/nw_o2_generalhig.ncs and b/_module/ncs/nw_o2_generalhig.ncs differ diff --git a/_module/ncs/nw_o2_generallow.ncs b/_module/ncs/nw_o2_generallow.ncs index 8b9e6349..f141a5ab 100644 Binary files a/_module/ncs/nw_o2_generallow.ncs and b/_module/ncs/nw_o2_generallow.ncs differ diff --git a/_module/ncs/nw_o2_generalmed.ncs b/_module/ncs/nw_o2_generalmed.ncs index d581fc7f..c86c52cd 100644 Binary files a/_module/ncs/nw_o2_generalmed.ncs and b/_module/ncs/nw_o2_generalmed.ncs differ diff --git a/_module/ncs/nw_s1_aurablnda.ncs b/_module/ncs/nw_s1_aurablnda.ncs index 376b84a9..d0724951 100644 Binary files a/_module/ncs/nw_s1_aurablnda.ncs and b/_module/ncs/nw_s1_aurablnda.ncs differ diff --git a/_module/ncs/nw_s1_auracoldc.ncs b/_module/ncs/nw_s1_auracoldc.ncs index 841ab57b..86315279 100644 Binary files a/_module/ncs/nw_s1_auracoldc.ncs and b/_module/ncs/nw_s1_auracoldc.ncs differ diff --git a/_module/ncs/nw_s1_auraelecc.ncs b/_module/ncs/nw_s1_auraelecc.ncs index 6e622d99..42bdbe95 100644 Binary files a/_module/ncs/nw_s1_auraelecc.ncs and b/_module/ncs/nw_s1_auraelecc.ncs differ diff --git a/_module/ncs/nw_s1_aurafirec.ncs b/_module/ncs/nw_s1_aurafirec.ncs index 50fe6329..77f3e6c3 100644 Binary files a/_module/ncs/nw_s1_aurafirec.ncs and b/_module/ncs/nw_s1_aurafirec.ncs differ diff --git a/_module/ncs/nw_s1_auramenca.ncs b/_module/ncs/nw_s1_auramenca.ncs index cfdaf28a..9ffa8ee0 100644 Binary files a/_module/ncs/nw_s1_auramenca.ncs and b/_module/ncs/nw_s1_auramenca.ncs differ diff --git a/_module/ncs/nw_s1_aurastuna.ncs b/_module/ncs/nw_s1_aurastuna.ncs index 279ae960..6710ed26 100644 Binary files a/_module/ncs/nw_s1_aurastuna.ncs and b/_module/ncs/nw_s1_aurastuna.ncs differ diff --git a/_module/ncs/nw_s1_aurauneaa.ncs b/_module/ncs/nw_s1_aurauneaa.ncs index f2ae3376..d0ae8f3b 100644 Binary files a/_module/ncs/nw_s1_aurauneaa.ncs and b/_module/ncs/nw_s1_aurauneaa.ncs differ diff --git a/_module/ncs/nw_s1_bltacid.ncs b/_module/ncs/nw_s1_bltacid.ncs index 9e9d57ba..2c5f9772 100644 Binary files a/_module/ncs/nw_s1_bltacid.ncs and b/_module/ncs/nw_s1_bltacid.ncs differ diff --git a/_module/ncs/nw_s1_bltcharm.ncs b/_module/ncs/nw_s1_bltcharm.ncs index 60db2a78..15e2f88c 100644 Binary files a/_module/ncs/nw_s1_bltcharm.ncs and b/_module/ncs/nw_s1_bltcharm.ncs differ diff --git a/_module/ncs/nw_s1_bltchrdr.ncs b/_module/ncs/nw_s1_bltchrdr.ncs index d86707e7..ba5088f7 100644 Binary files a/_module/ncs/nw_s1_bltchrdr.ncs and b/_module/ncs/nw_s1_bltchrdr.ncs differ diff --git a/_module/ncs/nw_s1_bltcold.ncs b/_module/ncs/nw_s1_bltcold.ncs index 373a803b..65c18b44 100644 Binary files a/_module/ncs/nw_s1_bltcold.ncs and b/_module/ncs/nw_s1_bltcold.ncs differ diff --git a/_module/ncs/nw_s1_bltcondr.ncs b/_module/ncs/nw_s1_bltcondr.ncs index e8c357f8..fc489eb4 100644 Binary files a/_module/ncs/nw_s1_bltcondr.ncs and b/_module/ncs/nw_s1_bltcondr.ncs differ diff --git a/_module/ncs/nw_s1_bltconf.ncs b/_module/ncs/nw_s1_bltconf.ncs index 914f4a12..393d3e17 100644 Binary files a/_module/ncs/nw_s1_bltconf.ncs and b/_module/ncs/nw_s1_bltconf.ncs differ diff --git a/_module/ncs/nw_s1_bltdaze.ncs b/_module/ncs/nw_s1_bltdaze.ncs index 708985f1..84410e13 100644 Binary files a/_module/ncs/nw_s1_bltdaze.ncs and b/_module/ncs/nw_s1_bltdaze.ncs differ diff --git a/_module/ncs/nw_s1_bltdeath.ncs b/_module/ncs/nw_s1_bltdeath.ncs index c1ecd7d8..ee8ad28a 100644 Binary files a/_module/ncs/nw_s1_bltdeath.ncs and b/_module/ncs/nw_s1_bltdeath.ncs differ diff --git a/_module/ncs/nw_s1_bltdexdr.ncs b/_module/ncs/nw_s1_bltdexdr.ncs index ecc29838..320571a0 100644 Binary files a/_module/ncs/nw_s1_bltdexdr.ncs and b/_module/ncs/nw_s1_bltdexdr.ncs differ diff --git a/_module/ncs/nw_s1_bltdisese.ncs b/_module/ncs/nw_s1_bltdisese.ncs index 8580d056..5540adce 100644 Binary files a/_module/ncs/nw_s1_bltdisese.ncs and b/_module/ncs/nw_s1_bltdisese.ncs differ diff --git a/_module/ncs/nw_s1_bltdomn.ncs b/_module/ncs/nw_s1_bltdomn.ncs index ab8a4bea..3798c891 100644 Binary files a/_module/ncs/nw_s1_bltdomn.ncs and b/_module/ncs/nw_s1_bltdomn.ncs differ diff --git a/_module/ncs/nw_s1_bltfire.ncs b/_module/ncs/nw_s1_bltfire.ncs index cf13feaf..94914546 100644 Binary files a/_module/ncs/nw_s1_bltfire.ncs and b/_module/ncs/nw_s1_bltfire.ncs differ diff --git a/_module/ncs/nw_s1_bltintdr.ncs b/_module/ncs/nw_s1_bltintdr.ncs index 33b3da46..e1853804 100644 Binary files a/_module/ncs/nw_s1_bltintdr.ncs and b/_module/ncs/nw_s1_bltintdr.ncs differ diff --git a/_module/ncs/nw_s1_bltknckd.ncs b/_module/ncs/nw_s1_bltknckd.ncs index 5c098196..5e6d411c 100644 Binary files a/_module/ncs/nw_s1_bltknckd.ncs and b/_module/ncs/nw_s1_bltknckd.ncs differ diff --git a/_module/ncs/nw_s1_bltlightn.ncs b/_module/ncs/nw_s1_bltlightn.ncs index 93155270..022d8709 100644 Binary files a/_module/ncs/nw_s1_bltlightn.ncs and b/_module/ncs/nw_s1_bltlightn.ncs differ diff --git a/_module/ncs/nw_s1_bltlvldr.ncs b/_module/ncs/nw_s1_bltlvldr.ncs index 7f6d6ea1..f82d2911 100644 Binary files a/_module/ncs/nw_s1_bltlvldr.ncs and b/_module/ncs/nw_s1_bltlvldr.ncs differ diff --git a/_module/ncs/nw_s1_bltparal.ncs b/_module/ncs/nw_s1_bltparal.ncs index 352beb7c..e5229f26 100644 Binary files a/_module/ncs/nw_s1_bltparal.ncs and b/_module/ncs/nw_s1_bltparal.ncs differ diff --git a/_module/ncs/nw_s1_bltpoison.ncs b/_module/ncs/nw_s1_bltpoison.ncs index d7368cb1..38439919 100644 Binary files a/_module/ncs/nw_s1_bltpoison.ncs and b/_module/ncs/nw_s1_bltpoison.ncs differ diff --git a/_module/ncs/nw_s1_bltshards.ncs b/_module/ncs/nw_s1_bltshards.ncs index b260bb75..37746037 100644 Binary files a/_module/ncs/nw_s1_bltshards.ncs and b/_module/ncs/nw_s1_bltshards.ncs differ diff --git a/_module/ncs/nw_s1_bltslow.ncs b/_module/ncs/nw_s1_bltslow.ncs index 779dedd9..12ffa8e8 100644 Binary files a/_module/ncs/nw_s1_bltslow.ncs and b/_module/ncs/nw_s1_bltslow.ncs differ diff --git a/_module/ncs/nw_s1_bltstrdr.ncs b/_module/ncs/nw_s1_bltstrdr.ncs index 7ecf22e8..a79d28da 100644 Binary files a/_module/ncs/nw_s1_bltstrdr.ncs and b/_module/ncs/nw_s1_bltstrdr.ncs differ diff --git a/_module/ncs/nw_s1_bltstun.ncs b/_module/ncs/nw_s1_bltstun.ncs index 0b8993e3..21db221b 100644 Binary files a/_module/ncs/nw_s1_bltstun.ncs and b/_module/ncs/nw_s1_bltstun.ncs differ diff --git a/_module/ncs/nw_s1_bltweb.ncs b/_module/ncs/nw_s1_bltweb.ncs index 25d622a0..42bed50b 100644 Binary files a/_module/ncs/nw_s1_bltweb.ncs and b/_module/ncs/nw_s1_bltweb.ncs differ diff --git a/_module/ncs/nw_s1_bltwisdr.ncs b/_module/ncs/nw_s1_bltwisdr.ncs index f357cf1b..ded49261 100644 Binary files a/_module/ncs/nw_s1_bltwisdr.ncs and b/_module/ncs/nw_s1_bltwisdr.ncs differ diff --git a/_module/ncs/nw_s1_coneacid.ncs b/_module/ncs/nw_s1_coneacid.ncs index bad07028..2a7bdf38 100644 Binary files a/_module/ncs/nw_s1_coneacid.ncs and b/_module/ncs/nw_s1_coneacid.ncs differ diff --git a/_module/ncs/nw_s1_conecold.ncs b/_module/ncs/nw_s1_conecold.ncs index 21c9e7e2..d0c3e0e2 100644 Binary files a/_module/ncs/nw_s1_conecold.ncs and b/_module/ncs/nw_s1_conecold.ncs differ diff --git a/_module/ncs/nw_s1_conedisea.ncs b/_module/ncs/nw_s1_conedisea.ncs index 3bac3ebd..c97a585d 100644 Binary files a/_module/ncs/nw_s1_conedisea.ncs and b/_module/ncs/nw_s1_conedisea.ncs differ diff --git a/_module/ncs/nw_s1_coneelec.ncs b/_module/ncs/nw_s1_coneelec.ncs index f1cfdc77..84f5b5cc 100644 Binary files a/_module/ncs/nw_s1_coneelec.ncs and b/_module/ncs/nw_s1_coneelec.ncs differ diff --git a/_module/ncs/nw_s1_conesonic.ncs b/_module/ncs/nw_s1_conesonic.ncs index f7b256b4..83e041d4 100644 Binary files a/_module/ncs/nw_s1_conesonic.ncs and b/_module/ncs/nw_s1_conesonic.ncs differ diff --git a/_module/ncs/nw_s1_dragfear.ncs b/_module/ncs/nw_s1_dragfear.ncs index e0a66afa..f5e87c6a 100644 Binary files a/_module/ncs/nw_s1_dragfear.ncs and b/_module/ncs/nw_s1_dragfear.ncs differ diff --git a/_module/ncs/nw_s1_dragfeara.ncs b/_module/ncs/nw_s1_dragfeara.ncs index 717ef4f6..810924b6 100644 Binary files a/_module/ncs/nw_s1_dragfeara.ncs and b/_module/ncs/nw_s1_dragfeara.ncs differ diff --git a/_module/ncs/nw_s1_gazechaos.ncs b/_module/ncs/nw_s1_gazechaos.ncs index 584a1fd8..a882311f 100644 Binary files a/_module/ncs/nw_s1_gazechaos.ncs and b/_module/ncs/nw_s1_gazechaos.ncs differ diff --git a/_module/ncs/nw_s1_gazecharm.ncs b/_module/ncs/nw_s1_gazecharm.ncs index b27cd59f..a71d2741 100644 Binary files a/_module/ncs/nw_s1_gazecharm.ncs and b/_module/ncs/nw_s1_gazecharm.ncs differ diff --git a/_module/ncs/nw_s1_gazeconfu.ncs b/_module/ncs/nw_s1_gazeconfu.ncs index f5a010fd..c6ff90b9 100644 Binary files a/_module/ncs/nw_s1_gazeconfu.ncs and b/_module/ncs/nw_s1_gazeconfu.ncs differ diff --git a/_module/ncs/nw_s1_gazedaze.ncs b/_module/ncs/nw_s1_gazedaze.ncs index d63fc808..9706a1d2 100644 Binary files a/_module/ncs/nw_s1_gazedaze.ncs and b/_module/ncs/nw_s1_gazedaze.ncs differ diff --git a/_module/ncs/nw_s1_gazedeath.ncs b/_module/ncs/nw_s1_gazedeath.ncs index 149369ae..aad794c1 100644 Binary files a/_module/ncs/nw_s1_gazedeath.ncs and b/_module/ncs/nw_s1_gazedeath.ncs differ diff --git a/_module/ncs/nw_s1_gazedomn.ncs b/_module/ncs/nw_s1_gazedomn.ncs index ec2f33fe..f6e12e43 100644 Binary files a/_module/ncs/nw_s1_gazedomn.ncs and b/_module/ncs/nw_s1_gazedomn.ncs differ diff --git a/_module/ncs/nw_s1_gazedoom.ncs b/_module/ncs/nw_s1_gazedoom.ncs index 9b0f39ad..d2ce7860 100644 Binary files a/_module/ncs/nw_s1_gazedoom.ncs and b/_module/ncs/nw_s1_gazedoom.ncs differ diff --git a/_module/ncs/nw_s1_gazeevil.ncs b/_module/ncs/nw_s1_gazeevil.ncs index d5e209d4..45d0e5ea 100644 Binary files a/_module/ncs/nw_s1_gazeevil.ncs and b/_module/ncs/nw_s1_gazeevil.ncs differ diff --git a/_module/ncs/nw_s1_gazefear.ncs b/_module/ncs/nw_s1_gazefear.ncs index bb9fe902..e28c865b 100644 Binary files a/_module/ncs/nw_s1_gazefear.ncs and b/_module/ncs/nw_s1_gazefear.ncs differ diff --git a/_module/ncs/nw_s1_gazegood.ncs b/_module/ncs/nw_s1_gazegood.ncs index 33deeef8..f956a449 100644 Binary files a/_module/ncs/nw_s1_gazegood.ncs and b/_module/ncs/nw_s1_gazegood.ncs differ diff --git a/_module/ncs/nw_s1_gazelaw.ncs b/_module/ncs/nw_s1_gazelaw.ncs index c4d06dc9..bf1a83a7 100644 Binary files a/_module/ncs/nw_s1_gazelaw.ncs and b/_module/ncs/nw_s1_gazelaw.ncs differ diff --git a/_module/ncs/nw_s1_gazestun.ncs b/_module/ncs/nw_s1_gazestun.ncs index 717ed05c..4ae84c60 100644 Binary files a/_module/ncs/nw_s1_gazestun.ncs and b/_module/ncs/nw_s1_gazestun.ncs differ diff --git a/_module/ncs/nw_s1_hndbreath.ncs b/_module/ncs/nw_s1_hndbreath.ncs index aa1ea7e9..d4712b84 100644 Binary files a/_module/ncs/nw_s1_hndbreath.ncs and b/_module/ncs/nw_s1_hndbreath.ncs differ diff --git a/_module/ncs/nw_s1_howlconf.ncs b/_module/ncs/nw_s1_howlconf.ncs index 10cd0209..2b29884e 100644 Binary files a/_module/ncs/nw_s1_howlconf.ncs and b/_module/ncs/nw_s1_howlconf.ncs differ diff --git a/_module/ncs/nw_s1_howldaze.ncs b/_module/ncs/nw_s1_howldaze.ncs index 82237ef9..360193d4 100644 Binary files a/_module/ncs/nw_s1_howldaze.ncs and b/_module/ncs/nw_s1_howldaze.ncs differ diff --git a/_module/ncs/nw_s1_howldeath.ncs b/_module/ncs/nw_s1_howldeath.ncs index 06fe047f..10ae3c6a 100644 Binary files a/_module/ncs/nw_s1_howldeath.ncs and b/_module/ncs/nw_s1_howldeath.ncs differ diff --git a/_module/ncs/nw_s1_howlfear.ncs b/_module/ncs/nw_s1_howlfear.ncs index a2af6c1e..35b5d88e 100644 Binary files a/_module/ncs/nw_s1_howlfear.ncs and b/_module/ncs/nw_s1_howlfear.ncs differ diff --git a/_module/ncs/nw_s1_howlparal.ncs b/_module/ncs/nw_s1_howlparal.ncs index aed44157..27f33d9b 100644 Binary files a/_module/ncs/nw_s1_howlparal.ncs and b/_module/ncs/nw_s1_howlparal.ncs differ diff --git a/_module/ncs/nw_s1_howlsonic.ncs b/_module/ncs/nw_s1_howlsonic.ncs index 62c88721..69714568 100644 Binary files a/_module/ncs/nw_s1_howlsonic.ncs and b/_module/ncs/nw_s1_howlsonic.ncs differ diff --git a/_module/ncs/nw_s1_howlstun.ncs b/_module/ncs/nw_s1_howlstun.ncs index 28a19f6e..cae87497 100644 Binary files a/_module/ncs/nw_s1_howlstun.ncs and b/_module/ncs/nw_s1_howlstun.ncs differ diff --git a/_module/ncs/nw_s1_krenscare.ncs b/_module/ncs/nw_s1_krenscare.ncs index fcbbba78..9846d70f 100644 Binary files a/_module/ncs/nw_s1_krenscare.ncs and b/_module/ncs/nw_s1_krenscare.ncs differ diff --git a/_module/ncs/nw_s1_mephsalt.ncs b/_module/ncs/nw_s1_mephsalt.ncs index 0e92ae39..f9e0f1f6 100644 Binary files a/_module/ncs/nw_s1_mephsalt.ncs and b/_module/ncs/nw_s1_mephsalt.ncs differ diff --git a/_module/ncs/nw_s1_mephsteam.ncs b/_module/ncs/nw_s1_mephsteam.ncs index 91107e1c..edb3afbd 100644 Binary files a/_module/ncs/nw_s1_mephsteam.ncs and b/_module/ncs/nw_s1_mephsteam.ncs differ diff --git a/_module/ncs/nw_s1_pulschrdr.ncs b/_module/ncs/nw_s1_pulschrdr.ncs index e3f8c5ac..ce2188a8 100644 Binary files a/_module/ncs/nw_s1_pulschrdr.ncs and b/_module/ncs/nw_s1_pulschrdr.ncs differ diff --git a/_module/ncs/nw_s1_pulscold.ncs b/_module/ncs/nw_s1_pulscold.ncs index b17e5afb..5cbf34e7 100644 Binary files a/_module/ncs/nw_s1_pulscold.ncs and b/_module/ncs/nw_s1_pulscold.ncs differ diff --git a/_module/ncs/nw_s1_pulscondr.ncs b/_module/ncs/nw_s1_pulscondr.ncs index a1301921..74ea0478 100644 Binary files a/_module/ncs/nw_s1_pulscondr.ncs and b/_module/ncs/nw_s1_pulscondr.ncs differ diff --git a/_module/ncs/nw_s1_pulsdeath.ncs b/_module/ncs/nw_s1_pulsdeath.ncs index 230f564b..3e89bc83 100644 Binary files a/_module/ncs/nw_s1_pulsdeath.ncs and b/_module/ncs/nw_s1_pulsdeath.ncs differ diff --git a/_module/ncs/nw_s1_pulsdexdr.ncs b/_module/ncs/nw_s1_pulsdexdr.ncs index a2fd8841..07952fc7 100644 Binary files a/_module/ncs/nw_s1_pulsdexdr.ncs and b/_module/ncs/nw_s1_pulsdexdr.ncs differ diff --git a/_module/ncs/nw_s1_pulsdis.ncs b/_module/ncs/nw_s1_pulsdis.ncs index 80e023b5..9fd0a3e8 100644 Binary files a/_module/ncs/nw_s1_pulsdis.ncs and b/_module/ncs/nw_s1_pulsdis.ncs differ diff --git a/_module/ncs/nw_s1_pulselec.ncs b/_module/ncs/nw_s1_pulselec.ncs index 40fc5cfe..2c33421d 100644 Binary files a/_module/ncs/nw_s1_pulselec.ncs and b/_module/ncs/nw_s1_pulselec.ncs differ diff --git a/_module/ncs/nw_s1_pulsfire.ncs b/_module/ncs/nw_s1_pulsfire.ncs index 20f097e2..2237ac7a 100644 Binary files a/_module/ncs/nw_s1_pulsfire.ncs and b/_module/ncs/nw_s1_pulsfire.ncs differ diff --git a/_module/ncs/nw_s1_pulsholy.ncs b/_module/ncs/nw_s1_pulsholy.ncs index c2302071..b7e8e12f 100644 Binary files a/_module/ncs/nw_s1_pulsholy.ncs and b/_module/ncs/nw_s1_pulsholy.ncs differ diff --git a/_module/ncs/nw_s1_pulsintdr.ncs b/_module/ncs/nw_s1_pulsintdr.ncs index 6730fc8f..cdb75258 100644 Binary files a/_module/ncs/nw_s1_pulsintdr.ncs and b/_module/ncs/nw_s1_pulsintdr.ncs differ diff --git a/_module/ncs/nw_s1_pulslvldr.ncs b/_module/ncs/nw_s1_pulslvldr.ncs index de1184e1..1aee6262 100644 Binary files a/_module/ncs/nw_s1_pulslvldr.ncs and b/_module/ncs/nw_s1_pulslvldr.ncs differ diff --git a/_module/ncs/nw_s1_pulsneg.ncs b/_module/ncs/nw_s1_pulsneg.ncs index 373c0523..dda43b8b 100644 Binary files a/_module/ncs/nw_s1_pulsneg.ncs and b/_module/ncs/nw_s1_pulsneg.ncs differ diff --git a/_module/ncs/nw_s1_pulspois.ncs b/_module/ncs/nw_s1_pulspois.ncs index cafb629b..a416e79a 100644 Binary files a/_module/ncs/nw_s1_pulspois.ncs and b/_module/ncs/nw_s1_pulspois.ncs differ diff --git a/_module/ncs/nw_s1_pulsstrdr.ncs b/_module/ncs/nw_s1_pulsstrdr.ncs index aa85653d..1ae14105 100644 Binary files a/_module/ncs/nw_s1_pulsstrdr.ncs and b/_module/ncs/nw_s1_pulsstrdr.ncs differ diff --git a/_module/ncs/nw_s1_pulswind.ncs b/_module/ncs/nw_s1_pulswind.ncs index 92fccc72..4597f06d 100644 Binary files a/_module/ncs/nw_s1_pulswind.ncs and b/_module/ncs/nw_s1_pulswind.ncs differ diff --git a/_module/ncs/nw_s1_pulswisdr.ncs b/_module/ncs/nw_s1_pulswisdr.ncs index 19253dea..52c263c0 100644 Binary files a/_module/ncs/nw_s1_pulswisdr.ncs and b/_module/ncs/nw_s1_pulswisdr.ncs differ diff --git a/_module/ncs/nw_s1_smokeclaw.ncs b/_module/ncs/nw_s1_smokeclaw.ncs index ebed03b3..f6e3f0f3 100644 Binary files a/_module/ncs/nw_s1_smokeclaw.ncs and b/_module/ncs/nw_s1_smokeclaw.ncs differ diff --git a/_module/ncs/nw_s1_stink_a.ncs b/_module/ncs/nw_s1_stink_a.ncs index bb2bc5b1..1141d7fe 100644 Binary files a/_module/ncs/nw_s1_stink_a.ncs and b/_module/ncs/nw_s1_stink_a.ncs differ diff --git a/_module/ncs/nw_s1_tyrantfga.ncs b/_module/ncs/nw_s1_tyrantfga.ncs index a28a1dfe..af54a6e1 100644 Binary files a/_module/ncs/nw_s1_tyrantfga.ncs and b/_module/ncs/nw_s1_tyrantfga.ncs differ diff --git a/_module/ncs/nw_s2_divprot.ncs b/_module/ncs/nw_s2_divprot.ncs index c2f36e0c..1af20701 100644 Binary files a/_module/ncs/nw_s2_divprot.ncs and b/_module/ncs/nw_s2_divprot.ncs differ diff --git a/_module/ncs/nw_s3_balordeth.ncs b/_module/ncs/nw_s3_balordeth.ncs index 8efd90ae..daf32fa9 100644 Binary files a/_module/ncs/nw_s3_balordeth.ncs and b/_module/ncs/nw_s3_balordeth.ncs differ diff --git a/_module/ncs/prc_pwonspawn.ncs b/_module/ncs/prc_pwonspawn.ncs index e1990508..4905b28a 100644 Binary files a/_module/ncs/prc_pwonspawn.ncs and b/_module/ncs/prc_pwonspawn.ncs differ diff --git a/_module/ncs/pw_sp_troll.ncs b/_module/ncs/pw_sp_troll.ncs index e4b0548e..08d7fe3d 100644 Binary files a/_module/ncs/pw_sp_troll.ncs and b/_module/ncs/pw_sp_troll.ncs differ diff --git a/_module/ncs/queen_sit.ncs b/_module/ncs/queen_sit.ncs index 46ff8d94..b4996bf9 100644 Binary files a/_module/ncs/queen_sit.ncs and b/_module/ncs/queen_sit.ncs differ diff --git a/_module/ncs/random_drop.ncs b/_module/ncs/random_drop.ncs index 14dc6cc5..3d1c2ae9 100644 Binary files a/_module/ncs/random_drop.ncs and b/_module/ncs/random_drop.ncs differ diff --git a/_module/ncs/random_drop2.ncs b/_module/ncs/random_drop2.ncs index 6d69e1a0..918d8661 100644 Binary files a/_module/ncs/random_drop2.ncs and b/_module/ncs/random_drop2.ncs differ diff --git a/_module/ncs/random_drop_yy.ncs b/_module/ncs/random_drop_yy.ncs index bb1fe004..f37628fd 100644 Binary files a/_module/ncs/random_drop_yy.ncs and b/_module/ncs/random_drop_yy.ncs differ diff --git a/_module/ncs/re_common_spawn.ncs b/_module/ncs/re_common_spawn.ncs index bd6e9dbd..d18679ef 100644 Binary files a/_module/ncs/re_common_spawn.ncs and b/_module/ncs/re_common_spawn.ncs differ diff --git a/_module/ncs/re_comspawn_sitb.ncs b/_module/ncs/re_comspawn_sitb.ncs index 5157ab9a..05ab46ff 100644 Binary files a/_module/ncs/re_comspawn_sitb.ncs and b/_module/ncs/re_comspawn_sitb.ncs differ diff --git a/_module/ncs/re_comspawn_sitc.ncs b/_module/ncs/re_comspawn_sitc.ncs index 9180cc8f..2be44c94 100644 Binary files a/_module/ncs/re_comspawn_sitc.ncs and b/_module/ncs/re_comspawn_sitc.ncs differ diff --git a/_module/ncs/re_comspawn_sits.ncs b/_module/ncs/re_comspawn_sits.ncs index ee77cd91..519a1b5d 100644 Binary files a/_module/ncs/re_comspawn_sits.ncs and b/_module/ncs/re_comspawn_sits.ncs differ diff --git a/_module/ncs/re_comspawn_wayp.ncs b/_module/ncs/re_comspawn_wayp.ncs index 39ef1a68..03b941dd 100644 Binary files a/_module/ncs/re_comspawn_wayp.ncs and b/_module/ncs/re_comspawn_wayp.ncs differ diff --git a/_module/ncs/scalesize.ncs b/_module/ncs/scalesize.ncs new file mode 100644 index 00000000..170ebe0f Binary files /dev/null and b/_module/ncs/scalesize.ncs differ diff --git a/_module/ncs/spawndaemon.ncs b/_module/ncs/spawndaemon.ncs index a2696ce9..91c94802 100644 Binary files a/_module/ncs/spawndaemon.ncs and b/_module/ncs/spawndaemon.ncs differ diff --git a/_module/ncs/svirf_ck_race.ncs b/_module/ncs/svirf_ck_race.ncs index a0c91040..e21d26a3 100644 Binary files a/_module/ncs/svirf_ck_race.ncs and b/_module/ncs/svirf_ck_race.ncs differ diff --git a/_module/ncs/svirf_common_ck.ncs b/_module/ncs/svirf_common_ck.ncs index d48546dc..a4ce0a4c 100644 Binary files a/_module/ncs/svirf_common_ck.ncs and b/_module/ncs/svirf_common_ck.ncs differ diff --git a/_module/ncs/svirf_hostile_ck.ncs b/_module/ncs/svirf_hostile_ck.ncs index 3571f1f6..3021b718 100644 Binary files a/_module/ncs/svirf_hostile_ck.ncs and b/_module/ncs/svirf_hostile_ck.ncs differ diff --git a/_module/ncs/tracking.ncs b/_module/ncs/tracking.ncs index 29951543..d5b39d80 100644 Binary files a/_module/ncs/tracking.ncs and b/_module/ncs/tracking.ncs differ diff --git a/_module/ncs/usecreatureweap.ncs b/_module/ncs/usecreatureweap.ncs new file mode 100644 index 00000000..2e2b024f Binary files /dev/null and b/_module/ncs/usecreatureweap.ncs differ diff --git a/_module/ncs/watervfx.ncs b/_module/ncs/watervfx.ncs new file mode 100644 index 00000000..63eb5d1b Binary files /dev/null and b/_module/ncs/watervfx.ncs differ diff --git a/_module/ncs/x0_ch_hen_rest.ncs b/_module/ncs/x0_ch_hen_rest.ncs index 0464b3d8..e8820e39 100644 Binary files a/_module/ncs/x0_ch_hen_rest.ncs and b/_module/ncs/x0_ch_hen_rest.ncs differ diff --git a/_module/nss/combatrndcreatur.nss b/_module/nss/combatrndcreatur.nss new file mode 100644 index 00000000..24fbdfcb --- /dev/null +++ b/_module/nss/combatrndcreatur.nss @@ -0,0 +1,62 @@ +//:://///////////////////////////////////////////// +//:: Default: End of Combat Round +//:: NW_C2_DEFAULT3 +//:: Copyright (c) 2008 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calls the end of combat script every round +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 16, 2001 +//::////////////////////////////////////////////// +//::////////////////////////////////////////////// +//:: Modified By: Deva Winblood +//:: Modified On: Feb 16th, 2008 +//:: Added Support for Mounted Combat Feat Support +//::////////////////////////////////////////////// + +#include "NW_I0_GENERIC" + +void main() +{ + AssignCommand (OBJECT_SELF, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND))); + AssignCommand (OBJECT_SELF, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND))); + ExecuteScript("usecreatureweap", OBJECT_SELF); + ExecuteScript("prc_npc_combat", OBJECT_SELF); + + if (!GetLocalInt(GetModule(),"X3_NO_MOUNTED_COMBAT_FEAT")) + { // set variables on target for mounted combat + DeleteLocalInt(OBJECT_SELF,"bX3_LAST_ATTACK_PHYSICAL"); + DeleteLocalInt(OBJECT_SELF,"nX3_HP_BEFORE"); + DeleteLocalInt(OBJECT_SELF,"bX3_ALREADY_MOUNTED_COMBAT"); + if (GetHasFeat(FEAT_MOUNTED_COMBAT,OBJECT_SELF)) + { // check for AC increase + int nRoll=d20()+GetSkillRank(SKILL_RIDE); + nRoll=nRoll-10; + if (nRoll>4) + { // ac increase + nRoll=nRoll/5; + ApplyEffectToObject(DURATION_TYPE_TEMPORARY,EffectACIncrease(nRoll),OBJECT_SELF,8.5); + } // ac increase + } // check for AC increase + } // set variables on target for mounted combat + + if(GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL)) + { + DetermineSpecialBehavior(); + } + else if(!GetSpawnInCondition(NW_FLAG_SET_WARNINGS)) + { + DetermineCombatRound(); + } + if(GetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT)) + { + SignalEvent(OBJECT_SELF, EventUserDefined(1003)); + } + AssignCommand (OBJECT_SELF, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND))); +} + + + + diff --git a/_module/nss/createheavymace.nss b/_module/nss/createheavymace.nss index c3e41347..45fbc9e6 100644 --- a/_module/nss/createheavymace.nss +++ b/_module/nss/createheavymace.nss @@ -5,7 +5,7 @@ void main() { ActionPauseConversation(); object oPC = GetPCSpeaker(); - TakeGoldFromCreature(1500000, oPC, TRUE); + TakeGoldFromCreature(1000000, oPC, TRUE); object oForge = GetNearestObjectByTag ("WeaponForge", OBJECT_SELF, 1); object oOldWeapon = GetFirstItemInInventory(oForge); string sItemTemplate1 = "aheavymace"; diff --git a/_module/nss/no_ai_atk.nss b/_module/nss/no_ai_atk.nss new file mode 100644 index 00000000..9dad7432 --- /dev/null +++ b/_module/nss/no_ai_atk.nss @@ -0,0 +1,38 @@ +//:://///////////////////////////////////////////// +//:: On Attacked +//:: NW_C2_DEFAULT5 +//::////////////////////////////////////////////// +/* + Set attacker as an enemy if they are not a friend + or enemy (ie/ neutral), and initiate combat AI if + it is not already running. +*/ +//::////////////////////////////////////////////// + +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" + +void main() +{ + object oA = GetLastAttacker(); + + if ( GetIsObjectValid( oA ) ) + { + /* + if ( GetIsFriend( oA ) ) + { + PrintString( GetName( OBJECT_SELF ) + " attacked by friend " + GetName( oA ) ); + } + */ + if ( !GetIsFriend( oA ) && !GetIsEnemy( oA ) && GetMaster( OBJECT_SELF ) != oA ) + { + //neutrals + SetIsTemporaryEnemy( oA, OBJECT_SELF, TRUE, 300.0 ); + } + //DoQueueCombat( 8.0, 8.0 ); + InitCombat(); + SignalEvent(OBJECT_SELF, EventUserDefined(1005)); + } +} diff --git a/_module/nss/no_ai_blk.nss b/_module/nss/no_ai_blk.nss new file mode 100644 index 00000000..01b9814d --- /dev/null +++ b/_module/nss/no_ai_blk.nss @@ -0,0 +1,36 @@ +//:://///////////////////////////////////////////// +//:: Default On Heartbeat +//:: NW_C2_DEFAULTE +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This will cause blocked creatures to open + or smash down doors depending on int and + str. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Nov 23, 2001 +//::////////////////////////////////////////////// + +/* +NOTE: Unmodified except for this comment. Makes this +script show up as a script for this module for completeness. +*/ + +void main() +{ + object oDoor = GetBlockingDoor(); + + if(GetAbilityScore(OBJECT_SELF, ABILITY_INTELLIGENCE) >= 5) + { + if(GetIsDoorActionPossible(oDoor, DOOR_ACTION_OPEN) && GetAbilityScore(OBJECT_SELF, ABILITY_INTELLIGENCE) >= 7 ) + { + DoDoorAction(oDoor, DOOR_ACTION_OPEN); + } + else if(GetIsDoorActionPossible(oDoor, DOOR_ACTION_BASH)) + { + DoDoorAction(oDoor, DOOR_ACTION_BASH); + } + } +} diff --git a/_module/nss/no_ai_cmb.nss b/_module/nss/no_ai_cmb.nss new file mode 100644 index 00000000..8b83f2e3 --- /dev/null +++ b/_module/nss/no_ai_cmb.nss @@ -0,0 +1,20 @@ +//:://///////////////////////////////////////////// +//:: End of Combat Round +//:: +//::////////////////////////////////////////////// +/* + Calls the end of combat script every round +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" + +void main() +{ + //SetReadyStatus(); + //DoCombat(); + InitCombat(); + //signal combat to userdef + SignalEvent( OBJECT_SELF, EventUserDefined( 1003 ) ); +} diff --git a/_module/nss/no_ai_cnv.nss b/_module/nss/no_ai_cnv.nss new file mode 100644 index 00000000..82219f6f --- /dev/null +++ b/_module/nss/no_ai_cnv.nss @@ -0,0 +1,162 @@ +//:://///////////////////////////////////////////// +//:: On Conversation +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + by the generic script after dialogue or a + shout is initiated. +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" + +void main() +{ + object oT = OBJECT_INVALID; + object oM = GetMaster( OBJECT_SELF ); + object oBroadcaster = GetLastSpeaker(); + int iBroadcast = GetListenPatternNumber(); + int iR = 0; + + if ( iBroadcast == -1 ) + { + ClearAllActions(); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + //ActionStartConversation( oBroadcaster ); + BeginConversation(); + //DoQueueShutdown( 6.0 ); + } + else + { + if ( GetIsObjectValid( oM ) && oBroadcaster == oM ) + { + if ( iBroadcast == ASSOCIATE_COMMAND_STANDGROUND ) + { + //stand ground + SetLocalLocation( OBJECT_SELF, "#SGLOC", GetLocation( OBJECT_SELF ) ); + SetLocalInt( OBJECT_SELF, "#STANDGROUND", 1 ); + ClearAllActions(); + PlayVoiceChat( VOICE_CHAT_TASKCOMPLETE ); + ActionMoveToLocation( GetLocation( OBJECT_SELF ) ); //stop here + } + else if ( iBroadcast == ASSOCIATE_COMMAND_ATTACKNEAREST ) + { + //attack nearest + DeleteLocalInt( OBJECT_SELF, "#STANDGROUND" ); + oT = GetTarget(); + if ( GetIsObjectValid( oT ) ) + { + PlayVoiceChat( VOICE_CHAT_GOODIDEA ); + //DoQueueCombat( 8.0, 8.0 ); + InitCombat(); + SignalEvent( OBJECT_SELF, EventUserDefined( 1003 ) ); + } + else + { + PlayVoiceChat( VOICE_CHAT_CANTDO ); + } + } + else if ( iBroadcast == ASSOCIATE_COMMAND_HEALMASTER ) + { + //heal master + DeleteLocalInt( OBJECT_SELF, "#STANDGROUND" ); + if ( DoSpellHeal( oM ) ) + { + PlayVoiceChat( VOICE_CHAT_CANDO ); + } + else + { + PlayVoiceChat( VOICE_CHAT_CANTDO ); + } + } + else if ( iBroadcast == ASSOCIATE_COMMAND_FOLLOWMASTER ) + { + //follow master + DeleteLocalLocation( OBJECT_SELF, "#STANDGROUND" ); + ClearAllActions(); + ActionForceFollowObject( oM, 3.0 ); + } + else if ( iBroadcast == ASSOCIATE_COMMAND_GUARDMASTER ) + { + //guard master + DeleteLocalInt( OBJECT_SELF, "#STANDGROUND" ); + if ( !GetIsObjectValid( oT = GetLastHostileActor( oM ) ) ) + { + if ( !GetIsObjectValid( oT = GetLastAttacker( oM ) ) ) + { + PlayVoiceChat( VOICE_CHAT_CANTDO ); + } + } + //list of actions to try against oT + if ( GetIsObjectValid( oT ) && ( GetObjectSeen( oT ) || GetObjectHeard( oT ) ) ) + { + if ( !( iR = DoSpellDirect( oT ) ) ) + { + if ( !( iR = DoTouch( oT ) ) ) + { + if ( !( iR = DoAttackRanged( oT ) ) ) + { + if ( !( iR = DoAttackMelee( oT ) ) ) + { + PlayVoiceChat( VOICE_CHAT_CANTDO ); + } + } + } + } + if ( iR ) + { + PlayVoiceChat( VOICE_CHAT_CANDO ); + } + } + } + } + if ( iBroadcast == 699 ) //COMBAT going on nearby + { + //respond + if ( GetArea( oBroadcaster ) == GetArea( OBJECT_SELF ) && GetDistanceBetween( oBroadcaster, OBJECT_SELF ) <= GetResponseRange( BC_FIGHTING ) ) + { + object oE = GetTarget(); + if ( !GetIsObjectValid( oE ) ) + { + //I've heard combat but I can't see the combat or any enemies + //PrintString( "CHM: " + GetName( OBJECT_SELF ) + " moving to support " + GetName( oBroadcaster ) ); + DoMoveToObject( oBroadcaster, TRUE, 5.0 ); + DoFightBroadcast(); + } + else + { + //DoQueueCombat( 8.0, 8.0 ); + InitCombat(); + } + } + else + { + //hearing something from another area or from out of our response range + //SpeakString( "Ignoring combat sounds" ); + } + } + else if ( iBroadcast == 691 ) //DEAD + { + //if ( GetIsFriend( oBroadcaster ) ) + if ( GetFactionEqual( oBroadcaster ) ) + { + DoVoiceChat( VOICE_CHAT_CUSS ); + } + else if ( GetIsEnemy( oBroadcaster ) ) + { + if ( Random( 2 ) ) + { + DoVoiceChat( VOICE_CHAT_CHEER ); + } + else + { + DoVoiceChat( VOICE_CHAT_LAUGH ); + } + } + } + } + //signal conversation to userdef + SignalEvent( OBJECT_SELF, EventUserDefined( 1004 ) ); +} \ No newline at end of file diff --git a/_module/nss/no_ai_dam.nss b/_module/nss/no_ai_dam.nss new file mode 100644 index 00000000..ae405275 --- /dev/null +++ b/_module/nss/no_ai_dam.nss @@ -0,0 +1,54 @@ +//:://///////////////////////////////////////////// +//:: On Damaged +//:: +//::////////////////////////////////////////////// +/* + Set damager as an enemy if they are not a friend + or enemy (ie/ neutral), and initiate combat AI if + it is not already running. +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" + +void main() +{ + float fHP; + object oDam = GetLastDamager(); + object oT = OBJECT_INVALID; + + //if timestamp has elapsed and there is a friendly nearby + if ( !GetLocalInt( OBJECT_SELF, "#HEALDEL" ) && + GetIsObjectValid( GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, 1, CREATURE_TYPE_IS_ALIVE, TRUE ) ) ) + { + fHP = IntToFloat( GetCurrentHitPoints( OBJECT_SELF ) ) / GetMaxHitPoints( OBJECT_SELF ); + //only start calling for healing once we've taken 50% + if ( fHP < 0.51 ) + { + //broadcast request for healing for display purposes + DoVoiceChat( VOICE_CHAT_HEALME ); + //do not broadcast again until next combat round event when this int is cleared + SetLocalInt( OBJECT_SELF, "#HEALDEL", 1 ); + DelayCommand( 3.0, DeleteLocalInt( OBJECT_SELF, "#HEALDEL" ) ); + } + } + if ( GetIsObjectValid( oDam ) ) + { + /* + if ( GetIsFriend( oDam ) ) + { + PrintString( GetName( OBJECT_SELF ) + " damaged by friend " + GetName( oDam ) ); + } + */ + if ( !GetIsFriend( oDam ) && !GetIsEnemy( oDam ) && GetMaster( OBJECT_SELF ) != oDam ) + { + //neutrals + SetIsTemporaryEnemy( oDam, OBJECT_SELF, TRUE, 300.0 ); + } + //DoQueueCombat( 8.0, 8.0 ); + InitCombat(); + //signal damage to userdef + SignalEvent( OBJECT_SELF, EventUserDefined( 1006 ) ); + } +} \ No newline at end of file diff --git a/_module/nss/no_ai_dis.nss b/_module/nss/no_ai_dis.nss new file mode 100644 index 00000000..7b44f46c --- /dev/null +++ b/_module/nss/no_ai_dis.nss @@ -0,0 +1,38 @@ +//:://///////////////////////////////////////////// +//:: Default: On Disturbed +//:: NW_C2_DEFAULT8 +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calls the end of combat script every round +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 16, 2001 +//:://///////////////////////////////////////// + +// * Make me hostile the faction of my last attacker (TEMP) +// AdjustReputation(OBJECT_SELF,GetFaction(GetLastAttacker()),-100); +// * Determined Combat Round + +/* +NOTE: Blocked to stop interference. +Update coming in next version. +*/ + +//#include "NW_I0_GENERIC" +#include "no_lib_data" +#include "no_inc" + +void main() +{ + object oT = GetLastDisturbed(); + + if ( GetIsObjectValid( oT ) ) + { + SetIsTemporaryEnemy( oT, OBJECT_SELF, TRUE, 300.0 ); + //DoQueueCombat( 8.0, 8.0 ); + InitCombat(); + SignalEvent(OBJECT_SELF, EventUserDefined(1008)); + } +} diff --git a/_module/nss/no_ai_dth.nss b/_module/nss/no_ai_dth.nss new file mode 100644 index 00000000..6243f0f8 --- /dev/null +++ b/_module/nss/no_ai_dth.nss @@ -0,0 +1,32 @@ +//:://///////////////////////////////////////////// +//:: On Death +//:: +//::////////////////////////////////////////////// +/* + Shouts to allies that they have been killed +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" + +void main() +{ + //float fDieDelay = GetLocalFloat( OBJECT_SELF, "#DECAYDELAY" ); + //corpse decay deactivated for Murray module + float fDieDelay = 10.0; + + ClearAllActions(); + //broadcast death + SpeakString( "BC_DEAD", TALKVOLUME_SILENT_TALK ); + //PrintString( GetName( OBJECT_SELF ) + " killed by " + GetName( GetLastKiller() ) ); + if ( GetName( GetItemInSlot( INVENTORY_SLOT_CARMOUR, OBJECT_SELF ) ) == "Balor Properties" ) + { + ExecuteScript( "nw_s3_balordeth", OBJECT_SELF ); + } + DelayCommand( fDieDelay, ExecuteScript( "no_scr_cleanvars", OBJECT_SELF ) ); + DelayCommand( fDieDelay + 0.5, ExecuteScript( "no_scr_excorpse", OBJECT_SELF ) ); + //signal death to userdef + SignalEvent( OBJECT_SELF, EventUserDefined( 1007 ) ); +} + diff --git a/_module/nss/no_ai_hrt.nss b/_module/nss/no_ai_hrt.nss new file mode 100644 index 00000000..53b06cbd --- /dev/null +++ b/_module/nss/no_ai_hrt.nss @@ -0,0 +1,121 @@ +//:://///////////////////////////////////////////// +//:: On Heartbeat +//:: +//::////////////////////////////////////////////// +/* + This script will have people perform default + animations. +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" + +void main() +{ + //if the AI level is very low and the combat AI is not active do nothing + //need this change so that combat AI can shut itself down properly before ignoring heartbeats + if ( GetAILevel() == AI_LEVEL_VERY_LOW && !IsActive() ) + { + return; + } + + if ( IsActive() ) + { + //if combat AI is active this is the only segment of the heartbeat that will run + int iE = GetHostileCount( 50.0 ); + if ( iE == 0 ) + { + object oA = GetFurthestActiveAlly( 50.0 ); + if ( GetIsObjectValid( oA ) && GetDistanceBetween( OBJECT_SELF, oA ) > 20.0 && !GetIsPerceived( oA ) ) + { + DoMoveToObject( oA, TRUE ); + } + else + { + ExecuteScript( "no_scr_shutdown", OBJECT_SELF ); + } + } + } + else + { + //combat AI isn't active + if( GetSpawnInCondition( NW_FLAG_DAY_NIGHT_POSTING ) ) + { + int nDay = FALSE; + if( GetIsDay() || GetIsDawn() ) + { + nDay = TRUE; + } + if( GetLocalInt( OBJECT_SELF, "NW_GENERIC_DAY_NIGHT" ) != nDay ) + { + if( nDay == TRUE ) + { + SetLocalInt( OBJECT_SELF, "NW_GENERIC_DAY_NIGHT", TRUE ); + } + else + { + SetLocalInt( OBJECT_SELF, "NW_GENERIC_DAY_NIGHT", FALSE ); + } + WalkWayPoints(); + } + } + + if( CanAct() ) + { + object oE = GetTarget(); + if( !GetIsPostOrWalking() ) + { + if( !GetIsObjectValid( GetAttemptedAttackTarget() ) && !GetIsObjectValid( GetAttemptedSpellTarget() ) ) + { + //if( !GetIsObjectValid( GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN) ) ) + if ( !GetIsObjectValid( oE ) ) + { + if( /*!GetBehaviorState( NW_FLAG_BEHAVIOR_SPECIAL ) &&*/ !IsInConversation( OBJECT_SELF ) ) + { + if( GetSpawnInCondition( NW_FLAG_AMBIENT_ANIMATIONS ) || GetSpawnInCondition( NW_FLAG_AMBIENT_ANIMATIONS_AVIAN ) ) + { + PlayMobileAmbientAnimations(); + } + else if( GetIsEncounterCreature() ) + //won't be here unless this next condition is true so it is redundant to check it + //!GetIsObjectValid( GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ) ) ) + { + PlayMobileAmbientAnimations(); + } + else if( GetSpawnInCondition( NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS ) ) + //won't be in here unless this next condition is true so it is redundant to check it + //!GetIsObjectValid( GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ) ) ) + { + PlayImmobileAmbientAnimations(); + } + } + else + { + DetermineSpecialBehavior(); + } + } + else + { + //DetermineCombatRound() + InitCombat(); + } + } + } + } + else + { + if( GetSpawnInCondition( NW_FLAG_SLEEPING_AT_NIGHT ) ) + { + effect eVis = EffectVisualEffect( VFX_IMP_SLEEP ); + if( d10() > 6 ) + { + ApplyEffectToObject( DURATION_TYPE_INSTANT, eVis, OBJECT_SELF ); + } + } + } + } + + //Signal heart beat event to userdef + SignalEvent( OBJECT_SELF, EventUserDefined( 1001 ) ); +} diff --git a/_module/nss/no_ai_per.nss b/_module/nss/no_ai_per.nss new file mode 100644 index 00000000..eaf188fe --- /dev/null +++ b/_module/nss/no_ai_per.nss @@ -0,0 +1,98 @@ +//:://///////////////////////////////////////////// +//:: On Percieve +//:: +//::////////////////////////////////////////////// +/* + Checks to see if the perceived target is an + enemy and if so fires the Determine Combat + Round function +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" + +void main() +{ + object oPer = GetLastPerceived(); + + if ( !GetIsObjectValid( oPer ) ) + { + //invalid object, do nothing + return; + } + + //for associates + if ( !GetLocalInt( OBJECT_SELF, "#ACTIVE" ) && GetIsMaster( oPer ) ) + { + ActionForceFollowObject( oPer, GetFollowDist() ); + } + + //main + if ( GetLastPerceptionSeen() && GetIsPerceived( oPer, NO_PERCEPTION_SEEN ) ) + { + if ( GetIsEnemy( oPer ) && !GetIsDead( oPer ) ) + { + //trigger combat + //PrintString( "ENEMY: " + GetName( OBJECT_SELF ) + " -> " + GetName( oPer ) ); + DoVoiceChat( VOICE_CHAT_ENEMIES ); + if ( GetIsFastBuffer() == TRUE && GetIsFastBuffed() == FALSE ) + { + //only to this once per start up + ClearAllActions(); + if ( DoFastBuffs() ) + { + //PrintString( "FASTBUFF: " + GetName( OBJECT_SELF ) ); + } + SetIsFastBuffed( TRUE ); + } + //DoQueueCombat( 8.0, 8.0 ); + DelayCommand( 0.5, InitCombat() ); + } + else if ( !GetLocalInt( OBJECT_SELF, "#ACTIVE" ) ) + { + if ( GetIsFriend( oPer ) && GetIsDead( oPer ) && GetHasRaisingAbility() ) + { + ClearAllActions(); + if ( DoSpellRaise( oPer ) ) + { + SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + DoQueueShutdown( 12.0 ); + } + } + } + } + else if ( GetLastPerceptionHeard() && GetIsPerceived( oPer, NO_PERCEPTION_HEARD ) ) + { + if ( !GetIsObjectValid( GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ) ) ) + { + if ( GetIsEnemy( oPer ) && GetObjectType( oPer ) == OBJECT_TYPE_CREATURE && !GetIsDead( oPer ) ) + { + //check perceptions + if ( !GetIsPerceived( oPer, NO_PERCEPTION_SEEN ) ) + { + //heard something that is not visible, no visible enemies, respond + //SetLocalInt( OBJECT_SELF, "#VANISHED", 1 ); + //DoQueueCombat( 8.0, 8.0 ); + DelayCommand( 0.5, InitCombat() ); + } + } + } + } + else if ( GetLastPerceptionVanished() && GetIsPerceived( oPer, NO_PERCEPTION_VANISHED ) ) + { + //make sure it isn't a corpse that just faded out + //report vanished enemies who have not just died + if ( GetIsEnemy( oPer ) ) + { + if( !GetIsDead( oPer ) ) + { + DoVoiceChat( VOICE_CHAT_CUSS ); + SetLocalInt( OBJECT_SELF, "#VANISHED", 1 ); + } + } + } + //signal perception to userdef + SignalEvent( OBJECT_SELF, EventUserDefined( 1002 ) ); +} + diff --git a/_module/nss/no_ai_rst.nss b/_module/nss/no_ai_rst.nss new file mode 100644 index 00000000..e474f9f5 --- /dev/null +++ b/_module/nss/no_ai_rst.nss @@ -0,0 +1,26 @@ +//:://///////////////////////////////////////////// +//:: Default: On Rested +//:: NW_C2_DEFAULTA +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just rested. +*/ +//::////////////////////////////////////////////// +//:: Created By: Don Moar +//:: Created On: April 28, 2002 +//::////////////////////////////////////////////// + +/* +NOTE: Unmodified except for this comment. Makes this +script show up as a script for this module for completeness. +*/ + +void main() +{ + // enter desired behaviour here + + return; + +} diff --git a/_module/nss/no_ai_spt.nss b/_module/nss/no_ai_spt.nss new file mode 100644 index 00000000..e20847f6 --- /dev/null +++ b/_module/nss/no_ai_spt.nss @@ -0,0 +1,70 @@ +//:://///////////////////////////////////////////// +//:: On Spell Cast At +//:: +//::////////////////////////////////////////////// +/* + This determines if the spell just cast at the + target is harmful or not. +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" + +void main() +{ + int iS = GetLastSpell(); + int iH = GetLastSpellHarmful(); + object oC = GetLastSpellCaster(); + + if ( !iH ) + { + if ( iS == SPELL_RAISE_DEAD || iS == SPELL_RESURRECTION ) + { + SetCommandable( TRUE, OBJECT_SELF ); + DeleteLocalObject( OBJECT_SELF, "#RAISER" ); + } + else if ( iS == SPELL_HEAL || iS == SPELL_CURE_CRITICAL_WOUNDS || + iS == SPELL_CURE_SERIOUS_WOUNDS || iS == SPELL_CURE_MODERATE_WOUNDS || + iS == SPELL_CURE_LIGHT_WOUNDS || iS == SPELL_CURE_MINOR_WOUNDS ) + { + if ( oC != OBJECT_SELF && GetIsFriend( oC ) ) + { + DoVoiceChat( VOICE_CHAT_THANKS ); + } + DeleteLocalObject( OBJECT_SELF, "#HEALER" ); + } + else if ( iS == SPELL_DARKVISION ) + { + DeleteLocalInt( OBJECT_SELF, "#DARKNESS" ); + DeleteLocalObject( OBJECT_SELF, "#VISION" ); + } + else if ( iS == SPELL_SEE_INVISIBILITY ) + { + DeleteLocalInt( OBJECT_SELF, "#VANISHED" ); + DeleteLocalObject( OBJECT_SELF, "#VISION" ); + } + else if ( iS == SPELL_TRUE_SEEING ) + { + DeleteLocalInt( OBJECT_SELF, "#DARKNESS" ); + DeleteLocalInt( OBJECT_SELF, "#VANISHED" ); + DeleteLocalObject( OBJECT_SELF, "#VISION" ); + } + } + if ( iS == SPELL_DARKNESS ) + { + SetLocalInt( OBJECT_SELF, "#DARKNESS", 1 ); + } + if ( iH ) + { + if ( !GetIsFriend( oC ) && !GetIsEnemy( oC ) && GetMaster( OBJECT_SELF ) != oC ) + { + //neutrals + SetIsTemporaryEnemy( oC, OBJECT_SELF, TRUE, 300.0 ); + } + //DoQueueCombat( 8.0, 8.0 ); + InitCombat(); + } + //signal spell at to userdef + SignalEvent( OBJECT_SELF, EventUserDefined( 1011 ) ); +} diff --git a/_module/nss/no_inc.nss b/_module/nss/no_inc.nss new file mode 100644 index 00000000..ca312315 --- /dev/null +++ b/_module/nss/no_inc.nss @@ -0,0 +1,10 @@ +//#include "no_lib_data" +#include "no_inc_ptypes" +#include "no_lib_bio" +#include "no_lib_priority" +#include "no_lib_magic" +#include "no_lib_analysis" +#include "no_lib_feat" +#include "no_lib_melee" +#include "no_lib_ranged" +#include "no_lib_actions" diff --git a/_module/nss/no_inc_ptypes.nss b/_module/nss/no_inc_ptypes.nss new file mode 100644 index 00000000..11b73149 --- /dev/null +++ b/_module/nss/no_inc_ptypes.nss @@ -0,0 +1,406 @@ +//constants + +//can broadcasting use DM channel +const int NO_CAN_USE_DM_CHANNEL = 1; + +//broadcast constants +const int BC_FIGHTING = 699; + +//effect weights +const int NO_EFFECT_GENERIC = 1; +const int NO_EFFECT_DISEASE = 2; +const int NO_EFFECT_CURSE = 4; +const int NO_EFFECT_POISON = 8; +const int NO_EFFECT_DEAF = 16; +const int NO_EFFECT_BLINDNESS = 32; +const int NO_EFFECT_SILENCE = 64; +const int NO_EFFECT_NEGATIVELEVEL = 128; +const int NO_EFFECT_DAZED = 256; +const int NO_EFFECT_FRIGHTENED = 512; +const int NO_EFFECT_CONFUSED = 1024; +const int NO_EFFECT_CHARMED = 2048; +const int NO_EFFECT_SLEEP = 4096; +const int NO_EFFECT_STUNNED = 8192; +const int NO_EFFECT_DOMINATED = 16384; +const int NO_EFFECT_PETRIFY = 32768; +const int NO_EFFECT_PARALYZE = 65536; + +//spell level cut offs +const int NO_LVL8_MIN_LVL = 24; +const int NO_LVL7_MIN_LVL = 21; +const int NO_LVL6_MIN_LVL = 18; +const int NO_LVL5_MIN_LVL = 15; +const int NO_LVL4_MIN_LVL = 12; +const int NO_LVL3_MIN_LVL = 9; +const int NO_LVL2_MIN_LVL = 6; +const int NO_LVL1_MIN_LVL = 3; + +//associate orders +const int NO_ORDER_ATTACK = 1; +const int NO_ORDER_FOLLOW = 2; +const int NO_ORDER_GUARD = 4; +const int NO_ORDER_HEAL = 8; +const int NO_ORDER_STANDGROUND = 16; + +//voice chat defines +const int NO_VC_DEFAULT = 1000; +const int NO_VC_MELEE = 1001; +const int NO_VC_RANGED = 1003; +const int NO_VC_MELEEASSIST = 1004; + +//perception types +const int NO_PERCEPTION_SEEN = 1; +const int NO_PERCEPTION_HEARD = 2; +const int NO_PERCEPTION_VANISHED = 4; + +//special attack minimum hit dice ratios +const float NO_THRESH_SMITE = 0.75; +const float NO_THRESH_STUNNING_FIST = 0.5; +const float NO_THRESH_QUIVERING_PALM = 0.75; +const float NO_THRESH_ARROW_SLAYING = 0.75; +const float NO_THRESH_KI_DAMAGE = 0.5; + +//illithid abilities +const int CODI_MIND_BLAST = 1522; +const int CODI_BRAIN_EXTRACT = 1523; + +//beholder constants +const int BEHOLDER_MAX_RAYS = 10; +const int SPELL_BEHRAY_FINGER_OF_DEATH = 776; +const int SPELL_BEHRAY_TELEKINESIS = 777; +const int SPELL_BEHRAY_FLESH_TO_STONE = 778; +const int SPELL_BEHRAY_CHARM = 779; +const int SPELL_BEHRAY_SLOW = 780; +const int SPELL_BEHRAY_INFLICT_WOUNDS = 783; +const int SPELL_BEHRAY_FEAR = 784; +const int SPELL_BEH_ANTIMAGIC_CONE = 727; + +//missing epic spell definition +const int SPELL_EPIC_WARDING = 695; + +//miscellaneous missing constants +const int SPELLABILITY_DRAGON_BREATH_RDD = 690; +const int SPELLABILITY_DRAGON_BREATH_PRISMATIC = 771; +const int SPELLABILITY_DEFLECTING_FORCE = 774; + +//string constants +const string s_BEHOLDER_CENTRAL_EYE_FLAG = "#BEHCENEYE"; + +//Master prototype list + +// NO_LIB_ACTIONS +// support functions +void NO_ActionCastSpellAtLocation( int iSpell, location lTargetLocation, int iMetaMagic=METAMAGIC_ANY, int iCheat=FALSE, int iProjectilePathType=PROJECTILE_PATH_TYPE_DEFAULT, int iInstantSpell=FALSE, int iDefensive=TRUE ); +void NO_ActionCastSpellAtObject( int iSpell, object oTarget, int iMetaMagic=METAMAGIC_ANY, int iCheat=FALSE, int iDomainLevel=0, int iProjectilePathType=PROJECTILE_PATH_TYPE_DEFAULT, int iInstantSpell=FALSE, int iDefensive=TRUE ); +void NO_ActionUseTalentAtLocation( talent tChosenTalent, location lTargetLocation, int iDefensive=TRUE ); +void NO_ActionUseTalentOnObject( talent tChosenTalent, object oTarget, int iDefensive=TRUE ); +void ActivateCombatMode( int iMode=0, object oE=OBJECT_SELF ); +void DeactivateCombatModes( int iException=0, object oE=OBJECT_SELF ); +int DoHideInPlainSight( object oE=OBJECT_SELF ); +void DoFireBeholderRay( int iS, object oT ); +void DoMoveToLocation( location lDest, int bRun=FALSE ); +void DoMoveToObject( object oDest, int bRun=FALSE, float fDist=1.0f ); +void DoTeleport( location lLoc ); +object GetTarget(); +float DotProduct( vector v1, vector v2 ); +location GetFlankLoc( object oT, location lL ); +void DoEquipMelee( object oT ); +talent GetTalentSpell( int iCat, int iD ); +void DoFightBroadcast(); +int GetTimeSinceLastCombat(); +void DoConditionalRestart( float fT=6.0 ); +void DoQueueShutdown( float fT=0.0 ); +void DoQueueCombat( float fD=6.0, float fT=6.0 ); +void InitCombat( object oE=OBJECT_INVALID ); +void DoVoiceChat( int iV=-1 ); +void DoMainCombatLoop(); +void DoCombat(); +// action functions +int DoAttackMelee( object oT=OBJECT_INVALID ); +int DoAttackRanged( object oT=OBJECT_INVALID ); +int DoCounterSpell( object oT=OBJECT_INVALID ); +int DoEvacAOE(); +int DoRegroup( object oT=OBJECT_INVALID ); +int DoDefendSelf(); +int DoDefendSingle( object oT=OBJECT_INVALID ); +int DoEnhanceSelf(); +int DoEnhanceSingle( object oT=OBJECT_INVALID ); +int DoSpellHelp( object oT=OBJECT_INVALID ); +int DoSpellHeal( object oT=OBJECT_INVALID ); +int DoSpellRaise( object oT=OBJECT_INVALID ); +int DoSpellBreach( object oT=OBJECT_INVALID ); +int DoSpellDirect( object oT=OBJECT_INVALID ); +int DoTouch( object oT=OBJECT_INVALID ); +int DoSpellArea(); +int DoSpellSummon(); +int DoSpellCharm(); +int DoFeatEnhance(); +int DoAvoidMelee(); +int DoTimeStop(); +int DoVision(); +int DoBreathWeapon(); +int DoTurning(); +int DoSpellCone(); +int DoHealSelf(); +int DoSpellGroupEnhance(); +int DoSpellGroupHeal(); +int DoDispelPersAOE(); +int DoDispelSingle(); +int DoDismissal(); +int DoFastBuffs(); +int DoMeleeAssist(); +int DoFlank( object oE=OBJECT_INVALID ); +int DoMindBlast(); +int DoBrainExtraction(); +int DoAvoidEnemies(); +int DoGrenade(); +int DoBeholderRays(); +int DoBeholderCentralEye(); + +// NO_LIB_ANALYSIS +int GetAOEThreat( object oArea, object oEnt=OBJECT_SELF ); +int GetAOECount( float fRad=10.0f, object oEnt=OBJECT_SELF ); +vector GetAOEVector( float fRad=10.0f, object oEnt=OBJECT_SELF ); +int GetHostileAOECount( float fRad=10.0f, object oEnt=OBJECT_SELF ); +vector GetHostileAOEVector( float fRad=10.0f, object oEnt=OBJECT_SELF ); +vector GetAOEEvacVector( vector vS, object oEnt=OBJECT_SELF ); +object GetMostDamagedAlly( float fRad=15.0f, object oEnt=OBJECT_SELF, int iSee=FALSE ); +object GetLowestHPAlly( float fRad=15.0, int iLim=0, object oEnt=OBJECT_SELF, int iSee=FALSE ); +object GetLowestHPAllyNoHealer( float fRad=15.0, int iLim=0, object oEnt=OBJECT_SELF, int iSee=FALSE, int iLive=TRUE ); +object GetNearestDeadAlly( float fRad=15.0f, object oEnt=OBJECT_SELF, int iSee=FALSE ); +object GetNearestDeadAllyNoRaiser( float fRad=15.0f, object oEnt=OBJECT_SELF, int iSee=FALSE ); +object GetNearestPetrifiedAllyNoHelper( float fRad=15.0f, object oEnt=OBJECT_SELF, int iSee=FALSE ); +int GetEffectsOnObject( object oEnt=OBJECT_SELF ); +object GetMostHamperedAlly( float fRad=15.0f, object oEnt=OBJECT_SELF, int iSee=FALSE ); +vector GetAreaTarget( int iS, float fRad, float fMinRad=7.5, float fMaxRad=30.0, int iEffChk=TRUE, object oCaster=OBJECT_SELF ); +vector GetFriendlyAreaTarget( float fRad, int iSpell=0, int iType=0, object oCaster=OBJECT_SELF ); +int CanAct( object oSelf=OBJECT_SELF ); +int GetIsWeapon( object oWeapon ); +int GetIsLightWeapon( object oWeapon, int iCanBeInvalid=FALSE ); +int GetIsDoubleWeapon( object oWeapon ); +int GetCasterCount( float fRad=5.0, object oEnt=OBJECT_SELF ); +int GetAttackerCount( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ); +int GetHostileCount( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ); +int GetOmniscientHostileCount( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ); +int GetAllyCount( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ); +int GetAttackerHD( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ); +int GetHostileHD( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ); +int GetAllyHD( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ); +vector GetHostileVector( float fRad=10.0f, object oEnt=OBJECT_SELF ); +vector GetHostileEvacVector( vector vS, object oEnt=OBJECT_SELF ); +int GetIsCaster( object oEnt=OBJECT_SELF ); +int DoAbilityCheck( int iAbil, int iDC, object oEnt=OBJECT_SELF ); +int DoCombatKnowledgeCheck( int iBAB=FALSE, int iDC=10, object oE=OBJECT_SELF ); +float GetFriendFoeRatio( location lLoc, float fRad, object oEnt=OBJECT_SELF ); +float GetFriendFoeTolerance( object oEnt=OBJECT_SELF ); +object GetNearestEnemyCaster( int iMaxLvl=20, int iMinLvl=1, object oEnt=OBJECT_SELF ); +int GetAverageEnemyLevel( float fRad=60.0, object oEnt=OBJECT_SELF ); +int GetSafeAverageEnemyLevel( float fRad=40.0, object oEnt=OBJECT_SELF ); +object GetLeastMagicDefendedEnemy( float fRad=5.0, object oEnt=OBJECT_SELF ); +vector GetTurningVector( object oEnt=OBJECT_SELF ); +int GetIsValidTurnTarget( object oT, int iL=0, object oEnt=OBJECT_SELF ); +int GetPotionHealAmount( object oP ); +int GetTalentPotionHealAmount( talent tP ); +vector GetAreaHealTarget( float fRad=0.0, int iH=0, object oEnt=OBJECT_SELF ); +float GetAllyDamageStats( location lT, float fRad=0.0, object oEnt=OBJECT_SELF ); +object GetMostBuffedEnemy( float fRad=10.0, object oEnt=OBJECT_SELF ); +object GetLeastBuffedAlly( float fRad=10.0, int iMelee=FALSE, object oEnt=OBJECT_SELF ); +int GetIsBuffEffect( effect eT ); +int GetAverageEffectCasterLevel( object oT=OBJECT_SELF ); +object GetStrongestEnemySummonedAssociateOwner( float fRad=10.0, object oEnt=OBJECT_SELF ); +vector GetEnemySummonedAssociatesVector( float fRad=10.0, object oEnt=OBJECT_SELF ); +vector GetEnemyPlanarVector( float fRad=10.0, object oEnt=OBJECT_SELF ); +object GetVisionDeprived( float fRad=10.0, object oT=OBJECT_SELF ); +object GetLeastDefendedAlly( float fRad=10.0, object oC=OBJECT_SELF ); +int GetHasRangedCapability( object oEnt=OBJECT_SELF ); +int GetIsRangedWeapon( object oW=OBJECT_INVALID ); +object GetMostDistantEnemy( float fR=30.0, int iS=TRUE, object oC=OBJECT_SELF ); +vector GetSaves( object oT=OBJECT_SELF ); +vector GetBaseSavesByClass( int iC, int iL ); +vector GetAverageEnemySaveInArea( vector vP, float fR=5.0, object oC=OBJECT_SELF ); +int IsImmuneToPetrification(object oCreature); +object GetNearestAddledEnemy( float fRange=10.0, object oE=OBJECT_SELF ); +object GetNearestAddledEnemyNoExtractor( float fRange=10.0, object oE=OBJECT_SELF ); +int IsBrainExtractable( object oT ); +int GetCreatureAttackBonus( object oC=OBJECT_SELF ); +int GetGrappleBonus( object oC=OBJECT_SELF ); +int GetIsMaster( object oM, object oE=OBJECT_SELF ); +int GetIsPerceived( object oP, int iP=0, object oE=OBJECT_SELF ); +object GetNearestPerceivedCreature( int iP=NO_PERCEPTION_SEEN, object oE=OBJECT_SELF ); +object GetNearestActiveAlly( object oE=OBJECT_SELF ); +object GetFurthestActiveAlly( float fD=50.0, object oE=OBJECT_SELF ); +int EstimateAttackBonus( object oC=OBJECT_SELF ); +int GetDualWieldingPenalty( object oC=OBJECT_SELF, object oR=OBJECT_INVALID, object oL=OBJECT_INVALID ); +int GetHasWeaponFocus( object oR, object oC=OBJECT_SELF ); +int GetIsArmed( object oEnt=OBJECT_SELF ); +int GetRelativeEnemyWeaponSize( object oT, object oEnt=OBJECT_SELF ); +int GetWeaponSize( object oEnt=OBJECT_SELF ); +float GetAverageDistanceToEnemy( float fRad=60.0, object oEnt=OBJECT_SELF ); +int GetCombatModeModifier( int iMode=0 ); +int GetCombatConcentration( object oE=OBJECT_SELF ); +int GetTurningLevel( object oC=OBJECT_SELF ); +void SetIsCentralEyeOpen( int iS=FALSE, object oB=OBJECT_SELF ); +int GetIsCentralEyeOpen( object oB=OBJECT_SELF ); + +// NO_LIB_FEAT +int GetEnhanceFeat( object oEnt=OBJECT_SELF ); +int GetGroupEnhanceFeat( object oEnt=OBJECT_SELF ); +float GetGroupEnhanceFeatRadius( int iFeat ); + +// NO_LIB_MAGIC +int GetBestMagicDefenseSelf( object oEnt=OBJECT_SELF ); +int GetBestMagicDefenseSingle( object oEnt=OBJECT_SELF, object oC=OBJECT_SELF ); +int GetBestPhysDefenseSelf( object oEnt=OBJECT_SELF ); +int GetBestPhysDefenseSingle( object oEnt=OBJECT_SELF, object oC=OBJECT_SELF ); +int GetBestGenericProtection( object oEnt=OBJECT_SELF ); +struct sSpellDefStatus EvaluateSpellDefenses( object oTarget=OBJECT_SELF ); +struct sPhysDefStatus EvaluatePhysicalDefenses( object oTarget=OBJECT_SELF ); +int GetBestHeal( object oEnt=OBJECT_SELF, int iMin=10 ); +int GetGroupHealSpell( int iMinLvl=0, object oCaster=OBJECT_SELF ); +int GetGroupHealSpellAmount( int iH=0, object oCaster=OBJECT_SELF ); +float GetGroupHealSpellRadius( int iH=0 ); +int GetBestRaise( int iCombat=FALSE ); +int GetHasHealingAbility( object oCaster=OBJECT_SELF ); +int GetHasRaisingAbility( object oCaster=OBJECT_SELF ); +int GetHasHelpingAbility( object oCaster=OBJECT_SELF ); +int GetBestHelp( object oEnt, object oCaster=OBJECT_SELF ); +int GetAreaSpell( vector vS, int iDisc=FALSE, int iMinLvl=0, float fR=40.0, object oCaster=OBJECT_SELF ); +float GetAreaSpellRadius( int iSpell ); +int GetDirectSpell( object oT, int iDisc=FALSE, int iMinLvl=0, object oCaster=OBJECT_SELF ); +int GetTouchSpell( object oT, int iMinLvl=0, object oCaster=OBJECT_SELF ); +int GetSummonSpell( int iMinLvl=1, object oCaster=OBJECT_SELF ); +int GetEnhanceSpellSelf( int iMinLvl=1, object oCaster=OBJECT_SELF ); +int GetEnhanceSpellSingle( int iMinLvl=1, object oEnt=OBJECT_SELF, object oCaster=OBJECT_SELF ); +int GetBestBreach( int iLim=30, object oEnt=OBJECT_SELF ); +int GetBestDispel( int iCLvl=20, int iDLvl=20, object oEnt=OBJECT_SELF ); +int GetIsDiscriminantSpell( int iSpell ); +int GetBreathWeapon( object oEnt=OBJECT_SELF ); +int GetConeSpell( int iMinLvl = 1, object oCaster=OBJECT_SELF ); +int GetGroupEnhanceSpell( int iMinLvl = 1, object oCaster=OBJECT_SELF ); +float GetGroupEnhanceSpellRadius( int iSpell ); +int GetDispelSpell( object oEnt=OBJECT_SELF ); +int GetMaxDispelCasterLevel( object oEnt=OBJECT_SELF ); +int GetVisionSpellNeeded( object oS=OBJECT_SELF, object oC=OBJECT_SELF ); +int GetHasVisionSpells( object oC=OBJECT_SELF ); +int GenerateFastBuffList( object oC=OBJECT_SELF ); +float GetSpellRange( int iS ); +int IsCone( int iS=0 ); +int IsDragonBreath( int iS=0 ); +int IsHowl( int iS=0 ); +int IsPulse( int iS=0 ); +void InitializeBeholderRaySelection( object oB=OBJECT_SELF ); +void ClearBeholderRaySelection( object oB=OBJECT_SELF ); +void RemoveBeholderRayFromSelection( int iS=0, object oB=OBJECT_SELF ); +int MatchRayToTarget( object oT, object oB=OBJECT_SELF ); + +// NO_LIB_MELEE +int GetBestMeleeSpecial( object oTarget, int iPenalty=0, int iChance=50, object oEnt=OBJECT_SELF ); +int SelectMeleeCombatModes( object oT, int iC=50, object oEnt=OBJECT_SELF ); + +// NO_LIB_RANGED +int GetBestRangedSpecial( object oTarget, int iPenalty=0, int iChance=50, object oEnt=OBJECT_SELF ); +int SelectRangedCombatModes( object oT, int iC=50, object oEnt=OBJECT_SELF ); + +// NO_LIB_PRIORITY +void AddBehaviour( string sB, int iC, object oEnt=OBJECT_SELF ); +string GetPriority( int iP=1, object oEnt=OBJECT_SELF ); +int GetPriorityChance( int iP=1, object oEnt=OBJECT_SELF ); +void SetVoiceChat( int iV, int iC, object oE=OBJECT_SELF ); +float GetFollowDist( object oE=OBJECT_SELF ); +void SetPerceptionRange( int iP, float fP=50.0, object oE=OBJECT_SELF ); +void SetPerceptionRanges( float fS=50.0, float fH=50.0, float fV=50.0, object oE=OBJECT_SELF ); +float GetPerceptionRange( int iP, object oE=OBJECT_SELF ); +void SetReadyStatus( int iS=1, object oE=OBJECT_SELF ); +int IsReadyToAct( object oE=OBJECT_SELF ); +int ShortAction( object oE=OBJECT_SELF ); +int IsActive( object oE=OBJECT_SELF ); +void SetActive( object oE=OBJECT_SELF ); +void SetIsActive( int iA=TRUE, object oE=OBJECT_SELF ); +float GetResponseRange( int iT, object oE=OBJECT_SELF ); +void SetResponseRange( int iT, float fR=50.0, object oE=OBJECT_SELF ); +void SetIsTeleporter( object oE=OBJECT_SELF ); +int GetIsTeleporter( object oE=OBJECT_SELF ); +void SetIsFastBuffer( int iS, object oE=OBJECT_SELF ); +int GetIsFastBuffer( object oE=OBJECT_SELF ); +void SetIsFastBuffed( int iS, object oE=OBJECT_SELF ); +int GetIsFastBuffed( object oE=OBJECT_SELF ); +void AddFastBuff( int iS, object oE=OBJECT_SELF ); +int CountFastBuffs( object oE=OBJECT_SELF ); +void SetLastAction( string sA, object oE=OBJECT_SELF ); +string GetLastAction( object oE=OBJECT_SELF ); +void SetLastActionTimestamp( object oE=OBJECT_SELF ); +int GetLastActionTimestamp( object oE=OBJECT_SELF ); +void SetCorpseDelay( int iT=60, object oC=OBJECT_SELF ); +void SetIsFlier( int iF=FALSE, object oF=OBJECT_SELF ); +int GetIsFlier( object oF=OBJECT_SELF ); + +// NO_LIB_BIO +void SetSpawnInCondition(int nCondition, int bValid = TRUE); +int GetSpawnInCondition(int nCondition); +void SetSpawnInLocals(int nCondition); +void SetListeningPatterns(); +void WalkWayPoints(int nRun = FALSE, float fPause = 1.0); +void RunNextCircuit(int nRun = FALSE, float fPause = 1.0); +void RunCircuit(int nTens, int nNum, int nRun = FALSE, float fPause = 1.0); +int CheckWayPoints(object oWalker = OBJECT_SELF); +int GetIsPostOrWalking(object oWalker = OBJECT_SELF); +//void SetBehaviorState(int nCondition, int bValid = TRUE); +//int GetBehaviorState(int nCondition); +void PlayMobileAmbientAnimations(); +//void PlayImmobileAmbientAnimations(); +void DetermineSpecialBehavior(object oIntruder = OBJECT_INVALID); +void ClearActions(int nClearConstant=0, int bClearCombat=FALSE); +//SoU animation craziness +void AnimDebug(string sMsg); +int GetAnimationCondition(int nCondition, object oCreature=OBJECT_SELF); +void SetAnimationCondition(int nCondition, int bValid=TRUE, object oCreature=OBJECT_SELF); +int GetIsBusyWithAnimation(object oCreature); +object GetRandomFriend(float fMaxDistance); +object GetRandomObjectByTag(string sTag, float fMaxDistance); +object GetRandomObjectByType(int nObjType, float fMaxDistance); +object GetRandomStop(float fMaxDistance); +void SetCreatureHomeWaypoint(); +object GetCreatureHomeWaypoint(); +void SetCurrentFriend(object oFriend); +object GetCurrentFriend(); +void SetCurrentInteractionTarget(object oTarget); +object GetCurrentInteractionTarget(); +void CheckIsCivilized(); +void CheckCurrentModes(); +int CheckIsAnimActive(object oCreature); +int CheckCurrentAction(); +void AnimInitialization(); +void PlayMobileAmbientAnimations_NonAvian(); +void PlayMobileAmbientAnimations_Avian(); +void PlayImmobileAmbientAnimations(); +void AnimActionPlayRandomImmobile(); +void AnimActionPlayRandomCloseRange(); +void AnimActionPlayRandomMobile(); +void AnimActionPlayRandomUncivilized(); +void AnimActionStartInteracting(object oPlaceable); +void AnimActionStopInteracting(); +void AnimActionStartTalking(object oFriend, int nHDiff=0); +void AnimActionStopTalking(object oFriend, int nHDiff=0); +void AnimActionPlayRandomGreeting(int nHDiff=0); +void AnimActionPlayRandomGoodbye(int nHDiff); +void AnimActionRandomMoveAway(object oSource, float fDistance); +void AnimActionShakeHead(); +void AnimActionLookAround(); +void AnimActionTurnAround(); +void AnimActionGoThroughDoor(object oDoor); +int AnimActionCloseRandomDoor(); +int AnimActionSitInChair(float fMaxDistance); +int AnimActionGetUpFromChair(); +int AnimActionGoInside(); +int AnimActionGoOutside(); +int AnimActionGoToStop(float fMaxDistance); +int AnimActionFindFriend(float fMaxDistance); +int AnimActionFindPlaceable(float fMaxDistance); +int AnimActionRest(); +int AnimActionGoHome(); +int AnimActionLeaveHome(); +int AnimActionChallengeIntruder(); +void AnimActionPlayRandomInteractAnimation(object oPlaceable); +void AnimActionPlayRandomTalkAnimation(int nHDiff); +void AnimActionPlayRandomBasicAnimation(); +void AnimActionPlayRandomAnimation(); \ No newline at end of file diff --git a/_module/nss/no_lib_actions.nss b/_module/nss/no_lib_actions.nss new file mode 100644 index 00000000..6f6e1011 --- /dev/null +++ b/_module/nss/no_lib_actions.nss @@ -0,0 +1,2899 @@ +#include "no_inc_ptypes" + +//support functions +void NO_ActionCastSpellAtLocation( int iSpell, location lTargetLocation, int iMetaMagic=METAMAGIC_ANY, int iCheat=FALSE, int iProjectilePathType=PROJECTILE_PATH_TYPE_DEFAULT, int iInstantSpell=FALSE, int iDefensive=TRUE ) +{ + int iLevel = 14; + int iConc = GetCombatConcentration(); + int iDefCast = FALSE; + + if ( iDefensive == TRUE && iConc >= iLevel && GetHostileCount( 5.0 ) > 0 ) + { + iDefCast = TRUE; + } + SetActionMode( OBJECT_SELF, ACTION_MODE_DEFENSIVE_CAST, iDefCast ); + ActionCastSpellAtLocation( iSpell, lTargetLocation, iMetaMagic, iCheat, iProjectilePathType, iInstantSpell ); +} + +void NO_ActionCastSpellAtObject( int iSpell, object oTarget, int iMetaMagic=METAMAGIC_ANY, int iCheat=FALSE, int iDomainLevel=0, int iProjectilePathType=PROJECTILE_PATH_TYPE_DEFAULT, int iInstantSpell=FALSE, int iDefensive=TRUE ) +{ + int iLevel = 14; + int iConc = GetCombatConcentration(); + int iDefCast = FALSE; + + if ( iDefensive == TRUE && iConc >= iLevel && GetHostileCount( 5.0 ) > 0 ) + { + iDefCast = TRUE; + } + SetActionMode( OBJECT_SELF, ACTION_MODE_DEFENSIVE_CAST, iDefCast ); + ActionCastSpellAtObject( iSpell, oTarget, iMetaMagic, iCheat, iDomainLevel, iProjectilePathType, iInstantSpell ); +} + +void NO_ActionUseTalentAtLocation( talent tChosenTalent, location lTargetLocation, int iDefensive=TRUE ) +{ + int iLevel = 14; + int iConc = GetCombatConcentration(); + int iDefCast = FALSE; + + if ( iDefensive == TRUE && iConc >= iLevel && GetHostileCount( 5.0 ) > 0 ) + { + iDefCast = TRUE; + } + SetActionMode( OBJECT_SELF, ACTION_MODE_DEFENSIVE_CAST, iDefCast ); + ActionUseTalentAtLocation( tChosenTalent, lTargetLocation ); +} + +void NO_ActionUseTalentOnObject( talent tChosenTalent, object oTarget, int iDefensive=TRUE ) +{ + int iLevel = 14; + int iConc = GetCombatConcentration(); + int iDefCast = FALSE; + + if ( iDefensive == TRUE && iConc >= iLevel && GetHostileCount( 5.0 ) > 0 ) + { + iDefCast = TRUE; + } + SetActionMode( OBJECT_SELF, ACTION_MODE_DEFENSIVE_CAST, iDefCast ); + ActionUseTalentOnObject( tChosenTalent, oTarget ); +} + +void ActivateCombatMode( int iMode=0, object oE=OBJECT_SELF ) +{ + int iM = 0; + + switch( iMode ) + { + case FEAT_DIRTY_FIGHTING: + iM = ACTION_MODE_DIRTY_FIGHTING; + break; + case FEAT_EXPERTISE: + iM = ACTION_MODE_EXPERTISE; + break; + case FEAT_IMPROVED_EXPERTISE: + iM = ACTION_MODE_IMPROVED_EXPERTISE; + break; + case FEAT_FLURRY_OF_BLOWS: + iM = ACTION_MODE_FLURRY_OF_BLOWS; + break; + case FEAT_POWER_ATTACK: + iM = ACTION_MODE_POWER_ATTACK; + break; + case FEAT_IMPROVED_POWER_ATTACK: + iM = ACTION_MODE_IMPROVED_POWER_ATTACK; + break; + case FEAT_RAPID_SHOT: + iM = ACTION_MODE_RAPID_SHOT; + break; + } + if ( GetActionMode( oE, iM ) == FALSE ) + { + SetActionMode( oE, iM, TRUE ); + } +} + +void DeactivateCombatModes( int iException=0, object oE=OBJECT_SELF ) +{ + if ( iException != FEAT_DIRTY_FIGHTING && GetActionMode( oE, ACTION_MODE_DIRTY_FIGHTING ) == TRUE ) + { + SetActionMode( oE, ACTION_MODE_DIRTY_FIGHTING, FALSE ); + } + if ( iException != FEAT_EXPERTISE && GetActionMode( oE, ACTION_MODE_EXPERTISE ) == TRUE ) + { + SetActionMode( oE, ACTION_MODE_EXPERTISE, FALSE ); + } + if ( iException != FEAT_IMPROVED_EXPERTISE && GetActionMode( oE, ACTION_MODE_IMPROVED_EXPERTISE ) == TRUE ) + { + SetActionMode( oE, ACTION_MODE_IMPROVED_EXPERTISE, FALSE ); + } + if ( iException != FEAT_FLURRY_OF_BLOWS && GetActionMode( oE, ACTION_MODE_FLURRY_OF_BLOWS ) == TRUE ) + { + SetActionMode( oE, ACTION_MODE_FLURRY_OF_BLOWS, FALSE ); + } + if ( iException != FEAT_POWER_ATTACK && GetActionMode( oE, ACTION_MODE_POWER_ATTACK ) == TRUE ) + { + SetActionMode( oE, ACTION_MODE_POWER_ATTACK, FALSE ); + } + if ( iException != FEAT_IMPROVED_POWER_ATTACK && GetActionMode( oE, ACTION_MODE_IMPROVED_POWER_ATTACK ) == TRUE ) + { + SetActionMode( oE, ACTION_MODE_IMPROVED_POWER_ATTACK, FALSE ); + } + if ( iException != FEAT_RAPID_SHOT && GetActionMode( oE, ACTION_MODE_RAPID_SHOT ) == TRUE ) + { + SetActionMode( oE, ACTION_MODE_RAPID_SHOT, FALSE ); + } +} + +int DoHideInPlainSight( object oE=OBJECT_SELF ) +{ + if ( GetHasFeat( FEAT_HIDE_IN_PLAIN_SIGHT, oE ) ) + { + SetActionMode( oE, ACTION_MODE_STEALTH, TRUE ); + return TRUE; + } + return FALSE; +} + +void DoFireBeholderRay( int iS, object oT ) +{ + if ( iS < 776 || iS > 784 || iS == 781 || iS == 782 ) //not a valid beholder ray spell definition + { + return; + } + + if ( TouchAttackRanged( oT ) == FALSE ) + { + vector vT; + location lT; + int iF = 785 + Random( 3 ); + + vT = GetPosition( oT ) + 1.0 * AngleToVector( IntToFloat( Random( 360 ) ) ); + lT = Location( GetArea( OBJECT_SELF ), vT, GetFacing( OBJECT_SELF ) ); + //ActionCastFakeSpellAtLocation( iS, lT ); + ActionCastSpellAtLocation( iF, lT, METAMAGIC_ANY, TRUE, PROJECTILE_PATH_TYPE_DEFAULT, TRUE ); + } + else + { + ActionCastSpellAtObject( iS, oT, METAMAGIC_ANY, TRUE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE ); + } +} + +void DoMoveToLocation( location lDest, int bRun=FALSE ) +{ + effect eVis; + float fD = 4.0; + float fMinDist = 15.0; + + //activate hide in plain sight while moving + DoHideInPlainSight(); + + if ( GetLocalInt( OBJECT_SELF, "TELEPORTER" ) && GetDistanceBetweenLocations( GetLocation( OBJECT_SELF ), lDest ) > fMinDist ) + { + DoTeleport( lDest ); + } + else if ( GetLocalInt( OBJECT_SELF, "FLIER" ) && GetDistanceBetweenLocations( GetLocation( OBJECT_SELF ), lDest ) > fMinDist ) + { + if ( !GetLocalInt( OBJECT_SELF, "DRAGONFLIGHTDEL" ) ) + { + SetLocalInt( OBJECT_SELF, "DRAGONFLIGHTDEL", 1 ); + DelayCommand( fD + 0.5, DeleteLocalInt( OBJECT_SELF, "DRAGONFLIGHTDEL" ) ); + ApplyEffectToObject( DURATION_TYPE_TEMPORARY, EffectDisappearAppear( lDest ), OBJECT_SELF, fD ); + } + } + else + { + ActionMoveToLocation( lDest, bRun ); + } +} + +void DoMoveToObject( object oDest, int bRun=FALSE, float fDist=1.0f ) +{ + location lDest; + vector vT; + float fD = 4.0; + float fMinDist = 15.0; + + //activate hide in plain sight while moving + DoHideInPlainSight(); + + if ( GetIsObjectValid( oDest ) ) + { + if ( GetLocalInt( OBJECT_SELF, "TELEPORTER" ) && GetDistanceBetweenLocations( GetLocation( OBJECT_SELF ), GetLocation( oDest ) ) > fMinDist ) + { + vT = GetPosition( oDest ) + fDist * VectorNormalize( GetPosition( OBJECT_SELF ) - GetPosition( oDest ) ); + lDest = Location( GetArea( oDest ), vT, VectorToAngle( GetPosition( oDest ) - vT ) ); + DoTeleport( lDest ); + } + else if ( GetLocalInt( OBJECT_SELF, "FLIER" ) && GetDistanceBetweenLocations( GetLocation( OBJECT_SELF ), GetLocation( oDest ) ) > fMinDist ) + { + if ( !GetLocalInt( OBJECT_SELF, "DRAGONFLIGHTDEL" ) ) + { + vT = GetPosition( oDest ) + fDist * VectorNormalize( GetPosition( OBJECT_SELF ) - GetPosition( oDest ) ); + lDest = Location( GetArea( oDest ), vT, VectorToAngle( GetPosition( oDest ) - vT ) ); + SetLocalInt( OBJECT_SELF, "DRAGONFLIGHTDEL", 1 ); + DelayCommand( fD + 0.5, DeleteLocalInt( OBJECT_SELF, "DRAGONFLIGHTDEL" ) ); + ApplyEffectToObject( DURATION_TYPE_TEMPORARY, EffectDisappearAppear( lDest ), OBJECT_SELF, fD ); + } + } + else + { + ActionMoveToObject( oDest, bRun, fDist ); + } + } +} + +void DoTeleport( location lLoc ) +{ + effect eVis = EffectVisualEffect( VFX_IMP_GLOBE_USE ); + + ActionCastFakeSpellAtObject( SPELLABILITY_SUMMON_CELESTIAL, OBJECT_SELF ); + ActionDoCommand( ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eVis, GetLocation( OBJECT_SELF ) ) ); + ActionDoCommand( ApplyEffectAtLocation( DURATION_TYPE_INSTANT, eVis, lLoc ) ); + ActionDoCommand( ActionJumpToLocation( lLoc ) ); +} + +object GetTarget() +{ + object oS = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + object oH = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_HEARD, CREATURE_TYPE_IS_ALIVE, TRUE ); + object oT = OBJECT_INVALID; + + if ( !GetIsPerceived( oS, NO_PERCEPTION_SEEN ) ) + { + oS = OBJECT_INVALID; + } + if ( !GetIsPerceived( oH, NO_PERCEPTION_HEARD ) ) + { + oH = OBJECT_INVALID; + } + + if ( GetIsObjectValid( oS ) && GetIsObjectValid( oH ) ) + { + //target the closer of the two + oT = GetDistanceBetween( OBJECT_SELF, oH ) < GetDistanceBetween( OBJECT_SELF, oS ) ? oH : oS; + } + else if ( GetIsObjectValid( oS ) ) + { + //oH is invalid + oT = oS; + } + else + { + //oS is invalid + oT = oH; + } + return oT; +} + +float DotProduct( vector v1, vector v2 ) +{ + float fDP; + + fDP = v1.x * v2.x + v1.y * v2.y + v1.z * v2.z; + + return fDP; +} + +location GetFlankLoc( object oT, location lL ) +{ + vector vU; + vector vT; + vector vM; + location lF; + + if ( GetIsObjectValid( oT ) ) + { + vT = GetPosition( oT ) - GetPosition( OBJECT_SELF ); + } + else + { + vT = GetPositionFromLocation( lL ) - GetPosition( OBJECT_SELF ); + } + vM = VectorNormalize( AngleToVector( VectorToAngle( vT ) - 45.0 + 90.0 * IntToFloat( Random( 2 ) ) ) ); + vM = DotProduct( vT, vM ) * VectorNormalize( vM ) + GetPosition( OBJECT_SELF ); + lF = Location( GetArea( oT ), vM, VectorToAngle( vT - vM ) ); + + return lF; +} + +void DoEquipMelee( object oT ) +{ + object oL = GetLocalObject( OBJECT_SELF, "LHAND" ); + object oR = GetLocalObject( OBJECT_SELF, "RHAND" ); + + if ( GetIsObjectValid( oR ) || GetIsObjectValid( oL ) ) + { + if ( GetIsObjectValid( oR ) ) + { + if ( !GetIsObjectValid( GetItemPossessor( oR ) ) ) + { + //weapon is on the ground after being disarmed? + //try to pick it up + ActionPickUpItem( oR ); + ActionEquipItem( oR, INVENTORY_SLOT_RIGHTHAND ); + } + else if ( GetItemPossessor( oR ) == OBJECT_SELF && GetItemInSlot( INVENTORY_SLOT_RIGHTHAND ) != oR ) + { + ActionEquipItem( oR, INVENTORY_SLOT_RIGHTHAND ); + } + } + if ( GetIsObjectValid( oL ) ) + { + if ( !GetIsObjectValid( GetItemPossessor( oL ) ) ) + { + //weapon is on the ground after being disarmed? + //try to pick it up + ActionPickUpItem( oL ); + ActionEquipItem( oL, INVENTORY_SLOT_LEFTHAND ); + } + else if ( GetItemPossessor( oL ) == OBJECT_SELF && GetItemInSlot( INVENTORY_SLOT_LEFTHAND ) != oL ) + { + ActionEquipItem( oL, INVENTORY_SLOT_LEFTHAND ); + } + } + } + else if ( GetIsObjectValid( oT ) ) + { + //nothing stored + ActionEquipMostDamagingMelee( oT ); + } + else + { + ActionEquipMostDamagingMelee(); + } +} + +talent GetTalentSpell( int iCat, int iD ) +{ + int iCR = 21; + talent tT; + talent iT; //reserve for invalid talent return + + while ( --iCR ) + { + tT = GetCreatureTalentBest( iCat, iCR ); + if ( ( GetIsTalentValid( tT ) && GetIdFromTalent( tT ) == iD ) || !GetIsTalentValid( tT ) ) + { + break; + } + } + if ( GetIsTalentValid( tT ) && GetIdFromTalent( tT ) == iD ) + { + return tT; + } + return iT; +} + + +void DoFightBroadcast() +{ + //broadcast fight "noise" at most once a second + //respect silence spell + int iDelay = 2; + int iTime = GetTimeSecond(); + int iLast = GetLocalInt( OBJECT_SELF, "#LASTCREBC" ); + int iS = iTime < iLast ? iTime + 60 : iTime; + int iVol = NO_CAN_USE_DM_CHANNEL ? TALKVOLUME_SILENT_SHOUT : TALKVOLUME_SILENT_TALK; + + //anti-spamloop delay + if ( iS - iLast >= iDelay ) + { + //only broadcast noise if silence is not in effect + if ( !( GetEffectsOnObject() & NO_EFFECT_SILENCE ) ) + { + SpeakString( "BC_FIGHTING", iVol ); + } + SetLocalInt( OBJECT_SELF, "#LASTCREBC", iTime ); + DeleteLocalInt( OBJECT_SELF, "#LASTREST" ); + } +} + +int GetTimeSinceLastCombat() +{ + int iTime = GetTimeSecond(); + int iLast = GetLocalInt( OBJECT_SELF, "#LASTCREBC" ); + int iS = iTime < iLast ? iTime + 60 : iTime; + int iT = iS - iLast; + + return iT; +} + +void DoConditionalRestart( float fT=6.0 ) +{ + DeleteLocalInt( OBJECT_SELF, "#RESTARTQUEUED" ); + if ( GetLocalInt( OBJECT_SELF, "#ACTIVE" ) && GetTimeSinceLastCombat() > FloatToInt( fT ) ) + { + ClearAllActions(); + DeleteLocalInt( OBJECT_SELF, "#COMBATQUEUED" ); + //SetReadyStatus(); + DelayCommand( 0.1, DoQueueCombat( 8.0, 8.0 ) ); + } +} + +void DoQueueShutdown( float fT=0.0 ) +{ + if ( !GetLocalInt( OBJECT_SELF, "#QUEUESHUTDOWN" ) ) + { + SetLocalInt( OBJECT_SELF, "#QUEUESHUTDOWN", 1 ); + DelayCommand( fT, ExecuteScript( "no_scr_shutdown", OBJECT_SELF ) ); + } +} + +void DoQueueCombat( float fD=6.0, float fT=6.0 ) +{ + if ( !GetLocalInt( OBJECT_SELF, "#ACTIVE" ) ) + { + SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + DelayCommand( 0.1, ClearAllActions() ); + } + if ( !GetLocalInt( OBJECT_SELF, "#COMBATQUEUED" ) ) + { + SetLocalInt( OBJECT_SELF, "#COMBATQUEUED", 1 ); + DelayCommand( 0.2, ActionDoCommand( DoCombat() ) ); + } + if ( !GetLocalInt( OBJECT_SELF, "#RESTARTQUEUED" ) ) + { + SetLocalInt( OBJECT_SELF, "#RESTARTQUEUED", 1 ); + DelayCommand( fD, DoConditionalRestart( fT ) ); + } +} + +void InitCombat( object oE=OBJECT_INVALID ) +{ + int iT = GetLastActionTimestamp(); + + if ( IsActive() == FALSE || GetCurrentAction() == ACTION_INVALID || iT > 8 ) + { + ClearAllActions(); + SetIsActive( TRUE ); + DoCombat(); + } +} + +void DoVoiceChat( int iV=-1 ) +{ + int iC = GetLocalInt( OBJECT_SELF, "#VCC_" + IntToString( iV ) ); + + if ( iC == -1 || !CanAct() ) + { + //do not do this voice chat + return; + } + if ( iC == 0 ) + { + //no specific setting for this voice chat, use default chance + iC = GetLocalInt( OBJECT_SELF, "#VCC" ); + } + if ( Random( 100 ) < iC ) + { + //don't bother talking to ourselves, look for a nearby friend + object oF = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, 1, CREATURE_TYPE_IS_ALIVE, TRUE ); + if ( GetIsObjectValid( oF ) && GetDistanceBetween( OBJECT_SELF, oF ) < 50.0 ) + { + //there is a friendly nearby, do the voice chat + int iD = iV; + if ( iV == NO_VC_MELEE || iV == NO_VC_RANGED || iV == NO_VC_MELEEASSIST ) + { + //custom voice chat handling + iD = Random( 5 ); + switch( iD ) + { + case 1: iD = VOICE_CHAT_ATTACK; + case 2: iD = VOICE_CHAT_BATTLECRY1; + case 3: iD = VOICE_CHAT_BATTLECRY2; + case 4: iD = VOICE_CHAT_BATTLECRY3; + default: iD = VOICE_CHAT_TAUNT; + } + } + PlayVoiceChat( iD ); + } + } +} + +void DoMainCombatLoop() +{ + int iCnt = 1; + string sPri = GetPriority( iCnt ); + int iPri = GetPriorityChance( iCnt++ ); + + while ( sPri != "" ) + { + if ( sPri == "+ATKMELEE" && Random( 100 ) < iPri && DoAttackMelee() ) //atkmelee + { + //PrintString( "+ATKMELEE: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+ATKRANGED" && Random( 100 ) < iPri && DoAttackRanged() ) //atkranged + { + //PrintString( "+ATKRANGED: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+COUNTERSPELL" && Random( 100 ) < iPri && DoCounterSpell() ) //counterspell + { + //PrintString( "+COUNTERSPELL: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+EVACAOE" && Random( 100 ) < iPri && DoEvacAOE() ) //evac AOEs + { + //PrintString( "+EVACAOE: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+REGROUP" && Random( 100 ) < iPri && DoRegroup() ) //regroup with allies + { + //PrintString( "+REGROUP: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+DEFSELF" && Random( 100 ) < iPri && DoDefendSelf() ) //apply defenses + { + //PrintString( "+DEFSELF: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+DEFSING" && Random( 100 ) < iPri && DoDefendSingle() ) //apply defenses to single + { + //PrintString( "+DEFSING: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+ENHANCESELF" && Random( 100 ) < iPri && DoEnhanceSelf() ) //enhance self + { + //PrintString( "+ENHANCESELF: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+ENHANCESING" && Random( 100 ) < iPri && DoEnhanceSingle() ) //enhance single + { + //PrintString( "+ENHANCESING: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+HELP" && Random( 100 ) < iPri && DoSpellHelp() ) //remove afflictions + { + //PrintString( "+HELP: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+HEAL" && Random( 100 ) < iPri && DoSpellHeal() ) //heal + { + //PrintString( "+HEAL: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+RAISE" && Random( 100 ) < iPri && DoSpellRaise() ) //raise + { + //PrintString( "+RAISE: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+BREACH" && Random( 100 ) < iPri && DoSpellBreach() ) //breach + { + //PrintString( "+BREACH: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+DIRECT" && Random( 100 ) < iPri && DoSpellDirect() ) //direct attack spell + { + //PrintString( "+DIRECT: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+TOUCH" && Random( 100 ) < iPri && DoTouch() ) //touch attack spell + { + //PrintString( "+TOUCH: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+AREA" && Random( 100 ) < iPri && DoSpellArea() ) //area attack spell + { + //PrintString( "+AREA: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+SUMMON" && Random( 100 ) < iPri && DoSpellSummon() ) //summon help + { + //PrintString( "+SUMMON: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+FEATENHANCE" && Random( 100 ) < iPri && DoFeatEnhance() ) //enhance via feat + { + //PrintString( "+FEATENHANCE: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+AVOIDMELEE" && Random( 100 ) < iPri && DoAvoidMelee() ) //avoid melee + { + //PrintString( "+AVOIDMELEE: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+TIMESTOP" && Random( 100 ) < iPri && DoTimeStop() ) //time stop + { + //PrintString( "+TIMESTOP: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+VIS" && Random( 100 ) < iPri && DoVision() ) //vision + { + //PrintString( "+VIS: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+BREATH" && Random( 100 ) < iPri && DoBreathWeapon() ) //breathweapon + { + //PrintString( "+BREATH: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+TURN" && Random( 100 ) < iPri && DoTurning() ) //turn undead + { + //PrintString( "+TURN: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+HEALSELF" && Random( 100 ) < iPri && DoHealSelf() ) //heal self + { + //PrintString( "+HEALSELF: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+GROUPENHANCE" && Random( 100 ) < iPri && DoSpellGroupEnhance() ) //group enhance + { + //PrintString( "+GROUPENHANCE: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+DISPELAOE" && Random( 100 ) < iPri && DoDispelPersAOE() ) //dispel hostile AOEs + { + //PrintString( "+DISPELAOE: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+DISPEL" && Random( 100 ) < iPri && DoDispelSingle() ) //dispel buffs on single enemy + { + //PrintString( "+DISPEL: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+DISMISSAL" && Random( 100 ) < iPri && DoDismissal() ) //dismiss enemy summons + { + //PrintString( "+DISMISSAL: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+MELEEASSIST" && Random( 100 ) < iPri && DoMeleeAssist() ) //assist friends in melee + { + //PrintString( "+MELEEASSIST: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+FLANK" && Random( 100 ) < iPri && DoFlank() ) //flank enemy + { + //PrintString( "+FLANK: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+GROUPHEAL" && Random( 100 ) < iPri && DoSpellGroupHeal() ) //use area heals + { + //PrintString( "+GROUPHEAL: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+MINDBLAST" && Random( 100 ) < iPri && DoMindBlast() ) //use mind blast psionics + { + //PrintString( "+MINDBLAST: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+BRAINEXTRACT" && Random( 100 ) < iPri && DoBrainExtraction() ) //Illithid brain extraction + { + //PrintString( "+BRAINEXTRACT: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+AVOIDENEMY" && Random( 100 ) < iPri && DoAvoidEnemies() ) //Move away from enemies + { + //PrintString( "+AVOIDENEMY: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+EYERAYS" && Random( 100 ) < iPri && DoBeholderRays() ) //Beholder eye rays + { + //PrintString( "+EYERAYS: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + else if ( sPri == "+CENTRALEYE" && Random( 100 ) < iPri && DoBeholderCentralEye() ) //Beholder's antimagic cone + { + //PrintString( "+CENTRALEYE: " + GetName( OBJECT_SELF ) ); + //return; + SetLastAction( sPri ); + //SetLastActionTimestamp(); + break; + } + sPri = GetPriority( iCnt ); + iPri = GetPriorityChance( iCnt++ ); + } +} + +//action functions +void DoCombat() +{ + //int iTime, iLast, iDiff; + int iAct; + float fDelay = 0.0; + + //delete queue marker + DeleteLocalInt( OBJECT_SELF, "#COMBATQUEUED" ); + + if ( GetIsDead( OBJECT_SELF ) ) + { + return; + } + + //int iE = GetHostileCount( 50.0 ); + int iE = GetOmniscientHostileCount( 50.0 ); + if ( iE == 0 ) + { + return; + } + + //make combat noise for nearby listeners + DoFightBroadcast(); + + //don't bother running scripts if we can't do anything + if ( !CanAct() ) + { + ClearAllActions(); + //queue a delay before checking again + fDelay += 0.1; + DelayCommand( fDelay, ActionWait( 1.0 ) ); + //return; + } + else + { + //can take action + //If creature is busy do not proceed + iAct = GetCurrentAction(); + if ( iAct == ACTION_CASTSPELL || iAct == ACTION_HEAL || iAct == ACTION_ITEMCASTSPELL || iAct == ACTION_PICKUPITEM || iAct == ACTION_WAIT || + GetLocalInt( OBJECT_SELF, "#EYERAYS" ) == 1 ) + { + //do nothing + } + else + { + //run the combat response table + ClearAllActions(); + DoMainCombatLoop(); + SetLastActionTimestamp(); + } + } + DoHideInPlainSight(); //testing HIPS between actions + + if ( !CanAct() || ShortAction() ) + { + //DoQueueCombat( 8.0, 8.0 ); + fDelay += 0.1; + DelayCommand( fDelay, ActionDoCommand( DoCombat() ) ); + } +} + +int DoAttackMelee( object oT=OBJECT_INVALID ) +{ + object oTarget; + int iSpecial; + int iMode; + int iPen = 0; + int iMelee = GetAttackerCount( 5.0 ); + int iCnt = 1; + int iChat; + location lLoc; + vector vT, vU; + object test; + + if ( GetIsObjectValid( oT ) ) + { + oTarget = oT; + } + else if ( iMelee ) + { + oTarget = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + while ( GetIsObjectValid( oTarget ) && GetDistanceBetween( OBJECT_SELF, oTarget ) <= 5.0 && GetAttackTarget( oTarget ) != OBJECT_SELF ) + { + oTarget = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + } + else + { + oTarget = GetTarget(); + } + + if ( GetIsObjectValid( oTarget ) && ( GetObjectSeen( oTarget ) || GetObjectHeard( oTarget ) ) ) + { + //PrintString( GetName( OBJECT_SELF ) + " melee attack " + GetName( oTarget ) + ": " + FloatToString( GetDistanceBetween( OBJECT_SELF, oTarget ) ) ); + DoEquipMelee( oTarget ); + DoVoiceChat( NO_VC_MELEE ); + //combat modes + if ( iMode = SelectMeleeCombatModes( oTarget ) ) + { + iPen = GetCombatModeModifier( iMode ); + DeactivateCombatModes( iMode ); + ActivateCombatMode( iMode ); + //ActionUseFeat( iMode, oTarget ); + + } + //special melee attacks + if ( iSpecial = GetBestMeleeSpecial( oTarget, iPen ) ) + { + ActionUseFeat( iSpecial, oTarget ); + } + else + { + ActionAttack( oTarget ); + } + return TRUE; + } + else + { + if ( !GetIsObjectValid( oTarget = GetLastDamager() ) ) + { + if ( !GetIsObjectValid( oTarget = GetLastAttacker() ) ) + { + oTarget = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, 1, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + } + if ( GetIsObjectValid( oTarget ) && GetDistanceBetween( OBJECT_SELF, oTarget ) <= 40.0 ) + { + /* + vU = GetPosition( OBJECT_SELF ); + vT = GetPosition( oTarget ) - vU; + vT = VectorMagnitude( vT ) * VectorNormalize( AngleToVector( VectorToAngle( vT ) - 45.0 + IntToFloat( Random( 90 ) ) ) ); + lLoc = Location( GetArea( OBJECT_SELF ), vU + vT, VectorToAngle( vT ) ); + */ + lLoc = GetLocation( oTarget ); + DoMoveToLocation( lLoc, TRUE ); + return TRUE; + } + } + return FALSE; +} + +int DoAttackRanged( object oT=OBJECT_INVALID ) +{ + object oTarget = ( GetIsObjectValid( oT ) ) ? oT : GetTarget(); + object oHurt; + //talent tSpecial; + int iSpecial; + int iMode; + int iPen = 0; + int iAtk = GetAttackerCount(); + int iChat; + location lLoc; + + //don't proceed if enemies are close + //if creature should avoid melee that should be added as a priority + //above this behaviour + if ( GetHostileCount( 5.0 ) ) + { + return FALSE; + } + + //raging barbarians should not use ranged attack + if ( GetHasFeatEffect( FEAT_BARBARIAN_RAGE, OBJECT_SELF ) || GetHasFeatEffect( FEAT_MIGHTY_RAGE, OBJECT_SELF ) ) + { + //raging barbarians should skip ranged + return FALSE; + } + + if ( !GetLocalInt( OBJECT_SELF, "#RANGEDCAPABLE" ) ) + { + if ( !GetHasRangedCapability() ) + { + return FALSE; + } + SetLocalInt( OBJECT_SELF, "#RANGEDCAPABLE", 1 ); + } + + if ( GetIsObjectValid( oTarget ) && !iAtk ) + { + /* This should be done explicitly with the avoid melee behaviour + if ( GetHostileCount( 5.0 ) ) + { + if ( DoAvoidMelee() ) + { + //PrintString( GetName( OBJECT_SELF ) + " avoiding melee before ranged attack" ); + return TRUE; + } + } + */ + + //PrintString( GetName( OBJECT_SELF ) + " ranged attack " + GetName( oTarget ) + ": " + IntToString( iAtk ) + FloatToString( GetDistanceBetween( OBJECT_SELF, oTarget ) ) ); + if ( !GetIsObjectValid( oT ) ) //not specifically told to attack a target + { + if ( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && + GetIsObjectValid( oHurt = GetMostDamagedAlly( 20.0, oTarget, TRUE ) ) ) + { + oTarget = oHurt; + } + } + + ActionEquipMostDamagingRanged( oTarget ); + DoVoiceChat( NO_VC_RANGED ); + //combat modes + if ( iMode = SelectRangedCombatModes( oTarget ) ) + { + iPen = GetCombatModeModifier( iMode ); + DeactivateCombatModes( iMode ); + ActivateCombatMode( iMode ); + ActionUseFeat( iMode, oTarget ); + } + //special ranged attacks + if ( iSpecial = GetBestRangedSpecial( oTarget, iPen ) ) + { + ActionUseFeat( iSpecial, oTarget ); + } + else + { + ActionAttack( oTarget ); + } + return TRUE; + } + //PrintString( GetName( OBJECT_SELF ) + " aborting ranged attack: " + IntToString( iAtk ) ); + return FALSE; +} + +int DoCounterSpell( object oT=OBJECT_INVALID ) +{ + object oC = ( GetIsObjectValid( oT ) ) ? oT : GetNearestEnemyCaster(); + + //do not counterspell if I have timestop running + if ( GetHasSpellEffect( SPELL_TIME_STOP ) ) + { + return FALSE; + } + //do not counterspell if I have attackers + if ( GetAttackerCount( 40.0 ) ) + { + return FALSE; + } + + //dead/living status should be handled by GetNearestEnemyCaster() + if ( GetIsObjectValid( oC ) ) + { + //PrintString( GetName( OBJECT_SELF ) + " counterspelling " + GetName( oC ) ); + ActionCounterSpell( oC ); + return TRUE; + } + return FALSE; +} + +int DoEvacAOE() +{ + vector vT; + location lLoc; + + //don't bother if we have time stop + if ( GetHasSpellEffect( SPELL_TIME_STOP ) ) + { + return FALSE; + } + + if ( GetAOECount( 7.5 ) ) + { + vT = GetAOEEvacVector( GetAOEVector( 15.0 ) ); + lLoc = Location( GetArea( OBJECT_SELF ), vT, GetFacing( OBJECT_SELF ) ); + SetLocalLocation( OBJECT_SELF, "LASTLOC", GetLocation( OBJECT_SELF ) ); + DoMoveToLocation( lLoc, TRUE ); + return TRUE; + } + return FALSE; +} + +int DoRegroup( object oT=OBJECT_INVALID ) +{ + int iCnt = 0; + int iE = 0; + object oFriend; + object oDistant = OBJECT_INVALID; + vector vU, vT, vM; + location lLoc; + + //check for order to regroup to a particular object + if ( GetIsObjectValid( oT ) ) + { + DoMoveToObject( oT, TRUE, 5.0 ); + return TRUE; + } + + //don't bother if we have time stop + if ( GetHasSpellEffect( SPELL_TIME_STOP ) ) + { + return FALSE; + } + + vU = GetPosition( OBJECT_SELF ); + vT = Vector( 0.0, 0.0, 0.0 ); + oFriend = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + while ( GetIsObjectValid( oFriend ) ) + { + vT = vT + GetPosition( oFriend ) - vU; + oFriend = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + + if ( VectorMagnitude( vT ) > 0.0 ) + { + vT = vT / IntToFloat( iCnt - 1 ); + } + + if ( VectorMagnitude( vT ) == 0.0 ) + { + oFriend = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, 1, CREATURE_TYPE_IS_ALIVE, TRUE ); + if ( GetIsObjectValid( oFriend ) && GetDistanceBetween( OBJECT_SELF, oFriend ) < 60.0 /*&& GetDistanceBetween( OBJECT_SELF, oFriend ) > 30.0*/ ) + { + //we do have friends nearby but can't see them + DoMoveToLocation( GetLocation( oFriend ), TRUE ); + return TRUE; + } + } + if ( VectorMagnitude( vT ) > 25.0 ) + { + if ( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) ) + { + //need to regroup, get movement vector + vT = vT - 10.0 * VectorNormalize( vT ); + vM = vU + vT; + lLoc = Location( GetArea( OBJECT_SELF ), vM, VectorToAngle( vT ) ); + DoMoveToLocation( lLoc, TRUE ); + //PrintString( GetName( OBJECT_SELF ) + " REGROUPING: (" + FloatToString( vM.x ) + "," + FloatToString( vM.y ) + ")" ); + DoVoiceChat( VOICE_CHAT_GROUP ); + return TRUE; + } + } + else + { + //look for outliers + iCnt = 0; + oFriend = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + while ( GetIsObjectValid( oFriend ) ) + { + oDistant = oFriend; + oFriend = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + if ( GetIsObjectValid( oDistant ) ) + { + if ( GetDistanceBetween( OBJECT_SELF, oDistant ) > 30.0 ) + { + DoMoveToObject( oDistant, TRUE, 10.0 ); + //PrintString( GetName( OBJECT_SELF ) + " finding OUTLIER " + GetName( oDistant ) ); + DoVoiceChat( VOICE_CHAT_GROUP ); + return TRUE; + } + } + } + return FALSE; +} + +int DoDefendSelf() +{ + int iMagic = GetCasterCount( 40.0 ); + int iPhys = GetAttackerCount( 40.0 ); + int iPotAtk = GetHostileCount( 40.0 ); + int iSpell = 0; + talent tSpell; + struct sSpellDefStatus strMDef = EvaluateSpellDefenses(); + struct sPhysDefStatus strPDef = EvaluatePhysicalDefenses(); + + if ( ( iPhys || iPotAtk ) && strPDef.iTotal < 4 ) + { + /* + if ( iSpell = GetBestPhysDefense() ) //again, no acid fog + { + tSpell = TalentSpell( iSpell ); + } + */ + if ( iSpell = GetBestPhysDefenseSelf() ) + //if ( GetIsTalentValid( tSpell ) ) + { + //PrintString( "PD: " + GetName( OBJECT_SELF ) + "(" + IntToString( iSpell ) + ")" ); + //ActionCastSpellAtObject( iSpell, OBJECT_SELF ); + NO_ActionCastSpellAtObject( iSpell, OBJECT_SELF ); + //ActionUseTalentOnObject( tSpell, OBJECT_SELF ); + return TRUE; + } + } + if ( iMagic && strMDef.iTotal < 4 ) + { + /* + if ( iSpell = GetBestMagicDefense() ) //can assume acid fog (int val 0) won't be returned here + { + tSpell = TalentSpell( iSpell ); + } + */ + if ( iSpell = GetBestMagicDefenseSelf() ) + //if ( GetIsTalentValid( tSpell ) ) + { + //PrintString( "MD: " + GetName( OBJECT_SELF ) + "(" + IntToString( iSpell ) + ")" ); + //ActionCastSpellAtObject( iSpell, OBJECT_SELF ); + NO_ActionCastSpellAtObject( iSpell, OBJECT_SELF ); + //ActionUseTalentOnObject( tSpell, OBJECT_SELF ); + return TRUE; + } + } + + /* + if ( iSpell = GetBestGenericProtection() ) + { + tSpell = TalentSpell( iSpell ); + } + if ( GetIsTalentValid( tSpell ) ) + { + //ActionCastSpellAtObject( iSpell, OBJECT_SELF ); + ActionUseTalentOnObject( tSpell, OBJECT_SELF ); + return TRUE; + } + */ + return FALSE; +} + +int DoDefendSingle( object oT=OBJECT_INVALID ) +{ + object oD; + int iSpell; + struct sSpellDefStatus strM; + struct sPhysDefStatus strP; + + oD = ( GetIsObjectValid( oT ) ) ? oT : GetLeastDefendedAlly( 20.0 ); + if ( GetIsObjectValid( oD ) ) + { + strM = EvaluateSpellDefenses( oD ); + strP = EvaluatePhysicalDefenses( oD ); + if ( strM.iTotal < strP.iTotal ) + { + if ( iSpell = GetBestMagicDefenseSingle( oD ) ) + { + //PrintString( "DDSM: " + GetName( OBJECT_SELF ) + " -> " + GetName( oD ) + " (" + IntToString( iSpell ) + ")" ); + //ActionCastSpellAtObject( iSpell, oD ); + NO_ActionCastSpellAtObject( iSpell, oD ); + return TRUE; + } + } + else + { + //strP.iTotal <= strM.iTotal + if ( iSpell = GetBestPhysDefenseSingle( oD ) ) + { + //PrintString( "DDSP: " + GetName( OBJECT_SELF ) + " -> " + GetName( oD ) + " (" + IntToString( iSpell ) + ")" ); + //ActionCastSpellAtObject( iSpell, oD ); + NO_ActionCastSpellAtObject( iSpell, oD ); + return TRUE; + } + } + } + return FALSE; +} + +int DoEnhanceSelf() +{ + int iMinLvl = GetHitDice( OBJECT_SELF ); + iMinLvl = iMinLvl > 20 ? 20 : iMinLvl; + iMinLvl = iMinLvl / 3; + int iSpell = GetEnhanceSpellSelf( iMinLvl ); + vector vT, vU; + location lM; + //talent tSpell; + + if ( iSpell ) + { + /* + tSpell = TalentSpell( iSpell ); + if ( GetIsTalentValid( tSpell ) ) + { + ActionUseTalentOnObject( tTest, OBJECT_SELF ); + } + */ + //ActionCastSpellAtObject( iSpell, OBJECT_SELF ); + NO_ActionCastSpellAtObject( iSpell, OBJECT_SELF ); + if ( iSpell == SPELL_INVISIBILITY || iSpell == SPELL_IMPROVED_INVISIBILITY ) + { + //move a bit after casting invisibility on self + if ( VectorMagnitude( vT = GetHostileVector( 10.0 ) ) > 0.0 ) + { + vU = GetPosition( OBJECT_SELF ); + vT = 5.0 * AngleToVector( VectorToAngle( vT ) + 90.0 + IntToFloat( Random( 180 ) ) ); + lM = Location( GetArea( OBJECT_SELF ), vU + vT, VectorToAngle( vT ) ); + DoMoveToLocation( lM, TRUE ); + vT = 5.0 * AngleToVector( VectorToAngle( vT ) - 90.0 + IntToFloat( Random( 180 ) ) ); + lM = Location( GetArea( OBJECT_SELF ), vU + vT, VectorToAngle( vT ) ); + DoMoveToLocation( lM, TRUE ); + } + } + return TRUE; + } + return FALSE; +} + +int DoEnhanceSingle( object oT=OBJECT_INVALID ) +{ + int iMinLvl = GetHitDice( OBJECT_SELF ); + iMinLvl = iMinLvl > 20 ? 20 : iMinLvl; + iMinLvl = iMinLvl / 3; + int iSpell = 0; + vector vT, vU; + location lM; + object oE = ( GetIsObjectValid( oT ) ) ? oT : GetLeastBuffedAlly( 20.0, TRUE ); + + if ( GetIsObjectValid( oE ) ) + { + if ( iSpell = GetEnhanceSpellSingle( iMinLvl, oE ) ) + { + //PrintString( "DES: " + GetName( OBJECT_SELF ) + " -> " + GetName( oE ) + " (" + IntToString( iSpell ) + ")" ); + //ActionCastSpellAtObject( iSpell, oE ); + NO_ActionCastSpellAtObject( iSpell, oE ); + return TRUE; + } + if ( oE == OBJECT_SELF ) + { + if ( iSpell == SPELL_INVISIBILITY || iSpell == SPELL_IMPROVED_INVISIBILITY ) + { + //move a bit after casting invisibility on self + if ( VectorMagnitude( vT = GetHostileVector( 10.0 ) ) > 0.0 ) + { + vU = GetPosition( OBJECT_SELF ); + vT = 5.0 * AngleToVector( VectorToAngle( vT ) + 90.0 + IntToFloat( Random( 180 ) ) ); + lM = Location( GetArea( OBJECT_SELF ), vU + vT, VectorToAngle( vT ) ); + DoMoveToLocation( lM, TRUE ); + vT = 5.0 * AngleToVector( VectorToAngle( vT ) - 90.0 + IntToFloat( Random( 180 ) ) ); + lM = Location( GetArea( OBJECT_SELF ), vU + vT, VectorToAngle( vT ) ); + DoMoveToLocation( lM, TRUE ); + } + } + } + } + return FALSE; +} + +/* +==================== +DoSpellHelp: + +Description: Find the ally with the most hampering effects on them and try to remove them. + +Notes: Problem with this behaviour is that it always looks for most hampered ally. If it can't help that ally then +it will not help anyone. If there are less hampered allies that it could help it will never know because it goes +straight to the most hampered + +Possible fix: First generate full list of possible help it can provide stored as bits and do bitwise AND against +effects on each ally. If there are no matches at all, do not consider them. Store the ally with the most matches +of available help vs hampering effects. Not yet tried. +==================== +*/ +int DoSpellHelp( object oT=OBJECT_INVALID ) +{ + object oHurt; + int iHelp; + + if ( GetHasHelpingAbility() ) + { + oHurt = ( GetIsObjectValid( oT ) ) ? oT : GetMostHamperedAlly( 30.0, OBJECT_SELF, TRUE ); + if ( GetIsObjectValid( oHurt ) ) + { + iHelp = GetBestHelp( oHurt ); + if ( iHelp ) + { + SetLocalObject( oHurt, "HELPER", OBJECT_SELF ); + DelayCommand( 6.0, DeleteLocalObject( oHurt, "HELPER" ) ); + //PrintString( "HELP: " + GetName( OBJECT_SELF ) + " -> " + GetName( oHurt ) + "(" + IntToString( iHelp ) + ")" ); + //ActionCastSpellAtObject( iHelp, oHurt ); + NO_ActionCastSpellAtObject( iHelp, oHurt ); + return TRUE; + } + //PrintString( "HELP: fail " + GetName( OBJECT_SELF ) + " -> " + GetName( oHurt ) ); + } + } + return FALSE; +} + +int DoSpellHeal( object oT=OBJECT_INVALID ) +{ + //original heal code + object oHurt; + int iHeal, iCR; + talent tHeal; + int iMin = 8; + + if ( GetHasHealingAbility() ) + //if ( GetIsTalentValid( GetCreatureTalentBest( TALENT_CATEGORY_BENEFICIAL_HEALING_TOUCH, 20 ) ) ) + { + oHurt = ( GetIsObjectValid( oT ) ) ? oT : GetLowestHPAllyNoHealer( 30.0, iMin, OBJECT_SELF, TRUE ); + if ( GetIsObjectValid( oHurt ) ) + { + /* + // Need to use this hack with talents because GetHasSpell will pick up spontaneous casting ability + // but ActionCastSpell* cannot do the spontaneous casting, which leaves the creature daydreaming + // rather than acting + */ + iHeal = GetBestHeal( oHurt, iMin ); + tHeal = GetTalentSpell( TALENT_CATEGORY_BENEFICIAL_HEALING_TOUCH, iHeal ); + //if ( iHeal ) + if ( GetIsTalentValid( tHeal ) ) + { + //PrintString( "HEAL: " + GetName( OBJECT_SELF ) + " -> " + GetName( oHurt ) + " (" + IntToString( iHeal ) + ")" ); + SetLocalObject( oHurt, "#HEALER", OBJECT_SELF ); + DelayCommand( 6.0, DeleteLocalObject( oHurt, "#HEALER" ) ); + //ActionCastSpellAtObject( iHeal, oHurt ); + //ActionUseTalentOnObject( tHeal, oHurt ); + NO_ActionUseTalentOnObject( tHeal, oHurt ); + return TRUE; + } + } + } + return FALSE; +} + +int DoSpellRaise( object oT=OBJECT_INVALID ) +{ + //original raise code + object oHurt; + int iRaise; + + if ( GetHasRaisingAbility() ) + { + oHurt = ( GetIsObjectValid( oT ) && GetIsDead( oT ) ) ? oT : GetNearestDeadAllyNoRaiser( 30.0, OBJECT_SELF, TRUE ); + if ( GetIsObjectValid( oHurt ) ) + { + iRaise = GetBestRaise( TRUE ); + if ( iRaise ) + { + SetLocalObject( oHurt, "#RAISER", OBJECT_SELF ); + DelayCommand( 6.0, DeleteLocalObject( oHurt, "#RAISER" ) ); + //ActionCastSpellAtObject( iRaise, oHurt ); + NO_ActionCastSpellAtObject( iRaise, oHurt ); + return TRUE; + } + } + } + return FALSE; +} + +int DoSpellBreach( object oT=OBJECT_INVALID ) +{ + int iCnt = 1; + int iSpell = 0; + int iMaxLvl = 0; + int iMaxNum = 0; + struct sSpellDefStatus strMDef; + struct sPhysDefStatus strPDef; + object oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ); + object oTarget = OBJECT_INVALID; + + //add breach check before doing search? + if ( GetIsObjectValid( oT ) ) + { + oTarget = oT; + } + else + { + while ( !GetIsObjectValid( oTarget ) && GetIsObjectValid( oSub ) ) + { + if ( !GetIsDead( oSub ) && !GetIsObjectValid( GetLocalObject( oSub, "BREACHER" ) ) ) + { + strMDef = EvaluateSpellDefenses( oSub ); + strPDef = EvaluatePhysicalDefenses( oSub ); + + if ( strMDef.iTotal + strPDef.iTotal > iMaxLvl ) + { + oTarget = oSub; + iMaxLvl = strMDef.iTotal + strPDef.iTotal; + } + } + oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ); + } + } + + if ( GetIsObjectValid( oTarget ) ) + { + if ( iSpell = GetBestBreach( iMaxLvl ) ) + { + //ActionCastSpellAtObject( iSpell, oTarget ); + NO_ActionCastSpellAtObject( iSpell, oTarget ); + SetLocalObject( oTarget, "BREACHER", OBJECT_SELF ); + DelayCommand( 4.0, DeleteLocalObject( oTarget, "BREACHER" ) ); + return TRUE; + } + } + return FALSE; +} + +int DoSpellDirect( object oT=OBJECT_INVALID ) +{ + int iSpell = -1; + int iMinLvl = 0; + float fRange = 25.0; + object oHurt; + object oTarget; + float fRad; + float fRatio; + location lLoc; + talent tSpell; + + //go for least defended, failing that go for most damaged + //in practice GetLeastMagicDefendedEnemy should always return someone if any + //enemies are visible to caller + if ( GetIsObjectValid( oT ) ) + { + oTarget = oT; + } + else if ( !GetIsObjectValid( oTarget = GetLeastMagicDefendedEnemy( fRange ) ) ) + { + oTarget = GetTarget(); + if ( DoAbilityCheck( ABILITY_INTELLIGENCE, 5) ) + { + oHurt = GetMostDamagedAlly( 20.0, oTarget, TRUE ); + } + if ( GetIsObjectValid( oHurt ) && GetObjectSeen( oHurt, OBJECT_SELF ) ) + { + oTarget = oHurt; + } + } + + //open up spell level selection range + iMinLvl = GetHitDice( oTarget ) / 3; + + //PrintString( GetName( OBJECT_SELF ) + " DS" + IntToString( iMinLvl ) ); + if ( GetIsObjectValid( oTarget ) && GetObjectSeen( oTarget, OBJECT_SELF ) ) + { + iSpell = GetDirectSpell( oTarget, FALSE, iMinLvl ); + } + if ( iSpell > -1 && ( fRad = GetAreaSpellRadius( iSpell ) ) > 0.0 ) + { + //direct spell has radius effect + //this code should be unnecessary now + fRatio = GetFriendFoeRatio( GetLocation( oTarget ), fRad ); + if ( fRatio < GetFriendFoeTolerance() ) + { + iSpell = GetDirectSpell( oTarget, TRUE, iMinLvl ); + } + } + //Testing immunity checks + //result: feh, doesn't work properly, 100% immunity to damage type doesn't count as "immunity". go figure. + //SpeakString( "IT " + GetName( oTarget ) + " " + IntToString( FortitudeSave( oTarget, 1000, SAVING_THROW_TYPE_FIRE ) ) ); + + /* Spell/Talent Issue + if ( iSpell > -1 ) + { + tSpell = TalentSpell( iSpell ); + } + */ + if ( iSpell > -1 ) + { + //ActionCastSpellAtObject( iSpell, oTarget ); + NO_ActionCastSpellAtObject( iSpell, oTarget ); + //ActionUseTalentOnObject( tSpell, oTarget ); + return TRUE; + } + return FALSE; +} + +int DoTouch( object oT=OBJECT_INVALID ) +{ + int iSpell = -1; + int iMinLvl = 0; + float fRange = 20.0; + object oHurt; + object oTarget; + + //go for least defended, failing that go for most damaged + //in practice GetLeastMagicDefendedEnemy should always return someone if any + //enemies are visible to caller + if ( GetIsObjectValid( oT ) ) + { + oTarget = oT; + } + else if ( !GetIsObjectValid( oTarget = GetLeastMagicDefendedEnemy( fRange ) ) ) + { + oTarget = GetTarget(); + if ( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) ) + { + oHurt = GetMostDamagedAlly( 10.0, oTarget, TRUE ); + } + if ( GetIsObjectValid( oHurt ) && GetObjectSeen( oHurt, OBJECT_SELF ) ) + { + oTarget = oHurt; + } + } + + //open up spell level selection range + iMinLvl = GetHitDice( oTarget ) / 3; + + //PrintString( GetName( OBJECT_SELF ) + " TS" + IntToString( iMinLvl ) ); + if ( GetIsObjectValid( oTarget ) && GetObjectSeen( oTarget, OBJECT_SELF ) ) + { + iSpell = GetTouchSpell( oTarget, iMinLvl ); + } + + /* Spell/Talent Issue + if ( iSpell > -1 ) + { + tSpell = TalentSpell( iSpell ); + } + */ + if ( iSpell > -1 ) + { + //ActionCastSpellAtObject( iSpell, oTarget ); + NO_ActionCastSpellAtObject( iSpell, oTarget ); + //ActionUseTalentOnObject( tSpell, oTarget ); + return TRUE; + } + return FALSE; +} + +int DoSpellArea() +{ + int iCnt; + int iMinLvl = 0; + int iSpell = -1; + int iHostiles = GetHostileCount( 40.0 ); + float fRad; + float fRange; + float fRatio; + float fDist; + float fMinSearch = 0.0; + float fMaxSearch; + vector vU; + vector vT; + vector vS; + location lMark; + object oTarget; + object oD; + talent tSpell; + + if ( !iHostiles ) + { + return FALSE; + } + + //estimate average enemy hit dice to get an idea of what spell level range we should consider + iMinLvl = GetSafeAverageEnemyLevel(); + + if ( iHostiles == 1 ) + { + oTarget = GetTarget(); + if ( !GetIsObjectValid( oTarget ) ) + { + return FALSE; + } + else + { + fMaxSearch = GetDistanceBetween( OBJECT_SELF, oTarget ); + iSpell = GetAreaSpell( Vector( 0.0, 0.0, 0.0 ), FALSE, iMinLvl, fMaxSearch ); + if ( iSpell == -1 ) + { + return FALSE; + } + fRad = GetAreaSpellRadius( iSpell ); + vT = GetPosition( oTarget ) - GetPosition( OBJECT_SELF ); + } + } + else if ( iHostiles > 1 ) + { + //fMaxSearch = VectorMagnitude( GetHostileVector( 40.0 ) ); + /* + oD = GetMostDistantEnemy( 40.0 ); + if ( GetIsObjectValid( oD ) ) + { + fMaxSearch = GetDistanceBetween( OBJECT_SELF, oD ); + } + else + { + //apparently no enemies spotted, should be impossible at this point + fMaxSearch = 40.0; + } + */ + fMaxSearch = GetAverageDistanceToEnemy( 40.0 ); + //SpeakString( "ADtE: " + FloatToString( fMaxSearch ) + " AEL: " + IntToString( iMinLvl ) ); + iSpell = GetAreaSpell( Vector( 0.0, 0.0, 0.0 ), FALSE, iMinLvl, fMaxSearch ); + if ( iSpell < 0 ) + { + //SpeakString( "No spell" ); + return FALSE; + } + //SpeakString( "Spell: " + IntToString( iSpell ) ); + fRad = GetAreaSpellRadius( iSpell ); + vT = GetAreaTarget( iSpell, fRad, fMinSearch, fMaxSearch ); + vS = GetAverageEnemySaveInArea( vT, fRad ); + //SpeakString( "AES: " + FloatToString( vS.x ) + " " + FloatToString( vS.y ) + " " + FloatToString( vS.z ) ); + } + + //PrintString( GetName( OBJECT_SELF ) + " AS" + IntToString( iMinLvl ) ); + + fRange = GetSpellRange( iSpell ); + vU = GetPosition( OBJECT_SELF ); + //single target case + if ( iHostiles == 1 ) + { + lMark = GetLocation( OBJECT_SELF ); + if ( GetIsDiscriminantSpell( iSpell ) ) + { + if ( fRange == 0.0 ) + { + //ActionCastSpellAtLocation( iSpell, lMark ); + NO_ActionCastSpellAtLocation( iSpell, lMark ); + } + else + { + //ActionCastSpellAtObject( iSpell, oTarget ); + NO_ActionCastSpellAtObject( iSpell, oTarget ); + } + return TRUE; + } + else + { + if ( fRange == 0.0 ) + { + fRatio = GetFriendFoeRatio( lMark, fRad ); + if ( fRatio < GetFriendFoeTolerance() ) + { + iSpell = GetAreaSpell( Vector( 0.0, 0.0, 0.0 ), TRUE, iMinLvl, fMaxSearch ); + if ( iSpell < 0 ) + { + //fRatio not acceptable, no discriminant spells + return FALSE; + } + } + //either fRatio is okay or we have a discriminant spell + fRange = GetSpellRange( iSpell ); + if ( fRange == 0.0 ) + { + //ActionCastSpellAtLocation( iSpell, lMark ); + NO_ActionCastSpellAtLocation( iSpell, lMark ); + } + else + { + //ActionCastSpellAtObject( iSpell, oTarget ); + NO_ActionCastSpellAtObject( iSpell, oTarget ); + } + return TRUE; + } + fRatio = GetFriendFoeRatio( GetLocation( oTarget ), fRad ); + if ( fRatio < GetFriendFoeTolerance() ) + { + iSpell = GetAreaSpell( Vector( 0.0, 0.0, 0.0 ), TRUE, iMinLvl, fMaxSearch ); + if ( iSpell < 0 ) + { + return FALSE; + } + } + //either fRatio is okay or we have a discriminant spell + fRange = GetSpellRange( iSpell ); + if ( fRange == 0.0 ) + { + //ActionCastSpellAtLocation( iSpell, lMark ); + NO_ActionCastSpellAtLocation( iSpell, lMark ); + } + else + { + //ActionCastSpellAtObject( iSpell, oTarget ); + NO_ActionCastSpellAtObject( iSpell, oTarget ); + } + return TRUE; + } + } + //multiple target case + if ( iHostiles > 1 ) + { + //PrintString( "AREA: " + GetName( OBJECT_SELF ) + FloatToString( fMaxSearch ) ); + if ( VectorMagnitude( vT ) == 0.0 ) + { + //SpeakString( "No target" ); + return FALSE; + } + /* + if ( 5 - GetAbilityModifier( ABILITY_INTELLIGENCE ) > 0 ) + { + lMark = Location( GetArea( OBJECT_SELF ), + vU + vT + VectorNormalize( AngleToVector( IntToFloat( Random( 360 ) ) ) ) * IntToFloat( Random( 5 - GetAbilityModifier( ABILITY_INTELLIGENCE ) ) ), + GetFacing( OBJECT_SELF ) ); + } + else + { + lMark = Location( GetArea( OBJECT_SELF ), vU + vT, GetFacing( OBJECT_SELF ) ); + } + */ + lMark = Location( GetArea( OBJECT_SELF ), vU + vT, VectorToAngle( vT ) ); + //SpeakString( GetName( OBJECT_SELF ) + " AS(" + IntToString( iSpell ) + ")" ); + if ( !GetIsDiscriminantSpell( iSpell ) ) + { + fRatio = GetFriendFoeRatio( lMark, fRad ); + //SpeakString( "AS FFR" + FloatToString( fRatio ) ); + if ( fRatio < GetFriendFoeTolerance() ) + { + iSpell = GetAreaSpell( Vector( 0.0, 0.0, 0.0 ), TRUE, iMinLvl, fMaxSearch ); //get discriminant area spell if possible + if ( iSpell < 0 ) + { + //SpeakString( GetName( OBJECT_SELF ) + " !iDisc " + FloatToString( fRatio ) ); + return FALSE; + } + //PrintString( GetName( OBJECT_SELF ) + " iDisc " + FloatToString( fRatio ) ); + } + else + { + //SpeakString( GetName( OBJECT_SELF ) + " FFOK " + FloatToString( fRatio ) ); + } + } + //either friendfoe ratio is acceptable or we have a discriminant spell + //if the spell is lightning or chain lightning target it at nearest creature + //do this sometimes with delayed blast fireball + if ( iSpell == SPELL_LIGHTNING_BOLT || iSpell == SPELL_CHAIN_LIGHTNING || iSpell == SPELL_GEDLEES_ELECTRIC_LOOP ) + { + oTarget = GetFirstObjectInShape( SHAPE_SPHERE, fRad, lMark ); + while ( GetIsObjectValid( oTarget ) ) + { + if ( GetObjectType( oTarget ) == OBJECT_TYPE_CREATURE || GetIsPC( oTarget ) ) + { + if ( GetObjectSeen( oTarget ) && !GetIsDead( oTarget ) && GetIsEnemy( oTarget ) ) + { + //PrintString( "AS LCL " + GetName( oTarget ) ); + break; + } + } + oTarget = GetNextObjectInShape( SHAPE_SPHERE, fRad, lMark ); + } + if ( GetIsObjectValid( oTarget ) ) //should always be valid + { + //PrintString( "AS CL" + GetName( oTarget ) ); + //ActionCastSpellAtObject( iSpell, oTarget ); + NO_ActionCastSpellAtObject( iSpell, oTarget ); + return TRUE; + } + } + //don't cast an area spell right next to myself + //maybe later add something to see if I am immune to the spell + //and cast anyway if so + //Spells with range of 0 should be okay to cast + else if ( GetIsDiscriminantSpell( iSpell ) || + ( GetSpellRange( iSpell ) > 0.0 && VectorMagnitude( vT ) > fRad ) || GetSpellRange( iSpell ) == 0.0 || + IsCone( iSpell ) ) + { + //ActionCastSpellAtLocation( iSpell, lMark ); + NO_ActionCastSpellAtLocation( iSpell, lMark ); + return TRUE; + } + } + return FALSE; +} + +int DoSpellSummon() +{ + int iMinLvl = GetAverageEnemyLevel(); + int iSpell = GetSummonSpell( iMinLvl ); + int iA; + vector vT, vA; + object oTarget = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, 1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + + if ( iSpell && !GetLocalInt( OBJECT_SELF, "#SUMMONDEL" ) && !GetIsObjectValid( GetAssociate( ASSOCIATE_TYPE_SUMMONED ) ) ) + { + /* + vT = AngleToVector( GetFacing( OBJECT_SELF ) - 90.0 + IntToFloat( Random( 180 ) ) ); + //testing addition to stop summoning creatures into AOEs + if ( GetAOECount( 10.0 ) ) + { + vT = GetAOEVector( 10.0 ); + vT *= -1.0; + } + //end test code + vT = 3.0 * VectorNormalize( vT ); + vT = GetPosition( OBJECT_SELF ) + vT; + ActionCastSpellAtLocation( iSpell, Location( GetArea( OBJECT_SELF ), vT, GetFacing( OBJECT_SELF ) ) ); + */ + //ActionCastSpellAtLocation( iSpell, GetLocation( OBJECT_SELF ) ); + NO_ActionCastSpellAtLocation( iSpell, GetLocation( OBJECT_SELF ) ); + SetLocalInt( OBJECT_SELF, "#SUMMONDEL", 1 ); + DelayCommand( 6.0, DeleteLocalInt( OBJECT_SELF, "#SUMMONDEL" ) ); + DelayCommand( 6.0, SpeakString( "BC_FIGHTING", TALKVOLUME_SILENT_TALK ) ); + return TRUE; + } + return FALSE; +} + +int DoSpellCharm() +{ + //included in DoSpellDirect() + return FALSE; +} + +int DoFeatEnhance() +{ + //NOTE: should be okay to rely on enhance feats to be non-zero as Alertness should never be returned + int iFeat = GetEnhanceFeat(); + + if ( iFeat ) + { + ActionUseFeat( iFeat, OBJECT_SELF ); + return TRUE; + } + return FALSE; +} + +int DoDragonFlight() +{ + //unused due to lack of re-entry animation + /* + int iCnt = 1; + object oTarget = OBJECT_INVALID; + + if ( GetLocalInt( OBJECT_SELF, "FLIER" ) && GetHostileCount() > 3 ) + { + oTarget = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ); + while ( GetIsObjectValid( oTarget ) ) + { + if ( Random( 5 ) && GetDistanceBetween( OBJECT_SELF, oTarget ) > 10.0 ) + { + break; + } + oTarget = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ); + } + if ( GetIsObjectValid( oTarget ) ) + { + DoMoveToObject( oTarget ); + return TRUE; + } + } + */ + return FALSE; +} + +/* +int DoAvoidMelee() +{ + vector vT; + location lLoc; + + //don't bother if we have time stop + if ( GetHasSpellEffect( SPELL_TIME_STOP ) ) + { + return FALSE; + } + + //if ( GetAttackerCount( 5.0 ) ) + if ( GetHostileCount( 5.0 ) ) + { + vT = GetHostileEvacVector( GetHostileVector( 15.0 ) ); + if ( VectorMagnitude( vT ) > 5.0 ) + { + SetLocalLocation( OBJECT_SELF, "#LASTHOTSPOT", GetLocation( OBJECT_SELF ) ); + SetLocalFloat( OBJECT_SELF, "#LASTAMANGLE", VectorToAngle( vT ) ); + vT = GetPosition( OBJECT_SELF ) - vT; + lLoc = Location( GetArea( OBJECT_SELF ), vT, VectorToAngle( vT ) ); + DoMoveToLocation( lLoc, TRUE ); + return TRUE; + } + } + return FALSE; +} +*/ +int DoAvoidMelee() +{ + vector vT; + location lD; + + if ( GetHasSpellEffect( SPELL_TIME_STOP, OBJECT_SELF ) == TRUE ) + { + //don't bother if we have time stop, dish out some pain instead + return FALSE; + } + + if ( GetHostileCount( 5.0 ) ) + { + vT = ( -1.0 * ( 10.0 + IntToFloat( Random( 20 ) ) ) ) * VectorNormalize( GetHostileVector( 20.0 ) ); + lD = Location( GetArea( OBJECT_SELF ), vT + GetPosition( OBJECT_SELF ), VectorToAngle( vT ) ); + if ( GetLocalInt( OBJECT_SELF, "#LASTDEST" ) ) + { + if ( GetDistanceBetweenLocations( GetLocalLocation( OBJECT_SELF, "#LASTDEST" ), GetLocation( OBJECT_SELF ) ) < 5.0 ) + { + //close enough to target location + DeleteLocalInt( OBJECT_SELF, "#LASTDEST" ); + DeleteLocalLocation( OBJECT_SELF, "#LASTDEST" ); + } + else if ( GetDistanceBetweenLocations( GetLocalLocation( OBJECT_SELF, "#LASTDEST" ), GetLocation( OBJECT_SELF ) ) > 5.0 ) + { + //didn't make it close enough to our last desired location for some reason + vT = ( 10.0 + IntToFloat( Random( 20 ) ) ) * VectorNormalize( AngleToVector( VectorToAngle( vT ) - 90.0 + 180 * IntToFloat( Random( 2 ) ) ) ); + lD = Location( GetArea( OBJECT_SELF ), vT + GetPosition( OBJECT_SELF ), VectorToAngle( vT ) ); + } + } + SetLocalInt( OBJECT_SELF, "#LASTDEST", 1 ); + SetLocalLocation( OBJECT_SELF, "#LASTDEST", lD ); + DoMoveToLocation( lD, TRUE ); + /*XXX this queueing now handled by main combat loop + ActionDoCommand( DelayCommand( 1.0, DoCombat() ) ); + */ + return TRUE; + } + return FALSE; +} + +int DoTimeStop() +{ + int iEnemy = GetHostileCount( 40.0f ); + + if ( iEnemy ) + { + if ( GetHasSpell( SPELL_TIME_STOP ) && !GetHasSpellEffect( SPELL_TIME_STOP ) ) + { + //ActionCastSpellAtObject( SPELL_TIME_STOP, OBJECT_SELF ); + NO_ActionCastSpellAtObject( SPELL_TIME_STOP, OBJECT_SELF ); + return TRUE; + } + } + return FALSE; +} + +int DoVision() +{ + object oS; + int iCnt = 1; + int iSpell = 0; + + if ( !GetHasVisionSpells() ) + { + return FALSE; + } + + oS = GetVisionDeprived( 20.0 ); + if ( GetIsObjectValid( oS ) ) + { + iSpell = GetVisionSpellNeeded( oS ); + if ( iSpell ) + { + //oS should be creature that needs vision, iSpell is the spell needed + SetLocalObject( oS, "#VISION", OBJECT_SELF ); + DelayCommand( 6.0, DeleteLocalObject( oS, "#VISION" ) ); + //ActionCastSpellAtObject( iSpell, oS ); + NO_ActionCastSpellAtObject( iSpell, oS ); + return TRUE; + } + } + return FALSE; +} + +int DoBreathWeapon() +{ + int iSpell = GetBreathWeapon(); + int iHostiles; + float fRad = RADIUS_SIZE_LARGE; + float fMinSearch = 2.5; + float fMaxSearch = fRad; + vector vT; + object oT; + location lMark; + int iMeta= METAMAGIC_ANY; + int iCheat = TRUE; + + if ( iSpell && GetLocalInt( OBJECT_SELF, "#BDEL" ) == 0 ) + { + iHostiles = GetHostileCount( 50.0 ); + if ( iHostiles == 1 ) + { + //we have a breath weapon ready to go, single target + oT = GetTarget(); + if ( oT != OBJECT_INVALID ) + { + //ActionCastSpellAtObject( iSpell, oT, iMeta, iCheat ); + NO_ActionCastSpellAtObject( iSpell, oT, iMeta, iCheat, 0, PROJECTILE_PATH_TYPE_DEFAULT, FALSE, FALSE ); + SetLocalInt( OBJECT_SELF, "#BDEL", 1 ); + DelayCommand( RoundsToSeconds( d4() ), DeleteLocalInt( OBJECT_SELF, "#BDEL" ) ); + return TRUE; + } + } + else if ( iHostiles > 1 ) + { + //we have a breath weapon ready to go, multiple targets + vT = GetAreaTarget( iSpell, fRad, fMinSearch, fMaxSearch ); + if ( VectorMagnitude( vT ) > 0.0 ) + { + lMark = Location( GetArea( OBJECT_SELF ), GetPosition( OBJECT_SELF ) + vT, GetFacing( OBJECT_SELF ) ); + //ActionCastSpellAtLocation( iSpell, lMark ); + NO_ActionCastSpellAtLocation( iSpell, lMark, iMeta, iCheat, PROJECTILE_PATH_TYPE_DEFAULT, FALSE, FALSE ); + SetLocalInt( OBJECT_SELF, "#BDEL", 1 ); + DelayCommand( RoundsToSeconds( d4() ), DeleteLocalInt( OBJECT_SELF, "#BDEL" ) ); + return TRUE; + } + } + } + return FALSE; +} + +int DoTurning() +{ + int iTurn = GetHasFeat( FEAT_TURN_UNDEAD ); + vector vT = Vector( 0.0, 0.0, 0.0 ); + location lLoc; + + if ( !iTurn ) + { + return FALSE; + } + + vT = GetTurningVector(); + if ( VectorMagnitude( vT ) > 0.0 ) + { + vT = GetPosition( OBJECT_SELF ) + vT; + lLoc = Location( GetArea( OBJECT_SELF ), vT, VectorToAngle( vT ) ); + DoMoveToLocation( lLoc, TRUE ); + ActionUseFeat( FEAT_TURN_UNDEAD, OBJECT_SELF ); + return TRUE; + } + return FALSE; +} + +int DoSpellCone() +{ + //moving this over to DoSpellArea() + /* + object oT; + int iSpell, iMinLvl; + float fRad = 10.0; + vector vT, vU, vX; + location lLoc, lMove; + + if ( GetIsObjectValid( oT = GetTarget() ) ) + { + iMinLvl = GetAverageEnemyLevel() / 3; + } + + if ( iSpell = GetConeSpell( iMinLvl ) ) + { + vU = GetPosition( OBJECT_SELF ); + vT = GetAreaTarget( iSpell, fRad ); + if ( VectorMagnitude( vT ) > 0.0 ) + { + //extend slightly past center of area + vT = vT + 2.5 * VectorNormalize( vT ); + lLoc = Location( GetArea( OBJECT_SELF ), vU + vT, VectorToAngle( vT ) ); + ActionCastSpellAtLocation( iSpell, lLoc ); + return TRUE; + } + } + */ + return FALSE; +} + +int DoHealSelf() +{ + //Testing via talents, having to go via random seems kind of wasteful + //Look for another way to do this + int iHeal; + int iHealTalent; + int iCR; + int iFeat; + int iDam; + int iP; + int iLimit = 0; + talent tHeal, tP; + object oP, oHeal, oHealer; + event evHeal; + + oHealer = GetLocalObject( OBJECT_SELF, "#HEALER" ); + if ( GetIsObjectValid( oHealer ) ) + { + if ( GetDistanceBetween( OBJECT_SELF, oHealer ) < 10.0 ) + { + //got a healer who is close, don't double up, healing is on the way + return FALSE; + } + } + + iDam = GetMaxHitPoints() - GetCurrentHitPoints(); + if ( iDam == 0 ) + { + return FALSE; + } + //see if wholeness of body is an option + if ( GetHasFeat( FEAT_WHOLENESS_OF_BODY ) ) + { + iFeat = FEAT_WHOLENESS_OF_BODY; + if ( iDam < GetLevelByClass( CLASS_TYPE_MONK ) * 2 ) + { + iFeat = 0; + } + } + + //iCR = 20; + iCR = 10; + iHealTalent = 0; + if ( GetRacialType( OBJECT_SELF ) != RACIAL_TYPE_UNDEAD ) //undead do not use healing potions + { + //while ( iCR && GetIsTalentValid( tP = GetCreatureTalentBest( TALENT_CATEGORY_BENEFICIAL_HEALING_POTION, iCR-- ) ) ) + while ( iCR-- && GetIsTalentValid( tP = GetCreatureTalentRandom( TALENT_CATEGORY_BENEFICIAL_HEALING_POTION ) ) ) + { + if ( iP = GetTalentPotionHealAmount( tP ) ) + { + if ( iP > iHealTalent && iP < iDam ) + { + tHeal = tP; + iHealTalent = iP; + } + } + } + } + if ( iFeat ) + { + ActionUseFeat( iFeat, OBJECT_SELF ); + SetLocalObject( OBJECT_SELF, "#HEALER", OBJECT_SELF ); + DelayCommand( 4.0, DeleteLocalObject( OBJECT_SELF, "#HEALER" ) ); + return TRUE; + } + if ( iHealTalent && GetIsTalentValid( tHeal ) ) + { + ActionUseTalentOnObject( tHeal, OBJECT_SELF ); + SetLocalObject( OBJECT_SELF, "#HEALER", OBJECT_SELF ); + DelayCommand( 4.0, DeleteLocalObject( OBJECT_SELF, "#HEALER" ) ); + return TRUE; + } + return FALSE; +} + +int DoSpellGroupEnhance() +{ + int iSpell, iMinLvl; + float fRad = 0.0; + vector vT, vU, vX; + location lLoc, lMove; + object oT; + + if ( GetIsObjectValid( oT = GetTarget() ) ) + { + iMinLvl = GetAverageEnemyLevel() / 3; + } + + //try feats first + if ( iSpell = GetGroupEnhanceFeat() ) + { + fRad = GetGroupEnhanceFeatRadius( iSpell ); + vU = GetPosition( OBJECT_SELF ); + vT = GetFriendlyAreaTarget( fRad, iSpell, 1 ); + if ( VectorMagnitude( vT ) > 0.0 ) + { + lLoc = Location( GetArea( OBJECT_SELF ), vU + vT, VectorToAngle( vT ) ); + DoMoveToLocation( lLoc, TRUE ); + ActionUseFeat( iSpell, OBJECT_SELF ); + return TRUE; + } + } + //then spells + if ( iSpell = GetGroupEnhanceSpell( iMinLvl ) ) + { + fRad = GetGroupEnhanceSpellRadius( iSpell ); + vU = GetPosition( OBJECT_SELF ); + vT = GetFriendlyAreaTarget( fRad, iSpell ); + if ( VectorMagnitude( vT ) > 0.0 ) + { + lLoc = Location( GetArea( OBJECT_SELF ), vU + vT, VectorToAngle( vT ) ); + //ActionCastSpellAtLocation( iSpell, lLoc ); + NO_ActionCastSpellAtLocation( iSpell, lLoc ); + return TRUE; + } + } + return FALSE; +} + +int DoSpellGroupHeal() +{ + int iSpell, iMinLvl, iHeal; + float fRad = 0.0; + vector vT, vU, vX; + location lLoc, lMove; + float fDam; + object oT; + + if ( GetIsObjectValid( oT = GetTarget() ) ) + { + iMinLvl = GetAverageEnemyLevel() / 3; + } + + if ( iSpell = GetGroupHealSpell( iMinLvl ) ) + { + iHeal = GetGroupHealSpellAmount( iSpell ); + fRad = GetGroupHealSpellRadius( iSpell ); + vU = GetPosition( OBJECT_SELF ); + vT = GetAreaHealTarget( fRad, iHeal ); + lLoc = Location( GetArea( OBJECT_SELF ), vU + vT, VectorToAngle( vT ) ); + fDam = GetAllyDamageStats( lLoc, fRad ); + if ( VectorMagnitude( vT ) > 0.0 && IntToFloat( iHeal ) < fDam ) + { + //ActionCastSpellAtLocation( iSpell, lLoc ); + NO_ActionCastSpellAtLocation( iSpell, lLoc ); + return TRUE; + } + } + return FALSE; +} + +int DoDispelPersAOE() +{ + vector vT, vU; + location lT; + int iD; + + if ( ( iD = GetDispelSpell() ) == -1 ) + { + //no dispel capability available + return FALSE; + } + + if ( GetHostileAOECount( 30.0 ) ) + { + vU = GetPosition( OBJECT_SELF ); + vT = GetHostileAOEVector( 30.0 ); + lT = Location( GetArea( OBJECT_SELF ), vU + vT, VectorToAngle( vT ) ); + //ActionCastSpellAtLocation( iD, lT ); + NO_ActionCastSpellAtLocation( iD, lT ); + return TRUE; + } + return FALSE; +} + +int DoDispelSingle() +{ + object oTarget; + int iAverage = 0; + int iSpell = 0; + int iCL = GetMaxDispelCasterLevel(); + + if ( GetIsObjectValid( oTarget = GetMostBuffedEnemy( 30.0 ) ) ) + { + iAverage = GetAverageEffectCasterLevel( oTarget ); + if ( ( iSpell = GetBestDispel( iAverage, iCL ) ) ) + { + //PrintString( "DISPEL: " + GetName( OBJECT_SELF ) + " " + IntToString( iSpell ) + " " + GetName( oTarget ) ); + //ActionCastSpellAtObject( iSpell, oTarget ); + NO_ActionCastSpellAtObject( iSpell, oTarget ); + return TRUE; + } + } + return FALSE; +} + +int DoDismissal() +{ + int iSpell; + float fRad = RADIUS_SIZE_COLOSSAL; + object oT; + vector vT; + location lT; + + //banishment and dismissal is next optimal choices for enemy summons + iSpell = GetHasSpell( SPELL_BANISHMENT, OBJECT_SELF ) ? SPELL_BANISHMENT : SPELL_DISMISSAL; + if ( GetHasSpell( iSpell, OBJECT_SELF ) ) + { + vT = GetEnemySummonedAssociatesVector( fRad ); + if ( VectorMagnitude( vT ) > 0.0 ) + { + lT = Location( GetArea( OBJECT_SELF ), GetPosition( OBJECT_SELF ) + vT, VectorToAngle( vT ) ); + //ActionCastSpellAtLocation( iSpell, lT ); + NO_ActionCastSpellAtLocation( iSpell, lT ); + return TRUE; + } + } + //next check is to look for Outsiders and Elementals and clear them out with Word of Faith + //this will pick up against summoned and non-summoned planars + iSpell = SPELL_WORD_OF_FAITH; + if ( GetHasSpell( iSpell, OBJECT_SELF ) ) + { + vT = GetEnemyPlanarVector( fRad ); + if ( VectorMagnitude( vT ) > 0.0 ) + { + lT = Location( GetArea( OBJECT_SELF ), GetPosition( OBJECT_SELF ) + vT, VectorToAngle( vT ) ); + //ActionCastSpellAtLocation( iSpell, lT ); + NO_ActionCastSpellAtLocation( iSpell, lT ); + return TRUE; + } + } + //no dismissal, look for a summoned associate owner to use dispel magic on if we have it + if ( iSpell = GetDispelSpell() ) + { + //we have a dispel + if ( GetIsObjectValid( oT = GetStrongestEnemySummonedAssociateOwner( 30.0 ) ) ) + { + //ActionCastSpellAtObject( iSpell, oT ); + NO_ActionCastSpellAtObject( iSpell, oT ); + return TRUE; + } + } + return FALSE; +} + +int DoFastBuffs() +{ + int iSpell = 0; + int iCnt; + + if ( !GetLocalInt( OBJECT_SELF, "#FASTBUFFER" ) || GetLocalInt( OBJECT_SELF, "#FASTBUFFED" ) ) + { + return FALSE; + } + + iCnt = GenerateFastBuffList(); + + while ( iCnt ) + { + iSpell = GetLocalInt( OBJECT_SELF, "#SPL_FB" + IntToString( iCnt ) ); + ActionCastSpellAtObject( iSpell, OBJECT_SELF, METAMAGIC_ANY, FALSE, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE ); + DeleteLocalInt( OBJECT_SELF, "#SPL_FB" + IntToString( iCnt-- ) ); + } + + if ( iSpell ) + { + return TRUE; + } + return FALSE; +} + +/* +int DoFlee() +{ + vector vT; + location lLoc; + + //if we have time stop running use the time to flee + + //if ( GetAttackerCount( 5.0 ) ) + if ( GetHostileCount( 5.0 ) ) + { + vT = GetHostileEvacVector( GetHostileVector( 15.0 ) ); + if ( VectorMagnitude( vT ) > 5.0 ) + { + SetLocalLocation( OBJECT_SELF, "#LASTHOTSPOT", GetLocation( OBJECT_SELF ) ); + SetLocalFloat( OBJECT_SELF, "#LASTAMANGLE", VectorToAngle( vT ) ); + vT = GetPosition( OBJECT_SELF ) - vT; + lLoc = Location( GetArea( OBJECT_SELF ), vT, VectorToAngle( vT ) ); + DoMoveToLocation( lLoc, TRUE ); + return TRUE; + } + } + return FALSE; +} +*/ + +int DoMeleeAssist() +{ + object oF, oE, oT, oTarget; + int iCnt1, iCnt2, iF, iE, iChat, iSpecial; + float fAssistRange = 30.0; + float fMeleeRange = 3.0; + float fRatio, fT, fDist, fDistMin; + + oT = OBJECT_INVALID; + fT = 1.0; + //look for a friend who needs assistance in melee + iCnt1 = 0; + oF = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, ++iCnt1, CREATURE_TYPE_IS_ALIVE, TRUE ); + while ( GetIsObjectValid( oF ) && GetDistanceBetween( OBJECT_SELF, oF ) < fAssistRange ) + { + if ( GetObjectSeen( oF ) || GetObjectHeard( oF ) ) + { + iF = GetHitDice( oF ) + GetAllyHD( fMeleeRange, oF ); + iE = GetHostileHD( fMeleeRange, oF ); + fRatio = IntToFloat( iE ) / IntToFloat( iF ); + if ( fRatio > fT ) + { + fT = fRatio; + oT = oF; + } + } + oF = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, ++iCnt1, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + + if ( GetIsObjectValid( oT ) ) + { + //found a friend in trouble, stored highest enemy concentration to aid friend + //should be closest friend in a given melee + //get nearest enemy fighting friend + fDistMin = 100.0; + iCnt1 = 0; + oTarget = OBJECT_INVALID; + oE = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oT, ++iCnt1, CREATURE_TYPE_IS_ALIVE, TRUE ); + while ( GetIsObjectValid( oE ) ) + { + if ( GetObjectSeen( oE ) || GetObjectHeard( oE ) ) + { + if ( ( fDist = GetDistanceBetween( OBJECT_SELF, oE ) ) < fDistMin ) + { + oTarget = oE; + fDistMin = fDist; + } + } + oE = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oT, ++iCnt1, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + //should now have a valid enemy to target, closest to me in target group + if ( GetIsObjectValid( oTarget ) ) + { + //SpeakString( "Assisting " + GetName( oT ) ); + DoEquipMelee( oTarget ); + DoVoiceChat( NO_VC_MELEEASSIST ); + if ( iSpecial = GetBestMeleeSpecial( oTarget ) ) + { + //use special attack type + ActionUseFeat( iSpecial, oTarget ); + } + else + { + ActionAttack( oTarget ); + } + return TRUE; + } + } + + //either nobody needs help or I couldn't find a target + return FALSE; +} + +int DoFlank( object oE=OBJECT_INVALID ) +{ + object oF = OBJECT_INVALID; + location lL = GetLocation( OBJECT_SELF ); + int iCnt = 0; + + if ( GetIsObjectValid( oE ) ) + { + oF = oE; + } + else + { + oE = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, ++iCnt, CREATURE_TYPE_IS_ALIVE, TRUE ); + while ( GetIsObjectValid( oE ) && !GetIsObjectValid( oF ) ) + { + if ( GetObjectSeen( oE, OBJECT_SELF ) || GetObjectHeard( oE, OBJECT_SELF ) ) + { + if ( GetDistanceBetween( oE, OBJECT_SELF ) > 10.0 ) + { + //enemy is seen or heard and more than 10.0 away, flank it + oF = oE; + } + else + { + //creature is within minimum range, abort flank + break; + } + } + oE = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, ++iCnt, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + } + if ( GetIsObjectValid( oF ) ) + { + lL = GetFlankLoc( oF, lL ); + DoMoveToLocation( lL, TRUE ); + /*XXX + ActionDoCommand( DelayCommand( 1.0, DoCombat() ) ); + */ + return TRUE; + } + return FALSE; +} + +int DoMindBlast() +{ + vector vT; + object oT; + int iSpell = -69; + int iEnemies = GetHostileCount( 40.0 ); + int iEff; + float fRad = 15.0; + float fMinSrch = 0.0; + float fMaxSrch = 30.0; + location lMark; + + if ( iEnemies == 1 ) + { + oT = GetTarget(); + if ( GetIsObjectValid( oT ) ) + { + iEff = GetEffectsOnObject( oT ); + if ( ( iEff & NO_EFFECT_STUNNED ) + ( iEff & NO_EFFECT_PARALYZE ) + ( iEff & NO_EFFECT_DAZED ) == 0 ) + { + //target not stunned, paralyzed or dazed + //should switch to direct targetting once function is available + //ActionMindBlast( oT, GetLocation( oT ) ); + //ActionCastSpellAtObject( 1522, oT, METAMAGIC_ANY, TRUE ); + ActionCastSpellAtObject( CODI_MIND_BLAST, oT, METAMAGIC_ANY, TRUE ); + return TRUE; + } + } + } + else if ( iEnemies > 1 ) + { + vT = GetAreaTarget( iSpell, fRad, fMinSrch, fMaxSrch ); + if ( VectorMagnitude( vT ) > 0.0 ) + { + lMark = Location( GetArea( OBJECT_SELF ), GetPosition( OBJECT_SELF ) + vT, VectorToAngle( vT ) ); + //ActionMindBlast( OBJECT_INVALID, lMark ); + //ActionCastSpellAtLocation( 1522, lMark, METAMAGIC_ANY, TRUE ); + ActionCastSpellAtLocation( CODI_MIND_BLAST, lMark, METAMAGIC_ANY, TRUE ); + return TRUE; + } + } + return FALSE; +} + +int DoBrainExtraction() +{ + float fScanRange = 30.0; + float fImmRange = 10.0; + object oT = GetNearestAddledEnemyNoExtractor( fScanRange ); + int iCnt = 0; + int iC = 0; + int iH = 0; + int iEff; + int iDo = TRUE; + + if ( !GetIsObjectValid( oT ) ) + { + //look for non-petrified enemy close by + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, ++iCnt, CREATURE_TYPE_IS_ALIVE, TRUE, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ); + while ( GetIsObjectValid( oT ) && GetDistanceBetween( OBJECT_SELF, oT ) < fImmRange ) + { + if ( IsBrainExtractable( oT ) ) + { + break; + } + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, ++iCnt, CREATURE_TYPE_IS_ALIVE, TRUE, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ); + } + //double check we aren't looking at a petrified enemy + if ( GetIsObjectValid( oT ) ) + { + if ( !IsBrainExtractable( oT ) ) + { + oT = OBJECT_INVALID; + } + } + //see if we have decent chances of extracting + if ( GetIsObjectValid( oT ) ) + { + iDo = FALSE; + int iAttNorm = GetCreatureAttackBonus( OBJECT_SELF ); + int iDefAC = GetAC( oT ) - 10; + if ( iAttNorm > iDefAC ) + { + int iAttGrap = GetGrappleBonus( OBJECT_SELF ); + int iDefGrap = GetGrappleBonus( oT ); + if ( iAttGrap > iDefGrap ) + { + //we will probably hit and probably win a grapple + iDo = TRUE; + } + } + } + } + if ( GetIsObjectValid( oT ) && iDo ) + { + //got a target, go for the brains + SetLocalInt( oT, "#EXTRACTING", 1 ); + DelayCommand( 12.0, DeleteLocalInt( oT, "#EXTRACTING" ) ); //death redundancy + if ( GetDistanceBetween( OBJECT_SELF, oT ) > 10.0 ) + { + DoMoveToObject( oT, TRUE, 2.1 ); + } + //ActionHeadSuck( oT ); + //ActionCastSpellAtObject( 1523, oT, METAMAGIC_ANY, TRUE ); + ActionCastSpellAtObject( CODI_BRAIN_EXTRACT, oT, METAMAGIC_ANY, TRUE ); + ActionDoCommand( DeleteLocalInt( oT, "#EXTRACTING" ) ); + return TRUE; + } + return FALSE; +} + +int DoAvoidEnemies() +{ + object oE = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, 1, CREATURE_TYPE_IS_ALIVE, TRUE, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ); + vector vE; + vector vT; + location lL; + + if ( GetIsObjectValid( oE ) && GetDistanceBetween( OBJECT_SELF, oE ) < 15.0 ) + { + vE = GetHostileVector( 20.0 ); + vT = -10.0 * VectorNormalize( vE ); + lL = Location( GetArea( OBJECT_SELF ), GetPosition( OBJECT_SELF ) + vT, VectorToAngle( vT ) ); + DoMoveToLocation( lL, TRUE ); + /*XXX + ActionDoCommand( DelayCommand( 1.0, DoCombat() ) ); + */ + return TRUE; + } + else + { + vE = GetHostileVector( 20.0 ); + if ( VectorMagnitude( vE ) > 0.0 ) + { + vT = -10.0 * VectorNormalize( vE ); + } + else + { + vT = 5.0 * VectorNormalize( AngleToVector( IntToFloat( Random( 360 ) ) ) ); + } + lL = Location( GetArea( OBJECT_SELF ), GetPosition( OBJECT_SELF ) + vT, VectorToAngle( vT ) ); + DoMoveToLocation( lL, TRUE ); + /*XXX + ActionDoCommand( DelayCommand( 1.0, DoCombat() ) ); + */ + return TRUE; + } + //should never get down here + return FALSE; +} + +int DoGrenade() +{ + return FALSE; +} + +int DoBeholderRays() +{ + float fM = GetFacing( OBJECT_SELF ); + float fH; + float fS = 5.5 / BEHOLDER_MAX_RAYS; + int iRep = 95; //chance to use multiple rays on one target if enemies < rays + int iH = GetHostileCount( 40.0 ); + int iC = 0; + int iQ1 = 0; + int iQ2 = 0; + int iQ3 = 0; + int iQ4 = 0; + int iR = 0; + int iS; + int iM; + object oT; + + InitializeBeholderRaySelection(); + + if ( GetHasSpellEffect( SPELL_HASTE, OBJECT_SELF ) || GetHasSpellEffect( SPELL_MASS_HASTE, OBJECT_SELF ) && GetHasFeatEffect( FEAT_EPIC_BLINDING_SPEED, OBJECT_SELF ) ) + { + fS *= 0.5; + } + + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, ++iC, CREATURE_TYPE_IS_ALIVE, TRUE ); + while ( iC <= iH && iR < BEHOLDER_MAX_RAYS ) + { + iM = TRUE; //default is that we will not target multiple rays at individual targets + if ( GetIsObjectValid( oT ) == FALSE ) + { + //run out of targets unexpectedly + break; + } + else if ( GetIsPerceived( oT, NO_PERCEPTION_SEEN ) == FALSE && GetIsPerceived( oT, NO_PERCEPTION_HEARD ) == FALSE ) + { + //can't see or hear this creature, ignore it + iC++; + } + else + { + SetLocalInt( OBJECT_SELF, "#EYERAYS", 1 ); //flag the beholder as being busy shooting eye rays + //oT is valid, we can see or hear it + fH = VectorToAngle( GetPosition( oT ) - GetPosition( OBJECT_SELF ) ); + fH = fH < fM ? fH + 360.0 : fH; + fH -= fM; + if ( fH > 315.0 || fH < 45.0 ) + { + if ( iQ1 < 3 && GetIsCentralEyeOpen() == FALSE ) + { + //first quadrant target, still have rays available in this quadrant + iS = MatchRayToTarget( oT ); + if ( iS != 0 ) + { + iQ1++; + iR++; + RemoveBeholderRayFromSelection( iS ); + DelayCommand( fS * iR, DoFireBeholderRay( iS, oT ) ); + if ( iH - iC < BEHOLDER_MAX_RAYS - iR ) //we have more rays left to fire than enemies remaining to fire them at + { + if ( iQ1 < 3 && Random( 100 ) < iRep ) //we have rays left in this quadrant, random chance to shoot another at this target + { + iM = FALSE; //we will shoot more rays at this target, not moving on + } + } + } + } + } + else if ( fH < 135.0 ) + { + if ( iQ2 < 3 ) + { + //second quadrant target, still have rays available in this quadrant + iS = MatchRayToTarget( oT ); + if ( iS != 0 ) + { + iQ2++; + iR++; + RemoveBeholderRayFromSelection( iS ); + DelayCommand( fS * iR, DoFireBeholderRay( iS, oT ) ); + if ( iH - iC < BEHOLDER_MAX_RAYS - iR ) //we have more rays left to fire than enemies remaining to fire them at + { + if ( iQ2 < 3 && Random( 100 ) < iRep ) //we have rays left in this quadrant, random chance to shoot another at this target + { + iM = FALSE; //we will shoot more rays at this target, not moving on + } + } + } + } + } + else if ( fH < 225.0 ) + { + if ( iQ3 < 3 ) + { + //third quadrant target, still have rays available in this quadrant + iS = MatchRayToTarget( oT ); + if ( iS != 0 ) + { + iQ3++; + iR++; + RemoveBeholderRayFromSelection( iS ); + DelayCommand( fS * iR, DoFireBeholderRay( iS, oT ) ); + if ( iH - iC < BEHOLDER_MAX_RAYS - iR ) //we have more rays left to fire than enemies remaining to fire them at + { + if ( iQ3 < 3 && Random( 100 ) < iRep ) //we have rays left in this quadrant, random chance to shoot another at this target + { + iM = FALSE; //we will shoot more rays at this target, not moving on + } + } + } + } + } + else if ( iQ4 < 3 ) + { + //fourth quadrant target, still have rays available in this quadrant + iS = MatchRayToTarget( oT ); + if ( iS != 0 ) + { + iQ4++; + iR++; + RemoveBeholderRayFromSelection( iS ); + DelayCommand( fS * iR, DoFireBeholderRay( iS, oT ) ); + if ( iH - iC < BEHOLDER_MAX_RAYS - iR ) //we have more rays left to fire than enemies remaining to fire them at + { + if ( iQ4 < 3 && Random( 100 ) < iRep ) //we have rays left in this quadrant, random chance to shoot another at this target + { + iM = FALSE; //we will shoot more rays at this target, not moving on + } + } + } + } + } + //we're either getting the same target again or moving onto the next target + iC += iM; //if iM is true we are moving onto next target, iC is incremented, otherwise it stays where it is + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, iC, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + DelayCommand( fS * ( iR + 1 ), DeleteLocalInt( OBJECT_SELF, "#EYERAYS" ) ); + + ClearBeholderRaySelection(); + + if ( iR > 0 ) + { + //we have fired some rays + return TRUE; + } + //we have not fired any rays + return FALSE; +} + +int DoBeholderCentralEye() +{ + int iSpell = SPELL_BEH_ANTIMAGIC_CONE; + int iHostiles; + float fRad = RADIUS_SIZE_MEDIUM; + float fMinSearch = 2.5; + float fMaxSearch = fRad; + vector vT; + object oT; + location lMark; + int iMeta= METAMAGIC_ANY; + int iCheat = TRUE; + + if ( iSpell && GetLastAction() != "+CENTRALEYE" ) + { + iHostiles = GetHostileCount( 50.0 ); + if ( iHostiles == 1 ) + { + //we have a breath weapon ready to go, single target + oT = GetTarget(); + if ( oT != OBJECT_INVALID ) + { + //ActionCastSpellAtObject( iSpell, oT, iMeta, iCheat ); + NO_ActionCastSpellAtObject( iSpell, oT, iMeta, iCheat, 0, PROJECTILE_PATH_TYPE_DEFAULT, TRUE, FALSE ); + SetIsCentralEyeOpen( TRUE ); + DoBeholderRays(); + SetIsCentralEyeOpen( FALSE ); + return TRUE; + } + } + else if ( iHostiles > 1 ) + { + //we have a breath weapon ready to go, multiple targets + vT = GetAreaTarget( iSpell, fRad, fMinSearch, fMaxSearch ); + if ( VectorMagnitude( vT ) > 0.0 ) + { + lMark = Location( GetArea( OBJECT_SELF ), GetPosition( OBJECT_SELF ) + vT, GetFacing( OBJECT_SELF ) ); + //ActionCastSpellAtLocation( iSpell, lMark ); + NO_ActionCastSpellAtLocation( iSpell, lMark, iMeta, iCheat, PROJECTILE_PATH_TYPE_DEFAULT, TRUE, FALSE ); + SetIsCentralEyeOpen( TRUE ); + DoBeholderRays(); + SetIsCentralEyeOpen( FALSE ); + return TRUE; + } + } + } + return FALSE; +} \ No newline at end of file diff --git a/_module/nss/no_lib_analysis.nss b/_module/nss/no_lib_analysis.nss new file mode 100644 index 00000000..aa444a9f --- /dev/null +++ b/_module/nss/no_lib_analysis.nss @@ -0,0 +1,2901 @@ +#include "no_inc_ptypes" + +//functions +int GetAOEThreat( object oArea, object oEnt=OBJECT_SELF ) +{ + string sArea; + + if ( GetIsObjectValid( oArea ) ) + { + sArea = GetTag( oArea ); + } + else + { + return 0; + } + + + if ( sArea == "VFX_PER_CREEPING_DOOM" ) + { + return 1; + } + if ( sArea == "VFX_PER_DARKNESS" ) + { + if ( GetHasSpellEffect( SPELL_TRUE_SEEING, oEnt ) || GetHasSpellEffect( SPELL_DARKVISION, oEnt ) ) + { + return 0; + } + return 1; + } + if ( sArea == "VFX_PER_DELAYED_BLAST_FIREBALL" ) + { + return 1; + } + if ( sArea == "VFX_PER_ENTANGLE" ) + { + if ( GetIsEnemy( GetAreaOfEffectCreator( oArea ), oEnt ) ) + { + return 1; + } + return 0; + } + if ( sArea == "VFX_PER_EVARDS_BLACK_TENTACLES" ) + { + if ( GetIsEnemy( GetAreaOfEffectCreator( oArea ), oEnt ) ) + { + return 1; + } + return 0; + } + if ( sArea == "VFX_PER_FOGACID" ) + { + return 1; + } + if ( sArea == "VFX_PER_FOGFIRE" ) + { + return 1; + } + if ( sArea == "VFX_PER_FOGKILL" ) + { + return 1; + } + if ( sArea == "VFX_PER_FOGMIND" ) + { + return 1; + } + if ( sArea == "VFX_PER_FOGSTINK" ) + { + return 1; + } + if ( sArea == "VFX_PER_GREASE" ) + { + return 1; + } + if ( sArea == "VFX_PER_STORM" ) + { + return 1; + } + if ( sArea == "VFX_PER_WALLBLADE" ) + { + return 1; + } + if ( sArea == "VFX_PER_WALLFIRE" ) + { + return 1; + } + if ( sArea == "VFX_PER_WEB" ) + { + return 1; + } + if ( sArea == "VFX_PER_FOGBEWILDERMENT" ) + { + return 1; + } + if ( sArea == "VFX_PER_STONEHOLD" ) + { + return 1; + } + return 0; +} + +int GetAOECount( float fRad=10.0f, object oEnt=OBJECT_SELF ) +{ + int iLoop = 1; + int iCnt = 0; + object oArea; + + oArea = GetNearestObject( OBJECT_TYPE_AREA_OF_EFFECT, oEnt, iLoop++ ); + while ( GetIsObjectValid( oArea ) && GetDistanceBetween( oEnt, oArea ) <= fRad ) + { + if ( GetAOEThreat( oArea ) ) + { + iCnt++; + } + oArea = GetNearestObject( OBJECT_TYPE_AREA_OF_EFFECT, oEnt, iLoop++ ); + } + + return iCnt; +} + +vector GetAOEVector( float fRad=10.0f, object oEnt=OBJECT_SELF ) +{ + int iLoop = 1; + vector vU = GetPosition( oEnt ); + vector vT = Vector( 0.0, 0.0, 0.0 ); + object oArea; + + oArea = GetNearestObject( OBJECT_TYPE_AREA_OF_EFFECT, oEnt, iLoop++ ); + while ( GetIsObjectValid( oArea ) && GetDistanceBetween( oEnt, oArea ) <= fRad ) + { + if ( GetAOEThreat( oArea ) ) + { + vT = vT + GetPosition( oArea ) - vU; + } + oArea = GetNearestObject( OBJECT_TYPE_AREA_OF_EFFECT, oEnt, iLoop++ ); + } + + return vT; +} + +int GetHostileAOECount( float fRad=10.0f, object oEnt=OBJECT_SELF ) +{ + int iLoop = 1; + int iCnt = 0; + object oArea; + + oArea = GetNearestObject( OBJECT_TYPE_AREA_OF_EFFECT, oEnt, iLoop++ ); + while ( GetIsObjectValid( oArea ) && GetDistanceBetween( oEnt, oArea ) <= fRad ) + { + if ( GetIsEnemy( GetAreaOfEffectCreator( oArea ) ) ) + { + iCnt++; + } + oArea = GetNearestObject( OBJECT_TYPE_AREA_OF_EFFECT, oEnt, iLoop++ ); + } + + return iCnt; +} + +vector GetHostileAOEVector( float fRad=10.0f, object oEnt=OBJECT_SELF ) +{ + int iLoop = 1; + vector vU = GetPosition( oEnt ); + vector vT = Vector( 0.0, 0.0, 0.0 ); + object oArea; + + oArea = GetNearestObject( OBJECT_TYPE_AREA_OF_EFFECT, oEnt, iLoop++ ); + while ( GetIsObjectValid( oArea ) && GetDistanceBetween( oEnt, oArea ) <= fRad ) + { + if ( GetIsEnemy( GetAreaOfEffectCreator( oArea ) ) ) + { + vT = vT + GetPosition( oArea ) - vU; + } + oArea = GetNearestObject( OBJECT_TYPE_AREA_OF_EFFECT, oEnt, iLoop++ ); + } + + return vT; +} + +vector GetAOEEvacVector( vector vS, object oEnt=OBJECT_SELF ) +{ + vector vU = GetPosition( oEnt ); + vector vT = Vector( 0.0, 0.0, 0.0 ); + + if ( vS != Vector( 0.0, 0.0, 0.0 ) ) + { + if ( GetLocalLocation( oEnt, "LASTLOC" ) == GetLocation( oEnt ) ) + { + //we've had location flag set, if matches we haven't moved + //probably stuck between wall and AOEs or paralyzed in AOEs + vT = vU + 15.0 * VectorNormalize( vS ); + } + else + { + //proceed away from AOEs + vT = vU - 15.0 * VectorNormalize( vS ); + } + } + else + { + //we know there was at least 1 area, must be on self + vT = vU + 15.0 * VectorNormalize( AngleToVector( IntToFloat( Random( 360 ) ) ) ); + } + + return vT; +} + +object GetMostDamagedAlly( float fRad=15.0f, object oEnt=OBJECT_SELF, int iSee=FALSE ) +{ + //gives higher weighting to non-summoned allies + object oSubject = oEnt; + object oHurt = OBJECT_INVALID; + int iCnt = 1; + int iDamage = 0; + + while ( GetIsObjectValid( oSubject ) && GetDistanceBetween( oEnt, oSubject ) < fRad ) + { + if ( GetObjectSeen( oSubject, oEnt ) >= iSee ) + { + iDamage = GetMaxHitPoints( oSubject ) - GetCurrentHitPoints( oSubject ); + if ( iDamage ) + { + if ( oHurt == OBJECT_INVALID ) + { + oHurt = oSubject; + } + else if ( ( GetMaxHitPoints( oHurt ) - GetCurrentHitPoints( oHurt ) ) < iDamage ) + { + if ( GetLocalInt( oHurt, "SUMMONED" ) || !GetLocalInt( oSubject, "SUMMONED" ) ) + { + oHurt = oSubject; + } + } + } + } + oSubject = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, iCnt++ ); + } + return oHurt; +} + +object GetLowestHPAlly( float fRad=15.0, int iLim=0, object oEnt=OBJECT_SELF, int iSee=FALSE ) +{ + object oSub = oEnt; + object oHurt = OBJECT_INVALID; + int iCnt = 0; + int iHP = 0; + int iSubHP; + int iDam; + + while ( GetIsObjectValid( oSub ) && GetDistanceBetween( oEnt, oSub ) < fRad ) + { + iDam = GetMaxHitPoints( oSub ) - GetCurrentHitPoints( oSub ); + if ( GetObjectSeen( oSub, oEnt ) >= iSee && iDam >= iLim ) + { + iSubHP = GetCurrentHitPoints( oSub ); + if ( !iHP || iSubHP < iHP ) + { + //either we haven't got an oHurt yet, or we do and oSub is on less HP + iHP = iSubHP; + oHurt = oSub; + } + } + oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, ++iCnt ); + } + return oHurt; +} + +object GetLowestHPAllyNoHealer( float fRad=15.0, int iLim=0, object oEnt=OBJECT_SELF, int iSee=FALSE, int iLive=TRUE ) +{ + object oSub = oEnt; + object oHurt = OBJECT_INVALID; + int iCnt = 0; + int iHP = 0; + int iSubHP; + int iDam; + int iU; + + while ( GetIsObjectValid( oSub ) && GetDistanceBetween( oEnt, oSub ) < fRad ) + { + iU = GetRacialType( oSub ) == RACIAL_TYPE_UNDEAD; + if ( ( iLive || iU ) && ( !iLive || !iU ) ) + { + iDam = GetMaxHitPoints( oSub ) - GetCurrentHitPoints( oSub ); + if ( !GetIsObjectValid( GetLocalObject( oSub, "#HEALER" ) ) && GetObjectSeen( oSub, oEnt ) >= iSee && iDam >= iLim ) + { + iSubHP = GetCurrentHitPoints( oSub ); + if ( !iHP || iSubHP < iHP ) + { + //either we haven't got an oHurt yet, or we do and oSub is on less HP + iHP = iSubHP; + oHurt = oSub; + } + } + } + oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, ++iCnt ); + } + return oHurt; +} + +object GetNearestDeadAlly( float fRad=15.0f, object oEnt=OBJECT_SELF, int iSee=FALSE ) +{ + int iCnt = 1; + object oDead = OBJECT_INVALID; + //object oSubject = GetNearestObject( OBJECT_TYPE_CREATURE, oEnt, iCnt++ ); + object oSubject = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, FALSE ); + + while ( !GetIsObjectValid( oDead ) && GetIsObjectValid( oSubject ) && GetDistanceBetween( oEnt, oSubject ) <= fRad ) + { + if ( GetObjectSeen( oSubject, oEnt ) >= iSee ) + { + oDead = oSubject; + } + oSubject = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, FALSE ); + } + return oDead; +} + +object GetNearestDeadAllyNoRaiser( float fRad=15.0f, object oEnt=OBJECT_SELF, int iSee=FALSE ) +{ + int iCnt = 1; + object oDead = OBJECT_INVALID; + //object oSubject = GetNearestObject( OBJECT_TYPE_CREATURE, oEnt, iCnt++ ); + object oSubject = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, FALSE ); + + while ( !GetIsObjectValid( oDead ) && GetIsObjectValid( oSubject ) && GetDistanceBetween( oEnt, oSubject ) <= fRad ) + { + if ( GetObjectSeen( oSubject, oEnt ) >= iSee && !GetIsObjectValid( GetLocalObject( oSubject, "#RAISER" ) ) ) + { + oDead = oSubject; + } + oSubject = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, FALSE ); + } + return oDead; +} + +object GetNearestPetrifiedAllyNoHelper( float fRad=15.0f, object oEnt=OBJECT_SELF, int iSee=FALSE ) +{ + int iCnt = 1; + int iEff; + object oPet = OBJECT_INVALID; + //object oSubject = GetNearestObject( OBJECT_TYPE_CREATURE, oEnt, iCnt++ ); + object oSubject = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( !GetIsObjectValid( oPet ) && GetIsObjectValid( oSubject ) && GetDistanceBetween( oEnt, oSubject ) <= fRad ) + { + if ( GetObjectSeen( oSubject, oEnt ) >= iSee && !GetIsObjectValid( GetLocalObject( oSubject, "#FLESHER" ) ) ) + { + if ( GetEffectsOnObject( oPet ) & 8192 ) //check for petrify effect + { + oPet = oSubject; + } + } + oSubject = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return oPet; +} + +int GetEffectsOnObject( object oEnt=OBJECT_SELF ) +{ + int iTally = 0; + int iType; + effect eSubj; + + eSubj = GetFirstEffect( oEnt ); + while ( GetIsEffectValid( eSubj ) ) + { + if ( GetIsFriend( GetEffectCreator( eSubj ) ) ) + { + //probably a side-effect or intentionally there, ignore it + } + else + { + iType = GetEffectType( eSubj ); + if ( iType == EFFECT_TYPE_ABILITY_DECREASE || + iType == EFFECT_TYPE_AC_DECREASE || + iType == EFFECT_TYPE_ATTACK_DECREASE || + iType == EFFECT_TYPE_DAMAGE_DECREASE || + iType == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE || + iType == EFFECT_TYPE_SAVING_THROW_DECREASE ) + { + iTally += NO_EFFECT_GENERIC; + } + else if ( iType == EFFECT_TYPE_DISEASE ) + { + iTally += NO_EFFECT_DISEASE; + } + else if ( iType == EFFECT_TYPE_CURSE ) + { + iTally += NO_EFFECT_CURSE; + } + else if ( iType == EFFECT_TYPE_POISON ) + { + iTally += NO_EFFECT_POISON; + } + else if ( iType == EFFECT_TYPE_DEAF ) + { + iTally += NO_EFFECT_DEAF; + } + else if ( iType == EFFECT_TYPE_BLINDNESS ) + { + iTally += NO_EFFECT_BLINDNESS; + } + else if ( iType == EFFECT_TYPE_SILENCE ) + { + iTally += NO_EFFECT_SILENCE; + } + else if ( iType == EFFECT_TYPE_NEGATIVELEVEL ) + { + iTally += NO_EFFECT_NEGATIVELEVEL; + } + else if ( iType == EFFECT_TYPE_DAZED ) + { + iTally += NO_EFFECT_DAZED; + } + else if ( iType == EFFECT_TYPE_FRIGHTENED ) + { + iTally += NO_EFFECT_FRIGHTENED; + } + else if ( iType == EFFECT_TYPE_CONFUSED ) + { + iTally += NO_EFFECT_CONFUSED; + } + else if ( iType == EFFECT_TYPE_CHARMED ) + { + iTally += NO_EFFECT_CHARMED; + } + else if ( iType == EFFECT_TYPE_SLEEP ) + { + iTally += NO_EFFECT_SLEEP; + } + else if ( iType == EFFECT_TYPE_STUNNED ) + { + iTally += NO_EFFECT_STUNNED; + } + else if ( iType == EFFECT_TYPE_DOMINATED ) + { + iTally += NO_EFFECT_DOMINATED; + } + else if ( iType == EFFECT_TYPE_PETRIFY ) + { + iTally += NO_EFFECT_PETRIFY; + } + else if ( iType == EFFECT_TYPE_PARALYZE ) + { + iTally += NO_EFFECT_PARALYZE; + } + } + eSubj = GetNextEffect( oEnt ); + } + return iTally; +} + +object GetMostHamperedAlly( float fRad=15.0f, object oEnt=OBJECT_SELF, int iSee=FALSE ) +{ + object oSubject = oEnt; + object oHurt = OBJECT_INVALID; + int iCnt = 1; + int iEff = 0; + + while ( GetIsObjectValid( oSubject ) && GetDistanceBetween( oEnt, oSubject ) <= fRad ) + { + //if ( GetObjectSeen( oSubject, oEnt ) >= iSee && !GetIsObjectValid( GetLocalObject( oHurt, "HELPER" ) ) ) + if ( GetObjectSeen( oSubject, oEnt ) >= iSee && !GetIsObjectValid( GetLocalObject( oSubject, "HELPER" ) ) ) + { + iEff = GetEffectsOnObject( oSubject ); + if ( iEff ) + { + if ( GetIsObjectValid( oHurt ) ) + { + if ( GetEffectsOnObject( oHurt ) < iEff ) + { + oHurt = oSubject; + } + } + else + { + oHurt = oSubject; + } + } + } + oSubject = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, iCnt++ ); + } + return oHurt; +} + +vector GetAreaTarget( int iS, float fRad, float fMinRad=7.5, float fMaxRad=30.0, int iEffChk=TRUE, object oCaster=OBJECT_SELF ) +{ + vector vU = GetPosition( oCaster ); + vector vS = Vector( 0.0, 0.0, 0.0 ); + vector vT = Vector( 0.0, 0.0, 0.0 ); + object oSub1 = OBJECT_INVALID; + object oSub2 = OBJECT_INVALID; + int iCnt1 = 0; + int iCnt2 = 0; + int iCnt3 = 0; + int iBestCnt = 0; + float fMinSearchRad = fMinRad; + float fMaxSearchRad = fMaxRad; + + oSub1 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oCaster, ++iCnt1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + //first pad out to fMinSearchRad + while ( GetIsObjectValid( oSub1 ) && GetDistanceBetween( oCaster, oSub1 ) <= fMinSearchRad ) + { + oSub1 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oCaster, ++iCnt1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + //now scan from 7.5 out to 40.0 + while ( GetIsObjectValid( oSub1 ) && GetDistanceBetween( oCaster, oSub1 ) <= fMaxSearchRad ) + { + iCnt2 = 0; + iCnt3 = 0; + //don't count them as target if they're on the move + if ( GetCurrentAction( oSub1 ) != ACTION_MOVETOPOINT && ( !iEffChk || !GetHasSpellEffect( iS, oSub1 ) ) ) + { + iCnt3 = 1; //starts at 1 to count oSub1 + vT = GetPosition ( oSub1 ) - vU; + + //oSub2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oSub1, ++iCnt2, CREATURE_TYPE_IS_ALIVE, TRUE ); + oSub2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oSub1, ++iCnt2, CREATURE_TYPE_IS_ALIVE, TRUE ); + //this should not pick up dead creatures + while ( GetIsObjectValid( oSub2 ) && GetDistanceBetween( oSub1, oSub2 ) <= fRad ) + { + //SpeakString( "TH: " + GetName( oSub1 ) + " -> " + GetName( oSub2 ) ); + //don't count them as target if they're on the move + if ( GetObjectSeen( oSub2, oCaster ) && GetCurrentAction( oSub2 ) != ACTION_MOVETOPOINT && ( !iEffChk || !GetHasSpellEffect( iS, oSub2 ) ) ) + { + iCnt3++; + vT = vT + GetPosition( oSub2 ) - vU; + } + //oSub2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oSub1, ++iCnt2, CREATURE_TYPE_IS_ALIVE, TRUE ); + oSub2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oSub1, ++iCnt2, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + } + if ( iCnt3 > iBestCnt ) + { + vS = VectorNormalize( vT ) * ( VectorMagnitude( vT ) / IntToFloat( iCnt3 ) ); + iBestCnt = iCnt3; + } + oSub1 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oCaster, ++iCnt1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + //vS should now be averaged central vector to densest concentration of enemies + //iBestCnt is count of enemies within radius of spell at this point + if ( iBestCnt > 1 ) + //if ( iBestCnt ) + { + return vS; + } + return Vector( 0.0, 0.0, 0.0 ); +} + +vector GetFriendlyAreaTarget( float fRad, int iSpell=0, int iType=0, object oCaster=OBJECT_SELF ) +{ + vector vU = GetPosition( oCaster ); + vector vS = Vector( 0.0, 0.0, 0.0 ); + vector vT = Vector( 0.0, 0.0, 0.0 ); + object oSub1 = OBJECT_INVALID; + object oSub2 = OBJECT_INVALID; + int iCnt1 = 0; + int iCnt2 = 0; + int iCnt3 = 0; + int iBestCnt = 0; + float fMaxSearchRad = 30.0; + + oSub1 = oCaster; + while ( GetIsObjectValid( oSub1 ) && GetDistanceBetween( oCaster, oSub1 ) <= fMaxSearchRad ) + { + if ( ( !iType && !GetHasSpellEffect( iSpell, oSub1 ) ) || ( iType && !GetHasFeatEffect( iSpell, oSub1 ) ) ) + { + iCnt2 = 0; + iCnt3 = 0; + //don't count them as target if they're on the move + //if ( GetCurrentAction( oSub1 ) != ACTION_MOVETOPOINT ) + //temp for goblin test + if ( TRUE ) + { + iCnt3 = 1; //starts at 1 to count oSub1 + vT = GetPosition ( oSub1 ) - vU; + } + oSub2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oSub1, ++iCnt2, CREATURE_TYPE_IS_ALIVE, TRUE ); + //this should not pick up dead creatures + while ( GetIsObjectValid( oSub2 ) && GetDistanceBetween( oSub1, oSub2 ) <= fRad ) + { + //don't count them as target if they're on the move + //if ( GetObjectSeen( oSub2, oCaster ) && GetCurrentAction( oSub2 ) != ACTION_MOVETOPOINT ) + if ( GetObjectSeen( oSub2, oCaster ) && + ( ( !iType && !GetHasSpellEffect( iSpell, oSub2 ) ) || ( iType && !GetHasFeatEffect( iSpell, oSub2 ) ) ) ) + { + iCnt3++; + vT = vT + GetPosition( oSub2 ) - vU; + } + oSub2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oSub1, ++iCnt2, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + if ( iCnt3 > iBestCnt ) + { + vS = vT / IntToFloat( iCnt3 ); + iBestCnt = iCnt3; + } + } + oSub1 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oCaster, ++iCnt1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + //vS should now be averaged central vector to densest concentration of enemies + //iBestCnt is count of enemies within radius + //if ( iBestCnt > 1 ) + if ( iBestCnt ) + { + return vS; + } + return Vector( 0.0, 0.0, 0.0 ); +} + +int CanAct( object oSelf=OBJECT_SELF ) +{ + int iType; + effect eEff = GetFirstEffect( oSelf ); + + if ( GetIsDead( oSelf ) || GetLocalInt( OBJECT_SELF, "DRAGONFLIGHTDEL" ) ) + { + return FALSE; + } + + while ( GetIsEffectValid( eEff ) ) + { + iType = GetEffectType( eEff ); + if ( iType == EFFECT_TYPE_CONFUSED || + iType == EFFECT_TYPE_DAZED || + iType == EFFECT_TYPE_FRIGHTENED || + iType == EFFECT_TYPE_PARALYZE || + iType == EFFECT_TYPE_PETRIFY || + iType == EFFECT_TYPE_SLEEP || + iType == EFFECT_TYPE_STUNNED || + iType == EFFECT_TYPE_TURNED || + GetLocalInt( oSelf, "DRAGONFLIGHTDEL" ) == TRUE + ) + { + return FALSE; + } + eEff = GetNextEffect( oSelf ); + } + return TRUE; +} + +int GetIsWeapon( object oWeapon ) +{ + int iType; + + if ( GetIsObjectValid( oWeapon ) && ( iType = GetBaseItemType( oWeapon ) ) != BASE_ITEM_INVALID ) + { + if ( + iType == BASE_ITEM_BASTARDSWORD || + iType == BASE_ITEM_BATTLEAXE || + iType == BASE_ITEM_CLUB || + iType == BASE_ITEM_DAGGER || + iType == BASE_ITEM_DART || + iType == BASE_ITEM_DIREMACE || + iType == BASE_ITEM_DOUBLEAXE || + iType == BASE_ITEM_GREATAXE || + iType == BASE_ITEM_GREATSWORD || + iType == BASE_ITEM_HALBERD || + iType == BASE_ITEM_HANDAXE || + iType == BASE_ITEM_HEAVYCROSSBOW || + iType == BASE_ITEM_HEAVYFLAIL || + iType == BASE_ITEM_KAMA || + iType == BASE_ITEM_KATANA || + iType == BASE_ITEM_KUKRI || + iType == BASE_ITEM_LIGHTFLAIL || + iType == BASE_ITEM_LIGHTHAMMER || + iType == BASE_ITEM_LIGHTMACE || + iType == BASE_ITEM_LONGBOW || + iType == BASE_ITEM_LONGSWORD || + iType == BASE_ITEM_MAGICSTAFF || + iType == BASE_ITEM_MORNINGSTAR || + iType == BASE_ITEM_QUARTERSTAFF || + iType == BASE_ITEM_RAPIER || + iType == BASE_ITEM_SCIMITAR || + iType == BASE_ITEM_SCYTHE || + iType == BASE_ITEM_SHORTBOW || + iType == BASE_ITEM_SHORTSPEAR || + iType == BASE_ITEM_SHORTSWORD || + iType == BASE_ITEM_SHURIKEN || + iType == BASE_ITEM_SICKLE || + iType == BASE_ITEM_SLING || + iType == BASE_ITEM_THROWINGAXE || + iType == BASE_ITEM_TORCH || + iType == BASE_ITEM_TWOBLADEDSWORD || + iType == BASE_ITEM_WARHAMMER + ) + { + return TRUE; + } + } + return FALSE; +} + +int GetIsLightWeapon( object oWeapon, int iCanBeInvalid=FALSE ) +{ + int iType; + + if ( GetIsObjectValid( oWeapon ) && ( iType = GetBaseItemType( oWeapon ) ) != BASE_ITEM_INVALID ) + { + if ( + //iType == BASE_ITEM_BASTARDSWORD || + //iType == BASE_ITEM_BATTLEAXE || + iType == BASE_ITEM_CLUB || + iType == BASE_ITEM_DAGGER || + //iType == BASE_ITEM_DART || + //iType == BASE_ITEM_DIREMACE || + //iType == BASE_ITEM_DOUBLEAXE || + //iType == BASE_ITEM_GREATAXE || + //iType == BASE_ITEM_GREATSWORD || + //iType == BASE_ITEM_HALBERD || + iType == BASE_ITEM_HANDAXE || + //iType == BASE_ITEM_HEAVYCROSSBOW || + //iType == BASE_ITEM_HEAVYFLAIL || + iType == BASE_ITEM_KAMA || + //iType == BASE_ITEM_KATANA || + iType == BASE_ITEM_KUKRI || + iType == BASE_ITEM_LIGHTFLAIL || + iType == BASE_ITEM_LIGHTHAMMER || + iType == BASE_ITEM_LIGHTMACE || + //iType == BASE_ITEM_LONGBOW || + //iType == BASE_ITEM_LONGSWORD || + //iType == BASE_ITEM_MAGICSTAFF || + //iType == BASE_ITEM_MORNINGSTAR || + //iType == BASE_ITEM_QUARTERSTAFF || + iType == BASE_ITEM_RAPIER || + //iType == BASE_ITEM_SCIMITAR || + //iType == BASE_ITEM_SCYTHE || + //iType == BASE_ITEM_SHORTBOW || + //iType == BASE_ITEM_SHORTSPEAR || + iType == BASE_ITEM_SHORTSWORD || + //iType == BASE_ITEM_SHURIKEN || + iType == BASE_ITEM_SICKLE //|| + //iType == BASE_ITEM_SLING || + //iType == BASE_ITEM_THROWINGAXE || + //iType == BASE_ITEM_TORCH || + //iType == BASE_ITEM_TWOBLADEDSWORD || + //iType == BASE_ITEM_WARHAMMER + ) + { + return TRUE; + } + } + else if ( !GetIsObjectValid( oWeapon ) && iCanBeInvalid ) + { + //special case for unarmed + return TRUE; + } + return FALSE; +} + +int GetIsDoubleWeapon( object oWeapon ) +{ + int iType; + + if ( GetIsObjectValid( oWeapon ) && ( iType = GetBaseItemType( oWeapon ) ) != BASE_ITEM_INVALID ) + { + if ( + //iType == BASE_ITEM_BASTARDSWORD || + //iType == BASE_ITEM_BATTLEAXE || + //iType == BASE_ITEM_CLUB || + //iType == BASE_ITEM_DAGGER || + //iType == BASE_ITEM_DART || + iType == BASE_ITEM_DIREMACE || + iType == BASE_ITEM_DOUBLEAXE || + //iType == BASE_ITEM_GREATAXE || + //iType == BASE_ITEM_GREATSWORD || + //iType == BASE_ITEM_HALBERD || + //iType == BASE_ITEM_HANDAXE || + //iType == BASE_ITEM_HEAVYCROSSBOW || + //iType == BASE_ITEM_HEAVYFLAIL || + //iType == BASE_ITEM_KAMA || + //iType == BASE_ITEM_KATANA || + //iType == BASE_ITEM_KUKRI || + //iType == BASE_ITEM_LIGHTFLAIL || + //iType == BASE_ITEM_LIGHTHAMMER || + //iType == BASE_ITEM_LIGHTMACE || + //iType == BASE_ITEM_LONGBOW || + //iType == BASE_ITEM_LONGSWORD || + //iType == BASE_ITEM_MAGICSTAFF || + //iType == BASE_ITEM_MORNINGSTAR || + //iType == BASE_ITEM_QUARTERSTAFF || + //iType == BASE_ITEM_RAPIER || + //iType == BASE_ITEM_SCIMITAR || + //iType == BASE_ITEM_SCYTHE || + //iType == BASE_ITEM_SHORTBOW || + //iType == BASE_ITEM_SHORTSPEAR || + //iType == BASE_ITEM_SHORTSWORD || + //iType == BASE_ITEM_SHURIKEN || + //iType == BASE_ITEM_SICKLE || + //iType == BASE_ITEM_SLING || + //iType == BASE_ITEM_THROWINGAXE || + //iType == BASE_ITEM_TORCH || + iType == BASE_ITEM_TWOBLADEDSWORD //|| + //iType == BASE_ITEM_WARHAMMER + ) + { + return TRUE; + } + } + return FALSE; +} + +int GetCasterCount( float fRad=5.0, object oEnt=OBJECT_SELF ) +{ + int iCnt = 1; + int iCast = 0; + object oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ); + + while ( GetIsObjectValid( oSub ) ) + { + if ( !GetIsDead( oSub ) && GetIsCaster( oSub ) ) + { + iCast++; + } + oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ); + } + return iCast; +} + +int GetAttackerCount( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ) +{ + int iCnt = 1; + int iAtk = 0; + object oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( GetIsObjectValid( oSub ) && GetDistanceBetween( oEnt, oSub ) <= fRad ) + { + if ( GetAttackTarget( oSub ) == oEnt ) + { + if ( GetObjectSeen( oSub, oS ) || GetObjectHeard( oSub, oS ) ) + { + iAtk++; + } + } + oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return iAtk; +} + +int GetHostileCount( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ) +{ + int iCnt = 1; + int iEnemy = 0; + object oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( GetIsObjectValid( oSub ) && GetDistanceBetween( oEnt, oSub ) <= fRad ) + { + if ( GetObjectSeen( oSub, oS ) || GetObjectHeard( oSub, oS ) ) + { + iEnemy++; + } + oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return iEnemy; +} + +int GetOmniscientHostileCount( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ) +{ + int iCnt = 1; + int iEnemy = 0; + object oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( GetIsObjectValid( oSub ) && GetDistanceBetween( oEnt, oSub ) <= fRad ) + { + iEnemy++; + oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return iEnemy; +} + +int GetAllyCount( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ) +{ + int iCnt = 1; + int iAlly = 0; + object oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( GetIsObjectValid( oSub ) && GetDistanceBetween( oEnt, oSub ) <= fRad ) + { + if ( GetObjectSeen( oSub, oS ) || GetObjectHeard( oSub, oS ) ) + { + iAlly++; + } + oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return iAlly; +} + +int GetAttackerHD( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ) +{ + int iCnt = 1; + int iAtk = 0; + object oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( GetIsObjectValid( oSub ) && GetDistanceBetween( oEnt, oSub ) <= fRad ) + { + if ( GetAttackTarget( oSub ) == oEnt ) + { + if ( GetObjectSeen( oSub, oS ) || GetObjectHeard( oSub, oS ) ) + { + iAtk += GetHitDice( oSub ); + } + } + oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return iAtk; +} + +int GetHostileHD( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ) +{ + int iCnt = 1; + int iEnemy = 0; + object oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( GetIsObjectValid( oSub ) && GetDistanceBetween( oEnt, oSub ) <= fRad ) + { + if ( GetObjectSeen( oSub, oS ) || GetObjectHeard( oSub, oS ) ) + { + iEnemy += GetHitDice( oSub ); + } + oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return iEnemy; +} + +int GetAllyHD( float fRad=5.0, object oEnt=OBJECT_SELF, object oS=OBJECT_SELF ) +{ + int iCnt = 1; + int iAlly = 0; + object oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( GetIsObjectValid( oSub ) && GetDistanceBetween( oEnt, oSub ) <= fRad ) + { + if ( GetObjectSeen( oSub, oS ) || GetObjectHeard( oSub, oS ) ) + { + iAlly += GetHitDice( oSub ); + } + oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return iAlly; +} + +vector GetHostileVector( float fRad=10.0f, object oEnt=OBJECT_SELF ) +{ + int iCnt = 1; + int iNum = 0; + vector vU = GetPosition( oEnt ); + vector vT = Vector( 0.0, 0.0, 0.0 ); + object oSub; + + oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + while ( GetIsObjectValid( oSub ) && GetDistanceBetween( oEnt, oSub ) <= fRad ) + { + iNum++; + vT = vT + GetPosition( oSub ) - vU; + oSub = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + + if ( iNum ) + { + vT = vT / IntToFloat( iNum ); + } + return vT; +} + +vector GetHostileEvacVector( vector vS, object oEnt=OBJECT_SELF ) +{ + vector vU = GetPosition( oEnt ); + vector vT = Vector( 0.0, 0.0, 0.0 ); + int iR = GetLocalInt( oEnt, "#LASTHSRETRIES" ); + + if ( VectorMagnitude( vS ) > 0.0 ) + { + if ( GetLocalLocation( oEnt, "#LASTHOTSPOT" ) == GetLocation( oEnt ) ) + { + if ( !iR ) + { + iR++; + vT = 10.0 * VectorNormalize( AngleToVector( GetLocalFloat( oEnt, "#LASTAMANGLE" ) - 90.0 + 180.0 * IntToFloat( Random( 2 ) ) ) ); + } + else + { + iR--; + } + } + else + { + + vT = 10.0 * VectorNormalize( vS ); + } + } + else + { + vT = 10.0 * VectorNormalize( AngleToVector( IntToFloat( Random( 360 ) ) ) ); + } + if ( iR ) + { + SetLocalInt( oEnt, "#LASTHSRETRIES", iR ); + } + else + { + DeleteLocalInt( oEnt, "#LASTHSRETRIES" ); + } + return vT; +} + +int GetIsCaster( object oEnt=OBJECT_SELF ) +{ + int iCnt = 0; + + if ( GetLevelByClass( CLASS_TYPE_BARD, oEnt ) || + GetLevelByClass( CLASS_TYPE_CLERIC, oEnt ) || + GetLevelByClass( CLASS_TYPE_DRUID, oEnt ) || + GetLevelByClass( CLASS_TYPE_PALADIN, oEnt ) > 4 || + GetLevelByClass( CLASS_TYPE_RANGER, oEnt ) > 4 || + GetLevelByClass( CLASS_TYPE_SORCERER, oEnt ) || + GetLevelByClass( CLASS_TYPE_WIZARD, oEnt ) || + GetLocalInt( oEnt, "#CASTER" ) ) + { + return TRUE; + } + return FALSE; +} + +int DoAbilityCheck( int iAbil, int iDC, object oEnt=OBJECT_SELF ) +{ + if ( d20() + GetAbilityModifier( iAbil, oEnt ) >= iDC ) + { + return TRUE; + } + return FALSE; +} + +int DoCombatKnowledgeCheck( int iBAB=FALSE, int iDC=10, object oE=OBJECT_SELF ) +{ + int iM = iBAB == TRUE ? GetBaseAttackBonus( oE ) : GetAbilityModifier( ABILITY_INTELLIGENCE, oE ); + + if ( d20() + iM >= iDC ) + { + return TRUE; + } + return FALSE; +} + +float GetFriendFoeRatio( location lLoc, float fRad, object oEnt=OBJECT_SELF ) +{ + object oSub; + int iEnemies = 0; + int iFriends = 0; + + oSub = GetFirstObjectInShape( SHAPE_SPHERE, fRad, lLoc ); + while ( GetIsObjectValid( oSub ) ) + { + if ( !GetIsDead( oSub ) ) + { + if ( GetIsEnemy( oSub ) ) + { + iEnemies++; + } + else if ( !GetIsReactionTypeFriendly( oSub, oEnt ) && !GetIsObjectValid( GetMaster( oSub ) ) ) + { + iFriends++; + } + } + oSub = GetNextObjectInShape( SHAPE_SPHERE, fRad, lLoc ); + } + if ( !iFriends ) + { + //no friends in area, ensure that this will be considered a good choice + return 100.0; + } + return IntToFloat( iEnemies ) / iFriends; +} + +float GetFriendFoeTolerance( object oEnt=OBJECT_SELF ) +{ + float fTol = 2.0; + int iGE = GetAlignmentGoodEvil( oEnt ); + int iLC = GetAlignmentLawChaos( oEnt ); + + if ( iGE == ALIGNMENT_GOOD ) + { + fTol *= 2.0; + } + else if ( iGE == ALIGNMENT_EVIL ) + { + fTol *= 0.5; + } + + if ( iLC == ALIGNMENT_LAWFUL ) + { + fTol *= 2.0; + } + else if ( iLC == ALIGNMENT_CHAOTIC ) + { + fTol *= 0.5; + } + + return fTol; +} + +object GetNearestEnemyCaster( int iMaxLvl=20, int iMinLvl=1, object oEnt=OBJECT_SELF ) +{ + int iCnt = 1; + object oC = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( GetIsObjectValid( oC ) ) + { + if ( GetIsCaster( oC ) ) + { + break; + } + oC = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return oC; +} + +int GetAverageEnemyLevel( float fRad=60.0, object oEnt=OBJECT_SELF ) +{ + int iNum = 0; + int iHD = 0; + int iCnt = 1; + object oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( GetIsObjectValid( oT ) && GetDistanceBetween( oEnt, oT ) <= fRad ) + { + iHD += GetHitDice( oT ); + iNum++; + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + + if ( iNum ) + { + return iHD / iNum; + } + return 0; +} + +int GetSafeAverageEnemyLevel( float fRad=40.0, object oEnt=OBJECT_SELF ) +{ + int iNum = 0; + int iHD = 0; + int iHDTotal = 0; + int iMin = 100; + int iMax = 0; + int iCnt = 0; + int iLvl = 0; + float fHD; + float fLower, fUpper; + float fAvg = 0.0; + float fStd = 0.0; + object oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + + //build list of enemy hit dice + while ( GetIsObjectValid( oT ) && GetDistanceBetween( oEnt, oT ) <= fRad ) + { + iHD = GetHitDice( oT ); + iHDTotal += iHD; + iNum++; + if ( iHD < iMin ) + { + iMin = iHD; + } + if ( iHD > iMax ) + { + iMax = iHD; + } + //record the value + SetLocalInt( OBJECT_SELF, "#SAELDATA_" + IntToString( iNum ), iHD ); + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + + if ( iNum < 1 ) + { + //if we didn't count any enemies bail out here + iLvl = 0; + } + else + { + fAvg = IntToFloat( iHDTotal ) / iNum; + iLvl = FloatToInt( fAvg ); + + //check to see if pruning is necessary + if ( iMax - iMin > 5 ) + { + //wide range, may need some pruning + //get std dev + iCnt = 0; + iHD = GetLocalInt( OBJECT_SELF, "#SAELDATA_" + IntToString( ++iCnt ) ); + while ( iHD ) + { + fStd += pow( IntToFloat( iHD ) - fAvg, 2.0 ); + iHD = GetLocalInt( OBJECT_SELF, "#SAELDATA_" + IntToString( ++iCnt ) ); + } + fStd = sqrt( fStd / iNum ); + fLower = fAvg - fStd; + fUpper = fAvg + fStd; + iHDTotal = 0; + iCnt = 0; + iNum = 0; + iHD = GetLocalInt( OBJECT_SELF, "#SAELDATA_" + IntToString( ++iCnt ) ); + while ( iHD ) + { + fHD = IntToFloat( iHD ); + if ( fHD > fLower && fHD <= fUpper ) + { + iNum++; + iHDTotal += iHD; + } + iHD = GetLocalInt( OBJECT_SELF, "#SAELDATA_" + IntToString( ++iCnt ) ); + } + if ( !iNum ) + { + iLvl = iMax; + } + else + { + fAvg = IntToFloat( iHDTotal ) / iNum; + iLvl = FloatToInt( fAvg ); + } + } + } + //clean up local vars + iCnt = 0; + while ( GetLocalInt( OBJECT_SELF, "#SAELDATA_" + IntToString( ++iCnt ) ) ) + { + DeleteLocalInt( OBJECT_SELF, "#SAELDATA_" + IntToString( iCnt ) ); + } + if ( iLvl == 0 ) + { + return iMax; + } + return iLvl; +} + +object GetLeastMagicDefendedEnemy( float fRad=5.0, object oEnt=OBJECT_SELF ) +{ + struct sSpellDefStatus strMDef; + object oS; + object oC; + int iCnt = 0; + int iDef = 100000; + + oC = OBJECT_INVALID; + oS = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + while ( GetIsObjectValid( oS ) ) + { + strMDef = EvaluateSpellDefenses( oS ); + if ( strMDef.iTotal < iDef ) + { + oC = oS; + iDef = strMDef.iTotal; + } + oS = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return oC; +} + +vector GetTurningVector( object oEnt=OBJECT_SELF ) +{ + int iCnt1, iCnt2, iCnt3, iBestCnt; + float fRad = 20.0; + vector vT = Vector( 0.0, 0.0, 0.0 ); + vector vS = Vector( 0.0, 0.0, 0.0 ); + vector vU = GetPosition( oEnt ); + object oT1, oT2; + int iTurnLvl = GetTurningLevel( oEnt ); + + iCnt1 = 0; + iBestCnt = 0; + oT1 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, ++iCnt1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + //PrintString( "TU: " + GetName( oT1 ) ); + while ( GetIsObjectValid( oT1 ) && GetDistanceBetween( oEnt, oT1 ) <= 40.0f ) + { + iCnt2 = 0; + iCnt3 = 0; + if ( GetIsValidTurnTarget( oT1, iTurnLvl ) ) + { + //PrintString( "TUV: " + GetName( oT1 ) ); + if ( GetHasFeatEffect( FEAT_TURN_UNDEAD, oT1 ) == FALSE && GetCurrentAction( oT1 ) != ACTION_MOVETOPOINT ) + { + iCnt3 = 1; //starts at 1 to count oSub1 + vT = GetPosition ( oT1 ) - vU; + } + //oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + //this should not pick up dead creatures + while ( GetIsObjectValid( oT2 ) && GetDistanceBetween( oT1, oT2 ) <= fRad ) + { + //don't count them as target if they're on the move + if ( GetHasFeatEffect( FEAT_TURN_UNDEAD, oT2 ) == FALSE && GetCurrentAction( oT2 ) != ACTION_MOVETOPOINT ) + { + if ( GetIsValidTurnTarget( oT2, iTurnLvl ) ) + { + iCnt3++; + vT = vT + GetPosition( oT2 ) - vU; + } + } + //oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + if ( iCnt3 > iBestCnt ) + { + vS = vT / IntToFloat( iCnt3 ); + iBestCnt = iCnt3; + } + } + oT1 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, ++iCnt1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + if ( iBestCnt ) + { + return vS; + } + return Vector( 0.0, 0.0, 0.0 ); +} + +int GetIsValidTurnTarget( object oT, int iL=0, object oEnt=OBJECT_SELF ) +{ + int iElemental; + int iVermin; + int iConstructs; + int iOutsider; + int iRace; + int iTurn = 0; + + //compare hit dice of this target to my turning level, if hd > turning level +4 we can't turn it, abort + if ( GetHitDice( oT ) > iL + 4 ) + { + return 0; + } + + iElemental = GetHasFeat( FEAT_AIR_DOMAIN_POWER ) + GetHasFeat( FEAT_EARTH_DOMAIN_POWER ) + GetHasFeat( FEAT_FIRE_DOMAIN_POWER ) + GetHasFeat( FEAT_WATER_DOMAIN_POWER ); + iVermin = GetHasFeat( FEAT_PLANT_DOMAIN_POWER ) + GetHasFeat( FEAT_ANIMAL_COMPANION ); + iConstructs = GetHasFeat( FEAT_DESTRUCTION_DOMAIN_POWER ); + iOutsider = GetHasFeat( FEAT_GOOD_DOMAIN_POWER ) + GetHasFeat( FEAT_EVIL_DOMAIN_POWER ); + iRace = GetRacialType( oT ); + + if ( iRace == RACIAL_TYPE_UNDEAD ) + { + iTurn = 1; + } + else if ( iRace == RACIAL_TYPE_ELEMENTAL && iElemental ) + { + iTurn = 1; + } + else if ( iRace == RACIAL_TYPE_VERMIN && iVermin ) + { + iTurn = 1; + } + else if ( iRace == RACIAL_TYPE_CONSTRUCT && iConstructs) + { + iTurn = 1; + } + else if ( iRace == RACIAL_TYPE_OUTSIDER && iOutsider ) + { + iTurn = 1; + } + + return iTurn; +} + +int GetPotionHealAmount( object oP ) +{ + int iHeal = 0; + string sP = GetResRef( oP ); + + if ( sP == "nw_it_mpotion002" ) + { + //cure light wounds + iHeal = 10; + } + else if ( sP == "nw_it_mpotion021" ) + { + //cure moderate wounds + iHeal = 20; + } + else if ( sP == "nw_it_mpotion003" ) + { + //cure serious wounds + iHeal = 30; + } + else if ( sP == "nw_it_mpotion004" ) + { + //cure critical wounds + iHeal = 40; + } + else if ( sP == "nw_it_mpotion013" ) + { + //heal + iHeal = 60; + } + return iHeal; +} + +int GetTalentPotionHealAmount( talent tP ) +{ + int iHeal = 0; + int iP = GetIdFromTalent( tP ); + + if ( iP == 32 ) + { + //cure light wounds + iHeal = 10; + } + else if ( iP == 34 ) + { + //cure moderate wounds + iHeal = 20; + } + else if ( iP == 35 ) + { + //cure serious wounds + iHeal = 30; + } + else if ( iP == 31 ) + { + //cure critical wounds + iHeal = 40; + } + else if ( iP == 79 ) + { + //heal + iHeal = 60; + } + return iHeal; +} + +/* +==================== +GetAreaHealTarget: + +Looks for a suitable group of allies to cast a particular group healing spell on. +==================== +*/ +vector GetAreaHealTarget( float fRad=0.0, int iH=0, object oEnt=OBJECT_SELF ) +{ + int iCnt1, iCnt2, iCnt3, iBestCnt, iDam; + vector vT = Vector( 0.0, 0.0, 0.0 ); + vector vS = Vector( 0.0, 0.0, 0.0 ); + vector vU = GetPosition( oEnt ); + object oT1, oT2; + float fMaxSearchRad = 30.0; + + iCnt1 = 0; + iBestCnt = 0; + oT1 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, ++iCnt1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + while ( GetIsObjectValid( oT1 ) && GetDistanceBetween( oEnt, oT1 ) <= fMaxSearchRad ) + { + iCnt2 = 0; + iCnt3 = 0; + iDam = GetMaxHitPoints( oT1 ) - GetCurrentHitPoints( oT1 ); + if ( iDam >= iH ) + { + if ( GetCurrentAction( oT1 ) != ACTION_MOVETOPOINT ) + { + iCnt3 = 1; //starts at 1 to count oSub1 + vT = GetPosition ( oT1 ) - vU; + } + oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + //this should not pick up dead creatures + while ( GetIsObjectValid( oT2 ) && GetDistanceBetween( oT1, oT2 ) <= fRad ) + { + //don't count them as target if they're on the move + if ( GetCurrentAction( oT2 ) != ACTION_MOVETOPOINT ) + { + iDam = GetMaxHitPoints( oT2 ) - GetCurrentHitPoints( oT2 ); + if ( iDam <= iH ) + { + iCnt3++; + vT = vT + GetPosition( oT2 ) - vU; + } + } + oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + if ( iCnt3 > iBestCnt ) + { + vS = vT / IntToFloat( iCnt3 ); + iBestCnt = iCnt3; + } + } + oT1 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, ++iCnt1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + if ( iBestCnt ) + { + return vS; + } + return Vector( 0.0, 0.0, 0.0 ); +} + +float GetAllyDamageStats( location lT, float fRad=0.0, object oEnt=OBJECT_SELF ) +{ + int iCnt = 0; + int iDam = 0; + float fDam = 0.0; + object oS = GetNearestObjectToLocation( OBJECT_TYPE_CREATURE, lT, ++iCnt ); + + while ( GetIsObjectValid( oS ) && GetDistanceBetween( oEnt, oS ) < fRad ) + { + iDam += GetMaxHitPoints( oS ) - GetCurrentHitPoints( oS ); + oS = GetNearestObjectToLocation( OBJECT_TYPE_CREATURE, lT, ++iCnt ); + } + iCnt--; + if ( iCnt ) + { + fDam = IntToFloat( iDam ) / IntToFloat( iCnt ); + } + return fDam; +} + +object GetMostBuffedEnemy( float fRad=10.0, object oEnt=OBJECT_SELF ) +{ + int iBuffs; + int iMax = 0; + int iCnt = 0; + object oT; + object oM = OBJECT_INVALID; + effect eT; + + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + while ( GetIsObjectValid( oT ) && GetDistanceBetween( OBJECT_SELF, oT ) < fRad ) + { + iBuffs = 0; + eT = GetFirstEffect( oT ); + while ( GetIsEffectValid( eT ) ) + { + //try this to narrow down to actual "buffs" + if ( GetEffectSubType( eT ) == SUBTYPE_MAGICAL && GetEffectDurationType( eT ) == DURATION_TYPE_TEMPORARY ) + { + iBuffs += GetIsBuffEffect( eT ); + } + eT = GetNextEffect( oT ); + } + iBuffs += GetIsObjectValid( GetAssociate( ASSOCIATE_TYPE_SUMMONED, oT ) ); + iBuffs += GetIsObjectValid( GetAssociate( ASSOCIATE_TYPE_DOMINATED, oT ) ); + iBuffs += GetIsObjectValid( GetAssociate( ASSOCIATE_TYPE_FAMILIAR, oT ) ); + iBuffs += GetIsObjectValid( GetAssociate( ASSOCIATE_TYPE_ANIMALCOMPANION, oT ) ); + if ( iBuffs > iMax ) + { + iMax = iBuffs; + oM = oT; + } + + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return oM; +} + +object GetLeastBuffedAlly( float fRad=10.0, int iMelee=FALSE, object oEnt=OBJECT_SELF ) +{ + int iBuffs; + int iMin = 100; + int iCnt = 0; + object oT; + object oM = OBJECT_INVALID; + effect eT; + + oT = oEnt; //start with self + while ( GetIsObjectValid( oT ) && GetDistanceBetween( OBJECT_SELF, oT ) < fRad ) + { + if ( !GetIsObjectValid( GetMaster( oT ) ) ) + { + //don't consider associates + if ( iMelee && ( GetDistanceBetween( oEnt, oT ) < 7.5 || !GetHostileCount( 5.0, oT ) ) ) + { + //don't buff those in the thick of melee + iBuffs = 0; + eT = GetFirstEffect( oT ); + while ( GetIsEffectValid( eT ) ) + { + //try this to narrow down to actual "buffs" + if ( GetEffectSubType( eT ) == SUBTYPE_MAGICAL && GetEffectDurationType( eT ) == DURATION_TYPE_TEMPORARY ) + { + iBuffs += GetIsBuffEffect( eT ); + } + eT = GetNextEffect( oT ); + } + iBuffs += GetIsObjectValid( GetAssociate( ASSOCIATE_TYPE_SUMMONED, oT ) ); + iBuffs += GetIsObjectValid( GetAssociate( ASSOCIATE_TYPE_DOMINATED, oT ) ); + iBuffs += GetIsObjectValid( GetAssociate( ASSOCIATE_TYPE_FAMILIAR, oT ) ); + iBuffs += GetIsObjectValid( GetAssociate( ASSOCIATE_TYPE_ANIMALCOMPANION, oT ) ); + if ( iBuffs < iMin ) + { + iMin = iBuffs; + oM = oT; + } + } + } + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oEnt, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return oM; +} + +int GetIsBuffEffect( effect eT ) +{ + if ( GetEffectSpellId( eT ) == -1 ) + { + return FALSE; + } + if ( GetEffectSpellId( eT ) == SPELL_GREATER_SPELL_MANTLE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_PREMONITION ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_MIND_BLANK ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_SPELL_MANTLE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_SHADOW_SHIELD ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_PROTECTION_FROM_SPELLS ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_TRUE_SEEING ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_TENSERS_TRANSFORMATION ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_MASS_HASTE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_GREATER_STONESKIN ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_GLOBE_OF_INVULNERABILITY ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_ETHEREAL_VISAGE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_LESSER_SPELL_MANTLE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_LESSER_MIND_BLANK ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_ENERGY_BUFFER ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_ELEMENTAL_SHIELD ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_STONESKIN ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_POLYMORPH_SELF ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_MINOR_GLOBE_OF_INVULNERABILITY ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_IMPROVED_INVISIBILITY ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_PROTECTION_FROM_ELEMENTS ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_MAGIC_CIRCLE_AGAINST_GOOD ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_MAGIC_CIRCLE_AGAINST_EVIL ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_MAGIC_CIRCLE_AGAINST_CHAOS ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_MAGIC_CIRCLE_AGAINST_LAW ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_INVISIBILITY_SPHERE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_HASTE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_CLARITY ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_CLAIRAUDIENCE_AND_CLAIRVOYANCE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_SEE_INVISIBILITY ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_RESIST_ELEMENTS ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_OWLS_WISDOM ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_INVISIBILITY ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_GHOSTLY_VISAGE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_FOXS_CUNNING ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_ENDURANCE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_EAGLE_SPLEDOR ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_DARKVISION ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_CATS_GRACE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_BULLS_STRENGTH ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_PROTECTION_FROM_GOOD ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_PROTECTION_FROM_EVIL ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_PROTECTION__FROM_CHAOS ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_PROTECTION_FROM_LAW ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_MAGE_ARMOR ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_FREEDOM_OF_MOVEMENT ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_DEATH_WARD ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_PRAYER ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_AID ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_VIRTUE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_BLESS ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_SHAPECHANGE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_NATURES_BALANCE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_AURA_OF_VITALITY ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_REGENERATE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_SPELL_RESISTANCE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_AWAKEN ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_BARKSKIN ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_RESISTANCE ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_HOLY_AURA ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_UNHOLY_AURA ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_DIVINE_POWER ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_NEGATIVE_ENERGY_PROTECTION ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_SANCTUARY ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_REMOVE_FEAR ) + { + return TRUE; + } + if ( GetEffectSpellId( eT ) == SPELL_WAR_CRY ) + { + return TRUE; + } + return FALSE; +} + +int GetAverageEffectCasterLevel( object oT=OBJECT_SELF ) +{ + int iT = 0; + int iC = 0; + int iL = 0; + object oE; + object oB = OBJECT_INVALID; + effect eT = GetFirstEffect( oT ); + + while ( GetIsEffectValid( eT ) ) + { + //try this to narrow down to actual "buffs" + if ( GetEffectSubType( eT ) == SUBTYPE_MAGICAL && GetEffectDurationType( eT ) == DURATION_TYPE_TEMPORARY ) + { + if ( GetIsBuffEffect( eT ) ) + { + iC += 1; + //try this to reduce redundant checking + oE = GetEffectCreator( eT ); + if ( GetIsObjectValid( oE ) ) + { + if ( oE != oB ) + { + //new caster + iL = GetMaxDispelCasterLevel( oE ); + oB = oE; + } + iT += iL; + iC += 1; + } + else + { + //something has happened to effect creator, assume the worst + iT += 20; + iC += 1; + } + } + } + eT = GetNextEffect( oT ); + } + if ( iC ) + { + return iT / iC; + } + return 0; +} + +object GetStrongestEnemySummonedAssociateOwner( float fRad=10.0, object oEnt=OBJECT_SELF ) +{ + object oT, oC, oD, oM; + int iCnt = 0; + int iHD = 0; + int iT; + + oM = OBJECT_INVALID; + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + while ( GetIsObjectValid( oT ) && GetDistanceBetween( oEnt, oT ) < fRad ) + { + if ( GetIsObjectValid( oC = GetAssociate( ASSOCIATE_TYPE_SUMMONED, oT ) ) ) + { + if ( ( iT = GetHitDice( oC ) ) > iHD ) + { + oD = oC; + iHD = iT; + } + } + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + if ( GetIsObjectValid( oD ) ) + { + oM = GetMaster( oD ); + } + return oM; +} + +vector GetEnemySummonedAssociatesVector( float fRad=10.0, object oEnt=OBJECT_SELF ) +{ + int iCnt1, iCnt2, iCnt3, iBestCnt; + float fRad = 20.0; + vector vT = Vector( 0.0, 0.0, 0.0 ); + vector vS = Vector( 0.0, 0.0, 0.0 ); + vector vU = GetPosition( oEnt ); + object oT1, oT2, oM; + + iCnt1 = 0; + iBestCnt = 0; + oT1 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, ++iCnt1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + //PrintString( "GES: " + GetName( oT1 ) ); + while ( GetIsObjectValid( oT1 ) && GetDistanceBetween( oEnt, oT1 ) <= 30.0f ) + { + iCnt2 = 0; + iCnt3 = 0; + oM = GetMaster( oT1 ); + if ( GetIsObjectValid( oM ) && GetAssociate( ASSOCIATE_TYPE_SUMMONED, oM ) == oT1 ) + { + //PrintString( "GESV: " + GetName( oT1 ) ); + if ( GetCurrentAction( oT1 ) != ACTION_MOVETOPOINT ) + { + iCnt3 = 1; //starts at 1 to count oSub1 + vT = GetPosition ( oT1 ) - vU; + } + //oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + //this should not pick up dead creatures + while ( GetIsObjectValid( oT2 ) && GetDistanceBetween( oT1, oT2 ) <= fRad ) + { + //don't count them as target if they're on the move + if ( GetCurrentAction( oT2 ) != ACTION_MOVETOPOINT ) + { + oM = GetMaster( oT2 ); + if ( GetIsObjectValid( oM ) && GetAssociate( ASSOCIATE_TYPE_SUMMONED, oM ) == oT2 ) + { + iCnt3++; + vT = vT + GetPosition( oT2 ) - vU; + } + } + //oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + if ( iCnt3 > iBestCnt ) + { + vS = vT / IntToFloat( iCnt3 ); + iBestCnt = iCnt3; + } + } + oT1 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, ++iCnt1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + if ( iBestCnt ) + { + return vS; + } + return Vector( 0.0, 0.0, 0.0 ); +} + +vector GetEnemyPlanarVector( float fRad=10.0, object oEnt=OBJECT_SELF ) +{ + int iCnt1, iCnt2, iCnt3, iBestCnt; + float fRad = 20.0; + vector vT = Vector( 0.0, 0.0, 0.0 ); + vector vS = Vector( 0.0, 0.0, 0.0 ); + vector vU = GetPosition( oEnt ); + object oT1, oT2, oM; + + iCnt1 = 0; + iBestCnt = 0; + oT1 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, ++iCnt1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + //PrintString( "GEP: " + GetName( oT1 ) ); + while ( GetIsObjectValid( oT1 ) && GetDistanceBetween( oEnt, oT1 ) <= 30.0f ) + { + iCnt2 = 0; + iCnt3 = 0; + if ( GetRacialType( oT1 ) == RACIAL_TYPE_OUTSIDER || GetRacialType( oT1 ) == RACIAL_TYPE_ELEMENTAL ) + { + //PrintString( "GEPV: " + GetName( oT1 ) ); + if ( GetCurrentAction( oT1 ) != ACTION_MOVETOPOINT ) + { + iCnt3 = 1; //starts at 1 to count oSub1 + vT = GetPosition ( oT1 ) - vU; + } + //oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + //this should not pick up dead creatures + while ( GetIsObjectValid( oT2 ) && GetDistanceBetween( oT1, oT2 ) <= fRad ) + { + //don't count them as target if they're on the move + if ( GetCurrentAction( oT2 ) != ACTION_MOVETOPOINT ) + { + if ( GetRacialType( oT2 ) == RACIAL_TYPE_OUTSIDER || GetRacialType( oT2 ) == RACIAL_TYPE_ELEMENTAL ) + { + iCnt3++; + vT = vT + GetPosition( oT2 ) - vU; + } + } + //oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + oT2 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oT1, ++iCnt2, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + if ( iCnt3 > iBestCnt ) + { + vS = vT / IntToFloat( iCnt3 ); + iBestCnt = iCnt3; + } + } + oT1 = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, ++iCnt1, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + if ( iBestCnt ) + { + return vS; + } + return Vector( 0.0, 0.0, 0.0 ); +} + +object GetVisionDeprived( float fRad=10.0, object oT=OBJECT_SELF ) +{ + object oS = oT; + object oA; + object oP; + int iCnt = 0; + int iSpell = 0; + + while ( GetIsObjectValid( oS ) && GetDistanceBetween( oT, oS ) < fRad && !GetIsObjectValid( oP ) ) + { + if ( !GetIsObjectValid( GetLocalObject( oS, "#VISION" ) ) && ( iSpell = GetVisionSpellNeeded( oS ) ) ) + { + if ( GetIsObjectValid( GetMaster( oS ) ) ) + { + //associates + oA = oS; + } + else + { + //"real" allies + oP = oS; + } + } + oS = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oT, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + if ( GetIsObjectValid( oP ) ) + { + //"real" allies take preference over associates + return oP; + } + return oA; +} + +object GetLeastDefendedAlly( float fRad=10.0, object oC=OBJECT_SELF ) +{ + object oT, oS; + int iD; + int iMinD; + int iCnt = 0; + struct sPhysDefStatus strP; + struct sSpellDefStatus strM; + + iMinD = 100; + oS = oC; //start with the caster + while ( GetIsObjectValid( oS ) && GetDistanceBetween( oC, oS ) < fRad ) + { + if ( !GetIsObjectValid( GetMaster( oS ) ) ) + { + //don't defend associates + strP = EvaluatePhysicalDefenses( oS ); + strM = EvaluateSpellDefenses( oS ); + iD = strM.iTotal < strP.iTotal ? strM.iTotal : strP.iTotal; + oT = iD < iMinD ? oS : oT; + iMinD = iD < iMinD ? iD : iMinD; + } + oS = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oC, ++iCnt, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return oT; +} + +int GetHasRangedCapability( object oEnt=OBJECT_SELF ) +{ + object oI = GetFirstItemInInventory(); + int iR = 0; + + while ( GetIsObjectValid( oI ) && !iR ) + { + iR = GetIsRangedWeapon( oI ); + oI = GetNextItemInInventory(); + } + return iR; +} + +int GetIsRangedWeapon( object oW ) +{ + int iS; + + if ( GetIsObjectValid( oW ) ) + { + iS = GetBaseItemType( oW ); + if ( iS == BASE_ITEM_DART || iS == BASE_ITEM_HEAVYCROSSBOW || iS == BASE_ITEM_LIGHTCROSSBOW || + iS == BASE_ITEM_LONGBOW || iS == BASE_ITEM_SHORTBOW || iS == BASE_ITEM_SHURIKEN || + iS == BASE_ITEM_SLING || iS == BASE_ITEM_THROWINGAXE ) + { + return TRUE; + } + } + return FALSE; +} + +object GetMostDistantEnemy( float fR=30.0, int iS=TRUE, object oC=OBJECT_SELF ) +{ + int iCnt = 1; + object oD = OBJECT_INVALID; + object oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oC, iCnt, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( GetIsObjectValid( oT ) && GetDistanceBetween( oC, oT ) <= fR ) + { + if ( GetObjectSeen( oT, oC ) >= iS ) + { + oD = oT; + } + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oC, ++iCnt, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return oD; +} + +vector GetSaves( object oT=OBJECT_SELF ) +{ + vector vS = Vector( 0.0, 0.0, 0.0 ); + //int iC1, iC2, iC3, iL1, iL2, iL3; + //int iCon, iDex, iWis; + + /* + iC1 = GetClassByPosition( 1, oT ); + iC2 = GetClassByPosition( 2, oT ); + iC3 = GetClassByPosition( 3, oT ); + iL1 = GetLevelByPosition( 1, oT ); + iL2 = GetLevelByPosition( 2, oT ); + iL3 = GetLevelByPosition( 3, oT ); + iCon = GetAbilityModifier( ABILITY_CONSTITUTION, oT ); + iDex = GetAbilityModifier( ABILITY_DEXTERITY, oT ); + iWis = GetAbilityModifier( ABILITY_WISDOM, oT ); + */ + /* + vS += GetSavesByClass( iC1, iL1 ); + vS += GetSavesByClass( iC2, iL2 ); + vS += GetSavesByClass( iC3, iL3 ); + + vS.x += iCon + 2 * GetHasFeat( FEAT_GREAT_FORTITUDE, oT ); + vS.y += iDex + 2 * GetHasFeat( FEAT_LIGHTNING_REFLEXES, oT ); + vS.z += iWis + 2 * GetHasFeat( FEAT_IRON_WILL, oT ); + */ + vS.x = IntToFloat( GetFortitudeSavingThrow( oT ) ); + vS.y = IntToFloat( GetReflexSavingThrow( oT ) ); + vS.z = IntToFloat( GetWillSavingThrow( oT ) ); + + return vS; +} + +vector GetBaseSavesByClass( int iC, int iL ) +{ + vector vS = Vector( 0.0, 0.0, 0.0 ); + + if ( iC != CLASS_TYPE_INVALID ) + { + //fort save + if ( iC == CLASS_TYPE_ANIMAL || iC == CLASS_TYPE_BARBARIAN || iC == CLASS_TYPE_BEAST || + iC == CLASS_TYPE_CLERIC || iC == CLASS_TYPE_DRAGON || iC == CLASS_TYPE_DRUID || iC == CLASS_TYPE_FIGHTER || + iC == CLASS_TYPE_GIANT || iC == CLASS_TYPE_HUMANOID || iC == CLASS_TYPE_MAGICAL_BEAST || + iC == CLASS_TYPE_MONK || iC == CLASS_TYPE_OUTSIDER || iC == CLASS_TYPE_PALADIN || iC == CLASS_TYPE_RANGER || + iC == CLASS_TYPE_SHAPECHANGER || iC == CLASS_TYPE_VERMIN ) + { + vS.x += 2.0 + IntToFloat( iL / 2 ); + } + else + { + vS.x += IntToFloat( iL / 3 ); + } + //reflex save + if ( iC == CLASS_TYPE_ANIMAL || iC == CLASS_TYPE_BARD || iC == CLASS_TYPE_BEAST || iC == CLASS_TYPE_DRAGON || + iC == CLASS_TYPE_FEY || iC == CLASS_TYPE_MAGICAL_BEAST || iC == CLASS_TYPE_MONK || iC == CLASS_TYPE_MONSTROUS || + iC == CLASS_TYPE_OUTSIDER || iC == CLASS_TYPE_ROGUE || iC == CLASS_TYPE_SHAPECHANGER ) + { + vS.y += 2.0 + IntToFloat( iL / 2 ); + } + else + { + vS.y += IntToFloat( iL / 3 ); + } + //will save + if ( iC == CLASS_TYPE_ABERRATION || iC == CLASS_TYPE_BARD || iC == CLASS_TYPE_CLERIC || iC == CLASS_TYPE_DRAGON || + iC == CLASS_TYPE_DRUID || iC == CLASS_TYPE_ELEMENTAL || iC == CLASS_TYPE_FEY || iC == CLASS_TYPE_MONK || + iC == CLASS_TYPE_MONSTROUS || iC == CLASS_TYPE_OUTSIDER || iC == CLASS_TYPE_SHAPECHANGER || + iC == CLASS_TYPE_SORCERER || iC == CLASS_TYPE_WIZARD ) + { + vS.z += 2.0 + IntToFloat( iL / 2 ); + } + else + { + vS.z += IntToFloat( iL / 3 ); + } + } + + return vS; +} + +vector GetAverageEnemySaveInArea( vector vP, float fR=5.0, object oC=OBJECT_SELF ) +{ + vector vS = Vector( 0.0, 0.0, 0.0 ); + location lL = Location( GetArea( oC ), GetPosition( oC ) + vP, VectorToAngle( vP ) ); + int iCnt = 0; + object oT; + + oT = GetFirstObjectInShape( SHAPE_SPHERE, fR, lL ); + while ( GetIsObjectValid( oT ) ) + { + if ( GetIsEnemy( oT ) && ( GetObjectSeen( oT, oC ) || GetObjectHeard( oT, oC ) ) ) + { + iCnt++; + vS += GetSaves( oT ); + } + oT = GetNextObjectInShape( SHAPE_SPHERE, fR, lL ); + } + if ( iCnt ) + { + vS.x = vS.x / IntToFloat( iCnt ); + vS.y = vS.y / IntToFloat( iCnt ); + vS.z = vS.z / IntToFloat( iCnt ); + } + return vS; +} + +//Function imported from SoU x0_i0_spells +int IsImmuneToPetrification(object oCreature) +{ + int nAppearance = GetAppearanceType(oCreature); + int bFlesh = FALSE; + switch (nAppearance) + { + case APPEARANCE_TYPE_BASILISK: + case APPEARANCE_TYPE_COCKATRICE: + case APPEARANCE_TYPE_MEDUSA: + case APPEARANCE_TYPE_ALLIP: + case APPEARANCE_TYPE_ELEMENTAL_AIR: + case APPEARANCE_TYPE_ELEMENTAL_AIR_ELDER: + case APPEARANCE_TYPE_ELEMENTAL_EARTH: + case APPEARANCE_TYPE_ELEMENTAL_EARTH_ELDER: + case APPEARANCE_TYPE_ELEMENTAL_FIRE: + case APPEARANCE_TYPE_ELEMENTAL_FIRE_ELDER: + case APPEARANCE_TYPE_ELEMENTAL_WATER: + case APPEARANCE_TYPE_ELEMENTAL_WATER_ELDER: + case APPEARANCE_TYPE_GOLEM_STONE: + case APPEARANCE_TYPE_GOLEM_IRON: + case APPEARANCE_TYPE_GOLEM_CLAY: + case APPEARANCE_TYPE_GOLEM_BONE: + case APPEARANCE_TYPE_GORGON: + case APPEARANCE_TYPE_HEURODIS_LICH: + case APPEARANCE_TYPE_LANTERN_ARCHON: + case APPEARANCE_TYPE_SHADOW: + case APPEARANCE_TYPE_SHADOW_FIEND: + case APPEARANCE_TYPE_SHIELD_GUARDIAN: + case APPEARANCE_TYPE_SKELETAL_DEVOURER: + case APPEARANCE_TYPE_SKELETON_CHIEFTAIN: + case APPEARANCE_TYPE_SKELETON_COMMON: + case APPEARANCE_TYPE_SKELETON_MAGE: + case APPEARANCE_TYPE_SKELETON_PRIEST: + case APPEARANCE_TYPE_SKELETON_WARRIOR: + case APPEARANCE_TYPE_SKELETON_WARRIOR_1: + case APPEARANCE_TYPE_SPECTRE: + case APPEARANCE_TYPE_WILL_O_WISP: + case APPEARANCE_TYPE_WRAITH: + case APPEARANCE_TYPE_BAT_HORROR: + + bFlesh = TRUE; + } + return bFlesh; +} + +object GetNearestAddledEnemy( float fRange=10.0, object oE=OBJECT_SELF ) +{ + object oS = OBJECT_INVALID; + int iCnt = 0; + int iEff = 0; + + oS = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oE, ++iCnt, CREATURE_TYPE_IS_ALIVE, TRUE, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ); + while ( GetIsObjectValid( oS ) && GetDistanceBetween( oE, oS ) < fRange ) + { + iEff = GetEffectsOnObject( oS ); + //can't extract from petrified enemies + if ( ( iEff & NO_EFFECT_PETRIFY ) == 0 ) + { + if ( iEff & NO_EFFECT_STUNNED || iEff & NO_EFFECT_DAZED || iEff & NO_EFFECT_PARALYZE || iEff & NO_EFFECT_SLEEP || + iEff & NO_EFFECT_CONFUSED ) + { + //creature is an addled enemy + return oS; + } + } + oS = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oE, ++iCnt, CREATURE_TYPE_IS_ALIVE, TRUE, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ); + } + return OBJECT_INVALID; +} + +object GetNearestAddledEnemyNoExtractor( float fRange=10.0, object oE=OBJECT_SELF ) +{ + object oS = OBJECT_INVALID; + int iCnt = 0; + int iEff = 0; + + oS = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oE, ++iCnt, CREATURE_TYPE_IS_ALIVE, TRUE, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ); + while ( GetIsObjectValid( oS ) && GetDistanceBetween( oE, oS ) < fRange ) + { + iEff = GetEffectsOnObject( oS ); + //can't extract from petrified enemies + if ( IsBrainExtractable( oS ) ) + { + if ( iEff & NO_EFFECT_STUNNED || iEff & NO_EFFECT_DAZED || iEff & NO_EFFECT_PARALYZE || iEff & NO_EFFECT_SLEEP ) + { + //creature is an addled enemy + return oS; + } + } + oS = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oE, ++iCnt, CREATURE_TYPE_IS_ALIVE, TRUE, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN ); + } + return OBJECT_INVALID; +} + +int IsBrainExtractable( object oT ) +{ + int iEff, iR; + int iE = TRUE; + + if ( GetIsObjectValid( oT ) ) + { + iEff = GetEffectsOnObject( oT ); + iR = GetRacialType( oT ); + + if ( iEff & NO_EFFECT_PETRIFY || GetLocalInt( oT, "#EXTRACTING" ) || + iR == RACIAL_TYPE_CONSTRUCT || iR == RACIAL_TYPE_ELEMENTAL || iR == RACIAL_TYPE_UNDEAD || iR == RACIAL_TYPE_VERMIN ) + { + iE = FALSE; + } + } + return iE; +} + +int GetCreatureAttackBonus( object oC=OBJECT_SELF ) +{ + int iA = GetBaseAttackBonus( oC ); + if ( GetHasFeat( FEAT_WEAPON_FINESSE, oC ) ) + { + iA += GetAbilityModifier( ABILITY_DEXTERITY, oC ); + } + else + { + iA += GetAbilityModifier( ABILITY_STRENGTH, oC ); + } + iA += GetHasFeat( FEAT_WEAPON_FOCUS_CREATURE, oC ); + return iA; +} + +int GetGrappleBonus( object oC=OBJECT_SELF ) +{ + return GetBaseAttackBonus( oC ) + GetAbilityModifier( ABILITY_STRENGTH, oC ) + 4 * ( GetCreatureSize( oC ) - CREATURE_SIZE_MEDIUM ); +} + +int GetIsMaster( object oM, object oE=OBJECT_SELF ) +{ + if ( GetIsObjectValid( oM ) && GetMaster( oE ) == oM ) + { + return TRUE; + } + return FALSE; +} + +int GetIsPerceived( object oP, int iP=0, object oE=OBJECT_SELF ) +{ + float fR = 0.0; + int iR = FALSE; + + if ( !GetIsObjectValid( oP ) ) + { + return FALSE; + } + + if ( iP == NO_PERCEPTION_SEEN || iP == 0 ) + { + fR = GetPerceptionRange( NO_PERCEPTION_SEEN ); + if ( GetObjectSeen( oP ) && GetDistanceBetween( oE, oP ) < fR ) + { + iR = TRUE; + } + } + if ( iP == NO_PERCEPTION_HEARD || iP == 0 ) + { + fR = GetPerceptionRange( NO_PERCEPTION_HEARD ); + if ( GetObjectHeard( oP ) && GetDistanceBetween( oE, oP ) < fR ) + { + iR = TRUE; + } + } + if ( iP == NO_PERCEPTION_VANISHED || iP == 0 ) + { + fR = GetPerceptionRange( NO_PERCEPTION_VANISHED ); + if ( !GetIsPerceived( oP, NO_PERCEPTION_SEEN ) && !GetIsPerceived( oP, NO_PERCEPTION_HEARD ) && GetDistanceBetween( oE, oP ) < fR ) + { + iR = TRUE; + } + } + //return TRUE; + return iR; +} + +object GetNearestPerceivedCreature( int iP=NO_PERCEPTION_SEEN, object oE=OBJECT_SELF ) +{ + object oP; + + //NOT FINISHED + + return oP; +} + +object GetNearestActiveAlly( object oE=OBJECT_SELF ) +{ + int iCnt = 0; + object oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, ++iCnt, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( GetIsObjectValid( oT ) && !GetLocalInt( oT, "#ACTIVE" ) ) + { + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, OBJECT_SELF, ++iCnt, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return oT; +} + +object GetFurthestActiveAlly( float fD=50.0, object oE=OBJECT_SELF ) +{ + int iCnt = 0; + object oA; + object oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oE, ++iCnt, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( GetIsObjectValid( oT ) && GetDistanceBetween( oE, oT ) < fD ) + { + if ( GetLocalInt( oT, "#ACTIVE" ) ) + { + oA = oT; + } + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_FRIEND, oE, ++iCnt, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + return oA; +} + +int EstimateAttackBonus( object oC=OBJECT_SELF ) +{ + int iA = GetBaseAttackBonus( oC ); + object oR = GetItemInSlot( INVENTORY_SLOT_RIGHTHAND ); + object oL = GetItemInSlot( INVENTORY_SLOT_LEFTHAND ); + + //weapon focus + iA += GetHasWeaponFocus( oR ); + + //strength bonus or weapon finesse + if ( GetHasFeat( FEAT_WEAPON_FINESSE, oC ) && GetIsLightWeapon( oR, TRUE ) ) + { + iA += GetAbilityModifier( ABILITY_DEXTERITY, oC ); + } + else + { + iA += GetAbilityModifier( ABILITY_STRENGTH, oC ); + } + + //dual wielding modifiers + if ( ( GetIsWeapon( oR ) && GetIsWeapon( oL ) ) || GetIsDoubleWeapon( oR ) ) + { + //dual wielding + iA += GetDualWieldingPenalty( oC, oL ); + } + + return iA; +} + +int GetDualWieldingPenalty( object oC=OBJECT_SELF, object oR=OBJECT_INVALID, object oL=OBJECT_INVALID ) +{ + int iL = GetIsLightWeapon( oL ); + int iA = GetHasFeat( FEAT_AMBIDEXTERITY, oC ); + int iT = GetHasFeat( FEAT_TWO_WEAPON_FIGHTING, oC ); + int iP = 0; + + if ( !GetIsObjectValid( oL ) ) + { + //no weapon in left hand + if ( GetIsDoubleWeapon( oR ) ) + { + //right hand weapon is double weapon, effectively light offhand + iL = 1; + } + else + { + //not wielding an offhand weapon, not dual wielding, no penalty, finish here + return 0; + } + } + + if ( iA && iT ) + { + //ambidex, two weapon fighting + if ( iL ) + { + //light offhand + iP = -2; + } + else + { + //non-light offhand + iP = -4; + } + } + else if ( iA ) //no iT + { + //ambidex, no two weapon + if ( iL ) + { + //light offhand + iP = -4; + } + else + { + //non-light offhand + iP = -6; + } + } + else if ( iT ) //no iA + { + //two weapon, no ambidex + if ( iL ) + { + //light offhand + iP = -2; + } + else + { + //non-light offhand + -4; + } + } + else //no iA, no iT + { + //no two weapon, no ambidex + if ( iL ) + { + //light offhand + iP = -4; + } + else + { + //non-light offhand + iP = -6; + } + } + return iP; +} + +int GetHasWeaponFocus( object oR, object oC=OBJECT_SELF ) +{ + int iF = 0; + + switch ( GetBaseItemType( oR ) ) + { + case BASE_ITEM_BASTARDSWORD: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_BASTARD_SWORD, oC ); + break; + case BASE_ITEM_BATTLEAXE: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_BATTLE_AXE, oC ); + break; + case BASE_ITEM_CLUB: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_CLUB, oC ); + break; + case BASE_ITEM_DAGGER: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_DAGGER, oC ); + break; + case BASE_ITEM_DART: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_DART, oC ); + break; + case BASE_ITEM_DIREMACE: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_DIRE_MACE, oC ); + break; + case BASE_ITEM_DOUBLEAXE: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_DOUBLE_AXE, oC ); + break; + case BASE_ITEM_GREATAXE: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_GREAT_AXE, oC ); + break; + case BASE_ITEM_GREATSWORD: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_GREAT_SWORD, oC ); + break; + case BASE_ITEM_HALBERD: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_HALBERD, oC ); + break; + case BASE_ITEM_HANDAXE: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_HAND_AXE, oC ); + break; + case BASE_ITEM_HEAVYCROSSBOW: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_HEAVY_CROSSBOW, oC ); + break; + case BASE_ITEM_HEAVYFLAIL: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_HEAVY_FLAIL, oC ); + break; + case BASE_ITEM_KAMA: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_KAMA, oC ); + break; + case BASE_ITEM_KATANA: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_KATANA, oC ); + break; + case BASE_ITEM_KUKRI: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_KUKRI, oC ); + break; + case BASE_ITEM_LIGHTFLAIL: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_LIGHT_FLAIL, oC ); + break; + case BASE_ITEM_LIGHTHAMMER: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_LIGHT_HAMMER, oC ); + break; + case BASE_ITEM_LIGHTMACE: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_LIGHT_MACE, oC ); + break; + case BASE_ITEM_LONGBOW: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_LONGBOW, oC ); + break; + case BASE_ITEM_LONGSWORD: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_LONG_SWORD, oC ); + break; + case BASE_ITEM_MORNINGSTAR: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_MORNING_STAR, oC ); + break; + case BASE_ITEM_QUARTERSTAFF: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_STAFF, oC ); + break; + case BASE_ITEM_RAPIER: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_RAPIER, oC ); + break; + case BASE_ITEM_SCIMITAR: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_SCIMITAR, oC ); + break; + case BASE_ITEM_SCYTHE: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_SCYTHE, oC ); + break; + case BASE_ITEM_SHORTBOW: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_SHORTBOW, oC ); + break; + case BASE_ITEM_SHORTSPEAR: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_SPEAR, oC ); + break; + case BASE_ITEM_SHORTSWORD: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_SHORT_SWORD, oC ); + break; + case BASE_ITEM_SHURIKEN: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_SHURIKEN, oC ); + break; + case BASE_ITEM_SICKLE: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_SICKLE, oC ); + break; + case BASE_ITEM_SLING: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_SLING, oC ); + break; + case BASE_ITEM_THROWINGAXE: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_THROWING_AXE, oC ); + break; + case BASE_ITEM_TWOBLADEDSWORD: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_TWO_BLADED_SWORD, oC ); + break; + case BASE_ITEM_WARHAMMER: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_WAR_HAMMER, oC ); + break; + case BASE_ITEM_CBLUDGWEAPON: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_CREATURE, oC ); + break; + case BASE_ITEM_CPIERCWEAPON: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_CREATURE, oC ); + break; + case BASE_ITEM_CSLASHWEAPON: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_CREATURE, oC ); + break; + case BASE_ITEM_CSLSHPRCWEAP: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_CREATURE, oC ); + break; + case BASE_ITEM_INVALID: + iF = GetHasFeat( FEAT_WEAPON_FOCUS_UNARMED_STRIKE, oC ) || GetHasFeat( FEAT_WEAPON_FOCUS_CREATURE, oC ); + break; + } + return iF; +} + +int GetIsArmed( object oEnt=OBJECT_SELF ) +{ + if ( GetIsObjectValid( GetItemInSlot( INVENTORY_SLOT_RIGHTHAND, oEnt ) ) || GetIsObjectValid( GetItemInSlot( INVENTORY_SLOT_LEFTHAND, oEnt ) ) ) + { + return TRUE; + } + return FALSE; +} + +int GetRelativeEnemyWeaponSize( object oT, object oEnt=OBJECT_SELF ) +{ + int iM = GetWeaponSize( oEnt ); + int iT = GetWeaponSize( oT ); + int iR = 0; + + if ( iM > iT ) + { + iR = 1; + } + else if ( iM < iT ) + { + iR = -1; + } + return iR; +} + +int GetWeaponSize( object oEnt=OBJECT_SELF ) +{ + //0=small, 1=medium, 2=large + int iS = 0; + int iType; + object oR = GetItemInSlot( INVENTORY_SLOT_RIGHTHAND ); + + if ( GetIsObjectValid( oR ) && ( iType = GetBaseItemType( oR ) ) != BASE_ITEM_INVALID ) + { + if ( + iType == BASE_ITEM_CLUB || + iType == BASE_ITEM_DAGGER || + iType == BASE_ITEM_DART || + iType == BASE_ITEM_KAMA || + iType == BASE_ITEM_HANDAXE || + iType == BASE_ITEM_KUKRI || + iType == BASE_ITEM_LIGHTFLAIL || + iType == BASE_ITEM_LIGHTHAMMER || + iType == BASE_ITEM_LIGHTMACE || + iType == BASE_ITEM_RAPIER || + iType == BASE_ITEM_SHORTSWORD || + iType == BASE_ITEM_SHURIKEN || + iType == BASE_ITEM_SICKLE || + iType == BASE_ITEM_SLING || + iType == BASE_ITEM_THROWINGAXE || + iType == BASE_ITEM_TORCH + ) + { + iS = 0; + } + else if ( + iType == BASE_ITEM_BASTARDSWORD || + iType == BASE_ITEM_BATTLEAXE || + iType == BASE_ITEM_KATANA || + iType == BASE_ITEM_LONGSWORD || + iType == BASE_ITEM_MORNINGSTAR || + iType == BASE_ITEM_SCIMITAR || + iType == BASE_ITEM_SHORTBOW || + iType == BASE_ITEM_SHORTSPEAR || + iType == BASE_ITEM_WARHAMMER + ) + { + iS = 1; + } + else if ( + iType == BASE_ITEM_DIREMACE || + iType == BASE_ITEM_DOUBLEAXE || + iType == BASE_ITEM_GREATAXE || + iType == BASE_ITEM_GREATSWORD || + iType == BASE_ITEM_HALBERD || + iType == BASE_ITEM_HEAVYCROSSBOW || + iType == BASE_ITEM_HEAVYFLAIL || + iType == BASE_ITEM_LONGBOW || + iType == BASE_ITEM_QUARTERSTAFF || + iType == BASE_ITEM_SCYTHE || + iType == BASE_ITEM_TWOBLADEDSWORD + ) + { + iS = 2; + } + } + return iS; +} + +float GetAverageDistanceToEnemy( float fRad=60.0, object oEnt=OBJECT_SELF ) +{ + int iNum = 0; + float fDist = 0.0; + int iCnt = 1; + object oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + + while ( GetIsObjectValid( oT ) && GetDistanceBetween( oEnt, oT ) <= fRad ) + { + fDist += GetDistanceBetween( oEnt, oT ); + iNum++; + oT = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oEnt, iCnt++, CREATURE_TYPE_PERCEPTION, PERCEPTION_SEEN, CREATURE_TYPE_IS_ALIVE, TRUE ); + } + + if ( iNum ) + { + return fDist / iNum; + } + return 0.0; +} + +int GetCombatModeModifier( int iMode=0 ) +{ + int iMod = 0; + + if ( iMode > 0 ) + { + switch ( iMode ) + { + case FEAT_POWER_ATTACK: + iMod = -5; + break; + case FEAT_IMPROVED_POWER_ATTACK: + iMod = -10; + break; + case FEAT_FLURRY_OF_BLOWS: + iMod = -2; + break; + case FEAT_EXPERTISE: + iMod = -5; + break; + case FEAT_IMPROVED_EXPERTISE: + iMod = -10; + break; + case FEAT_RAPID_SHOT: + iMod = -2; + break; + } + } + return iMod; +} + +int GetCombatConcentration( object oE=OBJECT_SELF ) +{ + int iC = GetSkillRank( SKILL_CONCENTRATION, oE ) //RANKS + + GetAbilityModifier( ABILITY_CONSTITUTION, oE ) //CONSTITUTION MODIFIER + + 2 * GetHasFeat( FEAT_SKILL_AFFINITY_CONCENTRATION, oE ) //SKILL AFFINITY FOR CONCENTRATION + - 4 * ( 1 - GetHasFeat( FEAT_COMBAT_CASTING, oE ) ) //COMBAT CASTING NEGATES -4 PENALTY + + 3 * GetHasFeat( FEAT_SKILL_FOCUS_CONCENTRATION, oE ) //SKILL FOCUS CONCENTRATION + + 10 * GetHasFeat( FEAT_EPIC_SKILL_FOCUS_CONCENTRATION, oE ); //EPIC SKILL FOCUS CONCENTRATION + + return iC; +} + +int GetTurningLevel( object oC=OBJECT_SELF ) +{ + int iC = GetLevelByClass( CLASS_TYPE_CLERIC, oC ); + int iP = GetLevelByClass( CLASS_TYPE_PALADIN, oC ); + int iB = GetLevelByClass( CLASS_TYPE_BLACKGUARD, oC ); + //get the higher of the levels out of BLK and PAL, subtract 2 for effective turning level + int iA = iB > iP ? iB - 2 : iP - 2; + //add this to turning level if it is > 0 + iC += iA > 0 ? iA : 0; + + return iC; +} + +void SetIsCentralEyeOpen( int iS=FALSE, object oB=OBJECT_SELF ) +{ + SetLocalInt( oB, s_BEHOLDER_CENTRAL_EYE_FLAG, iS ); +} + +int GetIsCentralEyeOpen( object oB=OBJECT_SELF ) +{ + return GetLocalInt( oB, s_BEHOLDER_CENTRAL_EYE_FLAG ); +} \ No newline at end of file diff --git a/_module/nss/no_lib_bio.nss b/_module/nss/no_lib_bio.nss new file mode 100644 index 00000000..633fa5b6 --- /dev/null +++ b/_module/nss/no_lib_bio.nss @@ -0,0 +1,2173 @@ +/* +==================== +A subset of the Bioware functions included for use without including all of them. +Some changes have been made to these functions where necessary. +==================== +*/ + +#include "x0_i0_behavior" +#include "x0_i0_modes" +#include "x0_i0_position" +#include "x0_i0_voice" +#include "no_inc_ptypes" + +//Master Constants +int NW_FLAG_SPECIAL_CONVERSATION = 0x00000001; +int NW_FLAG_SHOUT_ATTACK_MY_TARGET = 0x00000002; +int NW_FLAG_STEALTH = 0x00000004; +int NW_FLAG_SEARCH = 0x00000008; +int NW_FLAG_SET_WARNINGS = 0x00000010; +int NW_FLAG_ESCAPE_RETURN = 0x00000020; //Failed +int NW_FLAG_ESCAPE_LEAVE = 0x00000040; +int NW_FLAG_TELEPORT_RETURN = 0x00000080; //Failed +int NW_FLAG_TELEPORT_LEAVE = 0x00000100; +int NW_FLAG_PERCIEVE_EVENT = 0x00000200; +int NW_FLAG_ATTACK_EVENT = 0x00000400; +int NW_FLAG_DAMAGED_EVENT = 0x00000800; +int NW_FLAG_SPELL_CAST_AT_EVENT = 0x00001000; +int NW_FLAG_DISTURBED_EVENT = 0x00002000; +int NW_FLAG_END_COMBAT_ROUND_EVENT = 0x00004000; +int NW_FLAG_ON_DIALOGUE_EVENT = 0x00008000; +int NW_FLAG_RESTED_EVENT = 0x00010000; +int NW_FLAG_DEATH_EVENT = 0x00020000; +int NW_FLAG_SPECIAL_COMBAT_CONVERSATION = 0x00040000; +int NW_FLAG_AMBIENT_ANIMATIONS = 0x00080000; +int NW_FLAG_HEARTBEAT_EVENT = 0x00100000; +int NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS = 0x00200000; +int NW_FLAG_DAY_NIGHT_POSTING = 0x00400000; +int NW_FLAG_AMBIENT_ANIMATIONS_AVIAN = 0x00800000; +int NW_FLAG_APPEAR_SPAWN_IN_ANIMATION = 0x01000000; +int NW_FLAG_SLEEPING_AT_NIGHT = 0x02000000; +int NW_FLAG_FAST_BUFF_ENEMY = 0x04000000; + +//Additional constants for SoU animation craziness +const int CLEAR_DEBUG = FALSE; + +string sAnimCondVarname = "NW_ANIM_CONDITION"; + +float ANIM_LOOPING_LENGTH = 4.0; +float ANIM_LOOPING_SPEED = 1.0; + +string ANIM_CONVERSATION = "x0_npc_homeconv"; + +int NW_ANIM_FLAG_INITIALIZED = 0x00000001; +int NW_ANIM_FLAG_CONSTANT = 0x00000002; +int NW_ANIM_FLAG_CHATTER = 0x00000004; +int NW_ANIM_FLAG_IS_ACTIVE = 0x00000008; +int NW_ANIM_FLAG_IS_INTERACTING = 0x00000010; +int NW_ANIM_FLAG_IS_INSIDE = 0x00000020; +int NW_ANIM_FLAG_HAS_HOME = 0x00000040; +int NW_ANIM_FLAG_IS_TALKING = 0x00000080; +int NW_ANIM_FLAG_IS_MOBILE = 0x00000100; +int NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE = 0x00000200; +int NW_ANIM_FLAG_IS_CIVILIZED = 0x00000400; +int NW_ANIM_FLAG_CLOSE_DOORS = 0x00001000; + +const int CLEAR_NW_I0_GENERIC_DetermineSpecialBehavior1 = 11; +const int CLEAR_NW_I0_GENERIC_DetermineSpecialBehavior2 = 12; +const int CLEAR_X0_I0_ANIMS_PlayMobile = 16; +const int CLEAR_X0_I0_ANIMS_PlayRandomMobile = 17; +const int CLEAR_X0_I0_ANIMS_PlayRandomCloseRange1 = 18; +const int CLEAR_X0_I0_ANIMS_PlayRandomCloseRange2 = 19; +const int CLEAR_X0_I0_ANIMS_AnimActionPlayRandomMobile1 = 20; +const int CLEAR_X0_I0_ANIMS_AnimActionPlayRandomMobile2 = 21; +const int CLEAR_X0_I0_ANIMS_AnimActionPlayRandomUncivilized =22; +const int CLEAR_X0_I0_ANIMS_AnimActionGetUpFromChair = 23; +const int CLEAR_X0_I0_ANIMS_AnimActionGoToStop = 24; +const int CLEAR_X0_I0_ANIMS_AnimActionRest1 = 25; +const int CLEAR_X0_I0_ANIMS_AnimActionRest2 = 26; +const int CLEAR_X0_I0_ANIMS_GoHome = 27; +const int CLEAR_X0_I0_ANIMS_AnimActionLeaveHome = 28; +const int CLEAR_X0_I0_ANIMS_AnimActionChallengeIntruder = 29; + +//:://///////////////////////////////////////////// +//:: Master Local Get and Set +//:: FileName +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + All On Spawn in conditions in the game are now + being stored within one local. The get and set + changed or checks the condition of this one + Hex local. The NW_FLAG_XXX variables above + allow for the user of these functions throughout + the generic scripts. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Nov 14, 2001 +//::////////////////////////////////////////////// + +void SetSpawnInCondition(int nCondition, int bValid = TRUE) +{ + int nPlot = GetLocalInt(OBJECT_SELF, "NW_GENERIC_MASTER"); + if(bValid == TRUE) + { + nPlot = nPlot | nCondition; + SetSpawnInLocals(nCondition); + SetLocalInt(OBJECT_SELF, "NW_GENERIC_MASTER", nPlot); + } + else if (bValid == FALSE) + { + nPlot = nPlot & ~nCondition; + SetLocalInt(OBJECT_SELF, "NW_GENERIC_MASTER", nPlot); + } +} + +int GetSpawnInCondition(int nCondition) +{ + int nPlot = GetLocalInt(OBJECT_SELF, "NW_GENERIC_MASTER"); + if(nPlot & nCondition) + { + return TRUE; + } + return FALSE; +} + +void SetSpawnInLocals(int nCondition) +{ + if(nCondition == NW_FLAG_SHOUT_ATTACK_MY_TARGET) + { + SetListenPattern(OBJECT_SELF, "NW_ATTACK_MY_TARGET", 5); + } + else if(nCondition == NW_FLAG_ESCAPE_RETURN) + { + SetLocalLocation(OBJECT_SELF, "NW_GENERIC_START_POINT", GetLocation(OBJECT_SELF)); + } + else if(nCondition == NW_FLAG_TELEPORT_LEAVE) + { + SetLocalLocation(OBJECT_SELF, "NW_GENERIC_START_POINT", GetLocation(OBJECT_SELF)); + } +} + +//:://///////////////////////////////////////////// +//:: SetListeningPatterns +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Sets the correct listen checks on the NPC by + determining what talents they possess or what + class they use. + + This is also a good place to set up all of + the sleep and appear disappear animations for + various models. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Oct 24, 2001 +//::////////////////////////////////////////////// + +void SetListeningPatterns() +{ + if(GetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION)) + { + effect eAppear = EffectAppear(); + ApplyEffectToObject(DURATION_TYPE_INSTANT, eAppear, OBJECT_SELF); + } + + SetListening(OBJECT_SELF, TRUE); + + //NO: Broadcast listen patterns + SetListenPattern( OBJECT_SELF, "BC_DEAD", 691 ); + SetListenPattern( OBJECT_SELF, "BC_FIGHTING", 699 ); + + SetListenPattern(OBJECT_SELF, "NW_I_WAS_ATTACKED", 1); + + //This sets the commoners listen pattern to mob under + //certain conditions + if(GetLevelByClass(CLASS_TYPE_COMMONER) > 0) + { + SetListenPattern(OBJECT_SELF, "NW_MOB_ATTACK", 2); + } + SetListenPattern(OBJECT_SELF, "NW_I_AM_DEAD", 3); + + SetListenPattern(OBJECT_SELF, "inventory",101); + + //Set a custom listening pattern for the creature so that placables with + //"NW_BLOCKER" + Blocker NPC Tag will correctly call to their blockers. + string sBlocker = "NW_BLOCKER_BLK_" + GetTag(OBJECT_SELF); + SetListenPattern(OBJECT_SELF, sBlocker, 4); + SetListenPattern(OBJECT_SELF, "NW_CALL_TO_ARMS", 6); +} + +//************************************************************************************************************************************ +//************************************************************************************************************************************ +// +//WAY POINT WALK FUNCTIONS +// +//************************************************************************************************************************************ +//************************************************************************************************************************************ + +//:://///////////////////////////////////////////// +//:: Walk Way Point Path +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Allows specified person walk a waypoint path +*/ +//::////////////////////////////////////////////// +//:: Created By: Aidan Scanlan +//:: Created On: July 10, 2001 +//::////////////////////////////////////////////// + +void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) //Run first circuit +{ + ClearAllActions(); + string DayWayString; + string NightWayString; + string DayPostString; + string NightPostString; + string sWay; + string sPost; + + //The block of code below deals with night and day cycle for postings and walkway points. + if(GetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING)) + { + DayWayString = "WP_"; + NightWayString = "WN_"; + DayPostString = "POST_"; + NightPostString = "NIGHT_"; + } + else + { + DayWayString = "WP_"; + NightWayString = "WP_"; + DayPostString = "POST_"; + NightPostString = "POST_"; + } + + if(GetIsDay() || GetIsDawn()) + { + SetLocalString(OBJECT_SELF, "NW_GENERIC_WALKWAYS_PREFIX", DayWayString); + SetLocalString(OBJECT_SELF, "NW_GENERIC_POSTING_PREFIX", DayPostString); + } + else + { + SetLocalString(OBJECT_SELF, "NW_GENERIC_WALKWAYS_PREFIX", NightWayString); + SetLocalString(OBJECT_SELF, "NW_GENERIC_POSTING_PREFIX", NightPostString); + } + + + sWay = GetLocalString(OBJECT_SELF, "NW_GENERIC_WALKWAYS_PREFIX"); + sPost = GetLocalString(OBJECT_SELF, "NW_GENERIC_POSTING_PREFIX"); + + //I have now determined what the prefixs for the current walkways and postings are and will use them instead + // of POST_ and WP_ + + if(GetSpawnInCondition(NW_FLAG_STEALTH)) + { + //MyPrintString("GENERIC SCRIPT DEBUG STRING ********** " + "Attempting to Activate Stealth"); + ActionUseSkill(SKILL_HIDE, OBJECT_SELF); + } + if(GetSpawnInCondition(NW_FLAG_SEARCH)) + { + //MyPrintString("GENERIC SCRIPT DEBUG STRING ********** " + "Attempting to Activate Search"); + ActionUseSkill(SKILL_SEARCH, OBJECT_SELF); + } + + //Test if OBJECT_SELF has waypoints to walk + string sWayTag = GetTag( OBJECT_SELF ); + sWayTag = sWay + sWayTag + "_01"; + object oWay1 = GetNearestObjectByTag(sWayTag); + if(!GetIsObjectValid(oWay1)) + { + oWay1 = GetObjectByTag(sWayTag); + } + if(GetIsObjectValid(oWay1) && GetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS)) + { + //turn off the ambient animations if the creature should walk way points. + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS, FALSE); + SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS, FALSE); + } + + if(GetIsObjectValid(oWay1)) + { + int nNth = 1; + int nTens; + int nNum; + object oNearest = GetNearestObject(OBJECT_TYPE_WAYPOINT, OBJECT_SELF, nNth); + while (GetIsObjectValid(oNearest)) + { + string sNearestTag = GetTag(oNearest); + //removes the first 3 and last three characters from the waypoint's tag + //and checks it against his own tag. Waypoint tag format is WP_MyTag_XX. + if( GetSubString( sNearestTag, 3, GetStringLength( sNearestTag ) - 6 ) == GetTag( OBJECT_SELF ) ) + { + string sTens = GetStringRight(GetTag(oNearest),2); + nTens = StringToInt(sTens)/10; + nNum= StringToInt(GetStringRight(GetTag(oNearest),1)); + oNearest = OBJECT_INVALID; + } + else + { + nNth++; + oNearest = GetNearestObject(OBJECT_TYPE_WAYPOINT,OBJECT_SELF,nNth); + } + } + RunCircuit(nTens, nNum, nRun, fPause); //*************************************** + ActionWait(fPause); + ActionDoCommand(RunNextCircuit(nRun, fPause)); + //ActionDoCommand(SignalEvent(OBJECT_SELF,EventUserDefined(2))); + } + else + { + sWayTag = GetTag( OBJECT_SELF ); + sWayTag = sPost + sWayTag; + oWay1 = GetNearestObjectByTag(sWayTag); + if(!GetIsObjectValid(oWay1)) + { + oWay1 = GetObjectByTag(sWayTag); + } + + if(GetIsObjectValid(oWay1)) + { + ActionForceMoveToObject(oWay1, nRun, 1.0, 60.0); + float fFacing = GetFacing(oWay1); + ActionDoCommand(SetFacing(fFacing)); + } + } + if(GetIsObjectValid(oWay1) && GetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS)) + { + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS, FALSE); + SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS, FALSE); + } +} + +void RunNextCircuit(int nRun = FALSE, float fPause = 1.0) +{ + RunCircuit(0,1, nRun, fPause); //*************************************** + ActionWait(fPause); + ActionDoCommand(RunNextCircuit(nRun, fPause)); + //ActionDoCommand(SignalEvent(OBJECT_SELF,EventUserDefined(2))); +} + +//:://///////////////////////////////////////////// +//:: Run Circuit +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Calculates the proper path to follow along a + predetermined set of way points +*/ +//::////////////////////////////////////////////// +//:: Created By: Aidan Scanlan +//:: Created On: July 10, 2001 +//::////////////////////////////////////////////// + +void RunCircuit(int nTens, int nNum, int nRun = FALSE, float fPause = 1.0) +{ + // starting at a given way point, move sequentialy through incrementally + // increasing points until there are no more valid ones. + string sWay = GetLocalString(OBJECT_SELF, "NW_GENERIC_WALKWAYS_PREFIX"); + + object oTargetPoint = GetWaypointByTag(sWay + GetTag(OBJECT_SELF) + "_" + IntToString(nTens) +IntToString(nNum)); + + while(GetIsObjectValid(oTargetPoint)) + { + ActionWait(fPause); + ActionMoveToObject(oTargetPoint, nRun); + nNum++; + if (nNum > 9) + { + nTens++; + nNum = 0; + } + oTargetPoint = GetWaypointByTag(sWay + GetTag(OBJECT_SELF) + "_" + IntToString(nTens) +IntToString(nNum)); + } + // once there are no more waypoints available, decriment back to the last + // valid point. + nNum--; + if (nNum < 0) + { + nTens--; + nNum = 9; + } + + // start the cycle again going back to point 01 + oTargetPoint = GetWaypointByTag(sWay + GetTag(OBJECT_SELF) + "_" + IntToString(nTens) +IntToString(nNum)); + while(GetIsObjectValid(oTargetPoint)) + { + ActionWait(fPause); + ActionMoveToObject(oTargetPoint, nRun); + nNum--; + if (nNum < 0) + { + nTens--; + nNum = 9; + } + oTargetPoint = GetWaypointByTag(sWay + GetTag(OBJECT_SELF) + "_" + IntToString(nTens) +IntToString(nNum)); + } +} + +//:://///////////////////////////////////////////// +//:: Check Walkways +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This function checks the passed in object to + see if they are supposed to be walking to + day or night postings. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Feb 26, 2002 +//::////////////////////////////////////////////// + +int CheckWayPoints(object oWalker = OBJECT_SELF) +{ + object oWay1; + object oWay2; + object oWay3; + object oWay4; + string sTag = GetTag(oWalker); + if(GetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING)) + { + oWay2 = GetWaypointByTag("NIGHT_" + sTag); + oWay4 = GetWaypointByTag("WN_" + sTag + "_01"); + } + + oWay1 = GetWaypointByTag("POST_" + sTag); + oWay3 = GetWaypointByTag("WP_" + sTag + "_01"); + + if(GetIsObjectValid(oWay2) || GetIsObjectValid(oWay4) || GetIsObjectValid(oWay1) || GetIsObjectValid(oWay3)) + { + + return TRUE; + } + return FALSE; +} + +//:://///////////////////////////////////////////// +//:: Check for Walkways +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This function checks if the passed in object + has waypoints using their tag. +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: MAy 13, 2002 +//::////////////////////////////////////////////// +/* + if(GetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING)) + { + DayWayString = "WP_"; + NightWayString = "WN_"; + DayPostString = "POST_"; + NightPostString = "NIGHT_"; + } + else + { + DayWayString = "WP_"; + NightWayString = "WP_"; + DayPostString = "POST_"; + NightPostString = "POST_"; + } +*/ +int GetIsPostOrWalking(object oWalker = OBJECT_SELF) +{ + string sTag = GetTag(oWalker); + + object oPost = GetWaypointByTag("POST_" + sTag); + if(!GetIsObjectValid(oPost)) + { + oPost = GetWaypointByTag("NIGHT_" + sTag); + if(!GetIsObjectValid(oPost)) + { + oPost = GetWaypointByTag("WP_" + sTag + "_01"); + if(!GetIsObjectValid(oPost)) + { + oPost = GetWaypointByTag("WN_" + sTag + "_01"); + if(!GetIsObjectValid(oPost)) + { + return FALSE; + } + } + } + } + return TRUE; +} + +//::////////////////////////////////////////////////////////////////////////////////////////////// +//:: Special Behavior Functions +//:: Copyright (c) 2001 Bioware Corp. +//::///////////////////////////////////////////////////////////////////////////////////////////// +/* + These commands handle the setting and getting of the Behavioral Master + If these special behaviors are used they will override the normal behavior expected + the animals normal Neutral Faction. +*/ +//::///////////////////////////////////////////////////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Dec 10, 2001 +//::///////////////////////////////////////////////////////////////////////////////////////////// +/* +void SetBehaviorState(int nCondition, int bValid = TRUE) +{ + int nPlot = GetLocalInt(OBJECT_SELF, "NW_BEHAVIOR_MASTER"); + if(bValid == TRUE) + { + nPlot = nPlot | nCondition; + SetLocalInt(OBJECT_SELF, "NW_BEHAVIOR_MASTER", nPlot); + } + else if (bValid == FALSE) + { + nPlot = nPlot & ~nCondition; + SetLocalInt(OBJECT_SELF, "NW_BEHAVIOR_MASTER", nPlot); + } +} + +int GetBehaviorState(int nCondition) +{ + int nPlot = GetLocalInt(OBJECT_SELF, "NW_BEHAVIOR_MASTER"); + if(nPlot & nCondition) + { + return TRUE; + } + return FALSE; +} +*/ + +//:://///////////////////////////////////////////// +//:: Play Mobile Ambient Animations +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Used for spawned creatures to not look like + zombies +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Nov 23, 2001 +//::////////////////////////////////////////////// + +void PlayMobileAmbientAnimations() +{ + if(!GetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS_AVIAN)) { + // not a bird + PlayMobileAmbientAnimations_NonAvian(); + } else { + // a bird + PlayMobileAmbientAnimations_Avian(); + } +} + +//:://///////////////////////////////////////////// +//:: Determine Special Behavior +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + Determines the special behavior used by the NPC. + Generally all NPCs who you want to behave differently + than the defualt behavior. + For these behaviors, passing in a valid object will + cause the creature to become hostile the the attacker. + + MODIFIED February 7 2003: + - Rearranged logic order a little so that the creatures + will actually randomwalk when not fighting +*/ +//::////////////////////////////////////////////// +//:: Created By: Preston Watamaniuk +//:: Created On: Dec 14, 2001 +//::////////////////////////////////////////////// + +void DetermineSpecialBehavior(object oIntruder = OBJECT_INVALID) +{ + //object oTarget = GetNearestSeenEnemy(); + object oTarget = GetTarget(); + if(GetBehaviorState(NW_FLAG_BEHAVIOR_OMNIVORE)) + { + int bAttack = FALSE; + if(!GetIsObjectValid(oIntruder)) + { + if(!GetIsObjectValid(GetAttemptedAttackTarget()) && + !GetIsObjectValid(GetAttemptedSpellTarget()) && + !GetIsObjectValid(GetAttackTarget())) + { + if(GetIsObjectValid(oTarget) && GetDistanceToObject(oTarget) <= 8.0) + { + if(!GetIsFriend(oTarget)) + { + if(GetLevelByClass(CLASS_TYPE_DRUID, oTarget) == 0 && GetLevelByClass(CLASS_TYPE_RANGER, oTarget) == 0) + { + SetIsTemporaryEnemy(oTarget, OBJECT_SELF, FALSE, 20.0); + bAttack = TRUE; + //DetermineCombatRound(oTarget); + InitCombat(oTarget); + } + } + } + } + } + else if(!IsInConversation(OBJECT_SELF)) + { + bAttack = TRUE; + //DetermineCombatRound(oIntruder); + InitCombat(oIntruder); + } + + // * if not attacking, the wander + if (bAttack == FALSE) + { + ClearActions(CLEAR_NW_I0_GENERIC_DetermineSpecialBehavior1); + ActionRandomWalk(); + return; + } + } + else if(GetBehaviorState(NW_FLAG_BEHAVIOR_HERBIVORE)) + { + if(!GetIsObjectValid(GetAttemptedAttackTarget()) && + !GetIsObjectValid(GetAttemptedSpellTarget()) && + !GetIsObjectValid(GetAttackTarget())) + { + if(GetIsObjectValid(oTarget) && GetDistanceToObject(oTarget) <= 6.0) + { + if(!GetIsFriend(oTarget)) + { + if(GetLevelByClass(CLASS_TYPE_DRUID, oTarget) == 0 && GetLevelByClass(CLASS_TYPE_RANGER, oTarget) == 0) + { + //TalentFlee(oTarget); + DoAvoidEnemies(); + } + } + } + } + else if(!IsInConversation(OBJECT_SELF)) + { + ClearActions(CLEAR_NW_I0_GENERIC_DetermineSpecialBehavior2); + ActionRandomWalk(); + return; + } + } +} + +//:://///////////////////////////////////////////// +//:: ClearActions +//:: Copyright (c) 2001 Bioware Corp. +//::////////////////////////////////////////////// +/* + This is a wrapper for ClearAllActions. + Added to try and track down some bugs in + the AI. +*/ +//::////////////////////////////////////////////// +//:: Created By: Brent +//:: Created On: February 6, 2003 +//::////////////////////////////////////////////// +void ClearActions(int nClearConstant=0, int bClearCombat=FALSE) +{ + // SpeakString ("Clearing Action # " + IntToString(bClearConstant)); + if (CLEAR_DEBUG == TRUE) + { + SpeakString("Clearing all actions in State # " + IntToString(nClearConstant)); + } + ClearAllActions(bClearCombat); +} + +/********************************************************************** + * FUNCTION DEFINITIONS + **********************************************************************/ + +// Debugging function. Will be commented out for final. +void AnimDebug(string sMsg) +{ + //ActionSpeakString("ANIM: " + GetName(OBJECT_SELF) + " " + sMsg); + //SpeakString("ANIM: " + GetName(OBJECT_SELF) + " " + sMsg); + //PrintString("ANIM: " + GetName(OBJECT_SELF) + ": " + sMsg); +} + +// TRUE if the given creature has the given condition set +int GetAnimationCondition(int nCondition, object oCreature=OBJECT_SELF) +{ + return (GetLocalInt(oCreature, sAnimCondVarname) & nCondition); +} + +// Mark that the given creature has the given condition set +void SetAnimationCondition(int nCondition, int bValid=TRUE, object oCreature=OBJECT_SELF) +{ + int nCurrentCond = GetLocalInt(oCreature, sAnimCondVarname); + if (bValid) { + SetLocalInt(oCreature, sAnimCondVarname, nCurrentCond | nCondition); + } else { + SetLocalInt(oCreature, sAnimCondVarname, nCurrentCond & ~nCondition); + } +} + +// Returns TRUE if the creature is busy talking or interacting +// with a placeable. +int GetIsBusyWithAnimation(object oCreature) +{ + int bReturn = GetAnimationCondition(NW_ANIM_FLAG_IS_TALKING, oCreature) + || GetAnimationCondition(NW_ANIM_FLAG_IS_INTERACTING, oCreature) + || GetCurrentAction(oCreature) != ACTION_INVALID; + +// if (bReturn == TRUE) AssignCommand(oCreature, SpeakString("Busy with anim")); + return bReturn; +} + +// Get a random nearby friend within the specified distance limit, +// that isn't busy doing something else. +object GetRandomFriend(float fMaxDistance) +{ + object oFriend = GetNearestCreature(CREATURE_TYPE_REPUTATION, + REPUTATION_TYPE_FRIEND, + OBJECT_SELF, d2(), + CREATURE_TYPE_PERCEPTION, + PERCEPTION_SEEN); + + if (GetIsObjectValid(oFriend) + && !GetIsPC(oFriend) + //&& !GetIsBusyWithAnimation(oFriend) BK Feb 2003: There's not enough talking happening + && GetAnimationCondition(NW_ANIM_FLAG_IS_ACTIVE, oFriend) + && !IsInConversation(oFriend) + && !GetIsInCombat(oFriend) + && GetDistanceToObject(oFriend) <= fMaxDistance) + { + return oFriend; + } + + return OBJECT_INVALID; +} + +// Get a random nearby object within the specified distance with +// the specified tag. +object GetRandomObjectByTag(string sTag, float fMaxDistance) +{ + int nNth; + if (fMaxDistance == DISTANCE_SHORT) { + nNth = d2(); + } else if (fMaxDistance == DISTANCE_MEDIUM) { + nNth = d4(); + } else { + nNth = d6(); + } + object oObj = GetNearestObjectByTag(sTag, OBJECT_SELF, nNth); + if (GetIsObjectValid(oObj) && GetDistanceToObject(oObj) <= fMaxDistance) + return oObj; + return OBJECT_INVALID; +} + +// Get a random nearby object within the specified distance with +// the specified type. +// nObjType: Any of the OBJECT_TYPE_* constants +object GetRandomObjectByType(int nObjType, float fMaxDistance) +{ + int nNth; + if (fMaxDistance == DISTANCE_SHORT) { + nNth = d2(); + } else if (fMaxDistance == DISTANCE_LARGE) { + nNth = d4(); + } else { + nNth = d6(); + } + AnimDebug("looking for random object: " + IntToString(nNth)); + object oObj = GetNearestObject(nObjType, OBJECT_SELF, nNth); + if (GetIsObjectValid(oObj) && GetDistanceToObject(oObj) <= fMaxDistance) + return oObj; + return OBJECT_INVALID; +} + +// Get a random "NW_STOP" object in the area. +// If fMaxDistance is non-zero, will return OBJECT_INVALID +// if the stop is too far away. +// The first time this is called in a given area, it cycles +// through all the stops in the area and stores them. +object GetRandomStop(float fMaxDistance) +{ + object oStop; + object oArea = GetArea(OBJECT_SELF); + if (! GetLocalInt(oArea, "ANIM_STOPS_INITIALIZED") ) { + AnimDebug("Initializing stops in area " + GetName(oArea)); + // first time -- look up all the stops in the area and store them + int nNth = 1; + oStop = GetNearestObjectByTag("NW_STOP"); + while (GetIsObjectValid(oStop)) { + AnimDebug("Stop found"); + SetLocalObject(oArea, "ANIM_STOP_" + IntToString(nNth), oStop); + nNth++; + oStop = GetNearestObjectByTag("NW_STOP", OBJECT_SELF, nNth); + } + SetLocalInt(oArea, "ANIM_STOPS", nNth-1); + SetLocalInt(oArea, "ANIM_STOPS_INITIALIZED", TRUE); + } + + int nStop = Random(GetLocalInt(oArea, "ANIM_STOPS")) + 1; + oStop = GetLocalObject(oArea, "ANIM_STOP_" + IntToString(nStop)); + AnimDebug("Stop: " + IntToString(nStop) + + ": " + GetTag(oStop) + + ": " + FloatToString(GetDistanceToObject(oStop))); + if (GetIsObjectValid(oStop) && GetDistanceToObject(oStop) <= fMaxDistance) + return oStop; + return OBJECT_INVALID; +} + +// Check for a waypoint marked NW_HOME in the area; if it +// exists, mark it as the caller's home waypoint. +void SetCreatureHomeWaypoint() +{ + object oHome = GetNearestObjectByTag("NW_HOME"); + if (GetIsObjectValid(oHome)) { + SetAnimationCondition(NW_ANIM_FLAG_HAS_HOME); + SetLocalObject(OBJECT_SELF, "NW_ANIM_HOME", oHome); + } +} + +// Get a creature's home waypoint; returns OBJECT_INVALID if none set. +object GetCreatureHomeWaypoint() +{ + if (GetAnimationCondition(NW_ANIM_FLAG_HAS_HOME)) { + return GetLocalObject(OBJECT_SELF, "NW_ANIM_HOME"); + } + return OBJECT_INVALID; +} + + +// Set a specific creature (or OBJECT_INVALID to clear) as the caller's "friend" +void SetCurrentFriend(object oFriend) +{ + if (!GetIsObjectValid(oFriend)) { + DeleteLocalObject(OBJECT_SELF, "NW_ANIM_FRIEND"); + } else { + SetLocalObject(OBJECT_SELF, "NW_ANIM_FRIEND", oFriend); + } +} + +// Get the caller's current friend, if set; OBJECT_INVALID otherwise +object GetCurrentFriend() +{ + return GetLocalObject(OBJECT_SELF, "NW_ANIM_FRIEND"); +} + +// Set an object (or OBJECT_INVALID to clear) as the caller's interactive +// target. +void SetCurrentInteractionTarget(object oTarget) +{ + if (!GetIsObjectValid(oTarget)) { + DeleteLocalObject(OBJECT_SELF, "NW_ANIM_TARGET"); + } else { + SetLocalObject(OBJECT_SELF, "NW_ANIM_TARGET", oTarget); + } +} + +// Get the caller's current interaction target, if set; OBJECT_INVALID otherwise +object GetCurrentInteractionTarget() +{ + return GetLocalObject(OBJECT_SELF, "NW_ANIM_TARGET"); +} + + +// Mark the caller as civilized based on its racialtype. +// This will not unset the NW_ANIM_FLAG_IS_CIVILIZED flag +// if it was set outside. +void CheckIsCivilized() +{ + int nRacialType = GetRacialType(OBJECT_SELF); + switch (nRacialType) { + case RACIAL_TYPE_ELF : + case RACIAL_TYPE_GNOME : + case RACIAL_TYPE_HALFELF : + case RACIAL_TYPE_HALFLING : + case RACIAL_TYPE_HALFORC : + case RACIAL_TYPE_HUMAN : + case RACIAL_TYPE_HUMANOID_GOBLINOID : + case RACIAL_TYPE_HUMANOID_REPTILIAN : + case RACIAL_TYPE_HUMANOID_ORC: + SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + } +} + +// Check to see if we should switch on detect/stealth mode +void CheckCurrentModes() +{ + object oWay = GetNearestObject(OBJECT_TYPE_WAYPOINT); + string sTag = GetTag(oWay); + if (sTag == "NW_STEALTH") { + if (GetModeActive(NW_MODE_STEALTH)) { + // turn off stealth mode + SetModeActive(NW_MODE_STEALTH, FALSE); + } else { + // turn on stealth mode + SetModeActive(NW_MODE_STEALTH); + } + } else if (sTag == "NW_DETECT") { + if (GetModeActive(NW_MODE_DETECT)) { + // turn off detect mode + SetModeActive(NW_MODE_DETECT); + } else { + // turn on detect mode + SetModeActive(NW_MODE_DETECT); + } + } +} + + +// Check if the creature should be active and turn off if not, +// returning FALSE. This respects the NW_ANIM_FLAG_CONSTANT +// setting. +int CheckIsAnimActive(object oCreature) +{ + // Unless we're set to be constant, turn off if there's + // no PC in the area + if ( ! GetAnimationCondition(NW_ANIM_FLAG_CONSTANT)) { + object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, + PLAYER_CHAR_IS_PC); + if ( !GetIsObjectValid(oPC) || GetArea(oPC) != GetArea(OBJECT_SELF)) { + // turn off + SetAnimationCondition(NW_ANIM_FLAG_IS_ACTIVE, FALSE); + return FALSE; + } + } + return TRUE; +} + + +// Check to see if we're in the middle of some action +// so we don't interrupt or pile actions onto the queue. +// Returns TRUE if in the middle of an action, FALSE otherwise. +int CheckCurrentAction() +{ + int nAction = GetCurrentAction(); + if (nAction == ACTION_SIT) { + // low prob of getting up, so we don't bop up and down constantly + if (Random(10) == 0) { + AnimActionGetUpFromChair(); + } + return TRUE; + } else if (nAction != ACTION_INVALID) { + // we're doing *something*, don't switch + AnimDebug("performing action"); + return TRUE; + } + return FALSE; +} + +// General initialization for animations. +// Called from all the Play_* functions. +void AnimInitialization() +{ + // If we've been set to be constant, flag us as + // active. + // if (GetAnimationCondition(NW_ANIM_FLAG_CONSTANT)) + SetAnimationCondition(NW_ANIM_FLAG_IS_ACTIVE); + + // Set our home, if we have one + SetCreatureHomeWaypoint(); + + // Mark whether we're civilized or not + CheckIsCivilized(); + + SetAnimationCondition(NW_ANIM_FLAG_INITIALIZED); + +} + +// This function should be used for mobile NPCs and monsters +// other than avian ones. It should be called by the creature +// that you want to perform the animations. +// +// Creatures will interact with each other and move around, +// possibly even moving between areas. +// +// Creatures who are spawned in an area with the "NW_HOME" tag +// will mark that area as their home, leave from the nearest +// door during the day, and return at night. +// +// Injured creatures will go to the nearest "NW_SAFE" waypoint +// in their immediate area and rest there. +// +// If at any point the nearest waypoint is "NW_DETECT" or +// "NW_STEALTH", the creature will toggle search/stealth mode +// respectively. +// +// Creatures who are spawned in an outdoor area (for instance, +// in city streets) will go inside areas that have one of the +// interior waypoints (NW_TAVERN, NW_SHOP), if those areas +// are connected by an unlocked door. They will come back out +// as well. +// +// Creatures will also move randomly between objects in their +// area that have the tag "NW_STOP". +// +// Mobile creatures will have all the same behaviors as immobile +// creatures, just tending to move around more. +void PlayMobileAmbientAnimations_NonAvian() +{ + + if (!GetAnimationCondition(NW_ANIM_FLAG_INITIALIZED)) { + // General initialization + AnimInitialization(); + + // Mark us as mobile + SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE); + } + + // Short-circuit everything if we're not active yet + if (!GetAnimationCondition(NW_ANIM_FLAG_IS_ACTIVE)) + return; + AnimDebug("currently active"); + + // Check if we should turn off + if (!CheckIsAnimActive(OBJECT_SELF)) + return; + + AnimDebug("staying active"); + + //SpawnScriptDebugger(); + int nCurrentAction = GetCurrentAction(); + + // Check current actions so we don't interrupt something in progress + // Feb 14 2003: Because of the random walkthere needs to be a chance + // to stop walking. + if (CheckCurrentAction() && (nCurrentAction != ACTION_MOVETOPOINT)&& (nCurrentAction != ACTION_WAIT)) { + return; + } + + // Go someplace safe and rest if we are hurt + if (AnimActionRest()) { + AnimDebug("resting"); + return; + } + + // Check if current modes should change + CheckCurrentModes(); + UseStealthMode(); + UseDetectMode(); + + int bIsCivilized = GetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + if (bIsCivilized) + { + + + // Challenge an intruding PC + if (AnimActionChallengeIntruder()) { + return; + } + + // Check if we should go home + if (AnimActionGoHome()) { + AnimDebug("going home"); + return; + } + + // Check if we should leave home + if (AnimActionLeaveHome()) { + AnimDebug("leaving home"); + return; + } + + // Otherwise, do something random + AnimActionPlayRandomMobile(); + } else + { + AnimDebug("uncivilized"); + AnimActionPlayRandomUncivilized(); + } +} + +// Avian creatures will fly around randomly. +void PlayMobileAmbientAnimations_Avian() +{ + int nRoll = d4(); + object oFriend = GetNearestCreature(CREATURE_TYPE_REPUTATION, + REPUTATION_TYPE_FRIEND, + OBJECT_SELF, + nRoll, + CREATURE_TYPE_PERCEPTION, + PERCEPTION_SEEN); + + effect eBird; + int nBird = d4(); + ClearActions(CLEAR_X0_I0_ANIMS_PlayMobile); + if(GetIsObjectValid(oFriend)) { + if(nBird == 1) { + ActionMoveToObject(oFriend, TRUE); + } else if (nBird == 2 || nBird == 3) { + AnimActionRandomMoveAway(oFriend, 100.0); + } else { + eBird = EffectDisappearAppear(GetLocation(oFriend)); + ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBird, OBJECT_SELF, 4.0); + AnimActionRandomMoveAway(oFriend, 100.0); + } + } else { + ActionRandomWalk(); + } +} + +// This function should be used for any NPCs that should +// not move around. It should be called by the creature +// that you want to perform the animations. +// +// Creatures who call this function will never leave the +// area they spawned in. +// +// Injured creatures will rest at their starting location. +// +// Creatures who have the NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE +// flag set will move around slightly within the area. +// Creatures in an area with an "interior" waypoint (NW_HOME, +// NW_SHOP, NW_TAVERN) will be set to have this flag automatically. +// +// Close-range creatures will move around the area, frequently +// returning to their starting point, interacting with other +// creatures and placeables. They will visit NW_STOP waypoints +// in their immediate vicinity, and they will close opened doors. +// +// In all other cases, the creature will not move from its starting +// position. They will turn around randomly, turn to and 'talk' to +// other NPCs in their immediate vicinity, and interact with +// placeables in their immediate vicinity. +// +void PlayImmobileAmbientAnimations() +{ + if (!GetAnimationCondition(NW_ANIM_FLAG_INITIALIZED)) { + // General initialization + AnimInitialization(); + + // if we are at home, make us mobile in close-range + if (GetIsObjectValid(GetCreatureHomeWaypoint())) { + SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + } + + // also save our starting location + SetLocalLocation(OBJECT_SELF, + "ANIM_START_LOCATION", + GetLocation(OBJECT_SELF)); + } + + // Short-circuit everything if we're not active yet + if (!GetAnimationCondition(NW_ANIM_FLAG_IS_ACTIVE)) + return; + + AnimDebug("currently active"); + + // Check if we should turn off + if (!CheckIsAnimActive(OBJECT_SELF)) + return; + + AnimDebug("staying active"); + + // Check current actions so we don't interrupt something in progress + if (CheckCurrentAction()) { + return; + } + + // First check: go back to starting position and rest if we are hurt + if (AnimActionRest()) { + AnimDebug("resting"); + return; + } + + // Check if current modes should change + CheckCurrentModes(); + UseStealthMode(); + UseDetectMode(); + + // Challenge an intruding PC + if (AnimActionChallengeIntruder()) { + return; + } + + int bIsCivilized = GetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + + if (GetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE)) { + AnimDebug("close range"); + AnimActionPlayRandomCloseRange(); + } else { + AnimDebug("immobile"); + AnimActionPlayRandomImmobile(); + } +} + + +// Perform a strictly immobile action. +// Includes: +// - turn towards a nearby unoccupied friend and 'talk' +// - turn towards a nearby placeable and interact +// - turn around randomly +// - play a random animation +void AnimActionPlayRandomImmobile() +{ + int nRoll = Random(12); + + //SpawnScriptDebugger(); + + + // If we're talking, either keep going or stop. + // Low prob of stopping, since both parties have + // a chance and conversations are cool. + if (GetAnimationCondition(NW_ANIM_FLAG_IS_TALKING)) { + object oFriend = GetCurrentFriend(); + int nHDiff = GetHitDice(OBJECT_SELF) - GetHitDice(oFriend); + + if (nRoll == 0) { + AnimActionStopTalking(oFriend, nHDiff); + } else { + AnimActionPlayRandomTalkAnimation(nHDiff); + } + return; + } + + // If we're interacting with a placeable, either keep going or + // stop. High probability of stopping, since looks silly to + // constantly turn something on-and-off. + if (GetAnimationCondition(NW_ANIM_FLAG_IS_INTERACTING)) { + if (nRoll < 4) { + AnimActionStopInteracting(); + } else { + AnimActionPlayRandomInteractAnimation(GetCurrentInteractionTarget()); + } + return; + } + + // If we got here, we're not busy at the moment. + + // Clean out the action queue + ClearActions(CLEAR_X0_I0_ANIMS_PlayRandomMobile); + if (nRoll <=9) { + if (AnimActionFindFriend(DISTANCE_LARGE)) + return; + } + + if (nRoll > 9) { + // Try and interact with a nearby placeable + if (AnimActionFindPlaceable(DISTANCE_SHORT)) + return; + } + + // Default: clear our action queue and play a random animation + if ( nRoll < 5 ) { + // Turn around and play a random animation + + // BK Feb 2003: I got rid of this because I've never seen it look appropriate + // it always looks out of place and unrealistic + AnimActionTurnAround(); + AnimActionPlayRandomAnimation(); + } else { + // Just play a random animation + AnimActionPlayRandomAnimation(); + } +} + +// Perform a random close-range action. +// This will include: +// - any of the immobile actions +// - close any nearby doors, then return to current position +// - go to a nearby placeable and interact with it +// - go to a nearby friend and interact with them +// - walk to a nearby 'NW_STOP' waypoint +// - going back to starting point +void AnimActionPlayRandomCloseRange() +{ + if (GetIsBusyWithAnimation(OBJECT_SELF)) { + // either we're already in conversation or + // interacting with something, so continue -- + // all handled already in RandomImmobile. + AnimActionPlayRandomImmobile(); + return; + } + + // If we got here, we're not busy + + // Clean out the action queue + ClearActions(CLEAR_X0_I0_ANIMS_PlayRandomCloseRange1); + + // Possibly close open doors + if (GetAnimationCondition(NW_ANIM_FLAG_CLOSE_DOORS) && AnimActionCloseRandomDoor()) { + return; + } + + // For the rest of these, we check for specific rolls, + // to ensure that we don't do a lot of lookups on any one + // given pass. + + int nRoll = Random(6); + + // Possibly start talking to a friend + if (nRoll == 0 || nRoll == 1) { + if (AnimActionFindFriend(DISTANCE_LARGE)) + return; + // fall through to default + } + + // Possibly start fiddling with a placeable + if (nRoll == 2) { + if (AnimActionFindPlaceable(DISTANCE_LARGE)) + return; + // fall through if no placeable found + } + + // Possibly sit down + if (nRoll == 3) { + if (AnimActionSitInChair(DISTANCE_LARGE)) + return; + } + + // Go to a nearby stop + if (nRoll == 4) { + if (AnimActionGoToStop(DISTANCE_LARGE)) { + return; + } + + // No stops, so do a random walk and then come back + // to our current location + ClearActions(CLEAR_X0_I0_ANIMS_PlayRandomCloseRange2); + location locCurr = GetLocation(OBJECT_SELF); + ActionRandomWalk(); + ActionMoveToLocation(locCurr); + } + + if (nRoll == 5 && !GetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE)) { + // Move back to starting point, saved at initialization + ActionMoveToLocation(GetLocalLocation(OBJECT_SELF, + "ANIM_START_LOCATION")); + return; + } + + // Default: do a random immobile animation + AnimActionPlayRandomImmobile(); +} + +// Perform a mobile action. +// Includes: +// - walk to an 'NW_STOP' waypoint in the area +// - walk to an area door and possibly go inside +// - go outside if previously went inside +// - fall through to AnimActionPlayRandomCloseRange +void AnimActionPlayRandomMobile() +{ + if (GetIsBusyWithAnimation(OBJECT_SELF)) { + // either we're already in conversation or + // interacting with something, so continue -- + // all handled already in RandomImmobile. + AnimActionPlayRandomImmobile(); + return; + } + + // If we got here, we're not busy + + // Clean out the action queue + ClearActions(CLEAR_X0_I0_ANIMS_AnimActionPlayRandomMobile1); + + int nRoll = Random(9); + + if (nRoll == 0) { + // If we're inside, possibly leave + if (AnimActionGoOutside()) + return; + } + + if (nRoll == 1) { + // Possibly go into an interior area + if (AnimActionGoInside()) + return; + } + + // If we fell through or got a random number + // less than 7, go to a stop waypoint, or random + // walk if no stop waypoints were found. + if (nRoll < 5) { + // Pass in a huge number so any stop will be valid + if (AnimActionGoToStop(1000.0)) + return; + + // If no stops, do a random walk + ClearActions(CLEAR_X0_I0_ANIMS_AnimActionPlayRandomMobile2); + ActionRandomWalk(); + return; + } + + // Default: do something close-range +// AnimActionPlayRandomCloseRange(); + + // MODIFIED February 14 2003. Will play an immobile animation, if nothing else found to do + + PlayImmobileAmbientAnimations(); +} + +// Perform a mobile action for an uncivilized creature. +// Includes: +// - perform random limited animations +// - walk to an 'NW_STOP' waypoint in the area +// - random walk if none available +void AnimActionPlayRandomUncivilized() +{ + int nRoll = Random(6); + + if (nRoll != 5) { + if (AnimActionGoToStop(1000.0)) + return; + // no stops, so random walk + ClearActions(CLEAR_X0_I0_ANIMS_AnimActionPlayRandomUncivilized); + ActionRandomWalk(); + } + + // Play one of our few random animations + AnimActionPlayRandomBasicAnimation(); +} + +/********************************************************************** + ********************************************************************** + * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE + * The functions below here are building blocks used in the main + * functions above. + * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE + ********************************************************************** + **********************************************************************/ + + +// Start interacting with a placeable object +void AnimActionStartInteracting(object oPlaceable) +{ + SetAnimationCondition(NW_ANIM_FLAG_IS_INTERACTING); + + if (GetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE) + || GetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE)) + { + ActionMoveToObject(oPlaceable, FALSE, DISTANCE_TINY); + } + ActionDoCommand(SetFacingPoint(GetPosition(oPlaceable))); + SetCurrentInteractionTarget(oPlaceable); + + AnimActionPlayRandomInteractAnimation(oPlaceable); +} + +// Stop interacting with a placeable object +void AnimActionStopInteracting() +{ + if (GetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE)) { + AnimActionRandomMoveAway(GetCurrentInteractionTarget(), DISTANCE_LARGE); + } + SetCurrentInteractionTarget(OBJECT_INVALID); + + SetAnimationCondition(NW_ANIM_FLAG_IS_INTERACTING, FALSE); + + AnimActionTurnAround(); + AnimActionPlayRandomAnimation(); +} + +// Start talking with a friend +void AnimActionStartTalking(object oFriend, int nHDiff=0) +{ + AnimDebug("started talking to " + GetName(oFriend)); + object oMe = OBJECT_SELF; + + // Say hello and move to each other if we're not immobile + if (GetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE) + || GetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE)) + { + ActionMoveToObject(oFriend, FALSE, DISTANCE_TINY); + AnimActionPlayRandomGreeting(nHDiff); + } + if (GetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE, oFriend) + || GetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE, oFriend)) + { + AssignCommand(oFriend, + ActionMoveToObject(oMe, FALSE, DISTANCE_TINY)); + AssignCommand(oFriend, AnimActionPlayRandomGreeting(0 - nHDiff)); + } + + SetCurrentFriend(oFriend); + AssignCommand(oFriend, SetCurrentFriend(oMe)); + ActionDoCommand(SetFacingPoint(GetPosition(oFriend))); + AssignCommand(oFriend, ActionDoCommand(SetFacingPoint(GetPosition(oMe)))); + SetAnimationCondition(NW_ANIM_FLAG_IS_TALKING); + SetAnimationCondition(NW_ANIM_FLAG_IS_TALKING, TRUE, oFriend); +} + +// Stop talking to the given friend +void AnimActionStopTalking(object oFriend, int nHDiff=0) +{ + AnimDebug("stopped talking to " + GetName(oFriend)); + object oMe = OBJECT_SELF; + + // Say goodbye and move away if we're not immobile + if (GetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE)) { + AnimActionPlayRandomGoodbye(nHDiff); + AnimActionRandomMoveAway(oFriend, DISTANCE_LARGE); + } else { + AnimActionTurnAround(); + AnimActionPlayRandomAnimation(); + } + + if (GetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE, oFriend)) { + AssignCommand(oFriend, AnimActionPlayRandomGoodbye(0 - nHDiff)); + AssignCommand(oFriend, + AnimActionRandomMoveAway(oMe, DISTANCE_HUGE)); + } else { + AssignCommand(oFriend, AnimActionTurnAround()); + AssignCommand(oFriend, AnimActionPlayRandomAnimation()); + } + + SetAnimationCondition(NW_ANIM_FLAG_IS_TALKING, FALSE); + SetAnimationCondition(NW_ANIM_FLAG_IS_TALKING, FALSE, oFriend); + +} + +// Play a greeting animation and possibly voicechat. +// If a negative hit dice difference (HD caller - HD greeted) is +// passed in, the caller will bow. +void AnimActionPlayRandomGreeting(int nHDiff=0) +{ + if (Random(2) == 0 && GetAnimationCondition(NW_ANIM_FLAG_CHATTER)) { + VoiceHello(); + } + + if (nHDiff < 0 || Random(4) == 0) + ActionPlayAnimation(ANIMATION_FIREFORGET_BOW); + else + ActionPlayAnimation(ANIMATION_FIREFORGET_GREETING); +} + +// Play a random farewell animation and possibly voicechat. +// If a negative hit dice difference is passed in, the +// caller will bow. +void AnimActionPlayRandomGoodbye(int nHDiff) +{ + if (Random(2) == 0 && GetAnimationCondition(NW_ANIM_FLAG_CHATTER)) { + VoiceGoodbye(); + } + + if (nHDiff < 0 || Random(4) == 0) + ActionPlayAnimation(ANIMATION_FIREFORGET_BOW); + else + ActionPlayAnimation(ANIMATION_FIREFORGET_GREETING); +} + +// Randomly move away from an object the specified distance. +// This is mainly because ActionMoveAwayFromLocation isn't working. +void AnimActionRandomMoveAway(object oSource, float fDistance) +{ + location lTarget = GetRandomLocation(GetArea(OBJECT_SELF), oSource, fDistance); + + ActionMoveToLocation(lTarget); +} + +// Play animation of shaking head "no" to left & right +void AnimActionShakeHead() +{ + ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_LEFT, 3.0); + ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_RIGHT, 3.0); +} + +// Play animation of looking to left and right +void AnimActionLookAround() +{ + ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_LEFT, 0.75); + ActionPlayAnimation(ANIMATION_FIREFORGET_HEAD_TURN_RIGHT, 0.75); +} + +// Turn around to face a random direction +void AnimActionTurnAround() +{ +// BK Feb 2003: This never looks good. Don't do it. +// ActionDoCommand(SetFacing(IntToFloat(Random(360)))); +} + + + +// Go through a door and close it behind you, +// then walk a short distance away. +// This assumes the door exists, is unlocked, etc. +void AnimActionGoThroughDoor(object oDoor) +{ + AnimDebug("going through door " + GetTag(oDoor)); + SetLocalInt(oDoor, "BEING_CLOSED", TRUE); + object oDest = GetTransitionTarget(oDoor); + ActionMoveToObject(oDest); + ActionDoCommand(AssignCommand(oDest, ActionCloseDoor(oDest))); + ActionDoCommand(AssignCommand(oDoor, ActionCloseDoor(oDoor))); + ActionDoCommand(SetLocalInt(oDoor, "BEING_CLOSED", FALSE)); + DelayCommand(10.0, SetLocalInt(oDoor, "BEING_CLOSED", FALSE)); + AnimActionRandomMoveAway(oDest, DISTANCE_MEDIUM); +} + +/********************************************************************** + * The following AnimAction functions have a possibility of failing + * and not assigning any actions. + * They return TRUE on success, FALSE on failure. See notes up in the + * prototype section for details. + **********************************************************************/ + + +// If there's an open door nearby, possibly go close it, +// then come back to our current spot. +int AnimActionCloseRandomDoor() +{ + if (Random(4) != 0) return FALSE; + + int nNth = 1; + object oDoor = GetNearestObject(OBJECT_TYPE_DOOR); + location locCurrent = GetLocation(OBJECT_SELF); + while (GetIsObjectValid(oDoor)) { + // make sure everyone doesn't run to close the same door + if (GetIsOpen(oDoor) && !GetLocalInt(oDoor, "BEING_CLOSED")) { + AnimDebug("closing door: " + GetTag(oDoor)); + SetLocalInt(oDoor, "BEING_CLOSED", TRUE); + ActionCloseDoor(oDoor); + ActionDoCommand(SetLocalInt(oDoor, "BEING_CLOSED", FALSE)); + ActionMoveToLocation(locCurrent); + return TRUE; + } else { + AnimDebug("closed or being closed: " + GetTag(oDoor)); + } + nNth++; + oDoor = GetNearestObject(OBJECT_TYPE_DOOR, OBJECT_SELF, nNth); + } + return FALSE; +} + +// Sit in a random nearby chair if available. +// Looks for items with tag: Chair +int AnimActionSitInChair(float fMaxDistance) +{ + object oChair = GetRandomObjectByTag("Chair", fMaxDistance); + if (GetIsObjectValid(oChair) && !GetIsObjectValid(GetSittingCreature(oChair))) { + ActionSit(oChair); + SetAnimationCondition(NW_ANIM_FLAG_IS_INTERACTING); + return TRUE; + } + return FALSE; +} + +// Get up from a chair if we're sitting +int AnimActionGetUpFromChair() +{ + AnimDebug("getting up from chair"); + if (GetCurrentAction() == ACTION_SIT) { + ClearActions(CLEAR_X0_I0_ANIMS_AnimActionGetUpFromChair); + SetAnimationCondition(NW_ANIM_FLAG_IS_INTERACTING, FALSE); + AnimActionRandomMoveAway(GetNearestObject(OBJECT_TYPE_PLACEABLE), DISTANCE_SHORT); + AnimDebug("got up from chair"); + return TRUE; + } + return FALSE; +} + +// Go through a nearby door if appropriate. +// This will be done if the door is unlocked and +// the area the door leads to contains a waypoint +// with one of these tags: +// NW_TAVERN, NW_SHOP +int AnimActionGoInside() +{ + // Don't go inside a second area, since we'll never get + // back to our original one if we do that. + if (GetAnimationCondition(NW_ANIM_FLAG_IS_INSIDE)) { + AnimDebug("is inside already"); + return FALSE; + } + + object oDoor = GetRandomObjectByType(OBJECT_TYPE_DOOR, 1000.0); + if (!GetIsObjectValid(oDoor) || GetLocked(oDoor)) { + AnimDebug("Failed to enter door: " + GetTag(oDoor)); + return FALSE; + } + + object oDest = GetTransitionTarget(oDoor); + AnimDebug("Destination: " + GetTag(oDest)); + object oWay = GetNearestObjectByTag("NW_TAVERN", oDest); + if (!GetIsObjectValid(oWay)) + oWay = GetNearestObjectByTag("NW_SHOP", oDest); + if (GetIsObjectValid(oWay)) { + AnimDebug("Valid waypoint found: " + GetTag(oWay)); + AnimActionGoThroughDoor(oDoor); + SetAnimationCondition(NW_ANIM_FLAG_IS_INSIDE); + SetLocalObject(OBJECT_SELF, "NW_ANIM_DOOR", oDest); + return TRUE; + } + + return FALSE; +} + +// Leave area if appropriate. +// This only works for NPCs that entered an area that +// has a waypoint with one of these tags: +// NW_TAVERN, NW_SHOP +// If the NPC entered through a door, they will exit through +// that door. +int AnimActionGoOutside() +{ + if (GetAnimationCondition(NW_ANIM_FLAG_IS_INSIDE)) { + object oDoor = GetLocalObject(OBJECT_SELF, "NW_ANIM_DOOR"); + if (GetIsObjectValid(oDoor)) { + DeleteLocalObject(OBJECT_SELF, "NW_ANIM_DOOR"); + AnimActionGoThroughDoor(oDoor); + SetAnimationCondition(NW_ANIM_FLAG_IS_INSIDE, FALSE); + return TRUE; + } + } + return FALSE; +} + +// Go to a nearby waypoint or placeable marked with the +// tag "NW_STOP". +int AnimActionGoToStop(float fMaxDistance) +{ + object oStop = GetRandomStop(fMaxDistance); + if (GetIsObjectValid(oStop)) { + ClearActions(CLEAR_X0_I0_ANIMS_AnimActionGoToStop); + ActionMoveToObject(oStop, FALSE, DISTANCE_SHORT); + return TRUE; + } + return FALSE; +} + +// Find a friend within the given distance and talk to them. +// Returns TRUE on success, FALSE on failure. +int AnimActionFindFriend(float fMaxDistance) +{ + // If we had a friend recently, make sure we don't start talking + // again right away +// if (GetIsObjectValid(GetCurrentFriend())) { +// SetCurrentFriend(OBJECT_INVALID); +// } else + { + // Try and find a friend to talk to + object oFriend = GetRandomFriend(fMaxDistance); + if (GetIsObjectValid(oFriend) && !GetIsBusyWithAnimation(oFriend)) { + int nHDiff = GetHitDice(OBJECT_SELF) - GetHitDice(oFriend); + AnimActionStartTalking(oFriend, nHDiff); + return 1; + } + } + return 0; +} + +// Find a placeable within the given distance and interact +// with it. +// Returns TRUE on success, FALSE on failure. +int AnimActionFindPlaceable(float fMaxDistance) +{ + object oPlaceable = GetRandomObjectByTag("NW_INTERACTIVE", DISTANCE_SHORT); + if (GetIsObjectValid(oPlaceable)) { + AnimActionStartInteracting(oPlaceable); + return 1; + } + return 0; +} + +// If injured, find the nearest "NW_SAFE" object, +// go to it, and rest. +// Returns TRUE on success, FALSE on failure. +int AnimActionRest() +{ + if (GetCurrentHitPoints() < GetMaxHitPoints()) { + object oSafe = GetNearestObjectByTag("NW_SAFE"); + if (GetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE) && GetIsObjectValid(oSafe)) { + ClearActions(CLEAR_X0_I0_ANIMS_AnimActionRest1); + ActionMoveToObject(oSafe); + //ActionRest(); + return TRUE; + } else { + location lStart = GetLocalLocation(OBJECT_SELF, "ANIM_START_LOCATION"); + ClearActions(CLEAR_X0_I0_ANIMS_AnimActionRest2); + ActionMoveToLocation(lStart); + //ActionRest(); + return TRUE; + } + } + return FALSE; +} + +// If it is night, go back to our home waypoint, if we have one. +// This is only meaningful for mobile NPCs who would have left +// their homes during the day. +// Returns TRUE on success, FALSE on failure. +int AnimActionGoHome() +{ + object oHome = GetCreatureHomeWaypoint(); + if ( GetIsObjectValid(oHome) && !GetIsDay() && GetArea(OBJECT_SELF) != GetArea(oHome)) { + ClearActions(CLEAR_X0_I0_ANIMS_GoHome); + AnimActionGoOutside(); + AnimActionGoThroughDoor(GetLocalObject(OBJECT_SELF, + "NW_ANIM_DOOR_HOME")); + return TRUE; + } + return FALSE; +} + +// If it is day, leave our home area, if we have one. +// This is only meaningful for mobile NPCs. +// Returns TRUE on success, FALSE on failure. +int AnimActionLeaveHome() +{ + object oHome = GetCreatureHomeWaypoint(); + if ( GetIsObjectValid(oHome) && GetIsDay() && GetArea(OBJECT_SELF) == GetArea(oHome)) { + // Find the nearest door and walk out + ClearActions(CLEAR_X0_I0_ANIMS_AnimActionLeaveHome); + object oDoor = GetNearestObject(OBJECT_TYPE_DOOR); + if (!GetIsObjectValid(oDoor) || GetLocked(oDoor)) + return FALSE; + + object oDest = GetTransitionTarget(oDoor); + if (GetIsObjectValid(oDest)) { + SetLocalObject(OBJECT_SELF, "NW_ANIM_DOOR_HOME", oDest); + AnimActionGoThroughDoor(oDoor); + return TRUE; + } + } + return FALSE; +} + + +// If a PC is in the NPC's home and has not been challenged before, +// challenge them. +// This involves speaking a one-liner conversation from the +// conversation file ANIM_CONVERSATION, set above. +// Returns TRUE on success, FALSE on failure. +int AnimActionChallengeIntruder() +{ + object oHome = GetCreatureHomeWaypoint(); + if (GetIsObjectValid(oHome) && GetArea(OBJECT_SELF) == GetArea(oHome)) { + object oPC = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC); + if (GetIsObjectValid(oPC) && !GetLocalInt(OBJECT_SELF, GetName(oPC) + "_CHALLENGED")) { + ClearActions(CLEAR_X0_I0_ANIMS_AnimActionChallengeIntruder); + ActionDoCommand(SetFacingPoint(GetPosition(oPC))); + ActionDoCommand(SpeakOneLinerConversation(ANIM_CONVERSATION, oPC)); + SetLocalInt(OBJECT_SELF, GetName(oPC) + "_CHALLENGED", TRUE); + return TRUE; + } + } + return FALSE; +} + + +/********************************************************************** + ********************************************************************** + * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE + * The functions stuck below here are generally just big ugly + * switch statements to choose between a bunch of random + * animations. + * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE * NOTE + ********************************************************************** + **********************************************************************/ + +// Interact with a placeable object. +// This will activate/deactivate the placeable object if a valid +// one is passed in. +// KLUDGE: If a placeable object without an inventory should +// still be opened/shut instead of de/activated, set +// its Will Save to 1. +void AnimActionPlayRandomInteractAnimation(object oPlaceable) +{ + int nRoll = Random(5); + + if (nRoll == 0) { + ActionPlayAnimation(ANIMATION_FIREFORGET_PAUSE_SCRATCH_HEAD); + return; + } + + // See where the placeable is in relation to us, height-wise + vector vPos = GetPosition(oPlaceable); + vector vMyPos = GetPosition(OBJECT_SELF); + float fZDiff = vMyPos.z - vPos.z; + if ( fZDiff > 0.0 ) { + // we're above the placeable + ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + } else { + ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + } + + // KLUDGE! KLUDGE! KLUDGE! + // Because of placeables like the trap doors, etc, that should be + // "opened" rather than "activated", but don't have an inventory, + // we use this ugly hack: set the "Will" saving throw of a placeable + // to the value 1 if it should be opened rather than activated. + if (GetHasInventory(oPlaceable) || GetWillSavingThrow(oPlaceable) == 1) { + if (GetIsOpen(oPlaceable)) { + AssignCommand(oPlaceable, + DelayCommand(ANIM_LOOPING_LENGTH, + ActionPlayAnimation(ANIMATION_PLACEABLE_CLOSE))); + } else { + AssignCommand(oPlaceable, + DelayCommand(ANIM_LOOPING_LENGTH, + ActionPlayAnimation(ANIMATION_PLACEABLE_OPEN))); + } + } else { + int bIsActive = GetLocalInt(oPlaceable, "NW_ANIM_PLACEABLE_ACTIVE"); + if (bIsActive) { + AssignCommand(oPlaceable, + DelayCommand(ANIM_LOOPING_LENGTH, + ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE))); + SetLocalInt(oPlaceable, "NW_ANIM_PLACEABLE_ACTIVE", FALSE); + } else { + AssignCommand(oPlaceable, + DelayCommand(ANIM_LOOPING_LENGTH, + ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE))); + SetLocalInt(oPlaceable, "NW_ANIM_PLACEABLE_ACTIVE", TRUE); + } + } + + return; +} + +// Play a random talk gesture animation. +// If a hit dice difference (should be the hit dice of the caller +// minus the hit dice of the person being talked to) is passed in, +// the caller will play slightly different animations if they are +// weaker. +void AnimActionPlayRandomTalkAnimation(int nHDiff) +{ + int nRoll = Random(9); +//SpeakString("Talk " + IntToString(nRoll)); + switch (nRoll) { + case 0: + if (GetAnimationCondition(NW_ANIM_FLAG_CHATTER)) { + VoiceYes(); + } + // deliberate fall-through! + case 1: + ActionPlayAnimation(ANIMATION_LOOPING_LISTEN, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 2: + case 3: + ActionPlayAnimation(ANIMATION_LOOPING_TALK_NORMAL, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 4: + if (nHDiff < 0) + ActionPlayAnimation(ANIMATION_LOOPING_TALK_PLEADING, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + else { + if (Random(2) == 0 && GetAnimationCondition(NW_ANIM_FLAG_CHATTER)) { + VoiceLaugh(); + } + ActionPlayAnimation(ANIMATION_LOOPING_TALK_LAUGHING, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + } + break; + case 5: + // BK Feb 2003 Salutes look stupid + // if (nHDiff < 0) + // ActionPlayAnimation(ANIMATION_FIREFORGET_SALUTE, 0.75); + // else + ActionPlayAnimation(ANIMATION_LOOPING_TALK_FORCEFUL, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 6: + if (GetAnimationCondition(NW_ANIM_FLAG_CHATTER)) { + VoiceNo(); + } + // deliberate fall-through! + case 7: + AnimActionShakeHead(); + break; + case 8: + if (nHDiff > 0) + ActionPlayAnimation(ANIMATION_FIREFORGET_TAUNT); + else { + if (Random(2) == 0 && GetAnimationCondition(NW_ANIM_FLAG_CHATTER)) { + VoiceLaugh(); + } + ActionPlayAnimation(ANIMATION_LOOPING_TALK_LAUGHING, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + } + break; + } + + return; +} + +// Play a random animation that all creatures should have. +void AnimActionPlayRandomBasicAnimation() +{ + int nRoll = Random(2); + switch (nRoll) { + case 0: + // BK Feb 2003: This always looks dumb + // ActionPlayAnimation(ANIMATION_LOOPING_GET_MID, + // ANIM_LOOPING_SPEED, + // ANIM_LOOPING_LENGTH); + break; + case 1: + ActionPlayAnimation(ANIMATION_FIREFORGET_TAUNT); + break; + } +} + + +// Play a random animation. +void AnimActionPlayRandomAnimation() +{ + int nRoll; + int bInTavern=FALSE; + int bInHome=FALSE; + int bNearAltar=FALSE; + + object oWay = GetNearestObjectByTag("NW_TAVERN"); + if (GetIsObjectValid(oWay)) { + bInTavern = TRUE; + } else { + oWay = GetNearestObjectByTag("NW_HOME"); + if (GetIsObjectValid(oWay)) { + bInHome = TRUE; + } else { + oWay = GetNearestObjectByTag("NW_ALTAR"); + if (GetIsObjectValid(oWay) && GetDistanceToObject(oWay) < DISTANCE_SHORT) { + bNearAltar = TRUE; + } + } + } + + if (bInTavern) { + nRoll = Random(15); + switch (nRoll) { + case 0: + case 1: + ActionPlayAnimation(ANIMATION_FIREFORGET_DRINK); break; + case 2: + if (GetAnimationCondition(NW_ANIM_FLAG_CHATTER)) { + VoicePoisoned(); + } + ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_DRUNK, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 3: + ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_DRUNK, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 4: + ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY1); break; + case 5: + ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2); break; + case 6: + ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY3); break; + case 7: + case 8: + if (GetAnimationCondition(NW_ANIM_FLAG_CHATTER)) { + VoiceLaugh(); + } + ActionPlayAnimation(ANIMATION_LOOPING_TALK_LAUGHING, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 9: + case 10: + ActionPlayAnimation(ANIMATION_FIREFORGET_PAUSE_BORED); break; + case 11: + ActionPlayAnimation(ANIMATION_FIREFORGET_PAUSE_SCRATCH_HEAD); break; + case 12: + case 13: + ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_TIRED, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 14: + AnimActionLookAround(); break; + } + } else if (bNearAltar) { + nRoll = Random(10); + switch (nRoll) { + case 0: + ActionPlayAnimation(ANIMATION_FIREFORGET_READ); break; + case 1: + case 2: + case 3: + ActionPlayAnimation(ANIMATION_LOOPING_MEDITATE, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH * 2); + break; + case 4: + case 5: + ActionPlayAnimation(ANIMATION_LOOPING_WORSHIP, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH * 2); + break; + case 6: + ActionPlayAnimation(ANIMATION_LOOPING_LISTEN, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 7: + ActionPlayAnimation(ANIMATION_LOOPING_PAUSE, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 8: + ActionPlayAnimation(ANIMATION_LOOPING_PAUSE2, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 9: + AnimActionLookAround(); break; + } + } else if (bInHome) { + nRoll = Random(6); + switch (nRoll) { + case 0: + ActionPlayAnimation(ANIMATION_LOOPING_PAUSE, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 1: + ActionPlayAnimation(ANIMATION_LOOPING_PAUSE2, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 2: + ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_TIRED, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 3: + ActionPlayAnimation(ANIMATION_FIREFORGET_PAUSE_BORED); break; + case 4: + ActionPlayAnimation(ANIMATION_FIREFORGET_PAUSE_SCRATCH_HEAD); break; + case 5: + AnimActionLookAround(); break; + } + } else { + // generic set, for the street + nRoll = Random(8); + switch (nRoll) { + case 0: + ActionPlayAnimation(ANIMATION_LOOPING_PAUSE, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 1: + ActionPlayAnimation(ANIMATION_LOOPING_PAUSE2, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 2: + /* Bk Feb 2003: Looks dumb + ActionPlayAnimation(ANIMATION_LOOPING_GET_LOW, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break;*/ + case 3: + ActionPlayAnimation(ANIMATION_FIREFORGET_PAUSE_BORED); break; + case 4: + ActionPlayAnimation(ANIMATION_FIREFORGET_PAUSE_SCRATCH_HEAD); break; + case 5: + ActionPlayAnimation(ANIMATION_LOOPING_PAUSE_TIRED, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 6: + ActionPlayAnimation(ANIMATION_LOOPING_LOOK_FAR, + ANIM_LOOPING_SPEED, + ANIM_LOOPING_LENGTH); + break; + case 7: + AnimActionLookAround(); break; + } + } + return; +} \ No newline at end of file diff --git a/_module/nss/no_lib_data.nss b/_module/nss/no_lib_data.nss new file mode 100644 index 00000000..f6199f61 --- /dev/null +++ b/_module/nss/no_lib_data.nss @@ -0,0 +1,15 @@ +struct sSpellDefStatus { + int iTotal; + int iMantle; + int iElem; + int iDeath; + int iMind; + int iInvis; + int iBlocker; +}; + +struct sPhysDefStatus { + int iTotal; + int iDamred; + int iConceal; +}; diff --git a/_module/nss/no_lib_feat.nss b/_module/nss/no_lib_feat.nss new file mode 100644 index 00000000..2acb3062 --- /dev/null +++ b/_module/nss/no_lib_feat.nss @@ -0,0 +1,95 @@ +#include "no_inc_ptypes" + +//functions +int GetEnhanceFeat( object oEnt=OBJECT_SELF ) +{ + int iCnt = 0; + int iFeat = 0; + + if ( GetHasFeat( FEAT_EMPTY_BODY, oEnt ) && !GetHasFeatEffect( FEAT_EMPTY_BODY, oEnt ) ) + { + SetLocalInt( oEnt, "#FEAT_" + IntToString( ++iCnt ), FEAT_EMPTY_BODY ); + } + if ( GetHasFeat( FEAT_MIGHTY_RAGE, oEnt ) ) + { + if ( !GetHasFeatEffect( FEAT_MIGHTY_RAGE, oEnt ) ) + { + SetLocalInt( oEnt, "#FEAT_" + IntToString( ++iCnt ), FEAT_MIGHTY_RAGE ); + } + } + else if ( GetHasFeat( FEAT_BARBARIAN_RAGE, oEnt ) && !GetHasFeatEffect( FEAT_BARBARIAN_RAGE, oEnt ) ) + { + SetLocalInt( oEnt, "#FEAT_" + IntToString( ++iCnt ), FEAT_BARBARIAN_RAGE ); + } + if ( GetHasFeat( FEAT_BARD_SONGS, oEnt ) && !GetHasFeatEffect( FEAT_BARD_SONGS, oEnt ) ) + { + SetLocalInt( oEnt, "#FEAT_" + IntToString( ++iCnt ), FEAT_BARD_SONGS ); + } + if ( GetHasFeat( FEAT_CURSE_SONG, oEnt ) && !GetHasFeatEffect( FEAT_CURSE_SONG, oEnt ) ) + { + SetLocalInt( oEnt, "#FEAT_" + IntToString( ++iCnt ), FEAT_CURSE_SONG ); + } + if ( GetHasFeat( FEAT_DIVINE_WRATH, oEnt ) && GetAbilityModifier( ABILITY_CHARISMA, oEnt ) > 0 && !GetHasFeatEffect( FEAT_DIVINE_WRATH, oEnt ) ) + { + SetLocalInt( oEnt, "#FEAT_" + IntToString( ++iCnt ), FEAT_DIVINE_WRATH ); + } + if ( GetHasFeat( FEAT_DWARVEN_DEFENDER_DEFENSIVE_STANCE, oEnt ) && !GetHasFeatEffect( FEAT_DWARVEN_DEFENDER_DEFENSIVE_STANCE, oEnt ) ) + { + SetLocalInt( oEnt, "#FEAT_" + IntToString( ++iCnt ), FEAT_DWARVEN_DEFENDER_DEFENSIVE_STANCE ); + } + if ( GetHasFeat( FEAT_EPIC_BLINDING_SPEED, oEnt ) && !GetHasFeatEffect( FEAT_EPIC_BLINDING_SPEED, oEnt ) && + !GetHasSpellEffect( SPELL_HASTE, oEnt ) && !GetHasSpellEffect( SPELL_MASS_HASTE, oEnt ) ) + { + SetLocalInt( oEnt, "#FEAT_" + IntToString( ++iCnt ), FEAT_EPIC_BLINDING_SPEED ); + } + if ( GetHasFeat( FEAT_SHADOW_EVADE, oEnt ) && !GetHasFeatEffect( FEAT_SHADOW_EVADE, oEnt ) ) + { + SetLocalInt( oEnt, "#FEAT_" + IntToString( ++iCnt ), FEAT_SHADOW_EVADE ); + } + if ( GetHasFeat( FEAT_DIVINE_MIGHT, oEnt ) && GetHasFeat( FEAT_TURN_UNDEAD, oEnt ) && !GetHasFeatEffect( FEAT_DIVINE_MIGHT, oEnt ) ) + { + SetLocalInt( oEnt, "#FEAT_" + IntToString( ++iCnt ), FEAT_DIVINE_MIGHT ); + } + if ( GetHasFeat( FEAT_DIVINE_SHIELD, oEnt ) && GetHasFeat( FEAT_TURN_UNDEAD, oEnt ) && !GetHasFeatEffect( FEAT_DIVINE_SHIELD, oEnt ) ) + { + SetLocalInt( oEnt, "#FEAT_" + IntToString( ++iCnt ), FEAT_DIVINE_SHIELD ); + } + if ( GetHasFeat( FEAT_TYMORAS_SMILE, oEnt ) && !GetHasFeatEffect( FEAT_TYMORAS_SMILE, oEnt ) ) + { + SetLocalInt( oEnt, "#FEAT_" + IntToString( ++iCnt ), FEAT_TYMORAS_SMILE ); + } + + iFeat = GetLocalInt( oEnt, "#FEAT_" + IntToString( Random( iCnt ) + 1 ) ); + while ( iCnt ) + { + DeleteLocalInt( oEnt, "#FEAT_" + IntToString( iCnt-- ) ); + } + return iFeat; +} + +int GetGroupEnhanceFeat( object oEnt=OBJECT_SELF ) +{ + int iCnt = 0; + int iFeat = 0; + + if ( GetHasFeat( FEAT_BARD_SONGS, oEnt ) && !GetHasFeatEffect( FEAT_BARD_SONGS, oEnt ) ) + { + SetLocalInt( oEnt, "#FEAT_" + IntToString( ++iCnt ), FEAT_BARD_SONGS ); + } + + iFeat = GetLocalInt( oEnt, "#FEAT_" + IntToString( Random( iCnt ) + 1 ) ); + while ( iCnt ) + { + DeleteLocalInt( oEnt, "#FEAT_" + IntToString( iCnt-- ) ); + } + return iFeat; +} + +float GetGroupEnhanceFeatRadius( int iFeat ) +{ + if ( iFeat == FEAT_BARD_SONGS ) + { + return RADIUS_SIZE_COLOSSAL; + } + return 0.0; +} \ No newline at end of file diff --git a/_module/nss/no_lib_magic.nss b/_module/nss/no_lib_magic.nss new file mode 100644 index 00000000..c6533b72 --- /dev/null +++ b/_module/nss/no_lib_magic.nss @@ -0,0 +1,3982 @@ +#include "no_inc_ptypes" + +//functions +int GetBestMagicDefenseSelf( object oEnt=OBJECT_SELF ) +{ + int iR; + + if (!GetHasSpellEffect( SPELL_LESSER_SPELL_MANTLE, oEnt ) && + !GetHasSpellEffect( SPELL_SPELL_MANTLE, oEnt ) && + !GetHasSpellEffect( SPELL_GREATER_SPELL_MANTLE, oEnt ) ) + { + iR = Random( 3 ) + 1; + if ( GetHasSpell( SPELL_LESSER_SPELL_MANTLE, oEnt ) && iR == 1 ) + { + return SPELL_LESSER_SPELL_MANTLE; + } + if ( GetHasSpell( SPELL_SPELL_MANTLE, oEnt ) && iR == 2 ) + { + return SPELL_SPELL_MANTLE; + } + if ( GetHasSpell( SPELL_GREATER_SPELL_MANTLE, oEnt ) && iR == 3 ) + { + return SPELL_GREATER_SPELL_MANTLE; + } + } + // Don't have mantles active or available + // No reliable defense against high level spells available + // Do the best we can with other spells + // resistance from spells + if ( !GetHasSpellEffect( SPELL_SPELL_RESISTANCE, oEnt ) ) + { + if ( GetHasSpell( SPELL_SPELL_RESISTANCE, oEnt ) ) + { + return SPELL_SPELL_RESISTANCE; + } + } + // protection from spells + if ( !GetHasSpellEffect( SPELL_PROTECTION_FROM_SPELLS, oEnt ) ) + { + if ( GetHasSpell( SPELL_PROTECTION_FROM_SPELLS, oEnt ) ) + { + return SPELL_PROTECTION_FROM_SPELLS; + } + } + // Shadow Shield/Death Ward for negation of death effects + if ( !GetHasSpellEffect( SPELL_SHADOW_SHIELD, oEnt ) && + !GetHasSpellEffect( SPELL_DEATH_WARD, oEnt ) ) + { + if ( GetHasSpell( SPELL_SHADOW_SHIELD, oEnt ) ) + { + return SPELL_SHADOW_SHIELD; + } + if ( GetHasSpell( SPELL_DEATH_WARD, oEnt ) ) + { + return SPELL_DEATH_WARD; + } + } + // Next go for elemental protection + if (!GetHasSpellEffect( SPELL_ENDURE_ELEMENTS, oEnt ) && + !GetHasSpellEffect( SPELL_RESIST_ELEMENTS, oEnt ) && + !GetHasSpellEffect( SPELL_PROTECTION_FROM_ELEMENTS, oEnt ) && + !GetHasSpellEffect( SPELL_ENERGY_BUFFER, oEnt ) ) + { + iR = Random( 4 ) + 1; + if ( GetHasSpell( SPELL_ENDURE_ELEMENTS, oEnt ) && iR == 1 ) + { + return SPELL_ENDURE_ELEMENTS; + } + if ( GetHasSpell( SPELL_RESIST_ELEMENTS, oEnt ) && iR == 2 ) + { + return SPELL_RESIST_ELEMENTS; + } + if ( GetHasSpell( SPELL_PROTECTION_FROM_ELEMENTS, oEnt ) && iR == 3 ) + { + return SPELL_PROTECTION_FROM_ELEMENTS; + } + if ( GetHasSpell( SPELL_ENERGY_BUFFER, oEnt ) && iR == 4 ) + { + return SPELL_ENERGY_BUFFER; + } + } + // Next go for elemental shield + if ( !GetHasSpellEffect( SPELL_ELEMENTAL_SHIELD, oEnt ) ) + { + if ( GetHasSpell( SPELL_ELEMENTAL_SHIELD, oEnt ) ) + { + return SPELL_ELEMENTAL_SHIELD; + } + } + // Next try any other defenses + if (!GetHasSpellEffect( SPELL_LESSER_MIND_BLANK, oEnt ) && + !GetHasSpellEffect( SPELL_MIND_BLANK, oEnt ) ) + { + // ramp up mind blanks + // LATER: add check for allies, use mind blank appropriately + if ( GetHasSpell( SPELL_LESSER_MIND_BLANK, oEnt ) ) + { + return SPELL_LESSER_MIND_BLANK; + } + /* used in group stuff + if ( GetHasSpell( SPELL_MIND_BLANK, oEnt ) ) + { + return SPELL_MIND_BLANK; + } + */ + } + // globes, biggest first + if ( !GetHasSpellEffect( SPELL_GLOBE_OF_INVULNERABILITY, oEnt ) ) + { + if ( GetHasSpell( SPELL_GLOBE_OF_INVULNERABILITY, oEnt ) ) + { + return SPELL_GLOBE_OF_INVULNERABILITY; + } + } + if ( !GetHasSpellEffect( SPELL_MINOR_GLOBE_OF_INVULNERABILITY, oEnt ) ) + { + if ( GetHasSpell( SPELL_MINOR_GLOBE_OF_INVULNERABILITY, oEnt ) ) + { + return SPELL_MINOR_GLOBE_OF_INVULNERABILITY; + } + } + // scraping the bottom of the barrel now + if (!GetHasSpellEffect( SPELL_GLOBE_OF_INVULNERABILITY, oEnt ) && + !GetHasSpellEffect( SPELL_MINOR_GLOBE_OF_INVULNERABILITY, oEnt ) && + !GetHasSpellEffect( SPELL_ETHEREAL_VISAGE, oEnt ) ) + { + if ( GetHasSpell( SPELL_ETHEREAL_VISAGE, oEnt ) ) + { + return SPELL_ETHEREAL_VISAGE; + } + if ( !GetHasSpellEffect( SPELL_GHOSTLY_VISAGE, oEnt ) && GetHasSpell( SPELL_GHOSTLY_VISAGE, oEnt ) ) + { + return SPELL_GHOSTLY_VISAGE; + } + } + return FALSE; +} + +int GetBestMagicDefenseSingle( object oEnt=OBJECT_SELF, object oC=OBJECT_SELF ) +{ + int iR; + + if ( !GetHasSpellEffect( SPELL_SPELL_RESISTANCE, oEnt ) ) + { + if ( GetHasSpell( SPELL_SPELL_RESISTANCE, oC ) ) + { + return SPELL_SPELL_RESISTANCE; + } + } + // Shadow Shield/Death Ward for negation of death effects + if ( !GetHasSpellEffect( SPELL_SHADOW_SHIELD, oEnt ) && + !GetHasSpellEffect( SPELL_DEATH_WARD, oEnt ) ) + { + /* + if ( GetHasSpell( SPELL_SHADOW_SHIELD, oC ) ) + { + return SPELL_SHADOW_SHIELD; + } + */ + if ( GetHasSpell( SPELL_DEATH_WARD, oC ) ) + { + return SPELL_DEATH_WARD; + } + } + // Next go for elemental protection + if (!GetHasSpellEffect( SPELL_ENDURE_ELEMENTS, oEnt ) && + !GetHasSpellEffect( SPELL_RESIST_ELEMENTS, oEnt ) && + !GetHasSpellEffect( SPELL_PROTECTION_FROM_ELEMENTS, oEnt ) && + !GetHasSpellEffect( SPELL_ENERGY_BUFFER, oEnt ) ) + { + iR = 3; + if ( oEnt == oC ) + { + iR = 4; + } + iR = Random( iR ) + 1; + if ( GetHasSpell( SPELL_ENDURE_ELEMENTS, oC ) && iR == 1 ) + { + return SPELL_ENDURE_ELEMENTS; + } + if ( GetHasSpell( SPELL_RESIST_ELEMENTS, oC ) && iR == 2 ) + { + return SPELL_RESIST_ELEMENTS; + } + if ( GetHasSpell( SPELL_PROTECTION_FROM_ELEMENTS, oC ) && iR == 3 ) + { + return SPELL_PROTECTION_FROM_ELEMENTS; + } + if ( GetHasSpell( SPELL_ENERGY_BUFFER, oC ) && iR == 4 ) + { + return SPELL_ENERGY_BUFFER; + } + } + if (!GetHasSpellEffect( SPELL_LESSER_MIND_BLANK, oEnt ) && + !GetHasSpellEffect( SPELL_MIND_BLANK, oEnt ) ) + { + if ( GetHasSpell( SPELL_LESSER_MIND_BLANK, oC ) ) + { + return SPELL_LESSER_MIND_BLANK; + } + } + return FALSE; +} + +int GetBestPhysDefenseSelf( object oEnt=OBJECT_SELF ) +{ + //function not finished + //Epic warding and epic mage armour do not currently work for non PCs, GetCasterLevel() reports 0 for them + if (//!GetHasSpellEffect( SPELL_EPIC_WARDING, oEnt ) && + !GetHasSpellEffect( SPELL_STONESKIN, oEnt ) && + !GetHasSpellEffect( SPELL_GREATER_STONESKIN, oEnt ) && + !GetHasSpellEffect( SPELL_PREMONITION, oEnt ) ) + { + if ( GetHasSpell( SPELL_EPIC_WARDING, oEnt ) ) + { + return SPELL_EPIC_WARDING; + } + if ( GetHasSpell( SPELL_GREATER_STONESKIN, oEnt ) ) + { + return SPELL_GREATER_STONESKIN; + } + if ( GetHasSpell( SPELL_PREMONITION, oEnt ) ) + { + return SPELL_PREMONITION; + } + if ( GetHasSpell( SPELL_STONESKIN, oEnt ) ) + { + return SPELL_STONESKIN; + } + } + return FALSE; +} + +int GetBestPhysDefenseSingle( object oEnt=OBJECT_SELF, object oC=OBJECT_SELF ) +{ + //function not finished + if (!GetHasSpellEffect( SPELL_STONESKIN, oEnt ) && + !GetHasSpellEffect( SPELL_GREATER_STONESKIN, oEnt ) && + !GetHasSpellEffect( SPELL_PREMONITION, oEnt ) ) + { + if ( GetHasSpell( SPELL_STONESKIN, oC ) ) + { + return SPELL_STONESKIN; + } + } + return FALSE; +} + +int GetBestGenericProtection( object oEnt=OBJECT_SELF ) +{ + //TESTING FOR GATE PROTECTIONS + //Currently not in use because of casting bugs + if ( !GetHasSpellEffect( SPELL_HOLY_AURA, oEnt ) && + !GetHasSpellEffect( SPELL_MAGIC_CIRCLE_AGAINST_EVIL, oEnt ) && + !GetHasSpellEffect( SPELL_PROTECTION_FROM_EVIL, oEnt ) ) + { + if ( GetHasSpell( SPELL_HOLY_AURA, oEnt ) ) + { + return SPELL_HOLY_AURA; + } + if ( GetHasSpell( SPELL_MAGIC_CIRCLE_AGAINST_EVIL, oEnt ) ) + { + return SPELL_MAGIC_CIRCLE_AGAINST_EVIL; + } + if ( GetHasSpell( SPELL_PROTECTION_FROM_EVIL, oEnt ) ) + { + return SPELL_PROTECTION_FROM_EVIL; + } + } + return FALSE; +} + +struct sSpellDefStatus EvaluateSpellDefenses( object oTarget=OBJECT_SELF ) +{ + struct sSpellDefStatus sDef; + + if ( GetHasSpellEffect( SPELL_GREATER_SPELL_MANTLE, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 9; + sDef.iMantle = sDef.iMantle + 9; + } + if ( GetHasSpellEffect( SPELL_SPELL_MANTLE, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 7; + sDef.iMantle = sDef.iMantle + 7; + } + if ( GetHasSpellEffect( SPELL_LESSER_SPELL_MANTLE, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 5; + sDef.iMantle = sDef.iMantle + 5; + } + if ( GetHasSpellEffect( SPELL_ENERGY_BUFFER, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 5; + sDef.iElem = sDef.iElem + 5; + } + if ( GetHasSpellEffect( SPELL_PROTECTION_FROM_ELEMENTS, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 3; + sDef.iElem = sDef.iElem + 3; + } + if ( GetHasSpellEffect( SPELL_RESIST_ELEMENTS, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 2; + sDef.iElem = sDef.iElem + 2; + } + if ( GetHasSpellEffect( SPELL_ENDURE_ELEMENTS, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 1; + sDef.iElem = sDef.iElem + 1; + } + if ( GetHasSpellEffect( SPELL_SHADOW_SHIELD, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 7; + sDef.iDeath = sDef.iDeath + 7; + } + if ( GetHasSpellEffect( SPELL_MIND_BLANK, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 8; + sDef.iMind = sDef.iMind + 8; + } + if ( GetHasSpellEffect( SPELL_LESSER_MIND_BLANK, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 5; + sDef.iMind = sDef.iMind + 5; + } + if ( GetHasSpellEffect( SPELL_CLARITY, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 3; + sDef.iMind = sDef.iMind + 3; + } + if ( GetHasSpellEffect( SPELL_GHOSTLY_VISAGE, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 2; + sDef.iMind = sDef.iBlocker + 2; + } + if ( GetHasSpellEffect( SPELL_ETHEREAL_VISAGE, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 6; + sDef.iMind = sDef.iBlocker + 6; + } + if ( GetHasSpellEffect( SPELL_MINOR_GLOBE_OF_INVULNERABILITY, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 4; + sDef.iMind = sDef.iBlocker + 4; + } + if ( GetHasSpellEffect( SPELL_GLOBE_OF_INVULNERABILITY, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 6; + sDef.iMind = sDef.iBlocker + 6; + } + + return sDef; +} + +struct sPhysDefStatus EvaluatePhysicalDefenses( object oTarget=OBJECT_SELF ) +{ + //function not finished + struct sPhysDefStatus sDef; + + if ( GetHasSpellEffect( SPELL_STONESKIN, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 4; + sDef.iDamred = sDef.iDamred + 4; + } + if ( GetHasSpellEffect( SPELL_GREATER_STONESKIN, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 6; + sDef.iDamred = sDef.iDamred + 6; + } + if ( GetHasSpellEffect( SPELL_PREMONITION, oTarget ) ) + { + sDef.iTotal = sDef.iTotal + 8; + sDef.iDamred = sDef.iDamred + 8; + } + + return sDef; +} + +int GetBestHeal( object oEnt=OBJECT_SELF, int iMin=10 ) +{ + int iDamage = 0; + + if ( GetIsObjectValid( oEnt ) ) + { + iDamage = GetMaxHitPoints( oEnt ) - GetCurrentHitPoints( oEnt ); + if ( iDamage < iMin ) + { + return 0; + } + if ( iDamage >= 60 && GetHasSpell( SPELL_HEAL ) ) + { + return SPELL_HEAL; + } + if ( iDamage >= 40 ) + { + if ( GetHasSpell( SPELL_CURE_CRITICAL_WOUNDS ) ) + { + return SPELL_CURE_CRITICAL_WOUNDS; + } + if ( GetHasFeat( FEAT_LAY_ON_HANDS ) ) + { + return FEAT_LAY_ON_HANDS; + } + } + if ( iDamage >= 30 && GetHasSpell( SPELL_CURE_SERIOUS_WOUNDS ) ) + { + return SPELL_CURE_SERIOUS_WOUNDS; + } + if ( iDamage >= 20 && GetHasSpell( SPELL_CURE_MODERATE_WOUNDS ) ) + { + return SPELL_CURE_MODERATE_WOUNDS; + } + if ( iDamage >= 10 && GetHasSpell( SPELL_CURE_LIGHT_WOUNDS ) ) + { + return SPELL_CURE_LIGHT_WOUNDS; + } + } + return 0; +} + +int GetGroupHealSpell( int iMinLvl=0, object oCaster=OBJECT_SELF ) +{ + int iHeal = 0; + + if ( !iHeal || iMinLvl >= 5 ) + { + if ( GetHasSpell( SPELL_HEALING_CIRCLE, oCaster ) ) + { + return SPELL_HEALING_CIRCLE; + } + } + if ( !iHeal || iMinLvl >= 8 ) + { + if ( GetHasSpell( SPELL_MASS_HEAL, oCaster ) ) + { + return SPELL_MASS_HEAL; + } + } + return FALSE; +} + +int GetGroupHealSpellAmount( int iH=0, object oCaster=OBJECT_SELF ) +{ + int iHeal = 0; + + if ( iH == SPELL_HEALING_CIRCLE ) + { + iHeal = 20; + } + else if ( iH == SPELL_MASS_HEAL ) + { + iHeal = 60; + } + return iHeal; +} + +float GetGroupHealSpellRadius( int iH=0 ) +{ + float fRad = 0.0; + + if ( iH == SPELL_HEALING_CIRCLE ) + { + fRad = RADIUS_SIZE_MEDIUM; + } + else if ( iH == SPELL_MASS_HEAL ) + { + fRad = RADIUS_SIZE_LARGE; + } + return fRad; +} + +int GetBestRaise( int iCombat=FALSE ) +{ + //full resurrection is preference in combat situation + if ( iCombat ) + { + if ( GetHasSpell( SPELL_RESURRECTION ) ) + { + return SPELL_RESURRECTION; + } + if ( GetHasSpell( SPELL_RAISE_DEAD ) ) + { + return SPELL_RAISE_DEAD; + } + } + else + { + if ( GetHasSpell( SPELL_RAISE_DEAD ) ) + { + return SPELL_RAISE_DEAD; + } + if ( GetHasSpell( SPELL_RESURRECTION ) ) + { + return SPELL_RESURRECTION; + } + } + return 0; +} + +int GetHasHealingAbility( object oCaster=OBJECT_SELF ) +{ + int iHeal = 0; + + if ( GetHasSpell( SPELL_CURE_MINOR_WOUNDS, oCaster ) ) + { + iHeal += 1; + } + if ( GetHasSpell( SPELL_CURE_LIGHT_WOUNDS, oCaster ) ) + { + iHeal += 2; + } + if ( GetHasSpell( SPELL_CURE_MODERATE_WOUNDS, oCaster ) ) + { + iHeal += 4; + } + if ( GetHasSpell( SPELL_CURE_SERIOUS_WOUNDS, oCaster ) ) + { + iHeal += 8; + } + if ( GetHasFeat( FEAT_LAY_ON_HANDS, oCaster ) ) + { + iHeal += 16; + } + if ( GetHasSpell( SPELL_CURE_CRITICAL_WOUNDS, oCaster ) ) + { + iHeal += 32; + } + if ( GetHasSpell( SPELL_HEAL, oCaster ) ) + { + iHeal += 64; + } + return iHeal; +} + +int GetHasRaisingAbility( object oCaster=OBJECT_SELF ) +{ + int iHeal = 0; + + if ( GetHasSpell( SPELL_RAISE_DEAD, oCaster ) ) + { + iHeal += 1; + } + if ( GetHasSpell( SPELL_RESURRECTION, oCaster ) ) + { + iHeal += 2; + } + return iHeal; +} + +int GetHasHelpingAbility( object oCaster=OBJECT_SELF ) +{ + int iHelp = 0; + + if ( !GetIsObjectValid( oCaster ) ) + { + return 0; + } + + if ( GetHasSpell( SPELL_REMOVE_FEAR, oCaster ) ) + { + iHelp += 1; + } + if ( GetHasSpell( SPELL_LESSER_RESTORATION, oCaster ) ) + { + iHelp += 2; + } + if ( GetHasSpell( SPELL_REMOVE_PARALYSIS, oCaster ) ) + { + iHelp += 4; + } + if ( GetHasSpell( SPELL_CLARITY, oCaster ) ) + { + iHelp += 8; + } + if ( GetHasSpell( SPELL_REMOVE_BLINDNESS_AND_DEAFNESS, oCaster ) ) + { + iHelp += 16; + } + if ( GetHasSpell( SPELL_REMOVE_CURSE, oCaster ) ) + { + iHelp += 32; + } + if ( GetHasSpell( SPELL_REMOVE_DISEASE, oCaster ) ) + { + iHelp += 64; + } + if ( GetHasSpell( SPELL_FREEDOM_OF_MOVEMENT, oCaster ) ) + { + iHelp += 128; + } + if ( GetHasSpell( SPELL_NEUTRALIZE_POISON, oCaster ) ) + { + iHelp += 256; + } + if ( GetHasSpell( SPELL_LESSER_MIND_BLANK, oCaster ) ) + { + iHelp += 512; + } + if ( GetHasSpell( SPELL_RESTORATION, oCaster ) ) + { + iHelp += 1024; + } + if ( GetHasSpell( SPELL_GREATER_RESTORATION, oCaster ) ) + { + iHelp += 2048; + } + return iHelp; +} + +int GetBestHelp( object oEnt, object oCaster=OBJECT_SELF ) +{ + int iEff = GetEffectsOnObject( oEnt ); + + //PrintString( "GBH: " + GetName( oCaster ) + " -> " + GetName( oEnt ) + "(" + IntToString( iEff ) + ")" ); + //check effects for spell selection in priority + if ( iEff & NO_EFFECT_PARALYZE ) //PARALYZE + { + if ( GetHasSpell( SPELL_REMOVE_PARALYSIS ) ) + { + return SPELL_REMOVE_PARALYSIS; + } + if ( GetHasSpell( SPELL_FREEDOM_OF_MOVEMENT ) ) + { + return SPELL_FREEDOM_OF_MOVEMENT; + } + } + if ( iEff & NO_EFFECT_PETRIFY ) //PETRIFY + { + if ( GetHasSpell( SPELL_STONE_TO_FLESH ) ) + { + return SPELL_STONE_TO_FLESH; + } + } + if ( iEff & NO_EFFECT_STUNNED ) //STUNNED + { + if ( GetHasSpell( SPELL_CLARITY ) ) + { + return SPELL_CLARITY; + } + } + if ( iEff & NO_EFFECT_SLEEP ) //SLEEP + { + if ( GetHasSpell( SPELL_CLARITY ) ) + { + return SPELL_CLARITY; + } + } + if ( iEff & NO_EFFECT_CHARMED ) //CHARMED + { + if ( GetHasSpell( SPELL_CLARITY ) ) + { + return SPELL_CLARITY; + } + } + if ( iEff & NO_EFFECT_CONFUSED ) //CONFUSED + { + if ( GetHasSpell( SPELL_CLARITY ) ) + { + return SPELL_CLARITY; + } + } + if ( iEff & NO_EFFECT_FRIGHTENED ) //FRIGHTENED + { + if ( GetHasSpell( SPELL_REMOVE_FEAR ) ) + { + return SPELL_REMOVE_FEAR; + } + } + if ( iEff & NO_EFFECT_NEGATIVELEVEL ) //NEGATIVELEVEL + { + if ( GetHasSpell( SPELL_RESTORATION ) ) + { + return SPELL_RESTORATION; + } + if ( GetHasSpell( SPELL_GREATER_RESTORATION ) ) + { + return SPELL_GREATER_RESTORATION; + } + } + if ( iEff & NO_EFFECT_BLINDNESS ) //BLINDNESS + { + if ( GetHasSpell( SPELL_REMOVE_BLINDNESS_AND_DEAFNESS ) ) + { + return SPELL_REMOVE_BLINDNESS_AND_DEAFNESS; + } + if ( GetHasSpell( SPELL_RESTORATION ) ) + { + return SPELL_RESTORATION; + } + } + if ( iEff & NO_EFFECT_DEAF ) //DEAFNESS + { + if ( GetHasSpell( SPELL_REMOVE_BLINDNESS_AND_DEAFNESS ) ) + { + return SPELL_REMOVE_BLINDNESS_AND_DEAFNESS; + } + } + if ( iEff & NO_EFFECT_POISON ) //POISON + { + if ( GetHasSpell( SPELL_NEUTRALIZE_POISON ) ) + { + return SPELL_NEUTRALIZE_POISON; + } + } + if ( iEff & NO_EFFECT_CURSE ) //CURSE + { + if ( GetHasSpell( SPELL_REMOVE_CURSE ) ) + { + return SPELL_REMOVE_CURSE; + } + } + if ( iEff & NO_EFFECT_DISEASE ) //DISEASE + { + if ( GetHasSpell( SPELL_REMOVE_DISEASE ) ) + { + return SPELL_REMOVE_DISEASE; + } + } + if ( iEff & NO_EFFECT_GENERIC ) //ABILITY,AC,ATTACK,DAMAGE,SR,SAVE + { + if ( GetHasSpell( SPELL_LESSER_RESTORATION ) ) + { + return SPELL_LESSER_RESTORATION; + } + if ( GetHasSpell( SPELL_RESTORATION ) ) + { + return SPELL_RESTORATION; + } + } + return 0; +} + +int GetAreaSpell( vector vS, int iDisc=FALSE, int iMinLvl=0, float fR=40.0, object oCaster=OBJECT_SELF ) +{ + int iCnt = 0; + int iSpell; + //float fS = 8.5 + 1.0; + //float fM = 20.0 + 1.0; + //float fL = 40.0 + 1.0; + //testing some new ranges + float fS = 20.0; + float fM = 35.0; + float fL = 50.0; + int iM = GetAbilityModifier( ABILITY_INTELLIGENCE, oCaster ); + iM = iM < GetAbilityModifier( ABILITY_WISDOM, oCaster ) ? GetAbilityModifier( ABILITY_WISDOM, oCaster ) : iM; + iM = iM < GetAbilityModifier( ABILITY_CHARISMA, oCaster ) ? GetAbilityModifier( ABILITY_CHARISMA, oCaster ) : iM; + int iDC = 10 + 9 + iM; + int iF = FloatToInt( vS.x ); + int iR = FloatToInt( vS.y ); + int iW = FloatToInt( vS.z ); + + //EPIC SPELLS + + if ( !iCnt ) + { + if ( !iDisc && GetHasSpell( SPELL_EPIC_HELLBALL, oCaster ) && fR < fM ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_EPIC_HELLBALL ); + } + } + //9TH LEVEL CLR + //if ( !iCnt || iMinLvl <=9 ) + if ( !iCnt ) + { + if ( !iDisc && GetHasSpell( SPELL_IMPLOSION, oCaster ) && fR < fS && iF < iDC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_IMPLOSION ); + } + if ( !iDisc && GetHasSpell( SPELL_STORM_OF_VENGEANCE, oCaster ) && fR < fS && iR < iDC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_STORM_OF_VENGEANCE ); + } + //9TH LEVEL DRD + //9TH LEVEL SOR/WIZ + if ( !iDisc && GetHasSpell( SPELL_METEOR_SWARM, oCaster ) && fR < fS ) //no save check for half-damage potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_METEOR_SWARM ); + } + if ( !iDisc && GetHasSpell( SPELL_POWER_WORD_KILL, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_POWER_WORD_KILL ); + } + if ( GetHasSpell( SPELL_WAIL_OF_THE_BANSHEE, oCaster ) && fR < fS && iF < iDC) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_WAIL_OF_THE_BANSHEE ); + } + if ( GetHasSpell( SPELL_WEIRD, oCaster ) && fR < fS && iW < iDC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_WEIRD ); + } + } + iDC--; //take DC down one level + //if ( !iCnt || iMinLvl <=8 ) + if ( !iCnt || iMinLvl < NO_LVL8_MIN_LVL ) + { + //8TH LEVEL CLR + if ( !iDisc && GetHasSpell( SPELL_EARTHQUAKE, oCaster ) && fR < fS ) //no save check for half-damage potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_EARTHQUAKE ); + } + if ( !iDisc && GetHasSpell( SPELL_FIRE_STORM, oCaster ) && fR < fS ) //no save check for half-damage potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FIRE_STORM ); + } + if ( !iDisc && GetHasSpell( SPELL_SUNBEAM, oCaster ) && fR < fM ) //no save check for half-damage potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SUNBEAM ); + } + //8TH LEVEL DRD + if ( !iDisc && GetHasSpell( SPELL_BOMBARDMENT, oCaster ) && fR < fL ) //no save check for half-damage potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BOMBARDMENT ); + } + if ( !iDisc && GetHasSpell( SPELL_SUNBURST, oCaster ) && fR < fM ) //no save check for half-damage potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SUNBURST ); + } + //8TH LEVEL SOR/WIZ + if ( !iDisc && GetHasSpell( SPELL_HORRID_WILTING, oCaster ) && fR < fM ) //no save check for half-damage potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_HORRID_WILTING ); + } + if ( !iDisc && GetHasSpell( SPELL_INCENDIARY_CLOUD, oCaster ) && fR < fL ) //no save check for half-damage potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INCENDIARY_CLOUD ); + } + if ( GetHasSpell( SPELL_MASS_BLINDNESS_AND_DEAFNESS, oCaster ) && fR < fM && iF < iDC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_MASS_BLINDNESS_AND_DEAFNESS ); + } + } + iDC--; //take DC down one level + //if ( !iCnt || iMinLvl <=7 ) + if ( !iCnt || iMinLvl < NO_LVL7_MIN_LVL ) + { + //7TH LEVEL CLR + if ( GetHasSpell( SPELL_WORD_OF_FAITH, oCaster ) && fR < fM ) //spell is still useful for blindness, no save + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_WORD_OF_FAITH ); + } + //7TH LEVEL DRD + if ( !iDisc && GetHasSpell( SPELL_CREEPING_DOOM, oCaster ) && fR < fM ) //no save against this spell? + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CREEPING_DOOM ); + } + //7TH LEVEL SOR/WIZ + if ( !iDisc && GetHasSpell( SPELL_DELAYED_BLAST_FIREBALL, oCaster ) && fR < fM ) //no save check, half dam potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DELAYED_BLAST_FIREBALL ); + } + if ( !iDisc && GetHasSpell( SPELL_GREAT_THUNDERCLAP, oCaster ) && fR < fM && ( iF < iDC || iR < iDC || iW < iDC ) ) //FIX: check this range + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_GREAT_THUNDERCLAP ); + } + if ( GetHasSpell( SPELL_PRISMATIC_SPRAY, oCaster ) && fR < fS ) //random and various saves, don't check + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_PRISMATIC_SPRAY ); + } + } + iDC--; //take DC down one level + //if ( !iCnt || iMinLvl <=6 ) + if ( !iCnt || iMinLvl < NO_LVL6_MIN_LVL ) + { + //6TH LEVEL CLR + if ( !iDisc && GetHasSpell( SPELL_BLADE_BARRIER, oCaster ) && fR < fM ) //no save check, half damage potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BLADE_BARRIER ); + } + //6TH LEVEL DRD + if ( GetHasSpell( SPELL_STONEHOLD, oCaster ) && fR < fM ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_STONEHOLD ); + } + //6TH LEVEL SOR/WIZ + if ( !iDisc && GetHasSpell( SPELL_ACID_FOG, oCaster ) && fR < fL ) //no save vs the damage + { + //NOTE: SPELL_ACID_FOG == 0 + //SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ACID_FOG ); + //using temporary value for acid fog inside this function + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), -69 ); + + } + if ( GetHasSpell( SPELL_CHAIN_LIGHTNING, oCaster ) && fR < fL ) //no save check, half dam potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CHAIN_LIGHTNING ); + } + if ( !iDisc && GetHasSpell( SPELL_CIRCLE_OF_DEATH, oCaster ) && fR < fM && iF < iDC && + ( !DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) || iMinLvl < 10 ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CIRCLE_OF_DEATH ); + } + if ( GetHasSpell( SPELL_ISAACS_GREATER_MISSILE_STORM, oCaster ) && fR < fL ) //no save + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ISAACS_GREATER_MISSILE_STORM ); + } + } + iDC--; //take DC down one level + //if ( !iCnt || iMinLvl <=5 ) + if ( !iCnt || iMinLvl < NO_LVL5_MIN_LVL ) + { + //5TH LEVEL CLR + if ( !iDisc && GetHasSpell( SPELL_FLAME_STRIKE, oCaster ) && fR < fM ) //no save check, half dam potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FLAME_STRIKE ); + } + //5TH LEVEL DRD + if ( !iDisc && GetHasSpell( SPELL_ICE_STORM, oCaster ) && fR < fL ) //no save + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ICE_STORM ); + } + if ( !iDisc && GetHasSpell( SPELL_WALL_OF_FIRE, oCaster ) && fR < fM ) //no save check, half dam potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_WALL_OF_FIRE ); + } + //5TH LEVEL SOR/WIZ + if ( !iDisc && GetHasSpell( SPELL_CLOUDKILL, oCaster ) && fR < fL ) //saves vs death only, try it regardless + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CLOUDKILL ); + } + if ( GetHasSpell( SPELL_CONE_OF_COLD, oCaster ) && fR < fS ) //no save check, half dam potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CONE_OF_COLD ); + } + if ( GetHasSpell( SPELL_FIREBRAND, oCaster ) && fR < fM ) //no save check, half dam potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FIREBRAND ); + } + if ( GetHasSpell( SPELL_MIND_FOG, oCaster ) && fR < fM && iW < iDC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_MIND_FOG ); + } + } + iDC--; //take DC down one level + //if ( !iCnt || iMinLvl <4 ) + if ( !iCnt || iMinLvl <= NO_LVL4_MIN_LVL ) + { + //4TH LEVEL CLR + if ( GetHasSpell( SPELL_HAMMER_OF_THE_GODS, oCaster ) && fR < fM ) //no save check, half dam potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_HAMMER_OF_THE_GODS ); + } + //4TH LEVEL DRD + //4TH LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_CONFUSION, oCaster ) && fR < fM && iW < iDC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CONFUSION ); + } + if ( GetHasSpell( SPELL_EVARDS_BLACK_TENTACLES, oCaster ) && fR < fM ) //don't bother checking save + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_EVARDS_BLACK_TENTACLES ); + } + if ( GetHasSpell( SPELL_FEAR, oCaster ) && fR < fM && iW < iDC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FEAR ); + } + if ( GetHasSpell( SPELL_ISAACS_LESSER_MISSILE_STORM, oCaster ) && fR < fL ) //no save + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ISAACS_LESSER_MISSILE_STORM ); + } + } + iDC--; //take DC down one level + //if ( !iCnt || iMinLvl <=3 ) + if ( !iCnt || iMinLvl < NO_LVL3_MIN_LVL ) + { + //3RD LEVEL CLR + //3RD LEVEL DRD + if ( GetHasSpell( SPELL_CALL_LIGHTNING, oCaster ) && fR < fL ) //no save check, half dam potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CALL_LIGHTNING ); + } + if ( GetHasSpell( SPELL_SPIKE_GROWTH, oCaster ) && fR < fL ) //no save check, half dam potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SPIKE_GROWTH ); + } + //3RD LEVEL SOR/WIZ + if ( !iDisc && GetHasSpell( SPELL_FIREBALL, oCaster ) && fR < fL ) //no save check, half dam potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FIREBALL ); + } + if ( !iDisc && GetHasSpell( SPELL_GUST_OF_WIND, oCaster ) && fR < fM && iF < iDC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_GUST_OF_WIND ); + } + if ( !iDisc && GetHasSpell( SPELL_LIGHTNING_BOLT, oCaster ) && fR < fM ) //no save check, half dam potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_LIGHTNING_BOLT ); + } + if ( !iDisc && GetHasSpell( SPELL_MESTILS_ACID_BREATH, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_MESTILS_ACID_BREATH ); + } + if ( !iDisc && GetHasSpell( SPELL_NEGATIVE_ENERGY_BURST, oCaster ) && fR < fM ) //no save check, half damage potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_NEGATIVE_ENERGY_BURST ); + } + if ( GetHasSpell( SPELL_SCINTILLATING_SPHERE, oCaster ) && fR < fM ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SCINTILLATING_SPHERE ); + } + if ( GetHasSpell( SPELL_SLOW, oCaster ) && fR < fS && iW < iDC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SLOW ); + } + if ( !iDisc && GetHasSpell( SPELL_STINKING_CLOUD, oCaster ) && fR < fM && iF < iDC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_STINKING_CLOUD ); + } + } + iDC--; //take DC down one level + //if ( !iCnt || iMinLvl <=2 ) + if ( !iCnt || iMinLvl < NO_LVL2_MIN_LVL ) + { + //2ND LEVEL CLR + if ( GetHasSpell( SPELL_DARKNESS, oCaster ) && fR < fL && //no save check + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && !( GetHasSpellEffect( SPELL_TRUE_SEEING, oCaster ) || GetHasSpellEffect( SPELL_DARKVISION, oCaster ) ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DARKNESS ); + } + if ( !iDisc && GetHasSpell( SPELL_SOUND_BURST, oCaster ) && fR < fL ) //no save check + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SOUND_BURST ); + } + //2ND LEVEL DRD + //2ND LEVEL SOR/WIZ + if ( !iDisc && GetHasSpell( SPELL_CLOUD_OF_BEWILDERMENT, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CLOUD_OF_BEWILDERMENT ); + } + if ( !iDisc && GetHasSpell( SPELL_GEDLEES_ELECTRIC_LOOP, oCaster ) && fR < fS ) //no save check + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_GEDLEES_ELECTRIC_LOOP ); + } + if ( !iDisc && GetHasSpell( SPELL_WEB, oCaster ) && fR < fM ) //no save check, slow effect applies regardless + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_WEB ); + } + if ( !iDisc && GetHasSpell( SPELL_BALAGARNSIRONHORN, oCaster ) && fR < fS ) //no save + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BALAGARNSIRONHORN ); + } + } + iDC--; //take DC down one level + //if ( !iCnt || iMinLvl <=1 ) + if ( !iCnt || iMinLvl < NO_LVL1_MIN_LVL ) + { + //1ST LEVEL CLR + if ( GetHasSpell( SPELL_BANE, oCaster ) && fR < fL && iW < iDC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BANE ); + } + //1ST LEVEL DRD + if ( GetHasSpell( SPELL_ENTANGLE, oCaster ) && fR < fL && iR < iDC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ENTANGLE ); + } + if ( !iDisc && GetHasSpell( SPELL_GREASE, oCaster ) && fR < fL ) //no save + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_GREASE ); + } + if ( GetHasSpell( SPELL_SLEEP, oCaster ) && fR < fM && iW < iDC && + ( !DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) || iMinLvl < 6 ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SLEEP ); + } + //1ST LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_BURNING_HANDS, oCaster ) && fR < fS ) //no save check, half dam potential + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BURNING_HANDS ); + } + if ( GetHasSpell( SPELL_COLOR_SPRAY, oCaster ) && fR < fS && iW < iDC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_COLOR_SPRAY ); + } + } + + //SPELLABILITIES + //if ( GetHasSpell( SPELLABILITY_DRAGON_WING_BUFFET, oCaster ) && fR < fM ) + /* Doesn't work? May need a custom script for this + if ( GetRacialType( oCaster ) == RACIAL_TYPE_DRAGON && fR < fM ) + { + SpeakString( "Wingbuff" ); + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_WING_BUFFET ); + } + */ + + iDC--; //take DC down one level + //still need to add DC check in here, haven't decided on it + if ( !iCnt ) + { + //save DCs are pretty low, only use if we have no spells + //Cone spellabilities + if ( GetHasSpell( SPELLABILITY_CONE_ACID, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_CONE_ACID ); + } + if ( GetHasSpell( SPELLABILITY_CONE_COLD, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_CONE_COLD ); + } + if ( GetHasSpell( SPELLABILITY_CONE_DISEASE, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_CONE_DISEASE ); + } + if ( GetHasSpell( SPELLABILITY_CONE_FIRE, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_CONE_FIRE ); + } + if ( GetHasSpell( SPELLABILITY_CONE_LIGHTNING, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_CONE_LIGHTNING ); + } + if ( GetHasSpell( SPELLABILITY_CONE_POISON, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_CONE_POISON ); + } + if ( GetHasSpell( SPELLABILITY_CONE_SONIC, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_CONE_SONIC ); + } + //Howl spellabilities + if ( GetHasSpell( SPELLABILITY_HOWL_CONFUSE, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_HOWL_CONFUSE ); + } + if ( GetHasSpell( SPELLABILITY_HOWL_DAZE, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_HOWL_DAZE ); + } + if ( GetHasSpell( SPELLABILITY_HOWL_DEATH, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_HOWL_DEATH ); + } + if ( GetHasSpell( SPELLABILITY_HOWL_DOOM, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_HOWL_DOOM ); + } + if ( GetHasSpell( SPELLABILITY_HOWL_FEAR, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_HOWL_FEAR ); + } + if ( GetHasSpell( SPELLABILITY_HOWL_PARALYSIS, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_HOWL_PARALYSIS ); + } + if ( GetHasSpell( SPELLABILITY_HOWL_SONIC, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_HOWL_SONIC ); + } + if ( GetHasSpell( SPELLABILITY_HOWL_STUN, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_HOWL_STUN ); + } + //Pulse spellabilities + if ( GetHasSpell( SPELLABILITY_PULSE_ABILITY_DRAIN_CHARISMA, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_ABILITY_DRAIN_CHARISMA ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_ABILITY_DRAIN_CONSTITUTION, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_ABILITY_DRAIN_CONSTITUTION ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_ABILITY_DRAIN_DEXTERITY, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_ABILITY_DRAIN_DEXTERITY ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_ABILITY_DRAIN_INTELLIGENCE, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_ABILITY_DRAIN_INTELLIGENCE ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_ABILITY_DRAIN_STRENGTH, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_ABILITY_DRAIN_STRENGTH ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_ABILITY_DRAIN_WISDOM, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_ABILITY_DRAIN_WISDOM ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_COLD, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_COLD ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_DEATH, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_DEATH ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_DISEASE, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_DISEASE ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_DROWN, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_DROWN ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_FIRE, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_FIRE ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_HOLY, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_HOLY ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_LEVEL_DRAIN, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_LEVEL_DRAIN ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_LIGHTNING, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_LIGHTNING ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_NEGATIVE, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_NEGATIVE ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_POISON, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_POISON ); + } + if ( GetHasSpell( SPELLABILITY_PULSE_SPORES, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_SPORES ); + } + /* + if ( GetHasSpell( SPELLABILITY_PULSE_WHIRLWIND, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PULSE_WHIRLWIND ); + } + */ + //MISCELLANEOUS SPELLABILITIES + if ( GetHasSpell( SPELLABILITY_KRENSHAR_SCARE, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_KRENSHAR_SCARE ); + } + if ( GetHasSpell( SPELLABILITY_GOLEM_BREATH_GAS, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GOLEM_BREATH_GAS ); + } + if ( GetHasSpell( SPELLABILITY_HELL_HOUND_FIREBREATH, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_HELL_HOUND_FIREBREATH ); + } + if ( GetHasSpell( SPELLABILITY_BREATH_PETRIFY, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BREATH_PETRIFY ); + } + if ( GetHasSpell( SPELLABILITY_MINDBLAST, oCaster ) && fR < fS ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_MINDBLAST ); + } + } + + //return a random spell + iSpell = GetLocalInt( oCaster, "#SPL_" + IntToString( Random( iCnt ) + 1 ) ); + if ( iSpell == 0 ) //no spell + { + iSpell = -1; + } + else if ( iSpell == -69 ) //temp value for acid fog in this function + { + iSpell = 0; + } + //clear out the local ints + while ( iCnt ) + { + //PrintString( "AREACLR: " + GetName( oCaster ) + " (" + IntToString( GetLocalInt( oCaster, "#SPL_" + IntToString( iCnt ) ) ) + ")" ); + DeleteLocalInt( oCaster, "#SPL_" + IntToString( iCnt-- ) ); + } + return iSpell; +} + +float GetAreaSpellRadius( int iSpell ) +{ + if ( IsDragonBreath( iSpell ) ) + { + return RADIUS_SIZE_LARGE; + } + if ( IsPulse( iSpell ) ) + { + return RADIUS_SIZE_LARGE; + } + if ( IsHowl( iSpell ) ) + { + return RADIUS_SIZE_COLOSSAL; + } + if ( IsCone( iSpell ) ) + { + return RADIUS_SIZE_MEDIUM; + } + if ( iSpell == SPELLABILITY_DRAGON_WING_BUFFET ) + { + return RADIUS_SIZE_GARGANTUAN; + } + if ( iSpell == SPELLABILITY_KRENSHAR_SCARE ) + { + return RADIUS_SIZE_MEDIUM; + } + if ( iSpell == SPELLABILITY_GOLEM_BREATH_GAS ) + { + return RADIUS_SIZE_MEDIUM; + } + if ( iSpell == SPELLABILITY_HELL_HOUND_FIREBREATH ) + { + return RADIUS_SIZE_MEDIUM; + } + //EPIC + if ( iSpell == SPELL_EPIC_HELLBALL ) + { + return 20.0; //largest radius constant is 10.0, have to specify explicit value + } + //9TH LEVEL CLR + if ( iSpell == SPELL_IMPLOSION ) + { + return RADIUS_SIZE_MEDIUM; + } + if ( iSpell == SPELL_STORM_OF_VENGEANCE ) + { + return RADIUS_SIZE_COLOSSAL; + } + //9TH LEVEL DRD + //9TH LEVEL SOR/WIZ + if ( iSpell == SPELL_METEOR_SWARM ) + { + return RADIUS_SIZE_COLOSSAL; + } + if ( iSpell == SPELL_POWER_WORD_KILL ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_WAIL_OF_THE_BANSHEE ) + { + return RADIUS_SIZE_COLOSSAL; + } + if ( iSpell == SPELL_WEIRD ) + { + return RADIUS_SIZE_COLOSSAL; + } + //8TH LEVEL CLR + if ( iSpell == SPELL_EARTHQUAKE ) + { + return RADIUS_SIZE_COLOSSAL; + } + if ( iSpell == SPELL_FIRE_STORM ) + { + return RADIUS_SIZE_COLOSSAL; + } + if ( iSpell == SPELL_SUNBURST ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_SUNBEAM ) + { + return RADIUS_SIZE_COLOSSAL; + } + //8TH LEVEL DRD + if ( iSpell == SPELL_BOMBARDMENT ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_SUNBEAM ) + { + return RADIUS_SIZE_COLOSSAL; + } + //8TH LEVEL SOR/WIZ + if ( iSpell == SPELL_HORRID_WILTING ) + { + return RADIUS_SIZE_COLOSSAL; + } + if ( iSpell == SPELL_INCENDIARY_CLOUD ) + { + return RADIUS_SIZE_LARGE; + } + if ( iSpell == SPELL_MASS_BLINDNESS_AND_DEAFNESS ) + { + return RADIUS_SIZE_MEDIUM; + } + //7TH LEVEL CLR + if ( iSpell == SPELL_WORD_OF_FAITH ) + { + return RADIUS_SIZE_COLOSSAL; + } + //7TH LEVEL DRD + if ( iSpell == SPELL_CREEPING_DOOM ) + { + return RADIUS_SIZE_LARGE; + } + if ( iSpell == SPELL_FIRE_STORM ) + { + return RADIUS_SIZE_COLOSSAL; + } + //7TH LEVEL SOR/WIZ + if ( iSpell == SPELL_DELAYED_BLAST_FIREBALL ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_GREAT_THUNDERCLAP ) + { + return RADIUS_SIZE_GARGANTUAN; + } + if ( iSpell == SPELL_PRISMATIC_SPRAY ) + { + return RADIUS_SIZE_MEDIUM; + } + //6TH LEVEL CLR + if ( iSpell == SPELL_BLADE_BARRIER ) + { + return RADIUS_SIZE_HUGE; + } + //6TH LEVEL DRD + if ( iSpell == SPELL_STONEHOLD ) + { + return RADIUS_SIZE_HUGE; + } + //6TH LEVEL SOR/WIZ + if ( iSpell == SPELL_ACID_FOG ) + { + return RADIUS_SIZE_LARGE; + } + if ( iSpell == SPELL_CHAIN_LIGHTNING ) + { + return RADIUS_SIZE_COLOSSAL; + } + if ( iSpell == SPELL_CIRCLE_OF_DEATH ) + { + return RADIUS_SIZE_COLOSSAL; + } + if ( iSpell == SPELL_ISAACS_GREATER_MISSILE_STORM ) + { + return RADIUS_SIZE_GARGANTUAN; + } + //5TH LEVEL CLR + if ( iSpell == SPELL_FLAME_STRIKE ) + { + return RADIUS_SIZE_MEDIUM; + } + //5TH LEVEL DRD + if ( iSpell == SPELL_ICE_STORM ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_WALL_OF_FIRE ) + { + return RADIUS_SIZE_HUGE; + } + //5TH LEVEL SOR/WIZ + if ( iSpell == SPELL_CLOUDKILL ) + { + return RADIUS_SIZE_LARGE; + } + if ( iSpell == SPELL_CONE_OF_COLD ) + { + return RADIUS_SIZE_MEDIUM; + } + if ( iSpell == SPELL_FIREBRAND ) + { + return RADIUS_SIZE_COLOSSAL; + } + //4TH LEVEL CLR + if ( iSpell == SPELL_HAMMER_OF_THE_GODS ) + { + return RADIUS_SIZE_HUGE; + } + //4TH LEVEL DRD + if ( iSpell == SPELL_FLAME_STRIKE ) + { + return RADIUS_SIZE_MEDIUM; + } + //4TH LEVEL SOR/WIZ + if ( iSpell == SPELL_CONFUSION ) + { + return RADIUS_SIZE_LARGE; + } + if ( iSpell == SPELL_EVARDS_BLACK_TENTACLES ) + { + return RADIUS_SIZE_LARGE; + } + if ( iSpell == SPELL_FEAR ) + { + return RADIUS_SIZE_LARGE; + } + if ( iSpell == SPELL_ISAACS_LESSER_MISSILE_STORM ) + { + return RADIUS_SIZE_GARGANTUAN; + } + if ( iSpell == SPELL_ICE_STORM ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_WALL_OF_FIRE ) + { + return RADIUS_SIZE_HUGE; + } + //3RD LEVEL CLR + //3RD LEVEL DRD + if ( iSpell == SPELL_CALL_LIGHTNING ) + { + return RADIUS_SIZE_LARGE; + } + if ( iSpell == SPELL_SPIKE_GROWTH ) + { + return RADIUS_SIZE_LARGE; + } + //3RD LEVEL SOR/WIZ + if ( iSpell == SPELL_FIREBALL ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_GUST_OF_WIND ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_LIGHTNING_BOLT ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_NEGATIVE_ENERGY_BURST ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_SLOW ) + { + return RADIUS_SIZE_COLOSSAL; + } + if ( iSpell == SPELL_STINKING_CLOUD ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_SCINTILLATING_SPHERE ) + { + return RADIUS_SIZE_HUGE; + } + //2ND LEVEL CLR + if ( iSpell == SPELL_DARKNESS ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_SOUND_BURST ) + { + return RADIUS_SIZE_MEDIUM; + } + if ( iSpell == SPELL_GEDLEES_ELECTRIC_LOOP ) + { + return RADIUS_SIZE_SMALL; + } + if ( iSpell == SPELL_CLOUD_OF_BEWILDERMENT ) + { + return RADIUS_SIZE_HUGE; + } + //2ND LEVEL DRD + //2ND LEVEL SOR/WIZ + if ( iSpell == SPELL_DARKNESS ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_WEB ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_BALAGARNSIRONHORN ) + { + return RADIUS_SIZE_COLOSSAL; + } + //1ST LEVEL CLR + if ( iSpell == SPELL_BANE ) + { + return RADIUS_SIZE_COLOSSAL; + } + //1ST LEVEL DRD + if ( iSpell == SPELL_ENTANGLE ) + { + return RADIUS_SIZE_LARGE; + } + if ( iSpell == SPELL_GREASE ) + { + return RADIUS_SIZE_MEDIUM; + } + if ( iSpell == SPELL_SLEEP ) + { + return RADIUS_SIZE_HUGE; + } + //1ST LEVEL SOR/WIZ + if ( iSpell == SPELL_COLOR_SPRAY ) + { + return RADIUS_SIZE_MEDIUM; + } + if ( iSpell == SPELL_GREASE ) + { + return RADIUS_SIZE_MEDIUM; + } + if ( iSpell == SPELL_SLEEP ) + { + return RADIUS_SIZE_HUGE; + } + return 0.0; +} + +int GetDirectSpell( object oT, int iDisc=FALSE, int iMinLvl=0, object oCaster=OBJECT_SELF ) +{ + int iCnt = 0; + int iSpell; + int iEffects = GetEffectsOnObject( oT ); + + //EPIC + if ( GetHasSpell( SPELL_EPIC_RUIN, oCaster ) && GetCurrentHitPoints( oT ) > 120 ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_EPIC_RUIN ); + } + + //9TH LEVEL CLR + if ( !iCnt || iMinLvl <=9 ) + { + if ( GetHasSpell( SPELL_ENERGY_DRAIN, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_NEGATIVE_LEVEL ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ENERGY_DRAIN ); + } + //9TH LEVEL DRD + //9TH LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_DOMINATE_MONSTER, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DOMINATE ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELL_DOMINATE_MONSTER, oT ) ) ) //FIX + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DOMINATE_MONSTER ); + } + if ( GetHasSpell( SPELL_POWER_WORD_KILL, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DEATH ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetCurrentHitPoints( oT ) > 100 ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_POWER_WORD_KILL ); + } + if ( GetHasSpell( SPELL_BIGBYS_CRUSHING_HAND, oCaster ) && !GetHasSpellEffect( SPELL_BIGBYS_CRUSHING_HAND, oT ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_PARALYSIS ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BIGBYS_CRUSHING_HAND ); + } + } + if ( !iCnt || iMinLvl <=8 ) + { + //8TH LEVEL CLR + //8TH LEVEL DRD + if ( GetHasSpell( SPELL_FINGER_OF_DEATH, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DEATH ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FINGER_OF_DEATH ); + } + //8TH LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_GREATER_PLANAR_BINDING, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && !GetLevelByClass( CLASS_TYPE_OUTSIDER, oT ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && iEffects & NO_EFFECT_PARALYZE ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_GREATER_PLANAR_BINDING ); + } + if ( GetHasSpell( SPELL_BIGBYS_CLENCHED_FIST, oCaster ) && !GetHasSpellEffect( SPELL_BIGBYS_CLENCHED_FIST, oT ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BIGBYS_CLENCHED_FIST ); + } + } + if ( !iCnt || iMinLvl <=7 ) + { + //7TH LEVEL CLR + if ( GetHasSpell( SPELL_DESTRUCTION, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DEATH ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DESTRUCTION ); + } + //7TH LEVEL DRD + //7TH LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_BIGBYS_GRASPING_HAND, oCaster ) && !GetHasSpellEffect( SPELL_BIGBYS_GRASPING_HAND, oT ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_PARALYSIS ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BIGBYS_GRASPING_HAND ); + } + if ( GetHasSpell( SPELL_POWER_WORD_STUN, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_STUN ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetCurrentHitPoints( oT ) > 150 ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && iEffects & NO_EFFECT_STUNNED ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_POWER_WORD_STUN ); + } + } + if ( !iCnt || iMinLvl <=6 ) + { + //6TH LEVEL CLR + //6TH LEVEL DRD + if ( GetHasSpell( SPELL_CRUMBLE, oCaster ) && + ( GetRacialType( oT ) == RACIAL_TYPE_CONSTRUCT || GetLevelByClass( CLASS_TYPE_CONSTRUCT, oT ) > 0 ) ) + //this spell is only useful against constructs so no ability check should be made here + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CRUMBLE ); + } + if ( GetHasSpell( SPELL_DROWN, oCaster ) ) //need to add check for non-affected types + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DROWN ); + } + //6TH LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_BIGBYS_FORCEFUL_HAND, oCaster ) && !GetHasSpellEffect( SPELL_BIGBYS_FORCEFUL_HAND, oT ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_KNOCKDOWN ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DAZED ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BIGBYS_FORCEFUL_HAND ); + } + if ( GetHasSpell( SPELL_FLESH_TO_STONE, oCaster ) && !GetHasSpellEffect( SPELL_FLESH_TO_STONE, oT ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && IsImmuneToPetrification( oT ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FLESH_TO_STONE ); + } + if ( GetHasSpell( SPELL_PLANAR_BINDING, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && !GetLevelByClass( CLASS_TYPE_OUTSIDER, oT ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && iEffects & NO_EFFECT_PARALYZE ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_PLANAR_BINDING ); + } + /* Spell/Talent Bug Problem + if ( GetHasSpell( SPELL_SHADES_FIREBALL, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SHADES_FIREBALL ); + } + */ + } + if ( !iCnt || iMinLvl <=5 ) + { + //5TH LEVEL CLR + if ( GetHasSpell( SPELL_SLAY_LIVING, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DEATH ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SLAY_LIVING ); + } + //5TH LEVEL DRD + if ( GetHasSpell( SPELL_INFERNO, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INFERNO ); + } + //5TH LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_BALL_LIGHTNING, oCaster ) ) //FIX: ANY ADDITIONAL CHECKS NEEDED HERE? + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BALL_LIGHTNING ); + } + if ( GetHasSpell( SPELL_BIGBYS_INTERPOSING_HAND, oCaster ) && !GetHasSpellEffect( SPELL_BIGBYS_INTERPOSING_HAND, oT ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BIGBYS_INTERPOSING_HAND ); + } + if ( GetHasSpell( SPELL_DOMINATE_PERSON, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DOMINATE ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && iEffects & NO_EFFECT_DOMINATED ) ) //FIX: TAG WITH CHARMED + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DOMINATE_PERSON ); + } + if ( GetHasSpell( SPELL_FEEBLEMIND, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_ABILITY_DECREASE ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && !GetLevelByClass( CLASS_TYPE_WIZARD, oT ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FEEBLEMIND ); + } + /* Spell/Talent Bug + if ( GetHasSpell( SPELL_GREATER_SHADOW_CONJURATION_ACID_ARROW, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_GREATER_SHADOW_CONJURATION_ACID_ARROW ); + + } + */ + if ( GetHasSpell( SPELL_HOLD_MONSTER, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_PARALYSIS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && iEffects & NO_EFFECT_PARALYZE ) ) //paralysis check + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_HOLD_MONSTER ); + } + if ( GetHasSpell( SPELL_LESSER_PLANAR_BINDING, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && !GetLevelByClass( CLASS_TYPE_OUTSIDER, oT ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && iEffects & NO_EFFECT_PARALYZE ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_LESSER_PLANAR_BINDING ); + } + } + if ( !iCnt || iMinLvl <=4 ) + { + //4TH LEVEL CLR + //4TH LEVEL DRD + //4TH LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_CHARM_MONSTER, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_CHARM ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && iEffects & NO_EFFECT_CHARMED ) ) //FIX: TAG WITH DOMINATED + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CHARM_MONSTER ); + } + if ( GetHasSpell( SPELL_ENERVATION, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_NEGATIVE_LEVEL ) ) ) + { + //return SPELL_ENERVATION; + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ENERVATION ); + } + /* Spell/Talent Bug + if ( GetHasSpell( SPELL_SHADOW_CONJURATION_MAGIC_MISSILE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SHADOW_CONJURATION_MAGIC_MISSILE ); + } + */ + if ( GetHasSpell( SPELL_PHANTASMAL_KILLER, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DEATH ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_PHANTASMAL_KILLER ); + } + } + if ( !iCnt || iMinLvl <=3 ) + { + /* These spellabilities do not register + if ( GetHasSpell( SPELLABILITY_BG_CONTAGION, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DISEASE ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELL_CONTAGION, oT ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELLABILITY_BG_CONTAGION, oT ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BG_CONTAGION ); + } + */ + //3RD LEVEL CLR + if ( GetHasSpell( SPELL_BLINDNESS_AND_DEAFNESS, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_BLINDNESS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && iEffects & NO_EFFECT_BLINDNESS ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BLINDNESS_AND_DEAFNESS ); + } + if ( GetHasSpell( SPELL_CONTAGION, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DISEASE ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELL_CONTAGION, oT ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELLABILITY_BG_CONTAGION, oT ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CONTAGION ); + } + if ( GetHasSpell( SPELL_SEARING_LIGHT, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SEARING_LIGHT ); + } + //3RD LEVEL DRD + if ( GetHasSpell( SPELL_HEALING_STING, oCaster ) && GetMaxHitPoints( oCaster ) - GetCurrentHitPoints( oCaster ) > 7 ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_HEALING_STING ); + } + if ( GetHasSpell( SPELL_INFESTATION_OF_MAGGOTS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD && + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) == FALSE || GetIsImmune( oT, IMMUNITY_TYPE_ABILITY_DECREASE ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INFESTATION_OF_MAGGOTS ); + } + if ( GetHasSpell( SPELL_QUILLFIRE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_QUILLFIRE ); + } + //3RD LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_FLAME_ARROW, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FLAME_ARROW ); + } + if ( GetHasSpell( SPELL_HOLD_PERSON, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_PARALYSIS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && iEffects & NO_EFFECT_PARALYZE ) ) //paralysis check + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_HOLD_PERSON ); + } + } + if ( !iCnt || iMinLvl <=2 ) + { + //2ND LEVEL CLR + if ( GetHasSpell( SPELL_NEGATIVE_ENERGY_RAY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_NEGATIVE_ENERGY_RAY ); + } + //2ND LEVEL DRD + if ( GetHasSpell( SPELL_CHARM_PERSON_OR_ANIMAL, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_CHARM ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && iEffects & NO_EFFECT_CHARMED ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CHARM_PERSON_OR_ANIMAL ); + } + if ( GetHasSpell( SPELL_FLAME_LASH, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FLAME_LASH ); + } + //2ND LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_COMBUST, oCaster ) && + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) == FALSE || !GetHasSpellEffect( SPELL_COMBUST, oT ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_COMBUST ); + } + if ( GetHasSpell( SPELL_MELFS_ACID_ARROW, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_MELFS_ACID_ARROW ); + } + if ( GetHasSpell( SPELL_TASHAS_HIDEOUS_LAUGHTER, oCaster ) && !GetHasSpellEffect( SPELL_TASHAS_HIDEOUS_LAUGHTER, oT ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_KNOCKDOWN ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_TASHAS_HIDEOUS_LAUGHTER ); + } + } + if ( !iCnt || iMinLvl <=1 ) + { + //1ST LEVEL CLR + if ( GetHasSpell( SPELL_DOOM, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELL_DOOM, oT ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DOOM ); + } + if ( GetHasSpell( SPELL_SCARE, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELL_SCARE, oT ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SCARE ); + } + //1ST LEVEL DRD + //1ST LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_CHARM_PERSON, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_CHARM ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && iEffects & NO_EFFECT_CHARMED ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CHARM_PERSON ); + } + if ( GetHasSpell( SPELL_HORIZIKAULS_BOOM, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_HORIZIKAULS_BOOM ); + } + if ( GetHasSpell( SPELL_MAGIC_MISSILE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_MAGIC_MISSILE ); + } + if ( GetHasSpell( SPELL_RAY_OF_ENFEEBLEMENT, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_ABILITY_DECREASE ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_RAY_OF_ENFEEBLEMENT ); + } + } + if ( !iCnt ) + { + //0TH LEVEL CLR + //0TH LEVEL DRD + //0TH LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_ACID_SPLASH, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ACID_SPLASH ); + } + if ( GetHasSpell( SPELL_DAZE, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DAZED ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELL_DAZE, oT ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DAZE ); + } + if ( GetHasSpell( SPELL_ELECTRIC_JOLT, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ELECTRIC_JOLT ); + } + if ( GetHasSpell( SPELL_FLARE, oCaster ) && !GetHasSpellEffect( SPELL_FLARE, oT ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_ATTACK_DECREASE ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FLARE ); + } + if ( GetHasSpell( SPELL_RAY_OF_FROST, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_RAY_OF_FROST ); + } + } + + //SPELLABILITIES + //BOLT ABILITIES + if ( !iCnt ) + { + //save DCs on these are generally low, use them only if we have no spells + if ( GetHasSpell( SPELLABILITY_BOLT_ABILITY_DRAIN_CHARISMA, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_ABILITY_DECREASE ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_ABILITY_DRAIN_CHARISMA ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_ABILITY_DRAIN_CONSTITUTION, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_ABILITY_DECREASE ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_ABILITY_DRAIN_CONSTITUTION ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_ABILITY_DRAIN_DEXTERITY, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_ABILITY_DECREASE ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_ABILITY_DRAIN_DEXTERITY ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_ABILITY_DRAIN_INTELLIGENCE, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_ABILITY_DECREASE ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_ABILITY_DRAIN_INTELLIGENCE ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_ABILITY_DRAIN_STRENGTH, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_ABILITY_DECREASE ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_ABILITY_DRAIN_STRENGTH ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_ABILITY_DRAIN_WISDOM, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_ABILITY_DECREASE ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_ABILITY_DRAIN_WISDOM ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_ACID, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_ACID ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_CHARM, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_CHARM ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_CHARM ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_COLD, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_COLD ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_CONFUSE, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_CONFUSE ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_DAZE, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DAZED ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELL_DAZE, oT ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_DAZE ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_DEATH, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DEATH ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_DEATH ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_DISEASE, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DISEASE ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_DISEASE ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_DOMINATE, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DOMINATE ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_DOMINATE ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_FIRE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_FIRE ); + } + /* + if ( GetHasSpell( SPELLABILITY_BOLT_KNOCKDOWN, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_KNOCKDOWN ); + } + */ + if ( GetHasSpell( SPELLABILITY_BOLT_LEVEL_DRAIN, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_NEGATIVE_LEVEL ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_LEVEL_DRAIN ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_LIGHTNING, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_LIGHTNING ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_PARALYZE, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_PARALYSIS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && iEffects & NO_EFFECT_PARALYZE ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_PARALYZE ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_POISON, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_POISON ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_POISON ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_SHARDS, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_SHARDS ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_SLOW, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MOVEMENT_SPEED_DECREASE ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_SLOW ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_STUN, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_STUN ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_STUN ); + } + if ( GetHasSpell( SPELLABILITY_BOLT_WEB, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MOVEMENT_SPEED_DECREASE ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BOLT_WEB ); + } + //GAZE ABILITIES + if ( GetHasSpell( SPELLABILITY_GAZE_CHARM, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELLABILITY_GAZE_CHARM, oT ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_CHARM ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_CHARM ); + } + if ( GetHasSpell( SPELLABILITY_GAZE_CONFUSION, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELLABILITY_GAZE_CONFUSION, oT ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_CONFUSION ); + } + if ( GetHasSpell( SPELLABILITY_GAZE_DAZE, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELLABILITY_GAZE_DAZE, oT ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DAZED ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELL_DAZE, oT ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_DAZE ); + } + if ( GetHasSpell( SPELLABILITY_GAZE_DEATH, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetHasSpellEffect( SPELLABILITY_GAZE_DEATH, oT ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DEATH ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_DEATH ); + } + /* something weird going on here with compilation + if ( GasHasSpell( SPELLABILITY_GAZE_DESTROY_CHAOS, oCaster ) && GetAlignmentLawChaos( oT ) == ALIGNMENT_CHAOTIC ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_DESTROY_CHAOS ); + } + if ( GasHasSpell( SPELLABILITY_GAZE_DESTROY_EVIL, oCaster ) && GetAlignmentGoodEvil( oT ) == ALIGNMENT_EVIL ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_DESTROY_EVIL ); + } + if ( GasHasSpell( SPELLABILITY_GAZE_DESTROY_GOOD, oCaster ) && GetAlignmentGoodEvil( oT ) == ALIGNMENT_GOOD ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_DESTROY_GOOD ); + } + if ( GasHasSpell( SPELLABILITY_GAZE_DESTROY_LAW, oCaster ) && GetAlignmentLawChaos( oT ) == ALIGNMENT_LAWFUL ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_DESTROY_CHAOS ); + } + */ + if ( GetHasSpell( SPELLABILITY_GAZE_DOMINATE, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELLABILITY_GAZE_DOMINATE, oT ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_DOMINATE ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_DOMINATE ); + } + if ( GetHasSpell( SPELLABILITY_GAZE_DOOM, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetHasSpellEffect( SPELLABILITY_GAZE_DOOM, oT ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_DOOM ); + } + if ( GetHasSpell( SPELLABILITY_GAZE_FEAR, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELLABILITY_GAZE_FEAR, oT ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELL_SCARE, oT ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_FEAR ); + } + if ( GetHasSpell( SPELLABILITY_GAZE_PARALYSIS, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELLABILITY_GAZE_PARALYSIS, oT ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_PARALYSIS ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && iEffects & NO_EFFECT_PARALYZE ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_PARALYSIS ); + } + if ( GetHasSpell( SPELLABILITY_GAZE_PETRIFY, oCaster ) && + !GetHasSpellEffect( SPELLABILITY_GAZE_PETRIFY, oT ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_PETRIFY ); + } + if ( GetHasSpell( SPELLABILITY_GAZE_STUNNED, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) && GetHasSpellEffect( SPELLABILITY_GAZE_STUNNED, oT ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_STUN ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_GAZE_STUNNED ); + } + //MISCELLANEOUS SPELLABILITIES + if ( GetHasSpell( SPELLABILITY_MEPHIT_SALT_BREATH, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_MEPHIT_SALT_BREATH ); + } + if ( GetHasSpell( SPELLABILITY_MEPHIT_STEAM_BREATH, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_MEPHIT_STEAM_BREATH ); + } + if ( GetHasSpell( SPELLABILITY_MANTICORE_SPIKES, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_MANTICORE_SPIKES ); + } + if ( GetHasSpell( SPELLABILITY_CHARMMONSTER, oCaster ) && + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) == FALSE || GetHasSpellEffect( SPELLABILITY_GAZE_CHARM, oT ) == FALSE ) && + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) == FALSE || GetIsImmune( oT, IMMUNITY_TYPE_CHARM ) == FALSE ) && + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) == FALSE || GetIsImmune( oT, IMMUNITY_TYPE_MIND_SPELLS ) == FALSE ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_CHARMMONSTER ); + } + } + + iSpell = GetLocalInt( oCaster, "#SPL_" + IntToString( Random( iCnt ) + 1 ) ); + if ( iSpell == 0 ) + { + iSpell = -1; //consistency with GetAreaSpell + } + while ( iCnt ) + { + DeleteLocalInt( oCaster, "#SPL_" + IntToString( iCnt-- ) ); + } + return iSpell; +} + +int GetTouchSpell( object oT, int iMinLvl=0, object oCaster=OBJECT_SELF ) +{ + int iCnt = 0; + int iSpell; + int iEffects = GetEffectsOnObject( oT ); + + if ( !iCnt || iMinLvl <= 7 ) + { + if ( GetHasSpell( SPELLABILITY_PM_DEATHLESS_MASTER_TOUCH, oCaster ) && + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) == FALSE || GetIsImmune( oT, IMMUNITY_TYPE_DEATH ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PM_DEATHLESS_MASTER_TOUCH ); + } + } + if ( !iCnt || iMinLvl <= 6 ) + { + //6TH LEVEL CLR + if ( GetHasSpell( SPELL_HARM, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 60 ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_HARM ); + } + //6TH LEVEL DRD + //6TH LEVEL SOR/WIZ + } + if ( !iCnt || iMinLvl <=4 ) + { + //4TH LEVEL BLK + /* these spellabilities do not register + if ( GetHasSpell( SPELLABILITY_BG_INFLICT_CRITICAL_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 40 ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BG_INFLICT_CRITICAL_WOUNDS ); + } + */ + //4TH LEVEL CLR + if ( GetHasSpell( SPELL_INFLICT_CRITICAL_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 40 ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INFLICT_CRITICAL_WOUNDS ); + } + if ( GetHasSpell( SPELL_POISON, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_POISON ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_POISON ); + } + //4TH LEVEL DRD + //4TH LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_BESTOW_CURSE, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetIsImmune( oT, IMMUNITY_TYPE_CURSED ) ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetHasSpellEffect( SPELL_BESTOW_CURSE, oT ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BESTOW_CURSE ); + } + } + if ( !iCnt || iMinLvl <=3 ) + { + //3RD LEVEL BLK + /* these spellabilities do not register + if ( GetHasSpell( SPELLABILITY_BG_INFLICT_SERIOUS_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 30 ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BG_INFLICT_SERIOUS_WOUNDS ); + } + */ + //3RD LEVEL CLR + if ( GetHasSpell( SPELL_INFLICT_SERIOUS_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 30 ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INFLICT_SERIOUS_WOUNDS ); + } + //3RD LEVEL DRD + //PALE MASTER + if ( GetHasSpell( SPELLABILITY_PM_UNDEAD_GRAFT_2, oCaster ) ) //different style of check here, so we can fall back to graft 1 + { + if ( + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) == FALSE || GetIsImmune( oT, IMMUNITY_TYPE_PARALYSIS ) == FALSE ) && + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) == FALSE || iEffects & NO_EFFECT_PARALYZE == FALSE ) ) //paralysis check + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PM_UNDEAD_GRAFT_2 ); + } + } + else if ( GetHasSpell( SPELLABILITY_PM_UNDEAD_GRAFT_1, oCaster ) ) + { + if ( + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) == FALSE || GetIsImmune( oT, IMMUNITY_TYPE_PARALYSIS ) == FALSE ) && + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 5 ) == FALSE || iEffects & NO_EFFECT_PARALYZE == FALSE ) ) //paralysis check + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PM_UNDEAD_GRAFT_1 ); + } + } + //3RD LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_VAMPIRIC_TOUCH, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_VAMPIRIC_TOUCH ); + } + } + if ( !iCnt || iMinLvl <=2 ) + { + //2ND LEVEL CLR + if ( GetHasSpell( SPELL_GHOUL_TOUCH, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_GHOUL_TOUCH ); + } + if ( GetHasSpell( SPELL_INFLICT_MODERATE_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 20 ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INFLICT_MODERATE_WOUNDS ); + } + //2ND LEVEL DRD + //2ND LEVEL SOR/WIZ + } + if ( !iCnt || iMinLvl <=1 ) + { + //1ST LEVEL CLR + if ( GetHasSpell( SPELL_INFLICT_LIGHT_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && GetCurrentHitPoints( oT ) > 10 ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INFLICT_LIGHT_WOUNDS ); + } + //2ND LEVEL DRD + //2ND LEVEL SOR/WIZ + } + if ( !iCnt || iMinLvl <=0 ) + { + //0TH LEVEL CLR + if ( GetHasSpell( SPELL_INFLICT_MINOR_WOUNDS, oCaster ) && GetRacialType( oT ) != RACIAL_TYPE_UNDEAD ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INFLICT_MINOR_WOUNDS ); + } + //2ND LEVEL DRD + //2ND LEVEL SOR/WIZ + } + + //spellabilities + if ( !iCnt ) + { + if ( GetHasSpell( SPELLABILITY_TOUCH_PETRIFY, oCaster ) && + !GetHasSpellEffect( SPELLABILITY_TOUCH_PETRIFY, oT ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_TOUCH_PETRIFY ); + } + } + + iSpell = GetLocalInt( oCaster, "#SPL_" + IntToString( Random( iCnt ) + 1 ) ); + if ( iSpell == 0 ) + { + iSpell = -1; //consistency with GetAreaSpell + } + while ( iCnt ) + { + DeleteLocalInt( oCaster, "#SPL_" + IntToString( iCnt-- ) ); + } + return iSpell; +} + +int GetSummonSpell( int iMinLvl=1, object oCaster=OBJECT_SELF ) +{ + int iCnt = 0; + int iSpell; + + //EPIC + if ( GetHasSpell( SPELL_EPIC_DRAGON_KNIGHT, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_EPIC_DRAGON_KNIGHT ); + } + if ( GetHasSpell( SPELL_EPIC_MUMMY_DUST, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_EPIC_MUMMY_DUST ); + } + + // Slowdown issues with balors and succubi? + if ( GetHasSpell( SPELLABILITY_SUMMON_TANARRI, oCaster ) ) + { + //return SPELLABILITY_SUMMON_TANARRI; + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_SUMMON_TANARRI ); + } + + if ( !iCnt || iMinLvl <=9 ) + { + if ( GetHasSpell( SPELL_SUMMON_CREATURE_IX, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SUMMON_CREATURE_IX ); + } + if ( GetHasSpell( SPELL_GATE, oCaster ) && + !( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) && + !( GetHasSpellEffect( SPELL_PROTECTION_FROM_EVIL, oCaster ) || + GetHasSpellEffect( SPELL_MAGIC_CIRCLE_AGAINST_EVIL, oCaster ) || + GetHasSpellEffect( SPELL_HOLY_AURA, oCaster ) ) ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_GATE ); + } + if ( GetHasSpell( SPELL_ELEMENTAL_SWARM, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ELEMENTAL_SWARM ); + } + if ( GetHasSpell( SPELL_BLACK_BLADE_OF_DISASTER, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BLACK_BLADE_OF_DISASTER ); + } + } + if ( !iCnt || iMinLvl <=8 ) + { + if ( GetHasSpell( SPELL_SUMMON_CREATURE_VIII, oCaster ) ) + { + //return SPELL_SUMMON_CREATURE_VIII; + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SUMMON_CREATURE_VIII ); + } + if ( GetHasSpell( SPELL_CREATE_GREATER_UNDEAD, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CREATE_GREATER_UNDEAD ); + } + if ( GetHasSpell( SPELL_GREATER_PLANAR_BINDING, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_GREATER_PLANAR_BINDING ); + } + } + if ( !iCnt || iMinLvl <=7 ) + { + /* these spellabilities do not register + if ( GetHasSpell( SPELLABILITY_BG_FIENDISH_SERVANT, oCaster ) ) + { + SpeakString( "Registering FS" ); + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BG_FIENDISH_SERVANT ); + } + */ + if ( GetHasSpell( SPELL_SUMMON_CREATURE_VII, oCaster ) ) + { + //return SPELL_SUMMON_CREATURE_VII; + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SUMMON_CREATURE_VII ); + } + if ( GetHasSpell( SPELL_MORDENKAINENS_SWORD, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_MORDENKAINENS_SWORD ); + } + if ( GetHasSpell( SPELLABILITY_PM_SUMMON_GREATER_UNDEAD, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PM_SUMMON_GREATER_UNDEAD ); + } + } + if ( !iCnt || iMinLvl <=6 ) + { + if ( GetHasSpell( SPELL_CREATE_UNDEAD, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CREATE_UNDEAD ); + } + /* these spellabilities do not register + if ( GetHasSpell( SPELLABILITY_BG_CREATEDEAD, oCaster ) ) + { + SpeakString( "Registering CD" ); + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BG_CREATEDEAD ); + } + */ + if ( GetHasSpell( SPELL_SUMMON_CREATURE_VI, oCaster ) ) + { + //return SPELL_SUMMON_CREATURE_VI; + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SUMMON_CREATURE_VI ); + } + if ( GetHasSpell( SPELL_PLANAR_ALLY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_PLANAR_ALLY ); + } + if ( GetHasSpell( SPELL_PLANAR_BINDING, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_PLANAR_BINDING ); + } + /* Spell/Talent Bug + if ( GetHasSpell( SPELL_SHADES_SUMMON_SHADOW, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SHADES_SUMMON_SHADOW ); + } + */ + } + if ( !iCnt || iMinLvl <=5 ) + { + if ( GetHasSpell( SPELL_SUMMON_CREATURE_V, oCaster ) ) + { + //return SPELL_SUMMON_CREATURE_V; + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SUMMON_CREATURE_V ); + } + if ( GetHasSpell( SPELL_ANIMATE_DEAD, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ANIMATE_DEAD ); + } + /* Spell/Talent Bug + if ( GetHasSpell( SPELL_GREATER_SHADOW_CONJURATION_SUMMON_SHADOW, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_GREATER_SHADOW_CONJURATION_SUMMON_SHADOW ); + } + */ + if ( GetHasSpell( SPELL_LESSER_PLANAR_BINDING, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_LESSER_PLANAR_BINDING ); + } + if ( GetHasSpell( SPELLABILITY_PM_SUMMON_UNDEAD, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PM_SUMMON_UNDEAD ); + } + } + if ( !iCnt || iMinLvl <=4 ) + { + if ( GetHasSpell( SPELL_SUMMON_CREATURE_IV, oCaster ) ) + { + //return SPELL_SUMMON_CREATURE_IV; + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SUMMON_CREATURE_IV ); + } + /* Spell/Talent Bug + if ( GetHasSpell( SPELL_SHADOW_CONJURATION_SUMMON_SHADOW, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SHADOW_CONJURATION_SUMMON_SHADOW ); + } + */ + if ( GetHasSpell( SPELLABILITY_PM_ANIMATE_DEAD, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_PM_ANIMATE_DEAD ); + } + } + if ( !iCnt || iMinLvl <=3 ) + { + if ( GetHasSpell( SPELL_SUMMON_CREATURE_III, oCaster ) ) + { + //return SPELL_SUMMON_CREATURE_III; + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SUMMON_CREATURE_III ); + } + } + if ( !iCnt || iMinLvl <=2 ) + { + if ( GetHasSpell( SPELL_SUMMON_CREATURE_II, oCaster ) ) + { + //return SPELL_SUMMON_CREATURE_II; + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SUMMON_CREATURE_II ); + } + } + if ( !iCnt ) + { + if ( GetHasSpell( SPELL_SUMMON_CREATURE_I, oCaster ) ) + { + //return SPELL_SUMMON_CREATURE_I; + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SUMMON_CREATURE_I ); + } + if ( GetHasSpell( SPELL_SHELGARNS_PERSISTENT_BLADE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SHELGARNS_PERSISTENT_BLADE ); + } + } + iSpell = GetLocalInt( oCaster, "#SPL_" + IntToString( Random( iCnt ) + 1 ) ); + while ( iCnt ) + { + DeleteLocalInt( oCaster, "#SPL_" + IntToString( iCnt-- ) ); + } + return iSpell; +} + +int GetEnhanceSpellSelf( int iMinLvl=1, object oCaster=OBJECT_SELF ) +{ + int iCnt = 0; + int iSpell = 0; + + //EPIC + /* epic warding and epic mage armour do not currently work for non PCs, GetCasterLevel() returns 0 + if ( GetHasSpell( SPELL_EPIC_MAGE_ARMOR, oCaster ) && !GetHasSpellEffect( SPELL_EPIC_MAGE_ARMOR, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_EPIC_MAGE_ARMOR ); + } + */ + + //SPELLABILITIES + //NOTE: these should be activated by DoFastBuffs() but might need to be recast + if ( GetHasSpell( SPELLABILITY_DRAGON_FEAR, oCaster ) && !GetHasSpellEffect( SPELLABILITY_DRAGON_FEAR, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_FEAR ); + } + if ( GetHasSpell( SPELLABILITY_AURA_BLINDING, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_BLINDING, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_AURA_BLINDING ); + } + if ( GetHasSpell( SPELLABILITY_AURA_COLD, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_COLD, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_AURA_COLD ); + } + if ( GetHasSpell( SPELLABILITY_AURA_ELECTRICITY, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_ELECTRICITY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_AURA_ELECTRICITY ); + } + if ( GetHasSpell( SPELLABILITY_AURA_FEAR, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_FEAR, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_AURA_FEAR ); + } + if ( GetHasSpell( SPELLABILITY_AURA_FIRE, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_FIRE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_AURA_FIRE ); + } + if ( GetHasSpell( SPELLABILITY_AURA_MENACE, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_MENACE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_AURA_MENACE ); + } + if ( GetHasSpell( SPELLABILITY_AURA_OF_COURAGE, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_OF_COURAGE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_AURA_OF_COURAGE ); + } + if ( GetHasSpell( SPELLABILITY_AURA_PROTECTION, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_PROTECTION, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_AURA_PROTECTION ); + } + if ( GetHasSpell( SPELLABILITY_AURA_STUN, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_STUN, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_AURA_STUN ); + } + if ( GetHasSpell( SPELLABILITY_AURA_UNEARTHLY_VISAGE, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_UNEARTHLY_VISAGE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_AURA_UNEARTHLY_VISAGE ); + } + if ( GetHasSpell( SPELLABILITY_AURA_UNNATURAL, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_UNNATURAL, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_AURA_UNNATURAL ); + } + if ( GetHasSpell( SPELLABILITY_EMPTY_BODY, oCaster ) && !GetHasSpellEffect( SPELLABILITY_EMPTY_BODY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_EMPTY_BODY ); + } + if ( GetHasSpell( SPELLABILITY_TYRANT_FOG_MIST, oCaster ) && !GetHasSpellEffect( SPELLABILITY_TYRANT_FOG_MIST, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_TYRANT_FOG_MIST ); + } + + if ( GetHasSpell( SPELLABILITY_RAGE_5, oCaster ) && !GetHasSpellEffect( SPELLABILITY_RAGE_5, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_RAGE_5 ); + } + else if ( GetHasSpell( SPELLABILITY_RAGE_4, oCaster ) && !GetHasSpellEffect( SPELLABILITY_RAGE_4, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_RAGE_4 ); + } + else if ( GetHasSpell( SPELLABILITY_RAGE_3, oCaster ) && !GetHasSpellEffect( SPELLABILITY_RAGE_3, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_RAGE_3 ); + } + + if ( GetHasSpell( SPELLABILITY_FEROCITY_3, oCaster ) && !GetHasSpellEffect( SPELLABILITY_FEROCITY_3, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_FEROCITY_3 ); + } + else if ( GetHasSpell( SPELLABILITY_FEROCITY_2, oCaster ) && !GetHasSpellEffect( SPELLABILITY_FEROCITY_2, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_FEROCITY_2 ); + } + else if ( GetHasSpell( SPELLABILITY_FEROCITY_1, oCaster ) && !GetHasSpellEffect( SPELLABILITY_FEROCITY_1, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_FEROCITY_1 ); + } + + if ( GetHasSpell( SPELLABILITY_INTENSITY_3, oCaster ) && !GetHasSpellEffect( SPELLABILITY_INTENSITY_3, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_INTENSITY_3 ); + } + else if ( GetHasSpell( SPELLABILITY_INTENSITY_2, oCaster ) && !GetHasSpellEffect( SPELLABILITY_INTENSITY_2, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_INTENSITY_2 ); + } + else if ( GetHasSpell( SPELLABILITY_INTENSITY_1, oCaster ) && !GetHasSpellEffect( SPELLABILITY_INTENSITY_1, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_INTENSITY_1 ); + } + + //SELF-ENHANCING DOMAIN POWERS + if ( GetHasSpell( SPELLABILITY_BATTLE_MASTERY, oCaster ) && !GetHasSpellEffect( SPELLABILITY_BATTLE_MASTERY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BATTLE_MASTERY ); + } + if ( GetHasSpell( SPELLABILITY_DIVINE_PROTECTION, oCaster ) && !GetHasSpellEffect( SPELLABILITY_DIVINE_PROTECTION, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_DIVINE_PROTECTION ); + } + if ( GetHasSpell( SPELLABILITY_DIVINE_STRENGTH, oCaster ) && !GetHasSpellEffect( SPELLABILITY_DIVINE_STRENGTH, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_DIVINE_STRENGTH ); + } + + //DIVINE CHAMPION + if ( GetHasSpell( SPELLABILITY_DC_DIVINE_WRATH, oCaster ) && !GetHasSpellEffect( SPELLABILITY_DC_DIVINE_WRATH, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_DC_DIVINE_WRATH ); + } + + /* NOT DIRECTLY USEFUL IN COMBAT + if ( GetHasSpell( SPELLABILITY_DIVINE_TRICKERY, oCaster ) && !GetHasSpellEffect( SPELLABILITY_DIVINE_TRICKERY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_DIVINE_TRICKERY ); + } + */ + + if ( !iCnt || iMinLvl <= 7 ) + { + //7TH LEVEL CLR + if ( GetHasSpell( SPELL_REGENERATE, oCaster ) && !GetHasSpellEffect( SPELL_REGENERATE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_REGENERATE ); + } + //7TH LEVEL DRD + } + if ( !iCnt || iMinLvl <= 6 ) + { + //6TH LEVEL BRD + if ( GetHasSpell( SPELL_DIRGE, oCaster ) && !GetHasSpellEffect( SPELL_DIRGE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DIRGE ); + } + //6TH LEVEL CLR + /* + if ( GetHasSpell( SPELL_GREATER_SANCTUARY, oCaster ) && !GetHasSpellEffect( SPELL_GREATER_SANCTUARY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_GREATER_SANCTUARY ); + } + */ + //6TH LEVEL DRD + } + if ( !iCnt || iMinLvl <= 5 ) + { + //5TH LEVEL CLR + if ( GetHasSpell( SPELL_BATTLETIDE, oCaster ) && !GetHasSpellEffect( SPELL_BATTLETIDE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BATTLETIDE ); + } + if ( GetHasSpell( SPELL_MONSTROUS_REGENERATION, oCaster ) && !GetHasSpellEffect( SPELL_MONSTROUS_REGENERATION, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_MONSTROUS_REGENERATION ); + } + //5TH LEVEL DRD + /* Seems to be missing a SPELL_* item? GREATER_OWLS_WISDOM? + if ( GetHasSpell( SPELL_OWLS_INSIGHT, oCaster ) && !GetHasSpellEffect( SPELL_OWLS_INSIGHT, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_OWLS_INSIGHT ); + } + */ + //5TH LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_MESTILS_ACID_SHEATH, oCaster ) && !GetHasSpellEffect( SPELL_MESTILS_ACID_SHEATH, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_MESTILS_ACID_SHEATH ); + } + } + if ( !iCnt || iMinLvl <= 4 ) + { + //4TH LEVEL CLR + if ( GetHasSpell( SPELL_DIVINE_POWER, oCaster ) && !GetHasSpellEffect( SPELL_DIVINE_POWER, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DIVINE_POWER ); + } + //4TH LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_IMPROVED_INVISIBILITY, oCaster ) && !GetHasSpellEffect( SPELL_IMPROVED_INVISIBILITY, oCaster ) && !GetHasSpellEffect( SPELL_INVISIBILITY, oCaster ) && + //make sure there is at least one enemy who does not have true seeing and see invisibility + GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oCaster, 1, CREATURE_TYPE_DOES_NOT_HAVE_SPELL_EFFECT, SPELL_TRUE_SEEING, CREATURE_TYPE_IS_ALIVE, TRUE ) != OBJECT_INVALID && + GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oCaster, 1, CREATURE_TYPE_DOES_NOT_HAVE_SPELL_EFFECT, SPELL_SEE_INVISIBILITY, CREATURE_TYPE_IS_ALIVE, TRUE ) != OBJECT_INVALID ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_IMPROVED_INVISIBILITY ); + } + } + if ( !iCnt || iMinLvl <= 3 ) + { + //3RD LEVEL BRD + if ( GetHasSpell( SPELL_WOUNDING_WHISPERS, oCaster ) && !GetHasSpellEffect( SPELL_WOUNDING_WHISPERS, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_WOUNDING_WHISPERS ); + } + //3RD LEVEL CLR + //3RD LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_DISPLACEMENT, oCaster ) && !GetHasSpellEffect( SPELL_DISPLACEMENT, oCaster ) && !GetHasSpellEffect( SPELL_IMPROVED_INVISIBILITY, oCaster ) && + //make sure there is at least one enemy who does not have true seeing and see invisibility + GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oCaster, 1, CREATURE_TYPE_DOES_NOT_HAVE_SPELL_EFFECT, SPELL_TRUE_SEEING, CREATURE_TYPE_IS_ALIVE, TRUE ) != OBJECT_INVALID ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DISPLACEMENT ); + } + if ( GetHasSpell( SPELL_HASTE, oCaster ) && !GetHasSpellEffect( SPELL_HASTE, oCaster ) && !GetHasSpellEffect( SPELL_MASS_HASTE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_HASTE ); + } + } + if ( !iCnt || iMinLvl <= 2 ) + { + //2ND LEVEL BLK + /* these spellabilities do not register + if ( GetHasSpell( SPELLABILITY_BG_BULLS_STRENGTH, oCaster ) && !GetHasSpellEffect( SPELL_BULLS_STRENGTH, oCaster ) && !GetHasSpellEffect( SPELLABILITY_BG_BULLS_STRENGTH, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELLABILITY_BG_BULLS_STRENGTH ); + } + */ + //2ND LEVEL CLR + if ( GetHasSpell( SPELL_AID, oCaster ) && !GetHasSpellEffect( SPELL_AID, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_AID ); + } + if ( GetHasSpell( SPELL_BULLS_STRENGTH, oCaster ) && !GetHasSpellEffect( SPELL_BULLS_STRENGTH, oCaster ) && !GetHasSpellEffect( SPELLABILITY_BG_BULLS_STRENGTH, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BULLS_STRENGTH ); + } + if ( GetHasSpell( SPELL_DEATH_ARMOR, oCaster ) && !GetHasSpellEffect( SPELL_DEATH_ARMOR, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DEATH_ARMOR ); + } + if ( GetHasSpell( SPELL_ENDURANCE, oCaster ) && !GetHasSpellEffect( SPELL_ENDURANCE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ENDURANCE ); + } + // Note: Currently allow invisibility to be cast on top of improved invisibility + // This is to allow a creature with imp invis that has attacked and so is only retaining the concealment of imp invis + // to become invisible with this spell. It may sometimes result in redundant castings if the creature has imp invis and + // has not attacked. + if ( GetHasSpell( SPELL_INVISIBILITY, oCaster ) && !GetHasSpellEffect( SPELL_INVISIBILITY, oCaster ) && + //make sure there is at least one enemy who does not have true seeing and see invisibility + GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oCaster, 1, CREATURE_TYPE_DOES_NOT_HAVE_SPELL_EFFECT, SPELL_TRUE_SEEING, CREATURE_TYPE_IS_ALIVE, TRUE ) != OBJECT_INVALID && + GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, oCaster, 1, CREATURE_TYPE_DOES_NOT_HAVE_SPELL_EFFECT, SPELL_SEE_INVISIBILITY, CREATURE_TYPE_IS_ALIVE, TRUE ) != OBJECT_INVALID ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_INVISIBILITY ); + } + if ( GetHasSpell( SPELL_OWLS_WISDOM, oCaster ) && !GetHasSpellEffect( SPELL_OWLS_WISDOM, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_OWLS_WISDOM ); + } + //2ND LEVEL DRD + if ( GetHasSpell( SPELL_BLOOD_FRENZY, oCaster ) && !GetHasSpellEffect( SPELL_BLOOD_FRENZY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BLOOD_FRENZY ); + } + //2ND LEVEL PAL + if ( GetHasSpell( SPELL_AURAOFGLORY, oCaster ) && !GetHasSpellEffect( SPELL_AURAOFGLORY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_AURAOFGLORY ); + } + //2ND LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_FOXS_CUNNING, oCaster ) && !GetHasSpellEffect( SPELL_FOXS_CUNNING, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FOXS_CUNNING ); + } + if ( GetHasSpell( SPELL_STONE_BONES, oCaster ) && GetRacialType( oCaster ) == RACIAL_TYPE_UNDEAD && !GetHasSpellEffect( SPELL_STONE_BONES, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_STONE_BONES ); + } + } + if ( !iCnt || iMinLvl <= 1 ) + { + //1ST LEVEL CLR + if ( GetHasSpell( SPELL_DIVINE_FAVOR, oCaster ) && !GetHasSpellEffect( SPELL_DIVINE_FAVOR, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DIVINE_FAVOR ); + } + if ( GetHasSpell( SPELL_ENTROPIC_SHIELD, oCaster ) && !GetHasSpellEffect( SPELL_ENTROPIC_SHIELD, oCaster ) && + GetAttackerCount( 40.0 ) - GetAttackerCount( 5.0 ) > 0 ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ENTROPIC_SHIELD ); + } + /* + if ( GetHasSpell( SPELL_SANCTUARY, oCaster ) && !GetHasSpellEffect( SPELL_SANCTUARY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SANCTUARY ); + } + */ + if ( GetHasSpell( SPELL_SHIELD_OF_FAITH, oCaster ) && !GetHasSpellEffect( SPELL_SHIELD_OF_FAITH, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SHIELD_OF_FAITH ); + } + //1ST LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_EXPEDITIOUS_RETREAT, oCaster ) && !GetHasSpellEffect( SPELL_EXPEDITIOUS_RETREAT, oCaster ) && + !GetHasSpell( SPELL_HASTE, oCaster ) && !GetHasSpellEffect( SPELL_HASTE, oCaster ) && !GetHasSpellEffect( SPELL_MASS_HASTE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_EXPEDITIOUS_RETREAT ); + } + if ( GetHasSpell( SPELL_IRONGUTS, oCaster ) && !GetHasSpellEffect( SPELL_IRONGUTS, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_IRONGUTS ); + } + if ( GetHasSpell( SPELL_MAGE_ARMOR, oCaster ) && !GetHasSpellEffect( SPELL_MAGE_ARMOR, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_MAGE_ARMOR ); + } + //0TH LEVEL CLR + if ( GetHasSpell( SPELL_SHIELD, oCaster ) && !GetHasSpellEffect( SPELL_SHIELD, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SHIELD ); + } + } + if ( !iCnt ) + { + //0TH LEVEL CLR + /* inactive temporarily + if ( GetHasSpell( SPELL_RESISTANCE, oCaster ) && !GetHasSpellEffect( SPELL_RESISTANCE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_RESISTANCE ); + } + */ + //0TH LEVEL DRD + /* DUPLICATE + if ( GetHasSpell( SPELL_RESISTANCE, oCaster ) && !GetHasSpellEffect( SPELL_RESISTANCE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_RESISTANCE ); + } + */ + //0TH LEVEL SOR/WIZ + /* DUPLICATE + if ( GetHasSpell( SPELL_RESISTANCE, oCaster ) && !GetHasSpellEffect( SPELL_RESISTANCE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_RESISTANCE ); + } + */ + } + + iSpell = GetLocalInt( oCaster, "#SPL_" + IntToString( Random( iCnt ) + 1 ) ); + while ( iCnt ) + { + DeleteLocalInt( oCaster, "#SPL_" + IntToString( iCnt-- ) ); + } + return iSpell; +} + +int GetEnhanceSpellSingle( int iMinLvl=1, object oEnt=OBJECT_SELF, object oCaster=OBJECT_SELF ) +{ + int iSpell = 0; + int iCnt = 0; + + if ( !iCnt || iMinLvl <= 7 ) + { + //7TH LEVEL CLR + if ( GetHasSpell( SPELL_REGENERATE, oCaster ) && !GetHasSpellEffect( SPELL_REGENERATE, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_REGENERATE ); + } + //7TH LEVEL DRD + } + if ( !iCnt || iMinLvl <= 6 ) + { + //6TH LEVEL DRD + } + if ( !iCnt || iMinLvl <= 5 ) + { + //5TH LEVEL CLR + if ( GetHasSpell( SPELL_MONSTROUS_REGENERATION, oCaster ) && !GetHasSpellEffect( SPELL_MONSTROUS_REGENERATION, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_MONSTROUS_REGENERATION ); + } + } + if ( !iCnt || iMinLvl <= 4 ) + { + //4TH LEVEL CLR + /* SELF ONLY? + if ( GetHasSpell( SPELL_DIVINE_POWER, oCaster ) && !GetHasSpellEffect( SPELL_DIVINE_POWER, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DIVINE_POWER ); + } + */ + //4TH LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_IMPROVED_INVISIBILITY, oCaster ) && !GetHasSpellEffect( SPELL_IMPROVED_INVISIBILITY, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_IMPROVED_INVISIBILITY ); + } + } + if ( !iCnt || iMinLvl <= 3 ) + { + //3RD LEVEL CLR + //3RD LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_DISPLACEMENT, oCaster ) && !GetHasSpellEffect( SPELL_DISPLACEMENT, oEnt ) && !GetHasSpellEffect( SPELL_IMPROVED_INVISIBILITY, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_DISPLACEMENT ); + } + if ( GetHasSpell( SPELL_HASTE, oCaster ) && !GetHasSpellEffect( SPELL_HASTE, oEnt ) && !GetHasSpellEffect( SPELL_MASS_HASTE, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_HASTE ); + } + } + if ( !iCnt || iMinLvl <= 2 ) + { + //2ND LEVEL CLR + if ( GetHasSpell( SPELL_AID, oCaster ) && !GetHasSpellEffect( SPELL_AID, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_AID ); + } + if ( GetHasSpell( SPELL_BULLS_STRENGTH, oCaster ) && !GetHasSpellEffect( SPELL_BULLS_STRENGTH, oEnt ) && !GetHasSpellEffect( SPELLABILITY_BG_BULLS_STRENGTH, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BULLS_STRENGTH ); + } + if ( GetHasSpell( SPELL_ENDURANCE, oCaster ) && !GetHasSpellEffect( SPELL_ENDURANCE, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_ENDURANCE ); + } + //2ND LEVEL DRD + //2ND LEVEL SOR/WIZ + /* not a good general buff + if ( GetHasSpell( SPELL_FOXS_CUNNING, oCaster ) && !GetHasSpellEffect( SPELL_FOXS_CUNNING, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_FOXS_CUNNING ); + } + */ + if ( GetHasSpell( SPELL_CATS_GRACE, oCaster ) && !GetHasSpellEffect( SPELL_CATS_GRACE, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CATS_GRACE ); + } + if ( GetHasSpell( SPELL_STONE_BONES, oCaster ) && GetRacialType( oEnt ) == RACIAL_TYPE_UNDEAD && !GetHasSpellEffect( SPELL_STONE_BONES, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_STONE_BONES ); + } + } + if ( !iCnt || iMinLvl <= 1 ) + { + //1ST LEVEL CLR + /* + if ( GetHasSpell( SPELL_SANCTUARY, oCaster ) && !GetHasSpellEffect( SPELL_SANCTUARY, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SANCTUARY ); + } + */ + if ( GetHasSpell( SPELL_IRONGUTS, oCaster ) && !GetHasSpellEffect( SPELL_IRONGUTS, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_IRONGUTS ); + } + if ( GetHasSpell( SPELL_SHIELD_OF_FAITH, oCaster ) && !GetHasSpellEffect( SPELL_SHIELD_OF_FAITH, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_SHIELD_OF_FAITH ); + } + //1ST LEVEL SOR/WIZ + if ( GetHasSpell( SPELL_MAGE_ARMOR, oCaster ) && !GetHasSpellEffect( SPELL_MAGE_ARMOR, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_MAGE_ARMOR ); + } + } + if ( !iCnt ) + { + //0TH LEVEL CLR + /* inactive temporarily + if ( GetHasSpell( SPELL_RESISTANCE, oCaster ) && !GetHasSpellEffect( SPELL_RESISTANCE, oEnt ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_RESISTANCE ); + } + */ + //0TH LEVEL DRD + //0TH LEVEL SOR/WIZ + } + + iSpell = GetLocalInt( oCaster, "#SPL_" + IntToString( Random( iCnt ) + 1 ) ); + while ( iCnt ) + { + DeleteLocalInt( oCaster, "#SPL_" + IntToString( iCnt-- ) ); + } + return iSpell; +} + +int GetBestBreach( int iLim=30, object oEnt=OBJECT_SELF ) +{ + //dispels not returned here + if ( iLim > 12 ) + { + if ( GetHasSpell( SPELL_GREATER_SPELL_BREACH, oEnt ) ) + { + return SPELL_GREATER_SPELL_BREACH; + } + if ( GetHasSpell( SPELL_MORDENKAINENS_DISJUNCTION, oEnt ) ) + { + return SPELL_MORDENKAINENS_DISJUNCTION; + }/* + if ( GetHasSpell( SPELL_GREATER_DISPELLING, oEnt ) ) + { + return SPELL_GREATER_DISPELLING; + } + */ + } + if ( iLim > 7 ) + { + if ( GetHasSpell( SPELL_LESSER_SPELL_BREACH, oEnt ) ) + { + return SPELL_LESSER_SPELL_BREACH; + } + /* + if ( GetHasSpell( SPELL_DISPEL_MAGIC, oEnt ) ) + { + return SPELL_DISPEL_MAGIC; + } + */ + } + /* + if ( iLim > 5 ) + { + if ( GetHasSpell( SPELL_LESSER_DISPEL, oEnt ) ) + { + return SPELL_LESSER_DISPEL; + } + } + */ + return 0; +} + +int GetBestDispel( int iCLvl=20, int iDLvl=20, object oEnt=OBJECT_SELF ) +{ + int iDispel = 0; + int iSpell = 0; + + if ( GetHasSpell( SPELL_LESSER_DISPEL, oEnt ) ) + { + iDispel = 1; + iSpell = SPELL_LESSER_DISPEL; + } + if ( !iDispel || ( iCLvl > 5 && iDLvl > 5 ) ) + { + if ( GetHasSpell( SPELL_DISPEL_MAGIC, oEnt ) ) + { + iDispel = 1; + iSpell = SPELL_DISPEL_MAGIC; + } + } + if ( !iDispel || ( iCLvl > 10 && iDLvl > 10 ) ) + { + if ( GetHasSpell( SPELL_GREATER_DISPELLING, oEnt ) ) + { + iDispel = 1; + iSpell = SPELL_GREATER_DISPELLING; + } + } + + return iSpell; +} + +int GetIsDiscriminantSpell( int iSpell ) +{ + if ( iSpell == SPELL_WAIL_OF_THE_BANSHEE || + iSpell == SPELL_WEIRD || + iSpell == SPELL_WORD_OF_FAITH || + iSpell == SPELL_CHAIN_LIGHTNING || + iSpell == SPELL_ISAACS_GREATER_MISSILE_STORM || + iSpell == SPELL_HAMMER_OF_THE_GODS || + iSpell == SPELL_CONFUSION || + iSpell == SPELL_EVARDS_BLACK_TENTACLES || + iSpell == SPELL_FEAR || + iSpell == SPELL_ISAACS_LESSER_MISSILE_STORM || + iSpell == SPELL_CALL_LIGHTNING || + iSpell == SPELL_SLOW || + iSpell == SPELL_ENTANGLE || + iSpell == SPELL_SLEEP || + iSpell == SPELL_DARKNESS || //testing inclusion of Darkness + iSpell == -69 ) //mind blast + { + return TRUE; + } + return FALSE; +} + +int GetBreathWeapon( object oEnt=OBJECT_SELF ) +{ + int iCnt = 0; + int iSpell = 0; + + if ( GetHasSpell( SPELLABILITY_DRAGON_BREATH_ACID, oEnt ) ) + { + SetLocalInt( oEnt, "#BRT_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_BREATH_ACID ); + } + if ( GetHasSpell( SPELLABILITY_DRAGON_BREATH_COLD, oEnt ) ) + { + SetLocalInt( oEnt, "#BRT_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_BREATH_COLD ); + } + if ( GetHasSpell( SPELLABILITY_DRAGON_BREATH_FEAR, oEnt ) ) + { + SetLocalInt( oEnt, "#BRT_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_BREATH_FEAR ); + } + if ( GetHasSpell( SPELLABILITY_DRAGON_BREATH_FIRE, oEnt ) ) + { + SetLocalInt( oEnt, "#BRT_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_BREATH_FIRE ); + } + if ( GetHasSpell( SPELLABILITY_DRAGON_BREATH_GAS, oEnt ) ) + { + SetLocalInt( oEnt, "#BRT_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_BREATH_GAS ); + } + if ( GetHasSpell( SPELLABILITY_DRAGON_BREATH_LIGHTNING, oEnt ) ) + { + SetLocalInt( oEnt, "#BRT_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_BREATH_LIGHTNING ); + } + if ( GetHasSpell( SPELLABILITY_DRAGON_BREATH_NEGATIVE, oEnt ) ) + { + SetLocalInt( oEnt, "#BRT_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_BREATH_NEGATIVE ); + } + if ( GetHasSpell( SPELLABILITY_DRAGON_BREATH_PARALYZE, oEnt ) ) + { + SetLocalInt( oEnt, "#BRT_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_BREATH_PARALYZE ); + } + if ( GetHasSpell( SPELLABILITY_DRAGON_BREATH_SLEEP, oEnt ) ) + { + SetLocalInt( oEnt, "#BRT_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_BREATH_SLEEP ); + } + if ( GetHasSpell( SPELLABILITY_DRAGON_BREATH_SLOW, oEnt ) ) + { + SetLocalInt( oEnt, "#BRT_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_BREATH_SLOW ); + } + if ( GetHasSpell( SPELLABILITY_DRAGON_BREATH_WEAKEN, oEnt ) ) + { + SetLocalInt( oEnt, "#BRT_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_BREATH_WEAKEN ); + } + if ( GetHasSpell( SPELLABILITY_DRAGON_BREATH_RDD, oEnt ) ) + { + SetLocalInt( oEnt, "#BRT_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_BREATH_RDD ); + } + if ( GetHasSpell( SPELLABILITY_DRAGON_BREATH_PRISMATIC, oEnt ) ) + { + SetLocalInt( oEnt, "#BRT_" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_BREATH_PRISMATIC ); + } + + if ( iCnt ) + { + iSpell = GetLocalInt( oEnt, "#BRT_" + IntToString( Random( iCnt ) + 1 ) ); + while ( iCnt ) + { + DeleteLocalInt( oEnt, "#BRT_" + IntToString( iCnt-- ) ); + } + } + return iSpell; +} + +int GetConeSpell( int iMinLvl = 1, object oCaster=OBJECT_SELF ) +{ + //This function may be obsolete. Currently handling cones as area spells. + int iCnt = 0; + int iSpell; + + if ( !iCnt || iMinLvl <= 7 ) + { + if ( GetHasSpell( SPELL_PRISMATIC_SPRAY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_PRISMATIC_SPRAY ); + } + } + if ( !iCnt || iMinLvl <=5 ) + { + if ( GetHasSpell( SPELL_CONE_OF_COLD, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_CONE_OF_COLD ); + } + } + if ( !iCnt || iMinLvl <=1 ) + { + if ( GetHasSpell( SPELL_BURNING_HANDS, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BURNING_HANDS ); + } + if ( GetHasSpell( SPELL_COLOR_SPRAY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_COLOR_SPRAY ); + } + } + iSpell = GetLocalInt( oCaster, "#SPL_" + IntToString( Random( iCnt ) + 1 ) ); + + while ( iCnt ) + { + DeleteLocalInt( oCaster, "#SPL_" + IntToString( iCnt-- ) ); + } + return iSpell; +} + +int GetGroupEnhanceSpell( int iMinLvl = 1, object oCaster=OBJECT_SELF ) +{ + int iCnt = 0; + int iSpell; + + if ( !iCnt || iMinLvl <= 9 ) + { + if ( GetHasSpell( SPELL_UNDEATHS_ETERNAL_FOE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_UNDEATHS_ETERNAL_FOE ); + } + } + if ( !iCnt || iMinLvl <= 8 ) + { + if ( GetHasSpell( SPELL_MIND_BLANK, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_MIND_BLANK ); + } + if ( GetHasSpell( SPELL_NATURES_BALANCE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_NATURES_BALANCE ); + } + } + if ( !iCnt || iMinLvl <= 7 ) + { + if ( GetHasSpell( SPELL_AURA_OF_VITALITY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_AURA_OF_VITALITY ); + } + if ( GetHasSpell( SPELL_PROTECTION_FROM_SPELLS, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_PROTECTION_FROM_SPELLS ); + } + } + if ( !iCnt || iMinLvl <= 6 ) + { + if ( GetHasSpell( SPELL_MASS_HASTE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_MASS_HASTE ); + } + } + if ( !iCnt || iMinLvl <= 3 ) + { + if ( GetHasSpell( SPELL_PRAYER, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_PRAYER ); + } + } + if ( !iCnt || iMinLvl <= 1 ) + { + if ( GetHasSpell( SPELL_BLESS, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_" + IntToString( ++iCnt ), SPELL_BLESS ); + } + } + iSpell = GetLocalInt( oCaster, "#SPL_" + IntToString( Random( iCnt ) + 1 ) ); + + while ( iCnt ) + { + DeleteLocalInt( oCaster, "#SPL_" + IntToString( iCnt-- ) ); + } + return iSpell; +} + +float GetGroupEnhanceSpellRadius( int iSpell ) +{ + if ( iSpell == SPELL_UNDEATHS_ETERNAL_FOE ) + { + return RADIUS_SIZE_MEDIUM; + } + if ( iSpell == SPELL_MIND_BLANK ) + { + return RADIUS_SIZE_HUGE; + } + if ( iSpell == SPELL_NATURES_BALANCE ) + { + return RADIUS_SIZE_LARGE; + } + if ( iSpell == SPELL_AURA_OF_VITALITY ) + { + return RADIUS_SIZE_COLOSSAL; + } + if ( iSpell == SPELL_PROTECTION_FROM_SPELLS ) + { + return RADIUS_SIZE_LARGE; //NOT SURE, NEED TO CHECK + } + if ( iSpell == SPELL_MASS_HASTE ) + { + return RADIUS_SIZE_LARGE; + } + if ( iSpell == SPELL_PRAYER ) + { + return RADIUS_SIZE_COLOSSAL; + } + if ( iSpell == SPELL_BLESS ) + { + return RADIUS_SIZE_GARGANTUAN; + } + return 0.0; +} + +int GetDispelSpell( object oEnt=OBJECT_SELF ) +{ + if ( GetHasSpell( SPELL_LESSER_DISPEL, oEnt ) ) + { + return SPELL_LESSER_DISPEL; + } + if ( GetHasSpell( SPELL_DISPEL_MAGIC, oEnt ) ) + { + return SPELL_DISPEL_MAGIC; + } + if ( GetHasSpell ( SPELL_GREATER_DISPELLING, oEnt ) ) + { + return SPELL_GREATER_DISPELLING; + } + if ( GetHasSpell( SPELL_MORDENKAINENS_DISJUNCTION, oEnt ) ) + { + return SPELL_MORDENKAINENS_DISJUNCTION; + } + return 0; +} + +int GetMaxDispelCasterLevel( object oEnt=OBJECT_SELF ) +{ + //NOTE: this function may return some bad results if creatures with innate dispel abilities + //also have levels in standard caster levels, where those levels are lower than their innate ones + //Should be compensated for by GetBestDispel() + int iL = 0; + int iT = 0; + int iC = 0; + + iL = GetLevelByClass( CLASS_TYPE_BARD, oEnt ); + iC += iL; + if ( ( iT = GetLevelByClass( CLASS_TYPE_CLERIC, oEnt ) ) > iL ) + { + iL = iT; + } + iC += iT; + if ( ( iT = GetLevelByClass( CLASS_TYPE_DRUID, oEnt ) ) > iL ) + { + iL = iT; + } + iC += iT; + if ( ( iT = GetLevelByClass( CLASS_TYPE_PALADIN, oEnt ) ) > iL ) + { + iL = iT; + } + iC += iT; + if ( ( iT = GetLevelByClass( CLASS_TYPE_SORCERER, oEnt ) ) > iL ) + { + iL = iT; + } + iC += iT; + if ( ( iT = GetLevelByClass( CLASS_TYPE_WIZARD, oEnt ) ) > iL ) + { + iL = iT; + } + iC += iT; + if ( !iC ) + { + //no standard caster levels, check for innate abilities + if ( GetHasSpell( SPELL_LESSER_DISPEL, oEnt ) || + GetHasSpell( SPELL_DISPEL_MAGIC, oEnt ) || + GetHasSpell( SPELL_GREATER_DISPELLING, oEnt ) || + GetHasSpell( SPELL_MORDENKAINENS_DISJUNCTION, oEnt ) ) + { + iL = 20; //pad out to max for safety, use the best + } + } + return iL; +} + +int GetVisionSpellNeeded( object oS=OBJECT_SELF, object oC=OBJECT_SELF ) +{ + int iT = GetHasSpellEffect( SPELL_TRUE_SEEING, oS ); + int iS = GetHasSpellEffect( SPELL_SEE_INVISIBILITY, oS ); + int iU = GetHasSpellEffect( SPELL_DARKVISION, oS ); + int iD = GetLocalInt( oS, "#DARKNESS" ) || GetHasSpell( SPELL_DARKNESS, oS ); + int iV = GetLocalInt( oS, "#VANISHED" ); + int iP = GetIsPC( oS ) && GetHasSpellEffect( SPELL_DARKNESS, oS ); + int iSU = GetHasSpell( SPELL_DARKVISION, oC ); + int iSS = GetHasSpell( SPELL_SEE_INVISIBILITY, oC ); + int iST = GetHasSpell( SPELL_TRUE_SEEING, oC ); + object oA; + int iCnt = 0; + float fRad = 20.0; + + if ( iV && !iD ) + { + oA = GetNearestObject( OBJECT_TYPE_AREA_OF_EFFECT, oS, ++iCnt ); + while ( !iD && GetIsObjectValid( oA ) && GetDistanceBetween( oS, oA ) < fRad ) + { + if ( GetTag( oA ) == "VFX_PER_DARKNESS" ) + { + //there is darkness in the area, could be messing with things + //PrintString( "DARKNESS: " + GetName( oC ) + " sees Darkness in range of " + GetName( oS ) ); + iD = 1; + } + oA = GetNearestObject( OBJECT_TYPE_AREA_OF_EFFECT, oS, ++iCnt ); + } + } + + if ( ( iD && !( iU || iT ) ) || iP ) + { + //darkness, no ultravision, no true seeing + if ( iSU ) + { + return SPELL_DARKVISION; + } + if ( iST ) + { + return SPELL_TRUE_SEEING; + } + } + //Now: !iD || !( iSU || iST ) + if ( iV && !iD && !( iS || iT ) ) + { + //vanished enemy, no darkness, no see invis, no true seeing + if ( iST ) + { + return SPELL_TRUE_SEEING; + } + if ( iSS ) + { + return SPELL_SEE_INVISIBILITY; + } + } + return 0; +} + +int GetHasVisionSpells( object oC=OBJECT_SELF ) +{ + if ( GetHasSpell( SPELL_DARKVISION, oC ) ) + { + return TRUE; + } + if ( GetHasSpell( SPELL_SEE_INVISIBILITY, oC ) ) + { + return TRUE; + } + if ( GetHasSpell( SPELL_TRUE_SEEING, oC ) ) + { + return TRUE; + } + return FALSE; +} + +int GenerateFastBuffList( object oCaster=OBJECT_SELF ) +{ + int iCnt = 0; + int iCnt2 = 0; + int iS = -1; + + if ( GetHasSpell( SPELLABILITY_DRAGON_FEAR, oCaster ) && !GetHasSpellEffect( SPELLABILITY_DRAGON_FEAR, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_DRAGON_FEAR ); + } + if ( GetHasSpell( SPELLABILITY_AURA_BLINDING, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_BLINDING, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_AURA_BLINDING ); + } + if ( GetHasSpell( SPELLABILITY_AURA_COLD, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_COLD, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_AURA_COLD ); + } + if ( GetHasSpell( SPELLABILITY_AURA_ELECTRICITY, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_ELECTRICITY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_AURA_ELECTRICITY ); + } + if ( GetHasSpell( SPELLABILITY_AURA_FEAR, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_FEAR, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_AURA_FEAR ); + } + if ( GetHasSpell( SPELLABILITY_AURA_FIRE, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_FIRE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_AURA_FIRE ); + } + if ( GetHasSpell( SPELLABILITY_AURA_MENACE, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_MENACE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_AURA_MENACE ); + } + if ( GetHasSpell( SPELLABILITY_AURA_OF_COURAGE, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_OF_COURAGE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_AURA_OF_COURAGE ); + } + if ( GetHasSpell( SPELLABILITY_AURA_PROTECTION, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_PROTECTION, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_AURA_PROTECTION ); + } + if ( GetHasSpell( SPELLABILITY_AURA_STUN, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_STUN, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_AURA_STUN ); + } + if ( GetHasSpell( SPELLABILITY_AURA_UNEARTHLY_VISAGE, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_UNEARTHLY_VISAGE, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_AURA_UNEARTHLY_VISAGE ); + } + if ( GetHasSpell( SPELLABILITY_AURA_UNNATURAL, oCaster ) && !GetHasSpellEffect( SPELLABILITY_AURA_UNNATURAL, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_AURA_UNNATURAL ); + } + if ( GetHasSpell( SPELLABILITY_EMPTY_BODY, oCaster ) && !GetHasSpellEffect( SPELLABILITY_EMPTY_BODY, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_EMPTY_BODY ); + } + if ( GetHasSpell( SPELLABILITY_TYRANT_FOG_MIST, oCaster ) && !GetHasSpellEffect( SPELLABILITY_TYRANT_FOG_MIST, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_TYRANT_FOG_MIST ); + } + + if ( GetHasSpell( SPELLABILITY_RAGE_5, oCaster ) && !GetHasSpellEffect( SPELLABILITY_RAGE_5, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_RAGE_5 ); + } + else if ( GetHasSpell( SPELLABILITY_RAGE_4, oCaster ) && !GetHasSpellEffect( SPELLABILITY_RAGE_4, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_RAGE_4 ); + } + else if ( GetHasSpell( SPELLABILITY_RAGE_3, oCaster ) && !GetHasSpellEffect( SPELLABILITY_RAGE_3, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_RAGE_3 ); + } + + if ( GetHasSpell( SPELLABILITY_FEROCITY_3, oCaster ) && !GetHasSpellEffect( SPELLABILITY_FEROCITY_3, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_FEROCITY_3 ); + } + else if ( GetHasSpell( SPELLABILITY_FEROCITY_2, oCaster ) && !GetHasSpellEffect( SPELLABILITY_FEROCITY_2, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_FEROCITY_2 ); + } + else if ( GetHasSpell( SPELLABILITY_FEROCITY_1, oCaster ) && !GetHasSpellEffect( SPELLABILITY_FEROCITY_1, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_FEROCITY_1 ); + } + + if ( GetHasSpell( SPELLABILITY_INTENSITY_3, oCaster ) && !GetHasSpellEffect( SPELLABILITY_INTENSITY_3, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_INTENSITY_3 ); + } + else if ( GetHasSpell( SPELLABILITY_INTENSITY_2, oCaster ) && !GetHasSpellEffect( SPELLABILITY_INTENSITY_2, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_INTENSITY_2 ); + } + else if ( GetHasSpell( SPELLABILITY_INTENSITY_1, oCaster ) && !GetHasSpellEffect( SPELLABILITY_INTENSITY_1, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), SPELLABILITY_INTENSITY_1 ); + } + + iCnt2 = 1; + while ( ( iS = GetLocalInt( oCaster, "#SPN_FB" + IntToString( iCnt2++ ) ) ) ) + { + //cater for Acid Fog value even though creatures should not be + //fast buffing this spell + if ( iS == 10000 ) //temp value for acid fog + { + iS = SPELL_ACID_FOG; + } + if ( GetHasSpell( iS, oCaster ) ) + { + SetLocalInt( oCaster, "#SPL_FB" + IntToString( ++iCnt ), iS ); + } + } + + return iCnt; +} + +float GetSpellRange( int iS ) +{ + //NOTE: currently only includes area spells + + if ( iS < 0 ) + { + //not valid + return -1.0; + } + + if ( iS == SPELL_ACID_FOG || iS == SPELL_CALL_LIGHTNING || iS == SPELL_CHAIN_LIGHTNING || + iS == SPELL_CLOUDKILL || iS == SPELL_DARKNESS || iS == SPELL_ENTANGLE || iS == SPELL_FIREBALL || + iS == SPELL_GREASE || iS == SPELL_INCENDIARY_CLOUD || iS == SPELL_MIND_FOG || iS == SPELL_SOUND_BURST || + iS == SPELL_ICE_STORM || iS == SPELL_BANE || iS == SPELL_SPIKE_GROWTH || iS == SPELL_BOMBARDMENT || + iS == SPELL_ISAACS_LESSER_MISSILE_STORM || iS == SPELL_ISAACS_GREATER_MISSILE_STORM ) + { + return 40.0; + } + else if ( iS == SPELL_BLADE_BARRIER || iS == SPELL_CIRCLE_OF_DEATH || iS == SPELL_CIRCLE_OF_DOOM || iS == SPELL_CONFUSION || + iS == SPELL_DELAYED_BLAST_FIREBALL || iS == SPELL_FLAME_STRIKE || iS == SPELL_HAMMER_OF_THE_GODS || + iS == SPELL_LIGHTNING_BOLT || iS == SPELL_MASS_BLINDNESS_AND_DEAFNESS || //iS == SPELL_MASS_DOMINATION || + iS == SPELL_SLEEP || iS == SPELL_STINKING_CLOUD || iS == SPELL_SUNBEAM || iS == SPELL_WALL_OF_FIRE || + iS == SPELL_WEB || iS == SPELL_WORD_OF_FAITH || iS == SPELL_CREEPING_DOOM || iS == SPELL_HORRID_WILTING || + iS == SPELL_NEGATIVE_ENERGY_BURST || iS == SPELL_EVARDS_BLACK_TENTACLES || iS == SPELL_FEAR || + iS == SPELL_GUST_OF_WIND || iS == SPELL_SUNBURST || iS == SPELL_FIREBRAND ) + { + return 20.0; + } + else if ( iS == SPELL_IMPLOSION || iS == SPELL_MASS_CHARM || iS == SPELL_POWER_WORD_KILL || + iS == SPELL_POWER_WORD_STUN || iS == SPELL_SLOW || iS == SPELL_WAIL_OF_THE_BANSHEE || iS == SPELL_WEIRD || + iS == SPELL_PRISMATIC_SPRAY || iS == SPELL_CONE_OF_COLD || iS == SPELL_BURNING_HANDS || iS == SPELL_COLOR_SPRAY || + IsCone( iS ) ) + { + return 8.5; + } + else + { + //personal ranges + return 0.0; + } +} + +int IsCone( int iS=0 ) +{ + if ( iS == SPELLABILITY_CONE_ACID ) + { + return TRUE; + } + if ( iS == SPELLABILITY_CONE_COLD ) + { + return TRUE; + } + if ( iS == SPELLABILITY_CONE_DISEASE ) + { + return TRUE; + } + if ( iS == SPELLABILITY_CONE_FIRE ) + { + return TRUE; + } + if ( iS == SPELLABILITY_CONE_POISON ) + { + return TRUE; + } + if ( iS == SPELLABILITY_CONE_SONIC ) + { + return TRUE; + } + if ( iS == SPELLABILITY_GOLEM_BREATH_GAS ) + { + return TRUE; + } + if ( iS == SPELLABILITY_BREATH_PETRIFY ) + { + return TRUE; + } + if ( iS == SPELLABILITY_MINDBLAST ) + { + return TRUE; + } + if ( iS == SPELL_PRISMATIC_SPRAY ) + { + return TRUE; + } + if ( iS == SPELL_CONE_OF_COLD ) + { + return TRUE; + } + if ( iS == SPELL_MESTILS_ACID_BREATH ) + { + return TRUE; + } + if ( iS == SPELL_BURNING_HANDS ) + { + return TRUE; + } + if ( iS == SPELL_COLOR_SPRAY ) + { + return TRUE; + } + if ( iS = SPELL_BEH_ANTIMAGIC_CONE ) + { + return TRUE; + } + return FALSE; +} + +int IsDragonBreath( int iS=0 ) +{ + if ( iS == SPELLABILITY_DRAGON_BREATH_ACID ) + { + return TRUE; + } + if ( iS == SPELLABILITY_DRAGON_BREATH_COLD ) + { + return TRUE; + } + if ( iS == SPELLABILITY_DRAGON_BREATH_FEAR ) + { + return TRUE; + } + if ( iS == SPELLABILITY_DRAGON_BREATH_FIRE ) + { + return TRUE; + } + if ( iS == SPELLABILITY_DRAGON_BREATH_GAS ) + { + return TRUE; + } + if ( iS == SPELLABILITY_DRAGON_BREATH_LIGHTNING ) + { + return TRUE; + } + if ( iS == SPELLABILITY_DRAGON_BREATH_NEGATIVE ) + { + return TRUE; + } + if ( iS == SPELLABILITY_DRAGON_BREATH_PARALYZE ) + { + return TRUE; + } + if ( iS == SPELLABILITY_DRAGON_BREATH_SLEEP ) + { + return TRUE; + } + if ( iS == SPELLABILITY_DRAGON_BREATH_SLOW ) + { + return TRUE; + } + if ( iS == SPELLABILITY_DRAGON_BREATH_WEAKEN ) + { + return TRUE; + } + if ( iS == SPELLABILITY_DRAGON_BREATH_RDD ) + { + return TRUE; + } + if ( iS == SPELLABILITY_DRAGON_BREATH_PRISMATIC ) + { + return TRUE; + } + return FALSE; +} + +int IsHowl( int iS=0 ) +{ + if ( iS == SPELLABILITY_HOWL_CONFUSE ) + { + return TRUE; + } + if ( iS == SPELLABILITY_HOWL_DAZE ) + { + return TRUE; + } + if ( iS == SPELLABILITY_HOWL_DEATH ) + { + return TRUE; + } + if ( iS == SPELLABILITY_HOWL_DOOM ) + { + return TRUE; + } + if ( iS == SPELLABILITY_HOWL_FEAR ) + { + return TRUE; + } + if ( iS == SPELLABILITY_HOWL_PARALYSIS ) + { + return TRUE; + } + if ( iS == SPELLABILITY_HOWL_SONIC ) + { + return TRUE; + } + if ( iS == SPELLABILITY_HOWL_STUN ) + { + return TRUE; + } + return FALSE; +} + +int IsPulse( int iS=0 ) +{ + if ( iS == SPELLABILITY_PULSE_ABILITY_DRAIN_CHARISMA ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_ABILITY_DRAIN_CONSTITUTION ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_ABILITY_DRAIN_DEXTERITY ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_ABILITY_DRAIN_INTELLIGENCE ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_ABILITY_DRAIN_STRENGTH ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_ABILITY_DRAIN_WISDOM ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_COLD ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_DEATH ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_DISEASE ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_DROWN ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_FIRE ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_HOLY ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_LEVEL_DRAIN ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_LIGHTNING ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_NEGATIVE ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_POISON ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_SPORES ) + { + return TRUE; + } + if ( iS == SPELLABILITY_PULSE_WHIRLWIND ) + { + return TRUE; + } + return FALSE; +} + +void InitializeBeholderRaySelection( object oB=OBJECT_SELF ) +{ + int iC = BEHOLDER_MAX_RAYS; + int iR; + int iT; + + SetLocalInt( oB, "BRTMP1", SPELL_BEHRAY_FINGER_OF_DEATH ); + SetLocalInt( oB, "BRTMP2", SPELL_BEHRAY_TELEKINESIS ); + SetLocalInt( oB, "BRTMP3", SPELL_BEHRAY_FLESH_TO_STONE ); + SetLocalInt( oB, "BRTMP4", SPELL_BEHRAY_CHARM ); + SetLocalInt( oB, "BRTMP5", SPELL_BEHRAY_SLOW ); + SetLocalInt( oB, "BRTMP6", SPELL_BEHRAY_INFLICT_WOUNDS ); + SetLocalInt( oB, "BRTMP7", SPELL_BEHRAY_FEAR ); + //adding 3 additional rays for 10 per round + //adding an additional inflict wounds, telekinesis and slow + if ( iC > 7 ) + { + SetLocalInt( oB, "BRTMP8", SPELL_BEHRAY_TELEKINESIS ); + SetLocalInt( oB, "BRTMP9", SPELL_BEHRAY_SLOW ); + SetLocalInt( oB, "BRTMP10", SPELL_BEHRAY_INFLICT_WOUNDS ); + } + + while ( iC > 0 ) + { + iR = Random( iC ) + 1; + SetLocalInt( oB, "#BEHRAY" + IntToString( iC ), GetLocalInt( oB, "BRTMP" + IntToString( iR ) ) ); + for ( iT = iR; iT < iC; iT++ ) + { + SetLocalInt( oB, "BRTMP" + IntToString( iT ), GetLocalInt( oB, "BRTMP" + IntToString( iT + 1 ) ) ); + } + DeleteLocalInt( oB, "BRTMP" + IntToString( iT ) ); + iC--; + } +} + +void ClearBeholderRaySelection( object oB=OBJECT_SELF ) +{ + int iC; + + for ( iC = 1; iC < BEHOLDER_MAX_RAYS + 1; iC++ ) + { + DeleteLocalInt( oB, "#BEHRAY" + IntToString( iC ) ); + } +} + +void RemoveBeholderRayFromSelection( int iS=0, object oB=OBJECT_SELF ) +{ + int iC = 0; + int iR = -1; + + while ( iR != iS && iC < BEHOLDER_MAX_RAYS + 1 ) + { + iR = GetLocalInt( oB, "#BEHRAY" + IntToString( ++iC ) ); + } + if ( iR == iS ) + { + while ( ( iR = GetLocalInt( oB, "#BEHRAY" + IntToString( iC + 1 ) ) ) != 0 ) + { + SetLocalInt( oB, "#BEHRAY" + IntToString( iC++ ), iR ); + } + DeleteLocalInt( oB, "#BEHRAY" + IntToString( iC ) ); + } +} + +//currently just grabs a random ray +//more intelligence matching of rays to targets will be added in the near future +int MatchRayToTarget( object oT, object oB=OBJECT_SELF ) +{ + int iC; + int iR; + int iT = 0; + + while ( GetLocalInt( oB, "#BEHRAY" + IntToString( ++iT ) ) != 0 ) + { + iC++; + } + iR = Random( iC ) + 1; + iR = GetLocalInt( oB, "#BEHRAY" + IntToString( iR ) ); + + return iR; +} \ No newline at end of file diff --git a/_module/nss/no_lib_melee.nss b/_module/nss/no_lib_melee.nss new file mode 100644 index 00000000..e0a151c4 --- /dev/null +++ b/_module/nss/no_lib_melee.nss @@ -0,0 +1,300 @@ +#include "no_inc_ptypes" + +//functions +int GetBestMeleeSpecial( object oTarget, int iPenalty=0, int iChance=50, object oEnt=OBJECT_SELF ) +{ + int iCnt = 0; + int iFeat; + int iMyAtk; + int iEnemyAtk; + int iMyAC; + int iEnemyAC; + int iF1; + int iF2; + int iD; + int iT; + + if ( !GetIsObjectValid( oTarget ) || Random( 100 ) > iChance ) + { + return 0; + } + + //get target's discipline skill as it opposes some melee specials + iD = GetSkillRank( SKILL_DISCIPLINE, oTarget ) + GetAbilityModifier( ABILITY_STRENGTH, oTarget ) + 3 * GetHasFeat( FEAT_SKILL_FOCUS_DISCIPLINE, oTarget ); + + //use either my intelligence or BAB to check for creature knowledge on some of these, whichever is better + //if iT == TRUE we will use BAB, otherwise use intelligence modifier + iT = GetBaseAttackBonus( OBJECT_SELF ) < GetAbilityModifier( ABILITY_INTELLIGENCE ) ? FALSE : TRUE; + + iMyAtk = EstimateAttackBonus( oEnt ) + iPenalty; //include penalty from active combat mode if any + //iEnemyAtk = EstimateAttackBonus( oTarget ); + //iMyAC = GetAC( oEnt ) - 10; + iEnemyAC = GetAC( oTarget ) - 10; + + //KNOCKDOWN + iF1 = GetHasFeat( FEAT_KNOCKDOWN, oEnt ); + iF2 = GetHasFeat( FEAT_IMPROVED_KNOCKDOWN, oEnt ); + if ( iF1 || iF2 ) + { + iFeat = 0; + if ( !GetHasFeatEffect( FEAT_KNOCKDOWN, oTarget ) && !GetHasFeatEffect( FEAT_IMPROVED_KNOCKDOWN, oTarget ) ) + { + //figure out target's discipline + + if ( iF2 ) //improved knockdown + { + //compare my improved knockdown attack roll to target's AC and Discipline check + if ( iMyAtk >= iEnemyAC && iMyAtk > iD ) + { + iFeat = FEAT_IMPROVED_KNOCKDOWN; + } + } + else //no iF2 means we must have iF1 + { + //compare my knockdown attack roll to target's AC and Discipline check + if ( DoCombatKnowledgeCheck( iT, 10 ) == FALSE || ( iMyAtk - 4 >= iEnemyAC && iMyAtk - 4 > iD ) ) + { + iFeat = FEAT_KNOCKDOWN; + } + } + } + if ( iFeat ) + { + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + } + + //CALLED SHOT + if ( GetHasFeat( FEAT_CALLED_SHOT, oEnt ) ) + { + iFeat = 0; + if ( DoCombatKnowledgeCheck( iT, 10 ) == FALSE || ( iMyAtk - 4 >= iEnemyAC && iMyAtk - 4 > iD ) ) + { + iFeat = FEAT_CALLED_SHOT; + } + if ( iFeat ) + { + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + } + + //DISARM + iF1 = GetHasFeat( FEAT_DISARM, oEnt ); + iF2 = GetHasFeat( FEAT_IMPROVED_DISARM, oEnt ); + if ( iF1 || iF2 ) + { + int iMod = 4 * GetRelativeEnemyWeaponSize( oTarget ); + iFeat = 0; + if ( GetIsArmed( oTarget) ) + { + if ( iF2 ) //improved disarm + { + if ( DoCombatKnowledgeCheck( iT, 10 ) == FALSE || ( iMyAtk - 4 + iMod >= iEnemyAC && iMyAtk - 4 + iMod > iD ) ) + { + iFeat = FEAT_IMPROVED_DISARM; + } + } + else //disarm + { + if ( DoCombatKnowledgeCheck( iT, 10 ) == FALSE || ( iMyAtk - 6 + iMod >= iEnemyAC && iMyAtk - 6 + iMod > iD ) ) + { + iFeat = FEAT_DISARM; + } + } + } + if ( iFeat ) + { + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + } + + //STUNNING FIST + if ( GetHasFeat( FEAT_STUNNING_FIST, oEnt ) && !GetHasFeatEffect( FEAT_STUNNING_FIST, oTarget ) && + FloatToInt( NO_THRESH_STUNNING_FIST * GetHitDice( oEnt ) ) < GetHitDice( oTarget ) && + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) == FALSE || !GetIsImmune( oTarget, IMMUNITY_TYPE_STUN ) ) ) + { + iFeat = 0; + if ( DoCombatKnowledgeCheck( iT, 10 ) == FALSE || iMyAtk - 4 >= iEnemyAC ) + { + iFeat = FEAT_STUNNING_FIST; + } + if ( iFeat ) + { + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + } + + //QUIVERING PALM + if ( GetHasFeat( FEAT_QUIVERING_PALM, oEnt ) && + FloatToInt( NO_THRESH_QUIVERING_PALM * GetHitDice( oEnt ) ) < GetHitDice( oTarget ) && + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) == FALSE || !GetIsImmune( oTarget, IMMUNITY_TYPE_DEATH ) ) ) + { + iFeat = FEAT_QUIVERING_PALM; + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + + //SMITE EVIL + if ( GetHasFeat( FEAT_SMITE_EVIL, oEnt ) && FloatToInt( NO_THRESH_SMITE * GetHitDice( oEnt ) ) < GetHitDice( oTarget ) && + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 2 ) == FALSE || GetAlignmentGoodEvil( oTarget ) == ALIGNMENT_EVIL ) ) + { + iFeat = FEAT_SMITE_EVIL; + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + + //SMITE GOOD + //This feat definition was missing in nwscript pre-HotU, now it's in, uncommenting this block + if ( GetHasFeat( FEAT_SMITE_GOOD, oEnt ) && FloatToInt( NO_THRESH_SMITE * GetHitDice( oEnt ) ) < GetHitDice( oTarget ) && + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 2 ) == FALSE || GetAlignmentGoodEvil( oTarget ) == ALIGNMENT_GOOD ) ) + { + iFeat = FEAT_SMITE_GOOD; + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + + //WHIRLWIND + iF1 = GetHasFeat( FEAT_WHIRLWIND_ATTACK, oEnt ); + iF2 = GetHasFeat( FEAT_IMPROVED_WHIRLWIND, oEnt ); + if ( iF1 || iF2 ) + { + iFeat = 0; + + if ( iF2 ) //improved whirlwind + { + //check to see if there are multiple enemies in melee range + //if so, check to see if there are at least as many as our number of attacks divided by 2 + //tail end attacks probably miss anyway, so only count the top end of the attack sequence + //if there are enough, use whirlwind as we get full BAB on every attack with whirlwind + if ( GetHostileCount( 3.0 ) > GetBaseAttackBonus( oEnt ) / 10 ) + { + iFeat = FEAT_IMPROVED_WHIRLWIND; + } + } + else //whirlwind + { + if ( GetHostileCount( 3.0 ) > GetBaseAttackBonus( oEnt ) / 10 ) + { + iFeat = FEAT_WHIRLWIND_ATTACK; + } + } + if ( iFeat ) + { + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + } + + //KI DAMAGE + if ( GetHasFeat( FEAT_KI_DAMAGE, oEnt ) && FloatToInt( NO_THRESH_KI_DAMAGE * GetHitDice( oEnt ) ) < GetHitDice( oTarget ) ) + { + iFeat = FEAT_KI_DAMAGE; + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + + iFeat = GetLocalInt( oEnt, "#FEAT" + IntToString( Random( iCnt ) + 1 ) ); + while ( iCnt ) + { + DeleteLocalInt( oEnt, "#FEAT" + IntToString( iCnt-- ) ); + } + return iFeat; +} + +int SelectMeleeCombatModes( object oT, int iC=50, object oEnt=OBJECT_SELF ) +{ + int iPenalty = 0; //accumulate penalty from attack modes + int iMyAtk; + int iEnemyAtk; + int iMyAC; + int iEnemyAC; + int iF1; + int iF2; + int iCnt = 0; + int iMode; + int iT; + + if ( !GetIsObjectValid( oT ) || Random( 100 ) > iC ) + { + return 0; + } + + iMyAtk = EstimateAttackBonus( oEnt ); + iEnemyAtk = EstimateAttackBonus( oT ); + iMyAC = GetAC( oEnt ) - 10; + iEnemyAC = GetAC( oT ) - 10; + + //use either my intelligence or BAB to check for creature knowledge on some of these, whichever is better + //if iT == TRUE we will use BAB, otherwise use intelligence modifier + iT = GetBaseAttackBonus( OBJECT_SELF ) < GetAbilityModifier( ABILITY_INTELLIGENCE ) ? FALSE : TRUE; + + //POWER ATTACK, IMPROVED POWER ATTACK + iF1 = GetHasFeat( FEAT_POWER_ATTACK, oEnt ); + iF2 = GetHasFeat( FEAT_IMPROVED_POWER_ATTACK, oEnt ); + if ( iF1 || iF2 ) + { + iMode = 0; + if ( iF2 ) //improved power attack + { + if ( DoCombatKnowledgeCheck( iT, 10 ) == FALSE || iMyAtk - 10 >= iEnemyAC ) + { + iMode = FEAT_IMPROVED_POWER_ATTACK; + } + } + if ( iF1 && iMode == 0 ) //we don't have or didn't choose improved power attack + { + if ( DoCombatKnowledgeCheck( iT, 10 ) == FALSE || iMyAtk - 5 >= iEnemyAC ) + { + iMode = FEAT_POWER_ATTACK; + } + } + if ( iMode ) + { + SetLocalInt( oEnt, "#COMBATMODE" + IntToString( ++iCnt ), iMode ); + } + } + + //FLURRY OF BLOWS + if ( GetHasFeat( FEAT_FLURRY_OF_BLOWS, oEnt ) ) + { + iMode = 0; + if ( DoCombatKnowledgeCheck( iT, 10 ) == FALSE || iMyAtk - 2 >= iEnemyAC ) + { + iMode = FEAT_FLURRY_OF_BLOWS; + } + if ( iMode ) + { + SetLocalInt( oEnt, "#COMBATMODE" + IntToString( ++iCnt ), iMode ); + } + } + + //EXPERTISE, IMPROVED EXPERTISE + iF1 = GetHasFeat( FEAT_EXPERTISE, oEnt ); + iF2 = GetHasFeat( FEAT_IMPROVED_EXPERTISE, oEnt ); + if ( iF1 || iF2 ) + { + iMode = 0; + if ( iF2 ) //improved expertise + { + //check if I can afford a -10 on attack, and if my enemy has a high enough attack to bother + if ( DoCombatKnowledgeCheck( iT, 10 ) == FALSE || ( iMyAtk - 10 >= iEnemyAC && iEnemyAtk >= iMyAC ) ) + { + iMode = FEAT_IMPROVED_EXPERTISE; + } + } + if ( iF1 && iMode == 0 ) //we don't have or didn't choose improved expertise + { + //check if I can afford a -5 on attack, and if my enemy has a high enough attack to bother + if ( DoCombatKnowledgeCheck( iT, 10 ) == FALSE || ( iMyAtk - 5 >= iEnemyAC && iEnemyAtk >= iMyAC ) ) + { + iMode = FEAT_EXPERTISE; + } + } + if ( iMode ) + { + SetLocalInt( oEnt, "#COMBATMODE" + IntToString( ++iCnt ), iMode ); + } + } + + iMode = GetLocalInt( oEnt, "#COMBATMODE" + IntToString( Random( iCnt ) + 1 ) ); + while ( iCnt ) + { + DeleteLocalInt( oEnt, "#COMBATMODE" + IntToString( iCnt-- ) ); + } + return iMode; +} \ No newline at end of file diff --git a/_module/nss/no_lib_priority.nss b/_module/nss/no_lib_priority.nss new file mode 100644 index 00000000..90684f0c --- /dev/null +++ b/_module/nss/no_lib_priority.nss @@ -0,0 +1,320 @@ +#include "no_inc_ptypes" + +//functions +void AddBehaviour( string sB, int iC, object oEnt=OBJECT_SELF ) +{ + int iL = GetLocalInt( oEnt, "PRITOTAL" ) + 1; + + //update count + SetLocalInt( oEnt, "PRITOTAL", iL ); + + //make sure the chance is valid + iC = iC < 0 ? 0 : iC; + iC = iC > 100 ? 100 : iC; + + //set up the behaviour + SetLocalString( oEnt, "PRID_" + IntToString( iL ), sB ); + SetLocalInt( oEnt, "PRIC_" + IntToString( iL ), iC ); +} + +string GetPriority( int iP=1, object oEnt=OBJECT_SELF ) +{ + //retrieve priority iP + return GetLocalString( oEnt, "PRID_" + IntToString( iP ) ); +} + +int GetPriorityChance( int iP=1, object oEnt=OBJECT_SELF ) +{ + //retrieve priority chance iP + return GetLocalInt( oEnt, "PRIC_" + IntToString( iP ) ); +} + +void SetVoiceChat( int iV, int iC, object oE=OBJECT_SELF ) +{ + if ( iC < 0 ) + { + iC = -1; + } + else if ( iC > 100 ) + { + iC = 100; + } + if ( iV == NO_VC_DEFAULT ) + { + if ( iC == 0 ) + { + //delete the config for default voicechat chance + DeleteLocalInt( oE, "#VCC" ); + } + else + { + //set the config for default voicechat chance + SetLocalInt( oE, "#VCC", iC ); + } + } + else + { + if ( iC == 0 ) + { + //delete the config for this voicechat chance + DeleteLocalInt( oE, "#VCC_" + IntToString( iV ) ); + } + else + { + //set the config for this voicechat chance + SetLocalInt( oE, "#VCC_" + IntToString( iV ), iC ); + } + } +} + +float GetFollowDist( object oE=OBJECT_SELF ) +{ + float fF = -1.0; + + if ( GetIsObjectValid( oE ) ) + { + fF = GetLocalFloat( OBJECT_SELF, "#FOLLOWDIST" ); + + if ( fF == 0.0 ) + { + //default distance if none is set + fF = 3.0; + } + } + return fF; +} + +void SetPerceptionRange( int iP, float fP=50.0, object oE=OBJECT_SELF ) +{ + if ( iP == NO_PERCEPTION_SEEN ) + { + SetLocalFloat( oE, "#PER_SEEN_RANGE", fP ); + } + else if ( iP == NO_PERCEPTION_HEARD ) + { + SetLocalFloat( oE, "#PER_HEARD_RANGE", fP ); + } + else if ( iP == NO_PERCEPTION_VANISHED ) + { + SetLocalFloat( oE, "#PER_VANISHED_RANGE", fP ); + } +} + +void SetPerceptionRanges( float fS=50.0, float fH=50.0, float fV=50.0, object oE=OBJECT_SELF ) +{ + if ( fS != -1.0 ) + { + SetLocalFloat( oE, "#PER_SEEN_RANGE", fS ); + } + if ( fH != -1.0 ) + { + SetLocalFloat( oE, "#PER_HEARD_RANGE", fH ); + } + if ( fV != -1.0 ) + { + SetLocalFloat( oE, "#PER_VANISHED_RANGE", fV ); + } +} + +float GetPerceptionRange( int iP, object oE=OBJECT_SELF ) +{ + float fP = 0.0; + + if ( iP == NO_PERCEPTION_SEEN ) + { + fP = GetLocalFloat( oE, "#PER_SEEN_RANGE" ); + } + else if ( iP == NO_PERCEPTION_HEARD ) + { + fP = GetLocalFloat( oE, "#PER_HEARD_RANGE" ); + } + else if ( iP == NO_PERCEPTION_VANISHED ) + { + fP = GetLocalFloat( oE, "#PER_VANISHED_RANGE" ); + } + //set max range if no setting found + if ( fP == 0.0 ) + { + fP = 50.0; + } + return fP; +} + +void SetReadyStatus( int iS=1, object oE=OBJECT_SELF ) +{ + SetLocalInt( oE, "#READYTOACT", iS ); +} + +int IsReadyToAct( object oE=OBJECT_SELF ) +{ + return GetLocalInt( oE, "#READYTOACT" ); +} + +int ShortAction( object oE=OBJECT_SELF ) +{ + string sAct = GetLastAction( oE ); + + if ( sAct == "+EVACAOE" || sAct == "+REGROUP" || sAct == "+AVOIDMELEE" || sAct == "+FLANK" || sAct == "+AVOIDENEMY" ) + //|| sAct == "+EYERAYS" ) + { + return TRUE; + } + return FALSE; +} + +int IsActive( object oE=OBJECT_SELF ) +{ + return GetLocalInt( oE, "#ACTIVE" ); +} + +void SetActive( object oE=OBJECT_SELF ) +{ + SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); +} + +void SetIsActive( int iA=TRUE, object oE=OBJECT_SELF ) +{ + if ( iA == TRUE ) + { + SetLocalInt( oE, "#ACTIVE", 1 ); + } + else + { + DeleteLocalInt( oE, "#ACTIVE" ); + } +} + +float GetResponseRange( int iT, object oE=OBJECT_SELF ) +{ + float fR = GetLocalFloat( oE, "#RESPOND_RANGE_" + IntToString( iT ) ); + + if ( fR == 0.0 ) + { + //default range + fR = 50.0; + } + return fR; +} + +void SetResponseRange( int iT, float fR=50.0, object oE=OBJECT_SELF ) +{ + float fRange = fR > 0.0 ? fR : 0.0; + + SetLocalFloat( oE, "#RESPOND_RANGE_" + IntToString( iT ), fRange ); +} + +void SetIsTeleporter( object oE=OBJECT_SELF ) +{ + SetLocalInt( OBJECT_SELF, "TELEPORTER", 1 ); +} + +int GetIsTeleporter( object oE=OBJECT_SELF ) +{ + return GetLocalInt( OBJECT_SELF, "TELEPORTER" ); +} + +void SetIsFastBuffer( int iS, object oE=OBJECT_SELF ) +{ + if ( iS == 1 ) + { + SetLocalInt( oE, "#FASTBUFFER", 1 ); + } + else + { + DeleteLocalInt( oE, "#FASTBUFFER" ); + } +} + +int GetIsFastBuffer( object oE=OBJECT_SELF ) +{ + return GetLocalInt( oE, "#FASTBUFFER" ); +} + +void SetIsFastBuffed( int iS, object oE=OBJECT_SELF ) +{ + if ( iS == 1 ) + { + SetLocalInt( oE, "#FASTBUFFED", 1 ); + } + else + { + DeleteLocalInt( oE, "#FASTBUFFED" ); + } +} + +int GetIsFastBuffed( object oE=OBJECT_SELF ) +{ + return GetLocalInt( oE, "#FASTBUFFED" ); +} + +void AddFastBuff( int iS, object oE=OBJECT_SELF ) +{ + int iC = CountFastBuffs( oE ) + 1; + + SetLocalInt( oE, "#SPN_FB" + IntToString( iC ), iS ); +} + +int CountFastBuffs( object oE=OBJECT_SELF ) +{ + int iC = 0; + int iS = 1; + + while ( GetLocalInt( oE, "#SPN_FB" + IntToString( iS++ ) ) != 0 ) + { + iC++; + } + + return iC; +} + +void SetLastAction( string sA, object oE=OBJECT_SELF ) +{ + SetLocalString( oE, "#LASTACTION", sA ); +} + +string GetLastAction( object oE=OBJECT_SELF ) +{ + return GetLocalString( oE, "#LASTACTION" ); +} + +void SetLastActionTimestamp( object oE=OBJECT_SELF ) +{ + SetLocalInt( oE, "#LASTACTIONTIME", GetTimeSecond() ); +} + +int GetLastActionTimestamp( object oE=OBJECT_SELF ) +{ + int iS = GetLocalInt( oE, "#LASTACTIONTIME" ); + int iT = GetTimeSecond(); + int iL = iT < iS ? iT + 60 : iT; + + return iL - iS; +} + +void SetCorpseDelay( int iT=60, object oC=OBJECT_SELF ) +{ + if ( GetRacialType( oC ) != RACIAL_TYPE_UNDEAD && GetStringLeft( GetTag( oC ), 6 ) != "NO_AI_" && + GetName( GetItemInSlot( INVENTORY_SLOT_CARMOUR, oC ) ) != "Gargoyle Properties" ) + { + //not summoned, not undead, default decay time + AssignCommand( oC, SetIsDestroyable( FALSE, TRUE, TRUE ) ); + SetLocalFloat( oC, "#DECAYDELAY", 60.0 ); //default corpse decay time + } +} + +void SetIsFlier( int iF=FALSE, object oF=OBJECT_SELF ) +{ + if ( iF == TRUE || GetRacialType( oF ) == RACIAL_TYPE_DRAGON ) + { + SetLocalInt( oF, "FLIER", 1 ); + } + else + { + DeleteLocalInt( oF, "FLIER" ); + } +} + +int GetIsFlier( object oF=OBJECT_SELF ) +{ + return GetLocalInt( oF, "FLIER" ); +} \ No newline at end of file diff --git a/_module/nss/no_lib_ranged.nss b/_module/nss/no_lib_ranged.nss new file mode 100644 index 00000000..0fc87cd0 --- /dev/null +++ b/_module/nss/no_lib_ranged.nss @@ -0,0 +1,172 @@ +#include "no_inc_ptypes" + +//functions +int GetBestRangedSpecial( object oTarget, int iPenalty=0, int iChance=50, object oEnt=OBJECT_SELF ) +{ + int iCnt = 0; + int iFeat; + int iMyAtk; + int iEnemyAtk; + int iMyAC; + int iEnemyAC; + int iF1; + int iF2; + int iD; + int iT; + + if ( !GetIsObjectValid( oTarget ) || Random( 100 ) > iChance ) + { + return 0; + } + + iD = GetSkillRank( SKILL_DISCIPLINE, oTarget ) + GetAbilityModifier( ABILITY_STRENGTH, oTarget ) + 3 * GetHasFeat( FEAT_SKILL_FOCUS_DISCIPLINE, oTarget ); + iMyAtk = EstimateAttackBonus( oEnt ) + iPenalty; //include penalty from active combat mode if any + //iEnemyAtk = EstimateAttackBonus( oTarget ); + //iMyAC = GetAC( oEnt ) - 10; + iEnemyAC = GetAC( oTarget ) - 10; + + //use either my intelligence or BAB to check for creature knowledge on some of these, whichever is better + //if iT == TRUE we will use BAB, otherwise use intelligence modifier + iT = GetBaseAttackBonus( OBJECT_SELF ) < GetAbilityModifier( ABILITY_INTELLIGENCE ) ? FALSE : TRUE; + + //CALLED SHOT + if ( GetHasFeat( FEAT_CALLED_SHOT, oEnt ) ) + { + iFeat = 0; + if ( DoCombatKnowledgeCheck( iT, 10 ) == FALSE || ( iMyAtk - 4 >= iEnemyAC && iMyAtk - 4 > iD ) ) + { + iFeat = FEAT_CALLED_SHOT; + } + if ( iFeat ) + { + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + } + + //SEEKER ARROW + // Arcane Archer feats are not defined in nwscript? + // FIX: They are in HotU but not SoU. When updating these for HotU update this block and add the rest. + iF1 = GetHasFeat( FEAT_PRESTIGE_SEEKER_ARROW_1, oEnt ); + iF2 = GetHasFeat( FEAT_PRESTIGE_SEEKER_ARROW_2, oEnt ); + if ( iF1 || iF2 ) + { + iFeat = 0; + if ( iMyAtk + 8 < iEnemyAC ) //if I can't hit even with a high roll use a seeker arrow + { + if ( iF2 ) + { + iFeat = FEAT_PRESTIGE_SEEKER_ARROW_2; + } + else + { + iFeat = FEAT_PRESTIGE_SEEKER_ARROW_1; + } + } + if ( iFeat ) + { + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + } + + //IMBUE ARROW + if ( GetHasFeat( FEAT_PRESTIGE_IMBUE_ARROW, oEnt ) ) + { + iFeat = 0; + if ( GetAllyCount( RADIUS_SIZE_HUGE, oTarget, oEnt ) > GetHostileCount( RADIUS_SIZE_HUGE, oTarget, oEnt ) ) + { + iFeat = FEAT_PRESTIGE_IMBUE_ARROW; + } + if ( iFeat ) + { + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + } + + //HAIL OF ARROWS + if ( GetHasFeat( FEAT_PRESTIGE_HAIL_OF_ARROWS, oEnt ) ) + { + iFeat = 0; + if ( GetHostileCount( 30.0 ) > GetBaseAttackBonus( oEnt ) / 10 ) + { + iFeat = FEAT_PRESTIGE_HAIL_OF_ARROWS; + } + if ( iFeat ) + { + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + } + + //ARROW OF SLAYING + if ( GetHasFeat( FEAT_PRESTIGE_ARROW_OF_DEATH, oEnt ) ) + { + iFeat = 0; + if ( FloatToInt( NO_THRESH_ARROW_SLAYING * GetHitDice( oEnt ) ) < GetHitDice( oTarget ) && + ( DoAbilityCheck( ABILITY_INTELLIGENCE, 10 ) == FALSE || GetIsImmune( oTarget, IMMUNITY_TYPE_DEATH ) == FALSE ) ) + { + //target has sufficient hit dice to warrant use of an arrow of death + //either oEnt failed its intelligence check or it passed and determined that target is not immune to death effects + iFeat = FEAT_PRESTIGE_ARROW_OF_DEATH; + } + if ( iFeat ) + { + SetLocalInt( oEnt, "#FEAT" + IntToString( ++iCnt ), iFeat ); + } + } + + //randomly select one of the feats that was deemed suitable for use + iFeat = GetLocalInt( oEnt, "#FEAT" + IntToString( Random( iCnt ) + 1 ) ); + while ( iCnt ) + { + DeleteLocalInt( oEnt, "#FEAT" + IntToString( iCnt-- ) ); + } + return iFeat; +} + +int SelectRangedCombatModes( object oT, int iC=50, object oEnt=OBJECT_SELF ) +{ + int iPenalty = 0; //accumulate penalty from attack modes + int iMyAtk; + //int iEnemyAtk; + //int iMyAC; + int iEnemyAC; + int iF1; + int iF2; + int iCnt = 0; + int iMode; + int iT; + + if ( !GetIsObjectValid( oT ) || Random( 100 ) > iC ) + { + return 0; + } + + iMyAtk = EstimateAttackBonus( oEnt ); + //iEnemyAtk = EstimateAttackBonus( oT ); + //iMyAC = GetAC( oEnt ) - 10; + iEnemyAC = GetAC( oT ) - 10; + + //use either my intelligence or BAB to check for creature knowledge on some of these, whichever is better + //if iT == TRUE we will use BAB, otherwise use intelligence modifier + iT = GetBaseAttackBonus( OBJECT_SELF ) < GetAbilityModifier( ABILITY_INTELLIGENCE ) ? FALSE : TRUE; + + //RAPID SHOT + if ( GetHasFeat( FEAT_RAPID_SHOT, oEnt ) ) + { + iMode = 0; + if ( DoCombatKnowledgeCheck( iT, 10 ) == FALSE || ( iMyAtk - 2 >= iEnemyAC ) ) + { + iMode = FEAT_RAPID_SHOT; + } + if ( iMode ) + { + SetLocalInt( oEnt, "#COMBATMODE" + IntToString( ++iCnt ), iMode ); + } + } + + iMode = GetLocalInt( oEnt, "#COMBATMODE" + IntToString( Random( iCnt ) + 1 ) ); + while ( iCnt ) + { + DeleteLocalInt( oEnt, "#COMBATMODE" + IntToString( iCnt-- ) ); + } + return iMode; +} \ No newline at end of file diff --git a/_module/nss/no_scr_asclis.nss b/_module/nss/no_scr_asclis.nss new file mode 100644 index 00000000..e04db71e --- /dev/null +++ b/_module/nss/no_scr_asclis.nss @@ -0,0 +1,5 @@ +void main() +{ + SetListening( OBJECT_SELF, TRUE ); + SetAssociateListenPatterns( OBJECT_SELF ); +} \ No newline at end of file diff --git a/_module/nss/no_scr_cleanvars.nss b/_module/nss/no_scr_cleanvars.nss new file mode 100644 index 00000000..6a010626 --- /dev/null +++ b/_module/nss/no_scr_cleanvars.nss @@ -0,0 +1,109 @@ +#include "no_lib_priority" +#include "no_lib_data" + +void main() +{ + //clean up variables on dying creature + int iCnt; + + //don't proceed if we're alive again + if ( GetIsDead( OBJECT_SELF ) || GetLocalInt( OBJECT_SELF, "TEMPDIE" ) ) + { + //clear teleporter status variable + DeleteLocalInt( OBJECT_SELF, "TELEPORTER" ); + + //clear balor death throes variable + DeleteLocalInt( OBJECT_SELF, "BALORDEATH" ); + + //clear dragon flight variables + DeleteLocalInt( OBJECT_SELF, "FLIER" ); + DeleteLocalInt( OBJECT_SELF, "DRAGONFLIGHTDEL" ); + + //dragon fear variable + DeleteLocalInt( OBJECT_SELF, "#DRAGFEAR" ); + + //clear caster flag + DeleteLocalInt( OBJECT_SELF, "#CASTER" ); + + //clear avoid melee trackers + DeleteLocalLocation( OBJECT_SELF, "#LASTHOTSPOT" ); + DeleteLocalFloat( OBJECT_SELF, "#LASTAMANGLE" ); + DeleteLocalInt( OBJECT_SELF, "#LASTHSRETRIES" ); + DeleteLocalInt( OBJECT_SELF, "#LASTDEST" ); + DeleteLocalLocation( OBJECT_SELF, "#LASTDEST" ); + + //clear dragon breath weapon delay flag + DeleteLocalInt( OBJECT_SELF, "#BDEL" ); + + //clear BC_HEAL anti-spam flag + DeleteLocalInt( OBJECT_SELF, "#HEALDEL" ); + + //delete combat setting + DeleteLocalInt( OBJECT_SELF, "#INCOMBAT" ); + + //delete last combat round end broadcast timestamp + DeleteLocalInt( OBJECT_SELF, "#LASTCREBC" ); + + //clear tail of summon chain variable + DeleteLocalObject( OBJECT_SELF, "MASTCHAIN" ); + + //clear vision flags + DeleteLocalInt( OBJECT_SELF, "#DARKNESS" ); + DeleteLocalInt( OBJECT_SELF, "#VANISHED" ); + DeleteLocalObject( OBJECT_SELF, "#VISION" ); + + //clear last rest marker + DeleteLocalInt( OBJECT_SELF, "#LASTREST" ); + + //clear fast buffer markers + DeleteLocalInt( OBJECT_SELF, "#FASTBUFFER" ); + DeleteLocalInt( OBJECT_SELF, "#FASTBUFFED" ); + + //delete activity marker + DeleteLocalInt( OBJECT_SELF, "#ACTIVE" ); + DeleteLocalInt( OBJECT_SELF, "#QUEUESHUTDOWN" ); + + //delete logged spawn point + DeleteLocalInt( OBJECT_SELF, "#RETSPNLOC" ); + DeleteLocalLocation( OBJECT_SELF, "#SPAWNLOC" ); + + //delete stand ground variables + DeleteLocalInt( OBJECT_SELF, "#STANDGROUND" ); + DeleteLocalLocation( OBJECT_SELF, "#SGLOC" ); + + //delete corpse decay delay variable + DeleteLocalFloat( OBJECT_SELF, "#DECAYDELAY" ); + + //clear spell list and fastbuff list + //these shouldn't be necessary, but just in case there is an interruption + iCnt = 1; + while ( GetLocalInt( OBJECT_SELF, "#SPL_" + IntToString( iCnt ) ) ) + { + DeleteLocalInt( OBJECT_SELF, "#SPL_" + IntToString( iCnt++ ) ); + } + iCnt = 1; + while ( GetLocalInt( OBJECT_SELF, "#SPL_FB" + IntToString( iCnt ) ) ) + { + DeleteLocalInt( OBJECT_SELF, "#SPL_FB" + IntToString( iCnt++ ) ); + } + iCnt = 1; + while ( GetLocalInt( OBJECT_SELF, "#SPN_FB" + IntToString( iCnt ) ) ) + { + DeleteLocalInt( OBJECT_SELF, "#SPN_FB" + IntToString( iCnt++ ) ); + } + iCnt = 1; + while ( GetLocalInt( OBJECT_SELF, "#FEAT_" + IntToString( iCnt ) ) ) + { + DeleteLocalInt( OBJECT_SELF, "#FEAT_" + IntToString( iCnt++ ) ); + } + + //clear priority lists + DeleteLocalInt( OBJECT_SELF, "PRITOTAL" ); + iCnt = 1; + while ( GetLocalInt( OBJECT_SELF, "PRIC_" + IntToString( iCnt ) ) ) + { + DeleteLocalString( OBJECT_SELF, "PRID_" + IntToString( iCnt ) ); + DeleteLocalInt( OBJECT_SELF, "PRIC_" + IntToString( iCnt++ ) ); + } + } +} diff --git a/_module/nss/no_scr_excorpse.nss b/_module/nss/no_scr_excorpse.nss new file mode 100644 index 00000000..7c59a15c --- /dev/null +++ b/_module/nss/no_scr_excorpse.nss @@ -0,0 +1,13 @@ +void main() +{ + //don't proceed if we're alive again + if ( GetIsDead( OBJECT_SELF ) || GetLocalInt( OBJECT_SELF, "TEMPDIE" ) ) + { + //clear death marker + DeleteLocalInt( OBJECT_SELF, "TEMPDIE" ); + + //time to die + SetIsDestroyable( TRUE, FALSE, FALSE ); + DestroyObject( OBJECT_SELF ); + } +} diff --git a/_module/nss/no_scr_logeq.nss b/_module/nss/no_scr_logeq.nss new file mode 100644 index 00000000..6f84e0a1 --- /dev/null +++ b/_module/nss/no_scr_logeq.nss @@ -0,0 +1,14 @@ +void main() +{ + object oL = GetItemInSlot( INVENTORY_SLOT_LEFTHAND ); + object oR = GetItemInSlot( INVENTORY_SLOT_RIGHTHAND ); + + if ( GetIsObjectValid( oL ) ) + { + SetLocalObject( OBJECT_SELF, "LHAND", oL ); + } + if ( GetIsObjectValid( oR ) ) + { + SetLocalObject( OBJECT_SELF, "RHAND", oR ); + } +} \ No newline at end of file diff --git a/_module/nss/no_scr_logspnloc.nss b/_module/nss/no_scr_logspnloc.nss new file mode 100644 index 00000000..edc45643 --- /dev/null +++ b/_module/nss/no_scr_logspnloc.nss @@ -0,0 +1,5 @@ +void main() +{ + SetLocalInt( OBJECT_SELF, "#RETSPNLOC", 1 ); + SetLocalLocation( OBJECT_SELF, "#SPAWNLOC", GetLocation( OBJECT_SELF ) ); +} \ No newline at end of file diff --git a/_module/nss/no_scr_shutdown.nss b/_module/nss/no_scr_shutdown.nss new file mode 100644 index 00000000..b48d3477 --- /dev/null +++ b/_module/nss/no_scr_shutdown.nss @@ -0,0 +1,72 @@ +//:://///////////////////////////////////////////// +//:: Shutdown +//:: +//::////////////////////////////////////////////// +/* + This script will shutdown the combat AI. +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" + +void main() +{ + int iCnt = GetLocalInt( OBJECT_SELF, "#QUEUESHUTDOWN" ); + int iCombat = 0; + //object oEnemy; + int iRestWait = 30; + + //delete queue marker + DeleteLocalInt( OBJECT_SELF, "#QUEUESHUTDOWN" ); + + //SpeakString( "CFS" ); + //if ( !GetIsInCombat() && GetLocalInt( OBJECT_SELF, "#ACTIVE" ) && !IsInConversation( OBJECT_SELF ) ) + if ( !IsInConversation( OBJECT_SELF ) ) + { + //oEnemy = GetNearestCreature( CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY, OBJECT_SELF, 1, CREATURE_TYPE_IS_ALIVE, TRUE ); + int iE = GetHostileCount( 50.0 ); + if ( iE ) + { + InitCombat(); + } + else + { + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + DeleteLocalInt( OBJECT_SELF, "#FASTBUFFED" ); + DeleteLocalInt( OBJECT_SELF, "#QUEUESHUTDOWN" ); + DeleteLocalInt( OBJECT_SELF, "#ACTIVE" ); + DeleteLocalInt( OBJECT_SELF, "#VANISHED" ); + //SetReadyStatus(); + ActionForceFollowObject( GetMaster( OBJECT_SELF ), 3.0 ); + return; + } + //else if ( !GetLocalInt( OBJECT_SELF, "#LASTREST" ) && GetTimeSinceLastCombat() > iRestWait ) + else if ( GetTimeSinceLastCombat() > iRestWait ) + { + //PrintString( "RESTING: " + GetName( OBJECT_SELF ) ); + DeleteLocalInt( OBJECT_SELF, "#FASTBUFFED" ); + DeleteLocalInt( OBJECT_SELF, "#QUEUESHUTDOWN" ); + DeleteLocalInt( OBJECT_SELF, "#ACTIVE" ); //shutdown AI heartbeats until an opponent shows up + DeleteLocalInt( OBJECT_SELF, "#VANISHED" ); + //SetReadyStatus(); + if ( !GetLocalInt( OBJECT_SELF, "#LASTREST" ) ) + { + ActionRest(); //no enemies seen for 30 seconds, rest + SetLocalInt( OBJECT_SELF, "#LASTREST", 1 ); + } + ActionDoCommand( WalkWayPoints() ); //start walking waypoints if applicable + return; + } + + if ( !GetLocalInt( OBJECT_SELF, "#QUEUESHUTDOWN" ) && GetLocalInt( OBJECT_SELF, "#ACTIVE" ) ) + { + //DelayCommand( 12.0, ExecuteScript( "no_scr_shutdown", OBJECT_SELF ) ); + DoQueueShutdown( 12.0 ); + return; + } + } + } +} + diff --git a/_module/nss/no_spn_beh.nss b/_module/nss/no_spn_beh.nss new file mode 100644 index 00000000..fc9ee760 --- /dev/null +++ b/_module/nss/no_spn_beh.nss @@ -0,0 +1,121 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+AVOIDMELEE", 50 ); //avoid melee + AddBehaviour( "+EVACAOE", 80 ); //evac AOEs + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+REGROUP", 20 ); //regroup + AddBehaviour( "+FEATENHANCE", 10 ); //enhance self via feats + AddBehaviour( "+CENTRALEYE", 10 ); //beholder antimagic cone + AddBehaviour( "+EYERAYS", 100 ); //beholder eye rays + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //set response range for fighting broadcast + SetResponseRange( BC_FIGHTING, 50.0 ); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_clr.nss b/_module/nss/no_spn_clr.nss new file mode 100644 index 00000000..6f53b40e --- /dev/null +++ b/_module/nss/no_spn_clr.nss @@ -0,0 +1,157 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); + AddBehaviour( "+REGROUP", 80 ); + AddBehaviour( "+FLANK", 20 ); + AddBehaviour( "+SUMMON", 40 ); + AddBehaviour( "+RAISE", 60 ); + AddBehaviour( "+GROUPHEAL", 60 ); + AddBehaviour( "+HELP", 60 ); + AddBehaviour( "+HEAL", 60 ); + AddBehaviour( "+VIS", 60 ); + AddBehaviour( "+DEFSELF", 40 ); + AddBehaviour( "+DEFSING", 40 ); + AddBehaviour( "+GROUPENHANCE", 40 ); + AddBehaviour( "+ENHANCESING", 40 ); + AddBehaviour( "+ENHANCESELF", 40 ); + AddBehaviour( "+FEATENHANCE", 40 ); + AddBehaviour( "+DISPEL", 40 ); + AddBehaviour( "+DISPELAOE", 40 ); + AddBehaviour( "+DISMISSAL", 40 ); + AddBehaviour( "+TURN", 40 ); + AddBehaviour( "+AREA", 40 ); + AddBehaviour( "+DIRECT", 40 ); + AddBehaviour( "+TOUCH", 40 ); + AddBehaviour( "+EVACAOE", 50 ); + AddBehaviour( "+ATKMELEE", 100 ); + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + /* + if ( GetRacialType( OBJECT_SELF ) != RACIAL_TYPE_UNDEAD && GetStringLeft( GetTag( OBJECT_SELF ), 6 ) != "NO_AI_" && + GetName( GetItemInSlot( INVENTORY_SLOT_CARMOUR, OBJECT_SELF ) ) != "Gargoyle Properties" ) + { + //not summoned, not undead, default decay time + SetIsDestroyable( FALSE, TRUE, TRUE ); + SetLocalFloat( OBJECT_SELF, "#DECAYDELAY", 60.0 ); //default corpse decay time + } + */ + + /* + SetListening( OBJECT_SELF, TRUE ); + SetListenPattern( OBJECT_SELF, "BC_DEAD", 691 ); + SetListenPattern( OBJECT_SELF, "BC_FIGHTING", 699 ); + */ + + if ( GetName( GetItemInSlot( INVENTORY_SLOT_CARMOUR, OBJECT_SELF ) ) == "Balor Properties" ) + { + SetLocalInt( OBJECT_SELF, "BALORDEATH", 1 ); + } + + if ( GetRacialType( OBJECT_SELF ) == RACIAL_TYPE_DRAGON ) + { + SetLocalInt( OBJECT_SELF, "FLIER", 1 ); + } + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //set response range for fighting broadcast + SetResponseRange( BC_FIGHTING, 50.0 ); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + GenerateNPCTreasure(); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_fiend.nss b/_module/nss/no_spn_fiend.nss new file mode 100644 index 00000000..ab6d7e47 --- /dev/null +++ b/_module/nss/no_spn_fiend.nss @@ -0,0 +1,135 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+REGROUP", 40 ); //regroup + AddBehaviour( "+FLANK", 10 ); //flank + AddBehaviour( "+AVOIDMELEE", 10 ); //avoid melee + AddBehaviour( "+EVACAOE", 20 ); //evac AOEs + AddBehaviour( "+SUMMON", 20 ); //summon spells + AddBehaviour( "+HELP", 40 ); //help + AddBehaviour( "+VIS", 40 ); //vision + AddBehaviour( "+DEFSING", 10 ); //defend single + AddBehaviour( "+DEFSELF", 10 ); //defend self + AddBehaviour( "+GROUPENHANCE", 10 ); //enhance group + AddBehaviour( "+ENHANCESING", 10 ); //enhance single + AddBehaviour( "+ENHANCESELF", 10 ); //enhance self + AddBehaviour( "+FEATENHANCE", 10 ); //enhance self via feats + AddBehaviour( "+DISPEL", 10 ); //dispel single + AddBehaviour( "+DISPELAOE", 10 ); //dispel AOEs + AddBehaviour( "+DISMISSAL", 10 ); //dismiss summons + AddBehaviour( "+BREACH", 10 ); //breach + AddBehaviour( "+TIMESTOP", 10 ); //time stop + AddBehaviour( "+AREA", 25 ); //area attack spells + AddBehaviour( "+DIRECT", 20 ); //direct attack spells + AddBehaviour( "+TOUCH", 20 ); //touch attack spells + //AddBehaviour( "+MELEEASSIST", 50 ); //assist allies in melee + //AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + //CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_ftr.nss b/_module/nss/no_spn_ftr.nss new file mode 100644 index 00000000..b3bcca5e --- /dev/null +++ b/_module/nss/no_spn_ftr.nss @@ -0,0 +1,123 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+FEATENHANCE", 80 ); //enhance self via feats + AddBehaviour( "+REGROUP", 80 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + AddBehaviour( "+MELEEASSIST", 100 ); //assist allies in melee + AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //set response range for fighting broadcast + SetResponseRange( BC_FIGHTING, 50.0 ); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + //ExecuteScript( "scalesize", OBJECT_SELF ); + DelayCommand(2.0, ExecuteScript( "random_drop", OBJECT_SELF )); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + //CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_ftrfire.nss b/_module/nss/no_spn_ftrfire.nss new file mode 100644 index 00000000..f072ae93 --- /dev/null +++ b/_module/nss/no_spn_ftrfire.nss @@ -0,0 +1,123 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+FEATENHANCE", 80 ); //enhance self via feats + AddBehaviour( "+REGROUP", 80 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + AddBehaviour( "+MELEEASSIST", 100 ); //assist allies in melee + AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //set response range for fighting broadcast + SetResponseRange( BC_FIGHTING, 50.0 ); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + ExecuteScript( "scalesize", OBJECT_SELF ); + DelayCommand(2.0, ExecuteScript( "random_drop", OBJECT_SELF )); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + //CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_ftrsize.nss b/_module/nss/no_spn_ftrsize.nss new file mode 100644 index 00000000..f072ae93 --- /dev/null +++ b/_module/nss/no_spn_ftrsize.nss @@ -0,0 +1,123 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+FEATENHANCE", 80 ); //enhance self via feats + AddBehaviour( "+REGROUP", 80 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + AddBehaviour( "+MELEEASSIST", 100 ); //assist allies in melee + AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //set response range for fighting broadcast + SetResponseRange( BC_FIGHTING, 50.0 ); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + ExecuteScript( "scalesize", OBJECT_SELF ); + DelayCommand(2.0, ExecuteScript( "random_drop", OBJECT_SELF )); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + //CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_ftrwater.nss b/_module/nss/no_spn_ftrwater.nss new file mode 100644 index 00000000..9ebb97e6 --- /dev/null +++ b/_module/nss/no_spn_ftrwater.nss @@ -0,0 +1,123 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+FEATENHANCE", 80 ); //enhance self via feats + AddBehaviour( "+REGROUP", 80 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + AddBehaviour( "+MELEEASSIST", 100 ); //assist allies in melee + AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //set response range for fighting broadcast + SetResponseRange( BC_FIGHTING, 50.0 ); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + ExecuteScript( "scalesize", OBJECT_SELF ); + ExecuteScript( "watervfx", OBJECT_SELF ); + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + DelayCommand(2.0, ExecuteScript( "random_drop", OBJECT_SELF )); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + //CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_melcast1.nss b/_module/nss/no_spn_melcast1.nss new file mode 100644 index 00000000..6118b1ff --- /dev/null +++ b/_module/nss/no_spn_melcast1.nss @@ -0,0 +1,136 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+REGROUP", 40 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + //AddBehaviour( "+AVOIDMELEE", 20 ); //avoid melee + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + //AddBehaviour( "+SUMMON", 60 ); //summon spells + AddBehaviour( "+HELP", 40 ); //help + AddBehaviour( "+VIS", 40 ); //vision + AddBehaviour( "+DEFSING", 20 ); //defend single + AddBehaviour( "+DEFSELF", 20 ); //defend self + AddBehaviour( "+GROUPENHANCE", 20 ); //enhance group + AddBehaviour( "+ENHANCESING", 20 ); //enhance single + AddBehaviour( "+ENHANCESELF", 20 ); //enhance self + AddBehaviour( "+FEATENHANCE", 20 ); //enhance self via feats + //AddBehaviour( "+DISPEL", 40 ); //dispel single + //AddBehaviour( "+DISPELAOE", 40 ); //dispel AOEs + //AddBehaviour( "+DISMISSAL", 40 ); //dismiss summons + //AddBehaviour( "+BREACH", 40 ); //breach + //AddBehaviour( "+TIMESTOP", 20 ); //time stop + AddBehaviour( "+AREA", 20 ); //area attack spells + AddBehaviour( "+BREATH", 40 ); //area attack spells + AddBehaviour( "+DIRECT", 20 ); //direct attack spells + AddBehaviour( "+TOUCH", 20 ); //touch attack spells + AddBehaviour( "+MELEEASSIST", 50 ); //assist allies in melee + //AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_melcast2.nss b/_module/nss/no_spn_melcast2.nss new file mode 100644 index 00000000..f776a555 --- /dev/null +++ b/_module/nss/no_spn_melcast2.nss @@ -0,0 +1,136 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+REGROUP", 40 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + //AddBehaviour( "+AVOIDMELEE", 20 ); //avoid melee + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + //AddBehaviour( "+SUMMON", 60 ); //summon spells + AddBehaviour( "+HELP", 40 ); //help + AddBehaviour( "+VIS", 40 ); //vision + AddBehaviour( "+DEFSING", 20 ); //defend single + AddBehaviour( "+DEFSELF", 20 ); //defend self + AddBehaviour( "+GROUPENHANCE", 20 ); //enhance group + AddBehaviour( "+ENHANCESING", 20 ); //enhance single + AddBehaviour( "+ENHANCESELF", 20 ); //enhance self + AddBehaviour( "+FEATENHANCE", 20 ); //enhance self via feats + AddBehaviour( "+DISPEL", 20 ); //dispel single + AddBehaviour( "+DISPELAOE", 20 ); //dispel AOEs + //AddBehaviour( "+DISMISSAL", 40 ); //dismiss summons + //AddBehaviour( "+BREACH", 40 ); //breach + //AddBehaviour( "+TIMESTOP", 20 ); //time stop + AddBehaviour( "+AREA", 20 ); //area attack spells + AddBehaviour( "+BREATH", 40 ); //area attack spells + AddBehaviour( "+DIRECT", 20 ); //direct attack spells + AddBehaviour( "+TOUCH", 20 ); //touch attack spells + AddBehaviour( "+MELEEASSIST", 50 ); //assist allies in melee + //AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_melcast3.nss b/_module/nss/no_spn_melcast3.nss new file mode 100644 index 00000000..0abc91b9 --- /dev/null +++ b/_module/nss/no_spn_melcast3.nss @@ -0,0 +1,136 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+REGROUP", 40 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + //AddBehaviour( "+AVOIDMELEE", 20 ); //avoid melee + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + AddBehaviour( "+SUMMON", 60 ); //summon spells + AddBehaviour( "+HELP", 40 ); //help + AddBehaviour( "+VIS", 40 ); //vision + AddBehaviour( "+DEFSING", 20 ); //defend single + AddBehaviour( "+DEFSELF", 20 ); //defend self + AddBehaviour( "+GROUPENHANCE", 20 ); //enhance group + AddBehaviour( "+ENHANCESING", 20 ); //enhance single + AddBehaviour( "+ENHANCESELF", 20 ); //enhance self + AddBehaviour( "+FEATENHANCE", 20 ); //enhance self via feats + AddBehaviour( "+DISPEL", 20 ); //dispel single + AddBehaviour( "+DISPELAOE", 20 ); //dispel AOEs + AddBehaviour( "+DISMISSAL", 20 ); //dismiss summons + AddBehaviour( "+BREACH", 20 ); //breach + AddBehaviour( "+TIMESTOP", 20 ); //time stop + AddBehaviour( "+AREA", 20 ); //area attack spells + AddBehaviour( "+BREATH", 40 ); //area attack spells + AddBehaviour( "+DIRECT", 20 ); //direct attack spells + AddBehaviour( "+TOUCH", 20 ); //touch attack spells + AddBehaviour( "+MELEEASSIST", 50 ); //assist allies in melee + //AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_melenh.nss b/_module/nss/no_spn_melenh.nss new file mode 100644 index 00000000..5c6d9248 --- /dev/null +++ b/_module/nss/no_spn_melenh.nss @@ -0,0 +1,136 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+REGROUP", 40 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + //AddBehaviour( "+AVOIDMELEE", 20 ); //avoid melee + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + //AddBehaviour( "+SUMMON", 60 ); //summon spells + //AddBehaviour( "+HELP", 40 ); //help + AddBehaviour( "+VIS", 40 ); //vision + AddBehaviour( "+DEFSING", 40 ); //defend single + AddBehaviour( "+DEFSELF", 40 ); //defend self + AddBehaviour( "+GROUPENHANCE", 40 ); //enhance group + AddBehaviour( "+ENHANCESING", 40 ); //enhance single + AddBehaviour( "+ENHANCESELF", 40 ); //enhance self + AddBehaviour( "+FEATENHANCE", 40 ); //enhance self via feats + //AddBehaviour( "+DISPEL", 40 ); //dispel single + //AddBehaviour( "+DISPELAOE", 40 ); //dispel AOEs + //AddBehaviour( "+DISMISSAL", 40 ); //dismiss summons + //AddBehaviour( "+BREACH", 40 ); //breach + //AddBehaviour( "+TIMESTOP", 20 ); //time stop + //AddBehaviour( "+AREA", 80 ); //area attack spells + //AddBehaviour( "+BREATH", 40 ); //area attack spells + //AddBehaviour( "+DIRECT", 80 ); //direct attack spells + //AddBehaviour( "+TOUCH", 80 ); //touch attack spells + AddBehaviour( "+MELEEASSIST", 50 ); //assist allies in melee + //AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_rftr.nss b/_module/nss/no_spn_rftr.nss new file mode 100644 index 00000000..c9e8833c --- /dev/null +++ b/_module/nss/no_spn_rftr.nss @@ -0,0 +1,121 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+FEATENHANCE", 80 ); //enhance self via feats + AddBehaviour( "+REGROUP", 80 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + AddBehaviour( "+MELEEASSIST", 100 ); //assist allies in melee + AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //set response range for fighting broadcast + SetResponseRange( BC_FIGHTING, 50.0 ); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_rftrcast1.nss b/_module/nss/no_spn_rftrcast1.nss new file mode 100644 index 00000000..416f051c --- /dev/null +++ b/_module/nss/no_spn_rftrcast1.nss @@ -0,0 +1,136 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+REGROUP", 40 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + //AddBehaviour( "+AVOIDMELEE", 20 ); //avoid melee + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + //AddBehaviour( "+SUMMON", 60 ); //summon spells + AddBehaviour( "+HELP", 40 ); //help + AddBehaviour( "+VIS", 40 ); //vision + AddBehaviour( "+DEFSING", 40 ); //defend single + AddBehaviour( "+DEFSELF", 40 ); //defend self + AddBehaviour( "+GROUPENHANCE", 40 ); //enhance group + AddBehaviour( "+ENHANCESING", 40 ); //enhance single + AddBehaviour( "+ENHANCESELF", 40 ); //enhance self + AddBehaviour( "+FEATENHANCE", 40 ); //enhance self via feats + //AddBehaviour( "+DISPEL", 40 ); //dispel single + //AddBehaviour( "+DISPELAOE", 40 ); //dispel AOEs + //AddBehaviour( "+DISMISSAL", 40 ); //dismiss summons + //AddBehaviour( "+BREACH", 40 ); //breach + //AddBehaviour( "+TIMESTOP", 20 ); //time stop + AddBehaviour( "+AREA", 80 ); //area attack spells + AddBehaviour( "+BREATH", 40 ); //area attack spells + AddBehaviour( "+DIRECT", 80 ); //direct attack spells + AddBehaviour( "+TOUCH", 80 ); //touch attack spells + AddBehaviour( "+MELEEASSIST", 50 ); //assist allies in melee + AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_rngcast3.nss b/_module/nss/no_spn_rngcast3.nss new file mode 100644 index 00000000..1e4e36f2 --- /dev/null +++ b/_module/nss/no_spn_rngcast3.nss @@ -0,0 +1,136 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+AVOIDMELEE", 80 ); //avoid melee + AddBehaviour( "+REGROUP", 40 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + AddBehaviour( "+SUMMON", 60 ); //summon spells + AddBehaviour( "+HELP", 40 ); //help + AddBehaviour( "+VIS", 40 ); //vision + AddBehaviour( "+DEFSING", 20 ); //defend single + AddBehaviour( "+DEFSELF", 20 ); //defend self + AddBehaviour( "+GROUPENHANCE", 20 ); //enhance group + AddBehaviour( "+ENHANCESING", 20 ); //enhance single + AddBehaviour( "+ENHANCESELF", 20 ); //enhance self + AddBehaviour( "+FEATENHANCE", 20 ); //enhance self via feats + AddBehaviour( "+DISPEL", 20 ); //dispel single + AddBehaviour( "+DISPELAOE", 20 ); //dispel AOEs + AddBehaviour( "+DISMISSAL", 20 ); //dismiss summons + AddBehaviour( "+BREACH", 20 ); //breach + AddBehaviour( "+TIMESTOP", 20 ); //time stop + AddBehaviour( "+AREA", 20 ); //area attack spells + AddBehaviour( "+BREATH", 40 ); //area attack spells + AddBehaviour( "+DIRECT", 20 ); //direct attack spells + AddBehaviour( "+TOUCH", 20 ); //touch attack spells + //AddBehaviour( "+MELEEASSIST", 50 ); //assist allies in melee + AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_rog.nss b/_module/nss/no_spn_rog.nss new file mode 100644 index 00000000..425b32f9 --- /dev/null +++ b/_module/nss/no_spn_rog.nss @@ -0,0 +1,122 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+FEATENHANCE", 80 ); //enhance self via feats + AddBehaviour( "+REGROUP", 80 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + AddBehaviour( "+AREA", 60 ); //area attack spells + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + AddBehaviour( "+MELEEASSIST", 100 ); //assist allies in melee + AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //set response range for fighting broadcast + SetResponseRange( BC_FIGHTING, 50.0 ); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_rogcast1.nss b/_module/nss/no_spn_rogcast1.nss new file mode 100644 index 00000000..f3b9a02d --- /dev/null +++ b/_module/nss/no_spn_rogcast1.nss @@ -0,0 +1,136 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+REGROUP", 40 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + //AddBehaviour( "+AVOIDMELEE", 20 ); //avoid melee + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + //AddBehaviour( "+SUMMON", 60 ); //summon spells + AddBehaviour( "+HELP", 40 ); //help + AddBehaviour( "+VIS", 40 ); //vision + AddBehaviour( "+DEFSING", 40 ); //defend single + AddBehaviour( "+DEFSELF", 40 ); //defend self + AddBehaviour( "+GROUPENHANCE", 40 ); //enhance group + AddBehaviour( "+ENHANCESING", 40 ); //enhance single + AddBehaviour( "+ENHANCESELF", 40 ); //enhance self + AddBehaviour( "+FEATENHANCE", 40 ); //enhance self via feats + //AddBehaviour( "+DISPEL", 40 ); //dispel single + //AddBehaviour( "+DISPELAOE", 40 ); //dispel AOEs + //AddBehaviour( "+DISMISSAL", 40 ); //dismiss summons + //AddBehaviour( "+BREACH", 40 ); //breach + //AddBehaviour( "+TIMESTOP", 20 ); //time stop + AddBehaviour( "+AREA", 80 ); //area attack spells + AddBehaviour( "+BREATH", 40 ); //area attack spells + AddBehaviour( "+DIRECT", 80 ); //direct attack spells + AddBehaviour( "+TOUCH", 80 ); //touch attack spells + AddBehaviour( "+MELEEASSIST", 50 ); //assist allies in melee + AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_rogcast3.nss b/_module/nss/no_spn_rogcast3.nss new file mode 100644 index 00000000..a2c9f63f --- /dev/null +++ b/_module/nss/no_spn_rogcast3.nss @@ -0,0 +1,136 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+REGROUP", 40 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + //AddBehaviour( "+AVOIDMELEE", 20 ); //avoid melee + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + AddBehaviour( "+SUMMON", 60 ); //summon spells + AddBehaviour( "+HELP", 40 ); //help + AddBehaviour( "+VIS", 40 ); //vision + AddBehaviour( "+DEFSING", 20 ); //defend single + AddBehaviour( "+DEFSELF", 20 ); //defend self + AddBehaviour( "+GROUPENHANCE", 20 ); //enhance group + AddBehaviour( "+ENHANCESING", 20 ); //enhance single + AddBehaviour( "+ENHANCESELF", 20 ); //enhance self + AddBehaviour( "+FEATENHANCE", 20 ); //enhance self via feats + AddBehaviour( "+DISPEL", 20 ); //dispel single + AddBehaviour( "+DISPELAOE", 20 ); //dispel AOEs + AddBehaviour( "+DISMISSAL", 20 ); //dismiss summons + AddBehaviour( "+BREACH", 20 ); //breach + AddBehaviour( "+TIMESTOP", 20 ); //time stop + AddBehaviour( "+AREA", 20 ); //area attack spells + AddBehaviour( "+BREATH", 40 ); //area attack spells + AddBehaviour( "+DIRECT", 20 ); //direct attack spells + AddBehaviour( "+TOUCH", 20 ); //touch attack spells + AddBehaviour( "+MELEEASSIST", 50 ); //assist allies in melee + AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_rogenh.nss b/_module/nss/no_spn_rogenh.nss new file mode 100644 index 00000000..4f5e0459 --- /dev/null +++ b/_module/nss/no_spn_rogenh.nss @@ -0,0 +1,136 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+REGROUP", 40 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + //AddBehaviour( "+AVOIDMELEE", 20 ); //avoid melee + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + //AddBehaviour( "+SUMMON", 60 ); //summon spells + //AddBehaviour( "+HELP", 40 ); //help + AddBehaviour( "+VIS", 40 ); //vision + AddBehaviour( "+DEFSING", 40 ); //defend single + AddBehaviour( "+DEFSELF", 40 ); //defend self + AddBehaviour( "+GROUPENHANCE", 40 ); //enhance group + AddBehaviour( "+ENHANCESING", 40 ); //enhance single + AddBehaviour( "+ENHANCESELF", 40 ); //enhance self + AddBehaviour( "+FEATENHANCE", 40 ); //enhance self via feats + //AddBehaviour( "+DISPEL", 40 ); //dispel single + //AddBehaviour( "+DISPELAOE", 40 ); //dispel AOEs + //AddBehaviour( "+DISMISSAL", 40 ); //dismiss summons + //AddBehaviour( "+BREACH", 40 ); //breach + //AddBehaviour( "+TIMESTOP", 20 ); //time stop + //AddBehaviour( "+AREA", 80 ); //area attack spells + //AddBehaviour( "+BREATH", 40 ); //area attack spells + //AddBehaviour( "+DIRECT", 80 ); //direct attack spells + //AddBehaviour( "+TOUCH", 80 ); //touch attack spells + AddBehaviour( "+MELEEASSIST", 50 ); //assist allies in melee + //AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creatureed Event 1007 +} diff --git a/_module/nss/no_spn_rogtel.nss b/_module/nss/no_spn_rogtel.nss new file mode 100644 index 00000000..011bc2b6 --- /dev/null +++ b/_module/nss/no_spn_rogtel.nss @@ -0,0 +1,125 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+FEATENHANCE", 80 ); //enhance self via feats + AddBehaviour( "+REGROUP", 80 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + AddBehaviour( "+AREA", 60 ); //area attack spells + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + AddBehaviour( "+MELEEASSIST", 100 ); //assist allies in melee + AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //set response range for fighting broadcast + SetResponseRange( BC_FIGHTING, 50.0 ); + + //tell creature it is ready to act + //SetReadyStatus(); + + //flag as a teleport capable creature + SetIsTeleporter(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_summ.nss b/_module/nss/no_spn_summ.nss new file mode 100644 index 00000000..90be919a --- /dev/null +++ b/_module/nss/no_spn_summ.nss @@ -0,0 +1,136 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+REGROUP", 40 ); //regroup + AddBehaviour( "+FLANK", 20 ); //flank + AddBehaviour( "+AVOIDMELEE", 20 ); //avoid melee + AddBehaviour( "+EVACAOE", 50 ); //evac AOEs + AddBehaviour( "+SUMMON", 60 ); //summon spells + AddBehaviour( "+HELP", 40 ); //help + AddBehaviour( "+VIS", 40 ); //vision + AddBehaviour( "+DEFSING", 40 ); //defend single + AddBehaviour( "+DEFSELF", 40 ); //defend self + AddBehaviour( "+GROUPENHANCE", 40 ); //enhance group + AddBehaviour( "+ENHANCESING", 40 ); //enhance single + AddBehaviour( "+ENHANCESELF", 40 ); //enhance self + AddBehaviour( "+FEATENHANCE", 40 ); //enhance self via feats + AddBehaviour( "+DISPEL", 40 ); //dispel single + AddBehaviour( "+DISPELAOE", 40 ); //dispel AOEs + AddBehaviour( "+DISMISSAL", 40 ); //dismiss summons + AddBehaviour( "+BREACH", 40 ); //breach + AddBehaviour( "+TIMESTOP", 20 ); //time stop + AddBehaviour( "+AREA", 80 ); //area attack spells + AddBehaviour( "+BREATH", 40 ); //area attack spells + AddBehaviour( "+DIRECT", 80 ); //direct attack spells + AddBehaviour( "+TOUCH", 80 ); //touch attack spells + AddBehaviour( "+MELEEASSIST", 50 ); //assist allies in melee + AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + AddBehaviour( "+ATKMELEE", 100 ); //melee attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/no_spn_wiz.nss b/_module/nss/no_spn_wiz.nss new file mode 100644 index 00000000..e5396e23 --- /dev/null +++ b/_module/nss/no_spn_wiz.nss @@ -0,0 +1,136 @@ +//:://///////////////////////////////////////////// +//:: On Spawn In +//:: +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + after having just been spawned in +*/ +//::////////////////////////////////////////////// + +#include "no_lib_data" +#include "no_inc" +#include "nw_o2_coninclude" +#include "x0_i0_treasure" + +void main() +{ + //Behaviour config + AddBehaviour( "+AVOIDMELEE", 50 ); //avoid melee + AddBehaviour( "+EVACAOE", 80 ); //evac AOEs + AddBehaviour( "+HEALSELF", 100 ); //heal self + AddBehaviour( "+REGROUP", 20 ); //regroup + AddBehaviour( "+SUMMON", 50 ); //summon spells + AddBehaviour( "+HELP", 50 ); //help + AddBehaviour( "+VIS", 50 ); //vision + AddBehaviour( "+DEFSELF", 10 ); //defend self + AddBehaviour( "+DEFSING", 5 ); //defend single + AddBehaviour( "+ENHANCESELF", 10 ); //enhance self + AddBehaviour( "+GROUPENHANCE", 5 ); //enhance group + AddBehaviour( "+ENHANCESING", 5 ); //enhance single + AddBehaviour( "+FEATENHANCE", 10 ); //enhance self via feats + AddBehaviour( "+DISPEL", 10 ); //dispel single + AddBehaviour( "+DISPELAOE", 10 ); //dispel AOEs + AddBehaviour( "+DISMISSAL", 10 ); //dismiss summons + AddBehaviour( "+BREACH", 10 ); //breach + AddBehaviour( "+TIMESTOP", 20 ); //time stop + AddBehaviour( "+AREA", 80 ); //area attack spells + AddBehaviour( "+DIRECT", 80 ); //direct attack spells + AddBehaviour( "+TOUCH", 80 ); //touch attack spells + AddBehaviour( "+ATKRANGED", 100 ); //ranged attack + + //Other config + //Corpse decay set up and exclusions + SetCorpseDelay(); + + //Set whether the creature can use EffectDisappearAppear when moving + SetIsFlier(); + + if ( GetIsObjectValid( GetMaster( OBJECT_SELF ) ) ) + { + //I am probably a summoned creature, possibly a henchman + SetAssociateListenPatterns(); + } + + //set voice chat config + SetVoiceChat( NO_VC_DEFAULT, 10 ); + + //configure perception ranges + SetPerceptionRanges(); + + //set response range for fighting broadcast + SetResponseRange( BC_FIGHTING, 50.0 ); + + //tell creature it is ready to act + //SetReadyStatus(); + + //set fastbuffer status, should always be left on + SetIsFastBuffer( TRUE ); + //SetLocalInt( OBJECT_SELF, "#FASTBUFFER", 1 ); + //SetLocalInt( OBJECT_SELF, "#ACTIVE", 1 ); + + //log starting location + ExecuteScript( "no_scr_logspnloc", OBJECT_SELF ); + + //log loaded melee weapons + ExecuteScript( "no_scr_logeq", OBJECT_SELF ); + DelayCommand(2.0, ExecuteScript( "random_drop", OBJECT_SELF )); + + // OPTIONAL BEHAVIORS (Comment In or Out to Activate ) **************************************************************************** + //SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + //SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + // This causes the creature to say a special greeting in their conversation file + // upon Perceiving the player. Attach the [NW_D2_GenCheck.nss] script to the desired + // greeting in order to designate it. As the creature is actually saying this to + // himself, don't attach any player responses to the greeting. + + //SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + // This will set the listening pattern on the NPC to attack when allies call + //SetSpawnInCondition(NW_FLAG_STEALTH); + // If the NPC has stealth and they are a rogue go into stealth mode + //SetSpawnInCondition(NW_FLAG_SEARCH); + // If the NPC has Search go into Search Mode + //SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + // This will set the NPC to give a warning to non-enemies before attacking + + //SetSpawnInCondition(NW_FLAG_SLEEP); + //Creatures that spawn in during the night will be asleep. + //SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + //SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + //This will play Ambient Animations until the NPC sees an enemy or is cleared. + //NOTE that these animations will play automatically for Encounter Creatures. + + // NOTE: ONLY ONE OF THE FOLOOWING ESCAPE COMMANDS SHOULD EVER BE ACTIVATED AT ANY ONE TIME. + //SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); // OPTIONAL BEHAVIOR (Flee to a way point and return a short time later.) + //SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); // OPTIONAL BEHAVIOR (Flee to a way point and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); // OPTIONAL BEHAVIOR (Teleport to safety and do not return.) + //SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); // OPTIONAL BEHAVIOR (Teleport to safety and return a short time later.) + + // CUSTOM USER DEFINED EVENTS + /* + The following settings will allow the user to fire one of the blank user defined events in the NW_D2_DefaultD. Like the + On Spawn In script this script is meant to be customized by the end user to allow for unique behaviors. The user defined + events user 1000 - 1010 + */ + //SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1001 + //SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1002 + //SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1005 + //SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1006 + //SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1008 + //SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1003 + //SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1004 + //SetSpawnInCondition(NW_FLAG_DEATH_EVENT); //OPTIONAL BEHAVIOR - Fire User Defined Event 1007 + + SetListeningPatterns(); // Goes through and sets up which shouts the NPC will listen to. + WalkWayPoints(); // Optional Parameter: void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // 1. Looks to see if any Way Points in the module have the tag "WP_" + NPC TAG + "_0X", if so walk them + // 2. If the tag of the Way Point is "POST_" + NPC TAG the creature will return this way point after + // combat. + //CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); //* Use this to create a small amount of treasure on the creature +} diff --git a/_module/nss/nw_c2_defaul1b.nss b/_module/nss/nw_c2_defaul1b.nss new file mode 100644 index 00000000..12b20a44 --- /dev/null +++ b/_module/nss/nw_c2_defaul1b.nss @@ -0,0 +1,107 @@ +//::////////////////////////////////////////////////// +//:: NW_C2_DEFAULT1 +/* + Default OnHeartbeat script for NPCs. + + This script causes NPCs to perform default animations + while not otherwise engaged. + + This script duplicates the behavior of the default + script and just cleans up the code and removes + redundant conditional checks. + + */ +//::////////////////////////////////////////////////// +//:: Copyright (c) 2002 Floodgate Entertainment +//:: Created By: Naomi Novik +//:: Created On: 12/22/2002 +//::////////////////////////////////////////////////// + +#include "nw_i0_generic" + +void main() +{ + + // * if not runnning normal or better Ai then exit for performance reasons + if (GetAILevel() == AI_LEVEL_VERY_LOW) return; + + //ExecuteScript("prc_npc_hb", OBJECT_SELF); + + // Buff ourselves up right away if we should + if(GetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY)) + { + // This will return TRUE if an enemy was within 40.0 m + // and we buffed ourselves up instantly to respond -- + // simulates a spellcaster with protections enabled + // already. + if(TalentAdvancedBuff(40.0)) + { + // This is a one-shot deal + SetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY, FALSE); + + // This return means we skip sending the user-defined + // heartbeat signal in this one case. + return; + } + } + + + if(GetHasEffect(EFFECT_TYPE_SLEEP)) + { + // If we're asleep and this is the result of sleeping + // at night, apply the floating 'z's visual effect + // every so often + + if(GetSpawnInCondition(NW_FLAG_SLEEPING_AT_NIGHT)) + { + effect eVis = EffectVisualEffect(VFX_IMP_SLEEP); + if(d10() > 6) + { + ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, OBJECT_SELF); + } + } + } + + // If we have the 'constant' waypoints flag set, walk to the next + // waypoint. + else if ( GetWalkCondition(NW_WALK_FLAG_CONSTANT) ) + { + WalkWayPoints(); + } + + // Check to see if we should be playing default animations + // - make sure we don't have any current targets + else if ( !GetIsObjectValid(GetAttemptedAttackTarget()) + && !GetIsObjectValid(GetAttemptedSpellTarget()) + // && !GetIsPostOrWalking()) + && !GetIsObjectValid(GetNearestSeenEnemy())) + { + if (GetBehaviorState(NW_FLAG_BEHAVIOR_SPECIAL) || GetBehaviorState(NW_FLAG_BEHAVIOR_OMNIVORE) || + GetBehaviorState(NW_FLAG_BEHAVIOR_HERBIVORE)) + { + // This handles special attacking/fleeing behavior + // for omnivores & herbivores. + DetermineSpecialBehavior(); + } + else if (!IsInConversation(OBJECT_SELF)) + { + if (GetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS) + || GetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS_AVIAN) + || GetIsEncounterCreature()) + { + PlayMobileAmbientAnimations(); + } + else if (GetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS)) + { + PlayImmobileAmbientAnimations(); + } + } + } + + // Send the user-defined event signal if specified + if(GetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT)) + { + SignalEvent(OBJECT_SELF, EventUserDefined(EVENT_HEARTBEAT)); + } +} + diff --git a/_module/nss/nw_c2_defauldb.nss b/_module/nss/nw_c2_defauldb.nss new file mode 100644 index 00000000..89b8513c --- /dev/null +++ b/_module/nss/nw_c2_defauldb.nss @@ -0,0 +1,19 @@ +//:://///////////////////////////////////////////// +//:: Default: On User Defined +//:: NW_C2_DEFAULTD +//:: Copyright (c) 2002 Bioware Corp. +//::////////////////////////////////////////////// +/* + Determines the course of action to be taken + on a user defined event. +*/ +//::////////////////////////////////////////////// +//:: Created By: Don Moar +//:: Created On: April 28, 2002 +//::////////////////////////////////////////////// +void main() +{ + // enter desired behaviour here + + //ExecuteScript("prc_onuserdef", OBJECT_SELF); +} diff --git a/_module/nss/nw_c2_fastbuff9.nss b/_module/nss/nw_c2_fastbuff9.nss new file mode 100644 index 00000000..fb926fe5 --- /dev/null +++ b/_module/nss/nw_c2_fastbuff9.nss @@ -0,0 +1,327 @@ +//::////////////////////////////////////////////////// +//:: NW_C2_DEFAULT9 +/* + * Default OnSpawn handler with XP1 revisions. + * This corresponds to and produces the same results + * as the default OnSpawn handler in the OC. + * + * This can be used to customize creature behavior in three main ways: + * + * - Uncomment the existing lines of code to activate certain + * common desired behaviors from the moment when the creature + * spawns in. + * + * - Uncomment the user-defined event signals to cause the + * creature to fire events that you can then handle with + * a custom OnUserDefined event handler script. + * + * - Add new code _at the end_ to alter the initial + * behavior in a more customized way. + */ +//::////////////////////////////////////////////////// +//:: Copyright (c) 2002 Floodgate Entertainment +//:: Created By: Naomi Novik +//:: Created On: 12/11/2002 +//::////////////////////////////////////////////////// +//:: Updated 2003-08-20 Georg Zoeller: Added check for variables to active spawn in conditions without changing the spawnscript + + +#include "x0_i0_anims" +// #include "x0_i0_walkway" - in x0_i0_anims +#include "x0_i0_treasure" + +#include "x2_inc_switches" + +void main() +{ + // ***** Spawn-In Conditions ***** // + + // * REMOVE COMMENTS (// ) before the "Set..." functions to activate + // * them. Do NOT touch lines commented out with // *, those are + // * real comments for information. + + // * This causes the creature to say a one-line greeting in their + // * conversation file upon perceiving the player. Put [NW_D2_GenCheck] + // * in the "Text Seen When" field of the greeting in the conversation + // * file. Don't attach any player responses. + // * + // SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + + // * Same as above, but for hostile creatures to make them say + // * a line before attacking. + // * + SetSpawnInCondition(NW_FLAG_FAST_BUFF_ENEMY); + + // * This NPC will attack when its allies call for help + // * + // SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + + // * If the NPC has the Hide skill they will go into stealth mode + // * while doing WalkWayPoints(). + // * + // SetSpawnInCondition(NW_FLAG_STEALTH); + + //-------------------------------------------------------------------------- + // Enable stealth mode by setting a variable on the creature + // Great for ambushes + // See x2_inc_switches for more information about this + //-------------------------------------------------------------------------- + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_STEALTH) == TRUE) + { + SetSpawnInCondition(NW_FLAG_STEALTH); + } + // * Same, but for Search mode + // * + // SetSpawnInCondition(NW_FLAG_SEARCH); + + //-------------------------------------------------------------------------- + // Make creature enter search mode after spawning by setting a variable + // Great for guards, etc + // See x2_inc_switches for more information about this + //-------------------------------------------------------------------------- + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_SEARCH) == TRUE) + { + SetSpawnInCondition(NW_FLAG_SEARCH); + } + // * This will set the NPC to give a warning to non-enemies + // * before attacking. + // * NN -- no clue what this really does yet + // * + // SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + + // * Separate the NPC's waypoints into day & night. + // * See comment on WalkWayPoints() for use. + // * + // SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + + // * If this is set, the NPC will appear using the "EffectAppear" + // * animation instead of fading in, *IF* SetListeningPatterns() + // * is called below. + // * + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + + // * This will cause an NPC to use common animations it possesses, + // * and use social ones to any other nearby friendly NPCs. + // * + // SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + + //-------------------------------------------------------------------------- + // Enable immobile ambient animations by setting a variable + // See x2_inc_switches for more information about this + //-------------------------------------------------------------------------- + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT_IMMOBILE) == TRUE) + { + SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + } + // * Same as above, except NPC will wander randomly around the + // * area. + // * + // SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + + + //-------------------------------------------------------------------------- + // Enable mobile ambient animations by setting a variable + // See x2_inc_switches for more information about this + //-------------------------------------------------------------------------- + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT) == TRUE) + { + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + } + // **** Animation Conditions **** // + // * These are extra conditions you can put on creatures with ambient + // * animations. + + // * Civilized creatures interact with placeables in + // * their area that have the tag "NW_INTERACTIVE" + // * and "talk" to each other. + // * + // * Humanoid races are civilized by default, so only + // * set this flag for monster races that you want to + // * behave the same way. + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + + // * If this flag is set, this creature will constantly + // * be acting. Otherwise, creatures will only start + // * performing their ambient animations when they + // * first perceive a player, and they will stop when + // * the player moves away. + // SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + + // * Civilized creatures with this flag set will + // * randomly use a few voicechats. It's a good + // * idea to avoid putting this on multiple + // * creatures using the same voiceset. + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + + // * Creatures with _immobile_ ambient animations + // * can have this flag set to make them mobile in a + // * close range. They will never leave their immediate + // * area, but will move around in it, frequently + // * returning to their starting point. + // * + // * Note that creatures spawned inside interior areas + // * that contain a waypoint with one of the tags + // * "NW_HOME", "NW_TAVERN", "NW_SHOP" will automatically + // * have this condition set. + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + + + // **** Special Combat Tactics *****// + // * These are special flags that can be set on creatures to + // * make them follow certain specialized combat tactics. + // * NOTE: ONLY ONE OF THESE SHOULD BE SET ON A SINGLE CREATURE. + + // * Ranged attacker + // * Will attempt to stay at ranged distance from their + // * target. + // SetCombatCondition(X0_COMBAT_FLAG_RANGED); + + // * Defensive attacker + // * Will use defensive combat feats and parry + // SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE); + + // * Ambusher + // * Will go stealthy/invisible and attack, then + // * run away and try to go stealthy again before + // * attacking anew. + // SetCombatCondition(X0_COMBAT_FLAG_AMBUSHER); + + // * Cowardly + // * Cowardly creatures will attempt to flee + // * attackers. + // SetCombatCondition(X0_COMBAT_FLAG_COWARDLY); + + + // **** Escape Commands ***** // + // * NOTE: ONLY ONE OF THE FOLLOWING SHOULD EVER BE SET AT ONE TIME. + // * NOTE2: Not clear that these actually work. -- NN + + // * Flee to a way point and return a short time later. + // * + // SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); + + // * Flee to a way point and do not return. + // * + // SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); + + // * Teleport to safety and do not return. + // * + // SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); + + // * Teleport to safety and return a short time later. + // * + // SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); + + + + // ***** CUSTOM USER DEFINED EVENTS ***** / + + + /* + If you uncomment any of these conditions, the creature will fire + a specific user-defined event number on each event. That will then + allow you to write custom code in the "OnUserDefinedEvent" handler + script to go on top of the default NPC behaviors for that event. + + Example: I want to add some custom behavior to my NPC when they + are damaged. I uncomment the "NW_FLAG_DAMAGED_EVENT", then create + a new user-defined script that has something like this in it: + + if (GetUserDefinedEventNumber() == 1006) { + // Custom code for my NPC to execute when it's damaged + } + + These user-defined events are in the range 1001-1007. + */ + + // * Fire User Defined Event 1001 in the OnHeartbeat + // * + // SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); + + // * Fire User Defined Event 1002 + // * + // SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); + + // * Fire User Defined Event 1005 + // * + // SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); + + // * Fire User Defined Event 1006 + // * + SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); + + // * Fire User Defined Event 1008 + // * + // SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); + + // * Fire User Defined Event 1003 + // * + // SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); + + // * Fire User Defined Event 1004 + // * + // SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); + + + + // ***** DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***** // + + // * Goes through and sets up which shouts the NPC will listen to. + // * + SetListeningPatterns(); + + // * Walk among a set of waypoints. + // * 1. Find waypoints with the tag "WP_" + NPC TAG + "_##" and walk + // * among them in order. + // * 2. If the tag of the Way Point is "POST_" + NPC TAG, stay there + // * and return to it after combat. + // + // * Optional Parameters: + // * void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // + // * If "NW_FLAG_DAY_NIGHT_POSTING" is set above, you can also + // * create waypoints with the tags "WN_" + NPC Tag + "_##" + // * and those will be walked at night. (The standard waypoints + // * will be walked during the day.) + // * The night "posting" waypoint tag is simply "NIGHT_" + NPC tag. + WalkWayPoints(); + + //* Create a small amount of treasure on the creature + if ((GetLocalInt(GetModule(), "X2_L_NOTREASURE") == FALSE) && + (GetLocalInt(OBJECT_SELF, "X2_L_NOTREASURE") == FALSE) ) + { + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); + } + + + // ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** // + + // * If Incorporeal, apply changes + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_IS_INCORPOREAL) == TRUE) + { + effect eConceal = EffectConcealment(50, MISS_CHANCE_TYPE_NORMAL); + eConceal = ExtraordinaryEffect(eConceal); + effect eGhost = EffectCutsceneGhost(); + eGhost = ExtraordinaryEffect(eGhost); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eConceal, OBJECT_SELF); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGhost, OBJECT_SELF); + + } + + // * Give the create a random name. + // * If you create a script named x3_name_gen in your module, you can + // * set the value of the variable X3_S_RANDOM_NAME on OBJECT_SELF inside + // * the script to override the creature's default name. + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_RANDOMIZE_NAME) == TRUE) + { + ExecuteScript("x3_name_gen",OBJECT_SELF); + string sName = GetLocalString(OBJECT_SELF,"X3_S_RANDOM_NAME"); + if ( sName == "" ) + { + sName = RandomName(); + } + SetName(OBJECT_SELF,sName); + } + + ExecuteScript("prc_pwonspawn", OBJECT_SELF); +} diff --git a/_module/nss/nw_c2_water9.nss b/_module/nss/nw_c2_water9.nss new file mode 100644 index 00000000..d0fd1770 --- /dev/null +++ b/_module/nss/nw_c2_water9.nss @@ -0,0 +1,328 @@ +//::////////////////////////////////////////////////// +//:: NW_C2_DEFAULT9 +/* + * Default OnSpawn handler with XP1 revisions. + * This corresponds to and produces the same results + * as the default OnSpawn handler in the OC. + * + * This can be used to customize creature behavior in three main ways: + * + * - Uncomment the existing lines of code to activate certain + * common desired behaviors from the moment when the creature + * spawns in. + * + * - Uncomment the user-defined event signals to cause the + * creature to fire events that you can then handle with + * a custom OnUserDefined event handler script. + * + * - Add new code _at the end_ to alter the initial + * behavior in a more customized way. + */ +//::////////////////////////////////////////////////// +//:: Copyright (c) 2002 Floodgate Entertainment +//:: Created By: Naomi Novik +//:: Created On: 12/11/2002 +//::////////////////////////////////////////////////// +//:: Updated 2003-08-20 Georg Zoeller: Added check for variables to active spawn in conditions without changing the spawnscript + + +#include "x0_i0_anims" +// #include "x0_i0_walkway" - in x0_i0_anims +#include "x0_i0_treasure" + +#include "x2_inc_switches" + +void main() +{ + // ***** Spawn-In Conditions ***** // + + // * REMOVE COMMENTS (// ) before the "Set..." functions to activate + // * them. Do NOT touch lines commented out with // *, those are + // * real comments for information. + + // * This causes the creature to say a one-line greeting in their + // * conversation file upon perceiving the player. Put [NW_D2_GenCheck] + // * in the "Text Seen When" field of the greeting in the conversation + // * file. Don't attach any player responses. + // * + // SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + + // * Same as above, but for hostile creatures to make them say + // * a line before attacking. + // * + // SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + + // * This NPC will attack when its allies call for help + // * + // SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + + // * If the NPC has the Hide skill they will go into stealth mode + // * while doing WalkWayPoints(). + // * + // SetSpawnInCondition(NW_FLAG_STEALTH); + + //-------------------------------------------------------------------------- + // Enable stealth mode by setting a variable on the creature + // Great for ambushes + // See x2_inc_switches for more information about this + //-------------------------------------------------------------------------- + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_STEALTH) == TRUE) + { + SetSpawnInCondition(NW_FLAG_STEALTH); + } + // * Same, but for Search mode + // * + // SetSpawnInCondition(NW_FLAG_SEARCH); + + //-------------------------------------------------------------------------- + // Make creature enter search mode after spawning by setting a variable + // Great for guards, etc + // See x2_inc_switches for more information about this + //-------------------------------------------------------------------------- + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_SEARCH) == TRUE) + { + SetSpawnInCondition(NW_FLAG_SEARCH); + } + // * This will set the NPC to give a warning to non-enemies + // * before attacking. + // * NN -- no clue what this really does yet + // * + // SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + + // * Separate the NPC's waypoints into day & night. + // * See comment on WalkWayPoints() for use. + // * + // SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + + // * If this is set, the NPC will appear using the "EffectAppear" + // * animation instead of fading in, *IF* SetListeningPatterns() + // * is called below. + // * + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + + // * This will cause an NPC to use common animations it possesses, + // * and use social ones to any other nearby friendly NPCs. + // * + // SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + + //-------------------------------------------------------------------------- + // Enable immobile ambient animations by setting a variable + // See x2_inc_switches for more information about this + //-------------------------------------------------------------------------- + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT_IMMOBILE) == TRUE) + { + SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + } + // * Same as above, except NPC will wander randomly around the + // * area. + // * + // SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + + + //-------------------------------------------------------------------------- + // Enable mobile ambient animations by setting a variable + // See x2_inc_switches for more information about this + //-------------------------------------------------------------------------- + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT) == TRUE) + { + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + } + // **** Animation Conditions **** // + // * These are extra conditions you can put on creatures with ambient + // * animations. + + // * Civilized creatures interact with placeables in + // * their area that have the tag "NW_INTERACTIVE" + // * and "talk" to each other. + // * + // * Humanoid races are civilized by default, so only + // * set this flag for monster races that you want to + // * behave the same way. + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + + // * If this flag is set, this creature will constantly + // * be acting. Otherwise, creatures will only start + // * performing their ambient animations when they + // * first perceive a player, and they will stop when + // * the player moves away. + // SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + + // * Civilized creatures with this flag set will + // * randomly use a few voicechats. It's a good + // * idea to avoid putting this on multiple + // * creatures using the same voiceset. + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + + // * Creatures with _immobile_ ambient animations + // * can have this flag set to make them mobile in a + // * close range. They will never leave their immediate + // * area, but will move around in it, frequently + // * returning to their starting point. + // * + // * Note that creatures spawned inside interior areas + // * that contain a waypoint with one of the tags + // * "NW_HOME", "NW_TAVERN", "NW_SHOP" will automatically + // * have this condition set. + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + + + // **** Special Combat Tactics *****// + // * These are special flags that can be set on creatures to + // * make them follow certain specialized combat tactics. + // * NOTE: ONLY ONE OF THESE SHOULD BE SET ON A SINGLE CREATURE. + + // * Ranged attacker + // * Will attempt to stay at ranged distance from their + // * target. + // SetCombatCondition(X0_COMBAT_FLAG_RANGED); + + // * Defensive attacker + // * Will use defensive combat feats and parry + // SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE); + + // * Ambusher + // * Will go stealthy/invisible and attack, then + // * run away and try to go stealthy again before + // * attacking anew. + // SetCombatCondition(X0_COMBAT_FLAG_AMBUSHER); + + // * Cowardly + // * Cowardly creatures will attempt to flee + // * attackers. + // SetCombatCondition(X0_COMBAT_FLAG_COWARDLY); + + + // **** Escape Commands ***** // + // * NOTE: ONLY ONE OF THE FOLLOWING SHOULD EVER BE SET AT ONE TIME. + // * NOTE2: Not clear that these actually work. -- NN + + // * Flee to a way point and return a short time later. + // * + // SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); + + // * Flee to a way point and do not return. + // * + // SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); + + // * Teleport to safety and do not return. + // * + // SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); + + // * Teleport to safety and return a short time later. + // * + // SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); + + + + // ***** CUSTOM USER DEFINED EVENTS ***** / + + + /* + If you uncomment any of these conditions, the creature will fire + a specific user-defined event number on each event. That will then + allow you to write custom code in the "OnUserDefinedEvent" handler + script to go on top of the default NPC behaviors for that event. + + Example: I want to add some custom behavior to my NPC when they + are damaged. I uncomment the "NW_FLAG_DAMAGED_EVENT", then create + a new user-defined script that has something like this in it: + + if (GetUserDefinedEventNumber() == 1006) { + // Custom code for my NPC to execute when it's damaged + } + + These user-defined events are in the range 1001-1007. + */ + + // * Fire User Defined Event 1001 in the OnHeartbeat + // * + // SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); + + // * Fire User Defined Event 1002 + // * + // SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); + + // * Fire User Defined Event 1005 + // * + // SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); + + // * Fire User Defined Event 1006 + // * + SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); + + // * Fire User Defined Event 1008 + // * + // SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); + + // * Fire User Defined Event 1003 + // * + // SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); + + // * Fire User Defined Event 1004 + // * + // SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); + + + + // ***** DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***** // + + // * Goes through and sets up which shouts the NPC will listen to. + // * + SetListeningPatterns(); + + // * Walk among a set of waypoints. + // * 1. Find waypoints with the tag "WP_" + NPC TAG + "_##" and walk + // * among them in order. + // * 2. If the tag of the Way Point is "POST_" + NPC TAG, stay there + // * and return to it after combat. + // + // * Optional Parameters: + // * void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // + // * If "NW_FLAG_DAY_NIGHT_POSTING" is set above, you can also + // * create waypoints with the tags "WN_" + NPC Tag + "_##" + // * and those will be walked at night. (The standard waypoints + // * will be walked during the day.) + // * The night "posting" waypoint tag is simply "NIGHT_" + NPC tag. + WalkWayPoints(); + + //* Create a small amount of treasure on the creature + if ((GetLocalInt(GetModule(), "X2_L_NOTREASURE") == FALSE) && + (GetLocalInt(OBJECT_SELF, "X2_L_NOTREASURE") == FALSE) ) + { + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); + } + + + // ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** // + + // * If Incorporeal, apply changes + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_IS_INCORPOREAL) == TRUE) + { + effect eConceal = EffectConcealment(50, MISS_CHANCE_TYPE_NORMAL); + eConceal = ExtraordinaryEffect(eConceal); + effect eGhost = EffectCutsceneGhost(); + eGhost = ExtraordinaryEffect(eGhost); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eConceal, OBJECT_SELF); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGhost, OBJECT_SELF); + + } + + // * Give the create a random name. + // * If you create a script named x3_name_gen in your module, you can + // * set the value of the variable X3_S_RANDOM_NAME on OBJECT_SELF inside + // * the script to override the creature's default name. + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_RANDOMIZE_NAME) == TRUE) + { + ExecuteScript("x3_name_gen",OBJECT_SELF); + string sName = GetLocalString(OBJECT_SELF,"X3_S_RANDOM_NAME"); + if ( sName == "" ) + { + sName = RandomName(); + } + SetName(OBJECT_SELF,sName); + } + ExecuteScript("usecreatureweap", OBJECT_SELF); + ExecuteScript("prc_pwonspawn", OBJECT_SELF); + ExecuteScript("watervfx", OBJECT_SELF); +} diff --git a/_module/nss/nw_c2_water9b.nss b/_module/nss/nw_c2_water9b.nss new file mode 100644 index 00000000..fff7191f --- /dev/null +++ b/_module/nss/nw_c2_water9b.nss @@ -0,0 +1,328 @@ +//::////////////////////////////////////////////////// +//:: NW_C2_DEFAULT9 +/* + * Default OnSpawn handler with XP1 revisions. + * This corresponds to and produces the same results + * as the default OnSpawn handler in the OC. + * + * This can be used to customize creature behavior in three main ways: + * + * - Uncomment the existing lines of code to activate certain + * common desired behaviors from the moment when the creature + * spawns in. + * + * - Uncomment the user-defined event signals to cause the + * creature to fire events that you can then handle with + * a custom OnUserDefined event handler script. + * + * - Add new code _at the end_ to alter the initial + * behavior in a more customized way. + */ +//::////////////////////////////////////////////////// +//:: Copyright (c) 2002 Floodgate Entertainment +//:: Created By: Naomi Novik +//:: Created On: 12/11/2002 +//::////////////////////////////////////////////////// +//:: Updated 2003-08-20 Georg Zoeller: Added check for variables to active spawn in conditions without changing the spawnscript + + +#include "x0_i0_anims" +// #include "x0_i0_walkway" - in x0_i0_anims +#include "x0_i0_treasure" + +#include "x2_inc_switches" + +void main() +{ + // ***** Spawn-In Conditions ***** // + + // * REMOVE COMMENTS (// ) before the "Set..." functions to activate + // * them. Do NOT touch lines commented out with // *, those are + // * real comments for information. + + // * This causes the creature to say a one-line greeting in their + // * conversation file upon perceiving the player. Put [NW_D2_GenCheck] + // * in the "Text Seen When" field of the greeting in the conversation + // * file. Don't attach any player responses. + // * + // SetSpawnInCondition(NW_FLAG_SPECIAL_CONVERSATION); + + // * Same as above, but for hostile creatures to make them say + // * a line before attacking. + // * + // SetSpawnInCondition(NW_FLAG_SPECIAL_COMBAT_CONVERSATION); + + // * This NPC will attack when its allies call for help + // * + // SetSpawnInCondition(NW_FLAG_SHOUT_ATTACK_MY_TARGET); + + // * If the NPC has the Hide skill they will go into stealth mode + // * while doing WalkWayPoints(). + // * + // SetSpawnInCondition(NW_FLAG_STEALTH); + + //-------------------------------------------------------------------------- + // Enable stealth mode by setting a variable on the creature + // Great for ambushes + // See x2_inc_switches for more information about this + //-------------------------------------------------------------------------- + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_STEALTH) == TRUE) + { + SetSpawnInCondition(NW_FLAG_STEALTH); + } + // * Same, but for Search mode + // * + // SetSpawnInCondition(NW_FLAG_SEARCH); + + //-------------------------------------------------------------------------- + // Make creature enter search mode after spawning by setting a variable + // Great for guards, etc + // See x2_inc_switches for more information about this + //-------------------------------------------------------------------------- + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_SEARCH) == TRUE) + { + SetSpawnInCondition(NW_FLAG_SEARCH); + } + // * This will set the NPC to give a warning to non-enemies + // * before attacking. + // * NN -- no clue what this really does yet + // * + // SetSpawnInCondition(NW_FLAG_SET_WARNINGS); + + // * Separate the NPC's waypoints into day & night. + // * See comment on WalkWayPoints() for use. + // * + // SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING); + + // * If this is set, the NPC will appear using the "EffectAppear" + // * animation instead of fading in, *IF* SetListeningPatterns() + // * is called below. + // * + //SetSpawnInCondition(NW_FLAG_APPEAR_SPAWN_IN_ANIMATION); + + // * This will cause an NPC to use common animations it possesses, + // * and use social ones to any other nearby friendly NPCs. + // * + // SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + + //-------------------------------------------------------------------------- + // Enable immobile ambient animations by setting a variable + // See x2_inc_switches for more information about this + //-------------------------------------------------------------------------- + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT_IMMOBILE) == TRUE) + { + SetSpawnInCondition(NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS); + } + // * Same as above, except NPC will wander randomly around the + // * area. + // * + // SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + + + //-------------------------------------------------------------------------- + // Enable mobile ambient animations by setting a variable + // See x2_inc_switches for more information about this + //-------------------------------------------------------------------------- + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_USE_SPAWN_AMBIENT) == TRUE) + { + SetSpawnInCondition(NW_FLAG_AMBIENT_ANIMATIONS); + } + // **** Animation Conditions **** // + // * These are extra conditions you can put on creatures with ambient + // * animations. + + // * Civilized creatures interact with placeables in + // * their area that have the tag "NW_INTERACTIVE" + // * and "talk" to each other. + // * + // * Humanoid races are civilized by default, so only + // * set this flag for monster races that you want to + // * behave the same way. + // SetAnimationCondition(NW_ANIM_FLAG_IS_CIVILIZED); + + // * If this flag is set, this creature will constantly + // * be acting. Otherwise, creatures will only start + // * performing their ambient animations when they + // * first perceive a player, and they will stop when + // * the player moves away. + // SetAnimationCondition(NW_ANIM_FLAG_CONSTANT); + + // * Civilized creatures with this flag set will + // * randomly use a few voicechats. It's a good + // * idea to avoid putting this on multiple + // * creatures using the same voiceset. + // SetAnimationCondition(NW_ANIM_FLAG_CHATTER); + + // * Creatures with _immobile_ ambient animations + // * can have this flag set to make them mobile in a + // * close range. They will never leave their immediate + // * area, but will move around in it, frequently + // * returning to their starting point. + // * + // * Note that creatures spawned inside interior areas + // * that contain a waypoint with one of the tags + // * "NW_HOME", "NW_TAVERN", "NW_SHOP" will automatically + // * have this condition set. + // SetAnimationCondition(NW_ANIM_FLAG_IS_MOBILE_CLOSE_RANGE); + + + // **** Special Combat Tactics *****// + // * These are special flags that can be set on creatures to + // * make them follow certain specialized combat tactics. + // * NOTE: ONLY ONE OF THESE SHOULD BE SET ON A SINGLE CREATURE. + + // * Ranged attacker + // * Will attempt to stay at ranged distance from their + // * target. + // SetCombatCondition(X0_COMBAT_FLAG_RANGED); + + // * Defensive attacker + // * Will use defensive combat feats and parry + // SetCombatCondition(X0_COMBAT_FLAG_DEFENSIVE); + + // * Ambusher + // * Will go stealthy/invisible and attack, then + // * run away and try to go stealthy again before + // * attacking anew. + // SetCombatCondition(X0_COMBAT_FLAG_AMBUSHER); + + // * Cowardly + // * Cowardly creatures will attempt to flee + // * attackers. + // SetCombatCondition(X0_COMBAT_FLAG_COWARDLY); + + + // **** Escape Commands ***** // + // * NOTE: ONLY ONE OF THE FOLLOWING SHOULD EVER BE SET AT ONE TIME. + // * NOTE2: Not clear that these actually work. -- NN + + // * Flee to a way point and return a short time later. + // * + // SetSpawnInCondition(NW_FLAG_ESCAPE_RETURN); + + // * Flee to a way point and do not return. + // * + // SetSpawnInCondition(NW_FLAG_ESCAPE_LEAVE); + + // * Teleport to safety and do not return. + // * + // SetSpawnInCondition(NW_FLAG_TELEPORT_LEAVE); + + // * Teleport to safety and return a short time later. + // * + // SetSpawnInCondition(NW_FLAG_TELEPORT_RETURN); + + + + // ***** CUSTOM USER DEFINED EVENTS ***** / + + + /* + If you uncomment any of these conditions, the creature will fire + a specific user-defined event number on each event. That will then + allow you to write custom code in the "OnUserDefinedEvent" handler + script to go on top of the default NPC behaviors for that event. + + Example: I want to add some custom behavior to my NPC when they + are damaged. I uncomment the "NW_FLAG_DAMAGED_EVENT", then create + a new user-defined script that has something like this in it: + + if (GetUserDefinedEventNumber() == 1006) { + // Custom code for my NPC to execute when it's damaged + } + + These user-defined events are in the range 1001-1007. + */ + + // * Fire User Defined Event 1001 in the OnHeartbeat + // * + // SetSpawnInCondition(NW_FLAG_HEARTBEAT_EVENT); + + // * Fire User Defined Event 1002 + // * + // SetSpawnInCondition(NW_FLAG_PERCIEVE_EVENT); + + // * Fire User Defined Event 1005 + // * + // SetSpawnInCondition(NW_FLAG_ATTACK_EVENT); + + // * Fire User Defined Event 1006 + // * + SetSpawnInCondition(NW_FLAG_DAMAGED_EVENT); + + // * Fire User Defined Event 1008 + // * + // SetSpawnInCondition(NW_FLAG_DISTURBED_EVENT); + + // * Fire User Defined Event 1003 + // * + // SetSpawnInCondition(NW_FLAG_END_COMBAT_ROUND_EVENT); + + // * Fire User Defined Event 1004 + // * + // SetSpawnInCondition(NW_FLAG_ON_DIALOGUE_EVENT); + + + + // ***** DEFAULT GENERIC BEHAVIOR (DO NOT TOUCH) ***** // + + // * Goes through and sets up which shouts the NPC will listen to. + // * + SetListeningPatterns(); + + // * Walk among a set of waypoints. + // * 1. Find waypoints with the tag "WP_" + NPC TAG + "_##" and walk + // * among them in order. + // * 2. If the tag of the Way Point is "POST_" + NPC TAG, stay there + // * and return to it after combat. + // + // * Optional Parameters: + // * void WalkWayPoints(int nRun = FALSE, float fPause = 1.0) + // + // * If "NW_FLAG_DAY_NIGHT_POSTING" is set above, you can also + // * create waypoints with the tags "WN_" + NPC Tag + "_##" + // * and those will be walked at night. (The standard waypoints + // * will be walked during the day.) + // * The night "posting" waypoint tag is simply "NIGHT_" + NPC tag. + WalkWayPoints(); + + //* Create a small amount of treasure on the creature + if ((GetLocalInt(GetModule(), "X2_L_NOTREASURE") == FALSE) && + (GetLocalInt(OBJECT_SELF, "X2_L_NOTREASURE") == FALSE) ) + { + CTG_GenerateNPCTreasure(TREASURE_TYPE_MONSTER, OBJECT_SELF); + } + + + // ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** // + + // * If Incorporeal, apply changes + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_IS_INCORPOREAL) == TRUE) + { + effect eConceal = EffectConcealment(50, MISS_CHANCE_TYPE_NORMAL); + eConceal = ExtraordinaryEffect(eConceal); + effect eGhost = EffectCutsceneGhost(); + eGhost = ExtraordinaryEffect(eGhost); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eConceal, OBJECT_SELF); + ApplyEffectToObject(DURATION_TYPE_PERMANENT, eGhost, OBJECT_SELF); + + } + + // * Give the create a random name. + // * If you create a script named x3_name_gen in your module, you can + // * set the value of the variable X3_S_RANDOM_NAME on OBJECT_SELF inside + // * the script to override the creature's default name. + if (GetCreatureFlag(OBJECT_SELF, CREATURE_VAR_RANDOMIZE_NAME) == TRUE) + { + ExecuteScript("x3_name_gen",OBJECT_SELF); + string sName = GetLocalString(OBJECT_SELF,"X3_S_RANDOM_NAME"); + if ( sName == "" ) + { + sName = RandomName(); + } + SetName(OBJECT_SELF,sName); + } + + //ExecuteScript("prc_pwonspawn", OBJECT_SELF); + ExecuteScript("watervfx", OBJECT_SELF); +} diff --git a/_module/nss/prc_pwonspawn.nss b/_module/nss/prc_pwonspawn.nss index d29ee587..44e1d168 100644 --- a/_module/nss/prc_pwonspawn.nss +++ b/_module/nss/prc_pwonspawn.nss @@ -29,5 +29,5 @@ void main() // ***** ADD ANY SPECIAL ON-SPAWN CODE HERE ***** // - DelayCommand(30.0, ExecuteScript("random_drop", OBJECT_SELF)); + DelayCommand(2.0, ExecuteScript("random_drop", OBJECT_SELF)); } diff --git a/_module/nss/random_drop.nss b/_module/nss/random_drop.nss index 156dd6f5..68f121b2 100644 --- a/_module/nss/random_drop.nss +++ b/_module/nss/random_drop.nss @@ -11,8 +11,8 @@ void MakeItemsDroppable(object oNPC) if (GetLocalInt(oItem, "notdroppable") == TRUE) { - // 9% chance to drop item from inventory not already set as droppable - if (d100() <= 9) + // 10% chance to drop item from inventory not already set as droppable + if (d100() <= 10) { SetDroppableFlag(oItem, TRUE); @@ -26,5 +26,5 @@ void MakeItemsDroppable(object oNPC) void main() { object oNPC = OBJECT_SELF; - DelayCommand(0.0f,MakeItemsDroppable(oNPC)); + DelayCommand(0.2, MakeItemsDroppable(oNPC)); } diff --git a/_module/nss/random_drop2.nss b/_module/nss/random_drop2.nss index 5771d2b8..5a468510 100644 --- a/_module/nss/random_drop2.nss +++ b/_module/nss/random_drop2.nss @@ -1,24 +1,30 @@ -void main() +void MakeItemsDroppable(object oNPC) { - object oNPC = OBJECT_SELF; object oItem = GetFirstItemInInventory(oNPC); while (GetIsObjectValid(oItem)) - oItem = GetNextItemInInventory(oNPC); + { + if (GetDroppableFlag(oItem) == FALSE) + { + SetLocalInt(oItem, "notdroppable", 1); + } - { - if (GetDroppableFlag(oItem) == FALSE) - { - SetLocalInt (oItem, "notdroppable", 1); - } - if (GetLocalInt(oItem, "notdroppable") == 1) - { - //20% chance to drop item inventory not already set as droppable - //object oDrop = GetLocalObject(oItem, "notdroppable"); - int bDroppable = d100()>50; - SetDroppableFlag(oItem, bDroppable); + if (GetLocalInt(oItem, "notdroppable") == TRUE) + { + // 20% chance to drop item from inventory not already set as droppable + if (d100() <= 20) + { + SetDroppableFlag(oItem, TRUE); - } + } + } + + oItem = GetNextItemInInventory(oNPC); } } +void main() +{ + object oNPC = OBJECT_SELF; + DelayCommand(0.2, MakeItemsDroppable(oNPC)); +} diff --git a/_module/nss/random_drop_yy.nss b/_module/nss/random_drop_yy.nss index c2712a12..58d9a3e7 100644 --- a/_module/nss/random_drop_yy.nss +++ b/_module/nss/random_drop_yy.nss @@ -1,25 +1,30 @@ -//RANDOM DROP -// Ginge McDaggart +void MakeItemsDroppable(object oNPC) +{ + object oItem = GetFirstItemInInventory(oNPC); + + while (GetIsObjectValid(oItem)) + { + if (GetDroppableFlag(oItem) == FALSE) + { + SetLocalInt(oItem, "notdroppable", 1); + } + + if (GetLocalInt(oItem, "notdroppable") == TRUE) + { + // 10% chance to drop item from inventory not already set as droppable + if (d100() <= 40) + { + SetDroppableFlag(oItem, TRUE); + + } + } + + oItem = GetNextItemInInventory(oNPC); + } +} + void main() { object oNPC = OBJECT_SELF; - object oItem = GetFirstItemInInventory(oNPC); - - while (GetIsObjectValid(oItem)) - { - if(GetDroppableFlag(oItem)== TRUE) - { - SetDroppableFlag(oItem, TRUE); - } - - if(GetDroppableFlag(oItem)== FALSE) - { - int bDroppable=d100()>55; - SetDroppableFlag(oItem, bDroppable); - } - - oItem = GetNextItemInInventory(oNPC); - - - } + DelayCommand(0.2, MakeItemsDroppable(oNPC)); } diff --git a/_module/nss/scalesize.nss b/_module/nss/scalesize.nss new file mode 100644 index 00000000..6e14f53c --- /dev/null +++ b/_module/nss/scalesize.nss @@ -0,0 +1,15 @@ +///scalesize.nss +///Set variable on creature SCALE_SIZE float -> 0.0 to size desired + +void main() +{ +if (GetLocalInt(OBJECT_SELF,"NO_SCALE")!=1) +{ +float fScaleSize=GetLocalFloat(OBJECT_SELF,"SCALE_SIZE"); +if (fScaleSize==0.0) +{ +fScaleSize=1.0+(IntToFloat(Random(11))/100.0)*IntToFloat(Random(3)-1); +} +SetObjectVisualTransform(OBJECT_SELF,OBJECT_VISUAL_TRANSFORM_SCALE,fScaleSize); +} +} diff --git a/_module/nss/usecreatureweap.nss b/_module/nss/usecreatureweap.nss new file mode 100644 index 00000000..4e5fc37f --- /dev/null +++ b/_module/nss/usecreatureweap.nss @@ -0,0 +1,18 @@ +void main() +{ + + + // Have us perform a sequence of actions. + ActionEquipMostDamagingMelee(OBJECT_INVALID, FALSE); + AssignCommand (OBJECT_SELF, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND))); + AssignCommand (OBJECT_SELF, ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND))); + object oLeft = GetItemInSlot (INVENTORY_SLOT_CWEAPON_L, OBJECT_SELF); + object oRight = GetItemInSlot (INVENTORY_SLOT_CWEAPON_R, OBJECT_SELF); + object oBite = GetItemInSlot (INVENTORY_SLOT_CWEAPON_B, OBJECT_SELF); + AssignCommand (OBJECT_SELF, ActionEquipItem(GetItemPossessedBy(OBJECT_SELF, "oLeft"), INVENTORY_SLOT_CWEAPON_L)); + AssignCommand (OBJECT_SELF, ActionEquipItem(GetItemPossessedBy(OBJECT_SELF, "oRight"), INVENTORY_SLOT_CWEAPON_R)); + AssignCommand (OBJECT_SELF, ActionEquipItem(GetItemPossessedBy(OBJECT_SELF, "oBite"), INVENTORY_SLOT_CWEAPON_B)); + + DelayCommand (0.2, ExecuteScript("usecreatureweap", OBJECT_SELF)); +} + diff --git a/_module/nss/watervfx.nss b/_module/nss/watervfx.nss new file mode 100644 index 00000000..027b151b --- /dev/null +++ b/_module/nss/watervfx.nss @@ -0,0 +1,11 @@ +void main() +{ + object oTarget = OBJECT_SELF; + effect eMind = EffectVisualEffect(VFX_DUR_ICESKIN); + eMind = UnyieldingEffect(eMind); + effect eMind2 = EffectVisualEffect(VFX_DUR_GHOST_TRANSPARENT); + eMind2 = UnyieldingEffect(eMind2); + DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, eMind, oTarget)); + DelayCommand(1.0,ApplyEffectToObject(DURATION_TYPE_PERMANENT, eMind2, oTarget)); + SetLocalInt(OBJECT_SELF, "X1_L_IMMUNE_TO_DISPEL", 10); +} diff --git a/_module/utc/aerialite.utc.json b/_module/utc/aerialite.utc.json index 7184c94f..376cb93d 100644 --- a/_module/utc/aerialite.utc.json +++ b/_module/utc/aerialite.utc.json @@ -14,7 +14,7 @@ }, "ChallengeRating": { "type": "float", - "value": 14.0 + "value": 15.0 }, "ClassList": { "type": "list", @@ -27,7 +27,7 @@ }, "ClassLevel": { "type": "short", - "value": 12 + "value": 16 } } ] @@ -46,11 +46,11 @@ }, "CRAdjust": { "type": "int", - "value": 0 + "value": -2 }, "CurrentHitPoints": { "type": "short", - "value": 72 + "value": 100 }, "DecayTime": { "type": "dword", @@ -79,17 +79,10 @@ "type": "list", "value": [ { - "__struct_id": 128, + "__struct_id": 256, "EquippedRes": { "type": "resref", - "value": "item004" - } - }, - { - "__struct_id": 512, - "EquippedRes": { - "type": "resref", - "value": "mobtrueseeing" + "value": "item010" } }, { @@ -222,7 +215,7 @@ }, "HitPoints": { "type": "short", - "value": 72 + "value": 100 }, "Int": { "type": "byte", @@ -274,11 +267,11 @@ }, "MaxHitPoints": { "type": "short", - "value": 120 + "value": 164 }, "NaturalAC": { "type": "byte", - "value": 11 + "value": 0 }, "NoPermDeath": { "type": "byte", @@ -314,55 +307,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "no_ai_atk" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "no_ai_dam" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "no_ai_dth" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "no_ai_cnv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "no_ai_dis" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "no_ai_cmb" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "no_ai_hrt" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "no_ai_blk" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "no_ai_per" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "no_ai_rst" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "no_spn_ftrsize" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "no_ai_spt" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "" }, "SkillList": { "type": "list", @@ -694,6 +687,26 @@ "type": "resref", "value": "aerialite" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SCALE_SIZE" + }, + "Type": { + "type": "dword", + "value": 2 + }, + "Value": { + "type": "float", + "value": 0.699999988079071 + } + } + ] + }, "WalkRate": { "type": "int", "value": 7 diff --git a/_module/utc/airnoble.utc.json b/_module/utc/airnoble.utc.json index 13fbc0ec..cd3d9c49 100644 --- a/_module/utc/airnoble.utc.json +++ b/_module/utc/airnoble.utc.json @@ -2,7 +2,7 @@ "__data_type": "UTC ", "Appearance_Type": { "type": "word", - "value": 52 + "value": 53 }, "BodyBag": { "type": "byte", @@ -14,7 +14,7 @@ }, "ChallengeRating": { "type": "float", - "value": 152.0 + "value": 26.0 }, "ClassList": { "type": "list", @@ -46,15 +46,15 @@ }, "CRAdjust": { "type": "int", - "value": -60 + "value": -50 }, "CurrentHitPoints": { "type": "short", - "value": 360 + "value": 375 }, "DecayTime": { "type": "dword", - "value": 0 + "value": 5000 }, "Deity": { "type": "cexostring", @@ -69,7 +69,7 @@ }, "Dex": { "type": "byte", - "value": 29 + "value": 30 }, "Disarmable": { "type": "byte", @@ -78,34 +78,6 @@ "Equip_ItemList": { "type": "list", "value": [ - { - "__struct_id": 1, - "EquippedRes": { - "type": "resref", - "value": "airhelm" - } - }, - { - "__struct_id": 2, - "EquippedRes": { - "type": "resref", - "value": "airarmour" - } - }, - { - "__struct_id": 4, - "EquippedRes": { - "type": "resref", - "value": "elementalairbo" - } - }, - { - "__struct_id": 8, - "EquippedRes": { - "type": "resref", - "value": "elementalairgl" - } - }, { "__struct_id": 16, "EquippedRes": { @@ -114,17 +86,10 @@ } }, { - "__struct_id": 128, + "__struct_id": 256, "EquippedRes": { "type": "resref", - "value": "item004" - } - }, - { - "__struct_id": 512, - "EquippedRes": { - "type": "resref", - "value": "mobtrueseeing" + "value": "item010" } }, { @@ -164,27 +129,6 @@ "FeatList": { "type": "list", "value": [ - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 2 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 3 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 4 - } - }, { "__struct_id": 1, "Feat": { @@ -283,13 +227,6 @@ "value": 291 } }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 104 - } - }, { "__struct_id": 1, "Feat": { @@ -297,40 +234,12 @@ "value": 289 } }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 44 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 45 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 46 - } - }, { "__struct_id": 1, "Feat": { "type": "word", "value": 290 } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 142 - } } ] }, @@ -355,7 +264,7 @@ }, "HitPoints": { "type": "short", - "value": 360 + "value": 375 }, "Int": { "type": "byte", @@ -516,11 +425,11 @@ }, "MaxHitPoints": { "type": "short", - "value": 485 + "value": 500 }, "NaturalAC": { "type": "byte", - "value": 16 + "value": 0 }, "NoPermDeath": { "type": "byte", @@ -544,7 +453,7 @@ }, "PortraitId": { "type": "word", - "value": 140 + "value": 141 }, "Race": { "type": "byte", @@ -556,55 +465,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "no_ai_atk" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "no_ai_dam" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "no_ai_dth" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "no_ai_cnv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "no_ai_dis" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "no_ai_cmb" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "no_ai_hrt" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "no_ai_blk" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "no_ai_per" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "no_ai_rst" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "no_spn_ftrsize" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "no_ai_spt" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "" }, "SkillList": { "type": "list", @@ -966,6 +875,26 @@ "type": "resref", "value": "airnoble" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SCALE_SIZE" + }, + "Type": { + "type": "dword", + "value": 2 + }, + "Value": { + "type": "float", + "value": 1.799999952316284 + } + } + ] + }, "WalkRate": { "type": "int", "value": 7 diff --git a/_module/utc/darkelfoutcas001.utc.json b/_module/utc/darkelfoutcas001.utc.json new file mode 100644 index 00000000..8ac0a80d --- /dev/null +++ b/_module/utc/darkelfoutcas001.utc.json @@ -0,0 +1,1674 @@ +{ + "__data_type": "UTC ", + "Appearance_Type": { + "type": "word", + "value": 478 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 15 + }, + "ChallengeRating": { + "type": "float", + "value": 16.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 4 + }, + "ClassLevel": { + "type": "short", + "value": 4 + } + }, + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 1 + }, + "ClassLevel": { + "type": "short", + "value": 4 + }, + "KnownList0": { + "type": "list", + "value": [ + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 33 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 37 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 100 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 151 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + } + ] + }, + "KnownList1": { + "type": "list", + "value": [ + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 16 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 102 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 544 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + } + ] + }, + "KnownList2": { + "type": "list", + "value": [ + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 569 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 120 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + } + ] + } + }, + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 29 + }, + "ClassLevel": { + "type": "short", + "value": 8 + } + } + ] + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Con": { + "type": "byte", + "value": 16 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CRAdjust": { + "type": "int", + "value": -19 + }, + "CurrentHitPoints": { + "type": "short", + "value": 218 + }, + "DecayTime": { + "type": "dword", + "value": 5000 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "id": 64101, + "type": "cexolocstring", + "value": { + "0": "The dark elves are a subrace of elves, living deep underground in dangerous subterranean areas." + } + }, + "Dex": { + "type": "byte", + "value": 20 + }, + "Disarmable": { + "type": "byte", + "value": 1 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "EquippedRes": { + "type": "resref", + "value": "drowchainmesh" + } + }, + { + "__struct_id": 8, + "EquippedRes": { + "type": "resref", + "value": "nw_it_mbracer012" + } + }, + { + "__struct_id": 16, + "EquippedRes": { + "type": "resref", + "value": "drowcompositebow" + } + }, + { + "__struct_id": 128, + "EquippedRes": { + "type": "resref", + "value": "nw_it_mring031" + } + }, + { + "__struct_id": 512, + "EquippedRes": { + "type": "resref", + "value": "item008" + } + }, + { + "__struct_id": 1024, + "EquippedRes": { + "type": "resref", + "value": "skavensscale" + } + }, + { + "__struct_id": 8192, + "EquippedRes": { + "type": "resref", + "value": "nw_wambo001" + } + }, + { + "__struct_id": 131072, + "EquippedRes": { + "type": "resref", + "value": "nw_it_creitem057" + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 1 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 257 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 197 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 5 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3112 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2898 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 5195 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 871 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 228 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 10 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 448 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2468 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2919 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 389 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 391 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 14 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 453 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 236 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4095 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4092 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 450 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 235 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 85 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 69 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 63 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 68 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 65 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 19 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2884 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 240 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 26 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 1089 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3415 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 27 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 28 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2285 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 452 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 32 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 237 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 238 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 239 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4235 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 41 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 123 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 101 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 106 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 256 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 44 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 45 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 46 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7903 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7914 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7937 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7935 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7936 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7943 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7949 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7913 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7912 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7909 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7919 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7917 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7946 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7939 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7945 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7905 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7918 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7938 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7908 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7940 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7907 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7902 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7947 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7923 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7924 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7944 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7925 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7910 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7927 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7901 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7929 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7930 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7931 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7932 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7906 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 161 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 139 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 144 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 141 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 24423 + } + } + ] + }, + "FirstName": { + "id": 12501, + "type": "cexolocstring", + "value": { + "0": "Dark Elf Outcast" + } + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 0 + }, + "GoodEvil": { + "type": "byte", + "value": 50 + }, + "HitPoints": { + "type": "short", + "value": 218 + }, + "Int": { + "type": "byte", + "value": 14 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "InventoryRes": { + "type": "resref", + "value": "drowchainmesh" + }, + "Repos_PosX": { + "type": "word", + "value": 0 + }, + "Repos_Posy": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 1, + "InventoryRes": { + "type": "resref", + "value": "electriccloth" + }, + "Repos_PosX": { + "type": "word", + "value": 2 + }, + "Repos_Posy": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 2, + "InventoryRes": { + "type": "resref", + "value": "doomblade001" + }, + "Repos_PosX": { + "type": "word", + "value": 4 + }, + "Repos_Posy": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 3, + "InventoryRes": { + "type": "resref", + "value": "it_mneck037" + }, + "Repos_PosX": { + "type": "word", + "value": 5 + }, + "Repos_Posy": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 4, + "InventoryRes": { + "type": "resref", + "value": "nw_it_sparscr109" + }, + "Repos_PosX": { + "type": "word", + "value": 6 + }, + "Repos_Posy": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 5, + "InventoryRes": { + "type": "resref", + "value": "drowcompositebow" + }, + "Repos_PosX": { + "type": "word", + "value": 7 + }, + "Repos_Posy": { + "type": "word", + "value": 0 + } + } + ] + }, + "LastName": { + "type": "cexolocstring", + "value": {} + }, + "LawfulChaotic": { + "type": "byte", + "value": 50 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 250 + }, + "NaturalAC": { + "type": "byte", + "value": 5 + }, + "NoPermDeath": { + "type": "byte", + "value": 0 + }, + "PaletteID": { + "type": "byte", + "value": 39 + }, + "PerceptionRange": { + "type": "byte", + "value": 9 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 92 + }, + "Race": { + "type": "byte", + "value": 1 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "nw_c2_default5" + }, + "ScriptDamaged": { + "type": "resref", + "value": "nw_c2_default6" + }, + "ScriptDeath": { + "type": "resref", + "value": "nw_c2_default7" + }, + "ScriptDialogue": { + "type": "resref", + "value": "nw_c2_default4" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "nw_c2_default8" + }, + "ScriptEndRound": { + "type": "resref", + "value": "nw_c2_default3" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "nw_c2_default1" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "nw_c2_defaulte" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "nw_c2_default2" + }, + "ScriptRested": { + "type": "resref", + "value": "nw_c2_defaulta" + }, + "ScriptSpawn": { + "type": "resref", + "value": "nw_c2_default9" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "nw_c2_defaultb" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "nw_c2_defaultd" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 10 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 17 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 6 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 18 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 14 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 15 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 14 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 16 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 6 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 14 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 12 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 8 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 3 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 3 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 361 + }, + "SpecAbilityList": { + "type": "list", + "value": [ + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 16325 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 16325 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 16325 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 16325 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 365 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 365 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 365 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 365 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + } + ] + }, + "StartingPackage": { + "type": "byte", + "value": 4 + }, + "Str": { + "type": "byte", + "value": 23 + }, + "Subrace": { + "type": "cexostring", + "value": "" + }, + "Tag": { + "type": "cexostring", + "value": "DarkElfOutcast" + }, + "Tail_New": { + "type": "dword", + "value": 0 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "darkelfoutcas001" + }, + "WalkRate": { + "type": "int", + "value": 7 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 14 + } +} diff --git a/_module/utc/darkelfoutcas002.utc.json b/_module/utc/darkelfoutcas002.utc.json new file mode 100644 index 00000000..23827544 --- /dev/null +++ b/_module/utc/darkelfoutcas002.utc.json @@ -0,0 +1,1620 @@ +{ + "__data_type": "UTC ", + "Appearance_Type": { + "type": "word", + "value": 479 + }, + "BodyBag": { + "type": "byte", + "value": 0 + }, + "Cha": { + "type": "byte", + "value": 24 + }, + "ChallengeRating": { + "type": "float", + "value": 16.0 + }, + "ClassList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 4 + }, + "ClassLevel": { + "type": "short", + "value": 1 + } + }, + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 9 + }, + "ClassLevel": { + "type": "short", + "value": 16 + }, + "KnownList1": { + "type": "list", + "value": [ + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 66 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 521 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 143 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + } + ] + }, + "KnownList2": { + "type": "list", + "value": [ + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 36 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 120 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 64 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 157 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + } + ] + }, + "KnownList3": { + "type": "list", + "value": [ + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 58 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 78 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 101 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 137 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + } + ] + }, + "KnownList4": { + "type": "list", + "value": [ + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 47 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 52 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 375 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 368 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 191 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + } + ] + }, + "KnownList5": { + "type": "list", + "value": [ + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 25 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 45 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 369 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 71 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + } + ] + }, + "KnownList6": { + "type": "list", + "value": [ + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 14 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 121 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 158 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + } + ] + }, + "KnownList7": { + "type": "list", + "value": [ + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 39 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 135 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + } + ] + }, + "KnownList8": { + "type": "list", + "value": [ + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 367 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 89 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + } + ] + } + } + ] + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Con": { + "type": "byte", + "value": 16 + }, + "Conversation": { + "type": "resref", + "value": "" + }, + "CRAdjust": { + "type": "int", + "value": -29 + }, + "CurrentHitPoints": { + "type": "short", + "value": 191 + }, + "DecayTime": { + "type": "dword", + "value": 5000 + }, + "Deity": { + "type": "cexostring", + "value": "" + }, + "Description": { + "id": 64101, + "type": "cexolocstring", + "value": { + "0": "The dark elves are a subrace of elves, living deep underground in dangerous subterranean areas." + } + }, + "Dex": { + "type": "byte", + "value": 18 + }, + "Disarmable": { + "type": "byte", + "value": 1 + }, + "Equip_ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 2, + "EquippedRes": { + "type": "resref", + "value": "drowbattlerobe" + } + }, + { + "__struct_id": 8, + "EquippedRes": { + "type": "resref", + "value": "nw_it_mbracer012" + } + }, + { + "__struct_id": 16, + "EquippedRes": { + "type": "resref", + "value": "drowevokerstaff" + } + }, + { + "__struct_id": 64, + "EquippedRes": { + "type": "resref", + "value": "electriccloth" + } + }, + { + "__struct_id": 128, + "EquippedRes": { + "type": "resref", + "value": "nw_it_mring031" + } + }, + { + "__struct_id": 256, + "EquippedRes": { + "type": "resref", + "value": "magering" + } + }, + { + "__struct_id": 512, + "EquippedRes": { + "type": "resref", + "value": "item008" + } + }, + { + "__struct_id": 1024, + "EquippedRes": { + "type": "resref", + "value": "skavensscale" + } + }, + { + "__struct_id": 8192, + "EquippedRes": { + "type": "resref", + "value": "nw_wambo001" + } + }, + { + "__struct_id": 131072, + "EquippedRes": { + "type": "resref", + "value": "nw_it_creitem057" + } + } + ] + }, + "FactionID": { + "type": "word", + "value": 1 + }, + "FeatList": { + "type": "list", + "value": [ + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 944 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3112 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2898 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 5195 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 946 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 228 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 10 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2468 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2919 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 14 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 236 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4095 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4092 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 235 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2884 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 240 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 1089 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3415 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2285 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 29 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 32 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 237 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 238 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 239 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 35 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 169 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 303 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4235 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 256 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 45 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 46 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7914 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7937 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7935 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7936 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7949 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7946 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7945 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7908 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7923 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7944 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7927 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7929 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7930 + } + } + ] + }, + "FirstName": { + "id": 12501, + "type": "cexolocstring", + "value": { + "0": "Dark Elf Outcast" + } + }, + "fortbonus": { + "type": "short", + "value": 0 + }, + "Gender": { + "type": "byte", + "value": 0 + }, + "GoodEvil": { + "type": "byte", + "value": 0 + }, + "HitPoints": { + "type": "short", + "value": 191 + }, + "Int": { + "type": "byte", + "value": 18 + }, + "Interruptable": { + "type": "byte", + "value": 1 + }, + "IsImmortal": { + "type": "byte", + "value": 0 + }, + "IsPC": { + "type": "byte", + "value": 0 + }, + "ItemList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "InventoryRes": { + "type": "resref", + "value": "it_mneck037" + }, + "Repos_PosX": { + "type": "word", + "value": 0 + }, + "Repos_Posy": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 1, + "InventoryRes": { + "type": "resref", + "value": "drowevokerstaff" + }, + "Repos_PosX": { + "type": "word", + "value": 1 + }, + "Repos_Posy": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 2, + "InventoryRes": { + "type": "resref", + "value": "drowbattlerobe" + }, + "Repos_PosX": { + "type": "word", + "value": 2 + }, + "Repos_Posy": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 3, + "InventoryRes": { + "type": "resref", + "value": "magering" + }, + "Repos_PosX": { + "type": "word", + "value": 4 + }, + "Repos_Posy": { + "type": "word", + "value": 0 + } + } + ] + }, + "LastName": { + "type": "cexolocstring", + "value": {} + }, + "LawfulChaotic": { + "type": "byte", + "value": 100 + }, + "Lootable": { + "type": "byte", + "value": 0 + }, + "MaxHitPoints": { + "type": "short", + "value": 225 + }, + "NaturalAC": { + "type": "byte", + "value": 5 + }, + "NoPermDeath": { + "type": "byte", + "value": 0 + }, + "PaletteID": { + "type": "byte", + "value": 39 + }, + "PerceptionRange": { + "type": "byte", + "value": 9 + }, + "Phenotype": { + "type": "int", + "value": 0 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PortraitId": { + "type": "word", + "value": 92 + }, + "Race": { + "type": "byte", + "value": 1 + }, + "refbonus": { + "type": "short", + "value": 0 + }, + "ScriptAttacked": { + "type": "resref", + "value": "nw_c2_default5" + }, + "ScriptDamaged": { + "type": "resref", + "value": "nw_c2_default6" + }, + "ScriptDeath": { + "type": "resref", + "value": "nw_c2_default7" + }, + "ScriptDialogue": { + "type": "resref", + "value": "nw_c2_default4" + }, + "ScriptDisturbed": { + "type": "resref", + "value": "nw_c2_default8" + }, + "ScriptEndRound": { + "type": "resref", + "value": "nw_c2_default3" + }, + "ScriptHeartbeat": { + "type": "resref", + "value": "nw_c2_default1" + }, + "ScriptOnBlocked": { + "type": "resref", + "value": "nw_c2_defaulte" + }, + "ScriptOnNotice": { + "type": "resref", + "value": "nw_c2_default2" + }, + "ScriptRested": { + "type": "resref", + "value": "nw_c2_defaulta" + }, + "ScriptSpawn": { + "type": "resref", + "value": "nw_c2_fastbuff9" + }, + "ScriptSpellAt": { + "type": "resref", + "value": "nw_c2_defaultb" + }, + "ScriptUserDefine": { + "type": "resref", + "value": "nw_c2_defaultd" + }, + "SkillList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 20 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 17 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 20 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 6 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 6 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 20 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 6 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 4 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 16 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 6 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 20 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 6 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 12 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 20 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + } + ] + }, + "SoundSetFile": { + "type": "word", + "value": 194 + }, + "SpecAbilityList": { + "type": "list", + "value": [ + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 16325 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 16325 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 16325 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 16325 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 365 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 365 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 365 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 365 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + } + ] + }, + "StartingPackage": { + "type": "byte", + "value": 39 + }, + "Str": { + "type": "byte", + "value": 16 + }, + "Subrace": { + "type": "cexostring", + "value": "" + }, + "Tag": { + "type": "cexostring", + "value": "DarkElfOutcast" + }, + "Tail_New": { + "type": "dword", + "value": 0 + }, + "TemplateList": { + "type": "list", + "value": [] + }, + "TemplateResRef": { + "type": "resref", + "value": "darkelfoutcas002" + }, + "WalkRate": { + "type": "int", + "value": 7 + }, + "willbonus": { + "type": "short", + "value": 0 + }, + "Wings_New": { + "type": "dword", + "value": 0 + }, + "Wis": { + "type": "byte", + "value": 14 + } +} diff --git a/_module/utc/dragonguardians.utc.json b/_module/utc/dragonguardians.utc.json index 64705b4f..eb303bfd 100644 --- a/_module/utc/dragonguardians.utc.json +++ b/_module/utc/dragonguardians.utc.json @@ -156,7 +156,7 @@ "id": 9161, "type": "cexolocstring", "value": { - "0": "Dragon Guardians" + "0": "Dragon Guardian" } }, "fortbonus": { @@ -686,7 +686,7 @@ }, "Tag": { "type": "cexostring", - "value": "DragonGuardians" + "value": "DragonGuardian" }, "Tail_New": { "type": "dword", diff --git a/_module/utc/drizzles.utc.json b/_module/utc/drizzles.utc.json index 4b2148cd..f9517145 100644 --- a/_module/utc/drizzles.utc.json +++ b/_module/utc/drizzles.utc.json @@ -14,7 +14,7 @@ }, "ChallengeRating": { "type": "float", - "value": 32.0 + "value": 25.0 }, "ClassList": { "type": "list", @@ -46,7 +46,7 @@ }, "CRAdjust": { "type": "int", - "value": 0 + "value": -10 }, "CurrentHitPoints": { "type": "short", @@ -78,25 +78,39 @@ "Equip_ItemList": { "type": "list", "value": [ + { + "__struct_id": 2, + "EquippedRes": { + "type": "resref", + "value": "item005" + } + }, + { + "__struct_id": 512, + "EquippedRes": { + "type": "resref", + "value": "item008" + } + }, { "__struct_id": 16384, "EquippedRes": { "type": "resref", - "value": "nw_it_crewpb019" + "value": "x2_it_crewpsp004" } }, { "__struct_id": 32768, "EquippedRes": { "type": "resref", - "value": "nw_it_crewpb019" + "value": "x2_it_crewpsp004" } }, { "__struct_id": 65536, "EquippedRes": { "type": "resref", - "value": "water_slam" + "value": "water_spike" } }, { @@ -243,7 +257,7 @@ }, "NaturalAC": { "type": "byte", - "value": 25 + "value": 0 }, "NoPermDeath": { "type": "byte", @@ -279,55 +293,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "no_ai_atk" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "no_ai_dam" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "no_ai_dth" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "no_ai_cnv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "no_ai_dis" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "no_ai_cmb" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "no_ai_hrt" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "no_ai_blk" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "no_ai_per" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "no_ai_rst" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "no_spn_ftrsize" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "no_ai_spt" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "" }, "SkillList": { "type": "list", @@ -618,11 +632,86 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 281 + "value": 225 }, "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { "type": "byte", "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 225 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 225 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 437 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 19376 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 1956 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 }, "SpellFlags": { "type": "byte", @@ -659,6 +748,26 @@ "type": "resref", "value": "drizzles" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SCALE_SIZE" + }, + "Type": { + "type": "dword", + "value": 2 + }, + "Value": { + "type": "float", + "value": 0.6000000238418579 + } + } + ] + }, "WalkRate": { "type": "int", "value": 7 diff --git a/_module/utc/drowscout.utc.json b/_module/utc/drowscout.utc.json index 0a305740..c8a4af53 100644 --- a/_module/utc/drowscout.utc.json +++ b/_module/utc/drowscout.utc.json @@ -90,7 +90,7 @@ }, "ChallengeRating": { "type": "float", - "value": 15.0 + "value": 20.0 }, "ClassList": { "type": "list", @@ -138,7 +138,7 @@ }, "CRAdjust": { "type": "int", - "value": -12 + "value": -11 }, "CurrentHitPoints": { "type": "short", @@ -209,7 +209,7 @@ "__struct_id": 512, "EquippedRes": { "type": "resref", - "value": "nw_it_mneck013" + "value": "item008" } }, { diff --git a/_module/utc/drowscoutarche.utc.json b/_module/utc/drowscoutarche.utc.json index c8bec93c..636f9acd 100644 --- a/_module/utc/drowscoutarche.utc.json +++ b/_module/utc/drowscoutarche.utc.json @@ -90,7 +90,7 @@ }, "ChallengeRating": { "type": "float", - "value": 22.0 + "value": 16.0 }, "ClassList": { "type": "list", @@ -103,7 +103,69 @@ }, "ClassLevel": { "type": "short", - "value": 18 + "value": 4 + } + }, + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 1 + }, + "ClassLevel": { + "type": "short", + "value": 4 + }, + "KnownList1": { + "type": "list", + "value": [ + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 66 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + } + ] + }, + "KnownList2": { + "type": "list", + "value": [ + { + "__struct_id": 3, + "Spell": { + "type": "word", + "value": 157 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + }, + "SpellMetaMagic": { + "type": "byte", + "value": 0 + } + } + ] + } + }, + { + "__struct_id": 2, + "Class": { + "type": "int", + "value": 29 + }, + "ClassLevel": { + "type": "short", + "value": 10 } } ] @@ -138,11 +200,11 @@ }, "CRAdjust": { "type": "int", - "value": 0 + "value": -20 }, "CurrentHitPoints": { "type": "short", - "value": 164 + "value": 212 }, "DecayTime": { "type": "dword", @@ -161,7 +223,7 @@ }, "Dex": { "type": "byte", - "value": 22 + "value": 26 }, "Disarmable": { "type": "byte", @@ -177,13 +239,6 @@ "value": "drowchainmesh" } }, - { - "__struct_id": 4, - "EquippedRes": { - "type": "resref", - "value": "x0_it_mboots003" - } - }, { "__struct_id": 8, "EquippedRes": { @@ -216,7 +271,7 @@ "__struct_id": 512, "EquippedRes": { "type": "resref", - "value": "nw_it_mneck013" + "value": "item008" } }, { @@ -260,7 +315,7 @@ "__struct_id": 1, "Feat": { "type": "word", - "value": 2 + "value": 1 } }, { @@ -277,6 +332,27 @@ "value": 4 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 454 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 257 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 197 + } + }, { "__struct_id": 1, "Feat": { @@ -291,6 +367,27 @@ "value": 6 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3112 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2898 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 5195 + } + }, { "__struct_id": 1, "Feat": { @@ -312,6 +409,20 @@ "value": 13236 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 449 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2468 + } + }, { "__struct_id": 1, "Feat": { @@ -326,6 +437,13 @@ "value": 669 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2919 + } + }, { "__struct_id": 1, "Feat": { @@ -340,6 +458,13 @@ "value": 14 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 453 + } + }, { "__struct_id": 1, "Feat": { @@ -347,6 +472,27 @@ "value": 236 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4095 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4092 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 450 + } + }, { "__struct_id": 1, "Feat": { @@ -389,6 +535,13 @@ "value": 19 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2884 + } + }, { "__struct_id": 1, "Feat": { @@ -403,6 +556,20 @@ "value": 26 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 1089 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 3415 + } + }, { "__struct_id": 1, "Feat": { @@ -417,6 +584,13 @@ "value": 28 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 2285 + } + }, { "__struct_id": 1, "Feat": { @@ -424,6 +598,13 @@ "value": 30 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 452 + } + }, { "__struct_id": 1, "Feat": { @@ -452,6 +633,20 @@ "value": 239 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 4235 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 41 + } + }, { "__struct_id": 1, "Feat": { @@ -501,6 +696,230 @@ "value": 46 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7903 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7914 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7943 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7949 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7913 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7912 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7909 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7919 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7917 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7946 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7939 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7945 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7905 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7918 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7938 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7908 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7940 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7907 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7902 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7947 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7923 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7924 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7944 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7925 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7910 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7927 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7901 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7929 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7930 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7931 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7932 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 7906 + } + }, { "__struct_id": 1, "Feat": { @@ -534,11 +953,11 @@ }, "GoodEvil": { "type": "byte", - "value": 0 + "value": 50 }, "HitPoints": { "type": "short", - "value": 164 + "value": 212 }, "Int": { "type": "byte", @@ -593,7 +1012,7 @@ "__struct_id": 2, "InventoryRes": { "type": "resref", - "value": "skavensscale" + "value": "arrowofdarknes" }, "Repos_PosX": { "type": "word", @@ -608,11 +1027,11 @@ "__struct_id": 3, "InventoryRes": { "type": "resref", - "value": "x0_it_mboots003" + "value": "drowcompositebow" }, "Repos_PosX": { "type": "word", - "value": 6 + "value": 5 }, "Repos_Posy": { "type": "word", @@ -623,7 +1042,22 @@ "__struct_id": 4, "InventoryRes": { "type": "resref", - "value": "nw_it_mbracer012" + "value": "drowlongsword" + }, + "Repos_PosX": { + "type": "word", + "value": 7 + }, + "Repos_Posy": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 5, + "InventoryRes": { + "type": "resref", + "value": "nw_it_sparscr102" }, "Repos_PosX": { "type": "word", @@ -634,41 +1068,26 @@ "value": 0 } }, - { - "__struct_id": 5, - "InventoryRes": { - "type": "resref", - "value": "nw_it_mneck013" - }, - "Repos_PosX": { - "type": "word", - "value": 4 - }, - "Repos_Posy": { - "type": "word", - "value": 1 - } - }, { "__struct_id": 6, "InventoryRes": { "type": "resref", - "value": "nw_it_mring025" + "value": "nw_it_sparscr105" }, "Repos_PosX": { "type": "word", - "value": 5 + "value": 9 }, "Repos_Posy": { "type": "word", - "value": 1 + "value": 0 } }, { "__struct_id": 7, "InventoryRes": { "type": "resref", - "value": "nw_it_mring031" + "value": "nw_it_sparscr108" }, "Repos_PosX": { "type": "word", @@ -683,7 +1102,7 @@ "__struct_id": 8, "InventoryRes": { "type": "resref", - "value": "arrowofdarknes" + "value": "nw_it_sparscr109" }, "Repos_PosX": { "type": "word", @@ -693,36 +1112,6 @@ "type": "word", "value": 1 } - }, - { - "__struct_id": 9, - "InventoryRes": { - "type": "resref", - "value": "drowcompositebow" - }, - "Repos_PosX": { - "type": "word", - "value": 5 - }, - "Repos_Posy": { - "type": "word", - "value": 2 - } - }, - { - "__struct_id": 10, - "InventoryRes": { - "type": "resref", - "value": "drowlongsword" - }, - "Repos_PosX": { - "type": "word", - "value": 7 - }, - "Repos_Posy": { - "type": "word", - "value": 2 - } } ] }, @@ -732,7 +1121,7 @@ }, "LawfulChaotic": { "type": "byte", - "value": 100 + "value": 50 }, "Lootable": { "type": "byte", @@ -740,7 +1129,7 @@ }, "MaxHitPoints": { "type": "short", - "value": 200 + "value": 248 }, "NaturalAC": { "type": "byte", @@ -844,7 +1233,7 @@ "__struct_id": 0, "Rank": { "type": "byte", - "value": 6 + "value": 7 } }, { @@ -872,42 +1261,21 @@ "__struct_id": 0, "Rank": { "type": "byte", - "value": 6 + "value": 16 } }, { "__struct_id": 0, "Rank": { "type": "byte", - "value": 6 + "value": 16 } }, { "__struct_id": 0, "Rank": { "type": "byte", - "value": 0 - } - }, - { - "__struct_id": 0, - "Rank": { - "type": "byte", - "value": 6 - } - }, - { - "__struct_id": 0, - "Rank": { - "type": "byte", - "value": 0 - } - }, - { - "__struct_id": 0, - "Rank": { - "type": "byte", - "value": 8 + "value": 11 } }, { @@ -928,7 +1296,28 @@ "__struct_id": 0, "Rank": { "type": "byte", - "value": 0 + "value": 8 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 17 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 1 } }, { @@ -949,14 +1338,14 @@ "__struct_id": 0, "Rank": { "type": "byte", - "value": 0 + "value": 1 } }, { "__struct_id": 0, "Rank": { "type": "byte", - "value": 6 + "value": 16 } }, { @@ -970,7 +1359,7 @@ "__struct_id": 0, "Rank": { "type": "byte", - "value": 0 + "value": 1 } }, { diff --git a/_module/utc/earthnoble.utc.json b/_module/utc/earthnoble.utc.json index bdbb2b3a..8d899208 100644 --- a/_module/utc/earthnoble.utc.json +++ b/_module/utc/earthnoble.utc.json @@ -2,7 +2,7 @@ "__data_type": "UTC ", "Appearance_Type": { "type": "word", - "value": 205 + "value": 149 }, "BodyBag": { "type": "byte", @@ -14,7 +14,7 @@ }, "ChallengeRating": { "type": "float", - "value": 73.0 + "value": 27.0 }, "ClassList": { "type": "list", @@ -27,7 +27,7 @@ }, "ClassLevel": { "type": "short", - "value": 30 + "value": 12 } }, { @@ -38,7 +38,7 @@ }, "ClassLevel": { "type": "short", - "value": 30 + "value": 15 } } ] @@ -57,11 +57,11 @@ }, "CRAdjust": { "type": "int", - "value": -5 + "value": -20 }, "CurrentHitPoints": { "type": "short", - "value": 424 + "value": 480 }, "DecayTime": { "type": "dword", @@ -75,7 +75,7 @@ "id": 12353, "type": "cexolocstring", "value": { - "0": "Among the swiftest and most agile creatures in existence, Air Elementals are often summoned for use in great battles over vast stretches of open terrain." + "0": "" } }, "Dex": { @@ -93,28 +93,7 @@ "__struct_id": 4, "EquippedRes": { "type": "resref", - "value": "elementalearth" - } - }, - { - "__struct_id": 8, - "EquippedRes": { - "type": "resref", - "value": "earthgloves" - } - }, - { - "__struct_id": 128, - "EquippedRes": { - "type": "resref", - "value": "item004" - } - }, - { - "__struct_id": 512, - "EquippedRes": { - "type": "resref", - "value": "mobtrueseeing" + "value": "item007" } }, { @@ -142,7 +121,7 @@ "__struct_id": 131072, "EquippedRes": { "type": "resref", - "value": "earth_skin" + "value": "earth_skin001" } } ] @@ -336,27 +315,6 @@ "value": 289 } }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 44 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 45 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 46 - } - }, { "__struct_id": 1, "Feat": { @@ -394,7 +352,7 @@ }, "HitPoints": { "type": "short", - "value": 424 + "value": 480 }, "Int": { "type": "byte", @@ -555,11 +513,11 @@ }, "MaxHitPoints": { "type": "short", - "value": 1024 + "value": 750 }, "NaturalAC": { "type": "byte", - "value": 36 + "value": 0 }, "NoPermDeath": { "type": "byte", @@ -583,7 +541,7 @@ }, "PortraitId": { "type": "word", - "value": 231 + "value": 1270 }, "Race": { "type": "byte", @@ -591,59 +549,59 @@ }, "refbonus": { "type": "short", - "value": 0 + "value": 11 }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "no_ai_atk" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "no_ai_dam" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "no_ai_dth" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "no_ai_cnv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "no_ai_dis" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "no_ai_cmb" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "no_ai_hrt" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "no_ai_blk" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "no_ai_per" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "no_ai_rst" }, "ScriptSpawn": { "type": "resref", - "value": "earthnoble_spawn" + "value": "no_spn_ftrsize" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "no_ai_spt" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "" }, "SkillList": { "type": "list", @@ -1095,13 +1053,33 @@ "type": "resref", "value": "earthnoble" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SCALE_SIZE" + }, + "Type": { + "type": "dword", + "value": 2 + }, + "Value": { + "type": "float", + "value": 1.799999952316284 + } + } + ] + }, "WalkRate": { "type": "int", - "value": 3 + "value": 7 }, "willbonus": { "type": "short", - "value": 0 + "value": 14 }, "Wings_New": { "type": "dword", diff --git a/_module/utc/firenoble.utc.json b/_module/utc/firenoble.utc.json index 96788a6a..70c4ef0a 100644 --- a/_module/utc/firenoble.utc.json +++ b/_module/utc/firenoble.utc.json @@ -2,7 +2,7 @@ "__data_type": "UTC ", "Appearance_Type": { "type": "word", - "value": 428 + "value": 61 }, "BodyBag": { "type": "byte", @@ -14,7 +14,7 @@ }, "ChallengeRating": { "type": "float", - "value": 134.0 + "value": 26.0 }, "ClassList": { "type": "list", @@ -23,7 +23,7 @@ "__struct_id": 2, "Class": { "type": "int", - "value": 16 + "value": 0 }, "ClassLevel": { "type": "short", @@ -46,11 +46,11 @@ }, "CRAdjust": { "type": "int", - "value": -49 + "value": -8 }, "CurrentHitPoints": { "type": "short", - "value": 360 + "value": 375 }, "DecayTime": { "type": "dword", @@ -64,7 +64,7 @@ "id": 12353, "type": "cexolocstring", "value": { - "0": "Among the swiftest and most agile creatures in existence, Air Elementals are often summoned for use in great battles over vast stretches of open terrain." + "0": "" } }, "Dex": { @@ -78,81 +78,39 @@ "Equip_ItemList": { "type": "list", "value": [ - { - "__struct_id": 1, - "EquippedRes": { - "type": "resref", - "value": "firehelm" - } - }, - { - "__struct_id": 2, - "EquippedRes": { - "type": "resref", - "value": "elementalfirea" - } - }, - { - "__struct_id": 4, - "EquippedRes": { - "type": "resref", - "value": "elementalfireb" - } - }, - { - "__struct_id": 8, - "EquippedRes": { - "type": "resref", - "value": "firegloves" - } - }, - { - "__struct_id": 16, - "EquippedRes": { - "type": "resref", - "value": "axeoffire" - } - }, - { - "__struct_id": 128, - "EquippedRes": { - "type": "resref", - "value": "item004" - } - }, { "__struct_id": 512, "EquippedRes": { "type": "resref", - "value": "mobtrueseeing" + "value": "item008" } }, { "__struct_id": 16384, "EquippedRes": { "type": "resref", - "value": "nw_it_crewpb017" + "value": "x2_it_crewpb004" } }, { "__struct_id": 32768, "EquippedRes": { "type": "resref", - "value": "nw_it_crewpb017" + "value": "x2_it_crewpb004" } }, { "__struct_id": 65536, "EquippedRes": { "type": "resref", - "value": "mobslam8d8" + "value": "firenobleslam" } }, { "__struct_id": 131072, "EquippedRes": { "type": "resref", - "value": "fire_skin" + "value": "fire_skin001" } } ] @@ -168,21 +126,14 @@ "__struct_id": 1, "Feat": { "type": "word", - "value": 2 + "value": 194 } }, { "__struct_id": 1, "Feat": { "type": "word", - "value": 3 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 4 + "value": 328 } }, { @@ -192,6 +143,13 @@ "value": 5 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 6 + } + }, { "__struct_id": 1, "Feat": { @@ -206,6 +164,13 @@ "value": 228 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 9 + } + }, { "__struct_id": 1, "Feat": { @@ -213,6 +178,34 @@ "value": 10 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 584 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 656 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 694 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 391 + } + }, { "__struct_id": 1, "Feat": { @@ -224,14 +217,7 @@ "__struct_id": 1, "Feat": { "type": "word", - "value": 88 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 73 + "value": 16 } }, { @@ -245,7 +231,14 @@ "__struct_id": 1, "Feat": { "type": "word", - "value": 18 + "value": 17 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 23 } }, { @@ -255,6 +248,13 @@ "value": 24 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 28 + } + }, { "__struct_id": 1, "Feat": { @@ -266,7 +266,7 @@ "__struct_id": 1, "Feat": { "type": "word", - "value": 32 + "value": 4418 } }, { @@ -276,20 +276,6 @@ "value": 291 } }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 126 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 111 - } - }, { "__struct_id": 1, "Feat": { @@ -297,47 +283,12 @@ "value": 289 } }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 44 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 45 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 46 - } - }, { "__struct_id": 1, "Feat": { "type": "word", "value": 290 } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 164 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 149 - } } ] }, @@ -362,7 +313,7 @@ }, "HitPoints": { "type": "short", - "value": 360 + "value": 375 }, "Int": { "type": "byte", @@ -402,7 +353,7 @@ "__struct_id": 1, "InventoryRes": { "type": "resref", - "value": "axeoffire" + "value": "elementalfireb" }, "Repos_PosX": { "type": "word", @@ -417,7 +368,7 @@ "__struct_id": 2, "InventoryRes": { "type": "resref", - "value": "elementalfireb" + "value": "firegloves" }, "Repos_PosX": { "type": "word", @@ -432,7 +383,7 @@ "__struct_id": 3, "InventoryRes": { "type": "resref", - "value": "firegloves" + "value": "elementalfirea" }, "Repos_PosX": { "type": "word", @@ -447,7 +398,7 @@ "__struct_id": 4, "InventoryRes": { "type": "resref", - "value": "fireshield" + "value": "firehelm" }, "Repos_PosX": { "type": "word", @@ -460,36 +411,6 @@ }, { "__struct_id": 5, - "InventoryRes": { - "type": "resref", - "value": "elementalfirea" - }, - "Repos_PosX": { - "type": "word", - "value": 5 - }, - "Repos_Posy": { - "type": "word", - "value": 1 - } - }, - { - "__struct_id": 6, - "InventoryRes": { - "type": "resref", - "value": "firehelm" - }, - "Repos_PosX": { - "type": "word", - "value": 3 - }, - "Repos_Posy": { - "type": "word", - "value": 2 - } - }, - { - "__struct_id": 7, "Dropable": { "type": "byte", "value": 1 @@ -506,6 +427,36 @@ "type": "word", "value": 0 } + }, + { + "__struct_id": 6, + "InventoryRes": { + "type": "resref", + "value": "axeoffire" + }, + "Repos_PosX": { + "type": "word", + "value": 3 + }, + "Repos_Posy": { + "type": "word", + "value": 1 + } + }, + { + "__struct_id": 7, + "InventoryRes": { + "type": "resref", + "value": "fireshield" + }, + "Repos_PosX": { + "type": "word", + "value": 0 + }, + "Repos_Posy": { + "type": "word", + "value": 2 + } } ] }, @@ -523,11 +474,11 @@ }, "MaxHitPoints": { "type": "short", - "value": 485 + "value": 500 }, "NaturalAC": { "type": "byte", - "value": 17 + "value": 5 }, "NoPermDeath": { "type": "byte", @@ -551,7 +502,7 @@ }, "PortraitId": { "type": "word", - "value": 722 + "value": 209 }, "Race": { "type": "byte", @@ -563,55 +514,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "no_ai_atk" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "no_ai_dam" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "no_ai_dth" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "no_ai_cnv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "no_ai_dis" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "no_ai_cmb" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "no_ai_hrt" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "no_ai_blk" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "no_ai_per" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "no_ai_rst" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "no_spn_ftrfire" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "no_ai_spt" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "" }, "SkillList": { "type": "list", @@ -893,7 +844,7 @@ }, "SoundSetFile": { "type": "word", - "value": 28 + "value": 34 }, "SpecAbilityList": { "type": "list", @@ -902,7 +853,7 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 239 + "value": 199 }, "SpellCasterLevel": { "type": "byte", @@ -917,11 +868,11 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 239 + "value": 18027 }, "SpellCasterLevel": { "type": "byte", - "value": 0 + "value": 15 }, "SpellFlags": { "type": "byte", @@ -973,6 +924,26 @@ "type": "resref", "value": "firenoble" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SCALE_SIZE" + }, + "Type": { + "type": "dword", + "value": 2 + }, + "Value": { + "type": "float", + "value": 1.899999976158142 + } + } + ] + }, "WalkRate": { "type": "int", "value": 7 diff --git a/_module/utc/flamez.utc.json b/_module/utc/flamez.utc.json index 91e30c28..a62b8bb1 100644 --- a/_module/utc/flamez.utc.json +++ b/_module/utc/flamez.utc.json @@ -2,7 +2,7 @@ "__data_type": "UTC ", "Appearance_Type": { "type": "word", - "value": 61 + "value": 60 }, "BodyBag": { "type": "byte", @@ -14,7 +14,7 @@ }, "ChallengeRating": { "type": "float", - "value": 44.0 + "value": 16.0 }, "ClassList": { "type": "list", @@ -23,11 +23,11 @@ "__struct_id": 2, "Class": { "type": "int", - "value": 16 + "value": 4 }, "ClassLevel": { "type": "short", - "value": 12 + "value": 17 } } ] @@ -46,15 +46,15 @@ }, "CRAdjust": { "type": "int", - "value": -8 + "value": 0 }, "CurrentHitPoints": { "type": "short", - "value": 135 + "value": 162 }, "DecayTime": { "type": "dword", - "value": 0 + "value": 5000 }, "Deity": { "type": "cexostring", @@ -64,12 +64,12 @@ "id": 12353, "type": "cexolocstring", "value": { - "0": "Among the swiftest and most agile creatures in existence, Air Elementals are often summoned for use in great battles over vast stretches of open terrain." + "0": "" } }, "Dex": { "type": "byte", - "value": 29 + "value": 28 }, "Disarmable": { "type": "byte", @@ -79,24 +79,10 @@ "type": "list", "value": [ { - "__struct_id": 8, + "__struct_id": 2, "EquippedRes": { "type": "resref", - "value": "mobflameglove" - } - }, - { - "__struct_id": 128, - "EquippedRes": { - "type": "resref", - "value": "item004" - } - }, - { - "__struct_id": 512, - "EquippedRes": { - "type": "resref", - "value": "mobtrueseeing" + "value": "item005" } }, { @@ -229,7 +215,7 @@ }, "HitPoints": { "type": "short", - "value": 135 + "value": 162 }, "Int": { "type": "byte", @@ -281,11 +267,11 @@ }, "MaxHitPoints": { "type": "short", - "value": 183 + "value": 230 }, "NaturalAC": { "type": "byte", - "value": 11 + "value": 0 }, "NoPermDeath": { "type": "byte", @@ -309,7 +295,7 @@ }, "PortraitId": { "type": "word", - "value": 209 + "value": 208 }, "Race": { "type": "byte", @@ -321,55 +307,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "no_ai_atk" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "no_ai_dam" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "no_ai_dth" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "no_ai_cnv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "no_ai_dis" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "no_ai_cmb" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "no_ai_hrt" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "no_ai_blk" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "no_ai_per" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "no_ai_rst" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "no_spn_ftrsize" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "no_ai_spt" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "" }, "SkillList": { "type": "list", @@ -675,7 +661,7 @@ }, "StartingPackage": { "type": "byte", - "value": 0 + "value": 4 }, "Str": { "type": "byte", @@ -701,6 +687,26 @@ "type": "resref", "value": "flamez" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SCALE_SIZE" + }, + "Type": { + "type": "dword", + "value": 2 + }, + "Value": { + "type": "float", + "value": 0.6000000238418579 + } + } + ] + }, "WalkRate": { "type": "int", "value": 7 diff --git a/_module/utc/halfdragonsor001.utc.json b/_module/utc/halfdragonsor001.utc.json index 6b89d94e..6495f3e2 100644 --- a/_module/utc/halfdragonsor001.utc.json +++ b/_module/utc/halfdragonsor001.utc.json @@ -1220,55 +1220,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "no_ai_atk" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "no_ai_dam" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "no_ai_dth" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "no_ai_cnv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "no_ai_dis" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "no_ai_cmb" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "no_ai_hrt" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "no_ai_blk" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "no_ai_per" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "no_ai_rst" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "no_spn_wiz" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "no_ai_spt" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "" }, "SkillList": { "type": "list", diff --git a/_module/utc/halfdragonsorc.utc.json b/_module/utc/halfdragonsorc.utc.json index 541c5fd5..f7f78cb7 100644 --- a/_module/utc/halfdragonsorc.utc.json +++ b/_module/utc/halfdragonsorc.utc.json @@ -1101,55 +1101,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "no_ai_atk" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "no_ai_dam" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "no_ai_dth" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "no_ai_cnv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "no_ai_dis" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "no_ai_cmb" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "no_ai_hrt" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "no_ai_blk" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "no_ai_per" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "no_ai_rst" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "no_spn_wiz" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "no_ai_spt" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "" }, "SkillList": { "type": "list", diff --git a/_module/utc/portthief.utc.json b/_module/utc/portthief.utc.json index c2617637..9c83f503 100644 --- a/_module/utc/portthief.utc.json +++ b/_module/utc/portthief.utc.json @@ -50,7 +50,7 @@ }, "BodyPart_Neck": { "type": "byte", - "value": 0 + "value": 4 }, "BodyPart_Pelvis": { "type": "byte", @@ -90,7 +90,7 @@ }, "ChallengeRating": { "type": "float", - "value": 39.0 + "value": 20.0 }, "ClassList": { "type": "list", @@ -149,7 +149,7 @@ }, "CRAdjust": { "type": "int", - "value": -9 + "value": -18 }, "CurrentHitPoints": { "type": "short", @@ -977,7 +977,7 @@ }, "xBodyPart_Neck": { "type": "word", - "value": 0 + "value": 4 }, "xBodyPart_Pelvis": { "type": "word", diff --git a/_module/utc/portthief001.utc.json b/_module/utc/portthief001.utc.json index 5012dc9c..47c916ce 100644 --- a/_module/utc/portthief001.utc.json +++ b/_module/utc/portthief001.utc.json @@ -50,7 +50,7 @@ }, "BodyPart_Neck": { "type": "byte", - "value": 0 + "value": 4 }, "BodyPart_Pelvis": { "type": "byte", @@ -90,7 +90,7 @@ }, "ChallengeRating": { "type": "float", - "value": 39.0 + "value": 20.0 }, "ClassList": { "type": "list", @@ -149,7 +149,7 @@ }, "CRAdjust": { "type": "int", - "value": -14 + "value": -23 }, "CurrentHitPoints": { "type": "short", @@ -965,7 +965,7 @@ }, "xBodyPart_Neck": { "type": "word", - "value": 0 + "value": 4 }, "xBodyPart_Pelvis": { "type": "word", diff --git a/_module/utc/portthief002.utc.json b/_module/utc/portthief002.utc.json index 9793ae77..29bff40d 100644 --- a/_module/utc/portthief002.utc.json +++ b/_module/utc/portthief002.utc.json @@ -50,7 +50,7 @@ }, "BodyPart_Neck": { "type": "byte", - "value": 0 + "value": 4 }, "BodyPart_Pelvis": { "type": "byte", @@ -90,7 +90,7 @@ }, "ChallengeRating": { "type": "float", - "value": 43.0 + "value": 21.0 }, "ClassList": { "type": "list", @@ -149,7 +149,7 @@ }, "CRAdjust": { "type": "int", - "value": -12 + "value": -23 }, "CurrentHitPoints": { "type": "short", @@ -1025,7 +1025,7 @@ }, "xBodyPart_Neck": { "type": "word", - "value": 0 + "value": 4 }, "xBodyPart_Pelvis": { "type": "word", diff --git a/_module/utc/portthief003.utc.json b/_module/utc/portthief003.utc.json index 200a7725..6ec7d1f2 100644 --- a/_module/utc/portthief003.utc.json +++ b/_module/utc/portthief003.utc.json @@ -50,7 +50,7 @@ }, "BodyPart_Neck": { "type": "byte", - "value": 0 + "value": 4 }, "BodyPart_Pelvis": { "type": "byte", @@ -90,7 +90,7 @@ }, "ChallengeRating": { "type": "float", - "value": 42.0 + "value": 20.0 }, "ClassList": { "type": "list", @@ -149,7 +149,7 @@ }, "CRAdjust": { "type": "int", - "value": -11 + "value": -23 }, "CurrentHitPoints": { "type": "short", @@ -532,10 +532,6 @@ }, { "__struct_id": 4, - "Dropable": { - "type": "byte", - "value": 1 - }, "InventoryRes": { "type": "resref", "value": "nw_it_picks003" @@ -551,10 +547,6 @@ }, { "__struct_id": 5, - "Dropable": { - "type": "byte", - "value": 1 - }, "InventoryRes": { "type": "resref", "value": "nw_it_trap038" @@ -1048,7 +1040,7 @@ }, "xBodyPart_Neck": { "type": "word", - "value": 0 + "value": 4 }, "xBodyPart_Pelvis": { "type": "word", diff --git a/_module/utc/rockites.utc.json b/_module/utc/rockites.utc.json index 9a5c2b06..54b2a3b0 100644 --- a/_module/utc/rockites.utc.json +++ b/_module/utc/rockites.utc.json @@ -2,7 +2,7 @@ "__data_type": "UTC ", "Appearance_Type": { "type": "word", - "value": 56 + "value": 92 }, "BodyBag": { "type": "byte", @@ -14,7 +14,7 @@ }, "ChallengeRating": { "type": "float", - "value": 23.0 + "value": 14.0 }, "ClassList": { "type": "list", @@ -38,7 +38,7 @@ }, "Con": { "type": "byte", - "value": 25 + "value": 24 }, "Conversation": { "type": "resref", @@ -46,11 +46,11 @@ }, "CRAdjust": { "type": "int", - "value": 2 + "value": -8 }, "CurrentHitPoints": { "type": "short", - "value": 231 + "value": 230 }, "DecayTime": { "type": "dword", @@ -64,7 +64,7 @@ "id": 12353, "type": "cexolocstring", "value": { - "0": "Among the swiftest and most agile creatures in existence, Air Elementals are often summoned for use in great battles over vast stretches of open terrain." + "0": "" } }, "Dex": { @@ -78,18 +78,11 @@ "Equip_ItemList": { "type": "list", "value": [ - { - "__struct_id": 128, - "EquippedRes": { - "type": "resref", - "value": "item004" - } - }, { "__struct_id": 512, "EquippedRes": { "type": "resref", - "value": "mobtrueseeing" + "value": "item008" } }, { @@ -143,34 +136,6 @@ "value": 228 } }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 549 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 535 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 565 - } - }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 555 - } - }, { "__struct_id": 1, "Feat": { @@ -250,7 +215,7 @@ }, "HitPoints": { "type": "short", - "value": 231 + "value": 230 }, "Int": { "type": "byte", @@ -302,11 +267,11 @@ }, "MaxHitPoints": { "type": "short", - "value": 351 + "value": 350 }, "NaturalAC": { "type": "byte", - "value": 23 + "value": 0 }, "NoPermDeath": { "type": "byte", @@ -330,7 +295,7 @@ }, "PortraitId": { "type": "word", - "value": 202 + "value": 230 }, "Race": { "type": "byte", @@ -342,55 +307,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "no_ai_atk" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "no_ai_dam" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "no_ai_dth" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "no_ai_cnv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "no_ai_dis" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "no_ai_cmb" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "no_ai_hrt" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "no_ai_blk" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "no_ai_per" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "no_ai_rst" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "no_spn_ftrsize" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "no_ai_spt" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "" }, "SkillList": { "type": "list", @@ -917,9 +882,29 @@ "type": "resref", "value": "rockites" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SCALE_SIZE" + }, + "Type": { + "type": "dword", + "value": 2 + }, + "Value": { + "type": "float", + "value": 0.6000000238418579 + } + } + ] + }, "WalkRate": { "type": "int", - "value": 3 + "value": 7 }, "willbonus": { "type": "short", diff --git a/_module/utc/vampire004.utc.json b/_module/utc/vampire004.utc.json index 553a4c6b..08e08f3a 100644 --- a/_module/utc/vampire004.utc.json +++ b/_module/utc/vampire004.utc.json @@ -586,36 +586,6 @@ "type": "byte", "value": 0 } - }, - { - "__struct_id": 3, - "Spell": { - "type": "word", - "value": 123 - }, - "SpellFlags": { - "type": "byte", - "value": 1 - }, - "SpellMetaMagic": { - "type": "byte", - "value": 0 - } - }, - { - "__struct_id": 3, - "Spell": { - "type": "word", - "value": 123 - }, - "SpellFlags": { - "type": "byte", - "value": 1 - }, - "SpellMetaMagic": { - "type": "byte", - "value": 0 - } } ] }, @@ -687,21 +657,6 @@ "MemorizedList9": { "type": "list", "value": [ - { - "__struct_id": 3, - "Spell": { - "type": "word", - "value": 533 - }, - "SpellFlags": { - "type": "byte", - "value": 1 - }, - "SpellMetaMagic": { - "type": "byte", - "value": 0 - } - }, { "__struct_id": 3, "Spell": { @@ -732,36 +687,6 @@ "value": 0 } }, - { - "__struct_id": 3, - "Spell": { - "type": "word", - "value": 178 - }, - "SpellFlags": { - "type": "byte", - "value": 1 - }, - "SpellMetaMagic": { - "type": "byte", - "value": 0 - } - }, - { - "__struct_id": 3, - "Spell": { - "type": "word", - "value": 185 - }, - "SpellFlags": { - "type": "byte", - "value": 1 - }, - "SpellMetaMagic": { - "type": "byte", - "value": 0 - } - }, { "__struct_id": 3, "Spell": { @@ -1126,55 +1051,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "no_ai_atk" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "no_ai_dam" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "no_ai_dth" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "no_ai_cnv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "no_ai_dis" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "no_ai_cmb" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "no_ai_hrt" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "no_ai_blk" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "no_ai_per" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "no_ai_rst" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "no_spn_wiz" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "no_ai_spt" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "" }, "SkillList": { "type": "list", diff --git a/_module/utc/waterguardian.utc.json b/_module/utc/waterguardian.utc.json index 0d3f897d..078d65c7 100644 --- a/_module/utc/waterguardian.utc.json +++ b/_module/utc/waterguardian.utc.json @@ -2,7 +2,7 @@ "__data_type": "UTC ", "Appearance_Type": { "type": "word", - "value": 69 + "value": 68 }, "BodyBag": { "type": "byte", @@ -14,7 +14,7 @@ }, "ChallengeRating": { "type": "float", - "value": 31.0 + "value": 21.0 }, "ClassList": { "type": "list", @@ -46,7 +46,7 @@ }, "CRAdjust": { "type": "int", - "value": 0 + "value": -7 }, "CurrentHitPoints": { "type": "short", @@ -54,7 +54,7 @@ }, "DecayTime": { "type": "dword", - "value": 0 + "value": 5000 }, "Deity": { "type": "cexostring", @@ -79,24 +79,17 @@ "type": "list", "value": [ { - "__struct_id": 16, + "__struct_id": 2, "EquippedRes": { "type": "resref", - "value": "hellfire" + "value": "item005" } }, { "__struct_id": 16384, "EquippedRes": { "type": "resref", - "value": "nw_it_crewpb019" - } - }, - { - "__struct_id": 32768, - "EquippedRes": { - "type": "resref", - "value": "nw_it_crewpb019" + "value": "x2_it_crewpb003" } }, { @@ -223,7 +216,7 @@ }, "NaturalAC": { "type": "byte", - "value": 25 + "value": 8 }, "NoPermDeath": { "type": "byte", @@ -247,7 +240,7 @@ }, "PortraitId": { "type": "word", - "value": 312 + "value": 311 }, "Race": { "type": "byte", @@ -259,55 +252,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "no_ai_atk" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "no_ai_dam" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "no_ai_dth" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "no_ai_cnv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "no_ai_dis" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "no_ai_cmb" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "no_ai_hrt" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "no_ai_blk" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "no_ai_per" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "no_ai_rst" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "no_spn_ftrsize" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "no_ai_spt" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "" }, "SkillList": { "type": "list", @@ -598,11 +591,11 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 281 + "value": 437 }, "SpellCasterLevel": { "type": "byte", - "value": 1 + "value": 15 }, "SpellFlags": { "type": "byte", @@ -613,11 +606,11 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 281 + "value": 19376 }, "SpellCasterLevel": { "type": "byte", - "value": 1 + "value": 0 }, "SpellFlags": { "type": "byte", @@ -628,11 +621,41 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 281 + "value": 19376 }, "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { "type": "byte", "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 19376 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 1956 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 }, "SpellFlags": { "type": "byte", @@ -647,7 +670,7 @@ }, "Str": { "type": "byte", - "value": 25 + "value": 26 }, "Subrace": { "type": "cexostring", @@ -669,6 +692,26 @@ "type": "resref", "value": "waterguardian" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SCALE_SIZE" + }, + "Type": { + "type": "dword", + "value": 2 + }, + "Value": { + "type": "float", + "value": 1.399999976158142 + } + } + ] + }, "WalkRate": { "type": "int", "value": 7 diff --git a/_module/utc/waternoble.utc.json b/_module/utc/waternoble.utc.json index a5e458a5..13ff14ed 100644 --- a/_module/utc/waternoble.utc.json +++ b/_module/utc/waternoble.utc.json @@ -2,7 +2,7 @@ "__data_type": "UTC ", "Appearance_Type": { "type": "word", - "value": 47 + "value": 68 }, "BodyBag": { "type": "byte", @@ -14,7 +14,7 @@ }, "ChallengeRating": { "type": "float", - "value": 69.0 + "value": 31.0 }, "ClassList": { "type": "list", @@ -27,18 +27,7 @@ }, "ClassLevel": { "type": "short", - "value": 40 - } - }, - { - "__struct_id": 2, - "Class": { - "type": "int", - "value": 27 - }, - "ClassLevel": { - "type": "short", - "value": 20 + "value": 30 } } ] @@ -57,11 +46,11 @@ }, "CRAdjust": { "type": "int", - "value": 1 + "value": -15 }, "CurrentHitPoints": { "type": "short", - "value": 555 + "value": 800 }, "DecayTime": { "type": "dword", @@ -80,7 +69,7 @@ }, "Dex": { "type": "byte", - "value": 25 + "value": 24 }, "Disarmable": { "type": "byte", @@ -89,6 +78,13 @@ "Equip_ItemList": { "type": "list", "value": [ + { + "__struct_id": 2, + "EquippedRes": { + "type": "resref", + "value": "item005" + } + }, { "__struct_id": 128, "EquippedRes": { @@ -114,28 +110,28 @@ "__struct_id": 16384, "EquippedRes": { "type": "resref", - "value": "wolfteethmob_cla" + "value": "waternobleslam" } }, { "__struct_id": 32768, "EquippedRes": { "type": "resref", - "value": "kylith_claw" + "value": "waternobleclaw" } }, { "__struct_id": 65536, "EquippedRes": { "type": "resref", - "value": "icewraith_claw" + "value": "water_spike2" } }, { "__struct_id": 131072, "EquippedRes": { "type": "resref", - "value": "mobwater_skin" + "value": "mobwater_skin001" } } ] @@ -147,13 +143,6 @@ "FeatList": { "type": "list", "value": [ - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 1 - } - }, { "__struct_id": 1, "Feat": { @@ -165,7 +154,14 @@ "__struct_id": 1, "Feat": { "type": "word", - "value": 6 + "value": 5 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 409 } }, { @@ -186,7 +182,21 @@ "__struct_id": 1, "Feat": { "type": "word", - "value": 980 + "value": 8 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 10 + } + }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 297 } }, { @@ -196,6 +206,13 @@ "value": 206 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 292 + } + }, { "__struct_id": 1, "Feat": { @@ -207,42 +224,42 @@ "__struct_id": 1, "Feat": { "type": "word", - "value": 28 + "value": 18 } }, { "__struct_id": 1, "Feat": { "type": "word", - "value": 434 + "value": 21 } }, { "__struct_id": 1, "Feat": { "type": "word", - "value": 436 + "value": 23 } }, { "__struct_id": 1, "Feat": { "type": "word", - "value": 259 + "value": 26 } }, { "__struct_id": 1, "Feat": { "type": "word", - "value": 435 + "value": 207 } }, { "__struct_id": 1, "Feat": { "type": "word", - "value": 41 + "value": 216 } }, { @@ -252,6 +269,13 @@ "value": 252 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 291 + } + }, { "__struct_id": 1, "Feat": { @@ -263,21 +287,21 @@ "__struct_id": 1, "Feat": { "type": "word", - "value": 44 + "value": 290 } }, { "__struct_id": 1, "Feat": { "type": "word", - "value": 45 + "value": 24423 } }, { "__struct_id": 1, "Feat": { "type": "word", - "value": 46 + "value": 211 } } ] @@ -295,7 +319,7 @@ }, "Gender": { "type": "byte", - "value": 4 + "value": 1 }, "GoodEvil": { "type": "byte", @@ -303,7 +327,7 @@ }, "HitPoints": { "type": "short", - "value": 555 + "value": 800 }, "Int": { "type": "byte", @@ -362,7 +386,7 @@ "__struct_id": 2, "InventoryRes": { "type": "resref", - "value": "axeofwater" + "value": "elementalwater" }, "Repos_PosX": { "type": "word", @@ -377,7 +401,7 @@ "__struct_id": 3, "InventoryRes": { "type": "resref", - "value": "elementalwater" + "value": "watergloves" }, "Repos_PosX": { "type": "word", @@ -392,7 +416,7 @@ "__struct_id": 4, "InventoryRes": { "type": "resref", - "value": "watergloves" + "value": "waterhelm" }, "Repos_PosX": { "type": "word", @@ -407,11 +431,11 @@ "__struct_id": 5, "InventoryRes": { "type": "resref", - "value": "waterhelm" + "value": "watershield" }, "Repos_PosX": { "type": "word", - "value": 7 + "value": 5 }, "Repos_Posy": { "type": "word", @@ -422,11 +446,11 @@ "__struct_id": 6, "InventoryRes": { "type": "resref", - "value": "watershield" + "value": "axeofwater" }, "Repos_PosX": { "type": "word", - "value": 5 + "value": 3 }, "Repos_Posy": { "type": "word", @@ -449,11 +473,11 @@ }, "MaxHitPoints": { "type": "short", - "value": 1155 + "value": 1100 }, "NaturalAC": { "type": "byte", - "value": 25 + "value": 8 }, "NoPermDeath": { "type": "byte", @@ -477,7 +501,7 @@ }, "PortraitId": { "type": "word", - "value": 192 + "value": 311 }, "Race": { "type": "byte", @@ -489,55 +513,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "no_ai_atk" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "no_ai_dam" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "no_ai_dth" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "no_ai_cnv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "no_ai_dis" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "no_ai_cmb" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "no_ai_hrt" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "no_ai_blk" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "no_ai_per" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "no_ai_rst" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "no_spn_ftrwater" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "no_ai_spt" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "" }, "SkillList": { "type": "list", @@ -553,7 +577,7 @@ "__struct_id": 0, "Rank": { "type": "byte", - "value": 12 + "value": 24 } }, { @@ -567,56 +591,7 @@ "__struct_id": 0, "Rank": { "type": "byte", - "value": 22 - } - }, - { - "__struct_id": 0, - "Rank": { - "type": "byte", - "value": 0 - } - }, - { - "__struct_id": 0, - "Rank": { - "type": "byte", - "value": 38 - } - }, - { - "__struct_id": 0, - "Rank": { - "type": "byte", - "value": 56 - } - }, - { - "__struct_id": 0, - "Rank": { - "type": "byte", - "value": 0 - } - }, - { - "__struct_id": 0, - "Rank": { - "type": "byte", - "value": 38 - } - }, - { - "__struct_id": 0, - "Rank": { - "type": "byte", - "value": 0 - } - }, - { - "__struct_id": 0, - "Rank": { - "type": "byte", - "value": 44 + "value": 24 } }, { @@ -640,13 +615,6 @@ "value": 0 } }, - { - "__struct_id": 0, - "Rank": { - "type": "byte", - "value": 50 - } - }, { "__struct_id": 0, "Rank": { @@ -665,7 +633,7 @@ "__struct_id": 0, "Rank": { "type": "byte", - "value": 37 + "value": 0 } }, { @@ -693,7 +661,63 @@ "__struct_id": 0, "Rank": { "type": "byte", - "value": 31 + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 + } + }, + { + "__struct_id": 0, + "Rank": { + "type": "byte", + "value": 0 } }, { @@ -819,7 +843,7 @@ }, "SoundSetFile": { "type": "word", - "value": 207 + "value": 35 }, "SpecAbilityList": { "type": "list", @@ -828,7 +852,7 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 412 + "value": 195 }, "SpellCasterLevel": { "type": "byte", @@ -854,6 +878,21 @@ "value": 1 } }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 120 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 15 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, { "__struct_id": 4, "Spell": { @@ -869,6 +908,21 @@ "value": 1 } }, + { + "__struct_id": 4, + "Spell": { + "type": "word", + "value": 19377 + }, + "SpellCasterLevel": { + "type": "byte", + "value": 0 + }, + "SpellFlags": { + "type": "byte", + "value": 1 + } + }, { "__struct_id": 4, "Spell": { @@ -888,11 +942,11 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 281 + "value": 1956 }, "SpellCasterLevel": { "type": "byte", - "value": 1 + "value": 0 }, "SpellFlags": { "type": "byte", @@ -903,26 +957,11 @@ "__struct_id": 4, "Spell": { "type": "word", - "value": 281 + "value": 1956 }, "SpellCasterLevel": { "type": "byte", - "value": 1 - }, - "SpellFlags": { - "type": "byte", - "value": 1 - } - }, - { - "__struct_id": 4, - "Spell": { - "type": "word", - "value": 281 - }, - "SpellCasterLevel": { - "type": "byte", - "value": 1 + "value": 0 }, "SpellFlags": { "type": "byte", @@ -937,7 +976,7 @@ }, "Str": { "type": "byte", - "value": 44 + "value": 40 }, "Subrace": { "type": "cexostring", @@ -959,6 +998,26 @@ "type": "resref", "value": "waternoble" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SCALE_SIZE" + }, + "Type": { + "type": "dword", + "value": 2 + }, + "Value": { + "type": "float", + "value": 1.799999952316284 + } + } + ] + }, "WalkRate": { "type": "int", "value": 7 @@ -973,6 +1032,6 @@ }, "Wis": { "type": "byte", - "value": 18 + "value": 28 } } diff --git a/_module/utc/waterspirit.utc.json b/_module/utc/waterspirit.utc.json index ecf524d4..afdff481 100644 --- a/_module/utc/waterspirit.utc.json +++ b/_module/utc/waterspirit.utc.json @@ -96,7 +96,7 @@ }, "FactionID": { "type": "word", - "value": 1 + "value": 21 }, "FeatList": { "type": "list", @@ -245,55 +245,55 @@ }, "ScriptAttacked": { "type": "resref", - "value": "nw_c2_default5" + "value": "no_ai_atk" }, "ScriptDamaged": { "type": "resref", - "value": "nw_c2_default6" + "value": "no_ai_dam" }, "ScriptDeath": { "type": "resref", - "value": "nw_c2_default7" + "value": "no_ai_dth" }, "ScriptDialogue": { "type": "resref", - "value": "nw_c2_default4" + "value": "no_ai_cnv" }, "ScriptDisturbed": { "type": "resref", - "value": "nw_c2_default8" + "value": "no_ai_dis" }, "ScriptEndRound": { "type": "resref", - "value": "nw_c2_default3" + "value": "no_ai_cmb" }, "ScriptHeartbeat": { "type": "resref", - "value": "nw_c2_default1" + "value": "no_ai_hrt" }, "ScriptOnBlocked": { "type": "resref", - "value": "nw_c2_defaulte" + "value": "no_ai_blk" }, "ScriptOnNotice": { "type": "resref", - "value": "nw_c2_default2" + "value": "no_ai_per" }, "ScriptRested": { "type": "resref", - "value": "nw_c2_defaulta" + "value": "no_ai_rst" }, "ScriptSpawn": { "type": "resref", - "value": "nw_c2_default9" + "value": "no_spn_ftrsize" }, "ScriptSpellAt": { "type": "resref", - "value": "nw_c2_defaultb" + "value": "no_ai_spt" }, "ScriptUserDefine": { "type": "resref", - "value": "nw_c2_defaultd" + "value": "" }, "SkillList": { "type": "list", @@ -625,6 +625,26 @@ "type": "resref", "value": "waterspirit" }, + "VarTable": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "Name": { + "type": "cexostring", + "value": "SCALE_SIZE" + }, + "Type": { + "type": "dword", + "value": 2 + }, + "Value": { + "type": "float", + "value": 0.6000000238418579 + } + } + ] + }, "WalkRate": { "type": "int", "value": 7 diff --git a/_module/utc/yinyang.utc.json b/_module/utc/yinyang.utc.json index dd6f8e1c..7a6ce93f 100644 --- a/_module/utc/yinyang.utc.json +++ b/_module/utc/yinyang.utc.json @@ -368,6 +368,13 @@ "value": 494 } }, + { + "__struct_id": 1, + "Feat": { + "type": "word", + "value": 987 + } + }, { "__struct_id": 1, "Feat": { @@ -382,13 +389,6 @@ "value": 584 } }, - { - "__struct_id": 1, - "Feat": { - "type": "word", - "value": 987 - } - }, { "__struct_id": 1, "Feat": { diff --git a/_module/ute/bebilith001.ute.json b/_module/ute/bebilith001.ute.json index a8437a00..4d9c478d 100644 --- a/_module/ute/bebilith001.ute.json +++ b/_module/ute/bebilith001.ute.json @@ -19,7 +19,7 @@ }, "CR": { "type": "float", - "value": 7.0 + "value": 12.0 }, "ResRef": { "type": "resref", diff --git a/_module/ute/oldreddragon.ute.json b/_module/ute/oldreddragon.ute.json index 9a6fd99d..db147a99 100644 --- a/_module/ute/oldreddragon.ute.json +++ b/_module/ute/oldreddragon.ute.json @@ -19,7 +19,7 @@ }, "CR": { "type": "float", - "value": 17.0 + "value": 25.0 }, "ResRef": { "type": "resref", diff --git a/_module/uti/air_skin.uti.json b/_module/uti/air_skin.uti.json index 2b1a8608..abb89228 100644 --- a/_module/uti/air_skin.uti.json +++ b/_module/uti/air_skin.uti.json @@ -66,89 +66,58 @@ }, "CostTable": { "type": "byte", - "value": 6 - }, - "CostValue": { - "type": "word", - "value": 4 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 255 - }, - "PropertyName": { - "type": "word", - "value": 22 - }, - "Subtype": { - "type": "word", - "value": 1 - } - }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 7 - }, - "CostValue": { - "type": "word", - "value": 4 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 23 - }, - "Subtype": { - "type": "word", - "value": 1 - } - }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 7 - }, - "CostValue": { - "type": "word", - "value": 4 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 23 - }, - "Subtype": { - "type": "word", "value": 2 + }, + "CostValue": { + "type": "word", + "value": 12 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 1 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 75 + }, + "Subtype": { + "type": "word", + "value": 0 } }, { @@ -182,6 +151,37 @@ "value": 0 } }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, { "__struct_id": 0, "ChanceAppear": { @@ -213,6 +213,68 @@ "value": 9 } }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 1 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 2 + } + }, { "__struct_id": 0, "ChanceAppear": { @@ -523,37 +585,6 @@ "value": 0 } }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 2 - }, - "CostValue": { - "type": "word", - "value": 5 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 40 - }, - "Subtype": { - "type": "word", - "value": 4 - } - }, { "__struct_id": 0, "ChanceAppear": { diff --git a/_module/uti/air_skin001.uti.json b/_module/uti/air_skin001.uti.json new file mode 100644 index 00000000..ee210303 --- /dev/null +++ b/_module/uti/air_skin001.uti.json @@ -0,0 +1,672 @@ +{ + "__data_type": "UTI ", + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 73 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Cost": { + "type": "dword", + "value": 0 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "id": 13190, + "type": "cexolocstring", + "value": { + "0": "air_skinboss" + } + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 14 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 12 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 1 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 75 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 35 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 9 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 1 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 2 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 13 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 8 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 9 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 4 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 2 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 7 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 3 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 26 + }, + "CostValue": { + "type": "word", + "value": 19 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 82 + }, + "Subtype": { + "type": "word", + "value": 114 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 1 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 51 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 41 + }, + "Subtype": { + "type": "word", + "value": 1 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "air_skinboss" + }, + "TemplateResRef": { + "type": "resref", + "value": "air_skin001" + }, + "xModelPart1": { + "type": "word", + "value": 1 + } +} diff --git a/_module/uti/airjewel.uti.json b/_module/uti/airjewel.uti.json index 265f285d..c8bfff81 100644 --- a/_module/uti/airjewel.uti.json +++ b/_module/uti/airjewel.uti.json @@ -10,7 +10,7 @@ }, "Charges": { "type": "byte", - "value": 3 + "value": 6 }, "Comment": { "type": "cexostring", @@ -18,7 +18,7 @@ }, "Cost": { "type": "dword", - "value": 49500 + "value": 6002 }, "Cursed": { "type": "byte", @@ -75,7 +75,7 @@ }, "CostValue": { "type": "word", - "value": 6 + "value": 1 }, "Param1": { "type": "byte", @@ -91,7 +91,7 @@ }, "Subtype": { "type": "word", - "value": 379 + "value": 1009 } } ] diff --git a/_module/uti/drowbattlestaf.uti.json b/_module/uti/drowbattlestaf.uti.json index 82fa2d2e..96e3f7a3 100644 --- a/_module/uti/drowbattlestaf.uti.json +++ b/_module/uti/drowbattlestaf.uti.json @@ -41,7 +41,7 @@ "LocalizedName": { "type": "cexolocstring", "value": { - "0": "Drow Battle Staff" + "0": "Dark Elf Battle Staff" } }, "ModelPart1": { @@ -265,7 +265,7 @@ }, "Tag": { "type": "cexostring", - "value": "DrowBattleStaff" + "value": "DarkElfBattleStaff" }, "TemplateResRef": { "type": "resref", diff --git a/_module/uti/drowblade.uti.json b/_module/uti/drowblade.uti.json index 5ae4d514..ae389787 100644 --- a/_module/uti/drowblade.uti.json +++ b/_module/uti/drowblade.uti.json @@ -43,7 +43,7 @@ "LocalizedName": { "type": "cexolocstring", "value": { - "0": "Drow Blade" + "0": "Dark Elf Blade" } }, "ModelPart1": { @@ -329,7 +329,7 @@ }, "Tag": { "type": "cexostring", - "value": "DrowBlade" + "value": "DarkElfBlade" }, "TemplateResRef": { "type": "resref", diff --git a/_module/uti/drowchainmesh.uti.json b/_module/uti/drowchainmesh.uti.json index c04153ee..1f5438b8 100644 --- a/_module/uti/drowchainmesh.uti.json +++ b/_module/uti/drowchainmesh.uti.json @@ -22,7 +22,7 @@ }, "ArmorPart_LHand": { "type": "byte", - "value": 8 + "value": 1 }, "ArmorPart_LShin": { "type": "byte", @@ -58,7 +58,7 @@ }, "ArmorPart_RHand": { "type": "byte", - "value": 8 + "value": 1 }, "ArmorPart_Robe": { "type": "byte", @@ -135,7 +135,7 @@ "LocalizedName": { "type": "cexolocstring", "value": { - "0": "Drow Chainmesh" + "0": "Dark Elf Chainmesh" } }, "Metal1Color": { @@ -355,7 +355,7 @@ }, "Tag": { "type": "cexostring", - "value": "DrowChainmesh" + "value": "DarkElfChainmesh" }, "TemplateResRef": { "type": "resref", @@ -379,7 +379,7 @@ }, "xArmorPart_LHand": { "type": "word", - "value": 8 + "value": 1 }, "xArmorPart_LShin": { "type": "word", @@ -415,7 +415,7 @@ }, "xArmorPart_RHand": { "type": "word", - "value": 8 + "value": 1 }, "xArmorPart_Robe": { "type": "word", diff --git a/_module/uti/drowcompositebow.uti.json b/_module/uti/drowcompositebow.uti.json index e7cac8ed..4a49eda8 100644 --- a/_module/uti/drowcompositebow.uti.json +++ b/_module/uti/drowcompositebow.uti.json @@ -18,7 +18,7 @@ }, "Cost": { "type": "dword", - "value": 313588 + "value": 510150 }, "Cursed": { "type": "byte", @@ -27,7 +27,7 @@ "DescIdentified": { "type": "cexolocstring", "value": { - "0": "A truly magical longbow, this bow can imbue all arrows with cold damage." + "0": "A truly magical longbow, this bow can imbue all arrows with sonic damage." } }, "Description": { @@ -100,6 +100,37 @@ "value": 1 } }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 56 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, { "__struct_id": 0, "ChanceAppear": { @@ -128,7 +159,7 @@ }, "Subtype": { "type": "word", - "value": 7 + "value": 13 } }, { @@ -254,6 +285,37 @@ "type": "word", "value": 0 } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 14 + }, + "CostValue": { + "type": "word", + "value": 1 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 61 + }, + "Subtype": { + "type": "word", + "value": 0 + } } ] }, diff --git a/_module/uti/drowevokerstaff.uti.json b/_module/uti/drowevokerstaff.uti.json index c6380c70..fe974be7 100644 --- a/_module/uti/drowevokerstaff.uti.json +++ b/_module/uti/drowevokerstaff.uti.json @@ -39,7 +39,7 @@ "LocalizedName": { "type": "cexolocstring", "value": { - "0": "Drow Evoker Staff" + "0": "Evoker Staff" } }, "ModelPart1": { @@ -294,7 +294,7 @@ }, "Tag": { "type": "cexostring", - "value": "DrowEvokerStaff" + "value": "EvokerStaff" }, "TemplateResRef": { "type": "resref", diff --git a/_module/uti/drowflail.uti.json b/_module/uti/drowflail.uti.json index 708b583c..067c53e4 100644 --- a/_module/uti/drowflail.uti.json +++ b/_module/uti/drowflail.uti.json @@ -39,7 +39,7 @@ "LocalizedName": { "type": "cexolocstring", "value": { - "0": "Drow Flail" + "0": "Dark Elf Flail" } }, "ModelPart1": { @@ -201,7 +201,7 @@ }, "Tag": { "type": "cexostring", - "value": "DrowFlail" + "value": "DarkElfFlail" }, "TemplateResRef": { "type": "resref", diff --git a/_module/uti/drowpropsnodrop.uti.json b/_module/uti/drowpropsnodrop.uti.json index 2d96ba2b..57df9f9a 100644 --- a/_module/uti/drowpropsnodrop.uti.json +++ b/_module/uti/drowpropsnodrop.uti.json @@ -44,7 +44,7 @@ }, "ModelPart1": { "type": "byte", - "value": 1 + "value": 4 }, "PaletteID": { "type": "byte", @@ -325,6 +325,6 @@ }, "xModelPart1": { "type": "word", - "value": 1 + "value": 4 } } diff --git a/_module/uti/earth_skin.uti.json b/_module/uti/earth_skin.uti.json index f211b575..8fd54299 100644 --- a/_module/uti/earth_skin.uti.json +++ b/_module/uti/earth_skin.uti.json @@ -68,42 +68,11 @@ }, "CostTable": { "type": "byte", - "value": 6 - }, - "CostValue": { - "type": "word", - "value": 10 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 22 - }, - "Subtype": { - "type": "word", "value": 2 - } - }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 7 }, "CostValue": { "type": "word", - "value": 6 + "value": 12 }, "Param1": { "type": "byte", @@ -114,43 +83,12 @@ "value": 0 }, "PropertyName": { - "type": "word", - "value": 23 - }, - "Subtype": { "type": "word", "value": 1 - } - }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 7 - }, - "CostValue": { - "type": "word", - "value": 8 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 23 }, "Subtype": { "type": "word", - "value": 2 + "value": 0 } }, { @@ -165,7 +103,7 @@ }, "CostValue": { "type": "word", - "value": 5 + "value": 7 }, "Param1": { "type": "byte", @@ -246,6 +184,37 @@ "value": 6 } }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 2 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, { "__struct_id": 0, "ChanceAppear": { @@ -277,6 +246,68 @@ "value": 7 } }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 1 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 2 + } + }, { "__struct_id": 0, "ChanceAppear": { @@ -556,37 +587,6 @@ "value": 0 } }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 2 - }, - "CostValue": { - "type": "word", - "value": 5 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 40 - }, - "Subtype": { - "type": "word", - "value": 4 - } - }, { "__struct_id": 0, "ChanceAppear": { diff --git a/_module/uti/earth_skin001.uti.json b/_module/uti/earth_skin001.uti.json new file mode 100644 index 00000000..92046769 --- /dev/null +++ b/_module/uti/earth_skin001.uti.json @@ -0,0 +1,705 @@ +{ + "__data_type": "UTI ", + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 73 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Cost": { + "type": "dword", + "value": 0 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": { + "0": "" + } + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "id": 13190, + "type": "cexolocstring", + "value": { + "0": "earth_skinboss" + } + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 14 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 12 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 1 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 22 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 24 + }, + "Subtype": { + "type": "word", + "value": 13 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 22 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 24 + }, + "Subtype": { + "type": "word", + "value": 13 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 75 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 2 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 4 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 7 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 1 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 2 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 8 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 9 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 4 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 2 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 7 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 3 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 26 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 82 + }, + "Subtype": { + "type": "word", + "value": 82 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 10 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 51 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 41 + }, + "Subtype": { + "type": "word", + "value": 1 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "earth_skinboss" + }, + "TemplateResRef": { + "type": "resref", + "value": "earth_skin001" + }, + "xModelPart1": { + "type": "word", + "value": 1 + } +} diff --git a/_module/uti/earthjewel.uti.json b/_module/uti/earthjewel.uti.json index d33bdffd..e27bca62 100644 --- a/_module/uti/earthjewel.uti.json +++ b/_module/uti/earthjewel.uti.json @@ -10,7 +10,7 @@ }, "Charges": { "type": "byte", - "value": 3 + "value": 6 }, "Comment": { "type": "cexostring", @@ -18,7 +18,7 @@ }, "Cost": { "type": "dword", - "value": 49500 + "value": 6002 }, "Cursed": { "type": "byte", @@ -75,7 +75,7 @@ }, "CostValue": { "type": "word", - "value": 6 + "value": 1 }, "Param1": { "type": "byte", @@ -91,7 +91,7 @@ }, "Subtype": { "type": "word", - "value": 482 + "value": 1001 } } ] diff --git a/_module/uti/earthnoble_slam.uti.json b/_module/uti/earthnoble_slam.uti.json index 523f499a..317cc98b 100644 --- a/_module/uti/earthnoble_slam.uti.json +++ b/_module/uti/earthnoble_slam.uti.json @@ -18,7 +18,7 @@ }, "Cost": { "type": "dword", - "value": 30891658 + "value": 4399220 }, "Cursed": { "type": "byte", @@ -70,7 +70,7 @@ }, "CostValue": { "type": "word", - "value": 20 + "value": 10 }, "Param1": { "type": "byte", @@ -101,7 +101,38 @@ }, "CostValue": { "type": "word", - "value": 15 + "value": 13 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 16 + }, + "Subtype": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 4 + }, + "CostValue": { + "type": "word", + "value": 13 }, "Param1": { "type": "byte", @@ -151,37 +182,6 @@ "value": 7 } }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 4 - }, - "CostValue": { - "type": "word", - "value": 10 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 16 - }, - "Subtype": { - "type": "word", - "value": 12 - } - }, { "__struct_id": 0, "ChanceAppear": { @@ -194,7 +194,7 @@ }, "CostValue": { "type": "word", - "value": 20 + "value": 5 }, "Param1": { "type": "byte", @@ -213,37 +213,6 @@ "value": 0 } }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 4 - }, - "CostValue": { - "type": "word", - "value": 6 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 74 - }, - "Subtype": { - "type": "word", - "value": 0 - } - }, { "__struct_id": 0, "ChanceAppear": { @@ -287,7 +256,7 @@ }, "CostValue": { "type": "word", - "value": 26 + "value": 13 }, "Param1": { "type": "byte", diff --git a/_module/uti/fire_skin.uti.json b/_module/uti/fire_skin.uti.json index 9f233232..dfd64696 100644 --- a/_module/uti/fire_skin.uti.json +++ b/_module/uti/fire_skin.uti.json @@ -66,42 +66,11 @@ }, "CostTable": { "type": "byte", - "value": 6 - }, - "CostValue": { - "type": "word", - "value": 6 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 22 - }, - "Subtype": { - "type": "word", "value": 2 - } - }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 7 }, "CostValue": { "type": "word", - "value": 6 + "value": 10 }, "Param1": { "type": "byte", @@ -112,43 +81,12 @@ "value": 0 }, "PropertyName": { - "type": "word", - "value": 23 - }, - "Subtype": { "type": "word", "value": 1 - } - }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 7 - }, - "CostValue": { - "type": "word", - "value": 6 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 23 }, "Subtype": { "type": "word", - "value": 2 + "value": 0 } }, { @@ -163,7 +101,7 @@ }, "CostValue": { "type": "word", - "value": 2 + "value": 4 }, "Param1": { "type": "byte", @@ -244,6 +182,37 @@ "value": 6 } }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 4 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, { "__struct_id": 0, "ChanceAppear": { @@ -275,6 +244,68 @@ "value": 10 } }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 4 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 1 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 4 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 2 + } + }, { "__struct_id": 0, "ChanceAppear": { @@ -368,37 +399,6 @@ "value": 4 } }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 0 - }, - "CostValue": { - "type": "word", - "value": 0 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 37 - }, - "Subtype": { - "type": "word", - "value": 6 - } - }, { "__struct_id": 0, "ChanceAppear": { @@ -554,37 +554,6 @@ "value": 0 } }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 2 - }, - "CostValue": { - "type": "word", - "value": 5 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 40 - }, - "Subtype": { - "type": "word", - "value": 4 - } - }, { "__struct_id": 0, "ChanceAppear": { diff --git a/_module/uti/fire_skin001.uti.json b/_module/uti/fire_skin001.uti.json new file mode 100644 index 00000000..3d728561 --- /dev/null +++ b/_module/uti/fire_skin001.uti.json @@ -0,0 +1,641 @@ +{ + "__data_type": "UTI ", + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 73 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Cost": { + "type": "dword", + "value": 0 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "id": 13190, + "type": "cexolocstring", + "value": { + "0": "fire_skinboss" + } + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 14 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 10 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 1 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 22 + }, + "CostValue": { + "type": "word", + "value": 4 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 24 + }, + "Subtype": { + "type": "word", + "value": 7 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 35 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 4 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 10 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 4 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 1 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 4 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 2 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 8 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 9 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 4 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 2 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 7 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 3 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 26 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 82 + }, + "Subtype": { + "type": "word", + "value": 21 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 51 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 41 + }, + "Subtype": { + "type": "word", + "value": 1 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "fire_skinboss" + }, + "TemplateResRef": { + "type": "resref", + "value": "fire_skin001" + }, + "xModelPart1": { + "type": "word", + "value": 1 + } +} diff --git a/_module/uti/firejewel.uti.json b/_module/uti/firejewel.uti.json index bfa23c01..91b7f1f6 100644 --- a/_module/uti/firejewel.uti.json +++ b/_module/uti/firejewel.uti.json @@ -10,7 +10,7 @@ }, "Charges": { "type": "byte", - "value": 3 + "value": 6 }, "Comment": { "type": "cexostring", @@ -18,7 +18,7 @@ }, "Cost": { "type": "dword", - "value": 33750 + "value": 6002 }, "Cursed": { "type": "byte", @@ -75,7 +75,7 @@ }, "CostValue": { "type": "word", - "value": 6 + "value": 1 }, "Param1": { "type": "byte", @@ -91,7 +91,7 @@ }, "Subtype": { "type": "word", - "value": 371 + "value": 1007 } } ] diff --git a/_module/uti/fireknive.uti.json b/_module/uti/fireknive.uti.json index 654a1ded..f44fc711 100644 --- a/_module/uti/fireknive.uti.json +++ b/_module/uti/fireknive.uti.json @@ -18,7 +18,7 @@ }, "Cost": { "type": "dword", - "value": 80155 + "value": 140447 }, "Cursed": { "type": "byte", @@ -43,20 +43,20 @@ "LocalizedName": { "type": "cexolocstring", "value": { - "0": "Fire Knive" + "0": "Fire Knife" } }, "ModelPart1": { "type": "byte", - "value": 11 + "value": 14 }, "ModelPart2": { "type": "byte", - "value": 11 + "value": 34 }, "ModelPart3": { "type": "byte", - "value": 11 + "value": 13 }, "PaletteID": { "type": "byte", @@ -69,37 +69,6 @@ "PropertiesList": { "type": "list", "value": [ - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 2 - }, - "CostValue": { - "type": "word", - "value": 1 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 56 - }, - "Subtype": { - "type": "word", - "value": 0 - } - }, { "__struct_id": 0, "ChanceAppear": { @@ -139,11 +108,11 @@ }, "CostTable": { "type": "byte", - "value": 1 + "value": 2 }, "CostValue": { "type": "word", - "value": 4 + "value": 3 }, "Param1": { "type": "byte", @@ -155,11 +124,42 @@ }, "PropertyName": { "type": "word", - "value": 52 + "value": 6 }, "Subtype": { "type": "word", - "value": 18 + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 33 + }, + "Subtype": { + "type": "word", + "value": 2 } } ] @@ -174,7 +174,7 @@ }, "Tag": { "type": "cexostring", - "value": "FireKnive" + "value": "FireKnife" }, "TemplateResRef": { "type": "resref", @@ -182,14 +182,14 @@ }, "xModelPart1": { "type": "word", - "value": 11 + "value": 14 }, "xModelPart2": { "type": "word", - "value": 11 + "value": 34 }, "xModelPart3": { "type": "word", - "value": 11 + "value": 13 } } diff --git a/_module/uti/firenobleslam.uti.json b/_module/uti/firenobleslam.uti.json new file mode 100644 index 00000000..fac7dca6 --- /dev/null +++ b/_module/uti/firenobleslam.uti.json @@ -0,0 +1,268 @@ +{ + "__data_type": "UTI ", + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 71 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Cost": { + "type": "dword", + "value": 2436020 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "type": "cexolocstring", + "value": { + "0": "firenobleslam" + } + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 56 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 6 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 56 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 14 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 6 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 6 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 4 + }, + "CostValue": { + "type": "word", + "value": 34 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 74 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 13 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 26 + }, + "CostValue": { + "type": "word", + "value": 23 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 82 + }, + "Subtype": { + "type": "word", + "value": 22 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "firenobleslam" + }, + "TemplateResRef": { + "type": "resref", + "value": "firenobleslam" + }, + "xModelPart1": { + "type": "word", + "value": 1 + } +} diff --git a/_module/uti/item002.uti.json b/_module/uti/item002.uti.json index 50b636e0..928f7914 100644 --- a/_module/uti/item002.uti.json +++ b/_module/uti/item002.uti.json @@ -18,7 +18,7 @@ }, "Cost": { "type": "dword", - "value": 1277169 + "value": 384651 }, "Cursed": { "type": "byte", @@ -69,7 +69,7 @@ }, "CostValue": { "type": "word", - "value": 5 + "value": 2 }, "Param1": { "type": "byte", @@ -100,7 +100,7 @@ }, "CostValue": { "type": "word", - "value": 3 + "value": 1 }, "Param1": { "type": "byte", @@ -131,7 +131,7 @@ }, "CostValue": { "type": "word", - "value": 3 + "value": 1 }, "Param1": { "type": "byte", @@ -162,7 +162,7 @@ }, "CostValue": { "type": "word", - "value": 3 + "value": 1 }, "Param1": { "type": "byte", diff --git a/_module/uti/mobwater_skin.uti.json b/_module/uti/mobwater_skin.uti.json index 79a06d3d..70d332ca 100644 --- a/_module/uti/mobwater_skin.uti.json +++ b/_module/uti/mobwater_skin.uti.json @@ -68,42 +68,11 @@ }, "CostTable": { "type": "byte", - "value": 6 - }, - "CostValue": { - "type": "word", - "value": 8 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 22 - }, - "Subtype": { - "type": "word", "value": 2 - } - }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 7 }, "CostValue": { "type": "word", - "value": 4 + "value": 12 }, "Param1": { "type": "byte", @@ -115,7 +84,7 @@ }, "PropertyName": { "type": "word", - "value": 23 + "value": 1 }, "Subtype": { "type": "word", @@ -153,68 +122,6 @@ "value": 9 } }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 7 - }, - "CostValue": { - "type": "word", - "value": 10 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 23 - }, - "Subtype": { - "type": "word", - "value": 1 - } - }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 7 - }, - "CostValue": { - "type": "word", - "value": 10 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 23 - }, - "Subtype": { - "type": "word", - "value": 2 - } - }, { "__struct_id": 0, "ChanceAppear": { @@ -227,7 +134,7 @@ }, "CostValue": { "type": "word", - "value": 4 + "value": 7 }, "Param1": { "type": "byte", @@ -277,6 +184,37 @@ "value": 0 } }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, { "__struct_id": 0, "ChanceAppear": { @@ -308,6 +246,99 @@ "value": 10 } }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 1 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 2 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 8 + } + }, { "__struct_id": 0, "ChanceAppear": { @@ -483,7 +514,7 @@ }, "Param1Value": { "type": "byte", - "value": 255 + "value": 0 }, "PropertyName": { "type": "word", @@ -514,7 +545,7 @@ }, "Param1Value": { "type": "byte", - "value": 255 + "value": 0 }, "PropertyName": { "type": "word", @@ -556,6 +587,37 @@ "value": 0 } }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 16 + }, + "CostValue": { + "type": "word", + "value": 201 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 53 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, { "__struct_id": 0, "ChanceAppear": { @@ -568,7 +630,7 @@ }, "CostValue": { "type": "word", - "value": 2 + "value": 5 }, "Param1": { "type": "byte", @@ -599,7 +661,38 @@ }, "CostValue": { "type": "word", - "value": 10 + "value": 15 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 52 + }, + "Subtype": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 25 + }, + "CostValue": { + "type": "word", + "value": 15 }, "Param1": { "type": "byte", diff --git a/_module/uti/mobwater_skin001.uti.json b/_module/uti/mobwater_skin001.uti.json new file mode 100644 index 00000000..a07f8ad2 --- /dev/null +++ b/_module/uti/mobwater_skin001.uti.json @@ -0,0 +1,767 @@ +{ + "__data_type": "UTI ", + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 73 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "mob skin, water guardians for water plane" + }, + "Cost": { + "type": "dword", + "value": 0 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": { + "0": "" + } + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "id": 13192, + "type": "cexolocstring", + "value": { + "0": "MOB-water_boss" + } + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 14 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 12 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 1 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 7 + }, + "CostValue": { + "type": "word", + "value": 3 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 23 + }, + "Subtype": { + "type": "word", + "value": 9 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 22 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 24 + }, + "Subtype": { + "type": "word", + "value": 7 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 35 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 10 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 1 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 5 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 20 + }, + "Subtype": { + "type": "word", + "value": 2 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 8 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 4 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 5 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 1 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 255 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 2 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 7 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 3 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 37 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 16 + }, + "CostValue": { + "type": "word", + "value": 201 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 53 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 26 + }, + "CostValue": { + "type": "word", + "value": 14 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 82 + }, + "Subtype": { + "type": "word", + "value": 201 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 5 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 51 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 25 + }, + "CostValue": { + "type": "word", + "value": 15 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 52 + }, + "Subtype": { + "type": "word", + "value": 6 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 25 + }, + "CostValue": { + "type": "word", + "value": 15 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 73 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "MOBwater_boss" + }, + "TemplateResRef": { + "type": "resref", + "value": "mobwater_skin001" + }, + "xModelPart1": { + "type": "word", + "value": 1 + } +} diff --git a/_module/uti/prc_claw_5d6m_h.uti.json b/_module/uti/prc_claw_5d6m_h.uti.json new file mode 100644 index 00000000..dd917f9f --- /dev/null +++ b/_module/uti/prc_claw_5d6m_h.uti.json @@ -0,0 +1,113 @@ +{ + "__data_type": "UTI ", + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Cost": { + "type": "dword", + "value": 24500 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "type": "cexolocstring", + "value": { + "0": "Claw 7d6 (huge)" + } + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 13 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 14 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "prc_claw_5d6m_h" + }, + "TemplateResRef": { + "type": "resref", + "value": "prc_claw_5d6m_h" + }, + "xModelPart1": { + "type": "word", + "value": 1 + } +} diff --git a/_module/uti/quickfury.uti.json b/_module/uti/quickfury.uti.json index 23ce9e0c..4feb0a4a 100644 --- a/_module/uti/quickfury.uti.json +++ b/_module/uti/quickfury.uti.json @@ -18,7 +18,7 @@ }, "Cost": { "type": "dword", - "value": 289498 + "value": 336128 }, "Cursed": { "type": "byte", @@ -34,7 +34,7 @@ }, "Identified": { "type": "byte", - "value": 1 + "value": 0 }, "LocalizedName": { "type": "cexolocstring", @@ -96,99 +96,6 @@ "value": 1 } }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 2 - }, - "CostValue": { - "type": "word", - "value": 2 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 56 - }, - "Subtype": { - "type": "word", - "value": 0 - } - }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 0 - }, - "CostValue": { - "type": "word", - "value": 0 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 12 - }, - "Subtype": { - "type": "word", - "value": 0 - } - }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 0 - }, - "CostValue": { - "type": "word", - "value": 0 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 12 - }, - "Subtype": { - "type": "word", - "value": 19 - } - }, { "__struct_id": 0, "ChanceAppear": { @@ -251,6 +158,37 @@ "value": 13 } }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 4 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 6 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, { "__struct_id": 0, "ChanceAppear": { diff --git a/_module/uti/roguesleather.uti.json b/_module/uti/roguesleather.uti.json index 1c2a2f09..1e097bf5 100644 --- a/_module/uti/roguesleather.uti.json +++ b/_module/uti/roguesleather.uti.json @@ -6,7 +6,7 @@ }, "ArmorPart_Belt": { "type": "byte", - "value": 13 + "value": 0 }, "ArmorPart_LBicep": { "type": "byte", @@ -26,7 +26,7 @@ }, "ArmorPart_LShin": { "type": "byte", - "value": 14 + "value": 63 }, "ArmorPart_LShoul": { "type": "byte", @@ -34,15 +34,15 @@ }, "ArmorPart_LThigh": { "type": "byte", - "value": 3 + "value": 63 }, "ArmorPart_Neck": { "type": "byte", - "value": 1 + "value": 2 }, "ArmorPart_Pelvis": { "type": "byte", - "value": 16 + "value": 10 }, "ArmorPart_RBicep": { "type": "byte", @@ -66,7 +66,7 @@ }, "ArmorPart_RShin": { "type": "byte", - "value": 14 + "value": 63 }, "ArmorPart_RShoul": { "type": "byte", @@ -74,11 +74,11 @@ }, "ArmorPart_RThigh": { "type": "byte", - "value": 3 + "value": 63 }, "ArmorPart_Torso": { "type": "byte", - "value": 27 + "value": 20 }, "BaseItem": { "type": "int", @@ -90,11 +90,11 @@ }, "Cloth1Color": { "type": "byte", - "value": 21 + "value": 45 }, "Cloth2Color": { "type": "byte", - "value": 23 + "value": 135 }, "Comment": { "type": "cexostring", @@ -102,7 +102,7 @@ }, "Cost": { "type": "dword", - "value": 2131218 + "value": 1454665 }, "Cursed": { "type": "byte", @@ -127,26 +127,26 @@ }, "Leather1Color": { "type": "byte", - "value": 21 + "value": 45 }, "Leather2Color": { "type": "byte", - "value": 45 + "value": 135 }, "LocalizedName": { "id": 13771, "type": "cexolocstring", "value": { - "0": "Rogues Leather" + "0": "Rogue Leather" } }, "Metal1Color": { "type": "byte", - "value": 0 + "value": 135 }, "Metal2Color": { "type": "byte", - "value": 3 + "value": 7 }, "PaletteID": { "type": "byte", @@ -264,7 +264,7 @@ }, "CostValue": { "type": "word", - "value": 4 + "value": 3 }, "Param1": { "type": "byte", @@ -295,7 +295,7 @@ }, "CostValue": { "type": "word", - "value": 4 + "value": 2 }, "Param1": { "type": "byte", @@ -314,6 +314,37 @@ "value": 1 } }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 7 + }, + "CostValue": { + "type": "word", + "value": 2 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 23 + }, + "Subtype": { + "type": "word", + "value": 2 + } + }, { "__struct_id": 0, "ChanceAppear": { @@ -345,68 +376,6 @@ "value": 0 } }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 2 - }, - "CostValue": { - "type": "word", - "value": 3 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 40 - }, - "Subtype": { - "type": "word", - "value": 5 - } - }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 2 - }, - "CostValue": { - "type": "word", - "value": 3 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 40 - }, - "Subtype": { - "type": "word", - "value": 13 - } - }, { "__struct_id": 0, "ChanceAppear": { @@ -623,37 +592,6 @@ "type": "word", "value": 21 } - }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 0 - }, - "CostValue": { - "type": "word", - "value": 0 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 63 - }, - "Subtype": { - "type": "word", - "value": 8 - } } ] }, @@ -667,7 +605,7 @@ }, "Tag": { "type": "cexostring", - "value": "RoguesLeather" + "value": "RogueLeather" }, "TemplateResRef": { "type": "resref", @@ -675,7 +613,7 @@ }, "xArmorPart_Belt": { "type": "word", - "value": 13 + "value": 0 }, "xArmorPart_LBice": { "type": "word", @@ -695,7 +633,7 @@ }, "xArmorPart_LShin": { "type": "word", - "value": 14 + "value": 63 }, "xArmorPart_LShou": { "type": "word", @@ -703,15 +641,15 @@ }, "xArmorPart_LThig": { "type": "word", - "value": 3 + "value": 63 }, "xArmorPart_Neck": { "type": "word", - "value": 1 + "value": 2 }, "xArmorPart_Pelvi": { "type": "word", - "value": 16 + "value": 10 }, "xArmorPart_RBice": { "type": "word", @@ -735,7 +673,7 @@ }, "xArmorPart_RShin": { "type": "word", - "value": 14 + "value": 63 }, "xArmorPart_RShou": { "type": "word", @@ -743,10 +681,10 @@ }, "xArmorPart_RThig": { "type": "word", - "value": 3 + "value": 63 }, "xArmorPart_Torso": { "type": "word", - "value": 27 + "value": 20 } } diff --git a/_module/uti/water_slam.uti.json b/_module/uti/water_slam.uti.json index ead56a00..43a33e61 100644 --- a/_module/uti/water_slam.uti.json +++ b/_module/uti/water_slam.uti.json @@ -18,7 +18,7 @@ }, "Cost": { "type": "dword", - "value": 1329344 + "value": 1326124 }, "Cursed": { "type": "byte", @@ -70,7 +70,7 @@ }, "CostValue": { "type": "word", - "value": 8 + "value": 13 }, "Param1": { "type": "byte", @@ -89,37 +89,6 @@ "value": 7 } }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 4 - }, - "CostValue": { - "type": "word", - "value": 10 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 16 - }, - "Subtype": { - "type": "word", - "value": 5 - } - }, { "__struct_id": 0, "ChanceAppear": { @@ -151,37 +120,6 @@ "value": 0 } }, - { - "__struct_id": 0, - "ChanceAppear": { - "type": "byte", - "value": 100 - }, - "CostTable": { - "type": "byte", - "value": 4 - }, - "CostValue": { - "type": "word", - "value": 7 - }, - "Param1": { - "type": "byte", - "value": 255 - }, - "Param1Value": { - "type": "byte", - "value": 0 - }, - "PropertyName": { - "type": "word", - "value": 74 - }, - "Subtype": { - "type": "word", - "value": 0 - } - }, { "__struct_id": 0, "ChanceAppear": { diff --git a/_module/uti/water_spike.uti.json b/_module/uti/water_spike.uti.json new file mode 100644 index 00000000..afa9eec2 --- /dev/null +++ b/_module/uti/water_spike.uti.json @@ -0,0 +1,268 @@ +{ + "__data_type": "UTI ", + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Cost": { + "type": "dword", + "value": 1250000 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "type": "cexolocstring", + "value": { + "0": "water_spike" + } + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 56 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 6 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 43 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 4 + }, + "CostValue": { + "type": "word", + "value": 11 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 74 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 15 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 7 + }, + "Param1Value": { + "type": "byte", + "value": 4 + }, + "PropertyName": { + "type": "word", + "value": 72 + }, + "Subtype": { + "type": "word", + "value": 9 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 67 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "water_spike" + }, + "TemplateResRef": { + "type": "resref", + "value": "water_spike" + }, + "xModelPart1": { + "type": "word", + "value": 1 + } +} diff --git a/_module/uti/water_spike2.uti.json b/_module/uti/water_spike2.uti.json new file mode 100644 index 00000000..ce8f03e9 --- /dev/null +++ b/_module/uti/water_spike2.uti.json @@ -0,0 +1,268 @@ +{ + "__data_type": "UTI ", + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 72 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Cost": { + "type": "dword", + "value": 1352000 + }, + "Cursed": { + "type": "byte", + "value": 1 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "type": "cexolocstring", + "value": { + "0": "water_spike2" + } + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 56 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 6 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 43 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 4 + }, + "CostValue": { + "type": "word", + "value": 11 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 74 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 17 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 0 + }, + "CostValue": { + "type": "word", + "value": 0 + }, + "Param1": { + "type": "byte", + "value": 7 + }, + "Param1Value": { + "type": "byte", + "value": 4 + }, + "PropertyName": { + "type": "word", + "value": 72 + }, + "Subtype": { + "type": "word", + "value": 9 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 67 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "water_spike2" + }, + "TemplateResRef": { + "type": "resref", + "value": "water_spike2" + }, + "xModelPart1": { + "type": "word", + "value": 1 + } +} diff --git a/_module/uti/waterjewel.uti.json b/_module/uti/waterjewel.uti.json index 45d4d649..a5058721 100644 --- a/_module/uti/waterjewel.uti.json +++ b/_module/uti/waterjewel.uti.json @@ -18,7 +18,7 @@ }, "Cost": { "type": "dword", - "value": 49500 + "value": 2801 }, "Cursed": { "type": "byte", @@ -71,7 +71,7 @@ }, "CostValue": { "type": "word", - "value": 6 + "value": 1 }, "Param1": { "type": "byte", @@ -87,7 +87,7 @@ }, "Subtype": { "type": "word", - "value": 368 + "value": 944 } } ] diff --git a/_module/uti/waternobleclaw.uti.json b/_module/uti/waternobleclaw.uti.json new file mode 100644 index 00000000..02c36053 --- /dev/null +++ b/_module/uti/waternobleclaw.uti.json @@ -0,0 +1,175 @@ +{ + "__data_type": "UTI ", + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 69 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Cost": { + "type": "dword", + "value": 1012500 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "type": "cexolocstring", + "value": { + "0": "waternobleclaw" + } + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 56 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 56 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 6 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 33 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "waternobleclaw" + }, + "TemplateResRef": { + "type": "resref", + "value": "waternobleclaw" + }, + "xModelPart1": { + "type": "word", + "value": 1 + } +} diff --git a/_module/uti/waternobleslam.uti.json b/_module/uti/waternobleslam.uti.json new file mode 100644 index 00000000..cfe2a45b --- /dev/null +++ b/_module/uti/waternobleslam.uti.json @@ -0,0 +1,175 @@ +{ + "__data_type": "UTI ", + "AddCost": { + "type": "dword", + "value": 0 + }, + "BaseItem": { + "type": "int", + "value": 71 + }, + "Charges": { + "type": "byte", + "value": 0 + }, + "Comment": { + "type": "cexostring", + "value": "" + }, + "Cost": { + "type": "dword", + "value": 1012500 + }, + "Cursed": { + "type": "byte", + "value": 0 + }, + "DescIdentified": { + "type": "cexolocstring", + "value": {} + }, + "Description": { + "type": "cexolocstring", + "value": {} + }, + "Identified": { + "type": "byte", + "value": 1 + }, + "LocalizedName": { + "type": "cexolocstring", + "value": { + "0": "waternobleslam" + } + }, + "ModelPart1": { + "type": "byte", + "value": 1 + }, + "PaletteID": { + "type": "byte", + "value": 56 + }, + "Plot": { + "type": "byte", + "value": 0 + }, + "PropertiesList": { + "type": "list", + "value": [ + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 56 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 2 + }, + "CostValue": { + "type": "word", + "value": 7 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 6 + }, + "Subtype": { + "type": "word", + "value": 0 + } + }, + { + "__struct_id": 0, + "ChanceAppear": { + "type": "byte", + "value": 100 + }, + "CostTable": { + "type": "byte", + "value": 19 + }, + "CostValue": { + "type": "word", + "value": 33 + }, + "Param1": { + "type": "byte", + "value": 255 + }, + "Param1Value": { + "type": "byte", + "value": 0 + }, + "PropertyName": { + "type": "word", + "value": 77 + }, + "Subtype": { + "type": "word", + "value": 0 + } + } + ] + }, + "StackSize": { + "type": "word", + "value": 1 + }, + "Stolen": { + "type": "byte", + "value": 0 + }, + "Tag": { + "type": "cexostring", + "value": "waternobleslam" + }, + "TemplateResRef": { + "type": "resref", + "value": "waternobleslam" + }, + "xModelPart1": { + "type": "word", + "value": 1 + } +} diff --git a/_release/Aantioch [PRC-CEP3].7z b/_release/Aantioch [PRC-CEP3].7z index 3b7ffb57..aaf4d311 100644 Binary files a/_release/Aantioch [PRC-CEP3].7z and b/_release/Aantioch [PRC-CEP3].7z differ