en:txt:conditions
Table des matières
Language / Langue : FR | EN
Conditions (.txt format)
Conditions restrict access to a room depending on the player's inventory or variables.
Object condition
room_number|object1 object2|text_if_not|text_if_yes
Several objects mean the player must hold all of them (logical AND).
To forbid entry when the player does hold the object, prefix it with -:
3|-lamp|You cannot enter carrying a lamp!|You enter without a lamp.
Variable condition
room_number|v_score_v.>=.50|You do not have enough points.|You enter.
| Operator | Meaning |
|---|---|
.=. | Equal to |
.!=. | Different from |
.>. | Greater than |
.>=. | Greater than or equal to |
.<. | Less than |
.⇐. | Less than or equal to |
.in.X-Y | Between X and Y |
.out.X-Y | Outside the X-Y range |
For text variables:
2|t_class_t.=."warrior"|Warriors only.|You enter.
Combining objects and variables
Separate the conditions with a space:
2|lamp v_hp_v.>.0|You do not have everything you need.|You enter.
OR condition
Repeat the room line with different conditions. The bot tests them in order and stops at the first one that succeeds:
2|lamp|No lamp and no torch!|You enter with the lamp. 2|torch|No lamp and no torch!|You enter with the torch.
en/txt/conditions.txt · Dernière modification : de cyrilfiesta
