References: Difference between revisions

From OpenKore Wiki
Jump to navigation Jump to search
(added devotion domain (SVN7141))
 
(25 intermediate revisions by 8 users not shown)
Line 27: Line 27:
Parameters types that may appear in a configuration option's value or a command parameter.
Parameters types that may appear in a configuration option's value or a command parameter.
   
   
{|border="1" cellpadding="2" cellspacing="1"  
=== boolean flag ===
: Option values are interpreted with [http://perldoc.perl.org/perlsyn.html#Truth-and-Falsehood Perl's Truth and Falsehood] rules.
{| border="1" cellpadding="2" cellspacing="1" style="text-align:center"
|- style=background-color:#F9F9F9;
|- style=background-color:#F9F9F9;
!Type
!Value
!Description
!Description
|-
|-
|align=center|flag
| 0 or empty string (unset option)
|A number with special meaning on its current context. The list of meaningful values are always given.
| FALSE (disable)
|-
|-
|align=center|boolean flag
| 1
|A type of flag with only two values: '''1''' to enable and '''0''' to disable.
| TRUE (enable)
|-
|align=center|number
|Any number. This can be a fractional value (separated by dot .) or an integer number.
|-
|align=center|percent
|A number from 1 to 100 that corresponds to a percent. Don't append a percent sign (%) unless otherwise specified.
|-
|align=center|seconds
|The time specified in seconds. Can be a fractional value (ex. 0.5).
|-
|align=center|string
|Any text string.
|}
|}
: Actually, [https://perldoc.perl.org/5.8.8/perlsyn.html#Truth-and-Falsehood boolean flag] (which isn't checked for anything but boolean) can have any value.
: Boolean options MAY be extended in future. In such a case, values of '''0''' and '''1''' SHOULD preserve the old behaviour, and more values MAY be added.
: '''API:''' There is no API per se, just use usual Perl's logic operators.
: '''Examples:'''
if ($config{useDeadlyRay}) { ...
=== flag ===
: A number with special meaning on its current context. The list of meaningful values are always given.
=== number ===
: A number with special meaning on its current context. The list of meaningful values are always given. May be a fractional value (with dot <code>.</code> separator) or just an integer. Empty string (unset option) or strings starting with non-numeric characters are evaluated as in Perl, usually to '''0'''.
: '''Notes:''' This is not a [[References#Range_Operators|range]]. Values like "<code>= 11</code>" would just evaluate to '''0'''.
: '''API:''' There is no API per se, just use usual [http://perldoc.perl.org/perlop.html#Relational-Operators Perl's relational and equality operators].
: '''Examples:'''
if ($config{answerToLifeUniverseAndEverything} == 42) { ...
=== percent ===
: A number from 1 to 100 that corresponds to a percent. Don't append a percent sign (%) unless otherwise specified.


=== seconds ===
: The time specified in seconds. Can be a fractional value (ex. 0.5).
=== string ===
: Any text string.


==Equipment Slots==
==Equipment Slots==
Line 91: Line 104:
|Footwear slot.
|Footwear slot.
|-
|-
|align=center|arrow
|align=center|costumeTopHead
|Arrow or Bullet slot.  
|Upper head costume slot.
|}
 
 
== Message Domains ==
Message domains are names used to classify messages printed in the console.
 
For information about a certain messages that you see in your console, set the option [[showDomain]] in config.txt to '''1''', making Openkore display domains along with messages in the console.
 
{| border="1" cellpadding="2" cellspacing="1"
|- style=background-color:#F9F9F9;
|+ List of known message domains:
!Name
!Description
|-
|-
|align=center|ai_attack
|align=center|costumeMidHead
|Attack messages
|Middle head costume slot.
|-
|-
|align=center|ai_npcTalk
|align=center|costumeLowHead
|NPC talk sequence messages.
|Lower heads costume slot.
|-
|-
|align=center|attacked
|align=center|costumeRobe
|Monster attacks you.
|Robe costume slot.
|-
|-
|align=center|attackedMiss
|align=center|costumeFloor
|Monster attacks you but misses.
|Floor costume slot.
|-
|-
|align=center|attackMon
|align=center|arrow
|You attack monster.
|Arrow or Bullet slot.
|-
|align=center|attackMonMiss
|You attack monster but misses.
|-
|align=center|connection
|Connection messages.
|-
|align=center|console
|Messages without defined group.
|-
|align=center|deal
|Deal messages.
|-
|align=center|devotion
|Devotion messages.
|-
|align=center|drop
|Monster drop related messages.
|-
|align=center|emotion
|Emoticon messages.
|-
|align=center|exp
|Experience gained message.
|-
|align=center|equip
|Equipment switching message.
|-
|align=center|follow
|Follow messages.
|-
|align=center|guildchat
|Guild chat message.
|-
|align=center|guildnotice
|Guild notice message.
|-
|align=center|info
|Character information messages.
|-
|align=center|input
|User input messages.
|-
|align=center|inventory
|Inventory related messages.
|-
|align=center|list
|Actor's list message.
|-
|align=center|load
|Loading config files messages.
|-
|align=center|looter
|Attacking looter message.
|-
|align=center|map_event
|PvP/GvG mode messages.
|-
|align=center|npc
|NPC messages.
|-
|align=center|parseMsg_statuslook
|Changed status/equipment messages.
|-
|align=center|parseMsg/hairColor
|Hair color change message.
|-
|align=center|parseMsg/job
|Job change message.
|-
|align=center|parseMsg/upgrade
|Item upgrading message.
|-
|align=center|party
|Party/follow related message.
|-
|align=center|partychat
|Party chat messages.
|-
|align=center|pet
|Pet related messages.
|-
|align=center|plugins
|Plugin handle messages.
|-
|align=center|pm
|Received private messages.
|-
|align=center|pm/sent
|Sent private messages.
|-
|align=center|portals
|Portal existance messages.
|-
|align=center|portalRecord
|Recording of portals messages.
|-
|align=center|publicchat
|Public chat message.
|-
|align=center|refine
|Weapon refining messages.
|-
|align=center|route
|Routing/pathfinding messages.
|-
|align=center|route_teleport
|Route teleport messages.
|-
|align=center|schat
|GM broadcast messages.
|-
|align=center|selfSkill
|Skills used by yourself messages.
|-
|align=center|skill
|Skills not related to attack messages.
|-
|align=center|sold
|Items sold while vending messages.
|-
|align=center|startup
|Startup messages.
|-
|align=center|storage
|Storage item added/removed messages.
|-
|align=center|success
|Operation succeeded messages.
|-
|align=center|syntax
|Syntax check files messages.
|-
|align=center|teleport
|Teleporting messages.
|-
|align=center|useItem
|Items used by you messages.
|-
|align=center|useTeleport
|Attemp to use teleport messages.
|-
|align=center|waypoint
|Waypoint messages.
|-
|align=center|xkore
|X-Kore system messages.
|}
|}


: Developer Notes
Equipment slot names are defined in [https://github.com/OpenKore/openkore/blob/master/src/Globals.pm#L61 %Globals::equipSlot_lut].


The following is a list of debug domains:
== [[Domain|Message Domains]] ==
{|
{{:Domain}}
|
*ai
*ai_attack
*ai_autoCart
*ai_makeItem
*ai_move
*ai_npcTalk
*attackMonMiss
*autoBreakTime
||
*connection
*d_sendPacket
*debug
*drop
*equipAuto
*guild
*ipc
*Item
||
*monsterSkill
*npc
*packetParser
*parseInput
*parseMsg
*parseMsg_comboDelay
*parseMsg_damage
*parseMsg_move
||
*parseMsg_presence
*parseMsg_presence/name
*parseMsg_presence/player
*parseMsg_presence/remote
*parseMsg_statuslook
*parseSendMsg
*pet
*route
||
*route_teleport
*sendPacket
*sitAuto
*skill
*storage
*useTeleport
*vending
|}


== Names ==
== Names ==
Line 345: Line 155:
'''Example'''
'''Example'''


* For a +4 Cranial Mirror Shield, a Hard Padded Armor, a 3-slotted +5 Double Flammable Boned Saber, and a +6 Very Very Strong Wind Tsurugi, use:
* For a +7 Cranial Mirror Shield, a Hard Padded Armor, a 3-slotted +5 Double Flammable Boned Saber, and a +6 Very Very Strong Wind Tsurugi, use:


  +7 Mirror Shield [Thara Frog] [1]
  +7 Mirror Shield [Thara Frog] [1]
Line 351: Line 161:
  +5 Saber [Skel Worker:Vadon*2] [3]
  +5 Saber [Skel Worker:Vadon*2] [3]
  +6 VVS Wind Tsurugi
  +6 VVS Wind Tsurugi


=== Item Names ===
=== Item Names ===
Line 369: Line 178:
'''Note.'''  
'''Note.'''  
* So far configuration options using item names are not strict with case-sensitivity.  
* So far configuration options using item names are not strict with case-sensitivity.  
* You can also get item's name by using [[Console Commands|console commands]], like '''i, cart, storage'''.
* You can also get item's name by using [[Console Commands|console commands]], like '''[[i]]''', '''[[cart]]''', '''[[storage]]'''.




Line 384: Line 193:


'''Note:'''  
'''Note:'''  
* Ground spell names can also be found using [[Console Commands|console command]] '''spell''' while certain spells are active on the ground.  
* Ground spell names can also be found using [[Console Commands|console command]] '''[[spells]]''' while certain spells are active on the ground.  




Line 401: Line 210:


'''Notes:'''  
'''Notes:'''  
* Map names can also be find using [[Console Commands|console command]] '''where'''.
* Map names can also be find using [[Console Commands|console command]] '''[[where]]'''.




Line 416: Line 225:


'''Notes:'''  
'''Notes:'''  
* You can also find monster name using [[Console Commands|console command]] '''ml''' while certain monters are on screen.  
* You can also find monster name using [[Console Commands|console command]] '''[[ml]]''' while certain monters are on screen.  




=== Player Names ===
=== Player Names ===
----
----
Player names can be found by using the [[Console Commands|console command]] '''pl''' while certain players are on screen.
Player names can be found by using the [[Console Commands|console command]] '''[[pl]]''' while certain players are on screen.


'''Note.''' These are case-sensitive.
'''Note.''' These are case-sensitive.
Line 427: Line 236:


=== Skill Names ===
=== Skill Names ===
----
Skill names can be found at tables\skillnametable.txt, following this syntax:


<skill handle> <skill name>
Skill handles (locale independent) can be found at <code>tables/SKILL_id_handle.txt</code>.


''' Example '''
Skill names (depend on your configuration) can be found at <code>skillnametable.txt</code> used by your configuration.


* Skill name is Basic Skill
Currently used skill names can also be found by inspecting [[skills]], [[homun|homun skills]], [[merc|merc skills]] commands output.
NV_BASIC Basic Skill
 
'''Note:'''
* Your skill names can also be find using [[Console Commands|console command]] '''skills'''.
* If you play for example on iRO, look in tables\iRO\skillnametable.txt for the skill names.
* You can extract skillnametable.txt straight from the grf and use your client's skill names.


=== Status Names ===
=== Status Names ===
----
Status names can be found at tables\skillsailments.txt, tables\skillslooks.txt, tables\skillsstate.txt, tables\skillsstatus.txt, following this syntax:
<skill status ID> <status name>


''' Example '''
Status handles (locale independent) can be found at <code>tables/{AILMENT,LOOK,STATE,STATUS}_id_handle.txt</code>.


* Status name is Poisoned
Corresponding status names (depend on your configuration) can be found at <code>statusnametable.txt</code> used by your configuration.
1 Poisoned


'''Note:'''
Currently used status names can also be found by inspecting Kore output when certain status is received or by using the [[s]] command while certain status are active on you character.
* Status names can be found by using the [[Console Commands|console command]] '''s''' while certain status are active on you character.  


== [[NPC conversation codes]] ==


== NPC Conversation Codes ==
== Range Operators ==
These codes are used for specifying NPC talk sequences or steps when using the [[Console Commands]] or the config.txt options. Each code is separated with a whitespace.
 
{| border="1" cellpadding="2" cellspacing="1"
|-
|+ List of known NPC talk codes.
!Code
!Description
|-
!c
|Continue talking to the NPC. This is the same as pressing the Next buttom.
|-
!r(<response #>)
|Send a response to the NPC. The response number is the index of the responses in the displayed response list . This is the same as selecting a response when you talk to an NPC.
|-
!w(<seconds>)
|Wait for the specified number of seconds before continuing to talk to the NPC.
|-
!d(<number>)
|Send a number to the NPC. Use this if the NPC asks you to enter an amount. 
|-
!align=center|t=(<string>)
|Send a text to the NPC. Use this if the NPC asks you to enter some text.
|-
!s
|Go to sell list. This is the same as pressing the sell button when you talk to a buy/sell NPC.
|-
!b
|Go to the store list. This is the same as pressing the buy button when you talk to a buy/sell NPC.
|-
!b(<store item #>),(<amount>)
|Buy an item from the NPC. See similar [[Console Commands|buy]]. Note that the amount is not optional.
|-
!n
|Ends and cancel conversation with the NPC. This is the same as pressing the close or cancel button when talking to an NPC.
|-
!e
|Wait until the NPC says "Done talking". Use this after the '''s''' or '''b''' talk code when talking to a buy/sell NPC.
|-
!a=(<string>)
|Run a console command.
|-
!x
|Initiate NPC conversation.
|}


User-specified [[wikipedia:Interval (mathematics)|interval]] for an option.


''' Example '''
{| border="1" cellpadding="2" cellspacing="1" style="text-align:center"
 
* Talk to NPC at the coordinates (63, 60), using the talk sequence: Next>Choose fourth response>Next>Choose first response>Next>Next>Choose first response>Next>End.
talknpc 63 60 c r3 c r0 c c r0 c n
 
== Range Operators ==
Range operators provide flexibility in specifying values for some [[config.txt]] options by specifying ranges instead of exact values.
{| border="1" cellpadding="2" cellspacing="1"  
|- style=background-color:#F9F9F9;
|- style=background-color:#F9F9F9;
|+ List of syntaxes for specifying ranges
!Value
!Symbol
!Description
!Description
|-
|-
!align=center|X
| X
|Value is exactly equal to X.
| {X}
|-
|-
!align=center|X..Y
| X..Y
|Includes all numbers from X to Y.
|rowspan="2"| [X, Y]
|-
|-
!align=center|X-Y
| X-Y
|Includes all numbers from X to Y.
|-
|-
!align=center|> X
| > X
|Value is greater than X.
| (X, +∞)
|-
|-
!align=center|>= X
| >= X
|Value is greater than or equal to X.
| [X, +∞)
|-
|-
!align=center|< X
| < X
|Value is less than X.
| (-∞, X)
|-
!align=center|<= X
|Value is less than or equal to X.
|-
|-
| <= X
| (-∞, X]
|}
|}


 
'''API''':
''' Example '''
Features and plugins MUST use [https://github.com/OpenKore/openkore/blob/master/src/Utils.pm#L1070 Utils::inRange(<current value>, <option contents>)] to check any kind of options with range values.
 
* Level is greater than 10
lvl > 10
 
* Zenys is equal to 5000.
zeny 5000
 
* Job level is between 10 and 15
jlvl 10..15
 


== [[:Category:Self Condition|Self Conditions]] ==
== [[:Category:Self Condition|Self Conditions]] ==
{{:Category:Self Condition}}
{{:Category:Self Condition}}
{|border="1"
|
* [[manualAI]]
* [[whenEquipped]]
* whenWater - not working yet
* [[zeny]]
''(TODO: remove these links from this page)''
|}


== Target Conditions ==
== Target Conditions ==
Line 582: Line 299:
{{:Category:Player Condition}}
{{:Category:Player Condition}}


== [[:Category:Skill Use Condition|Skill Use Conditions]] ==
=== [[:Category:Skill Use Condition|Skill Use Conditions]] ===
{{:Category:Skill Use Condition}}
{{:Category:Skill Use Condition}}
=== [[:Category:Idle Condition|Idle Condition]] ===
{{:Category:Idle Condition}}


== [[:Category:Interfaces|Interfaces]] ==
== [[:Category:Interfaces|Interfaces]] ==
{{:Category:Interfaces}}
{{:Category:Interfaces}}

Latest revision as of 23:21, 5 May 2021

Syntax Legends

Syntax format used in declarations of configuration options and commands.

Symbol Description
Bold Elements that the user must type exactly as shown.
< > Information that the user must specify.
( ) Required parameters.
[ ] Optional parameters.
| Means OR. This separates choices from which the user must choose only one.


Basic Value and Parameter Types

Parameters types that may appear in a configuration option's value or a command parameter.

boolean flag

Option values are interpreted with Perl's Truth and Falsehood rules.
Value Description
0 or empty string (unset option) FALSE (disable)
1 TRUE (enable)
Actually, boolean flag (which isn't checked for anything but boolean) can have any value.
Boolean options MAY be extended in future. In such a case, values of 0 and 1 SHOULD preserve the old behaviour, and more values MAY be added.
API: There is no API per se, just use usual Perl's logic operators.
Examples:
if ($config{useDeadlyRay}) { ...

flag

A number with special meaning on its current context. The list of meaningful values are always given.

number

A number with special meaning on its current context. The list of meaningful values are always given. May be a fractional value (with dot . separator) or just an integer. Empty string (unset option) or strings starting with non-numeric characters are evaluated as in Perl, usually to 0.
Notes: This is not a range. Values like "= 11" would just evaluate to 0.
API: There is no API per se, just use usual Perl's relational and equality operators.
Examples:
if ($config{answerToLifeUniverseAndEverything} == 42) { ...

percent

A number from 1 to 100 that corresponds to a percent. Don't append a percent sign (%) unless otherwise specified.

seconds

The time specified in seconds. Can be a fractional value (ex. 0.5).

string

Any text string.

Equipment Slots

Equipment slot names used by Openkore.

List of equipment slots.
Name Description
topHead Upper head slot.
midHead Middle head slot.
lowHead Lower heads slot.
rightHand Right hand slot.
leftHand Left hand slot.
rightAcessory Right Acessory slot.
leftAcessory Left Acessory slot.
armor Armor slot.
robe Gaments slot.
shoes Footwear slot.
costumeTopHead Upper head costume slot.
costumeMidHead Middle head costume slot.
costumeLowHead Lower heads costume slot.
costumeRobe Robe costume slot.
costumeFloor Floor costume slot.
arrow Arrow or Bullet slot.
Developer Notes

Equipment slot names are defined in %Globals::equipSlot_lut.

Message Domains

Message domains are names used to classify messages printed in the console.

For information about a certain messages that you see in your console, set the option showDomain in config.txt to 1, making Openkore display domains along with messages in the console.


Names

Sometimes equipment/item/monster names are different in each server, so Openkore have it's own database in tables folder for defaulting names. Changing the name from the files will affect your configuration.

Equipment Names


Openkore equipment name syntax:

# for normal equipments:
[BROKEN] [+<upgrade level>] (<item name>) [[<card name>[*<number>]] [<number of slots>]]

# for elemental weapons
[BROKEN][+<upgrade level>][VS|VVS|VVVS][Fire|Earth|Wind|Water](<item name>) 

Notes:

  • If the equipment is not broken, omit the BROKEN part.
  • If the equipment is not upgraded, omit the +<upgrade level> part.
  • Use only the monster name for the card name, e.g. use Hydra for the Hydra Card.
  • If there is only one card of a certain type slotted on the equipment, omit the *<number> part.
  • If there are more than one type of cards compounded on the equipment, the <card name>*<number> pair should be colon-separated list. The list should be sorted alphabetically.
  • If the equipment is not slotted, omit the [<number of slots>] part.
  • So far configuration options using item names are not strict with case-sensitivity.
  • If you have the equipment, you can use console commands


Example

  • For a +7 Cranial Mirror Shield, a Hard Padded Armor, a 3-slotted +5 Double Flammable Boned Saber, and a +6 Very Very Strong Wind Tsurugi, use:
+7 Mirror Shield [Thara Frog] [1]
Padded Armor [Pupa] [1]
+5 Saber [Skel Worker:Vadon*2] [3]
+6 VVS Wind Tsurugi

Item Names


Item names can be found at tables\items.txt, following this syntax:

<Item ID>#<item_name>#

In items.txt item names are separated with underscores (_), to use them in your configuration replace them with spaces.


Example

  • Item's name is Mirror Shield.
2107#Mirror_Shield#

Note.

  • So far configuration options using item names are not strict with case-sensitivity.
  • You can also get item's name by using console commands, like i, cart, storage.


Ground Spell Names


Ground spell names can be found at tables\spells.txt, following this syntax:

<Spell ID> <spell name>

Example

  • Ground spell name: Safety Wall
126 Safety Wall

Note:

  • Ground spell names can also be found using console command spells while certain spells are active on the ground.


Map Names


Map names can be found at tables\maps.txt, following this syntax:

<map file name>#<map name>#

Openkore use just the first name of the map in it's configuration files.

Example

  • Map name is Prontera
prontera.rsw#Prontera City#

Notes:


Monster Names


Monster names can be found at tables\monsters.txt, following this syntax:

<monster ID> <monster name>

Example

  • Monster name is Scorpion
1001 Scorpion

Notes:

  • You can also find monster name using console command ml while certain monters are on screen.


Player Names


Player names can be found by using the console command pl while certain players are on screen.

Note. These are case-sensitive.


Skill Names

Skill handles (locale independent) can be found at tables/SKILL_id_handle.txt.

Skill names (depend on your configuration) can be found at skillnametable.txt used by your configuration.

Currently used skill names can also be found by inspecting skills, homun skills, merc skills commands output.

Status Names

Status handles (locale independent) can be found at tables/{AILMENT,LOOK,STATE,STATUS}_id_handle.txt.

Corresponding status names (depend on your configuration) can be found at statusnametable.txt used by your configuration.

Currently used status names can also be found by inspecting Kore output when certain status is received or by using the s command while certain status are active on you character.

NPC conversation codes

Range Operators

User-specified interval for an option.

Value Description
X {X}
X..Y [X, Y]
X-Y
> X (X, +∞)
>= X [X, +∞)
< X (-∞, X)
<= X (-∞, X]

API: Features and plugins MUST use Utils::inRange(<current value>, <option contents>) to check any kind of options with range values.

Self Conditions

Conditions about the character status/information.

These condition options are shared between the attackComboSlot, attackSkillSlot, buyAuto, doCommand, equipAuto, monsterSkill, partySkill, useSelf_item, and useSelf_skill configuration blocks.


Target Conditions

Monster Conditions

Conditions about the monster status/information.

These condition attributes are shared between the attackComboSlot, attackSkillSlot, equipAuto, and monsterSkill configuration blocks.


Player Conditions

Condition about player's status/information.

Currently, only the partySkill configuration block uses these conditions.


Skill Use Conditions

Conditions about skills.

These options are shared between the attackComboSlot, attackSkillSlot, monsterSkill, partySkill, and useSelf_skill configuration blocks.


Idle Condition

Activated when the BOT this without actions to perform.

Interfaces

OpenKore Interface Implementations.

Interface to load on start can be specified with Command Line Arguments (--interface=InterfaceName).