Giter VIP home page Giter VIP logo

mehah / otclient Goto Github PK

View Code? Open in Web Editor NEW
239.0 239.0 173.0 136.49 MB

An alternative tibia client for otserv written in C++20 and Lua, made with a modular system that uses lua scripts for ingame interface and functionality, making otclient flexible and easy to customize

License: Other

CMake 1.16% Lua 42.69% C++ 55.02% C 0.40% Shell 0.17% Python 0.08% Dockerfile 0.03% GLSL 0.24% Batchfile 0.01% Kotlin 0.13% PHP 0.06%

otclient's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

otclient's Issues

Cannot use Machete on Jungle Grass

Steps to reproduce (include any configuration/script required to reproduce)

  1. Log in and go to Jungle Grass with a Machete
  2. Try to click on machete and use it on Jungle Grass
  3. Realize you can't.

Expected behaviour

To cut the jungle grass.

Actual behaviour

"You cannot use this object" error.

Environment

Client Version: Latest
OS: Windows 10
Compiler: Visual Studio 2019

Shield blink doesn't request creature information drawing

Steps to reproduce (include any configuration/script required to reproduce)

  1. Enable inactive shared party experience mode

Expected behaviour

Party shields blink

Actual behaviour

Party shield is invisible until next information redraw

Suggestion

This can be fixed by requesting draw in Creature::updateShield however I'd also suggest that you request that information for other things in Creature::setIcon, Creature::setHealthPercent and so on rather than in protocolgameparse.cpp.

Player Spotlight Entirely Too Bright

Steps to reproduce (include any configuration/script required to reproduce)

  1. Log In. Wait for night cycle.
  2. Notice player spotlight.
  3. It's way too bright and even supersedes the day cycle.

Expected behaviour

The player is supposed to be less visible than in day time, but not as visible as it is in the current client. Here are some examples of expected player spotlight lighting.
Good Spotlight Example 1
Good Spotlight Example 2

Actual behaviour

The player is visible in a beam of light that is entirely too bright. It also is brighter than the daylight, which is an offputting feel to the lighting.
OTClient Spotlight Example

Environment

OTClient: Latest - Mehah - x64
TFS: 1.3 - OTLand
OS: Windows 10
Compiler: Visual Studio 2019

Map traversal (autowalk) bug -> infinite traversal loop

Found this bug initially on my 1 year old (edubart) otclient.
Replicated the bug on the (almost) "latest" edubart otclient, specifically commit 5905932.
Replicated on the latest mehah otclient today, can make a new recording using this client if necessary.

The recording failed to capture the cursor despite being set to do so, in the recording I'm clicking the minimap once to the center south in between the large grey area on the right side and the small house area on the left side which is being traversed in the recording.
https://s8.gifyu.com/images/ezgif.com-optimize06e7958970442f0d.gif

CTRL + ArrowKey to turn minor issue but very annyoing

Before creating an issue, please ensure:

  • This is a bug in the software that resides in this repository, and not a
    support matter (use https://otland.net/forums/otclient.494/ for support)
  • This issue is reproducible without changes to the code in this repository

Steps to reproduce (include any configuration/script required to reproduce)

  1. If you press CTRL + any arrow key and release ctrl 1 ms before you release the arrow key your character will move in the arrow direction instead of standing still and just turning

Expected behaviour

On the real client CTRL is held or remembered by the client for X ms before it's released.
IF you as an example press CTRL + right arrow key your character will turn to the right.
If you press ctrl and then right arrow key and release the ctrl key slightly before you release arrow key you will still just turn instead of moving. This is an issue if you are moving around and are trying to turn towards an enemy to use a wave or strike spell.

Actual behaviour

CTRL + any arrow key if ctrl is released 1 ms before arrow key you run in the direction instead of just turning.

Environment

7.7

Suggested fix, add a slider that allows you to set a timer for how long CTRL is remembered before it gets released by the client so players can individually set the time according to what fit them the best.

Squirrels Cause Weird Crash and Move Sideways

Steps to reproduce (include any configuration/script required to reproduce)

  1. Log in and summon a squirrel.
  2. Attempt to see the squirrel in game with a non-admin character.
  3. The Squirrel is moving sideways and the game crashes instantly.

Expected behaviour

Not to crash when you see a squirrel. Also, to see the squirrel running normally and not sideways.

Actual behaviour

Squirrel moves erratically in a sideways direction and then the game crashes.

Environment

Client Version: Latest
TFS: 1.3 Latest
OS: Windows 10
Compiler: Visual Studio 2019

OTClient Log

otclient.log

Client crashed while running side by side with normal OTC while moving

I think this is just to you see if theres anything crash related in the functions/changes below (backtrace of crash)

  backtrace:
    1: ./otclient(Tile::removeThing(stdext::shared_object_ptr<Thing> const&)+0x20a) [0x56175ca2633c]
    2: ./otclient(Tile::addThing(stdext::shared_object_ptr<Thing> const&, int)+0xab3) [0x56175ca27263]
    3: ./otclient(Map::addThing(stdext::shared_object_ptr<Thing> const&, Position const&, int)+0x93) [0x56175c9fb97b]
    4: ./otclient(ProtocolGame::parseCreatureMove(stdext::shared_object_ptr<InputMessage> const&)+0xeb) [0x56175ca4c073]
    5: ./otclient(ProtocolGame::parseMessage(stdext::shared_object_ptr<InputMessage> const&)+0x375) [0x56175ca4dc35]
    6: ./otclient(ProtocolGame::onRecv(stdext::shared_object_ptr<InputMessage> const&)+0x6b) [0x56175ca3deb5]

Edit:
Crashed again while side by side (OTC normal continues to run without crashing) with the same backtrace/conditions
Edit2:
Crashed again (three times already) while moving but without the other OTC side by side and also in another location. Same backtrace above.

Question / problem

Hello, I have a problem and a question

my problem is, I downloaded the latest version, compiled, put my DAT (8.6) in and the light system doesn't work

  • added to options light version
    what else have I forgotten?

ok i forgotten:

elseif key == 'lightVersion' then
    gameMapPanel:setLightVersion(value)
    lightVersionComboBox:setCurrentOptionByData(value, false)

my question remains:
and the question, if the character is standing, the nickname and hp bars are visible if one moves away from the character 1-2 square off the screen

https://i.imgur.com/rYJuYh4.png
https://i.imgur.com/5CxCjs5.png
https://i.imgur.com/kHBxIq4.png

https://i.imgur.com/aZJ7ZlE.png
https://i.imgur.com/xxfer0V.png

Fps drop on opening modal windows

Steps to reproduce (include any configuration/script required to reproduce)

1.Opening outfit window (this one have the biggest fps drop) https://gyazo.com/96146a26d8eaef55955736ed0937b5af
2.On opening brose field https://gyazo.com/ff08c64210f8756da0a539ba1ba6b62b
3.spamming some smaller windows (fps drops on every icon there is) https://gyazo.com/898853a4cb1519a842afc6bafe228922

Expected behaviour

should not drop fps

Actual behaviour

dropping fps

Environment

Otclient 1.0
Also checked if its happening in edubart client and i can confirm fps not dropping on edubart oclient while doing stuff i did in those gifs

Sidestep bug through corners

When you sidestep through corners, player light disappears.
I have tried both below and above sea floor and it is the same.

e8Mj3Vr4q4
wPGCMvnbl1

Only displaying two floors under you

One issue I noticed is when you're on a second floor, suddenly ground floor disappears and is now dark, like if you could only see 2 floors under you even if you're above ground floor.

Player Runs in Place After Moving in a Quick Diagonal Pattern

Steps to reproduce (include any configuration/script required to reproduce)

  1. Move in a diagonal pattern through bushes, trees, etc. in fast succession.
  2. Try to move forward.
  3. Your player gets stuck and seems to run in place.

Expected behaviour

You should be able to fluidly move through the diagonal pattern, then move forward without moonwalking.

Actual behaviour

You move through the diagonal pattern fluidly, but moonwalk when you move forward.
Video here: OTClient Bug - Diagonal Pattern Moonwalk

Environment

OTClient: Latest/Mehah
TFS: Latest
OS: Windows 10 / Ubuntu 20.4
Compiler: Visual Studio 2019 / make 4.2.1

"First go upstairs." Message showing when there is a tall building near a hole the player is trying to go down.

Steps to reproduce (include any configuration/script required to reproduce)

  1. Make the second/third floor of a building view next to a clickable ladder/sewer.
  2. Try to click to make the player move to the ladder/sewer and go down.
  3. See "First go upstairs" error.

Expected behaviour

Click on ladder/sewer and player moves towards the object, and goes down the hole.

Actual behaviour

Click on ladder/sewer and player doesn't move towards the object. An error message says "First go upstairs".

Environment

Windows 10 - Visual Studio 2019 - Latest build of OTClient.

Lamps etc bug

If 2 players are standing by a lightsource, for example a street lamp, then you can not turn off or on the lamp. But if a player (yourself) stands alone at the lamp, then it works.

requestDrawing

Steps to reproduce (include any configuration/script required to reproduce)

  1. Jump function is not smooth, probably we need to requestDrawing like in walking case.

Expected behaviour

Smooth jump animation

Actual behaviour

Not a very smooth jump animation

Environment

The newest commit.

Solution

In void Creature::updateJump() we can add:
g_map.requestDrawing(true, self->isLocalPlayer() || self->hasLight());
under:
self->updateJump();

NPC names lag

Steps to reproduce (include any configuration/script required to reproduce)

1.The name of npcs lags when walking, but not on monsters or players.

fLOBviYfpM

Expected behaviour

Name should be stable when walking

Actual behaviour

Lagg/Moving/Jump

Environment

10.98 Latest version of TFS and your OTC sources

possible bug with isOpaque()

I noticed a certain problem when we put an item on the parcel that is 'opaque' then if I log in next to it, you cannot see the floor (black grid)

or if the items are 'ON' an opaque object after logging in next to it you can only see this item, the rest is under it but in the look you can see that there is something on it

Unable to move after going down the ladder

Steps to reproduce (include any configuration/script required to reproduce)

  1. Go down the ladder and try to move immediately in any direction using arrow keys.

Expected behaviour

When you go down the ladder and try to move u should immediately be able to.
https://gyazo.com/ddc65744491071ebe8baba2d89eed771

Actual behaviour

You are unable to move for a solid amount of time (around 1 second)
https://gyazo.com/5bd62d4bf45d27192c073f9f1fa61a72

Environment

Newest tfs 1.3 -> 10.98 Mehah's OTC

Creature / NPC Name Disappears

Steps to reproduce (include any configuration/script required to reproduce)

  1. I think this is the same as issue 34. But names of creature and npcs disappear if go in and out of the screen.

M8ukauXRY3

Expected behaviour

Name should always be shown

Actual behaviour

In some cases the name of creatures/npc/players are not loaded, leaving a creature/npc/player without a name.

Environment

10.98 Latest version of TFS and your OTC sources

Red square not visible when creature is hidden in battle window.

Hello, I found weird bug with battle list sorting.

Steps to reproduce

  1. Log into character of your choice.
  2. Open battle list window.
  3. Hide monsters.
  4. Attack any monster through map window.

Expected behaviour

Monster should be marked with red square.

Actual behaviour

Monster is selected and attacked properly but squares are hidden, only when you unhide monsters in battle list it will show squares properly.

Smartwalk diagonal walking causes packet flooding

Tried out Otclient1.0 for downgraded TFS 1.3 to v7.72 today.
The movement speed is great, great improvement over otclient, but smartwalking causes massive packet flooding, it's almost instant disconnect at 25pps, increased to 65pps and I still get disconnect after about 3 seconds on a level 8 character (but not on a GM char with max speed unless I set pps lower than 65).
Diagonal walking is also so much slower than normal, it doesn't seem right, like maybe 5x slower than a normal movement, should only be about 2x slower I think.

Steps to reproduce (include any configuration/script required to reproduce)

  1. Compile latest otclient1.0 version
  2. Enable smartwalking
  3. Login and hold down two arrow keys with a 90 degree angle e.g. up+right or up+left

Environment

Latest otclient1.0 version, cloned yesterday, compiled 32bit release.
Running Windows 10 on client side, Debian 10 with TFS 1.3 downgraded to protocol 7.72 by Nekiro.

Login/Relog underground and Others

(1. Sometimes but not always) When you login or relog underground, the light does not draw. You have to walk for it to be updated.
https://i.imgur.com/FQkJLns.gif

(2. Always) When you log in, it flashes black before everything is draw.

(3. Always) If you run through things with GM (Ctrl+Arrows), there will be a black border at the edge of the game window in the direction you are running. It's like not everything is draw fast enough.

Client crash while trying to log-in with a online character (like exit) with invisible condition

It happens everytime. Tested with normal OTC too and crash don't happens.

Below the crash backtrace:

  backtrace:
    1: ./otclient(Creature::hasLight()+0x15) [0x558e02840df3]
    2: ./otclient(Tile::analyzeThing(stdext::shared_object_ptr<Thing> const&, bool)+0x3c) [0x558e028860d2]
    3: ./otclient(Tile::addThing(stdext::shared_object_ptr<Thing> const&, int)+0x5a1) [0x558e02887d51]
    4: ./otclient(Map::addThing(stdext::shared_object_ptr<Thing> const&, Position const&, int)+0x93) [0x558e0285c97b]
    5: ./otclient(ProtocolGame::setTileDescription(stdext::shared_object_ptr<InputMessage> const&, Position)+0x2b4) [0x558e028ad87e]
    6: ./otclient(ProtocolGame::setFloorDescription(stdext::shared_object_ptr<InputMessage> const&, int, int, int, int, int, int, int)+0xab) [0x558e028ada31]
    7: ./otclient(ProtocolGame::setMapDescription(stdext::shared_object_ptr<InputMessage> const&, int, int, int, int, int)+0x8f) [0x558e028ade27]
    8: ./otclient(ProtocolGame::parseMapDescription(stdext::shared_object_ptr<InputMessage> const&)+0x9d) [0x558e028adee3]
    9: ./otclient(ProtocolGame::parseMessage(stdext::shared_object_ptr<InputMessage> const&)+0x2e5) [0x558e028aeba5]
    10: ./otclient(ProtocolGame::onRecv(stdext::shared_object_ptr<InputMessage> const&)+0x6b) [0x558e0289eeb5]

Compiling problem

tryed to compile latest revision and got this problem
src\client\mapview.h(173,16): error C2065: 'MapViewControl': undeclared identifier (compiling source file .. \ src \ client \ viewportcontrol.cpp)

EDIT::

FIXED SORRY

disappearing tiles at the bottom of the screen

Steps to reproduce (include any configuration/script required to reproduce)

  1. Just login and walk

Expected behaviour

https://gyazo.com/a2d56e7fc8a2eb6ae09f4fce5ae27c4c (using edubart otclient)

Actual behaviour

https://gyazo.com/3e6ae7650a5ddcee8ea92d7ff0ac21e3 (using otclient 1.0)

Environment

Using latest otclient 1.0

Edit:
I know what is causing this if the crop is setted up this way its happening but after resizing the crop to match the sprite its getting fixed, its not happening in edubard otclient so im staying in my report that this is a bug
Gyazo (https://gyazo.com/959edb2f9e730928fa22d80efaabc0bb) (wrong crop size, bug happends)
Gyazo (https://gyazo.com/a5149c62dc6dade1be9ad50030ec4579) (correct crop, bug getting fixed)

Under ground light

After the latest commit light stop working under ground. It's bright as over sea_floor.
Exemple

If you log in on GOD / GM first and then relog to a regular player, the light will be bugged. The regular player gets full light. But if you restart the client and then log in to the regular player first, it works.

Creature Colored Name (Health) Not Updating In Real Time

Steps to reproduce (include any configuration/script required to reproduce)

  1. Log in and attack something, taking away 50% of its health or so.
  2. See its health bar change color, but its name remain the same color.
  3. Get frustrated.

Expected behaviour

When the health bar turns yellow, so does the creatures name.

Actual behaviour

When the health bar turns yellow, the creatures name remains green.
Health and Name at 100%
Health and Name at Around 40%

Environment

Client Version: Latest
TFS: Latest (1.3)
OS: Windows 10
Compiler: Visual Studio 2019

Player Nameplate Barely Visible In Full Darkness

There seems to be an issue with the player spotlight. Players aren't able to see their nameplate without a light source. While I do like the darkness of..

//Lines 94-99 Creature.cpp
if(isLocalPlayer() && (g_map.getLight().intensity < 64 || m_position.z > Otc::SEA_FLOOR)) {
    light.intensity = std::max<uint8>(light.intensity, 1);
    if(light.color == 0 || light.color > 215) {
        light.color = 215;
    }
}

Example of light.intensity, 1

It seems I'm only able to see my nameplate without a light source when I change it to...

//Lines 94-99 Creature.cpp
if(isLocalPlayer() && (g_map.getLight().intensity < 64 || m_position.z > Otc::SEA_FLOOR)) {
    light.intensity = std::max<uint8>(light.intensity, 2);
    if(light.color == 0 || light.color > 215) {
        light.color = 215;
    }
}

Example of light.intensity, 2

Is there any way to make the player nameplate draw over the darkness with a slight dim in creature.cpp?
Something similar to how Medivia updated their lighting a few years ago would be a lot more easily readable to the player.

Steps to reproduce (include any configuration/script required to reproduce)

  1. Login in.
  2. Go into dark place without any light source besides the player spotlight.
  3. See player nameplate.

Expected behaviour

  1. Log in.
  2. Go into dark place without any light source besides the player spotlight.
  3. Be able to see the player nameplate, but slightly dimmed.

Medivia Lighting Example 1
Medivia Lighting Example 2

Actual behaviour

  1. Log In.
  2. Go into dark place without any light source besides the player spotlight.
  3. Not able to see player nameplate at all.

Environment

OTClient: Latest - Mehah - x64
TFS: 1.3 - OTLand
OS: Windows 10
Compiler: Visual Studio 2019

Name plates disapear

Steps to reproduce (include any configuration/script required to reproduce)

  1. Move in and out of screen where a character leaves your screen area.

Expected behaviour

Name should always be shown

Actual behaviour

In some cases the name of creatures/players are not loaded, leaving a creature/player without a name.

Environment

10.98 Latest version of TC

Glitch when walking through

Found a glitch when you walk on top of any creature it'll blink the outfit like its disappearing on the normal otclient it'll not.
The glitch which are blinking outfit is happening when you walk from the south to the north and from the east to the west. Seems to be drawing first on top of creature (when you walk) then bottom of creature (when you reach) and on top again (when staying there).

HUD for HP/MANA/EXP

Before creating an issue, please ensure:

  • This is a bug in the software that resides in this repository, and not a
    support matter (use https://otland.net/forums/otclient.494/ for support)
  • This issue is reproducible without changes to the code in this repository

Steps to reproduce (include any configuration/script required to reproduce)

  1. Go and lose HP
  2. Go away so you will not lose HP
  3. Heal up with a rune and the hud will NOT update

Expected behaviour

When you heal the HUD should update

Actual behaviour

HP Hud updates when you take damage and not when you heal

Environment

I am using client 7.7 but I would guess that this applys to any protocol version

https://i.gyazo.com/b7467798e41c6b141807e143d14fdabc.mp4

Video of the issue above

Tile bug

When you walk on snow and the snowtile changes id to footprints id, gravel etc disappears.
It will come back if you log in/out

UD8pljDXkf

Player occupying two sqms at the same time - hitbox

Steps to reproduce (include any configuration/script required to reproduce)

  1. While player walks from one tile to the other you can shoot either of the sqms and the player will get hit.
  2. https://gyazo.com/83f967afa8cb4e97e5616eb3723c79f3
  3. https://gyazo.com/9a1e97f142b531665d7d5998ecdb8712
  4. Also magic walls cannot be thrown 'behind him' because he basically occupies two tiles.
    5.https://gyazo.com/6063e5109ef0ac4196450ffcd2458a02

Expected behaviour

Player should only occupy one tile , he shouldnt be able to hit USING hmm on the sqm he is clearly already left.

Environment

Newest tfs -> 10.98 tibia

Lite bug

Lite bug: only player or monster

fix:

         if(id >= Proto::PlayerStartId && id < Proto::PlayerEndId)
                creatureType = Proto::CreatureTypePlayer;
  		else if (id >= Proto::MonsterStartId && id < Proto::MonsterEndId)
  			creatureType = Proto::CreatureTypeMonster;
  		else
  			creatureType = Proto::CreatureTypeNpc;

if(id >= Proto::PlayerStartId && id < Proto::PlayerEndId)

Can't use items that are covered by some item on above floor and when item have flag: Bottom in ObjectBuilder don't have "Use" action to use item too.

If you have flag at Item in object builder: Bottom, on item for example: window (and you want to close window by using it) or on other item you have Bottom flag. In game - client don't have "Use" action. ( LEFT screen )

also if you have any item on upper floor ( RIGHT screen ) for example sewer crate that normally is able to open (before Mehah changes with drawFlags) by "Use" action and is covered with item that is on above floor (ex. tree leaves) you CAN'T use item that is covered by something on upper floor.

Screen:
https://i.imgur.com/r5T6zjI.png

Walking into uninvited house tiles makes the outfit flicker

Steps to reproduce (include any configuration/script required to reproduce)

  1. Walk into a house that you're not invited to

Expected behaviour

Player snaps back into position

Actual behaviour

Player briefly disappears before snapping back

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.