Configuring Answers

Configuring Answers:

Answers are added to the file in plugins/Ask/answers.txt. The file is automatically created when you load the plugin for the first time. Here is an example question:

money|How| |You can make money by...
The first section is the keyword. This is the subject of the question. In this case, money. The second section describes what about the thing in question. This is usually like Who, What, When, Where, Why, How, Are, Is, Do, ect. The third section are related words. This should be used if there are more then one question with the same first word, and subject. The last part is the answer to the question. When you read this is helps to sound like yoda... "Money how?"

Ditto Marks

As of v0.3a, ditto marks (") are also supported. Ditto marks copy information last said from above it. Ditto marks MUST be at the beginning and there may only be one. Problems may occur if two people are adding answers at once, be careful when using this in game. Here is an example.

Admin|How| |Be a good person and you will get Admin.

"|What|is|An admin is a person who can ban you. Be nice. Same as: Admin|What|is|An admin is a person who can ban you. Be nice.

"|do|Admins are in charge of administrating the server. Same as: Admin|What|do|Admins are in charge of administrating the server

Ditto marks are designed to both save space, force the maker of the file to group his/her answers by topic, and allow for easier changes. For example, if you wanted to change Admin to Leader, or money to cash.

Regex

As of v0.2.a, Ask supports regular expressions. This is useful if you can see a user asking something using two different words. Something like money, cash, bills, and bucks may be an example. the regex for this would be: money|cash|bills|bucks. However, because Ask uses the vertical bar (|) to decide what section of the line means what. In v0.4a, a space between the vertical bars will denote it as a regex. Something like money | cash | bills | bucks would have to be used. Another handy use would be for plurals, like How do I get a block? or How do I get blocks? you could use blocks*|How|get|Pick them up. Regex may be used for alternate spellings. A good reference can be found on Wikipedia.


Comments

Posts Quoted:
Reply
Clear All Quotes