Example Pet Healer

For builders to discuss and ask building questions.
Post Reply
User avatar
Harroghty
Staff
Staff
Posts: 9695
Joined: Tue Jul 27, 2004 5:38 pm

Example Pet Healer

Post by Harroghty » Sat Jul 18, 2015 8:51 pm

Please feel free to refer to these programs and edit them to your taste in order to create NPC pet healers.

Code: Select all

>greet_prog 100~
smote looks up to @$N.
sayto $n I can heal your wounds, or those of your animals.
if quest(0,7,$n) == 48
  sayto $n Or are you here to learn from me?
endif
~
>speech_prog animals animal~
nod $n
if questr(900, 18, 1, $n) == 1
  sayto $n You have paid already. Point to the animal.
else
  sayto $n I will heal your animal for any donation of coins you might wish to give.
endif
~
>bribe_prog 1~
if questr(900, 18, 1, $n) == 1
or questr(900, 18, 1, $n) == 0
  mpjunk all.coins
  mpmset $n questr 900 18 1 1
  smote accepts the money with a short bow of her head and shoulders.
  sayto $n Thank you for the gift to the Forest Queen.
  pause 1
  sayto $n Point to the animal in need of healing.
endif
~
>intercept_prog point~
if questr(900, 18, 1, $n) == 1
  if ispet($1)
    if race($1) == human
    or race($1) == elf
    or race($1) == halfelf
    or race($1) == gnome
    or race($1) == halfling
    or race($1) == aasimar
    or race($1) == tiefling
    or race($1) == orc
    or race($1) == goblin
    or race($1) == bugbear
    or race($1) == troll
      smote shakes her head.
      sayto $n I will only work on your animals in this way.
    else
      cast heal $1
      cast regenerate $1
      mpmset $n questr 900 18 1 0
    endif
  else
    smote shakes her head.
    sayto $n I will only work on your animals in this way.
  endif   
else
  smote shakes her head.
  sayto $n A small donation. Any amount, please.
endif
~
|
"A man may die yet still endure if his work enters the greater work, for time is carried upon a current of forgotten deeds, and events of great moment are but the culmination of a single carefully placed thought." - Chime of Eons
Post Reply