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

TFS 1.X+ father's burden action corpses problem tfs 1.3

Thorn

Spriting since 2013
Joined
Sep 24, 2012
Messages
2,203
Solutions
1
Reaction score
921
Location
Chile
Hello guys! im trying to make this father's burden quest work, so far so good, but the thing that doesnt work and i can't figure out why, is the strong sinew and glitterscale scale part...you should be able to right click on the corpses and get the items, but instead it says: You cannot use this object, and im using original scripts from tfs :S

Code:
    <!-- Father's Burden Quest -->
    <action fromid="12545" toid="12546" script="quests/fathers burden/corpse.lua" />

Lua:
local config = {
    [12545] = {itemId = 12506, storage = Storage.FathersBurdenQuest.Corpse.Scale, text = 'Glitterscale\'s scale.'},
    [12546] = {itemId = 12504, storage = Storage.FathersBurdenQuest.Corpse.Sinew, text = 'Heoni\'s sinew'}
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local corpse = config[item.itemid]
    if not corpse then
        return true
    end

    if player:getStorageValue(corpse.storage) == 1 then
        return false
    end

    player:addItem(corpse.itemId, 1)
    player:setStorageValue(corpse.storage, 1)
    player:say('You acquired ' .. corpse.text, TALKTYPE_MONSTER_SAY)
    return true
end


i dont understand why doesn't work :S also the route is fine, anyone have any ideas? D:
 
Thanks sebaloco, i did a if not and now it works, the problem now is that it can be clicked multiple times getting strong sinew multiple times, how does that work in tibia? i dont know really, i thought the body would rot with the first right click

im trying to do it so it rots xD but i cant get it right
Lua:
local config = {
    [12545] = {itemId = 12506, storage = Storage.FathersBurdenQuest.Corpse.Scale, text = 'Glitterscale\'s scale.'},
    [12546] = {itemId = 12504, storage = Storage.FathersBurdenQuest.Corpse.Sinew, text = 'Heoni\'s sinew'}
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local corpse = config[item.itemid]
    if not corpse then
        return true
    end

    if not player:getStorageValue(corpse.storage) == 1 then
        return false
    end
    if corpse.item == 12545 then
        item:transform(3105)
        end
    if corpse.item == 12546 then
        item:transform(3105)
        end
   
       
   

    player:addItem(corpse.itemId, 1)
    player:setStorageValue(corpse.storage, 1)
    player:say('You acquired ' .. corpse.text, TALKTYPE_MONSTER_SAY)
    return true
end
 
Last edited:
I see nothing wrong with the intial script, you should probably check which storage is used and what the actual value is for the player.
Also, try doing this on a freshly created character.

Lua:
local config = {
    [12545] = {itemId = 12506, storage = Storage.FathersBurdenQuest.Corpse.Scale, text = 'Glitterscale\'s scale.'},
    [12546] = {itemId = 12504, storage = Storage.FathersBurdenQuest.Corpse.Sinew, text = 'Heoni\'s sinew'}
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local corpse = config[item.itemid]
    if not corpse then
        return true
    end

    print(corpse.storage, player:getStorageValue(corpse.storage))

    if player:getStorageValue(corpse.storage) == 1 then
        return false
    end

    player:addItem(corpse.itemId, 1)
    player:setStorageValue(corpse.storage, 1)
    player:say('You acquired ' .. corpse.text, TALKTYPE_MONSTER_SAY)
    return true
end
 
I see nothing wrong with the intial script, you should probably check which storage is used and what the actual value is for the player.
Also, try doing this on a freshly created character.

Lua:
local config = {
    [12545] = {itemId = 12506, storage = Storage.FathersBurdenQuest.Corpse.Scale, text = 'Glitterscale\'s scale.'},
    [12546] = {itemId = 12504, storage = Storage.FathersBurdenQuest.Corpse.Sinew, text = 'Heoni\'s sinew'}
}

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local corpse = config[item.itemid]
    if not corpse then
        return true
    end

    print(corpse.storage, player:getStorageValue(corpse.storage))

    if player:getStorageValue(corpse.storage) == 1 then
        return false
    end

    player:addItem(corpse.itemId, 1)
    player:setStorageValue(corpse.storage, 1)
    player:say('You acquired ' .. corpse.text, TALKTYPE_MONSTER_SAY)
    return true
end
the player started doing the quest, and even tho he can open the doors of the quest, when the player right clicks the monster, it says you cannot use this object :S


it printed:
3007 1
 
I see nothing wrong with the intial script, you should probably check which storage is used and what the actual value is for the player.
Also, try doing this on a freshly created character.
 
I see nothing wrong with the intial script, you should probably check which storage is used and what the actual value is for the player.
Also, try doing this on a freshly created character.
hey, im not sure what you mean with the first part, however i just created a new character and used the body, got the item and printed
3007 -1

ooh interesting, tried a second time and wasn't possible, so i guess works fine on a brand new character, why wouldn't it work on already made characters? i just put this quest yesterday, a player started it and went to Heoni and wasnt able to take the strong sinew :S
 
use search in files... I do not think I got your server on my hard drive so.
Maybe its a 100% real cip data and if thats the case you already edited that storage to 1. Maybe you are adding those storages via login scripts IDK
 
use search in files... I do not think I got your server on my hard drive so.
Maybe its a 100% real cip data and if thats the case you already edited that storage to 1. Maybe you are adding those storages via login scripts IDK
i went to lib and change storages to a number that is not in my server files, i hope that fix it, thanks guys :D
 
Back
Top