Well I don't think there is a polymorph for a lich so you will have to settle for just looking like one. But you could always add other feats or whatever if you really want to try and make the player become and actual lich.
This is a tag based script example. So you would just make sure that the tag of the item equipped/unequipped matches whatever you name this script:
#include "x2_inc_switches"
void main()
{
int nEvent = GetUserDefinedItemEventNumber();
if (nEvent == X2_ITEM_EVENT_EQUIP)
{
object oHelm = GetPCItemLastEquipped();
object oPC = GetPCItemLastEquippedBy();
int iCurrAppearance = GetAppearanceType(oPC);
SetLocalInt(oHelm, "CURRNT_APPR", iCurrAppearance);
SetCreatureAppearanceType(oPC, APPEARANCE_TYPE_LICH);
}
if (nEvent == X2_ITEM_EVENT_UNEQUIP)
{
object oHelm = GetPCItemLastUnequipped();
object oPC = GetPCItemLastUnequippedBy();
int iPrevAppearance = GetLocalInt(oHelm, "CURRNT_APPR");
SetCreatureAppearanceType(oPC, iPrevAppearance);
}
}
I named the object that was equipped/unequipped "oHelm" as an example. If you are using another type of item then you can name that something else of course. You might also want to add some visual effects to make the transformation look cooler. This is just the basics.
Hope this gets you heading in the right direction. good luck.
Modifié par GhostOfGod, 15 avril 2011 - 08:23 .