• 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!

Lua quest log disappearing in tasks

  • Thread starter Thread starter Deleted member 141899
  • Start date Start date
D

Deleted member 141899

Guest
I am using TFS 1.1, I believe it is a bug in quests.xml or taskcustom.lua (creaturescript)

After get take the quest from npc lugri, quest log appear 100%.
but some players already reported me that the quest log of the tasks of necromancer and minotaur are disappearing without no reason, in the middle of the task progress.

Quests.xml:
Code:
<mission name="Paw and Fur: Minotaurs" storageid="14004" startvalue="0" endvalue="5000" description="You already hunted |STATE|/5000 minotaurs." />
<mission name="Paw and Fur: Necromancers and Priestesses" storageid="14003" startvalue="0" endvalue="4000" description="You already hunted |STATE|/4000 necromancers and priestesses." />

taskcustom.lua:
Code:
taskcustom = {   
    ['Pirate Buccaneer'] = {storage = 14005, amount = 3000},
    ['Pirate Corsair'] = {storage = 14005, amount = 3000},
    ['Pirate Cutthroat'] = {storage = 14005, amount = 3000},
    ['Pirate Ghost'] = {storage = 14005, amount = 3000},
    ['Pirate Marauder'] = {storage = 14005, amount = 3000},
    ['Pirate Skeleton'] = {storage = 14005, amount = 3000},

    ['Minotaur'] = {storage = 14004, amount = 5000},
    ['Minotaur Archer'] = {storage = 14004, amount = 5000},
    ['Minotaur Guard'] = {storage = 14004, amount = 5000},
    ['Minotaur Mage'] = {storage = 14004, amount = 5000},

    ['Necromancer'] = {storage = 14003, amount = 4000},
        ['Blood Priest'] = {storage = 14003, amount = 4000},
        ['Blood Hand'] = {storage = 14003, amount = 4000},
        ['Shadow Pupil'] = {storage = 14003, amount = 4000},
    ['Priestess'] = {storage = 14003, amount = 4000}
}

function onKill(cid, target, lastHit)
    local creature = taskcustom[getCreatureName(target)]
    if creature then
        if isInArray({-1, creature.amount}, getPlayerStorageValue(cid, creature.storage)) or (not isInArray({14003, 14004, 14005,}, creature.storage) and getPlayerStorageValue(cid, 14500) ~= creature.storage) then
            return true
        end

        local newValue = getPlayerStorageValue(cid, creature.storage) + 1
        setPlayerStorageValue(cid, creature.storage, newValue)
        end
    return true
end

Sorry my english. Please help!
 
Back
Top