FE Quest System

From Fallen Evolution Wiki
Jump to navigation Jump to search

Declaration Types

  • action - Used for actions must end with ; e.g action addnpctext(1, "test");
  • desc - Used for quest book descriptions
  • goto - Used within a rule to go to the next state e.g goto Main
  • rule - Used for making set rules in the quest

Starting A Quest

Quests must always start with:

  • Main - quest information
  • questname "e.g sheep quest" - Used for the quest name
  • Version 1.0 - not used for anything but put it there anyway
  • requirement - quest starting requirements e.g: (level, reborn, equipmentitemid1, equipmentitemid2, class)


	questname "Sheep Quest"
	Version 1.0

Action Variables

  • AddNpcChat - Used to to make an NPC talk via chat bubble.

Usage: 'action AddNpcChat(Npc Quest ID, "Message");'

  • AddNpcInput - Used to create a link in a quest dialog window if you click the npc quest id.

Usage: 'action AddNpcInput(Npc Quest ID, Input Number, "Message");'

  • AddNpcText - Used to add a message in a quest dialog window if you click the npc quest id.

Usage: 'action AddNpcText(Npc Quest ID, "Message");'

  • End - Used to end the quest and add an completed title in the book history.

Usage: 'action End();'

  • GiveExp - Used to give the player EXP points.

Usage: 'action GiveExp(amount e.g 1000);'

  • GiveItem - Used to give the player an item.

Usage: 'action GiveItem(item id, amount);'

  • PlaySound - Used to play a sound.

Usage: 'action PlaySound(sound id);'

  • Quake - Used to create a quake on the players map or the entire world.

Usage: 'action Quake(size, map); or action Quake(size, world);'

  • RemoveItem - Used to remove an item from the players inventory.

Usage: 'action RemoveItem(item id, amount);'

  • Reset - Used to set the quests state to Begin e.g for making repeatable quests.

Usage: 'action Reset();'

  • SetClass - Used to set the class of a player.

Usage: 'action SetClass(class id);'

  • SetCoord - Used to set the player to a certain map / coordinate.

Usage: 'action SetCoord(map id, map x, map y);'

  • SetRace - Used to change the race of a player.

Usage: 'action SetRace(race id);'

  • SetState - Used to change the quest state.

Usage: 'action SetState("state name must be lower case");

  • ShowHint - Used to show a information message in the information bar at bottom of screen.

Usage: 'action ShowHint("message");'

  • RebornReq - Used to check the persons reborn level at anytime the action is played and will stop the quest if there not that level or above.

Usage: 'action RebornReq(reborn level);'

  • Strip - Used to strip the entire players items they are wearing.

Usage: 'action Strip(0);'

  • AddText - Used to add a quest dialog window at anytime the action is played immediatly.

Usage: 'action AddText("window name", "first message dialog part 1", "2nd message dialog part 2");'

  • Gender - Used to switch a persons state depending on there gender state names must be lower cased.

Usage: 'action Gender("male state name", "female state name");'

Rule Variables

  • EnterCoord - Requires a player to stand at a certain map and coordinate to progress to the next state.

Usage: 'rule EnterCoord(mapid, mapx, mapy) goto statename'

  • EnterMap - Requires a player to enter a certain map before progressing to the next state.

Usage: 'rule EnterMap(map id) goto statename'

  • GotItems - Requires a player to be holding a certain amount of items before progressing to the next state.

Usage: 'rule GotItems(item id, amount) goto statename'

  • InputNpc - Requires the player to press a link/input to progress to the next state.

Usage: 'rule InputNpc(input number) goto statename'

  • KilledNpcs - Requires an amount of npcs to be killed before progressing to the next state.

Usage: 'rule KilledNpcs(npc id, amount to kill) goto statename'

  • TalkedToNpc - Requires the player to talk to the required npc before progressing to the next state.

Usage: 'rule TalkedToNpc(npc id) goto statename'

  • KilledPlayers - Requires an amount of players to be killed via PK(Player Kill).

Usage: 'rule KilledPlayers(amount) goto statename'

  • LeaveCoord - Requires a player to leave the coordinate before progressing to the next state.

Usage: 'rule LeaveCoord(mapid, mapx, mapy) goto statename'

  • LeaveMap - Requires a player to leave a map to progress to the next state.

Usage: 'rule LeaveMap(mapid) goto statename'

  • LostItems - Checks a players items to make sure the GotItems rule from the previous state is still true.

Usage: 'rule LostItems(itemid, amount) goto previous statename'

  • UsedItem - Requires an amount of items to be used to progress to the next state.

Usage: 'rule UsedItem(item id, amount) goto statename'


What are state's?

State's are like the steps of a quest they can be followed in any order you wish. You must always have the first state be called "Begin"

Example of a State:

state Begin
	desc "Hello partner"

	action AddNpcText(npc quest id, "Yooo partner we be killing these random noobies todayz!");
	action AddNpcInput(npc quest id, 1, "Ok partner!");
	action AddNpcInput(npc quest id, 2, "fuck off ya cowboy retard i aint doin this quest");
	rule InputNpc(1) goto Main

As you can see I have made the "Begin" state have a rule that says if I press input 1 it will change the State to "Main"

Example Switching To State "Main"

Now lets pretend i did press input 1 we need to create another state underneth it like so:

state Main
	desc "kill all the noobs!"

	action AddText("Cowboy", "Woohoo partner lets go kill those noobs!", "they are located in ur anus son!");
	rule KilledNpcs(noob id, amount) goto Reward

This means if I have killed all the noobs it will go to the next state which is "Reward"

Example Switching to state "Reward"

state Reward
	desc "talk to cowboy!"

	action AddNpcText(npc quest id, "Well done son you killed all the noobs take this reward!");
	rule TalkedToNpcs(npc quest id) goto Finish

This means once i talk to the cowboy it will set my state to Finish

Example Switching to state "Finish"

state Finish
	desc "giving rewards.."

	action GiveExp(amount of exp);
	action GiveItem(1, 10000);
	action ShowHint("You gained 10000 exp and amount of exp goes here!");
	action SetState("end");

Now that you have got your reward it sets your state to "end"

Example Switching to state "End"

state End
	desc "this is the end dont need to have desc here"

	action AddNpcText(npc quest id "Thanks again for killin those noobies son!");
	action End();

This means when you go to talk to him he will say that and the quest will end and the quest will now be completed in your history log.

Sheep Quest Example

This is the official sheep quest file for Fallen Evolution.

	questname "Sheep Quest"
	version 1.0

State Begin
	desc "Help sheep shagger"

	action AddNpcInput(18, 1, "Agree");
	action AddNpcInput(18, 2, "No");
	action AddNpcText(18, "Will you please help me get rid of 20 pesky sheep they are ruining my grass!");
	rule InputNpc(1) goto Kill

State Kill
	desc "Kill 20 sheep"

	action AddNpcText(18, "You have not killed 20 sheep yet! keep going.");
	rule KilledNpcs(170, 20) goto Sheepshagger

State Sheepshagger
	desc "Talk to sheep shagger"

	action AddNpcText(18, "Thank you so much for killing those sheep here is a reward.");
	rule TalkedToNpc(18) goto Reward

State Reward
	desc "Reward"

	action PlaySound(2);
	action GiveItem(1, 10000);
	action GiveExp(10000);
	action ShowHint("You gained 10k Gold and 10k EXP!");
	action SetState("finish");

State Finish
	desc "Finish"

	action AddNpcText(18, "Thanks again for killing those pesky sheep!");
	action End();