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

[8.0] - TFS 1.2

Problem one. on Share Experience not working.
Problem two. Two playres PVP just attack sword, spear, wand, only one hit after mark. unmark and mark again only one hit
View attachment 43143
Post automatically merged:

boots of haste not change speed on player level 100+
Shared experience work throught the command !share or /share and not with right click ,and i didn't understand your second problem ,could you explain better please?
 
Last edited:
Basically your error occurs because you oppened the project with visual studio 2017 and now you need to retarget to the right libraries or simply download the sources from github again ,and open using visual studio 2015 , if you open with visual studio 2017 the same issue will happen again.If you don't want to re-download ,right click on project/properties and change plataform toolset to visual studio 2015 (v140) .
Post automatically merged:

For those who want to compile but are not having success I hope this helps, in fact it is very easy , just follow what is written and you will have no problems .

compiling msvc 2015.png
 
Last edited:
Basically your error occurs because you oppened the project with visual studio 2017 and now you need to retarget to the right libraries or simply download the sources from github again ,and open using visual studio 2015 , if you open with visual studio 2017 the same issue will happen again.If you don't want to re-download ,right click on project/properties and change plataform toolset to visual studio 2015 (v140) .
Post automatically merged:

For those who want to compile but are not having success I hope this helps, in fact it is very easy , just follow what is written and you will have no problems .

View attachment 43242
Done working perfect. THX Regards :)
 
Basically your error occurs because you oppened the project with visual studio 2017 and now you need to retarget to the right libraries or simply download the sources from github again ,and open using visual studio 2015 , if you open with visual studio 2017 the same issue will happen again.If you don't want to re-download ,right click on project/properties and change plataform toolset to visual studio 2015 (v140) .
Post automatically merged:

For those who want to compile but are not having success I hope this helps, in fact it is very easy , just follow what is written and you will have no problems .

View attachment 43242
Can you help me change the settings in the player.ccp file related to mana and heal max after getting the level up??
 
i'm transforming "realera 8.0" into a realots 8.0 using even some scripts and cipsofts maps, i already added all the npcs of addons scattered around the map, spells sell in npcs, raids, rookgaard full cipsoft when walking on the sqm in rotworm the spike sword disappears, the boat's sqm together with mainland, all the small quests and missions like the paradox, and quest log, I'm trying to make this global 8.0 100% cipsoft and soon I'll make it available for downlod, since the server is already is 96% still missing some details like the books... the houses are already 100% just need to rename some with names of houses rl.

Sorry my english =(
 
Code:
/home/forgottenserver-master/src/player.cpp:401:10: error: variable ‘extraDefense’ set but not used [-Werror=unused-but-set-variable]

  int32_t extraDefense = 0;

Ok in Linux ExtraDefense ≠ extraDefense

but still doesn't work
 
Last edited:
Try to reproduce with default data.It's happening with all stackable items (gold coins, other foods ,bolts ,spears) ,or just with the ham?

ok, i checked this meat error is in your unedited engine. there is no specific weight in your items.xml file. and then it worked well. but if you specify the weight of the 20 oz ham item then this bug occurs
Post automatically merged:

there is one more mistake. door with a key, for example 3810. the key opens the door and it is correct but when you use the key again the door will not close. you have to click on it once

I attach my action \ other \ door
script on another engine works flawlessly
Lua:
unlockedDoors = { }

local function isDoorLocked(keyId, position)
    if keyId == 0 then
        return false
    end

    if unlockedDoors[keyId] then
        for i = 1, #unlockedDoors[keyId] do
            if position == unlockedDoors[keyId][i] then
                return false
            end
        end
    end

    return true
end

local function toggleDoorLock(doorItem, locked)
    local doorId = doorItem:getId()
    local keyId = doorItem:getActionId()
    local doorPosition = doorItem:getPosition()

    if locked then
        for i = #unlockedDoors[keyId], 1, -1 do
            if unlockedDoors[keyId][i] == doorPosition then
                table.remove(unlockedDoors[keyId], i)
            end
        end

        if not doors[doorId] then
            doorItem:transform(doorId - 1)
        end
        return
    end

    if not unlockedDoors[keyId] then
        unlockedDoors[keyId] = {}
    end

    doorItem:transform(doors[doorId])
    unlockedDoors[keyId][#unlockedDoors[keyId] + 1] = doorPosition
end

function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    local itemId, actionId = item:getId(), item:getActionId()
    if isInArray(questDoors, itemId) then
        if player:getStorageValue(actionId) ~= -1 then
            item:transform(itemId + 1)
            player:teleportTo(toPosition, true)
        else
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The door seems to be sealed against unwanted intruders.")
        end
        return true

    elseif isInArray(levelDoors, itemId) then
        if actionId > 0 and player:getLevel() >= actionId - 1000 then
            item:transform(itemId + 1)
            player:teleportTo(toPosition, true)
        else
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Only the worthy may pass.")
        end
        return true

    elseif isInArray(keys, itemId) then
        if not target
                or not target:isItem()
                or not target:getType():isDoor()
                or Tile(toPosition):getHouse() then
            return false
        end

        local targetId = target:getId()
        if isInArray(openSpecialDoors, targetId)
                or isInArray(questDoors, targetId)
                or isInArray(levelDoors, targetId) then
            return false
        end

        local targetActionId = target:getActionId()
        if targetActionId > 0 and actionId == targetActionId then
            if not isDoorLocked(targetActionId, toPosition) then
                toggleDoorLock(target, true)
            elseif doors[targetId] then
                toggleDoorLock(target, false)
            end
        else
            player:sendCancelMessage("The key does not match.")
        end

        return true
    end

    if isInArray(horizontalOpenDoors, itemId) or isInArray(verticalOpenDoors, itemId) then
        local doorCreature = Tile(toPosition):getTopCreature()
        if doorCreature then
            toPosition.x = toPosition.x + 1
            local query = Tile(toPosition):queryAdd(doorCreature, bit.bor(FLAG_IGNOREBLOCKCREATURE, FLAG_PATHFINDING))
            if query ~= RETURNVALUE_NOERROR then
                toPosition.x = toPosition.x - 1
                toPosition.y = toPosition.y + 1
                query = Tile(toPosition):queryAdd(doorCreature, bit.bor(FLAG_IGNOREBLOCKCREATURE, FLAG_PATHFINDING))
            end

            if query ~= RETURNVALUE_NOERROR then
                player:sendCancelMessage(query)
                return true
            end

            doorCreature:teleportTo(toPosition, true)
        end
        if not isInArray(openSpecialDoors, itemId) then
            item:transform(itemId - 1)
        end
        return true
    end

    if doors[itemId] then
        if not isDoorLocked(actionId, toPosition) then
            item:transform(doors[itemId])
        else
            player:sendTextMessage(MESSAGE_INFO_DESCR, "It is locked.")
        end
        return true
    end

    return false
end
 
Last edited:
Back
Top