otland / forgottenserver

A free and open-source MMORPG server emulator written in C++
https://otland.net
GNU General Public License v2.0
1.6k stars 1.06k forks source link

bring back the "old" quest system #3746

Open EPuncker opened 3 years ago

EPuncker commented 3 years ago

Explanation of what you want to do that is currently impossible

Quest creation should be simple and compatible with most of released maps/datapacks.

Current tfs-master script doesn't provide: flexibility, features and mainly, compatibility with already released content.

Desired functionality

  1. In Remere's map editor right click on the chest
  2. Put actionID 2000 and an uniqueID not used by anything else
  3. Put desired items inside chest
  4. Done

Prior art

https://otland.net/threads/tfs-0-2-1-0-system-lua-questsystem.185583/

Aerwix commented 3 years ago

I used to love this quest system, hope it back soon. <3

Zbizu commented 3 years ago

That was the best quest system that was ever written. I personally ported it for my own server in times of TFS 1.1.

Its only limitation was lack of adding multiple chests with same storage through map editor. I believe actionId and uniqueId should be swapped. In fact, actionId can completely be removed if we code the questsystem in xml as "action itemId" and generate storages per position somehow.

nekiro commented 3 years ago

https://pastebin.com/gGFgZSsF Not tested.

Simply register in xml with action id 2000.

ghost commented 3 years ago

<action actionid="2000" script="quests/quests.lua" />

https://pastebin.com/4qkecTpf added some code from nostalrius to nekiro's paste

Zbizu commented 3 years ago

@nekiro this one doesn't show anything in situations like no space in container or no cap

lucasgrizante commented 2 years ago

Hey guys,

for what I could understand, using this system requires you to set the chest box an actionid (2000 for instance) and an uniqueId (that will be the storage to be set on player after getting rewarded), right?

As far as I know, it's only possible to have one of each uniqueid on map (at least it was like that some years ago). Is it possible to modify that? so we can do quests like anihilator where we need the same storage value (so we would use the same "unique"(storage) id) with different reward chests.

in the Anihi example, we would add actionid 2000, uniqueid XXXX (being the same XXXX into all 4 chests).

EPuncker commented 2 years ago

Hey guys,

for what I could understand, using this system requires you to set the chest box an actionid (2000 for instance) and an uniqueId (that will be the storage to be set on player after getting rewarded), right?

As far as I know, it's only possible to have one of each uniqueid on map (at least it was like that some years ago). Is it possible to modify that? so we can do quests like anihilator where we need the same storage value (so we would use the same "unique"(storage) id) with different reward chests.

in the Anihi example, we would add actionid 2000, uniqueid XXXX (being the same XXXX into all 4 chests).

for these specific quests there is this setting:

local specialQuests = {
   [2001] = 30015 --Annihilator
}