I'm writing now new feature for NPCs.
There always was a problem with 'quest' NPCs. Many 'talk_states', cids, item names, item ids...
I try to make it simple ^_^
First version of config file:
1. Each NPC can have few missions, request many items and 'kills' of monster with X name.
You can specify 'storage values' that can be needed to start quest or must be not equal to X (when player get mission from one NPC [or done mission] other NPC doesn't give him mission).
2. Reward can be exp or/and item (you can set special values, like name, attack and all other set with attributes function) and of course you can start next mission
Do you have any ideas what should I add to this system before I post it?
MY IDEAS
* move 'request item' and 'request money' to one table in config
* add more options needed to start mission (not only storage Y value == or != X):
- vocation in {list} or not in list
- promotion level in {list} or not in list
- level >= or < X
- magic level >= or < X
- skill Y >= or < X
- outfit ID/type/head... == X
- sex
- items (to start mission, not only needed to finish mission)
* add more rewards for missions (now only item and exp):
- vocation id
- promotion level
- skill X
- magic level
- outfit / addon
edit:
* npc can ask about something and if answer == X (few answers available) player go to mission X (set storage X = z) [more rpg npcs]
edit 2:
* all answers and questions texts will be arrays and text will be random
There always was a problem with 'quest' NPCs. Many 'talk_states', cids, item names, item ids...
I try to make it simple ^_^
First version of config file:
PHP:
-- NPCs config
NPC_questsConfig = {}
NPC_questsConfig["any_quest_is_running"] = 15000 -- if player do any quest that request 'kill monster' its set to 1 else empty (-1)
NPC_questsConfig["test_2"] = { -- npc name
["storage_id"] = 12345, -- start storage for NPC, use this key and key+1
["texts_notunderstand"] = {"Sorry |PLAYERNAME|, I don't understand you.", "Can you repeat? I can't hear you.", "Speak english!"},
["missions"] = {
{-- first mission
["text_hello"] = "Hello |PLAYERNAME|! Blabla, ask me about {mission}.",
["text_bye"] = "Bye |PLAYERNAME|! Blabla.",
["start_words"] = {"mission", "quest", "fight"},
["set_storages_when_start"] = {}, -- if player get quest from this NPC other NPC can ignore him (get_storage)
["set_storages_when_done"] = {},
["get_storage_to_start"] = {},
["mission_text_wrong_storages"] = "I got no mission for you, but you can ask NPC Xsss about {help}.",
["mission_text_quest"] = "|PLAYERNAME|! I got mission for you. Bring me xx, tt gold and kill yy, reward is zz.",
["mission_player_deny_words"] = {'no', 'fuck you'},
["mission_player_deny_text"] = "Ok. Come back when you will be ready.",
["mission_player_agree_words"] = {'yes', 'agree', 'ok', 'i will'},
["mission_player_agree_text"] = "Ok. Go and kill them now.",
["mission_can_not_understand_answer"] = "I can't understand what you want |PLAYERNAME|.",
["mission_text_not_done"] = "Mission is not done |PLAYERNAME|. I told you to bring me xx, tt gold and kill yy.",
["mission_text_done"] = "Good job |PLAYERNAME|. Your reward is zz. I got another {mission} for you.",
["requested_items"] =
{
{["itemid"] = 123, ["subType"] = -1, ["count"] = 1},
{["itemid"] = 321, ["subType"] = -1, ["count"] = 5}
},
["requested_money"] = 50,
["requested_monster"] = {"name0", 5, true},
["reward"] =
{
{["type"] = "exp", ["value"] = 5000},
{["type"] = "item", ["itemsList"] =
{
{["itemid"] = 123, ["subType"] = -1, ["count"] = 1, ["attackSpeed"] = 1500, ["attack"] = 55},
{["itemid"] = 123, ["subType"] = -1, ["count"] = 1}
}
}
}
},-- next mission
{
-- here mission values like in code above
}
}
}
1. Each NPC can have few missions, request many items and 'kills' of monster with X name.
You can specify 'storage values' that can be needed to start quest or must be not equal to X (when player get mission from one NPC [or done mission] other NPC doesn't give him mission).
2. Reward can be exp or/and item (you can set special values, like name, attack and all other set with attributes function) and of course you can start next mission
Do you have any ideas what should I add to this system before I post it?
MY IDEAS
* move 'request item' and 'request money' to one table in config
* add more options needed to start mission (not only storage Y value == or != X):
- vocation in {list} or not in list
- promotion level in {list} or not in list
- level >= or < X
- magic level >= or < X
- skill Y >= or < X
- outfit ID/type/head... == X
- sex
- items (to start mission, not only needed to finish mission)
* add more rewards for missions (now only item and exp):
- vocation id
- promotion level
- skill X
- magic level
- outfit / addon
edit:
* npc can ask about something and if answer == X (few answers available) player go to mission X (set storage X = z) [more rpg npcs]
edit 2:
* all answers and questions texts will be arrays and text will be random
Last edited: