Skip to content

Villagers

Caliog edited this page Mar 14, 2018 · 4 revisions

Villagers

To create a villager type /vg create villager_name.
To remove a villager, a priest or a trader type /vg remove villager_name.
Villagers can give quests to players. To assign one or more quests to a villager type /vg quest quest_name.

Guards

Guards kill monsters if they come to close. To create a guard type /guard guard_name.
You can equip the guard by typing /guard equip. The guard will copy your equipment (item in hand and armor).

Priests

Priest can change a player's class. If you name your priest Warrior by typing
/priest create Warrior,
your players will be able to switch their class to Warrior by talking to the priest.

Traders

Traders can sell or barter items with players in two ways:
1. With a custom "sale" menu (easiest): Stand close to a trader villager and type /trader edit
A menu pops up and you can drag & drop items inside.
To edit their price, press SHIFT and click an item.
Now you can enter the price of the item in the chat.
Do not forget to save your edits.

2.The traditional way:
Sell:
  1. Take the item you want to sell in your hand.
  2. Type /trader add price

Barter:
  1. Put the item you want to sell in the third slot.
  2. Put the item you want to have in exchange in the first slot.
  3. If you want more, put it in the second slot.
  4. Type only /trader add.





Conversations

There are four variables you have to fill for each message:
  • via command: /trader talk ID "MESSAGE" TYPE TARGET
  • via file: 'ID': 'MESSAGE#TYPE#TARGET'
Where MESSAGE is the actual message, which will be sent to players.
TYPE can be TEXT, QUESTION or END.
A QUESTION has to be answered to continue the conversation.
Left click means Yes! and right click means No!
END  just clarifies that the conversation is over after this message.
TARGET is the id of the message which should be sent, if the answer to a question is no!
If your TYPE is not QUESTION you don't need a TARGET.

E.g. these lines in a quest file:
messages:
  '0': 'Hello my Name is Peter#TEXT'
  '1': 'Do you need some help?#QUESTION#4'
  '2': 'OK, go to the website to find out ...#TEXT'
  '3': 'OK, everything clear?#QUESTION#2'
  '4': 'OK, see you!#END'



or as command for a Villager: (quotation marks are important)

  /vg talk 0 "Hello my Name is Peter" TEXT
  /vg talk 1 "Do you need some help?" QUESTION 4
  /vg talk 2 "OK, go to the website to find out..." TEXT
  /vg talk 3 "OK, everything clear?" QUESTION 2
  /vg talk 4 "OK, see you!" END

Would cause this:



You can’t perform that action at this time.