home » builders » builder's lessons » sample quest
Sample quest
With this I will attempt to explain how quest bits work using an example of a small 3 bit quest. Mobile 1 wants you to kill Mobile 2. In this quest sample we will show how it works for a p layer doing the quest solo. As in they HAVE to get the death blow.
Program on mobile one would read:
>greet_prog 100~ if quest(0,2,$n) == 0 sayto $n Go kill Mobile 2 for me. sayto $n Go present yourself to Mobile 3 when you have done so. mpmset $n quest 0 2 1 endif ~ |
Player wanders off and kills Mobile 2. The program on Mobile 2 would be.
>death_prog 100~ if quest(0,2,$n) == 1 sayto $n Tell Mobile 3 I will haunt them forever! mpmset $n quest 0 2 2 endif ~ |
Player goes to Mobile 3 as instructed and says to Mobile 3 that Mobile 2 will haunt them forever. The word haunt triggers a speech program. The program on Mobile 3 would be.
>speech_prog haunt~ if quest(0,2,$n) == 2 sayto $n Ho! So he thinks to haunt me! sayto $n Here is your reward. mpoload QQ01 mpgive QQ01 $n mpechoat $n Mobile 3 hands you Object Number 1. mpechoaround $n Mobile 3 hands $n Object Number 1. mpmadd $n exp 1000 mpmadd $ qp 1 mpmset $n quest 0 2 3 endif ~ |
So PC walks away with 1000 experience, 1 glory point and a nifty little object. If they were asked to kill someone evil then perhaps you would raise their lawful and their good. If they were asked to kill someone good then you would lower it.
Now this quest was written using $n. This means it is pretty much a solo quest. They must get the death blow. Most of the quests on FK are orientated towards groups doing the quest. To make it doable by a group, where it would not matter who in the group gets the death blow you would replace the $n with $W. This means the quest bits are set on the group leader.