• Sign up for TFS Icon Competition! The prize includes Otland Premium time and a medal, as well as obviously taking part in TFS history.
  • 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!

RevScripts [1.3] [OTBr]Task Counting

Scrollia

Member
Joined
Apr 26, 2021
Messages
59
Reaction score
11
I have already figured out how the tasks works, it just adds new 'numbers' to storage, and so new missions arise, sample:


Lua:
RANK_NONE = 0
RANK_JOIN = 1
RANK_HUNTSMAN = 2
RANK_RANGER = 3
RANK_BIGGAMEHUNTER = 4
RANK_TROPHYHUNTER = 5
RANK_ELITEHUNTER = 6

REWARD_MONEY = 1
REWARD_EXP = 2
REWARD_ACHIEVEMENT = 3
REWARD_STORAGE = 4
REWARD_POINT = 5
REWARD_ITEM = 6

QUESTSTORAGE_BASE = 1500
JOIN_STOR = 100157
KILLSSTORAGE_BASE = 65000
REPEATSTORAGE_BASE = 48950
POINTSSTORAGE = 2500
tasks =
{
[B]    [122][/B] = {
        killsRequired = 20,
        raceName = "Monster",
        level = {6, 1999},
        premium = true,
        creatures = {
            "Rotworm"
        },
        rewards = {
            {type = "exp", value = {10000}},
            {type = "item", value = {40407, 10}},
        }
    },

Its killinginthenameof.lua file, and it works greate, Npc counts monsters, and then gives you the reward properly, but
QuestLog didnt see them, so player have everytime go to Npc and ask him how much does he left to kill.

sample of quests.lua

Lua:
    [12] = {
            name = "Killing in the Name of...",
            startStorageId = 100157,
            startStorageValue = 1,
            missions = {
                [1] = {
                    name = "Paw and Fur: Member",
                    storageId = 2500,
                    missionId = 1081,
                    startValue = 0,
                    endValue = 10,
                    description = function(player)
                        return string.format(
                            "You are member of the Paw and Fur hunting elite. You currently have %d Paw and Fur points.",
                            (math.max(player:getStorageValue(2500), 0))
                        )
                    end
                },
                [2] = {
                    name = "Paw and Fur: Ranger",
                    storageId = 2500,
                    missionId = 1082,
                    startValue = 11,
                    endValue = 40,
                    description = function(player)
                        return string.format(
                            "You are Ranger of the Paw and Fur hunting elite. You currently have %d Paw and Fur points.",
                            (math.max(player:getStorageValue(2500), 0))
                        )
                    end

My question is :
How to add them, to QuestLog?
 
Last edited:
Top