Main { Questname "Goat Surplus" Version 1.0 } State Begin { action AddNpcText(4, "Hello, little Titan."); action AddNpcText(4, "I am in need of help! I have too many goats! I am being overwhelmed by them!"); action AddNpcText(4, "Why don/'t I trade them with the other, bigger Titans? Well. I am kind of scared."); action AddNpcText(4, "So, can you help me?"); action AddNpcInput(4, 1, "No."); action AddNpcInput(4, 2, "Sure!"); rule InputNpc(1) goto Coward rule InputNpc(2) goto HelpKill } State HelpKill { action AddNpcText(4, "OK, Kill 10 of these goats for me."); rule TalkedToNPC(4) goto Kill } State Kill { desc "Kill 10 goats!" rule KilledNpcs(7, 10) goto Report } State Report { desc "Report to the Farmer" action AddNpcText(4, "Thanks. But, I won/'t let you keep all of the horns.. I/'m afraid I need them."); action AddNpcText(4, "Tell you what. Give me five Goat Horns, and I will give you a little something."); action AddNpcInput(4,1, "Ok!"); rule InputNpc(1) goto Help } State help { desc "Gather 5 Goat Horns" rule GotItems(258, 5) goto AgainReport } State AgainReport { action AddNpcText(4, "Thank you!"); action RemoveItem(258, 5); action ShowHint("You have lost 5 Goat Horns"); action AddNpcText(4, "Here is your reward"); action AddNpcText(4, "Accept Reward"); rule InputNpc(1) goto Reward } State Reward { action GiveExp(350); action GiveItem(1, 300); action ShowHint("You gained 350 EXP and 300 Gold!"); action End(); } State Coward { action ShowHint("I would help him!"); action Reset(); }