72 lines
1.8 KiB
Plaintext
72 lines
1.8 KiB
Plaintext
#include "rd_treasure"
|
|
#include "utl_i_sqluuid"
|
|
|
|
void GrantPowers(object oPC);
|
|
|
|
void main()
|
|
{
|
|
object oPC = GetPCSpeaker();
|
|
|
|
GrantPowers(oPC);
|
|
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 oPartyMember = GetFirstFactionMember(oPC, TRUE);
|
|
|
|
while (GetIsObjectValid(oPartyMember) == TRUE)
|
|
{
|
|
SQLocalsUUID_SetInt(oPartyMember,"EvilLevel",2);
|
|
CreateEvilPowers(oPC);
|
|
|
|
iPath = SQLocalsUUID_GetInt(oPartyMember,"EvilPath");
|
|
|
|
if (iPath == 4) //Dragon Powers
|
|
{
|
|
object oItemToTake = GetItemPossessedBy(oPC, "en4_draghelm1");
|
|
|
|
if(GetIsObjectValid(oItemToTake) != 0)
|
|
DestroyObject(oItemToTake);
|
|
else
|
|
{
|
|
oItemToTake = GetObjectByTag("en4_draghelm1");
|
|
DestroyObject(oItemToTake);
|
|
}
|
|
|
|
CreateItemOnObject("en4_draghelm2",oPC);
|
|
}
|
|
if (iPath == 5) //Item Powers
|
|
{
|
|
GetMagicItem(oPC,TRUE,TRUE,1);
|
|
GetMagicItem(oPC,TRUE,TRUE,2);
|
|
}
|
|
|
|
sMessage = "";
|
|
|
|
switch (iPath)
|
|
{
|
|
case 1: sMessage = "You have been imbued with the power of undeath."; break;
|
|
case 2: sMessage = "You have been imbued with the powers of darkness."; break;
|
|
case 3: sMessage = "You have been imbued with the powers of the abyss."; 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));
|
|
|
|
oPartyMember = GetNextFactionMember(oPC, TRUE);
|
|
}
|
|
} |