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

Inheritance: GeneralScript
Show file Open project: aura-project/aura Class Usage Examples

Public Methods

Method Description
AcquireItem ( int itemId ) : void

Adds item to player's inventory and shows an acquire window.

AutoContinue ( int duration ) : DialogAutoContinue
Bgm ( string file ) : DialogBgm
Button ( string text, string keyword = null, string onFrame = null ) : DialogButton
CanDoPtj ( PtjType type, int remaining = 99 ) : bool

Returns true if the player can do a PTJ of type, because he hasn't done one of the same type today.

Cancel ( ) : void

Cancels conversation.

Close ( Hide hide, string message ) : void

Closes dialog box, by sending NpcTalkEndR, and leaves the NPC.

Close ( string message = null ) : void

Closes dialog box, by sending NpcTalkEndR, and leaves the NPC.

Close2 ( Hide hide, string message ) : void

Sends NpcTalkEndR but doesn't leave NPC.

Close2 ( string message = null ) : void

Sends NpcTalkEndR but doesn't leave NPC.

CompletePtj ( string rewardReply ) : void

Completes PTJ quest, if one is active. Rewards the selected rewards.

CompleteQuest ( int questId ) : void

Completes quest (incl rewards).

Conversation ( ) : Task

Conversation (keywords) loop.

This is a separate method so it can be called from hooks that go into keyword handling after they're done, without mood message.

DoingPtj ( ) : bool

Returns true if a PTJ quest is active.

DoingPtj ( PtjType type ) : bool

Returns true if a PTJ quest is active and its type matches the given one.

DoingPtjForNpc ( ) : bool

Returns true if a PTJ quest is active.

DoingPtjForOtherNpc ( ) : bool

Returns true if a PTJ quest is active for a different NPC.

Elements ( ) : DialogElement
End ( string message = null ) : void

Sends Close, using either the message or the standard ending phrase.

ErinnHour ( int min, int max ) : bool

Returns true if Erinn time is between min (incl.) and max (excl.).

Exit ( ) : void

Throws exception to leave NPC.

Expression ( string expression ) : DialogFaceExpression
FavorExpression ( ) : DialogFaceExpression
FinishQuest ( int questId, string objective ) : bool

Finishes objective in quest.

GetMood ( ) : NpcMood

Gets the mood.

GetMoodString ( ) : string

Gets the mood string for the current mood.

GetMoodString ( NpcMood mood ) : string

Gets the mood string for the given mood.

GetPtjDoneCount ( PtjType type ) : int

Returns number of times the player has done the given PTJ type.

GetPtjQuestLevel ( PtjType type ) : QuestLevel

Returns the player's level (basic, int, adv) for the given PTJ type.

GetPtjResult ( ) : QuestResult

Returns how well the current PTJ has been done (so far).

GetPtjSuccessCount ( PtjType type ) : int

Returns number of times the player has successfully done the given PTJ type.

GiftAsync ( Item gift ) : void

Called from packet handler when a player starts the conversation with a gift.

GiveGold ( int amount ) : bool

Adds given amount of gold to the player's inventory.

GiveItem ( Item item ) : bool

Adds item to player's inventory.

GiveItem ( int itemId, int amount = 1 ) : bool

Adds item(s) to player's inventory.

GiveItem ( int itemId, uint color1, uint color2, uint color3 ) : bool

Adds an item to player's inventory with specific colors.

GiveKeyword ( string keyword ) : void

Returns true if player has the keyword.

GiveSkill ( SkillId skillId, SkillRank rank = SkillRank.Novice ) : void

Gives skill to player if he doesn't have it on that rank yet.

GiveUpPtj ( ) : void

Gives up Ptj (fail without rewards).

GiveWarpScroll ( int itemId, string portal ) : bool

Adds warp scroll to player's inventory.

HasItem ( int itemId, int amount = 1 ) : bool

Checks if player has item(s) in their inventory.

HasKeyword ( string keyword ) : bool

Returns true if player has the keyword.

HasQuest ( int questId ) : bool

Returns true if player has quest, completed or not.

HasSkill ( SkillId skillId, SkillRank rank = SkillRank.Novice ) : bool

Checks if player has the skill.

Hotkey ( string text ) : DialogHotkey
Image ( string name ) : DialogImage
Image ( string name, bool localize = false, int width, int height ) : DialogImage
Image ( string name, int width, int height ) : DialogImage
Init ( ) : bool

Initiates the NPC script, creating and placing the NPC.

Input ( string title = "Input", string text = "", byte maxLength = 20, bool cancelable = true ) : DialogInput
IsSkill ( SkillId skillId, SkillRank rank ) : bool

Checks if player has the skill on the specified rank.

List ( string text ) : DialogList
List ( string text, int height ) : DialogList
List ( string text, int height, string cancelKeyword ) : DialogList
Minimap ( bool zoom, bool maxSize, bool center ) : DialogMinimap
ModifyRelation ( int memory, int favor, int stress ) : void

Modifies memory, favor, and stress and sends random reaction message based on the favor change.

Movie ( string file, int width, int height, bool loop = true ) : DialogMovie
Msg ( ) : void

Sends dialog to player's client.

Msg ( Hide hide ) : void

Sends dialog to player's client.

Notice ( NoticeType type, string format ) : void

Displays notice.

Notice ( string format ) : void

Displays notice.

OpenBank ( string bankId ) : void

Opens bank window.

OpenGuildRobeCreation ( ) : void

Opens guild robe creation interface.

PtjDesc ( int questId, string name, string title, int maxAvailableJobs, int remainingJobs, int history ) : DialogPtjDesc
PtjReport ( QuestResult result ) : DialogPtjReport
QuestActive ( int questId, string objective = null ) : bool

Returns true if quest is in progress.

QuestActiveUncompleted ( int questId ) : bool

Returns true if player has quest, but it's not done yet, or hasn't been completed.

QuestCompleted ( int questId ) : bool

Returns true if quest was completed.

QuestObjective ( int questId ) : string

Returns current quest objective.

RandomPtj ( PtjType type ) : int

Returns a random quest id from the given ones, based on the current Erinn day and the player's success rate for this PTJ type.

RedeemCoupon ( string code ) : bool

Redeems code if found.

RemoveItem ( int itemId, int amount = 1 ) : bool

Removes item(s) from a player's inventory.

RemoveKeyword ( string keyword ) : void

Returns true if player has the keyword.

Repair ( string repairReply, int rate ) : RepairResult

Tries to repair item specified in the repair reply.

Resume ( string response ) : void

Sets response and returns from Select.

RndFavorMsg ( ) : void

Sends one of the passed messages + FavorExpression.

RndMsg ( ) : void

Sends one of the passed messages.

Select ( ) : Task

Informs the client that something can be selected now.

SelectItem ( string title, string caption, string tags ) : DialogSelectItem
SendOwl ( int questId ) : void

Sends quest to player via owl.

SendOwl ( int questId, int delay ) : void

Sends quest to player via owl after the delay.

SetAi ( string name ) : void

Changes the NPC's AI.

SetDefaultName ( string name ) : DialogSetDefaultName
SetHoodDown ( ) : void

Pulls down the hood of all equipped robes.

ShowDirection ( int x, int y, int angle ) : DialogShowDirection
ShowPosition ( int region, int x, int y, int remainingTime ) : DialogShowPosition
StartConversation ( ) : Task

Conversation (keywords) loop with initial mood message.

StartPtj ( int questId ) : void

Starts PTJ quest.

StartQuest ( int questId ) : void

(Re)Starts quest.

SystemMsg ( string format ) : void

Displays system message in player's chat log.

SystemNotice ( string format ) : void

Displays as notice and system message.

TalkAsync ( ) : void

Called from packet handler when a player starts the conversation.

Text ( string format ) : DialogText
UpdateRelationAfterGreet ( ) : void

Updates relation between NPC and Player based on current relation values.

Handles common update of relation values, which almost all NPCs do, after greeting the player on the start of a Conversation.

Upgrade ( string upgradeReply ) : UpgradeResult

Tries to upgrade item specified in the reply.

Only warn when something goes wrong, because problems can be caused by replies unknown to us or an outdated database. The NPCs don't have replies for failed upgrades, because the client disables invalid upgrades, you shouldn't be able to get a fail, unless you "hacked", modified client files, or Aura is outdated.

Protected Methods

Method Description
AddPhrase ( string phrase ) : void

Adds phrase to AI.

EquipItem ( Pocket pocket, int itemId, uint color1, uint color2, uint color3, ItemState state = ItemState.Up ) : void

Adds item to NPC's inventory.

GetGiftReaction ( Item gift ) : GiftReaction

Returns NPCs reaction to gifted item.

Gift ( Item gift, GiftReaction reaction ) : Task

Called from Gift, override to react to gifts.

Hook ( string hookName ) : Task

Execute Hook! Harhar.

Runs all hook funcs, one by one.

Intro ( ) : Task

Joins lines and sends them as Msg, but only once per creature and NPC per session.

Keywords ( string keyword ) : Task

Called from conversation, keyword handling.

NpcScript ( ) : System

Initializes class

OpenShop ( string typeName ) : void

Opens shop for player.

SetBgm ( string fileName ) : void

Sends Msg with Bgm element.

SetBody ( float height = 1, float weight = 1, float upper = 1, float lower = 1 ) : void

Sets NPC's body proportions.

SetColor ( uint color1 = 0x808080, uint color2 = 0x808080, uint color3 = 0x808080 ) : void

Sets NPC's color values.

SetFace ( byte skinColor, short eyeType, byte eyeColor, byte mouthType ) : void

Sets NPC's face values.

SetGiftWeights ( float adult, float anime, float beauty, float individuality, float luxury, float maniac, float meaning, float rarity, float sexy, float toughness, float utility ) : void

Sets the gift weights.

SetId ( long entityId ) : void

Sets id of the NPC.

Only required for NPCs like Nao and Tin, avoid if possible!

SetLocation ( int regionId, int x, int y, byte direction ) : void

Sets NPC's location.

SetName ( string name ) : void

Sets NPC's name.

SetPortrait ( string name ) : void

Sets NPC's portrait.

SetRace ( int raceId ) : void

Sets NPC's race.

This must be the first setup method called, since it creates the NPC with its default settings.

SetStand ( string stand, string talkStand = null ) : void

Sets NPC's stand style.

ShowKeywords ( ) : void

Opens keyword window.

Select should be sent afterwards... so you can actually select a keyword.

Talk ( ) : Task

Called when a player starts the conversation.

TalkPet ( ) : Task

Called when a pet starts the conversation.

TrainSkill ( SkillId skillId, int condition ) : void

Trains the specified condition for skill by one.

Private Methods

Method Description
HtmlEncode ( string html ) : string

Encodes HTML characters in string.

Encodes &, >, <, ", and \. Custom method, as HttpUtility.HtmlEncode encodes UTF8 characters, but the client doesn't understand the codes.

Method Details

AcquireItem() public method

Adds item to player's inventory and shows an acquire window.
public AcquireItem ( int itemId ) : void
itemId int
return void

AddPhrase() protected method

Adds phrase to AI.
protected AddPhrase ( string phrase ) : void
phrase string
return void

AutoContinue() public method

public AutoContinue ( int duration ) : DialogAutoContinue
duration int
return DialogAutoContinue

Bgm() public method

public Bgm ( string file ) : DialogBgm
file string
return DialogBgm

Button() public method

public Button ( string text, string keyword = null, string onFrame = null ) : DialogButton
text string
keyword string
onFrame string
return DialogButton

CanDoPtj() public method

Returns true if the player can do a PTJ of type, because he hasn't done one of the same type today.
public CanDoPtj ( PtjType type, int remaining = 99 ) : bool
type PtjType
remaining int
return bool

Cancel() public method

Cancels conversation.
public Cancel ( ) : void
return void

Close() public method

Closes dialog box, by sending NpcTalkEndR, and leaves the NPC.
public Close ( Hide hide, string message ) : void
hide Hide
message string Dialog closes immediately if null.
return void

Close() public method

Closes dialog box, by sending NpcTalkEndR, and leaves the NPC.
public Close ( string message = null ) : void
message string Dialog closes immediately if null.
return void

Close2() public method

Sends NpcTalkEndR but doesn't leave NPC.
public Close2 ( Hide hide, string message ) : void
hide Hide
message string Dialog closes immediately if null.
return void

Close2() public method

Sends NpcTalkEndR but doesn't leave NPC.
public Close2 ( string message = null ) : void
message string Dialog closes immediately if null.
return void

CompletePtj() public method

Completes PTJ quest, if one is active. Rewards the selected rewards.
public CompletePtj ( string rewardReply ) : void
rewardReply string Example: @reward:0
return void

CompleteQuest() public method

Completes quest (incl rewards).
public CompleteQuest ( int questId ) : void
questId int
return void

Conversation() public method

Conversation (keywords) loop.
This is a separate method so it can be called from hooks that go into keyword handling after they're done, without mood message.
public Conversation ( ) : Task
return Task

DoingPtj() public method

Returns true if a PTJ quest is active.
public DoingPtj ( ) : bool
return bool

DoingPtj() public method

Returns true if a PTJ quest is active and its type matches the given one.
public DoingPtj ( PtjType type ) : bool
type PtjType
return bool

DoingPtjForNpc() public method

Returns true if a PTJ quest is active.
public DoingPtjForNpc ( ) : bool
return bool

DoingPtjForOtherNpc() public method

Returns true if a PTJ quest is active for a different NPC.
public DoingPtjForOtherNpc ( ) : bool
return bool

Elements() public method

public Elements ( ) : DialogElement
return DialogElement

End() public method

Sends Close, using either the message or the standard ending phrase.
public End ( string message = null ) : void
message string
return void

EquipItem() protected method

Adds item to NPC's inventory.
protected EquipItem ( Pocket pocket, int itemId, uint color1, uint color2, uint color3, ItemState state = ItemState.Up ) : void
pocket Pocket
itemId int
color1 uint
color2 uint
color3 uint
state ItemState For robes and helmets
return void

ErinnHour() public method

Returns true if Erinn time is between min (incl.) and max (excl.).
public ErinnHour ( int min, int max ) : bool
min int
max int
return bool

Exit() public method

Throws exception to leave NPC.
public Exit ( ) : void
return void

Expression() public method

public Expression ( string expression ) : DialogFaceExpression
expression string
return DialogFaceExpression

FavorExpression() public method

public FavorExpression ( ) : DialogFaceExpression
return DialogFaceExpression

FinishQuest() public method

Finishes objective in quest.
public FinishQuest ( int questId, string objective ) : bool
questId int
objective string
return bool

GetGiftReaction() protected method

Returns NPCs reaction to gifted item.
protected GetGiftReaction ( Item gift ) : GiftReaction
gift Item
return GiftReaction

GetMood() public method

Gets the mood.
public GetMood ( ) : NpcMood
return NpcMood

GetMoodString() public method

Gets the mood string for the current mood.
public GetMoodString ( ) : string
return string

GetMoodString() public method

Gets the mood string for the given mood.
public GetMoodString ( NpcMood mood ) : string
mood NpcMood The mood.
return string

GetPtjDoneCount() public method

Returns number of times the player has done the given PTJ type.
public GetPtjDoneCount ( PtjType type ) : int
type PtjType
return int

GetPtjQuestLevel() public method

Returns the player's level (basic, int, adv) for the given PTJ type.
public GetPtjQuestLevel ( PtjType type ) : QuestLevel
type PtjType
return QuestLevel

GetPtjResult() public method

Returns how well the current PTJ has been done (so far).
public GetPtjResult ( ) : QuestResult
return QuestResult

GetPtjSuccessCount() public method

Returns number of times the player has successfully done the given PTJ type.
public GetPtjSuccessCount ( PtjType type ) : int
type PtjType
return int

Gift() protected method

Called from Gift, override to react to gifts.
protected Gift ( Item gift, GiftReaction reaction ) : Task
gift Item Item gifted to the NPC by the player.
reaction GiftReaction NPCs reaction to the gift.
return Task

GiftAsync() public method

Called from packet handler when a player starts the conversation with a gift.
public GiftAsync ( Item gift ) : void
gift Item
return void

GiveGold() public method

Adds given amount of gold to the player's inventory.
public GiveGold ( int amount ) : bool
amount int
return bool

GiveItem() public method

Adds item to player's inventory.
public GiveItem ( Item item ) : bool
item Item
return bool

GiveItem() public method

Adds item(s) to player's inventory.
public GiveItem ( int itemId, int amount = 1 ) : bool
itemId int
amount int
return bool

GiveItem() public method

Adds an item to player's inventory with specific colors.
public GiveItem ( int itemId, uint color1, uint color2, uint color3 ) : bool
itemId int
color1 uint
color2 uint
color3 uint
return bool

GiveKeyword() public method

Returns true if player has the keyword.
public GiveKeyword ( string keyword ) : void
keyword string
return void

GiveSkill() public method

Gives skill to player if he doesn't have it on that rank yet.
public GiveSkill ( SkillId skillId, SkillRank rank = SkillRank.Novice ) : void
skillId SkillId
rank SkillRank
return void

GiveUpPtj() public method

Gives up Ptj (fail without rewards).
public GiveUpPtj ( ) : void
return void

GiveWarpScroll() public method

Adds warp scroll to player's inventory.
public GiveWarpScroll ( int itemId, string portal ) : bool
itemId int
portal string
return bool

HasItem() public method

Checks if player has item(s) in their inventory.
public HasItem ( int itemId, int amount = 1 ) : bool
itemId int
amount int
return bool

HasKeyword() public method

Returns true if player has the keyword.
public HasKeyword ( string keyword ) : bool
keyword string
return bool

HasQuest() public method

Returns true if player has quest, completed or not.
public HasQuest ( int questId ) : bool
questId int
return bool

HasSkill() public method

Checks if player has the skill.
public HasSkill ( SkillId skillId, SkillRank rank = SkillRank.Novice ) : bool
skillId SkillId
rank SkillRank
return bool

Hook() protected method

Execute Hook! Harhar.
Runs all hook funcs, one by one.
protected Hook ( string hookName ) : Task
hookName string
return Task

Hotkey() public method

public Hotkey ( string text ) : DialogHotkey
text string
return DialogHotkey

Image() public method

public Image ( string name ) : DialogImage
name string
return DialogImage

Image() public method

public Image ( string name, bool localize = false, int width, int height ) : DialogImage
name string
localize bool
width int
height int
return DialogImage

Image() public method

public Image ( string name, int width, int height ) : DialogImage
name string
width int
height int
return DialogImage

Init() public method

Initiates the NPC script, creating and placing the NPC.
public Init ( ) : bool
return bool

Input() public method

public Input ( string title = "Input", string text = "", byte maxLength = 20, bool cancelable = true ) : DialogInput
title string
text string
maxLength byte
cancelable bool
return DialogInput

Intro() protected method

Joins lines and sends them as Msg, but only once per creature and NPC per session.
protected Intro ( ) : Task
return Task

IsSkill() public method

Checks if player has the skill on the specified rank.
public IsSkill ( SkillId skillId, SkillRank rank ) : bool
skillId SkillId
rank SkillRank
return bool

Keywords() protected method

Called from conversation, keyword handling.
protected Keywords ( string keyword ) : Task
keyword string
return Task

List() public method

public List ( string text ) : DialogList
text string
return DialogList

List() public method

public List ( string text, int height ) : DialogList
text string
height int
return DialogList

List() public method

public List ( string text, int height, string cancelKeyword ) : DialogList
text string
height int
cancelKeyword string
return DialogList

Minimap() public method

public Minimap ( bool zoom, bool maxSize, bool center ) : DialogMinimap
zoom bool
maxSize bool
center bool
return DialogMinimap

ModifyRelation() public method

Modifies memory, favor, and stress and sends random reaction message based on the favor change.
public ModifyRelation ( int memory, int favor, int stress ) : void
memory int
favor int
stress int
return void

Movie() public method

public Movie ( string file, int width, int height, bool loop = true ) : DialogMovie
file string
width int
height int
loop bool
return DialogMovie

Msg() public method

Sends dialog to player's client.
public Msg ( ) : void
return void

Msg() public method

Sends dialog to player's client.
public Msg ( Hide hide ) : void
hide Hide
return void

Notice() public method

Displays notice.
public Notice ( NoticeType type, string format ) : void
type NoticeType
format string
return void

Notice() public method

Displays notice.
public Notice ( string format ) : void
format string
return void

NpcScript() protected method

Initializes class
protected NpcScript ( ) : System
return System

OpenBank() public method

Opens bank window.
public OpenBank ( string bankId ) : void
bankId string The unique identifier for the bank to open.
return void

OpenGuildRobeCreation() public method

Opens guild robe creation interface.
public OpenGuildRobeCreation ( ) : void
return void

OpenShop() protected method

Opens shop for player.
protected OpenShop ( string typeName ) : void
typeName string
return void

PtjDesc() public method

public PtjDesc ( int questId, string name, string title, int maxAvailableJobs, int remainingJobs, int history ) : DialogPtjDesc
questId int
name string
title string
maxAvailableJobs int
remainingJobs int
history int
return DialogPtjDesc

PtjReport() public method

public PtjReport ( QuestResult result ) : DialogPtjReport
result QuestResult
return DialogPtjReport

QuestActive() public method

Returns true if quest is in progress.
public QuestActive ( int questId, string objective = null ) : bool
questId int
objective string
return bool

QuestActiveUncompleted() public method

Returns true if player has quest, but it's not done yet, or hasn't been completed.
public QuestActiveUncompleted ( int questId ) : bool
questId int
return bool

QuestCompleted() public method

Returns true if quest was completed.
public QuestCompleted ( int questId ) : bool
questId int
return bool

QuestObjective() public method

Returns current quest objective.
public QuestObjective ( int questId ) : string
questId int
return string

RandomPtj() public method

Returns a random quest id from the given ones, based on the current Erinn day and the player's success rate for this PTJ type.
public RandomPtj ( PtjType type ) : int
type PtjType
return int

RedeemCoupon() public method

Redeems code if found.
public RedeemCoupon ( string code ) : bool
code string
return bool

RemoveItem() public method

Removes item(s) from a player's inventory.
public RemoveItem ( int itemId, int amount = 1 ) : bool
itemId int
amount int
return bool

RemoveKeyword() public method

Returns true if player has the keyword.
public RemoveKeyword ( string keyword ) : void
keyword string
return void

Repair() public method

Tries to repair item specified in the repair reply.
public Repair ( string repairReply, int rate ) : RepairResult
repairReply string
rate int
return RepairResult

Resume() public method

Sets response and returns from Select.
public Resume ( string response ) : void
response string
return void

RndFavorMsg() public method

Sends one of the passed messages + FavorExpression.
public RndFavorMsg ( ) : void
return void

RndMsg() public method

Sends one of the passed messages.
public RndMsg ( ) : void
return void

Select() public method

Informs the client that something can be selected now.
public Select ( ) : Task
return Task

SelectItem() public method

public SelectItem ( string title, string caption, string tags ) : DialogSelectItem
title string
caption string
tags string
return DialogSelectItem

SendOwl() public method

Sends quest to player via owl.
public SendOwl ( int questId ) : void
questId int
return void

SendOwl() public method

Sends quest to player via owl after the delay.
public SendOwl ( int questId, int delay ) : void
questId int
delay int Arrival delay in seconds.
return void

SetAi() public method

Changes the NPC's AI.
public SetAi ( string name ) : void
name string
return void

SetBgm() protected method

Sends Msg with Bgm element.
protected SetBgm ( string fileName ) : void
fileName string
return void

SetBody() protected method

Sets NPC's body proportions.
protected SetBody ( float height = 1, float weight = 1, float upper = 1, float lower = 1 ) : void
height float
weight float
upper float
lower float
return void

SetColor() protected method

Sets NPC's color values.
protected SetColor ( uint color1 = 0x808080, uint color2 = 0x808080, uint color3 = 0x808080 ) : void
color1 uint
color2 uint
color3 uint
return void

SetDefaultName() public method

public SetDefaultName ( string name ) : DialogSetDefaultName
name string
return DialogSetDefaultName

SetFace() protected method

Sets NPC's face values.
protected SetFace ( byte skinColor, short eyeType, byte eyeColor, byte mouthType ) : void
skinColor byte
eyeType short
eyeColor byte
mouthType byte
return void

SetGiftWeights() protected method

Sets the gift weights.
protected SetGiftWeights ( float adult, float anime, float beauty, float individuality, float luxury, float maniac, float meaning, float rarity, float sexy, float toughness, float utility ) : void
adult float How much the NPC likes "adult" items.
anime float How much the NPC likes "anime" items.
beauty float How much the NPC likes "beauty" items.
individuality float How much the NPC likes "indiv" items.
luxury float How much the NPC likes "luxury" items.
maniac float How much the NPC likes "maniac" items.
meaning float How much the NPC likes "meaning" items.
rarity float How much the NPC likes "rarity" items.
sexy float How much the NPC likes "sexy" items.
toughness float How much the NPC likes "toughness" items.
utility float How much the NPC likes "utility" items.
return void

SetHoodDown() public method

Pulls down the hood of all equipped robes.
public SetHoodDown ( ) : void
return void

SetId() protected method

Sets id of the NPC.
Only required for NPCs like Nao and Tin, avoid if possible!
protected SetId ( long entityId ) : void
entityId long
return void

SetLocation() protected method

Sets NPC's location.
protected SetLocation ( int regionId, int x, int y, byte direction ) : void
regionId int
x int
y int
direction byte
return void

SetName() protected method

Sets NPC's name.
protected SetName ( string name ) : void
name string
return void

SetPortrait() protected method

Sets NPC's portrait.
protected SetPortrait ( string name ) : void
name string
return void

SetRace() protected method

Sets NPC's race.
This must be the first setup method called, since it creates the NPC with its default settings.
protected SetRace ( int raceId ) : void
raceId int
return void

SetStand() protected method

Sets NPC's stand style.
protected SetStand ( string stand, string talkStand = null ) : void
stand string
talkStand string
return void

ShowDirection() public method

public ShowDirection ( int x, int y, int angle ) : DialogShowDirection
x int
y int
angle int
return DialogShowDirection

ShowKeywords() protected method

Opens keyword window.
Select should be sent afterwards... so you can actually select a keyword.
protected ShowKeywords ( ) : void
return void

ShowPosition() public method

public ShowPosition ( int region, int x, int y, int remainingTime ) : DialogShowPosition
region int
x int
y int
remainingTime int
return DialogShowPosition

StartConversation() public method

Conversation (keywords) loop with initial mood message.
public StartConversation ( ) : Task
return Task

StartPtj() public method

Starts PTJ quest.
public StartPtj ( int questId ) : void
questId int
return void

StartQuest() public method

(Re)Starts quest.
public StartQuest ( int questId ) : void
questId int
return void

SystemMsg() public method

Displays system message in player's chat log.
public SystemMsg ( string format ) : void
format string
return void

SystemNotice() public method

Displays as notice and system message.
public SystemNotice ( string format ) : void
format string
return void

Talk() protected method

Called when a player starts the conversation.
protected Talk ( ) : Task
return Task

TalkAsync() public method

Called from packet handler when a player starts the conversation.
public TalkAsync ( ) : void
return void

TalkPet() protected method

Called when a pet starts the conversation.
protected TalkPet ( ) : Task
return Task

Text() public method

public Text ( string format ) : DialogText
format string
return DialogText

TrainSkill() protected method

Trains the specified condition for skill by one.
protected TrainSkill ( SkillId skillId, int condition ) : void
skillId SkillId
condition int
return void

UpdateRelationAfterGreet() public method

Updates relation between NPC and Player based on current relation values.
Handles common update of relation values, which almost all NPCs do, after greeting the player on the start of a Conversation.
public UpdateRelationAfterGreet ( ) : void
return void

Upgrade() public method

Tries to upgrade item specified in the reply.
Only warn when something goes wrong, because problems can be caused by replies unknown to us or an outdated database. The NPCs don't have replies for failed upgrades, because the client disables invalid upgrades, you shouldn't be able to get a fail, unless you "hacked", modified client files, or Aura is outdated.
public Upgrade ( string upgradeReply ) : UpgradeResult
upgradeReply string
return UpgradeResult