27 lines
812 B
Plaintext
27 lines
812 B
Plaintext
void main()
|
|
{
|
|
object oTarget = GetItemActivatedTarget();
|
|
object oPC = GetItemActivator();
|
|
|
|
if ( !GetIsDM(oPC) || !GetIsPC(oTarget) )
|
|
{
|
|
FloatingTextStringOnCreature( "Illegal use of item", oPC, FALSE );
|
|
}
|
|
else
|
|
{
|
|
// Reset standard factions
|
|
if (GetStandardFactionReputation(STANDARD_FACTION_COMMONER, oTarget) <= 10)
|
|
{
|
|
SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 80, oTarget);
|
|
}
|
|
if (GetStandardFactionReputation(STANDARD_FACTION_MERCHANT, oTarget) <= 10)
|
|
{
|
|
SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 80, oTarget);
|
|
}
|
|
if (GetStandardFactionReputation(STANDARD_FACTION_DEFENDER, oTarget) <= 10)
|
|
{
|
|
SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 80, oTarget);
|
|
}
|
|
}
|
|
}
|