Méthode | Description | |
---|---|---|
AcquireItem ( int itemId ) : void |
Adds item to player's inventory and shows an acquire window.
|
|
AutoContinue ( int duration ) : |
||
Bgm ( string file ) : |
||
Button ( string text, string keyword = null, string onFrame = null ) : |
||
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 ( ) : |
||
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 ) : |
||
FavorExpression ( ) : |
||
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 ) : |
||
Image ( string name ) : |
||
Image ( string name, bool localize = false, int width, int height ) : |
||
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é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.
|
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. |
protected AddPhrase ( string phrase ) : void | ||
phrase | string | |
Résultat | void |
public AutoContinue ( int duration ) : |
||
duration | int | |
Résultat |
public Button ( string text, string keyword = null, string onFrame = null ) : |
||
text | string | |
keyword | string | |
onFrame | string | |
Résultat |
public CanDoPtj ( PtjType type, int remaining = 99 ) : bool | ||
type | PtjType | |
remaining | int | |
Résultat | bool |
public Close ( Hide hide, string message ) : void | ||
hide | Hide | |
message | string | Dialog closes immediately if null. |
Résultat | void |
public Close ( string message = null ) : void | ||
message | string | Dialog closes immediately if null. |
Résultat | void |
public Close2 ( Hide hide, string message ) : void | ||
hide | Hide | |
message | string | Dialog closes immediately if null. |
Résultat | void |
public Close2 ( string message = null ) : void | ||
message | string | Dialog closes immediately if null. |
Résultat | void |
public CompletePtj ( string rewardReply ) : void | ||
rewardReply | string | Example: @reward:0 |
Résultat | void |
public CompleteQuest ( int questId ) : void | ||
questId | int | |
Résultat | void |
protected EquipItem ( Pocket pocket, int itemId, uint color1, uint color2, uint color3, ItemState state = ItemState.Up ) : void | ||
itemId | int | |
color1 | uint | |
color2 | uint | |
color3 | uint | |
state | ItemState | For robes and helmets |
Résultat | void |
public ErinnHour ( int min, int max ) : bool | ||
min | int | |
max | int | |
Résultat | bool |
public Expression ( string expression ) : |
||
expression | string | |
Résultat |
public FavorExpression ( ) : |
||
Résultat |
public FinishQuest ( int questId, string objective ) : bool | ||
questId | int | |
objective | string | |
Résultat | bool |
protected GetGiftReaction ( Item gift ) : GiftReaction | ||
gift | Item | |
Résultat | GiftReaction |
public GetMoodString ( NpcMood mood ) : string | ||
mood | NpcMood | The mood. |
Résultat | string |
public GetPtjDoneCount ( PtjType type ) : int | ||
type | PtjType | |
Résultat | int |
public GetPtjQuestLevel ( PtjType type ) : QuestLevel | ||
type | PtjType | |
Résultat | QuestLevel |
public GetPtjSuccessCount ( PtjType type ) : int | ||
type | PtjType | |
Résultat | int |
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 |
public GiveItem ( int itemId, int amount = 1 ) : bool | ||
itemId | int | |
amount | int | |
Résultat | bool |
public GiveItem ( int itemId, uint color1, uint color2, uint color3 ) : bool | ||
itemId | int | |
color1 | uint | |
color2 | uint | |
color3 | uint | |
Résultat | bool |
public GiveKeyword ( string keyword ) : void | ||
keyword | string | |
Résultat | void |
public GiveSkill ( SkillId skillId, SkillRank rank = SkillRank.Novice ) : void | ||
skillId | SkillId | |
rank | SkillRank | |
Résultat | void |
public GiveWarpScroll ( int itemId, string portal ) : bool | ||
itemId | int | |
portal | string | |
Résultat | bool |
public HasItem ( int itemId, int amount = 1 ) : bool | ||
itemId | int | |
amount | int | |
Résultat | bool |
public HasKeyword ( string keyword ) : bool | ||
keyword | string | |
Résultat | bool |
public HasSkill ( SkillId skillId, SkillRank rank = SkillRank.Novice ) : bool | ||
skillId | SkillId | |
rank | SkillRank | |
Résultat | bool |
public Hotkey ( string text ) : |
||
text | string | |
Résultat |
public Image ( string name, bool localize = false, int width, int height ) : |
||
name | string | |
localize | bool | |
width | int | |
height | int | |
Résultat |
public Image ( string name, int width, int height ) : DialogImage | ||
name | string | |
width | int | |
height | int | |
Résultat | DialogImage |
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 |
public IsSkill ( SkillId skillId, SkillRank rank ) : bool | ||
skillId | SkillId | |
rank | SkillRank | |
Résultat | bool |
protected Keywords ( string keyword ) : Task | ||
keyword | string | |
Résultat | Task |
public List ( string text, int height ) : DialogList | ||
text | string | |
height | int | |
Résultat | DialogList |
public List ( string text, int height, string cancelKeyword ) : DialogList | ||
text | string | |
height | int | |
cancelKeyword | string | |
Résultat | DialogList |
public Minimap ( bool zoom, bool maxSize, bool center ) : DialogMinimap | ||
zoom | bool | |
maxSize | bool | |
center | bool | |
Résultat | DialogMinimap |
public ModifyRelation ( int memory, int favor, int stress ) : void | ||
memory | int | |
favor | int | |
stress | int | |
Résultat | void |
public Movie ( string file, int width, int height, bool loop = true ) : DialogMovie | ||
file | string | |
width | int | |
height | int | |
loop | bool | |
Résultat | DialogMovie |
public Notice ( NoticeType type, string format ) : void | ||
type | NoticeType | |
format | string | |
Résultat | void |
public OpenBank ( string bankId ) : void | ||
bankId | string | The unique identifier for the bank to open. |
Résultat | void |
protected OpenShop ( string typeName ) : void | ||
typeName | string | |
Résultat | void |
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 |
public PtjReport ( QuestResult result ) : DialogPtjReport | ||
result | QuestResult | |
Résultat | DialogPtjReport |
public QuestActive ( int questId, string objective = null ) : bool | ||
questId | int | |
objective | string | |
Résultat | bool |
public QuestActiveUncompleted ( int questId ) : bool | ||
questId | int | |
Résultat | bool |
public QuestCompleted ( int questId ) : bool | ||
questId | int | |
Résultat | bool |
public QuestObjective ( int questId ) : string | ||
questId | int | |
Résultat | string |
public RemoveItem ( int itemId, int amount = 1 ) : bool | ||
itemId | int | |
amount | int | |
Résultat | bool |
public RemoveKeyword ( string keyword ) : void | ||
keyword | string | |
Résultat | void |
public Repair ( string repairReply, int rate ) : RepairResult | ||
repairReply | string | |
rate | int | |
Résultat | RepairResult |
public SelectItem ( string title, string caption, string tags ) : DialogSelectItem | ||
title | string | |
caption | string | |
tags | string | |
Résultat | DialogSelectItem |
public SendOwl ( int questId, int delay ) : void | ||
questId | int | |
delay | int | Arrival delay in seconds. |
Résultat | void |
protected SetBgm ( string fileName ) : void | ||
fileName | string | |
Résultat | void |
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 |
protected SetColor ( uint color1 = 0x808080, uint color2 = 0x808080, uint color3 = 0x808080 ) : void | ||
color1 | uint | |
color2 | uint | |
color3 | uint | |
Résultat | void |
public SetDefaultName ( string name ) : DialogSetDefaultName | ||
name | string | |
Résultat | DialogSetDefaultName |
protected SetFace ( byte skinColor, short eyeType, byte eyeColor, byte mouthType ) : void | ||
skinColor | byte | |
eyeType | short | |
eyeColor | byte | |
mouthType | byte | |
Résultat | void |
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 |
protected SetLocation ( int regionId, int x, int y, byte direction ) : void | ||
regionId | int | |
x | int | |
y | int | |
direction | byte | |
Résultat | void |
protected SetPortrait ( string name ) : void | ||
name | string | |
Résultat | void |
protected SetStand ( string stand, string talkStand = null ) : void | ||
stand | string | |
talkStand | string | |
Résultat | void |
public ShowDirection ( int x, int y, int angle ) : DialogShowDirection | ||
x | int | |
y | int | |
angle | int | |
Résultat | DialogShowDirection |
public ShowPosition ( int region, int x, int y, int remainingTime ) : DialogShowPosition | ||
region | int | |
x | int | |
y | int | |
remainingTime | int | |
Résultat | DialogShowPosition |
public SystemNotice ( string format ) : void | ||
format | string | |
Résultat | void |
protected TrainSkill ( SkillId skillId, int condition ) : void | ||
skillId | SkillId | |
condition | int | |
Résultat | void |
public Upgrade ( string upgradeReply ) : UpgradeResult | ||
upgradeReply | string | |
Résultat | UpgradeResult |