effect eEffect;
object oTarget;
/*   Script generated by
Lilac Soul's NWN Script Generator, v. 2.3

For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625    */

//Put this on action taken in the conversation editor
void RemoveXPFromParty(int nXP, object oPC, int bAllParty=TRUE)
{

if (!bAllParty)
   {
   nXP=(GetXP(oPC)-nXP)>=0 ? GetXP(oPC)-nXP : 0;
   SetXP(oPC, nXP);
   }
else
   {
   object oMember=GetFirstFactionMember(oPC, TRUE);

   while (GetIsObjectValid(oMember))
      {
      nXP=(GetXP(oMember)-nXP)>=0 ? GetXP(oMember)-nXP : 0;
      SetXP(oMember, nXP);
      oMember=GetNextFactionMember(oPC, TRUE);
      }
   }
}
void main()
{

object oPC = GetPCSpeaker();

if (GetGold(oPC) <= 349999)
   {
   oTarget = oPC;

   eEffect = EffectPetrify();

   ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f);

   RemoveXPFromParty(1000, oPC, FALSE);

   FloatingTextStringOnCreature("STOP CHEATING !", oPC);

   }

else
{
AssignCommand(oPC, TakeGoldFromCreature(99999, oPC, TRUE));
AssignCommand(oPC, TakeGoldFromCreature(99999, oPC, TRUE));
AssignCommand(oPC, TakeGoldFromCreature(99999, oPC, TRUE));
AssignCommand(oPC, TakeGoldFromCreature(50003, oPC, TRUE));

CreateItemOnObject("stoneoffire2", oPC);
}
}