I am still having difficulty here, I tried adding the check to x0_i0_spells and rebuilt my test mod.
i created a simple ring with the tag "protpetrify"
i edited the chunk of code in the above
/////////////////////////////////
// * returns true if the creature has flesh
int spellsIsImmuneToPetrification(object oCreature)
{
int nAppearance = GetAppearanceType(oCreature);
if (GetTag(GetItemInSlot(INVENTORY_SLOT_RIGHTRING, oCreature)) == "protpetrify" || GetTag(GetItemInSlot(INVENTORY_SLOT_LEFTRING, oCreature)) != "protpetrify")
{
int bImmune = TRUE;
}
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:
case 405: // Dracolich:
case 415: // Alhoon
case 418: // shadow dragon
case 420: // mithral golem
case 421: // admantium golem
case 430: // Demi Lich
case 469: // animated chest
case 474: // golems
case 475: // golems
bImmune = TRUE;
}
////////////////////////////////////////////
but its still not working, at least for Gorgans breath petrify which was the first one I tested...
gorgan, medusa, beholder, basilisk, cockatrice
Modifié par lordofworms, 15 juillet 2011 - 04:30 .