How to Forcerest/unlimited G restore?

I managed to make a npc of my own ((That’s an achievement for me)) that greater restores us for 200 coins, but i don’t know how to add Forcerest to that npc or make it so she can cast without needing rest/or unlimited, im a bit lost here is my code help please, this is used in a dialogue…

void main()
{
object oPC = GetPCSpeaker();
ActionCastSpellAtObject(SPELL_GREATER_RESTORATION, oPC );
}

void main()
{
	object oPC = GetPCSpeaker();
	ActionCastSpellAtObject(SPELL_GREATER_RESTORATION, oPC);
	ForceRest(OBJECT_SELF); //OBJECT_SELF in this case is the owner of the dialog file
}

Wow thank you so much :slight_smile: i understand things slowly !!!

I tried making a conditional in my dialogue/conversation for paying 200 gold for it, and added the take 200 gold on bottom of this script but the healer doesn’t seem to heal me at all and i get the 200 gold taken from me…

Ok, try this:

void main()
{
	object oPC = GetPCSpeaker();

	ClearAllActions();
	ActionDoCommand(TakeGoldFromCreature(200, oPC, TRUE));
	ActionCastSpellAtObject(SPELL_GREATER_RESTORATION, oPC);
	ActionDoCommand(ForceRest(OBJECT_SELF));
	ActionDoCommand(SetCommandable(TRUE));
	SetCommandable(FALSE);
}

Thx trying it i’ll let you know :wink:

Works awesome :smiley: I can add healers to my noob world now ahah got to start somewhere right? thank you a lot sir or m’aam