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

Compiling (8.60) The Forgotten Server 1.2

Jompi

A hoagie in disguise.
Joined
Oct 22, 2007
Messages
197
Solutions
1
Reaction score
8
Location
Sweden
I have compiled this [8.60] The Forgotten Server 1.2 and I have noticed some bugs with it.

First of, your character walks really clunky and choppy, like if you are hasted and change direction the character moves really strange. Especially when you mapclick, the character lags really much if you do that.

Second - The quest system just does not work. Is there another quest system I am not aware of or is it just a bug?
I have tried the regular actionID 2000 and UniqueID ***** but when you click the chest in-game it just opens the chest and the item is inside it, also you can move the chest.

So my questions are:
• Can I do something to these bugs, and if so - Can anyone give a few tips?
And did I do something wrong when compiling this or is this a bug within the data?



I have been away from the OT community for quite a while and recently returned. I am reading about compiling so I am not very good at it yet. So if anyone has any solutions to this have in mind that I am not the best compiler out there ;)

Thanks in advance!

Didn't know I could edit a comment.
 
Last edited by a moderator:
the quest system doesnt work like that anymore, the way the tfs 1.2 default works you put the item's id as unique id on the chest.. I find that pretty annoying aswell, because you will want to have several exceptions.. So you have to code the quests yourself/add them to the quests.lua..
 
the quest system doesnt work like that anymore, the way the tfs 1.2 default works you put the item's id as unique id on the chest.. I find that pretty annoying aswell, because you will want to have several exceptions.. So you have to code the quests yourself/add them to the quests.lua..

Ah, that explains it. Like you had to do before actionID 2000? I remember that. Any idea how to make a quest that rewards a backpack of items? Otherwise I'm sure there's a tutorial around here somewhere.

Thanks for clarifying that for me ^^
 
give the chest an unused unique id and change the quests.lua to if item.uid == your-chosen-unique-id then player:additem() ~~~

EDIT:
I have something like this:
Lua:
    elseif item.uid == 1994 then
        if player:getStorageValue(1994) == -1 then
            local bag = Container(1994)
            bag:addItem(2168)
            bag:addItem(2144, 2)
            bag:addItem(2152, 3)
            local totalWeight = bag:getCapacity()
            if playerCap >= totalWeight then
                player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have found a purple bag that contains some valuables.')
                player:addItemEx(bag)
                player:setStorageValue(item.uid, 1)
            else
                player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have found a purple bag that contains some valuables weighing ' .. totalWeight .. ' oz it\'s too heavy.')
            end
        end
 
give the chest an unused unique id and change the quests.lua to if item.uid == your-chosen-unique-id then player:additem() ~~~

EDIT:
I have something like this:
Lua:
    elseif item.uid == 1994 then
        if player:getStorageValue(1994) == -1 then
            local bag = Container(1994)
            bag:addItem(2168)
            bag:addItem(2144, 2)
            bag:addItem(2152, 3)
            local totalWeight = bag:getCapacity()
            if playerCap >= totalWeight then
                player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have found a purple bag that contains some valuables.')
                player:addItemEx(bag)
                player:setStorageValue(item.uid, 1)
            else
                player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have found a purple bag that contains some valuables weighing ' .. totalWeight .. ' oz it\'s too heavy.')
            end
        end

Delete everything in the quest.lua or add that text?

I get this error:
[Warning - Event::checkScript] Can not load script: scripts/quests/quests.lua
data/actions/scripts/quests/quests.lua:1: <eof>' expected near 'elseif'
o_O
 
Delete everything in the quest.lua or add that text?

I get this error:
[Warning - Event::checkScript] Can not load script: scripts/quests/quests.lua
data/actions/scripts/quests/quests.lua:1: <eof>' expected near 'elseif'
o_O
add the text, doesn't delete anything.
 
This is the one, haven't edited anything in it.
Code:
local annihilatorReward = {1990, 2400, 2431, 2494}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if item.uid <= 1250 or item.uid >= 30000 then
        return false
    end

    local itemType = ItemType(item.uid)
    if itemType:getId() == 0 then
        return false
    end

    local itemWeight = itemType:getWeight()
    local playerCap = player:getFreeCapacity()
    if isInArray(annihilatorReward, item.uid) then
        if player:getStorageValue(30015) == -1 then
            if playerCap >= itemWeight then
                if item.uid == 1990 then
                    player:addItem(1990, 1):addItem(2326, 1)
                else
                    player:addItem(item.uid, 1)
                end
                player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have found a ' .. itemType:getName() .. '.')
                player:setStorageValue(30015, 1)
            else
                player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have found a ' .. itemType:getName() .. ' weighing ' .. itemWeight .. ' oz it\'s too heavy.')
            end
        else
            player:sendTextMessage(MESSAGE_INFO_DESCR, "It is empty.")
        end
    elseif player:getStorageValue(item.uid) == -1 then
        if playerCap >= itemWeight then
            player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have found a ' .. itemType:getName() .. '.')
            player:addItem(item.uid, 1)
            player:setStorageValue(item.uid, 1)
        else
            player:sendTextMessage(MESSAGE_INFO_DESCR, 'You have found a ' .. itemType:getName() .. ' weighing ' .. itemWeight .. ' oz it\'s too heavy.')
        end
    else
        player:sendTextMessage(MESSAGE_INFO_DESCR, "It is empty.")
    end
    return true
end
 
Back
Top