Main { questname "Dragon Quest" version 1.0 } State Begin { desc "Talk to the Dragon Warrior" action AddNpcText(14, "Hey, you, come here and let me talk to you."); rule TalkedToNpc(14) goto Part2 } State Part2 { desc "Talk to the Dragon Warrior"); action AddNpcText(14, "Can you do me a favor? You will be greatly rewarded."); action AddNpcInput(14, 1, "Sure"); action AddNpcInput(14, 2, "No thanks"); rule InputNpc( 1 ) goto Part3 rule InputNpc( 2 ) goto Coward } State Part3 { desc "Kill 30 Dragons" action AddNpcText(14, "These annoying dragons have been infesting that cave for awhile..."); action AddNpcText(14, "Kill 30 of them for the sake of Arkross."); rule KilledNpcs(225, 30) goto Part4 } State Part4 { desc "Return to the Dragon Warrior" action AddNpcText(14, "Thank you so much. Please select your class to accept your reward."); action AddNpcInput(14, 1, "Warrior"); action AddNpcInput(14, 2, "Priest"); action AddNpcInput(14, 3, "Ranger"); action AddNpcInput(14, 4, "Magician"); action AddNpcInput(14, 5, "Rouge"); rule InputNpc( 1 ) goto Warrior rule InputNpc( 2 ) goto Priest rule InputNpc( 3 ) goto Ranger rule InputNpc( 4 ) goto Magician rule InputNpc( 5 ) goto Rouge } State Warrior { action ShowHint("You are awarded with ______ and 5000 Gold!"); action GiveItem(1, 5000); action GiveItem(ID, 1) action End(); } State Priest { action ShowHint("You are awarded with ______ and 5000 Gold!"); action GiveItem(1, 5000); action GiveItem(ID, 1) action End(); } State Ranger { action ShowHint("You are awarded with ______ and 5000 Gold!"); action GiveItem(1, 5000); action GiveItem(ID, 1) action End(); } State Magician { action ShowHint("You are awarded with ______ and 5000 Gold!"); action GiveItem(1, 5000); action GiveItem(ID, 1) action End(); } State Rouge { action ShowHint("You are awarded with ______ and 5000 Gold!"); action GiveItem(1, 5000); action GiveItem(ID, 1) action End(); } State Coward { action AddNpcText(14, "Thanks anyway."); action Reset(); }