#include "rd_treasure" #include "utl_i_sqluuid" void GrantPowers(object oPC); void main() { object oPC = GetPCSpeaker(); GrantPowers(oPC); object oItemToTake = GetItemPossessedBy(oPC, "en4_orb"); if(GetIsObjectValid(oItemToTake) != 0) DestroyObject(oItemToTake); AdjustAlignment(oPC,ALIGNMENT_EVIL,5); DelayCommand(0.5f,ActionCastFakeSpellAtLocation(SPELL_GREATER_PLANAR_BINDING,GetLocation(oPC))); effect eGate = EffectVisualEffect(VFX_FNF_SUMMON_GATE); effect eHarm = EffectVisualEffect(VFX_IMP_HARM); DelayCommand(3.0f,ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eGate,GetLocation(oPC))); DelayCommand(5.0f,ApplyEffectAtLocation(DURATION_TYPE_TEMPORARY,eHarm,GetLocation(oPC))); } void GrantPowers(object oPC) { int iPath; string sMessage; object oItem; object oPartyMember = GetFirstFactionMember(oPC, TRUE); while (GetIsObjectValid(oPartyMember) == TRUE) { SQLocalsUUID_SetInt(oPartyMember,"EvilLevel",3); SQLocalsUUID_SetInt(oPartyMember,"EvilQuest",4); CreateEvilPowers(oPC); iPath = SQLocalsUUID_GetInt(oPartyMember,"EvilPath"); if (iPath == 1) SetSubRace(oPC,"Death Lord"); if (iPath == 2) SetSubRace(oPC,"Shade Lord"); if (iPath == 3) SetSubRace(oPC,"Fiend Lord"); if (iPath == 4) //Dragon Powers { object oItemToTake = GetItemPossessedBy(oPC, "en4_draghelm2"); if(GetIsObjectValid(oItemToTake) != 0) DestroyObject(oItemToTake); else { oItemToTake = GetObjectByTag("en4_draghelm2"); DestroyObject(oItemToTake); } CreateItemOnObject("en4_draghelm3",oPC); } if (iPath == 5) //Item Powers { GetArtifact(oPC); } sMessage = ""; switch (iPath) { case 1: sMessage = "You have been imbued with the power of undeath. You are now a Death Lord."; break; case 2: sMessage = "You have been imbued with the powers of darkness. You are now a Shade Lord."; break; case 3: sMessage = "You have been imbued with the powers of the abyss. You are now a Fiend Lord."; break; case 4: sMessage = "You have aligned yourself with Tiamat, the Chromatic Dragon, and received a dragon helm."; break; } if (iPath < 5) DelayCommand(6.0f,SendMessageToPC(oPartyMember,sMessage)); oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC); if (!(GetIsObjectValid(oItem)) && GetLevelByClass(CLASS_TYPE_MONK,oPC)>0) oItem = GetItemInSlot(INVENTORY_SLOT_ARMS,oPC); if (GetIsObjectValid(oItem)) { itemproperty ip; ip = ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_DIVINE,IP_CONST_DAMAGEBONUS_1d12); IPSafeAddItemProperty(oItem,ip); ip = ItemPropertyDamageBonus(IP_CONST_DAMAGETYPE_MAGICAL,IP_CONST_DAMAGEBONUS_1d12); IPSafeAddItemProperty(oItem,ip); } else { CreateItemOnObject("en4_lichbane",oPC); } /* location lLoc = GetLocation(GetObjectByTag("AP_Enter")); DelayCommand(9.0f,AssignCommand(oPC,JumpToLocation(lLoc))); oPartyMember = GetNextFactionMember(oPC, TRUE); */ } }