mppeace not stopping the fight

For builders to discuss and ask building questions.
Post Reply
User avatar
Kregor
Sword Grand Master
Sword Grand Master
Posts: 1474
Joined: Sun Jul 11, 2004 6:14 am
Location: Baldur's Gate

mppeace not stopping the fight

Post by Kregor » Wed Jul 27, 2005 6:10 am

I have a place in one of my quests, where when the bad guy gets hurt bad enough, he begs for mercy and the player has an option to do so or not. I am using the following code in the progs of the mob in question.

Code: Select all

>hitprcnt_prog 25~
if quest(0,1,$i) == 0
  mppeace
  say Stop! Please!!
  mpecho $I falls to his knees, whimpering pitifully.
  sayto $n I do not wish to die, I beg of you, show me MERCY!
  mpmset self quest 0 1 1
endif
~
He does fall on his knees, and whimper, and say exactly what he's supposed to say.

Problem is, the other mob in the room, a cameo NPC who aids the player, keeps whaling on the bad guy. Apparently the cameo mob doesn't heed the mppeace command.

Am I doing something wrong, or should I add something in the prog to guarantee the fight to stop?[/code]
"There is no safety for honest men except by believing all possible evil of evil men."

Kregor - Ranger of Tangled Trees
Rozor - Lady Luck's Duelist
Tygen - Ranger-Bard of Mielikki
User avatar
Kregor
Sword Grand Master
Sword Grand Master
Posts: 1474
Joined: Sun Jul 11, 2004 6:14 am
Location: Baldur's Gate

Post by Kregor » Wed Jul 27, 2005 9:05 pm

So, basically, I would add in:

Code: Select all

>hitprcnt_prog 25~ 
if quest(0,1,$i) == 0 
  mppeace <---- this stops the PCs fighting
  mppurge i103642 <----- this gets rid of the angry mob (pardon the pun)
  mpmload 103642 <---- this puts him back in with slight of hand
  say Stop! Please!! 
  mpecho $I falls to his knees, whimpering pitifully. 
  sayto $n I do not wish to die, I beg of you, show me MERCY! 
  mpmset self quest 0 1 1 
endif 
~ 
The only issue this would have would be that the reloaded mob would have a miraculous healing, were he to have been injured during the fight (a good possibility, since one object of this battle is to keep him alive, and the fight prog on the bad guy has this mob as the target all over it.)

If the other mob were to execute an mppeace as well, would he then stop fighting? If so, I may be able to use an act_prog or speech_prog on good guy mob that he could pick up from the actions or words of the bad guy mob, like on the bad guy's phrase "Stop! Please!!"
"There is no safety for honest men except by believing all possible evil of evil men."

Kregor - Ranger of Tangled Trees
Rozor - Lady Luck's Duelist
Tygen - Ranger-Bard of Mielikki
Post Reply