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

Inheritance: GeneralScript
Afficher le fichier Open project: aura-project/aura Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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

Méthode 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 méthode

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

AddPhrase() protected méthode

Adds phrase to AI.
protected AddPhrase ( string phrase ) : void
phrase string
Résultat void

AutoContinue() public méthode

public AutoContinue ( int duration ) : DialogAutoContinue
duration int
Résultat DialogAutoContinue

Bgm() public méthode

public Bgm ( string file ) : DialogBgm
file string
Résultat DialogBgm

Button() public méthode

public Button ( string text, string keyword = null, string onFrame = null ) : DialogButton
text string
keyword string
onFrame string
Résultat DialogButton

CanDoPtj() public méthode

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
Résultat bool

Cancel() public méthode

Cancels conversation.
public Cancel ( ) : void
Résultat void

Close() public méthode

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.
Résultat void

Close() public méthode

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

Close2() public méthode

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

Close2() public méthode

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

CompletePtj() public méthode

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

CompleteQuest() public méthode

Completes quest (incl rewards).
public CompleteQuest ( int questId ) : void
questId int
Résultat void

Conversation() public méthode

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
Résultat Task

DoingPtj() public méthode

Returns true if a PTJ quest is active.
public DoingPtj ( ) : bool
Résultat bool

DoingPtj() public méthode

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

DoingPtjForNpc() public méthode

Returns true if a PTJ quest is active.
public DoingPtjForNpc ( ) : bool
Résultat bool

DoingPtjForOtherNpc() public méthode

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

Elements() public méthode

public Elements ( ) : DialogElement
Résultat DialogElement

End() public méthode

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

EquipItem() protected méthode

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
Résultat void

ErinnHour() public méthode

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

Exit() public méthode

Throws exception to leave NPC.
public Exit ( ) : void
Résultat void

Expression() public méthode

public Expression ( string expression ) : DialogFaceExpression
expression string
Résultat DialogFaceExpression

FavorExpression() public méthode

public FavorExpression ( ) : DialogFaceExpression
Résultat DialogFaceExpression

FinishQuest() public méthode

Finishes objective in quest.
public FinishQuest ( int questId, string objective ) : bool
questId int
objective string
Résultat bool

GetGiftReaction() protected méthode

Returns NPCs reaction to gifted item.
protected GetGiftReaction ( Item gift ) : GiftReaction
gift Item
Résultat GiftReaction

GetMood() public méthode

Gets the mood.
public GetMood ( ) : NpcMood
Résultat NpcMood

GetMoodString() public méthode

Gets the mood string for the current mood.
public GetMoodString ( ) : string
Résultat string

GetMoodString() public méthode

Gets the mood string for the given mood.
public GetMoodString ( NpcMood mood ) : string
mood NpcMood The mood.
Résultat string

GetPtjDoneCount() public méthode

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

GetPtjQuestLevel() public méthode

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

GetPtjResult() public méthode

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

GetPtjSuccessCount() public méthode

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

Gift() protected méthode

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.
Résultat Task

GiftAsync() public méthode

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

GiveGold() public méthode

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

GiveItem() public méthode

Adds item to player's inventory.
public GiveItem ( Item item ) : bool
item Item
Résultat bool

GiveItem() public méthode

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

GiveItem() public méthode

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
Résultat bool

GiveKeyword() public méthode

Returns true if player has the keyword.
public GiveKeyword ( string keyword ) : void
keyword string
Résultat void

GiveSkill() public méthode

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
Résultat void

GiveUpPtj() public méthode

Gives up Ptj (fail without rewards).
public GiveUpPtj ( ) : void
Résultat void

GiveWarpScroll() public méthode

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

HasItem() public méthode

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

HasKeyword() public méthode

Returns true if player has the keyword.
public HasKeyword ( string keyword ) : bool
keyword string
Résultat bool

HasQuest() public méthode

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

HasSkill() public méthode

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

Hook() protected méthode

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

Hotkey() public méthode

public Hotkey ( string text ) : DialogHotkey
text string
Résultat DialogHotkey

Image() public méthode

public Image ( string name ) : DialogImage
name string
Résultat DialogImage

Image() public méthode

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

Image() public méthode

public Image ( string name, int width, int height ) : DialogImage
name string
width int
height int
Résultat DialogImage

Init() public méthode

Initiates the NPC script, creating and placing the NPC.
public Init ( ) : bool
Résultat bool

Input() public méthode

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

Intro() protected méthode

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

IsSkill() public méthode

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

Keywords() protected méthode

Called from conversation, keyword handling.
protected Keywords ( string keyword ) : Task
keyword string
Résultat Task

List() public méthode

public List ( string text ) : DialogList
text string
Résultat DialogList

List() public méthode

public List ( string text, int height ) : DialogList
text string
height int
Résultat DialogList

List() public méthode

public List ( string text, int height, string cancelKeyword ) : DialogList
text string
height int
cancelKeyword string
Résultat DialogList

Minimap() public méthode

public Minimap ( bool zoom, bool maxSize, bool center ) : DialogMinimap
zoom bool
maxSize bool
center bool
Résultat DialogMinimap

ModifyRelation() public méthode

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
Résultat void

Movie() public méthode

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

Msg() public méthode

Sends dialog to player's client.
public Msg ( ) : void
Résultat void

Msg() public méthode

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

Notice() public méthode

Displays notice.
public Notice ( NoticeType type, string format ) : void
type NoticeType
format string
Résultat void

Notice() public méthode

Displays notice.
public Notice ( string format ) : void
format string
Résultat void

NpcScript() protected méthode

Initializes class
protected NpcScript ( ) : System
Résultat System

OpenBank() public méthode

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

OpenGuildRobeCreation() public méthode

Opens guild robe creation interface.
public OpenGuildRobeCreation ( ) : void
Résultat void

OpenShop() protected méthode

Opens shop for player.
protected OpenShop ( string typeName ) : void
typeName string
Résultat void

PtjDesc() public méthode

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
Résultat DialogPtjDesc

PtjReport() public méthode

public PtjReport ( QuestResult result ) : DialogPtjReport
result QuestResult
Résultat DialogPtjReport

QuestActive() public méthode

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

QuestActiveUncompleted() public méthode

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

QuestCompleted() public méthode

Returns true if quest was completed.
public QuestCompleted ( int questId ) : bool
questId int
Résultat bool

QuestObjective() public méthode

Returns current quest objective.
public QuestObjective ( int questId ) : string
questId int
Résultat string

RandomPtj() public méthode

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
Résultat int

RedeemCoupon() public méthode

Redeems code if found.
public RedeemCoupon ( string code ) : bool
code string
Résultat bool

RemoveItem() public méthode

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

RemoveKeyword() public méthode

Returns true if player has the keyword.
public RemoveKeyword ( string keyword ) : void
keyword string
Résultat void

Repair() public méthode

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

Resume() public méthode

Sets response and returns from Select.
public Resume ( string response ) : void
response string
Résultat void

RndFavorMsg() public méthode

Sends one of the passed messages + FavorExpression.
public RndFavorMsg ( ) : void
Résultat void

RndMsg() public méthode

Sends one of the passed messages.
public RndMsg ( ) : void
Résultat void

Select() public méthode

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

SelectItem() public méthode

public SelectItem ( string title, string caption, string tags ) : DialogSelectItem
title string
caption string
tags string
Résultat DialogSelectItem

SendOwl() public méthode

Sends quest to player via owl.
public SendOwl ( int questId ) : void
questId int
Résultat void

SendOwl() public méthode

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

SetAi() public méthode

Changes the NPC's AI.
public SetAi ( string name ) : void
name string
Résultat void

SetBgm() protected méthode

Sends Msg with Bgm element.
protected SetBgm ( string fileName ) : void
fileName string
Résultat void

SetBody() protected méthode

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
Résultat void

SetColor() protected méthode

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

SetDefaultName() public méthode

public SetDefaultName ( string name ) : DialogSetDefaultName
name string
Résultat DialogSetDefaultName

SetFace() protected méthode

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

SetGiftWeights() protected méthode

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.
Résultat void

SetHoodDown() public méthode

Pulls down the hood of all equipped robes.
public SetHoodDown ( ) : void
Résultat void

SetId() protected méthode

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

SetLocation() protected méthode

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

SetName() protected méthode

Sets NPC's name.
protected SetName ( string name ) : void
name string
Résultat void

SetPortrait() protected méthode

Sets NPC's portrait.
protected SetPortrait ( string name ) : void
name string
Résultat void

SetRace() protected méthode

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
Résultat void

SetStand() protected méthode

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

ShowDirection() public méthode

public ShowDirection ( int x, int y, int angle ) : DialogShowDirection
x int
y int
angle int
Résultat DialogShowDirection

ShowKeywords() protected méthode

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

ShowPosition() public méthode

public ShowPosition ( int region, int x, int y, int remainingTime ) : DialogShowPosition
region int
x int
y int
remainingTime int
Résultat DialogShowPosition

StartConversation() public méthode

Conversation (keywords) loop with initial mood message.
public StartConversation ( ) : Task
Résultat Task

StartPtj() public méthode

Starts PTJ quest.
public StartPtj ( int questId ) : void
questId int
Résultat void

StartQuest() public méthode

(Re)Starts quest.
public StartQuest ( int questId ) : void
questId int
Résultat void

SystemMsg() public méthode

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

SystemNotice() public méthode

Displays as notice and system message.
public SystemNotice ( string format ) : void
format string
Résultat void

Talk() protected méthode

Called when a player starts the conversation.
protected Talk ( ) : Task
Résultat Task

TalkAsync() public méthode

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

TalkPet() protected méthode

Called when a pet starts the conversation.
protected TalkPet ( ) : Task
Résultat Task

Text() public méthode

public Text ( string format ) : DialogText
format string
Résultat DialogText

TrainSkill() protected méthode

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

UpdateRelationAfterGreet() public méthode

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
Résultat void

Upgrade() public méthode

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
Résultat UpgradeResult