вот инструкция с примерами "
[JSON] Quest task structure
Vladislav edited this page Jan 6, 2025 · 2 revisions
TasksData Field
Array reward_items
Information

    Reward items structure. Upon completion of the dialog with the bot (1 step point), the specified items are given out.

Fields

        id - itemID from database tw_items_list.
        value - required amount.
        enchant - enchant level.
        durability - durability point.

Example

"reward_items": [
  {
    "id": 1,
    "value": 1,
    "enchant": 1,
    "durability": 100
  }
]

Array required_items
Information

    Required structure. Upon completion of the dialog with the bot (1 step point), the specified items are will be required depending on the type.

Fields

        id - itemID from database tw_items_list.
        value - required amount.
        enchant - enchant level.
        durability - durability point.
        ?type - type of item required. Might make a difference. Show, Pickup, Default. Default value: Default.

Example

"required_items": [
  {
    "id": 1,
    "value": 1,
    "type": "pickup"
  }
]

Array defeat_bots
Information

    Defeat structure. List of required defeat over bots. To complete the step point.

Fields

        id - botID from database tw_bots_info.
        value - required amount.

Example

"defeat_bots": [
  {
    "id": 1,
    "value": 10
  }
]

Array move_to
Information

    Move structure. It will take passing dots to complete a step point's.

Element

        ?move_to_completes_quest_step - finish quest step by end move to. Default value: false.

Fields

        x - position by X.
        y - position by Y.
        ?name - sets the common name of the task. In the case of repeated ones, they are stacked. Default value: Demands a bit of action.
        ?world_id - worldID from database enum_worlds. Default value: world in which the bot is located is set.
        ?step - is set ordered through required steps, in the unordered case the steps will be ignored. Default value: 1.
        ?pick_up_item - Pick up an item when reaching a location by action. It's JSON Object Item data
        ?required_item - Required item for complection. It's JSON Object Item data
        ?navigator - add a navigator to move to a point. Default value: true.
        ?cooldown - add timer for cooldown complete. Default value: 0.
        ?completion_text - send a chat msg to the player upon completion of a point.
        ?defeat_bot - to create a personalized quest mob zone. But disables pick_up_item, required_item, use_in_chat field.
        ?interactive - interactivity with the position using the mouse.

defeat_bot - structure

        defeat_bot.id - botID from database tw_bots_info.
        ?defeat_bot.attribute_power - attribute multiplier power. Default value: 10.
        ?defeat_bot.attribute_spread - attribute_spread. Default value: 0.

Example

"move_to": [
{
    "step": 1,
    "x": 7606,
    "y": 8465,
    "defeat_bot": 
    {
        "id": 19,
        "attribute_power": 800,
        "attribute_spread": 0
    }
}]

interactive - structure

        interactive.x - position by X.
        interactive.y - position by Y.

Example

"move_to": [
{
    "step": 1,
    "x": 7606,
    "y": 8465,
    "interactive": 
    {
        "x": 7785,
        "y": 8101
    },
    "completion_text": "You have examined a suspicious statue!"
}]

Example of a ready move_to

"move_to_completes_quest_step": true,
"move_to": [
  {
    "step": 1,
    "x": 5690,
    "y": 6353,
    "completion_text": "You surveyed the area and saw a suspicious spot a little further away."
  },
  {
    "x": 5962,
    "y": 7505,
    "navigator": false
  },
  {
    "step": 2,
    "x": 9791,
    "y": 8561,
    "use_in_chat": "popa",
    "completion_text": "You pochesali popky."
  },
  {
    "name": "Find and pick up board",
    "x": 5891,
    "y": 7505,
    "pick_up_item":
    {
      "id": 29,
      "enchant": 5
    },
    "interactive": {
        "x": 7785,
        "y": 8101
    },
    "completion_text": "You have examined a suspicious statue!"
  },
  {
    "step": 3,
    "world_id": 2,
    "x": 5600,
    "y": 7605,
    "pick_up_item":
    {
      "id": 13,
      "value": 20
    }
  }
]

Everything can be merged into a single JSON object for multi task." изучи ее и делай другие скрипты по этому примеру