Main
{
questname "Spider Quest"
version 1.0
}
state Begin
{
desc "Talk to swamp guard"
action AddNpcText( 10 , "Hi, I'm here to guard this cave entrance, many smugglers from Anundo are trying to bring illegal fairy soda into Aeven.");
action AddNpcText( 10 , "I been here for a long time and those spiders bite me several times, I wish someone could do something about these spiders.");
rule TalkedToNpc(10) goto DoQuest
}
state DoQuest
{
desc "Kill 20 spiders"
action AddNpcText( 10 , "If you kill 20 of those annoying swamp spiders I will reward you");
rule KilledNpcs( 10 , 20 ) goto SpiderQuest
}
state SpiderQuest
{
desc "Talk to the Swamp Guard"
action AddNpcText( 10 , "So, you killed 20 swamp spiders already? I'm sorry but I don't believe you.. Bring me 10 spider legs to prove it.");
rule GotItems( 257 , 10 ) goto SpiderLegs
}
state SpiderLegs
{
desc "Show the legs to the Swamp Guard"
action AddNpcText( 10 , "You really killed those spiders, can I have those legs?");
action AddNpcInput( 10 , 1 , "Ok, here you go.");
action AddNpcInput( 10 , 2 , "No, sorry no deal.");
rule InputNpc( 1 ) goto Captain1
rule InputNpc( 2 ) goto Reset
rule LostItems( 257 , 10 ) goto SpiderQuest
}
state Captain1
{
desc "Go to the Imperial Castle"
action RemoveItem( 257 , 10);
action AddNpcText( 10 , "Please visit my captain at the imperial castle, he will rawerd you for your brave deed");
rule EnterMap( 46 ) goto Captain2
}
state Captain2
{
desc "Talk to the Captain"
action AddNpcText( 10 , "Please visit my captain at the Imperial Castle, he will reward you for your brave deed");
action AddNpcText( 11 , "I've heard that you have been assisting my imperial guard, located at the swamps.");
action AddNpcText( 11 , "I will reward you with some combat experience and gold, as a reward for your brave services.");
rule TalkedToNpc( 11 ) goto Reward
}
state Reset
{
action Reset();
}
state Reward
{
action GiveExp( 450 )
action GiveItem( 1 , 400)
action ShowHint("You gained 450 EXP and 400 Gold");
action PlaySound(17);
action Reset()
}