Main { questname "My first quest" version 1.0 }
All quests should start of with this header. The quest name is the name displayed in the Quest Progress and History dialog in-game.
The version is a double. The first digit is the Major version and the second is the Minor version.
IMPORTANT: You must open and close the brackets in all States (Talked about next) and the Main routine.
Example of a GOOD state
State FirstStateName { }
Example of a BAD state
State First State Name { }
You can have as many or as little states as you require.
To set the Description we use the command desc.
Example:
State Begin { desc "Talk to Ayla" }
This would show "Talk to Ayla" in the description area located in the Quest Progress dialog.
An example state using actions
state Begin { desc "Talk to Jessica" action AddNpcText( 1 , "Hello, I am Jessica" ); action AddNpcText( 1 , "I am really scared of those sheep..."); action AddNpcChat( 1 , "Can you please help me by killing 10 Sheep?"); action AddNpcInput( 1 , 1 , "No, Do it yourself"); action AddNpcInput( 1 , 2 , "Sure, I will help you"); }
An example using rules
state Begin { desc "Talk to Jessica" action AddNpcText( 1 , "Hello, I am Jessica" ); action AddNpcText( 1 , "I am really scared of those sheep..."); action AddNpcChat( 1 , "Can you please help me by killing 10 Sheep?"); action AddNpcInput( 1 , 1 , "No, Do it yourself"); action AddNpcInput( 1 , 2 , "Sure, I will help you"); rule InputNpc( 1 ) goto Coward rule InputNpc( 2 ) goto KillSheep } State KillSheep { } State Coward { }
Main { questname "Problem with Sheep" version 1.0 } State Begin { desc "Talk to Jessica" action AddNpcText(13, "Hello, I am Jessica"); action AddNpcText(13, "I am really scared of those sheep..."); action AddNpcText(13, "Could you please help me by killing 10 Sheep?"); action AddNpcInput(13, 1, "No, Do it yourself"); action AddNpcInput(13, 2, "Sure, I will help you"); rule InputNpc(1) goto Coward rule InputNpc(2) goto KillSheep } State KillSheep { desc "Kill 10 Sheep" rule KilledNpcs(170, 10) goto TalkToJessica } State TalkToJessica { desc "Talk to Jessica" action AddNpcText(13, "Thankyou so much."); action AddNpcText(13, "Here is a reward for your effort."); rule TalkedToNpc(13) goto Reward } State Reward { action GiveExp(500); action Reset(); } State Coward { action AddNpcText(13, "Okay then, I'm sure someone else will help me."); action Reset(); }