OpenTibiaBR - Canary Project is a free and open-source MMORPG server emulator written in C++.

OpenTibiaBR - Canary Project

Discord Channel GitHub issues GitHub pull request Contributors GitHub

GitHub repo size

Codacy Badge CodeQL Quality Gate Status

Builds

Build status

Build on Ubuntu Build on Windows

Docker

docker pull opentibiabr/canary:latest

Automation Image Size Pulls Build

Project

OpenTibiaBR - Canary Project is a free and open-source MMORPG server emulator written in C++. It is a fork of the OTServBR-Global project. To connect to the server and to take a stable experience, you can use our own client or tibia client and if you want to edit something, check our customized tools.

You are subject to our code of conduct, read at this link.

Getting Started

Issues

We use the issue tracker on GitHub. Keep in mind that everyone who is watching the repository gets notified by e-mail when there is an activity, so be thoughtful and avoid writing comments that aren't meant for an issue (e.g. "+1"). If you'd like for an issue to be fixed faster, you should either fix it yourself and submit a pull request, or place a bounty on the issue.

Pull requests

Before creating a pull request please keep in mind:

  • Do not send Pull Request changing the map, as we can't review the changes it's better to use our Discord to talk about or send the map changes to the responsible for updating it.
  • Focus on fixing only one thing, mixing too much things on the same Pull Request make it harder to review, harder to test and if we need to revert the change it will remove other things together.
  • Follow the project indentation, if your editor support you can use the editorconfig to automatic configure the indentation.
  • There are people that doesn't play the game on the official server, so explain your changes to help understand what are you changing and why.
  • Avoid opening a Pull Request to just update one line of an xml file.

Special Thanks

Sponsors

If you want to sponsor here, join on discord and send a message for one of our administrators.

Partners

Supported by OTServ Brasil

Protected by ServerCore

Comments
  • [Feature/Enhancement] - No disconnect on death

    [Feature/Enhancement] - No disconnect on death

    Description

    Credits: 0.1% @Nekiro for being so awesome.

    no more disconnection when player dies

    Type of change

    • [X] Bug fix (non-breaking change which fixes an issue)
    • [X] New feature (non-breaking change which adds functionality)
  • Crash in Weapons

    Crash in Weapons

    What happened?

    I do not know!

    How to Reproduce?

    I do not know!

    Relevant log output

    I do not know!
    

    Attach any relevant file

    https://i.imgur.com/2GO4zcR.jpg

    Version

    12.x (Default)

    What OS are you seeing the problem on?

    Ubuntu 18.04

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct
  • [Bug]: current canary/otservbr-global master branches crash server on attacking monster

    [Bug]: current canary/otservbr-global master branches crash server on attacking monster

    What happened?

    current canary/otservbr-global master branches crash server on attacking monster

    How to Reproduce?

    attack any monster

    Relevant log output

    2022-03-22 20:23:12 -  scriptId: [/home/ubuntu/server69/bagno_live/data/scripts/creaturescripts/others/boss_reward_chest.lua:callback]
    2022-03-22 20:23:12 -  timerEvent: []
    2022-03-22 20:23:12 -   callbackId:[]
    2022-03-22 20:23:12 -  function: [Scripts Interface]
    2022-03-22 20:23:12 -  error [Creature not found
    2022-03-22 20:23:12 -  stack traceback:] 
    2022-03-22 20:23:12 -  [2022-22-03 20:23:12.032] [error] Lua script error: 
    2022-03-22 20:23:12 -  scriptInterface: [Scripts Interface]
    2022-03-22 20:23:12 -  scriptId: [/home/ubuntu/server69/bagno_live/data/scripts/creaturescripts/quests/cults_of_tibia/leiden_heal.lua:callback]
    2022-03-22 20:23:12 -  timerEvent: []
    2022-03-22 20:23:12 -   callbackId:[]
    2022-03-22 20:23:12 -  function: [Scripts Interface]
    2022-03-22 20:23:12 -  error [Creature not found
    2022-03-22 20:23:12 -  stack traceback:] 
    2022-03-22 20:23:12 -  [2022-22-03 20:23:12.032] [error] Lua script error: 
    2022-03-22 20:23:12 -  scriptInterface: [Scripts Interface]
    2022-03-22 20:23:12 -  scriptId: [/home/ubuntu/server69/bagno_live/data/scripts/creaturescripts/quests/cults_of_tibia/pillar_health.lua:callback]
    2022-03-22 20:23:12 -  timerEvent: []
    2022-03-22 20:23:12 -   callbackId:[]
    2022-03-22 20:23:12 -  function: [Scripts Interface]
    2022-03-22 20:23:12 -  error [Creature not found
    2022-03-22 20:23:12 -  stack traceback:]
    

    Attach any relevant file

    No response

    Version

    12.x (Default)

    What OS are you seeing the problem on?

    Linux

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct
  • Fix remove imbuing from item

    Fix remove imbuing from item

    Description

    Fix remove imbuing from item

    Behaviour

    Actual

    When one imbuing end, all imbuing from item will be removed

    Expected

    Only one imbuing removed

    Fixes

    https://github.com/opentibiabr/otservbr-global-archived/issues/2649

    Type of change

    Please delete options that are not relevant.

    • [x] Bug fix (non-breaking change which fixes an issue)
    • [ ] New feature (non-breaking change which adds functionality)
    • [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
    • [ ] This change requires a documentation update
  • Crash using reload in spells

    Crash using reload in spells

    Describe the bug

    The "/reload spell" command can cause server crash. This happens because monsters will begin to cast random spells and if one of those random spells require a player structure, the server will crash. This bug also happens if using revscripts spells and then reloading scripts.

    How to Reproduce?

    Set a monster to use any registered spell. NOTE: The spell needs to be a registered spell (spells.xml or revscript spell) and not a configured spell at monster's file. If the monster is using a register spell, such as sudden death rune, for example: {name ="sudden death", interval = 2000, chance = 16, minDamage = -450, maxDamage = -550, range = 7, target = true} It will begin to cast another spell. If the monster is using a configured spell, such as a recreation of sudden death rune, for example: {name ="combat", interval = 2000, chance = 16, type = COMBAT_PHYSICALDAMAGE, minDamage = -450, maxDamage = -550, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true} It will not cast another spell.

    Give us all details to reproduce the behavior:

    1. Make sure that the monster that you are using to test it have a registered spell
    2. Use /reload spell (if using spells.xml to register the spell) or /reload scripts (if using revscripts to register the spell)
    3. The monster will begin to cast another spell
    4. Crash if the random spell requires a player structure

    Screenshots

    First, the monster is using sudden death rune, as it should (before using /reload): image

    image

    After using /reload scripts: image

    Different spell than sudden death, which is the one registered: image

    Environment

    • Windows 10
    • Last commit

    Additional context

    Found a way to "fix" it, but I don't really know if it is effective: reload monsters scripts after reloading scripts on game.cpp image (Sorry, I'm new on github and don't really know how to use it properly, just want to contribute a little.)

  • hirelings after serv save reset  their names.     Canary, TFS 1,3      12.86

    hirelings after serv save reset their names. Canary, TFS 1,3 12.86

    Priority

    High

    Area

    • [X] Datapack
    • [x] Source
    • [x] Map
    • [x] Other

    What happened?

    A bug happened! ohh happend. Test just now, with multiple hirelings come bug after reset server their name get reset. So all of them have same name.

    What OS are you seeing the problem on?

    Windows

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct
  • Hirelings dialogs not resetting properly.

    Hirelings dialogs not resetting properly.

    Describe the bug If I start the dialog with a hireling and select one of his trade options, whenever I try to use one of his other functions, like bank, switch his outfit or make him go back into his lamp, he opens the last trading option that I used.

    To Reproduce Steps to reproduce the behavior:

    1. Start the dialog
    2. Say Trade
    3. Say Tools
    4. Close the trading window.
    5. Say Outfit.
    6. The Tools trading option will open instead of his outfit selector.

    Expected behavior I should be able to select between his various skills no matter when.

  • Critical damage bug

    Critical damage bug

    Critical damage should have minimum damage on like 50-60% of max normal damage as it is on normal tibia.

    @edit I might not described the problem correctly. When you land a critical hit, the critical hit damage should be a critical hit from over 50% of your minimum damage. For example If you can hit 2 - 1000 normal damage. The critical (with 50% critical damage) should be around 500 - 1500 damage (not 3 - 1500). The value differs on paladin and knight. I mean the values from melee and distance hit.

  • feat(Monsters/Spells) - add area field to monster spell

    feat(Monsters/Spells) - add area field to monster spell

    Description

    I have added area field to MonsterSpell which allows user to set up area directly in monster.lua. Also only reload monsters command is required to refresh spell area.

    Type of change

    Enchancement!

    • [X] New feature (non-breaking change which adds functionality)

    How Has This Been Tested

    Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

    • [X] Added a few spells with area field locally and tested if it works
    • [X] Change area for spell and /reload monsters and check if spell reloaded with new area

    Checklist

    • [X] My code follows the style guidelines of this project
    • [X] I have performed a self-review of my own code
    • [X] I checked the PR checks reports
    • [X] I have commented my code, particularly in hard-to-understand areas
    • [X] My changes generate no new warnings
  • [Feature] Add imbuement system and somes fixes

    [Feature] Add imbuement system and somes fixes

    Description

    Added 100% functioning of the imbuement system, checking if the imbuement is aggressive and refactoring the Game::checkImbuements function

    Added some functions that didn't exist.

    Behaviour

    Actual

    Imbuement not work.

    Expected

    image

    Type of change

    Please delete options that are not relevant.

    • [x] Bug fix (non-breaking change which fixes an issue)
    • [x] New feature (non-breaking change which adds functionality)

    Checklist

    • [x] My code follows the style guidelines of this project
    • [x] I have performed a self-review of my own code
    • [x] I checked the PR checks reports
    • [x] I have commented my code, particularly in hard-to-understand areas
    • [x] I have made corresponding changes to the documentation
    • [x] My changes generate no new warnings
    • [x] I have added tests that prove my fix is effective or that my feature works
  • Summer Update Mechanics (12.7)

    Summer Update Mechanics (12.7)

    Description

    This pull request is intended to include the new mechanics from the Summer Update 2021 (12.7)

    Type of change

    Please delete options that are not relevant.

    • [x] New feature (non-breaking change which adds functionality)

    How Has This Been Tested

    I tested the mechanics using the new items, you can test it as well including the following attributes on new items:

    For the specialized magic levels: "deathmagiclevelpoints" "energymagiclevelpoints" "earthmagiclevelpoints" "firemagiclevelpoints" "healingmagiclevelpoints" "holymagiclevelpoints" "icemagiclevelpoints"

    For the incremented magic shield capacity: "magicshieldcapacitypercent" "magicshieldcapacityflat"

    For perfect shot: "perfectshotdamage" "perfectshotrange"

    For cleave: "cleavepercent"

    For reflect: "reflectflatall" "reflectpercentall"

    Test Configuration:

    • Server Version: 12.7
    • Client: 12.7
    • Operating System: Windows Client / Ubuntu 20.04 Server

    Checklist

    • [x] My code follows the style guidelines of this project
    • [ ] I have performed a self-review of my own code
    • [ ] I checked the PR checks reports
    • [ ] I have commented my code, particularly in hard-to-understand areas
    • [ ] I have made corresponding changes to the documentation
    • [ ] My changes generate no new warnings
    • [ ] I have added tests that prove my fix is effective or that my feature works
  • Implement ClangFormat

    Implement ClangFormat

    Hey guys, just bringing to attention that we could implement ClangFormat to have a consistent code style across the code base.

    Please check the .clang-format file where all the code definitions are, I just used the WebKit style as the basis and executed it across the whole codebase.

    I believe we could discuss in this PR what we could change and settings we could modify to better fit our needs.

    Notes: The formatted code follows spaces instead of tabs in all the styles (LLVM, GNU, Google, Chromium, Microsoft, Mozilla, WebKit) none of them used tabs, so I just left it without changing much so we can discuss it here.

  • Problem with quest system

    Problem with quest system

    Priority

    High

    Area

    • [x] Datapack
    • [ ] Source
    • [ ] Map
    • [X] Other

    What happened?

    A bug happened! when i use chest

    quest

    with actionID 2000 uniqueID 20015

    When i use to chest i get information You cannot use this object quest1 (1)

    Any idea to fix this ?

    ' local specialQuests = { }

    local questsExperience = { [3101] = 1 -- dummy values }

    local questLog = { }

    local tutorialIds = { }

    local questSystem1 = Action()

    function questSystem1.onUse(player, item, fromPosition, target, toPosition, isHotkey) local storage = specialQuests[item.actionid] if not storage then storage = item.uid if storage > 65535 then return false end end ' if player:getStorageValue(storage) > 0 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'The ' .. ItemType(item.itemid):getName() .. ' is empty.') return true end

    local items, reward = {}
    local size = item:isContainer() and item:getSize() or 0
    if size == 0 then
        reward = item:clone()
    else
        local container = Container(item.uid)
        for i = 0, container:getSize() - 1 do
            items[#items + 1] = container:getItem(i):clone()
        end
    end
    
    size = #items
    if size == 1 then
        reward = items[1]:clone()
    end
    
    local result = ''
    if reward then
        local ret = ItemType(reward.itemid)
        if ret:isRune() then
            result = ret:getArticle() .. ' ' ..  ret:getName() .. ' (' .. reward.type .. ' charges)'
        elseif ret:isStackable() and reward:getCount() > 1 then
            result = reward:getCount() .. ' ' .. ret:getPluralName()
        elseif ret:getArticle() ~= '' then
            result = ret:getArticle() .. ' ' .. ret:getName()
        else
            result = ret:getName()
        end
    else
        if size > 20 then
            reward = Game.createItem(item.itemid, 1)
        elseif size > 8 then
            reward = Game.createItem(2854, 1)
        else
            reward = Game.createItem(2853, 1)
        end
    
        for i = 1, size do
            local tmp = items[i]
            if reward:addItemEx(tmp) ~= RETURNVALUE_NOERROR then
                Spdlog.warn("[questSystem1.onUse] - Could not add quest reward to container")
            end
        end
        local ret = ItemType(reward.itemid)
        result = ret:getArticle() .. ' ' .. ret:getName()
    end
    
    if player:addItemEx(reward) ~= RETURNVALUE_NOERROR then
        local weight = reward:getWeight()
        if player:getFreeCapacity() < weight then
            player:sendCancelMessage(string.format('You have found %s weighing %.2f oz. You have no capacity.', result, (weight / 100)))
        else
            player:sendCancelMessage('You have found ' .. result .. ', but you have no room to take it.')
        end
        return true
    end
    
    if questsExperience[storage] then
        player:addExperience(questsExperience[storage], true)
    end
    
    player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have found ' .. result .. '.')
    player:setStorageValue(storage, 1)
    return true
    

    end

    for index, value in pairs(specialQuests) do questSystem1:aid(index) end

    questSystem1:aid(2000) questSystem1:register()'

    What OS are you seeing the problem on?

    Linux, Windows

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct
  • Exit player ip 0.0.0.0

    Exit player ip 0.0.0.0

    Priority

    High

    Area

    • [ ] Datapack
    • [X] Source
    • [ ] Map
    • [ ] Other

    What happened?

    When closing the client the player loses its ip and receives 0.0.0.0

    What OS are you seeing the problem on?

    Windows 10

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct
  • Bug you aready logged in!

    Bug you aready logged in!

    Priority

    Critical

    Area

    • [ ] Datapack
    • [X] Source
    • [ ] Map
    • [ ] Other

    What happened?

    Out of nowhere the character is kicked and when trying to relog it displays the message "you aready logged in!"

    What OS are you seeing the problem on?

    Windows 10

    Code of Conduct

    • [X] I agree to follow this project's Code of Conduct
  • [Enhancement] - Fixed monster speed multiplication

    [Enhancement] - Fixed monster speed multiplication

    Resolves #43

    The intention is to solve the creature speed problem on bestiary. And improve the way speed is stored so that we don't need to put the double speed in the creatures file, just multiply it in c++ and divide it in protocolgame.

    It needs some testing, as I couldn't understand if we currently use doubled monster speed for the server (as it seems to me so, it needs to be compared to the global to be sure).

    Tests are needed to ensure that everything is ok and it is necessary to change the speed of all other monsters to the real speed, in each one's files.

Related tags
SynapseOS is a free and open source 64x operating system written in FASM and C

SynapseOS SynapseOS is a free and open source 64x operating system written in FASM and C Documentation Documentation Build To build SynapseOS you need

Aug 14, 2022
The main repository for the Darkflame Universe Server Emulator project.
The main repository for the Darkflame Universe Server Emulator project.

Darkflame Universe Introduction Darkflame Universe (DLU) is a server emulator for LEGO® Universe. Development started in 2013 and has gone through mul

Aug 5, 2022
Sourcetrail - free and open-source interactive source explorer
Sourcetrail - free and open-source interactive source explorer

Sourcetrail Important Note: This project was archived by the original autors and maintainers of Sourcetrail by the end of 2021. If you want to know mo

Aug 12, 2022
Khepri is a Cross-platform agent, the architecture and usage like Coblat Strike but free and open-source.
Khepri is a Cross-platform agent, the architecture and usage like Coblat Strike but free and open-source.

Khepri Free,Open-Source,Cross-platform agent and Post-exploiton tool written in Golang and C++ Description Khepri is a Cross-platform agent, the archi

Aug 10, 2022
SDR++ is a cross-platform and open source SDR software with the aim of being bloat free and simple to use.
SDR++ is a cross-platform and open source SDR software with the aim of being bloat free and simple to use.

SDR++ is a cross-platform and open source SDR software with the aim of being bloat free and simple to use.

Aug 12, 2022
Free and Open Source API and drivers for immersive technology.

OpenHMD This project aims to provide a Free and Open Source API and drivers for immersive technology, such as head mounted displays with built in head

Aug 17, 2022
The FLIP Fluids addon is a tool that helps you set up, run, and render high quality liquid fluid effects all within Blender, the free and open source 3D creation suite.

FLIP Fluids The FLIP Fluids addon is a tool that helps you set up, run, and render liquid simulation effects. Our custom built fluid engine is based a

Aug 15, 2022
Single source file ASTC texture decompression in C++ (derived from Google's open source Android project)

astc_dec astc_dec is a single source file ASTC texture decompressor with the Apache 2.0 license, derived from Google's open source Android sources. Th

Jul 19, 2022
"Sigma File Manager" is a free, open-source, quickly evolving, modern file manager (explorer / finder) app for Windows, MacOS, and Linux.

"Sigma File Manager" is a free, open-source, quickly evolving, modern file manager (explorer / finder) app for Windows, MacOS, and Linux.

Aug 7, 2022
Free and open source CSGO hack
Free and open source CSGO hack

Csgo Very short and commented source aimed for legit gameplay Information In development, not every feature may work perfectly. Features: BunnyHop Cha

Aug 16, 2022
A free and open-source cross-platform application to control your Philips hue compatible lightsđź’ˇ
A free and open-source cross-platform application to control your Philips hue compatible lightsđź’ˇ

?? OpenHue ?? A cross platform application to control your Philips hue compatible lights. licensed under the gpl 3.0 license. Currently in super early

Dec 19, 2021
Blender is the free and open source 3D creation suite
Blender is the free and open source 3D creation suite

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Aug 11, 2022
SomeSmile - a free, open source and not yet cross-platform
SomeSmile - a free, open source and not yet cross-platform

SomeSmile - a free, open source and not yet cross-platform Table Of Contents For What? Structure Start Usage Guide How To Build Screenshots End For Wh

Aug 3, 2022
Cutter is a free and open-source reverse engineering platform powered by rizin
Cutter is a free and open-source reverse engineering platform powered by rizin

Cutter is a free and open-source reverse engineering platform powered by rizin. It aims at being an advanced and customizable reverse engineering platform while keeping the user experience in mind. Cutter is created by reverse engineers for reverse engineers.

Aug 11, 2022
Feather is a free, open-source Monero wallet for Linux, Tails, macOS and Windows

Feather is a free, open-source Monero wallet for Linux, Tails, macOS and Windows. It is written in C++ with the Qt framework.

Aug 14, 2022
A self made free, open source internal cheat for Overwatch
A self made free, open source internal cheat for  Overwatch

Overwatch-Cheat A self made free, open source internal cheat for Overwatch How to use the Valorant Internal [+] - Download it, then compile the cheat

Aug 3, 2022
A free, open-source compressor for the ZX0 format

salvador -- a fast, near-optimal compressor for the ZX0 format salvador is a command-line tool and a library that compresses bitstreams in the ZX0 for

Aug 9, 2022
OpenFOAM is a free, open source computational fluid dynamics (CFD) software package

acousticStreamingFoam About OpenFOAM OpenFOAM is a free, open source computational fluid dynamics (CFD) software package released by the OpenFOAM Foun

Nov 2, 2021
A FREE Windows C development course where we will learn the Win32API and reverse engineer each step utilizing IDA Free in both an x86 and x64 environment.
A FREE Windows C development course where we will learn the Win32API and reverse engineer each step utilizing IDA Free in both an x86 and x64 environment.

FREE Reverse Engineering Self-Study Course HERE Hacking Windows The book and code repo for the FREE Hacking Windows book by Kevin Thomas. FREE Book Do

Aug 11, 2022