Outils pour utilisateurs

Outils du site


en:reactions

Using reactions

You can add reactions to your script. To do so, you must use the unicode emoji.
You can get the unicode of an emoji on https://getemoji.com/ for example, or directly on discord : do “ \ ” followed by an emoji on discord, which will show you the unicode version
It is this emoji that should be c/c in the code, preceded by “§”.

You can use reactions in the following ways:

  • Link a room (Numero RoomName§☠️)
    • The bot will display this reaction in every room where the corresponding room is accessible. This will do the “j!advance X” command and thus check the access conditions.
  • Display the description of a piece of furniture or an object, take an object. For example:
    • hammer|crate|You open the toolbox: it contains a beautiful red hammer (hammer)§☠️|You find a nice strong hammer!§🎃|The hammer is red and strong!§🤠
    • ☠️ will display the toolbox description, 🎃 the hammer description, and 🤠 will add the hammer to the inventory.
  • At an event 997:997|(conditions) 2§☠️|null|Ah it's no use!”|… It's broken now!
    • The reaction is therefore put in the “condition” box, and can be combined with conditions (variables, objects or conditions).
    • The number of uses is specified as “X§☠️”, X being the number of uses
    • The 3rd field (“null” in the example) is what the event does (see the chapter on box 997)
    • The first sentence is displayed when the event is triggered
    • The second sentence is displayed if the conditions are not met, or if the number of uses is reached.
  • To an alias:alias11§☠️|alias2§🎃|alias_inutile§🤠
    • At the end of the scenario, after the last box, you can specify the reactions corresponding to the aliases. They will appear when the alias is used. They are optional like the others.
  • A custom action: ” action:target|condition(s) §☠️|effect|phrase if condition ok|phrase if condition not ok
    • The activation of this reaction will trigger the action only if the conditions are met, otherwise the bot will display the sentence expected in the other case.
    • This works for global and local actions. In the case of a local action, the reaction will only appear in the room where the action is possible.

Find us on the discord Make&Play

Discussion

Entrer votre commentaire. La syntaxe wiki est autorisée:
 
en/reactions.txt · Dernière modification: 2021/05/05 21:09 de cyrilfiesta