• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Action Advanced quest system for tfs 1.3

Azakelis

Premium User
Premium User
Joined
Feb 17, 2014
Messages
232
Solutions
17
Reaction score
319
The future is now, old man.

Installation:
1. In data/lib/lib.lua add:
Lua:
-- Advanced quest system
dofile('data/lib/advanced_quest_system.lua')
2. Unpack advanced_quest_system.lua to data/lib/
3. In data/actions/actions.xml add, replace X with desirable action id for your chests:
XML:
<action actionid="X" script="advanced_quest_system_action.lua"/>
4. Unpack advanced_quest_system_action.lua to data/actions/scripts/

Usage:
In data/lib/advanced_quest_system.lua
edit: ADVANCED_QUESTS, STORAGES, QUEST_LIST to add your quests
In map editor place chest with X action id and unique id from QUEST_LIST (that you also used in ADVANCED_QUESTS)

Features:
Available reward types (in one chest can be one or more): items, experience, levels, skills, magic levels, vocations, outfits, addons, mounts, max health, max mana
Conditional reward types (get reward only if condition met): minimum level, maximum level, vocation, premium [it can be used both on CHEST_SETTINGS to block whole quest or on REWARDS to block single reward]
Events (message, animation) that can be triggered by TRIGGERS (on reward, on quest cannot be done)
Quest types: only once (traditional quest), sequential (one after another), must have certain storage first to get reward, periodical (can get reward every hour, day, week, month etc.)
it supports multiple chest - 1 reward (like annihilator)
you can pass customFunction, customFunctionParameters for item reward to modify it
 

Attachments

  • advanced_quest_system.zip
    3.5 KB · Views: 116 · VirusTotal
Last edited:
Haven't tested it but i like the amount of features that is included in this and how clean the code is to read.
 
I liked how it was in the old gold TFS 0.4, where you could just place chest in map editor, fill it with items and set unique/action ids. That was sooo easy.

But your system seems good too. Well written and very neat!
 
hello i almost understand the script but i need a little help

Lua:
QUEST_LIST = {TEST_CHEST_1 = 12346}  <-- here goes an storage, but fot the table or just the next storage?

STORAGES = {TEST_QUEST = 12343}   <-- here goes the same or different storage?

ADVANCED_QUESTS = {
    [QUEST_LIST.TEST_CHEST_1] = {
        CHEST_SETTINGS = {                  
            questType = QUEST_TYPES.ONCE,
            questParameters = {storage = STORAGES.TEST_QUEST},
            conditions = {
                {
                    conditionType = CONDITION_TYPES.VOCATION,
                    conditionParameters = {vocation = {VOCATION_NONE}}
                }
            }
        },
        TRIGGERS = {
            [TRIGGER_TYPES.ON_QUEST_REWARD] = {
                {
                    eventType = EVENT_TYPES.MESSAGE,
                    eventParameters = {messageText = "Test message"}
                }
            },
            [TRIGGER_TYPES.ON_QUEST_ALREADY_TAKEN] = {
                {
                    eventType = EVENT_TYPES.MESSAGE,
                    eventParameters = {messageText = "Test message 2"}
                }
            }
        },
        REWARDS = {
            {
                rewardType = REWARD_TYPES.ITEM,
                rewardParameters = {id = 3079, count = 1}
            }
        }
    }
}

then you put what kind of quest, next conditions, later what kind of messages will be displayed and for the last the rewards.
i hope that i explain me, im learning english and a little about programation jaja
im trying to use this but in Otservbr and because there no actions.xml its a complicated for me
 
Back
Top