== Attributes ==
Placed in the quest's <tt>Main { }</tt> block
* '''hidden''' - Hides the quest from both the quest progress and history pages
* '''hidden_end''' - Hides the quest from the quest history pages
* '''disabled''' - Disables the quest, no actions or rules will be executed.
== Actions ==
(parameters in square-brackets are optional)
* '''SetState('''state''')''' - Changes the quest state to the given state-name, more commonly written as '''goto state'''<br>
A quest will not load if an invalid value is provided to SetState/goto
* '''Reset()''' - Cancels the quest for the character. It must be re-started by e.g. talking to the starter NPC again.
* '''End()''' - Ends the quest and displays it on the player's quest history and book (unless hidden), it can't be started again (exception: see below).<br>
A state called "end" can be declared with rules which can resume or restart the quest by moving to different states or calling Reset()
* '''StartQuest('''questid[, state]''')''' - Starts the quest with the specified quest ID at the specified state ("begin" by default). Has no effect if the quest is already active.<br>
Currently, this is the only way a quest can be started without talking to the associated NPC.
* '''ResetQuest('''questid''')''' - Has the same effect as calling Reset() from within the specified quest ID. Has no effect if the quest is not started.
* '''SetQuestState('''questid, state''')''' - Manually changes the state of the specified quest ID. Has no effect if the quest isn't active.
* '''AddNpcText('''npc_vendor_id, text''')''' - Not a direct action. Specifies the text that appears in a quest dialog when talking to the quest NPC with the specified vendor ID when in the state.<br>Triggers the rule '''TalkedToNpc''' when the "OK" button is pressed on the dialog.
* '''AddNpcInput('''npc_vendor_id, link_id, linkname''')''' - Not a direct action. Specifies the links that appear in the quest dialog when talking to the quest NPC with the specified vendor ID when in the state.<br>Triggers the rule '''InputNpc''' with the specified input_id when a link is clicked.
* '''AddNpcChat('''npc_vendor_id, text''')''' - Not a direct action. Makes the NPC say the specified message when clicked on when in the state.
* '''ShowHint('''hint''')''' - Shows a status message to the user, also appears in the "Sys" tab.
* '''Quake('''[strength]''')''' - Quakes the map at the specified strength (1 - 8). Default strength is 5.
* '''QuakeWorld('''[strength]''')''' - Quakes the entire server at the specified strength (1 - 8). Default strength is 5.
* '''SetCoord('''mapid, x, y''')''' - Warps the character to the specified map and coordinates. Alias for '''SetMap'''.
* '''PlaySound('''sfx_id''')''' - Plays a sound effect to the character.
* '''GiveExp('''exp''')''' - Rewards the player with the given amount of experience.
* '''GiveItem('''item_id[, amount]''')''' - Rewards the player with the specified item. Default amount is 1.
* '''RemoveItem('''item_id[, amount]''')''' - Removes the item from the player's inventory. Default amount is 1.
* '''SetClass('''class_id''')''' - Sets the character to the specified class.
* '''SetRace('''skin_id''')''' - Sets the character to the specified race.
* '''RemoveKarma('''amount''')''' - Removes karma from the character (0 = evil, 1000 = neutral, 2000 = good)
* '''GiveKarma('''amount''')''' - Removes karma from the character (0 = evil, 1000 = neutral, 2000 = good)
== Rules ==
(parameters in square-brackets are optional)
Counted rules counters are reset when triggered, and when switching states.
* '''InputNpc('''link_id''')''' - Triggered when a link with the given link_id is clicked.
* '''TalkedToNpc('''npc_vendor_id''')''' - Triggered when a clicking "OK" on an NPCs dialog, or simply clicking on the NPC if no dialog is specified for it.
* '''Always()''' - Rule that always triggers the given action, only for compatibility reasons.
* '''EnterMap('''map_id''')''' - Triggered when entering the specified map.
* '''EnterCoord('''map_id, x, y''')''' - Triggered when walking on to the specified coordinates.
* '''LeaveMap('''map_id''')''' - Triggered when leaving the specified map.
* '''LeaveCoord('''map_id, x, y''')''' - Triggered when leaving the specified coordinates.
* '''KilledNpcs('''npc_id[, amount]''')''' - Counted rule. Triggers when the specified amount of the specified NPC is killed. Default amount is 1.
* '''KilledPlayers('''amount''')''' - Counted rule. Triggers when the specified amount of other players are killed (in PK).
* '''GotItems('''item_id[, amount]''')''' - Triggered when the inventory contains the given amount of the specified item. Default amount is 1.
* '''LostItems('''item_id[, amount]''')''' - Triggered when the inventory stops containing the given amount of the specified item. Default amount is 1.<br>Primarily used to reverse the effects of meeting a GotItems rule (e.g. go back to the GotItems state).
* '''UsedItem('''item_id[, amount]''')''' - Counted rule. Triggers when the specified item is "used" (meaning differs depending on the item type) the given amount of times. Default amount is 1.
* '''IsGender('''gender''')''' - Triggered when a player is the specified gender. 0 = female, 1 = male
* '''IsClass('''class_id''')''' - Triggered when the player is the specified class ID.
* '''IsRace('''skin_id''')''' - Triggered when the player has the specified skin ID.
* '''IsWearing('''item_id''')''' - Triggered when the player is wearing the specified item.
* '''GotSpell('''spell_id[, level]''')''' - Triggered when the player has the specified spell, optionally requiring a specified spell level.
* '''LostSpell('''spell_id''')''' - Triggered when the player doesn't or stops having the specified spell.<br>Primarily used to reverse the effects of meeting a GotSpell rule (e.g. go back to the GotSpell state).
* '''UsedSpell('''spell_id[, amount]''')''' - Counted rule. Triggered when the spell is casted the given amount of times. Default amount is 1.
* '''StatIs('''stat_name, value''')''' - Triggered when the given stat is the specified value.
* '''StatNot('''stat_name, value''')''' - Triggered when the given stat isn't the specified value.
* '''StatGreater('''stat_name, value''')''' - Triggered when the given stat is ''higher'' (not equal) the specified value.
* '''StatLess('''stat_name, value''')''' - Triggered when the given stat is ''lower'' (not equal) the specified value.
* '''StatBetween('''stat_name, low_value, high_value''')''' - Triggered when the given stats is between the low and high values (inclusive).
* '''StatRPN('''expr''')''' - Triggered when the specified RPN expression is not equal to 0. Usage is not recommended.
The above '''StatXXX()''' rules work with the following ''stat_name'' parameters:
* level
* exp
* hp
* maxhp
* tp
* maxtp
* maxsp
* weight
* maxweight
* mindam
* maxdam
* str / base_str
* int / base_int
* wis / base_wis
* agi / base_agi
* con / base_con
* cha / base_cha
* accuracy
* evade
* armor
* mapid
* x
* y
* goldbank
* statpoints
* skillpoints
The following can be used but are not be triggered consistently in current EOSERV versions. Usage is not recommended:
* karma
* admin
* bot
* usage
* class
* gender
* race
* hairstyle
* haircolor
* direction
* sitting
* hidden
* whispers
|