responses.txt: Difference between revisions

From OpenKore Wiki
Jump to navigation Jump to search
(Created page with 'When Kore received a chat command from an authorized player, it will respond to notify the sender whether the command succeeded or failed. The file '''responses.txt''' allows you…')
 
No edit summary
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
When Kore received a chat command from an authorized player, it will respond to notify the sender whether the command succeeded or failed. The file '''responses.txt''' allows you to modify Kore's default responses to [[Chat Commands]].
When Kore received a chat command from an authorized player, it will respond to notify the sender whether the command succeeded or failed. The file '''responses.txt''' allows you to modify Kore's default responses to [[Chat Commands]].


Aside from responses to [[Chat Commands]], you can also configure Kore's automatic responses when a player uses Heal, Increase AGI, or Blessing on you or the monster you are attacking (see autoResponseOnHeal in [[config.txt]]).  
Aside from responses to [[Chat Commands]], you can also configure Kore's automatic responses when a player uses Heal, Increase AGI, or Blessing on you or the monster you are attacking (see [[autoResponseOnHeal]] in config.txt).  


==Syntax==
== Syntax ==
The format of this file is simply a set of lines that observes the following syntax:
The format of this file is simply a set of lines that observes the following syntax:
  <response tag> <message>
  <response tag> <message>


==Details==
=== Details ===
===<response tag>===
----
This is one of the pre-defined response tags that determines on what events the response will be used and what type of message is expected. See the response list below for a complete list of available response tags.  
 
; <response tag>
: This is one of the pre-defined response tags that determines on what events the response will be used and what type of message is expected. See the response list below for a complete list of available response tags.
 
 
; <message>
:This is the message to be used as response.  


===<message>===
This is the message to be used as response.


==Other Notes==
== Other Notes ==
Chat Commands can either succeed or fail, and sometimes there are different ways of succeeding or failing. The succeed response tags have an appended 'S', and possibly a number if there are more than one way for a command to succeed. The failing response tags have an appended 'F', and possibly a number if there are more than one way for a command to fail:
Chat Commands can either succeed or fail, and sometimes there are different ways of succeeding or failing. The succeed response tags have an appended '''S''', and possibly a number if there are more than one way for a command to succeed. The failing response tags have an appended '''F''', and possibly a number if there are more than one way for a command to fail:


'''Example:'''
'''Example:'''
  commandS1 Succeed text
  commandS1 Succeed text


===Random Response===
=== Random Response ===
----
 
You can specify multiple messages for one response tag. If you specify two or more of the same response tags, a random response will be chosen from the group:
You can specify multiple messages for one response tag. If you specify two or more of the same response tags, a random response will be chosen from the group:


Line 27: Line 34:
  somethingF1 You really do suck.
  somethingF1 You really do suck.


===Variables===
=== Variables ===
Sometimes, responses need current information about Kore that must be included in messages. Kore provides several variables that you can include in responses. When used in a response, Kore substitutes actual values for these variables before sending them to the player who issued the chat command. Variables are prefixed with '''%$''':
----


==Response List==
Sometimes, responses need current information about Kore that must be included in messages. Kore provides several variables that you can include in responses. When used in a response, Kore substitutes actual values for these variables before sending them to the player who issued the chat command. Variables are prefixed with '''%$'''.
;'''authS''' (<message>)
 
 
== Response List ==
;authS (<message>)
:This response is used when a player sent Kore a private message containing the adminPassword and was successfully authorized to use chat commands.  
:This response is used when a player sent Kore a private message containing the adminPassword and was successfully authorized to use chat commands.  


Line 38: Line 48:




;'''confS1''' (<message>)
;confS1 (<message>)
:This response is used when the chat command conf requests for the current value ('''%$value''') of a configuration key ('''%$key''').  
:This response is used when the chat command conf requests for the current value ('''%$value''') of a configuration key ('''%$key''').  


Line 45: Line 55:




;'''confS2''' (<message>)
;confS2 (<message>)
:This response is used when the chat command conf successfully made Kore change a configuration key.<br/>
:This response is used when the chat command conf successfully made Kore change a configuration key.




Line 52: Line 62:




;'''confF1''' (<message>)
;confF1 (<message>)
:This response is used when the chat command conf failed because it does not specify a configuration key.  
:This response is used when the chat command conf failed because it does not specify a configuration key.  


Line 59: Line 69:




;'''confF2''' (<message>)
;confF2 (<message>)
:This response is used when the chat command conf failed because it tries to change a configuration key that does not exist.  
:This response is used when the chat command conf failed because it tries to change a configuration key that does not exist.  


Line 66: Line 76:




;'''confF3''' (<message>)
;confF3 (<message>)
:This response is used when the chat command conf failed because it tries to request for Kore's username and password. Kore won't disclose its username and password to protect the user.  
:This response is used when the chat command conf failed because it tries to request for Kore's username and password. Kore won't disclose its username and password to protect the user.  


Line 73: Line 83:




;'''dateS''' (<message>)
;dateS (<message>)
:This response is used when the chat command date requests for the current date and time ('''%$date''').  
:This response is used when the chat command date requests for the current date and time ('''%$date''').  


Line 80: Line 90:




;'''followS''' (<message>)
;followS (<message>)
:This response is used when the chat command follow successfully set Kore to follow a player.  
:This response is used when the chat command follow successfully set Kore to follow a player.  


Line 87: Line 97:




;'''followF''' (<message>)
;followF (<message>)
:This response is used when the chat command follow failed because Kore can't find the player to be followed.  
:This response is used when the chat command follow failed because Kore can't find the player to be followed.  


Line 94: Line 104:




;'''followStopS''' (<message>)
;followStopS (<message>)
:This response is used when the chat command stop follow stop successfully set Kore to stop following a player.  
:This response is used when the chat command stop follow stop successfully set Kore to stop following a player.  


Line 101: Line 111:




;'''followStopF''' (<message>)
;followStopF (<message>)
:This response is used when the chat command follow stop failed because follow mode is already off.
:This response is used when the chat command follow stop failed because follow mode is already off.


Line 108: Line 118:




;'''healS''' (<message>)
;healS (<message>)
:This response is used when the chat command heal, agi, bless, kyrie, or mag successfully made Kore use a supportive skill on a player.  
:This response is used when the chat command heal, agi, bless, kyrie, or mag successfully made Kore use a supportive skill on a player.  


Line 115: Line 125:




;'''healF1''' (<message>)
;healF1 (<message>)
:This response is used when the chat command heal, agi, bless, kyrie, or mag failed because Kore can't find the player to use the skill on.  
:This response is used when the chat command heal, agi, bless, kyrie, or mag failed because Kore can't find the player to use the skill on.  


----
----




;'''healF2''' (<message>)
;healF2 (<message>)
:This response is used when the chat command heal, agi, bless, kyrie, or mag failed because Kore has insufficient SP ('''%$char_sp''').
:This response is used when the chat command heal, agi, bless, kyrie, or mag failed because Kore has insufficient SP ('''%$char_sp''').


Line 128: Line 139:




;'''healF3''' (<message>)
;healF3 (<message>)
:This response is used when the chat command heal, agi, bless, kyrie, or mag failed because Kore does not have the supportive skill the command asks Kore to use.  
:This response is used when the chat command heal, agi, bless, kyrie, or mag failed because Kore does not have the supportive skill the command asks Kore to use.  


Line 135: Line 146:




;'''lookS''' (<message>)
;lookS (<message>)
:This response is used when the chat command look successfully made Kore look to a certain direction.  
:This response is used when the chat command look successfully made Kore look to a certain direction.  


Line 142: Line 153:




;'''lookF''' (<message>)
;lookF (<message>)
:This response is used when the chat command look failed because it does not specify a body direction.  
:This response is used when the chat command look failed because it does not specify a body direction.  


Line 149: Line 160:




;'''moveS''' (<message>)
;moveS (<message>)
:This response is used when the chat command move successfully set Kore to move to a new location; command stop (or stop move stop) successfully stopped Kore's movement; or command town successfully made Kore respawn.
:This response is used when the chat command move successfully set Kore to move to a new location; command stop (or stop move stop) successfully stopped Kore's movement; or command town successfully made Kore respawn.


Line 156: Line 167:




;'''moveF''' (<message>)
;moveF (<message>)
:This response is used when the chat command move failed because it does not specify a valid coordinate or map name.  
:This response is used when the chat command move failed because it does not specify a valid coordinate or map name.  


Line 163: Line 174:




;'''quitS''' (<message>)
;quitS (<message>)
:This response is used when the chat command logout successfully made Kore quit.  
:This response is used when the chat command logout successfully made Kore quit.  


Line 170: Line 181:




;'''reloadS''' (<message>)
;reloadS (<message>)
:This response is used when the chat command reload successfully made Kore reload config and table files.
:This response is used when the chat command reload successfully made Kore reload config and table files.


Line 177: Line 188:




;'''relogS''' (<message>)
;relogS (<message>)
:This response is used when the chat command relog successfully made Kore logout and relogin.  
:This response is used when the chat command relog successfully made Kore logout and relogin.  


Line 184: Line 195:




;'''sitS''' (<message>)
;sitS (<message>)
:This response is used when the chat command sit successfully made Kore sit.  
:This response is used when the chat command sit successfully made Kore sit.  


Line 191: Line 202:




;'''skillbadM''' (<message>)
;skillbadM (<message>)
:This response is used when a player uses Heal, Increase AGI, or Blessing on the monster Kore is currently attacking.  
:This response is used when a player uses Heal, Increase AGI, or Blessing on the monster Kore is currently attacking.  


Line 197: Line 208:
::* autoResponseOnHeal in config.txt must be enabled or this response will not be used.
::* autoResponseOnHeal in config.txt must be enabled or this response will not be used.
::* This response will be sent as private message.
::* This response will be sent as private message.
::* There are no defined variables for this response, you can't even use '''%$cmd_user'''
::* There are no defined variables for this response, you can't even use '''%$cmd_user''' for this so don't even try.  
for this so don't even try.  




Line 204: Line 214:




;'''skillgoodM''' (<message>)
;skillgoodM (<message>)
:This response is used when a player uses Heal, Increase AGI, or Blessing on Kore.  
:This response is used when a player uses Heal, Increase AGI, or Blessing on Kore.  


Line 216: Line 226:




;'''standS''' (<message>)
;standS (<message>)
This response is used when the chat command stand successfully made Kore stand.
:This response is used when the chat command stand successfully made Kore stand.




Line 223: Line 233:




;'''statusS''' (<message>)
;statusS (<message>)
This response is used when the chat command statusinquires about Kore's basic information. The following variables contain useful information about Kore that should be included in this response:  
:This response is used when the chat command status inquires about Kore's basic information. The following variables contain useful information about Kore that should be included in this response:  
{| border="1"  
 
!Variable!!Description
{|border="1" cellpadding="2" cellspacing="1"
|- style=background-color:#F9F9F9;
!Variable
!Description
|-
|-
|align=center|%$char_hp ||Current HP.
|align=center|%$char_hp  
|Current HP.
|-
|-
|align=center|%$char_hp_max||Max HP.
|align=center|%$char_hp_max
|Max HP.
|-
|-
|align=center|%$char_sp||Current SP.
|align=center|%$char_sp
|Current SP.
|-
|-
|align=center|%$char_sp_max||Max SP.
|align=center|%$char_sp_max
|Max SP.
|-
|-
|align=center|%$char_lv||Base level.
|align=center|%$char_lv
|Base level.
|-
|-
|align=center|%$char_lv_job||Job level.
|align=center|%$char_lv_job
|Job level.
|-
|-
|align=center|%$char_exp||Current base experience.
|align=center|%$char_exp
|Current base experience.
|-
|-
|align=center|%$char_exp_max||The total base experience required to gain the next level.
|align=center|%$char_exp_max
|The total base experience required to gain the next level.
|-
|-
|align=center|%$char_exp_job_max||Current job experience.
|align=center|%$char_exp_job_max
|Current job experience.
|-
|-
|align=center|%$char_exp_job_max||The total job experience required to gain the next job level.
|align=center|%$char_exp_job_max
|The total job experience required to gain the next job level.
|-
|-
|align=center|%$char_weight||Current weight.
|align=center|%$char_weight
|Current weight.
|-
|-
|align=center|%$char_weight_max ||Max weight
|align=center|%$char_weight_max  
|Max weight
|-
|-
|align=center|%$zenny ||Current zenny.  
|align=center|%$zenny  
|Current zenny.  
|}
|}


Line 259: Line 285:




;'''tankS''' (<message>)
;tankS (<message>)
:This response is used when the chat command tank successfully set Kore to tank for a player.  
:This response is used when the chat command tank successfully set Kore to tank for a player.  


Line 266: Line 292:




'''tankF''' (<message>)
;tankF (<message>)
:This response is used when the chat command tank failed it can't find the player to tank for.  
:This response is used when the chat command tank failed it can't find the player to tank for.  


Line 273: Line 299:




;'''tankStopS''' (<message>)
;tankStopS (<message>)
:This response is used when the chat command tank stop successfully set Kore to stop tanking.  
:This response is used when the chat command tank stop successfully set Kore to stop tanking.  


Line 280: Line 306:




;'''tankStopF''' (<message>)
;tankStopF (<message>)
:This response is used when the chat command tank stop failed to stop tanking because tank mode is already off.  
:This response is used when the chat command tank stop failed to stop tanking because tank mode is already off.  


Line 287: Line 313:




;'''thankS''' (<message>)
;thankS (<message>)
:This response is used when the chat command thank, thn, or thx is received.  
:This response is used when the chat command thank, thn, or thx is received.  


----
----




;'''timeoutS1''' (<message>)
;timeoutS1 (<message>)
:This response is used when the chat command timeout requests for the current value ('''%$value''') of a timeout key ('''%$key''').  
:This response is used when the chat command timeout requests for the current value ('''%$value''') of a timeout key ('''%$key''').  


Line 300: Line 327:




;'''timeoutS2''' (<message>)
;timeoutS2 (<message>)
:This response is used when the chat command timeout successfully made Kore change a timeout key.  
:This response is used when the chat command timeout successfully made Kore change a timeout key.  


Line 307: Line 334:




;'''timeoutF1''' (<message>)
;timeoutF1 (<message>)
:This response is used when the chat command timeout failed because it does not specify a timeout key.  
:This response is used when the chat command timeout failed because it does not specify a timeout key.  


Line 314: Line 341:




;'''timeoutF2''' (<message>)
;timeoutF2 (<message>)
:This response is used when the chat command timeout failed because it tries to change a timeout key that does not exist.  
:This response is used when the chat command timeout failed because it tries to change a timeout key that does not exist.  


Line 321: Line 348:




;'''verboseOffS''' (<message>)
;verboseOffS (<message>)
:This response is used when the chat command shut up successfully made Kore turn verbose off.  
:This response is used when the chat command shut up successfully made Kore turn verbose off.  


Line 328: Line 355:




;'''verboseOffF''' (<message>)
;verboseOffF (<message>)
:This response is used when the chat command shut up failed because verbose is already off.  
:This response is used when the chat command shut up failed because verbose is already off.  


Line 335: Line 362:




;'''verboseOnS''' (<message>)
;verboseOnS (<message>)
:This response is used when the chat command speak successfully turned verbose on.  
:This response is used when the chat command speak successfully turned verbose on.  


Line 342: Line 369:




;'''verboseOnF''' (<message>)
;verboseOnF (<message>)
:This response is used when the chat command speak failed because verbose is already on.  
:This response is used when the chat command speak failed because verbose is already on.  


Line 349: Line 376:




;'''whereS''' (<message>)
;whereS (<message>)
:This response is used when the chat command where requests for Kore's current location, i.e. x-coordinate ('''%$x'''), y-coordinate ('''%$y'''), and map ('''%$map''').
:This response is used when the chat command where requests for Kore's current location, i.e. x-coordinate ('''%$x'''), y-coordinate ('''%$y'''), and map ('''%$map''').
[[Category:control]]

Latest revision as of 23:50, 26 April 2021

When Kore received a chat command from an authorized player, it will respond to notify the sender whether the command succeeded or failed. The file responses.txt allows you to modify Kore's default responses to Chat Commands.

Aside from responses to Chat Commands, you can also configure Kore's automatic responses when a player uses Heal, Increase AGI, or Blessing on you or the monster you are attacking (see autoResponseOnHeal in config.txt).

Syntax

The format of this file is simply a set of lines that observes the following syntax:

<response tag> <message>

Details


<response tag>
This is one of the pre-defined response tags that determines on what events the response will be used and what type of message is expected. See the response list below for a complete list of available response tags.


<message>
This is the message to be used as response.


Other Notes

Chat Commands can either succeed or fail, and sometimes there are different ways of succeeding or failing. The succeed response tags have an appended S, and possibly a number if there are more than one way for a command to succeed. The failing response tags have an appended F, and possibly a number if there are more than one way for a command to fail:

Example:

commandS1 Succeed text

Random Response


You can specify multiple messages for one response tag. If you specify two or more of the same response tags, a random response will be chosen from the group:

Example:

somethingF1 Sorry, you suck.
somethingF1 You really do suck.

Variables


Sometimes, responses need current information about Kore that must be included in messages. Kore provides several variables that you can include in responses. When used in a response, Kore substitutes actual values for these variables before sending them to the player who issued the chat command. Variables are prefixed with %$.


Response List

authS (<message>)
This response is used when a player sent Kore a private message containing the adminPassword and was successfully authorized to use chat commands.




confS1 (<message>)
This response is used when the chat command conf requests for the current value (%$value) of a configuration key (%$key).




confS2 (<message>)
This response is used when the chat command conf successfully made Kore change a configuration key.




confF1 (<message>)
This response is used when the chat command conf failed because it does not specify a configuration key.




confF2 (<message>)
This response is used when the chat command conf failed because it tries to change a configuration key that does not exist.




confF3 (<message>)
This response is used when the chat command conf failed because it tries to request for Kore's username and password. Kore won't disclose its username and password to protect the user.




dateS (<message>)
This response is used when the chat command date requests for the current date and time (%$date).




followS (<message>)
This response is used when the chat command follow successfully set Kore to follow a player.




followF (<message>)
This response is used when the chat command follow failed because Kore can't find the player to be followed.




followStopS (<message>)
This response is used when the chat command stop follow stop successfully set Kore to stop following a player.




followStopF (<message>)
This response is used when the chat command follow stop failed because follow mode is already off.




healS (<message>)
This response is used when the chat command heal, agi, bless, kyrie, or mag successfully made Kore use a supportive skill on a player.




healF1 (<message>)
This response is used when the chat command heal, agi, bless, kyrie, or mag failed because Kore can't find the player to use the skill on.




healF2 (<message>)
This response is used when the chat command heal, agi, bless, kyrie, or mag failed because Kore has insufficient SP (%$char_sp).




healF3 (<message>)
This response is used when the chat command heal, agi, bless, kyrie, or mag failed because Kore does not have the supportive skill the command asks Kore to use.




lookS (<message>)
This response is used when the chat command look successfully made Kore look to a certain direction.




lookF (<message>)
This response is used when the chat command look failed because it does not specify a body direction.




moveS (<message>)
This response is used when the chat command move successfully set Kore to move to a new location; command stop (or stop move stop) successfully stopped Kore's movement; or command town successfully made Kore respawn.




moveF (<message>)
This response is used when the chat command move failed because it does not specify a valid coordinate or map name.




quitS (<message>)
This response is used when the chat command logout successfully made Kore quit.




reloadS (<message>)
This response is used when the chat command reload successfully made Kore reload config and table files.




relogS (<message>)
This response is used when the chat command relog successfully made Kore logout and relogin.




sitS (<message>)
This response is used when the chat command sit successfully made Kore sit.




skillbadM (<message>)
This response is used when a player uses Heal, Increase AGI, or Blessing on the monster Kore is currently attacking.
Notes
  • autoResponseOnHeal in config.txt must be enabled or this response will not be used.
  • This response will be sent as private message.
  • There are no defined variables for this response, you can't even use %$cmd_user for this so don't even try.




skillgoodM (<message>)
This response is used when a player uses Heal, Increase AGI, or Blessing on Kore.
Notes
  • autoResponseOnHeal in config.txt must be enabled or this response will not be used.
  • This response will be sent as private message.
  • There are no defined variables for this response, you can't even use %$cmd_user for this so don't even try.




standS (<message>)
This response is used when the chat command stand successfully made Kore stand.




statusS (<message>)
This response is used when the chat command status inquires about Kore's basic information. The following variables contain useful information about Kore that should be included in this response:
Variable Description
%$char_hp Current HP.
%$char_hp_max Max HP.
%$char_sp Current SP.
%$char_sp_max Max SP.
%$char_lv Base level.
%$char_lv_job Job level.
%$char_exp Current base experience.
%$char_exp_max The total base experience required to gain the next level.
%$char_exp_job_max Current job experience.
%$char_exp_job_max The total job experience required to gain the next job level.
%$char_weight Current weight.
%$char_weight_max Max weight
%$zenny Current zenny.




tankS (<message>)
This response is used when the chat command tank successfully set Kore to tank for a player.




tankF (<message>)
This response is used when the chat command tank failed it can't find the player to tank for.




tankStopS (<message>)
This response is used when the chat command tank stop successfully set Kore to stop tanking.




tankStopF (<message>)
This response is used when the chat command tank stop failed to stop tanking because tank mode is already off.




thankS (<message>)
This response is used when the chat command thank, thn, or thx is received.




timeoutS1 (<message>)
This response is used when the chat command timeout requests for the current value (%$value) of a timeout key (%$key).




timeoutS2 (<message>)
This response is used when the chat command timeout successfully made Kore change a timeout key.




timeoutF1 (<message>)
This response is used when the chat command timeout failed because it does not specify a timeout key.




timeoutF2 (<message>)
This response is used when the chat command timeout failed because it tries to change a timeout key that does not exist.




verboseOffS (<message>)
This response is used when the chat command shut up successfully made Kore turn verbose off.




verboseOffF (<message>)
This response is used when the chat command shut up failed because verbose is already off.




verboseOnS (<message>)
This response is used when the chat command speak successfully turned verbose on.




verboseOnF (<message>)
This response is used when the chat command speak failed because verbose is already on.




whereS (<message>)
This response is used when the chat command where requests for Kore's current location, i.e. x-coordinate (%$x), y-coordinate (%$y), and map (%$map).