Darth InSidious
05-02-2007, 03:50 PM
I've been trying to grant force powers from a holocron, dependant on which class and alignment for TSL. But even only taking into account the three basic Jedi classes, the script won't compile...could someone please help?
//di_give_fp.nss
// Gives the player the right force power by class. Based on a_give_form.nss
#include "k_inc_force"
#include "k_inc_debug"
#include "k_inc_utility"
#include "k_inc_generic"
void main()
{
int nClass = GetClassByPosition(1,GetFirstPC());
if(nClass == CLASS_TYPE_JEDIGUARDIAN)
{
int align = GetGoodEvilValue(GetPCSpeaker());
if(align >= 0 && align < 50)
{
GrantSpell(320, GetFirstPC());
return TRUE;
}
else
{
GrantSpell(324, GetFirstPC());
return FALSE;
}
else
{
if(nClass == CLASS_JEDICONSULAR)
{
int align = GetGoodEvilValue(GetPCSpeaker());
if(align >= 0 && align < 50)
{
GrantSpell(321, GetFirstPC());
return TRUE;
}
else
{
GrantSpell(322, GetFirstPC());
return FALSE;
}
}
}
else
{
if(nClass == CLASS_TYPE_JEDISENTINEL)
{
int align = GetGoodEvilValue(GetPCSpeaker());
if(align >= 0 && align < 50)
{
GrantSpell(323, GetFirstPC());
return TRUE;
}
else
{
GrantSpell(325, GetFirstPC());
return FALSE;
}
}
else
{}
}
//di_give_fp.nss
// Gives the player the right force power by class. Based on a_give_form.nss
#include "k_inc_force"
#include "k_inc_debug"
#include "k_inc_utility"
#include "k_inc_generic"
void main()
{
int nClass = GetClassByPosition(1,GetFirstPC());
if(nClass == CLASS_TYPE_JEDIGUARDIAN)
{
int align = GetGoodEvilValue(GetPCSpeaker());
if(align >= 0 && align < 50)
{
GrantSpell(320, GetFirstPC());
return TRUE;
}
else
{
GrantSpell(324, GetFirstPC());
return FALSE;
}
else
{
if(nClass == CLASS_JEDICONSULAR)
{
int align = GetGoodEvilValue(GetPCSpeaker());
if(align >= 0 && align < 50)
{
GrantSpell(321, GetFirstPC());
return TRUE;
}
else
{
GrantSpell(322, GetFirstPC());
return FALSE;
}
}
}
else
{
if(nClass == CLASS_TYPE_JEDISENTINEL)
{
int align = GetGoodEvilValue(GetPCSpeaker());
if(align >= 0 && align < 50)
{
GrantSpell(323, GetFirstPC());
return TRUE;
}
else
{
GrantSpell(325, GetFirstPC());
return FALSE;
}
}
else
{}
}