• 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] - Server Global Full [Real Map]

Is it not possible to use the monster datapack from TFS 1.5 8.0 downgrade version?

I still cant figure out why monsters wont ignore GM characters even with ignoredbymonsters="1" activated
lol
Post automatically merged:

Sorry for double posting but I got balance, withdraw and deposit to work by editing in data/lib/miscellaneous/050-functions
With this everything will work except for transfering money. I still can't figure out that part.

Lua:
function isNumber(str)
     return tonumber(str) ~= nil
end

function getAccountNumberByPlayerName(name)
    local player = Player(name)
    if player ~= nil then
        return player:getAccountId()
    end

    local resultId = db.storeQuery("SELECT `account_id` FROM `players` WHERE `name` = " .. db.escapeString(name))
    if resultId ~= false then
        local accountId = result.getNumber(resultId, "account_id")
        result.free(resultId)
        return accountId
    end
    return 0
end

function clearBossRoom(playerId, bossId, centerPosition, rangeX, rangeY, exitPosition)
    local spectators, spectator = Game.getSpectators(centerPosition, false, false, rangeX, rangeX, rangeY, rangeY)
    for i = 1, #spectators do
        spectator = spectators[i]
        if spectator:isPlayer() and spectator.uid == playerId then
            spectator:teleportTo(exitPosition)
            exitPosition:sendMagicEffect(CONST_ME_TELEPORT)
        end

        if spectator:isMonster() then
            spectator:remove()
        end
    end
end

function doAddExp(cid, amount, useExpStages, customColor, ...)
    local player = cid:getPlayer()
    if not player then
        return false
    else
        if useExpStages then amount = amount * Game.getExperienceStage(player:getLevel()) end
        if not customColor then customColor = TEXTCOLOR_WHITE_EXP end
        Game.sendAnimatedText(amount, getCreaturePosition(cid), customColor)
        return doPlayerAddExp(cid, amount)
    end
end

function doScanContainer(item, backpack, tables, count)
    if isContainer(item.uid) then
        for i = 0, getContainerSize(item.uid) do
            local item = getContainerItem(item.uid, i)
            if not(isContainer(item.uid)) then
                table.insert(tables, item.itemid)
                table.insert(count, item.type)
            else
                table.insert(backpack, item.itemid)
                doScanContainer(item, backpack, tables, count)
            end
        end
    end
end

function clearRoom(centerPosition, rangeX, rangeY, exitPosition)
    local spectators, spectator = Game.getSpectators(centerPosition, false, false, rangeX, rangeX, rangeY, rangeY)
    for i = 1, #spectators do
        spectator = spectators[i]
        if spectator:isMonster() then
            spectator:remove()
        end
    end
end

function roomIsOccupied(centerPosition, rangeX, rangeY)
    local spectators = Game.getSpectators(centerPosition, false, true, rangeX, rangeX, rangeY, rangeY)
    if #spectators ~= 0 then
        return true
    end

    return false
end

function clearForgotten(fromPosition, toPosition, exitPosition, storage)
    for x = fromPosition.x, toPosition.x do
        for y = fromPosition.y, toPosition.y do
            for z = fromPosition.z, toPosition.z do
                if Tile(Position(x, y, z)) then
                    local creature = Tile(Position(x, y, z)):getTopCreature()
                    if creature then
                        if creature:isPlayer() then
                            creature:teleportTo(exitPosition)
                            exitPosition:sendMagicEffect(CONST_ME_TELEPORT)
                            creature:say('Time out! You were teleported out by strange forces.', TALKTYPE_MONSTER_SAY)
                        elseif creature:isMonster() then
                            creature:remove()
                        end
                    end
                end
            end
        end
    end
    Game.setStorageValue(storage, 0)
end

function getMoneyCount(string)
    local b, e = string:find("%d+")
    local money = b and e and tonumber(string:sub(b, e)) or -1
    if isValidMoney(money) then
        return money
    end
    return -1
end

--function getBankMoney(cid, amount)
 --local player = Player(cid)
 --if player:getBankBalance() >= amount then
 -- player:setBankBalance(player:getBankBalance() - amount)
 -- player:sendTextMessage(MESSAGE_INFO_DESCR, "Paid " .. amount .. " gold from bank account. Your account balance is now " .. player:getBankBalance() .. " gold.")
 -- return true
-- end
 --return false
--end

function getMoneyWeight(money)
    local gold = money
    local crystal = math.floor(gold / 10000)
    gold = gold - crystal * 10000
    local platinum = math.floor(gold / 100)
    gold = gold - platinum * 100
    return (ItemType(2160):getWeight() * crystal) + (ItemType(2152):getWeight() * platinum) + (ItemType(2148):getWeight() * gold)
end

function getRealDate()
    local month = tonumber(os.date("%m", os.time()))
    local day = tonumber(os.date("%d", os.time()))

    if month < 10 then
        month = '0' .. month
    end
    if day < 10 then
        day = '0' .. day
    end
    return day .. '/' .. month
end

function getRealTime()
    local hours = tonumber(os.date("%H", os.time()))
    local minutes = tonumber(os.date("%M", os.time()))

    if hours < 10 then
        hours = '0' .. hours
    end
    if minutes < 10 then
        minutes = '0' .. minutes
    end
    return hours .. ':' .. minutes
end

function isValidMoney(money)
    return isNumber(money) and money > 0 and money < 4294967296
end

function iterateArea(func, from, to)
    for z = from.z, to.z do
        for y = from.y, to.y do
            for x = from.x, to.x do
                func(Position(x, y, z))
            end
        end
    end
end

function playerExists(name)
    local resultId = db.storeQuery('SELECT `name` FROM `players` WHERE `name` = ' .. db.escapeString(name))
    if resultId then
        result.free(resultId)
        return true
    end
    return false
end

function checkWallArito(item, toPosition)
    if (not item:isItem()) then
        return false
    end
    local wallTile = Tile(Position(33206, 32536, 6))
    if not wallTile or wallTile:getItemCountById(8210) > 0 then
        return false
    end
    local checkEqual = {
        [2016] = {Position(33207, 32537, 6), {5858, -1}, Position(33205, 32537, 6)},
        [2419] = {Position(33205, 32537, 6), {2016, 1}, Position(33207, 32537, 6),5858}
    }
    local it = checkEqual[item:getId()]
    if(it and it[1] == toPosition and Tile(it[3]):getItemCountById(it[2][1], it[2][2]) > 0)then
        wallTile:getItemById(877):transform(8210)

        if(it[4])then
            item:transform(it[4])
        end

        addEvent(
            function()
                if(Tile(Position(33206, 32536, 6)):getItemCountById(8210) > 0) then
                    Tile(Position(33206, 32536, 6)):getItemById(8210):transform(877)
                end
                if(Tile(Position(33205, 32537, 6)):getItemCountById(5858) > 0) then
                    Tile(Position(33205, 32537, 6)):getItemById(5858):remove()
                end
            end, 5*60*1000
        )
    else
        if(it and it[4] and it[1] == toPosition)then
            item:transform(it[4])
        end
    end
end

function placeSpawnRandom(fromPositon, toPosition, monsterName, ammount, hasCall, storage, value, removestorage, sharedHP, event, message)
    for _x = fromPositon.x, toPosition.x do
        for _y = fromPositon.y, toPosition.y do
            for _z = fromPositon.z, toPosition.z do
                local tile = Tile(Position(_x,_y,_z))
                if not removestorage then
                    if tile and tile:getTopCreature() and tile:getTopCreature():isMonster() and tile:getTopCreature():getName() == monsterName then
                        tile:getTopCreature():remove()
                    end
                else
                    if tile and tile:getTopCreature() and tile:getTopCreature():isMonster() and tile:getTopCreature():getStorageValue(storage) == value then
                        tile:getTopCreature():remove()
                    end
                end
            end
        end
    end
        if ammount and ammount > 0 then
            local summoned = 0
            local tm = os.time()
            repeat
                local tile = false
                -- repeat
                    local position = {x = math.random(fromPositon.x, toPosition.x), y = math.random(fromPositon.y, toPosition.y), z = math.random(fromPositon.z, toPosition.z)}
                    -- tile = Tile(position)
                    -- passando = tile and #tile:getItems() <= 0
                -- until (passando == true)
                local monster = Game.createMonster(monsterName, position)
                if monster then
                    summoned = summoned + 1
                    -- setando o primeiro spawn
                    monster:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
                    if(hasCall) then
                        monster:setStorage(storage, value)
                        if sharedHP then
                            monster:beginSharedLife(tm)
                            monster:registerEvent("sharedLife")
                        end
                        if event then
                            monster:registerEvent(event)
                        end
                        local function SendMessage(mit, message)
                            if not Monster(mit) then
                                return false
                            end
                            Monster(mit):say(message, TALKTYPE_MONSTER_SAY)
                        end
                        if message then
                            addEvent(SendMessage, 200,monster:getId(), message)
                        end
                    end
                end
            until (summoned == ammount)
        end
end

function getMonstersInArea(fromPos, toPos, monsterName, ignoreMonsterId)
    local monsters = {}
    for _x = fromPos.x, toPos.x do
        for _y = fromPos.y, toPos.y do
            for _z = fromPos.z, toPos.z do
                local tile = Tile(Position(_x,_y,_z))
                if tile and tile:getTopCreature() then
                    for _, pid in pairs(tile:getCreatures()) do
                        local mt = Monster(pid)
                        if not ignoreMonsterId then
                            if(mt and mt:isMonster() and mt:getName():lower() == monsterName:lower() and not mt:getMaster() )then
                                monsters[#monsters + 1] = mt
                            end
                        else
                            if(mt and mt:isMonster() and mt:getName():lower() == monsterName:lower() and not mt:getMaster() and ignoreMonsterId ~= mt:getId())then
                                monsters[#monsters + 1] = mt
                            end
                        end
                    end
                end
            end
        end
    end
    return monsters
end

function isPlayerInArea(fromPos, toPos)
    for _x = fromPos.x, toPos.x do
        for _y = fromPos.y, toPos.y do
            for _z = fromPos.z, toPos.z do
                creature = getTopCreature({x = _x, y = _y, z = _z})
                    if (isPlayer(creature.uid)) then
                    return true
                end
            end
        end
    end
    return false
end

function cleanAreaQuest(frompos, topos, itemtable, blockmonsters)
    if not itemtable then
        itemtable = {}
    end
    if not blockmonsters then
        blockmonsters = {}
    end
    for _x = frompos.x, topos.x do
        for _y = frompos.y, topos.y do
            for _z = frompos.z, topos.z do
                local tile = Tile(Position(_x, _y, _z))
                if tile then
                    local itc = tile:getItems()
                    if itc and tile:getItemCount() > 0 then
                        for _, pid in pairs(itc) do
                            local itp = ItemType(pid:getId())
                            if itp and itp:isCorpse() then
                                pid:remove()
                            end
                        end
                    end
                    for _, pid in pairs(itemtable) do
                        local _until = tile:getItemCountById(pid)
                        if _until > 0 then
                            for i = 1, _until do
                                local it = tile:getItemById(pid)
                                if it then
                                    it:remove()
                                end
                            end
                        end
                    end
                    local mtempc = tile:getCreatures()
                    if mtempc and tile:getCreatureCount() > 0 then
                        for _, pid in pairs(mtempc) do
                            if pid:isMonster() and not isInArray(blockmonsters, pid:getName():lower()) then
                                -- broadcastMessage(pid:getName())
                                pid:remove()
                            end
                        end
                    end
                end
            end
        end
    end
    return true
end

function kickerPlayerRoomAfferMin(playername, fromPosition, toPosition, teleportPos, message, monsterName, minutes, firstCall, itemtable, blockmonsters)
    local players = false
    if type(playername) == table then
        players = true
    end
    local player = false
    if not players then
        player = Player(playername)
    end
    local monster = {}
    if monsterName ~= '' then
        monster = getMonstersInArea(fromPosition, toPosition, monsterName)
    end
    if player == false and players == false then
        return false
    end
    if not players and player then
        if player:getPosition():isInRange(fromPosition, toPosition) and minutes == 0 then
            if monsterName ~= '' then
                for _, pid in pairs(monster) do
                    if pid:isMonster() then
                        if pid:getStorageValue("playername") == playername then
                            pid:remove()
                        end
                    end
                end
            else
                if not itemtable then
                    itemtable = {}
                end
                if not blockmonsters then
                    blockmonsters = {}
                end
                cleanAreaQuest( fromPosition, toPosition, itemtable, blockmonsters)
            end
            player:teleportTo(teleportPos, true)
            player:sendTextMessage(MESSAGE_EVENT_ADVANCE, message)
            return true
        end
    else
        if  minutes == 0 then
            if monsterName ~= '' then
                for _, pid in pairs(monster) do
                    if pid:isMonster() then
                        if pid:getStorageValue("playername") == playername then
                            pid:remove()
                        end
                    end
                end
            else
                if not itemtable then
                    itemtable = {}
                end
                if not blockmonsters then
                    blockmonsters = {}
                end
                cleanAreaQuest( fromPosition, toPosition, itemtable, blockmonsters)
            end
            for _, pid in pairs(playername) do
                local player = Player(pid)
                if player and player:getPosition():isInRange(fromPosition, toPosition)then
                    player:teleportTo(teleportPos, true)
                    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, message)
                end
            end
            return true
        end
    end
    local min = 60 -- use o 60 para 1 minuto
    if(firstCall)then
        addEvent(kickerPlayerRoomAfferMin, 1000,playername, fromPosition, toPosition, teleportPos, message, monsterName, minutes, false, itemtable, blockmonsters)
        -- broadcastMessage("Comecou contar em ".. minutes .." minutoss")
    else
        local subt = minutes-1
        if(monsterName ~= '')then
            if minutes > 3 and table.maxn(monster) == 0 then
                subt = 2
            end
        end
        addEvent(kickerPlayerRoomAfferMin, min*1000,playername, fromPosition, toPosition, teleportPos, message, monsterName, subt, false, itemtable, blockmonsters)
    end
end

to transfer add:

Lua:
function Player.transferMoneyTo(self, target, amount)
    local balance = self:getBankBalance()
    if amount > balance then
        return false
    end

    local targetPlayer = Player(target)
    if targetPlayer then
        targetPlayer:setBankBalance(targetPlayer:getBankBalance() + amount)
    else
        if not playerExists(target) then
            return false
        end
        db.query("UPDATE `players` SET `balance` = `balance` + '" .. amount .. "' WHERE `name` = " .. db.escapeString(target))
    end

    self:setBankBalance(self:getBankBalance() - amount)
    return true
end
 
i use znote acc 1.6

"Fatal error: Uncaught mysqli_sql_exception: Unknown column 'active_email' in 'field list' in C:\xampp\htdocs\tfs800-v1\engine\database\connect.php:54 Stack trace: #0 C:\xampp\htdocs\tfs800-v1\engine\database\connect.php(54): mysqli_query(Object(mysqli), 'SELECT ip, `c...') #1 C:\xampp\htdocs\tfs800-v1\engine\function\users.php(1529): mysql_select_single('SELECT ip, `c...') #2 C:\xampp\htdocs\tfs800-v1\engine\init.php(72): user_znote_account_data('3', 'ip', 'created', 'points', 'cooldown', 'flag', 'active_email') #3 C:\xampp\htdocs\tfs800-v1\index.php(2): require_once('C:\\xampp\\htdocs...') #4 {main} thrown in C:\xampp\htdocs\tfs800-v1\engine\database\connect.php on line 54"

solve?
 
When im create account and character on website is ok myacc or gesior when i try login to the game i see player list but when login to the game i got client crash where is problem ? town position is ok. if i login to the game by GOD i can normal play sorry for my bad english maybe someone can help me thanks!fghgfhgfh.png
 

Attachments

Last edited:
When im create account and character on website is ok myacc or gesior when i try login to the game i see player list but when login to the game i got client crash where is problem ? town position is ok. if i login to the game by GOD i can normal play sorry for my bad english maybe someone can help me thanks!View attachment 69528
Try with OtclientV8, I had no issue with it.
 
Answer to that question regarding original client crash upon new character/non gm char login has already been answered/solved in this very thread.
Anyway I'll save you the time: remove adventureblessings.lua in creaturescripts. Adventurer's blessing wasn't a thing in 8.0.
 

Update:

Hello guys, first of all I apologize for any inconvenience. All bugs that were reported in this topic they are fixed! A useless folder has been deleted and the server file is weighing less. Please keep reporting bugs and thanks for believing in the project, I couldn't post it on github so I'll post it here for now. Creatures still attack the adm account, I suspect it's a problem with the distro's source, just put infinite life or become invisible.

  • Adventurer's Blessing - Removed
  • Advenure Stone dialogue - Has been removed (11 npc's)
  • Life Fluid - Fixed
  • Boat south of Thais - Fixed
  • Banks Npc's - Fixed
  • Cheats - Removed
  • Bp mf, lf, sd, uh, gfb - Can be purchased directly.

Remarks: contains some npc's files, creatures from other versions that were not deleted from the server that are not influential in anything, just ignore or delete. You also need to know that the walls of houses, or city of nargor are wrong, you just have to fix it or wait for some updates to be updated, or how dirt on your floor can leave it as is or fix it manually. This all has no influence on the server!
 

Attachments

Noice Thats Nice GIF
 
Creatures still attack the adm account, I suspect it's a problem with the distro's source, just put infinite life or become invisible.
I'm not sure if it's an issue with the source. However if you use a flag calculator instead of manually enabling each flag it will all work correctly. Monsters will ignore gms.
Flagcalculator

This folder you removed which one was it and what did it contain?

P.S. you should point out known bugs and locations (example which houses has the wrong walls as you pointed out but didn't say where and how many) more precisely maybe make a known error/bugs log, changelog (or you know... github) in your original post so people who do not have the patience to wait can tackle the bugs on their own instead of whining and not looking through the whole thread 😁 It will also benefit you so you do not have to do everything on your own.

edit: I haven't checked the map itself (can't be bothered tbh) maybe OP removed "cheat" from the actual map but the action scripts and lua files are still in there.
Just thought I let people know. Unless there was some other shady scripts/"cheats" other than this that was removed.

Lua:
    <action uniqueid="5252" script="switch/transdec.lua" />
    <action uniqueid="5253" script="switch/trandec.lua" />
 
Last edited:
why can't open map in rme?
Post automatically merged:

where is the problem? server online like 5-7 min and crash crash.png
 
Last edited:
I'm not sure if it's an issue with the source. However if you use a flag calculator instead of manually enabling each flag it will all work correctly. Monsters will ignore gms.
Flagcalculator

This folder you removed which one was it and what did it contain?

P.S. you should point out known bugs and locations (example which houses has the wrong walls as you pointed out but didn't say where and how many) more precisely maybe make a known error/bugs log, changelog (or you know... github) in your original post so people who do not have the patience to wait can tackle the bugs on their own instead of whining and not looking through the whole thread 😁 It will also benefit you so you do not have to do everything on your own.

edit: I haven't checked the map itself (can't be bothered tbh) maybe OP removed "cheat" from the actual map but the action scripts and lua files are still in there.
Just thought I let people know. Unless there was some other shady scripts/"cheats" other than this that was removed.

Lua:
    <action uniqueid="5252" script="switch/transdec.lua" />
    <action uniqueid="5253" script="switch/trandec.lua" />
Delete the scripts trandec and transdec yourself, if you had the cheat somewhere, the error would appear in the distro with the coordinates. As for the houses, check the tiles and increase the area on some walls as it doesn't take any work.
Post automatically merged:

why can't open map in rme?
Post automatically merged:

where is the problem? server online like 5-7 min and crash View attachment 69572
This error of crashing the server usually gives in windows 7, maybe the processing is not so resistant.

Download the latest version of remeres.
 
Delete the scripts trandec and transdec yourself, if you had the cheat somewhere, the error would appear in the distro with the coordinates. As for the houses, check the tiles and increase the area on some walls as it doesn't take any work.
Yes, I was telling people to delete it... I was just asking which parts of the "cheat" you deleted etc. Some people may already have configured this datapack and fixed some stuff themselves and would be nice for them to just swap out the scripts/codes and things you changed instead of downloading the whole distro again... Which is why it's nice to have a changelog/github. Yes I know most stuff are easy fixes but people probably wanted to know WHERE these graphical errors were. I was asking for possible LOCATIONS not saying you should fix everything haha.

Keep up the good work thought this is a nice release :)!
 
Last edited:
Yes, I was telling people to delete it... I was just asking which parts of the "cheat" you deleted etc. Some people may already have configured this datapack and fixed some stuff themselves and would be nice for them to just swap out the scripts/codes and things you changed instead of downloading the whole distro again... Which is why it's nice to have a changelog/github. Yes I know most stuff are easy fixes but people probably wanted to know WHERE these graphical errors were. I was asking for possible LOCATIONS not saying you should fix everything haha.

Keep up the good work thought this is a nice release :)!
As for the houses I can't answer which walls are poorly made, there's a house east of thais that if you put a decorative item on the wall, after the server save will disappear because it doesn't seem to belong to the house.

I couldn't upload a folder on github, because I don't understand how the site's system works for uploading, if anyone can help me and instruct me, send me a private message. thanks!
 

Update:

Hello guys, first of all I apologize for any inconvenience. All bugs that were reported in this topic they are fixed! A useless folder has been deleted and the server file is weighing less. Please keep reporting bugs and thanks for believing in the project, I couldn't post it on github so I'll post it here for now. Creatures still attack the adm account, I suspect it's a problem with the distro's source, just put infinite life or become invisible.

  • Adventurer's Blessing - Removed
  • Advenure Stone dialogue - Has been removed (11 npc's)
  • Life Fluid - Fixed
  • Boat south of Thais - Fixed
  • Banks Npc's - Fixed
  • Cheats - Removed
  • Bp mf, lf, sd, uh, gfb - Can be purchased directly.

Remarks: contains some npc's files, creatures from other versions that were not deleted from the server that are not influential in anything, just ignore or delete. You also need to know that the walls of houses, or city of nargor are wrong, you just have to fix it or wait for some updates to be updated, or how dirt on your floor can leave it as is or fix it manually. This all has no influence on the server!

fix GM groups.xml

Lua:
<?xml version="1.0" encoding="UTF-8"?>
<groups>
    <group id="1" name="player" flags="0" maxdepotitems="0" maxvipentries="0" access="0" />
    <group id="2" name="gamemaster" flags="412316860415" maxdeoptitems="0" maxvipentries="0" access="1" />
    <group id="3" name="god" flags="547608305658" maxdepotitems="0" maxvipentries="0" access="1" />
</groups>
 
fix GM groups.xml

Lua:
<?xml version="1.0" encoding="UTF-8"?>
<groups>
    <group id="1" name="player" flags="0" maxdepotitems="0" maxvipentries="0" access="0" />
    <group id="2" name="gamemaster" flags="412316860415" maxdeoptitems="0" maxvipentries="0" access="1" />
    <group id="3" name="god" flags="547608305658" maxdepotitems="0" maxvipentries="0" access="1" />
</groups>
Nice, thank you so much! :)
 
Hi,
How can I add tables etc. to phpmyadmin for this server? I’ve used this tutorial and later compiled server posted in this topic but have an error when connecting to database.

Code:
>> Establishing database connection...

MySQL Error Message: Lost connection to MySQL server at 'reading initial communication packet', system error: 0
> ERROR: Failed to connect to database.
>> No services running. The server is NOT online.

Here is code from config.lua (I just deleted some of IP address and set up port to 2344 because it’s how I connect thru website http://IP:2344)

Lua:
mysqlHost = "172.105..."
mysqlUser = "admin"
mysqlPass = "password"
mysqlDatabase = "global"
mysqlPort = 2344
mysqlSock = ""
passwordType = "sha512"

Thanks for help!
Best regards,
Oskar.
 
Back
Top