C# Class Aura.Channel.Scripting.Scripts.QuestScript

Inheritance: Aura.Channel.Scripting.Scripts.BaseScript
Exibir arquivo Open project: aura-project/aura

Public Methods

Method Description
CheckCurrentObjective ( Creature creature ) : void

Checks and updates current obective's count.

Dispose ( ) : void

Disposes quest script, removing all subscriptions.

GetDefaultRewardGroup ( ) : QuestRewardGroup

Returns the default reward group (0 or 1).

GetRewards ( int rewardGroup, QuestResult result ) : ICollection

Returns rewards for the given group and result.

Mainly used for PTJs.

Init ( ) : bool

Initializes the script, loading the information and adding it to the script manager.

OnComplete ( Creature creature ) : void
OnReceive ( Creature creature ) : void
QuestScript ( ) : System

Creates a new quest script instance.

Protected Methods

Method Description
AP ( short amount ) : QuestReward
AddObjective ( string ident, string description, int regionId, int x, int y, QuestObjective objective ) : void

Adds objective that has to be cleared to complete the quest.

AddPrerequisite ( QuestPrerequisite prerequisite ) : void

Adds prerequisite that has to be met before auto receiving the quest.

AddReward ( QuestReward reward, RewardOptions options = RewardOptions.None ) : void

Adds reward the player can get for completing the quest.

AddReward ( int groupId, RewardGroupType type, QuestResult result, QuestReward reward, RewardOptions options = RewardOptions.None ) : void

Adds reward to a specific reward group, that the player can select after completing the quest.

Mainly used for PTJs.

And ( ) : QuestPrerequisite
ClearDungeon ( string dungeonName ) : QuestObjective
Collect ( int itemId, int amount ) : QuestObjective
Completed ( int questId ) : QuestPrerequisite
Create ( int itemId, int amount, SkillId skillId, int quality = -1000 ) : QuestObjective
Deliver ( int itemId, string npcName ) : QuestObjective
Enchant ( int optionSetId ) : QuestReward
Equip ( string tag ) : QuestObjective
EventActive ( string gameEventId ) : QuestPrerequisite
Exp ( int amount ) : QuestReward
ExplExp ( int amount ) : QuestReward
Gather ( int itemId, int amount ) : QuestObjective
GetKeyword ( string keyword ) : QuestObjective
Gold ( int amount ) : QuestReward
Item ( int itemId, int amount = 1 ) : QuestReward
Keyword ( string keyword ) : QuestReward
Kill ( int amount, string raceType ) : QuestObjective
NotSkill ( SkillId skillId, SkillRank rank = SkillRank.Novice ) : QuestPrerequisite
Or ( ) : QuestPrerequisite
Pattern ( int itemId, int formId, int useCount ) : QuestReward
QuestScroll ( int questId ) : QuestReward
ReachLevel ( int level ) : QuestObjective
ReachRank ( SkillId skillId, SkillRank rank ) : QuestObjective
ReachedAge ( int age ) : QuestPrerequisite
ReachedLevel ( int level ) : QuestPrerequisite
ReachedRank ( SkillId skillId, SkillRank rank ) : QuestPrerequisite
ReachedTotalLevel ( int level ) : QuestPrerequisite
SetAdditionalInfo ( string info ) : void

Sets additional info of quest.

SetCancelable ( bool cancelable ) : void

Sets whether the quest can be canceled.

SetCategory ( QuestCategory category ) : void

Sets quest's category, which is used to determin the tab it appears in.

SetClass ( QuestClass class_ ) : void

Sets quest's class, which is displayed in squred brackets in front of its name.

SetDelay ( int delay ) : void

Sets delay with which the quest arrives if sent via owl.

SetDescription ( string description ) : void

Sets description of quest.

SetHours ( int start, int report, int deadline ) : void

Sets PTJ hours.

SetIcon ( QuestIcon icon ) : void

Sets quest's icon.

SetId ( int id ) : void

Sets id of quest.

SetLevel ( QuestLevel level ) : void

Sets quest's level (required for PTJ).

SetName ( string name ) : void

Sets name of quest.

SetPtjType ( PtjType type ) : void

Sets type for PTJs.

SetReceive ( Receive method ) : void

Sets the way you receive the quest.

SetScrollId ( int id ) : void

Sets id of the quest's item scroll.

SetType ( QuestType type ) : void

Sets type of quest.

Skill ( SkillId skillId, SkillRank rank ) : QuestReward
Skill ( SkillId skillId, SkillRank rank, int training ) : QuestReward
StatBonus ( Stat stat, int amount ) : QuestReward
Talk ( string npcName ) : QuestObjective
UseSkill ( SkillId skillId ) : QuestObjective
WarpScroll ( int itemId, string portal ) : QuestReward

Private Methods

Method Description
CanMakeProgress ( Creature creature, Aura.Channel.World.Quests.Quest quest ) : bool

Returns true if creature can make progress on this quest.

Used from objective event handlers, to see if the quest should receive the progress.

CheckPrerequisites ( Creature character ) : bool

Returns true if all prerequisites are met, receive method is auto, and the creature doesn't have the quest yet.

CreatureGotKeyword ( Creature creature, int keywordId ) : void

Checks and updates current objective.

OnCreatureCreatedOrProducedItem ( EventArgs args ) : void

Updates Create objectives.

Creation and Production events share same event due to having the same ObjectiveType code.

OnCreatureGathered ( CollectEventArgs args ) : void

Updates gathering objectives.

OnCreatureKilledByPlayer ( Creature creature, Creature killer ) : void

Updates kill objectives.

OnCreatureLevelUp ( Creature creature ) : void

Checks prerequisites.

OnPlayerClearedDungeon ( Creature creature, Dungeon dungeon ) : void

Updates ClearDungeon objectives.

OnPlayerCompletesQuest ( Creature creature, int questId ) : void

Checks prerequisites.

OnPlayerEquipsItem ( Creature creature, Item item ) : void

Updates equip objectives.

OnPlayerLoggedIn ( Creature character ) : void

Checks and starts auto quests.

OnPlayerReceivesOrRemovesItem ( Creature creature, int itemId, int amount ) : void

Updates collect objectives.

OnPlayerUsedSkill ( Creature creature, Skill skill ) : void

Updates UseSkill objectives.

OnSkillRankChanged ( Creature creature, Skill skill ) : void

Updates reach rank objectives.

UpdateQuest ( Creature creature, Aura.Channel.World.Quests.Quest quest ) : void

Updates quest on client(s), depending on its type.

Method Details

AP() protected method

protected AP ( short amount ) : QuestReward
amount short
return Aura.Channel.World.Quests.QuestReward

AddObjective() protected method

Adds objective that has to be cleared to complete the quest.
protected AddObjective ( string ident, string description, int regionId, int x, int y, QuestObjective objective ) : void
ident string
description string
regionId int
x int
y int
objective Aura.Channel.World.Quests.QuestObjective
return void

AddPrerequisite() protected method

Adds prerequisite that has to be met before auto receiving the quest.
protected AddPrerequisite ( QuestPrerequisite prerequisite ) : void
prerequisite Aura.Channel.World.Quests.QuestPrerequisite
return void

AddReward() protected method

Adds reward the player can get for completing the quest.
protected AddReward ( QuestReward reward, RewardOptions options = RewardOptions.None ) : void
reward Aura.Channel.World.Quests.QuestReward
options RewardOptions
return void

AddReward() protected method

Adds reward to a specific reward group, that the player can select after completing the quest.
Mainly used for PTJs.
protected AddReward ( int groupId, RewardGroupType type, QuestResult result, QuestReward reward, RewardOptions options = RewardOptions.None ) : void
groupId int
type RewardGroupType
result QuestResult
reward Aura.Channel.World.Quests.QuestReward
options RewardOptions
return void

And() protected method

protected And ( ) : QuestPrerequisite
return Aura.Channel.World.Quests.QuestPrerequisite

CheckCurrentObjective() public method

Checks and updates current obective's count.
public CheckCurrentObjective ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
return void

ClearDungeon() protected method

protected ClearDungeon ( string dungeonName ) : QuestObjective
dungeonName string
return Aura.Channel.World.Quests.QuestObjective

Collect() protected method

protected Collect ( int itemId, int amount ) : QuestObjective
itemId int
amount int
return Aura.Channel.World.Quests.QuestObjective

Completed() protected method

protected Completed ( int questId ) : QuestPrerequisite
questId int
return Aura.Channel.World.Quests.QuestPrerequisite

Create() protected method

protected Create ( int itemId, int amount, SkillId skillId, int quality = -1000 ) : QuestObjective
itemId int
amount int
skillId SkillId
quality int
return Aura.Channel.World.Quests.QuestObjective

Deliver() protected method

protected Deliver ( int itemId, string npcName ) : QuestObjective
itemId int
npcName string
return Aura.Channel.World.Quests.QuestObjective

Dispose() public method

Disposes quest script, removing all subscriptions.
public Dispose ( ) : void
return void

Enchant() protected method

protected Enchant ( int optionSetId ) : QuestReward
optionSetId int
return Aura.Channel.World.Quests.QuestReward

Equip() protected method

protected Equip ( string tag ) : QuestObjective
tag string
return Aura.Channel.World.Quests.QuestObjective

EventActive() protected method

protected EventActive ( string gameEventId ) : QuestPrerequisite
gameEventId string
return Aura.Channel.World.Quests.QuestPrerequisite

Exp() protected method

protected Exp ( int amount ) : QuestReward
amount int
return Aura.Channel.World.Quests.QuestReward

ExplExp() protected method

protected ExplExp ( int amount ) : QuestReward
amount int
return Aura.Channel.World.Quests.QuestReward

Gather() protected method

protected Gather ( int itemId, int amount ) : QuestObjective
itemId int
amount int
return Aura.Channel.World.Quests.QuestObjective

GetDefaultRewardGroup() public method

Returns the default reward group (0 or 1).
public GetDefaultRewardGroup ( ) : QuestRewardGroup
return Aura.Channel.World.Quests.QuestRewardGroup

GetKeyword() protected method

protected GetKeyword ( string keyword ) : QuestObjective
keyword string
return Aura.Channel.World.Quests.QuestObjective

GetRewards() public method

Returns rewards for the given group and result.
Mainly used for PTJs.
public GetRewards ( int rewardGroup, QuestResult result ) : ICollection
rewardGroup int
result QuestResult
return ICollection

Gold() protected method

protected Gold ( int amount ) : QuestReward
amount int
return Aura.Channel.World.Quests.QuestReward

Init() public method

Initializes the script, loading the information and adding it to the script manager.
public Init ( ) : bool
return bool

Item() protected method

protected Item ( int itemId, int amount = 1 ) : QuestReward
itemId int
amount int
return Aura.Channel.World.Quests.QuestReward

Keyword() protected method

protected Keyword ( string keyword ) : QuestReward
keyword string
return Aura.Channel.World.Quests.QuestReward

Kill() protected method

protected Kill ( int amount, string raceType ) : QuestObjective
amount int
raceType string
return Aura.Channel.World.Quests.QuestObjective

NotSkill() protected method

protected NotSkill ( SkillId skillId, SkillRank rank = SkillRank.Novice ) : QuestPrerequisite
skillId SkillId
rank SkillRank
return Aura.Channel.World.Quests.QuestPrerequisite

OnComplete() public method

public OnComplete ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
return void

OnReceive() public method

public OnReceive ( Creature creature ) : void
creature Aura.Channel.World.Entities.Creature
return void

Or() protected method

protected Or ( ) : QuestPrerequisite
return Aura.Channel.World.Quests.QuestPrerequisite

Pattern() protected method

protected Pattern ( int itemId, int formId, int useCount ) : QuestReward
itemId int
formId int
useCount int
return Aura.Channel.World.Quests.QuestReward

QuestScript() public method

Creates a new quest script instance.
public QuestScript ( ) : System
return System

QuestScroll() protected method

protected QuestScroll ( int questId ) : QuestReward
questId int
return Aura.Channel.World.Quests.QuestReward

ReachLevel() protected method

protected ReachLevel ( int level ) : QuestObjective
level int
return Aura.Channel.World.Quests.QuestObjective

ReachRank() protected method

protected ReachRank ( SkillId skillId, SkillRank rank ) : QuestObjective
skillId SkillId
rank SkillRank
return Aura.Channel.World.Quests.QuestObjective

ReachedAge() protected method

protected ReachedAge ( int age ) : QuestPrerequisite
age int
return Aura.Channel.World.Quests.QuestPrerequisite

ReachedLevel() protected method

protected ReachedLevel ( int level ) : QuestPrerequisite
level int
return Aura.Channel.World.Quests.QuestPrerequisite

ReachedRank() protected method

protected ReachedRank ( SkillId skillId, SkillRank rank ) : QuestPrerequisite
skillId SkillId
rank SkillRank
return Aura.Channel.World.Quests.QuestPrerequisite

ReachedTotalLevel() protected method

protected ReachedTotalLevel ( int level ) : QuestPrerequisite
level int
return Aura.Channel.World.Quests.QuestPrerequisite

SetAdditionalInfo() protected method

Sets additional info of quest.
protected SetAdditionalInfo ( string info ) : void
info string
return void

SetCancelable() protected method

Sets whether the quest can be canceled.
protected SetCancelable ( bool cancelable ) : void
cancelable bool
return void

SetCategory() protected method

Sets quest's category, which is used to determin the tab it appears in.
protected SetCategory ( QuestCategory category ) : void
category QuestCategory
return void

SetClass() protected method

Sets quest's class, which is displayed in squred brackets in front of its name.
protected SetClass ( QuestClass class_ ) : void
class_ QuestClass
return void

SetDelay() protected method

Sets delay with which the quest arrives if sent via owl.
protected SetDelay ( int delay ) : void
delay int
return void

SetDescription() protected method

Sets description of quest.
protected SetDescription ( string description ) : void
description string
return void

SetHours() protected method

Sets PTJ hours.
protected SetHours ( int start, int report, int deadline ) : void
start int
report int
deadline int
return void

SetIcon() protected method

Sets quest's icon.
protected SetIcon ( QuestIcon icon ) : void
icon QuestIcon
return void

SetId() protected method

Sets id of quest.
protected SetId ( int id ) : void
id int
return void

SetLevel() protected method

Sets quest's level (required for PTJ).
protected SetLevel ( QuestLevel level ) : void
level QuestLevel
return void

SetName() protected method

Sets name of quest.
protected SetName ( string name ) : void
name string
return void

SetPtjType() protected method

Sets type for PTJs.
protected SetPtjType ( PtjType type ) : void
type PtjType
return void

SetReceive() protected method

Sets the way you receive the quest.
protected SetReceive ( Receive method ) : void
method Receive
return void

SetScrollId() protected method

Sets id of the quest's item scroll.
protected SetScrollId ( int id ) : void
id int
return void

SetType() protected method

Sets type of quest.
protected SetType ( QuestType type ) : void
type QuestType
return void

Skill() protected method

protected Skill ( SkillId skillId, SkillRank rank ) : QuestReward
skillId SkillId
rank SkillRank
return Aura.Channel.World.Quests.QuestReward

Skill() protected method

protected Skill ( SkillId skillId, SkillRank rank, int training ) : QuestReward
skillId SkillId
rank SkillRank
training int
return Aura.Channel.World.Quests.QuestReward

StatBonus() protected method

protected StatBonus ( Stat stat, int amount ) : QuestReward
stat Stat
amount int
return Aura.Channel.World.Quests.QuestReward

Talk() protected method

protected Talk ( string npcName ) : QuestObjective
npcName string
return Aura.Channel.World.Quests.QuestObjective

UseSkill() protected method

protected UseSkill ( SkillId skillId ) : QuestObjective
skillId SkillId
return Aura.Channel.World.Quests.QuestObjective

WarpScroll() protected method

protected WarpScroll ( int itemId, string portal ) : QuestReward
itemId int
portal string
return Aura.Channel.World.Quests.QuestReward