Difference between revisions of "References"

From OpenKore Wiki
Jump to navigation Jump to search
(44 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
==Syntax Legends==
 
==Syntax Legends==
This section describes the syntax formatting used in declarations of configuration options and commands.  
+
Syntax format used in declarations of configuration options and commands.  
  
{| class="wikitable" border="1"
+
{|border="1" cellpadding="2" cellspacing="1"  
!Symbol!!Description
+
|- style=background-color:#F9F9F9;
 +
!Symbol
 +
!Description
 
|-
 
|-
|align=center|Bold||Kore will not reply to repeating messages from the same player.  
+
!align=center|Bold
 +
|Elements that the user must type exactly as shown.
 
|-
 
|-
|align=center|< >||Information that the user must specify.  
+
|align=center|< >
 +
|Information that the user must specify.  
 
|-
 
|-
|align=center|( )||Required parameters.  
+
|align=center|( )
 +
|Required parameters.  
 
|-
 
|-
|align=center|[ ]||Optional parameters.  
+
|align=center|[ ]
 +
|Optional parameters.  
 
|-
 
|-
|align=center| | ||OR. This separates choices from which the user must choose only one.  
+
|align=center| |  
 +
|Means OR. This separates choices from which the user must choose only one.  
 
|}
 
|}
  
  
==Basic Value and Parameter Types==
+
== Basic Value and Parameter Types ==
This section describes the basic 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.
{| class="wikitable" border="1"
+
!Type!!Description
+
=== 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;
 +
!Value
 +
!Description
 
|-
 
|-
|align=center|flag||A number with special meaning on its current context. The list of meaningful values are always given.
+
| 0 or empty string (unset option)
 +
| FALSE (disable)
 
|-
 
|-
|align=center|boolean flag||A type of flag with only two meaningful values: '''1''' to enable (turn on) or '''0''' to disable (turn off).
+
| 1
|-
+
| TRUE (enable)
|align=center|number||Any number. This can be a fractional value (distance) or whole counting numbers (amount, damage, level) depending on the current context.
 
|-
 
|align=center|percent||A number from 0 to 100 that corresponds to a percent. Don't append a percent sign (%) unless otherwise specified.
 
|-
 
|align=center|seconds||The time specified in seconds. This can be a fractional value (e.g. 0.5).
 
|-
 
|align=center|string||Any text string (alias name, password, callsign). See also Names (Text).
 
 
|}
 
|}
 +
: 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.
  
==Equipment Slots==
+
=== number ===
Kore can now efficiently equip items on specific equipment slots. You can automatically equip an item on certain conditions (equipAuto), when you attack with your weapon (attackEquip), on teleport (teleportAuto_equip), and when using skills (shared skill block attribute equip).
+
: 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) { ...
  
The following is a list of equipment slots.
+
=== percent ===
{| class="wikitable" border="1"
+
: A number from 1 to 100 that corresponds to a percent. Don't append a percent sign (%) unless otherwise specified.
!Name!!Description
 
|-
 
|align=center|topHead||Specifies the top head gear to equip.
 
|-
 
|align=center|midHead||Specifies the middle head gear to equip.
 
|-
 
|align=center|lowHead||Specifies the lower head gear to equip. 
 
|-
 
|align=center|rightHand||Specifies the weapon to equip on the right hand.
 
|-
 
|align=center|leftHand||Specifies the weapon or shield to equip on the left hand.
 
|-
 
|align=center|rightAcessory||Specifies the accessory to equip on the right accessory slot.
 
|-
 
|align=center|leftAcessory||Specifies the accessory to equip on the left accessory slot.  
 
|-
 
|align=center|armor||Specifies the armor to equip.
 
|-
 
|align=center|robe||Specifies the garment to equip.
 
|-
 
|align=center|shoes||Specifies the footwear to equip.
 
|-
 
|align=center|arrow||Specifies the arrows to equip when using a bow-type weapon.  
 
|}
 
  
 +
=== seconds ===
 +
: The time specified in seconds. Can be a fractional value (ex. 0.5).
  
==Message Domains==
+
=== string ===
Message domains are names used to classify messages printed in the console.
+
: Any text string.
  
If you want to find out the domain of certain messages that you see in your console, set the option '''showDomain''' in config.txt to '''1'''. Doing so will make Openkore display domains along with messages in the console.
+
==Equipment Slots==
 +
Equipment slot names used by Openkore.  
  
The following is a list of known message domains:
+
{| border="1" cellpadding="2" cellspacing="1"  
{| class="wikitable" border="1"
+
|- style=background-color:#F9F9F9;
!Name!!Description
+
|+ List of equipment slots.  
|-
+
!Name
|align=center|ai_attack||Attack messages
+
!Description
|-
 
|align=center|ai_npcTalk||Sequential conversation with NPC (talknpc) 
 
|-
 
|align=center|attacked||Monster attacks you
 
|-
 
|align=center|attackedMiss||Monster attacks you but misses
 
|-
 
|align=center|attackMon||You attack monster
 
|-
 
|align=center|attackMonMiss||You attack monster but misses
 
|-
 
|align=center|connection||Connection messages
 
|-
 
|align=center|console||Default domain for messages that have no defined message group. (Note. You can't use this with verboseDomains and squelchDomains.
 
|-
 
|align=center|deal||Deal messages 
 
 
|-
 
|-
|align=center|drop||Monster drop related
+
|align=center|topHead
 +
|Upper head slot.
 
|-
 
|-
|align=center|emotion||Emoticon
+
|align=center|midHead
 +
|Middle head slot.
 
|-
 
|-
|align=center|exp||Experience gained
+
|align=center|lowHead
 +
|Lower heads slot.
 
|-
 
|-
|align=center|equip||Equipment switching
+
|align=center|rightHand
 +
|Right hand slot.
 
|-
 
|-
|align=center|follow||Follow messages
+
|align=center|leftHand
 +
|Left hand slot.
 
|-
 
|-
|align=center|guildchat||Guild chat message
+
|align=center|rightAcessory
 +
|Right Acessory slot.
 
|-
 
|-
|align=center|guildnotice||Guild notice message
+
|align=center|leftAcessory
 +
|Left Acessory slot.
 
|-
 
|-
|align=center|info||View info that's requested by the user (status, guild info, etc.)
+
|align=center|armor
 +
|Armor slot.
 
|-
 
|-
|align=center|input||Waiting for user input
+
|align=center|robe
 +
|Gaments slot.
 
|-
 
|-
|align=center|inventory||Inventory related messages
+
|align=center|shoes
 +
|Footwear slot.
 
|-
 
|-
|align=center|list||List of information (monster list, player list, item list, etc.)
+
|align=center|costumeTopHead
 +
|Upper head costume slot.
 
|-
 
|-
|align=center|load||Loading config files
+
|align=center|costumeMidHead
 +
|Middle head costume slot.
 
|-
 
|-
|align=center|looter||Attacking looter
+
|align=center|costumeLowHead
 +
|Lower heads costume slot.
 
|-
 
|-
|align=center|map_event||PvP/GvG mode messages
+
|align=center|costumeRobe
 +
|Robe costume slot.
 
|-
 
|-
|align=center|emotion||NPC messages 
+
|align=center|costumeFloor
 +
|Floor costume slot.
 
|-
 
|-
|align=center|parseMsg_statuslook||Looks (skill status or ailments, muted, summoned spirit, equipment changes, sit, stand)
+
|align=center|arrow
|-
+
|Arrow or Bullet slot.
|align=center|parseMsg/hairColor||Hair color change
 
|-
 
|align=center|parseMsg/job||Job change
 
|-
 
|align=center|parseMsg/upgrade||Item upgrading
 
|-
 
|align=center|party||Party/follow related
 
|-
 
|align=center|partychat||Party chat messages
 
|-
 
|align=center|pet||Pet related messages
 
|-
 
|align=center|plugins||Messages about plugin handling
 
|-
 
|align=center|pm||Private chat message
 
|-
 
|align=center|pm/sent||Private chat message sent by you
 
|-
 
|align=center|portals||Portal exists
 
|-
 
|align=center|portalRecord||Recording of portals 
 
|-
 
|align=center|publicchat||Public chat message
 
|-
 
|align=center|refine||Weapon refining
 
|-
 
|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
 
|-
 
|align=center|skill||Skill use unrelated to attack
 
|-
 
|align=center|sold||Item sold while vending.
 
|-
 
|align=center|startup||Messages that are printed during startup.  
 
|-
 
|align=center|storage||Storage item added/removed
 
|-
 
|align=center|success||An operation succeeded
 
|-
 
|align=center|syntax||Syntax check files
 
|-
 
|align=center|syntax||Syntax check files
 
|-
 
|align=center|teleport||Teleporting
 
|-
 
|align=center|useItem||You used item
 
|-
 
|align=center|useTeleport||Attemp to use teleport
 
|-
 
|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
+
== Names ==
*ai_attack
+
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.
*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==
+
=== Equipment Names ===
This section describes the names used as values in configuration options.
+
----
 +
Openkore equipment name syntax:
  
===Equipment Names===
 
For equipments, it is best to use the console commands to get the exact name of your items (see Item Names). However, this is only applicable if you already have that certain item in your inventory, cart or storage. If you want to specify an equipment that you don't currently possess, use the following syntax as a guide when writing down equipment names:
 
 
  # for normal equipments:
 
  # for normal equipments:
 
  [BROKEN] [+<upgrade level>] (<item name>) [[<card name>[*<number>]] [<number of slots>]]
 
  [BROKEN] [+<upgrade level>] (<item name>) [[<card name>[*<number>]] [<number of slots>]]
Line 246: Line 143:
  
 
'''Notes:'''
 
'''Notes:'''
*If the equipment is not "broken", omit the '''BROKEN''' part.
+
* If the equipment is not broken, omit the '''BROKEN''' part.
*If the equipment is not upgraded, omit the +<upgrade level> part.
+
* If the equipment is not upgraded, omit the +<upgrade level> part.
*Use only the monster name for the card name (omit the "Card" part), e.g. use Hydra for the Hydra Card.
+
* 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 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 can be a colon-separated list. The list should be sorted alphabetically.
+
* 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.
+
* 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|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:
  
'''Example:'''<br/>
 
If you want to use 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:
 
 
  +7 Mirror Shield [Thara Frog] [1]
 
  +7 Mirror Shield [Thara Frog] [1]
 
  Padded Armor [Pupa] [1]
 
  Padded Armor [Pupa] [1]
  +5 Saber [Skel Worker,Vadon*2] [3]
+
  +5 Saber [Skel Worker:Vadon*2] [3]
 
  +6 VVS Wind Tsurugi
 
  +6 VVS Wind Tsurugi
  
In v.1.9.x, the 3-slotted +5 Double Flammable Boned Saber described above would have to be written like the following (note the change in the card separator from comma to colon):
+
=== Item Names ===
  (V.1.9.x) +5 Saber [Skel Worker:Vadon*2] [3]
+
----
 +
Item names can be found at tables\items.txt, following this syntax:
 +
   
 +
<Item ID>#<item_name>#
  
'''Note.''' So far configuration options using item names are not strict with case-sensitivity.
+
In items.txt item names are separated with underscores (_), to use them in your configuration replace them with spaces.
  
  
===Item Names===
+
''' Example '''
The correct item names can be found by using the console commands i (inventory items), cart (cart items), and storage (storage items). You can also use store (buy list from NPC) or vender (vender shop list). Use the names as they are displayed in the lists.
 
  
You can also find the simple item names in the file tables\items.txt. For example:
+
* Item's name is Mirror Shield.
 
  2107#Mirror_Shield#
 
  2107#Mirror_Shield#
  
The string that appears after the first number sign (#) on each line is the item name used by Openkore. Replace the underscores (_) with space. In this case, the item name is 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|console commands]], like '''[[i]]''', '''[[cart]]''', '''[[storage]]'''.
  
'''Note.''' So far configuration options using item names are not strict with case-sensitivity.
 
  
 +
=== Ground Spell Names ===
 +
----
 +
Ground spell names can be found at tables\spells.txt, following this syntax:
 +
 +
<Spell ID> <spell name>
  
===Ground Spell Names===
+
''' Example '''
Ground spell names can be found by using the console command spells while certain spells are active on the ground.
 
  
You can also find them in the file tables\spells.txt. For example:  
+
* Ground spell name: Safety Wall
 
  126 Safety Wall
 
  126 Safety Wall
  
The string that appears after the first number on each line is the ground spell name used by Openkore. In this case, the ground spell name is Safety Wall.
+
'''Note:'''
 +
* Ground spell names can also be found using [[Console Commands|console command]] '''[[spells]]''' while certain spells are active on the ground.  
 +
 
  
'''Note.''' These are case-sensitive.
+
=== Map Names ===
 +
----
 +
Map names can be found at tables\maps.txt, following this syntax:
  
 +
<map file name>#<map name>#
  
===Map Names===
+
Openkore use just the first name of the map in it's configuration files.
Map names can be found by using the console command where.
 
  
You can also find them in the file tables\maps.txt. For example:
+
''' Example '''
 +
 +
* Map name is Prontera
 
  prontera.rsw#Prontera City#
 
  prontera.rsw#Prontera City#
  
The first word that appears on each line excluding the .rsw file extension is the map name used by Openkore. In this case, the map name is prontera.
+
'''Notes:'''
 +
* Map names can also be find using [[Console Commands|console command]] '''[[where]]'''.
 +
 
  
'''Note.''' These are case-sensitive.
+
=== Monster Names ===
 +
----
 +
Monster names can be found at tables\monsters.txt, following this syntax:
  
 +
<monster ID> <monster name>
  
===Monster Names===
+
''' Example '''
Monster names can be found by using the console command ml while certain monters are on screen.
 
  
You can also find them in the file tables\monsters.txt. For example:
+
* Monster name is Scorpion
 
  1001 Scorpion
 
  1001 Scorpion
  
The string that appears after the first number on each line is the monster name used by Openkore. In this case, the monster name is Scorpion.
+
'''Notes:'''
 
+
* You can also find monster name using [[Console Commands|console command]] '''[[ml]]''' while certain monters are on screen.  
'''Note.''' These are case-sensitive.
 
  
  
===Player Names===
+
=== Player Names ===
Player names can be found by using the console command [[Console Commands|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.
  
  
===Skill Names===
+
=== Skill Names ===
The correct skill names can be found by using the console command skills to list available skills for your character.
 
 
 
You can also find them in the file tables\skills.txt. For example:
 
NV_BASIC#Basic_Skill#
 
  
The string that appears after the first number sign (#) on each line is the skill name used by Openkore. Replace the underscores (_) with space. In this case, the skill name is Basic Skill.
+
Skill handles (locale independent) can be found at <code>tables/SKILL_id_handle.txt</code>.
  
'''Note.''' These are case-sensitive.
+
Skill names (depend on your configuration) can be found at <code>skillnametable.txt</code> used by your configuration.
  
 +
Currently used skill names can also be found by inspecting [[skills]], [[homun|homun skills]], [[merc|merc skills]] commands output.
  
===Status Names===
+
=== Status Names ===
Status names can be found by using the console command s while certain status are active on you character.
 
  
You can also find them in the files tables\skillsailments.txt, tables\skillslooks.txt, tables\skillsstate.txt, tables\skillsstatus.txt. For example:
+
Status handles (locale independent) can be found at <code>tables/{AILMENT,LOOK,STATE,STATUS}_id_handle.txt</code>.
1 Poisoned
 
  
The string that appears after the first number on each line is the status name used by Openkore. In this case, the status name is Poisoned.
+
Corresponding status names (depend on your configuration) can be found at <code>statusnametable.txt</code> used by your configuration.
  
'''Note.''' These are case-sensitive.
+
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==
 
These codes are used for specifying NPC talk sequences or steps when using the console command talknpc or the config.txt option storageAuto_npc_steps.
 
 
 
The following is a list of known NPC talk codes.
 
{| class="wikitable" border="1"
 
!Code!!Description
 
|-
 
|align=center|'''c'''||Continue talking to the NPC. This is the same as pressing the next when you talk to an NPC in the RO Client.
 
|-
 
|align=center|'''r'''(<response #>)||Send response. The response number is the index of the response in the displayed response list (the first response has the index 0). This is the same as selecting a response when you talk to an NPC in the RO Client.
 
|-
 
|align=center|'''w'''(<seconds>)||Wait for the specified number of seconds before continuing to talk to the NPC using the next talk code.
 
|-
 
|align=center|'''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 string or text to the NPC. Use this if the NPC asks you to enter some text.
 
|-
 
|align=center|'''s'''||Get sell list. This is the same as pressing the sell button when you talk to a buy/sell NPC in the RO Client.
 
|-
 
|align=center|'''b'''||Get the store list. This is the same as pressing the buy button when you talk to a buy/sell NPC in the RO Client.
 
|-
 
|align=center|'''b'''(<store item #>),(<amount>)||Buy an item from the NPC. See similar [[Console Commands|buy]]. Note that the amount is not optional.
 
|-
 
|align=center|'''n'''||Immediately end or cancel conversation with the NPC. This is the same as pressing the close or cancel button when talking to an NPC in the RO Client.
 
|-
 
|align=center|'''e'''||Wait until the NPC says "Done talking". Use this after the '''s''' or '''b''' talk code when talking to a buy/sell NPC.
 
|}
 
  
 +
== [[NPC conversation codes]] ==
  
When specifying NPC talk codes, separate each code with whitespace. For example, by using the following command, you will be able to refine a weapon with the Blacksmith NPC inside Prontera, assuming you are inside the BlackSmith shop in Prontera and the NPC stands on the coordinates (63, 60).
+
== Range Operators ==
talknpc 63 60 c r3 c r0 c c r0 c n
 
  
 +
User-specified [[wikipedia:Interval (mathematics)|interval]] for an option.
  
==Range Operators==
+
{| border="1" cellpadding="2" cellspacing="1" style="text-align:center"
Range operators provide flexibility in specifying values for some config.txt options by specifying ranges instead of exact values. The following defines the syntax for specifying ranges.
+
|- style=background-color:#F9F9F9;
{| class="wikitable" border="1"
+
!Value
!Symbol!!Description
+
!Description
|-
 
|align=center|'''X'''||Value is exactly equal to X
 
 
|-
 
|-
|align=center|'''X..Y'''||Includes all numbers from X to Y
+
| X
 +
| {X}
 
|-
 
|-
|align=center|'''X-Y'''|| Includes all numbers from X to Y
+
| X..Y
 +
|rowspan="2"| [X, Y]
 
|-
 
|-
|align=center|'''> X'''||Value is greater than X
+
| X-Y
 
|-
 
|-
|align=center|'''>= X'''||Value is greater than or equal to X
+
| > X
 +
| (X, +∞)
 
|-
 
|-
|align=center|'''< X'''||Value is less than X
+
| >= X
 +
| [X, +∞)
 
|-
 
|-
|align=center|'''<= X'''||Value is less than or equal to X
+
| < X
 +
| (-∞, X)
 
|-
 
|-
 +
| <= X
 +
| (-∞, X]
 
|}
 
|}
  
 +
'''API''':
 +
Features and plugins MUST use [https://github.com/OpenKore/openkore/blob/master/src/Utils.pm#L863 Utils::inRange(<current value>, <option contents>)] to check any kind of options with range values.
  
The following example will change config to config_2.txt if you are a Novice whose job level is exacly equal to 10.
+
== [[:Category:Self Condition|Self Conditions]] ==
autoConfChange control/config_2.txt {
+
{{:Category:Self Condition}}
        isJob Novice
 
        joblvl 10
 
}
 
 
 
 
 
The following example will use level 1 FireBolt on a Geographer if the current SP is greater than '''5''' percent and the monster's [[config.txt|deltaHp]] is from '''-8070''' to '''-7890'''.
 
attackSkillSlot Fire Bolt {
 
        lvl 1
 
        dist 9
 
        sp > 5%
 
        monsters Geographer
 
        target_deltaHp -8070..-7890
 
}
 
 
 
 
 
The following example will use Heal on self if the current HP is less than '''50''' percent and the current SP is greater than or equal to '''20''' percent.
 
useSelf_skill Heal {
 
        lvl 10
 
        hp < 50%
 
        sp >= 20%
 
}
 
 
 
 
 
== Self Conditions ==
 
These condition options are shared between the [[attackComboSlot]], [[attackSkillSlot]], [[buyAuto]], [[doCommand]], [[equipAuto]], [[monsterSkill]], [[partySkill]], [[useSelf_item]], and [[useSelf_skill]] configuration blocks.
 
 
 
{|
 
|
 
* [[aggressives]]
 
 
 
* [[defendMonsters]]
 
 
 
* [[disabled]]
 
 
 
* [[hp]]
 
  
* [[inCart]]
+
== Target Conditions ==
  
* [[inInventory]]
+
=== [[:Category:Monster Condition|Monster Conditions]] ===
  
* [[inLockOnly]]
+
{{:Category:Monster Condition}}
  
* [[inMap]]
+
=== [[:Category:Player Condition|Player Conditions]] ===
||
 
* [[monsters]]
 
  
* [[notInTown]]
+
{{:Category:Player Condition}}
  
* [[notMonsters]]
+
=== [[:Category:Skill Use Condition|Skill Use Conditions]] ===
 +
{{:Category:Skill Use Condition}}
  
* [[notOnAction]]
+
=== [[:Category:Idle Condition|Idle Condition]] ===
 +
{{:Category:Idle Condition}}
  
* [[notInMap]]
+
== [[:Category:Interfaces|Interfaces]] ==
 
+
{{:Category:Interfaces}}
* [[notWhileSitting]]
 
 
 
* [[onAction]]
 
 
 
* [[partyAggressives]]
 
||
 
* [[sp]]
 
 
 
* [[spirit]]
 
 
 
* [[stopWhenHit]]
 
 
 
* [[timeout]]
 
 
 
* [[whenFlag]]
 
 
 
* [[whenFollowing]]
 
 
 
* [[whenGround]]
 
 
 
* [[whenIdle]]
 
||
 
* [[whenNotFlag]]
 
 
 
* [[whenNotGround]]
 
 
 
* [[whenNotPermitSkill]]
 
 
 
* [[whenPermitSkill]]
 
 
 
* [[whenStatusActive]]
 
 
 
* [[whenStatusInactive]]
 
 
 
* whenWater - not working yet
 
|}
 
 
 
 
 
== Target Monster Conditions ==
 
These condition attributes are shared between the [[attackComboSlot]], [[attackSkillSlot]], [[equipAuto]], and [[monsterSkill]] configuration blocks.
 
 
 
{|
 
|
 
* [[target_aggressives]]
 
 
 
* [[target_dead]]
 
 
 
* [[target_defendMonsters]]
 
 
 
* [[target_deltaHP]]
 
 
 
* [[target_dist]]
 
 
 
* [[target_hp]]
 
||
 
* [[target_isGuild]]
 
 
 
* [[target_isJob]]
 
 
 
* [[target_isNotJob]]
 
 
 
* [[target_monsters]]
 
 
 
* [[target_notWhileSitting]]
 
 
 
* [[target_timeout]]
 
||
 
* [[target_whenGround]]
 
 
 
* [[target_whenNotGround]]
 
 
 
* [[target_whenShieldEquipped]]
 
 
 
* [[target_whenStatusActive]]
 
 
 
* [[target_whenStatusInactive]]
 
 
 
* [[target_whenWeaponEquipped]]
 
|}
 
 
 
 
 
== Skill Use Conditions ==
 
These options are shared between the [[attackComboSlot]], [[attackSkillSlot]], [[monsterSkill]], [[partySkill]], and [[useSelf_skill]] configuration blocks.
 
 
 
{|
 
* [[lvl]]
 
 
 
* [[maxCastTime]]
 
 
 
* [[minCastTime]]
 
 
 
* [[equip]]
 
|}
 

Revision as of 21:23, 8 July 2019

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).