Error 502
Well-Known Member
just answered the question of Nokturnois it possible to use otc v8?
sorry for the confusion. use the gesior with .xml guide
otcv8 is different from mehah client
just answered the question of Nokturnois it possible to use otc v8?
I didn't find it in the source tfs 1.5 8.0just answered the question of Nokturno
sorry for the confusion. use the gesior with .xml guide
otcv8 is different from mehah client
C++:#if CLIENT_VERSION >= 854 playermsg.addByte(player->canWalkthroughEx(creature) ? 0x00 : 0x01); #endif playermsg.addString(creature->getShader()); playermsg.addByte(static_cast<uint8_t>(creature->getAttachedEffectList().size())); for (const uint16_t id : creature->getAttachedEffectList()) playermsg.add<uint16_t>(id); } void ProtocolGame::AddPlayerStats() const
playermsg.addByte(podiumVisible ? static_cast<uint8_t>(podiumVisible->getInt()) : 0x01);
}
#endif
playermsg.addString(item->getShader());
}
void ProtocolGame::parseExtendedOpcode(NetworkMessage & msg) const
I didn't find it in the source tfs 1.5 8.0
protocolgame.cpp
C++:playermsg.addByte(podiumVisible ? static_cast<uint8_t>(podiumVisible->getInt()) : 0x01); } #endif playermsg.addString(item->getShader()); } void ProtocolGame::parseExtendedOpcode(NetworkMessage & msg) const
how to resolve with this?
one question does this work with effects or the same as aura and wings?I still don't know why I haven't announced it yet or made a release, but Mehah does have "attachedeffects"
1.- need this in your server
![]()
feat: attached effect and shader · mehah/forgottenserver-optimized@fd3c39a
Optimized forgotten server made by @SaiyansKing. Contribute to mehah/forgottenserver-optimized development by creating an account on GitHub.github.com
![]()
feat: map shader support · mehah/forgottenserver-optimized@148baaa
Optimized forgotten server made by @SaiyansKing. Contribute to mehah/forgottenserver-optimized development by creating an account on GitHub.github.com
by mehah![]()
refreshItem · mehah/forgottenserver-optimized@aed6443
Optimized forgotten server made by @SaiyansKing. Contribute to mehah/forgottenserver-optimized development by creating an account on GitHub.github.com
2.- edit this in client
by mehah![]()
otclient/modules/game_attachedeffects/effects.lua at main · mehah/otclient
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 custom...github.com
3.- and Enable Feature
Lua:g_game.enableFeature(GameItemShader) g_game.enableFeature(GameCreatureShader) g_game.enableFeature(GameCreatureAttachedEffect)
mehah have :
4.- Edit
- attachEffect (Apng(ThingExternalTexture) // dat effect(ThingCategoryEffect) // dat outfit (ThingCategoryCreature) WITH OFFSET
- shader (map // creature // item // widget )
A] Client
edit this .lua game_attachedeffects/effects.lua with these functions
Code:--[[ register(id, name, thingId, thingType, config) config = { speed, disableWalkAnimation, shader, drawOnUI, opacity duration, loop, transform, hideOwner, size{width, height} offset{x, y, onTop}, dirOffset[dir]{x, y, onTop}, onAttach, onDetach } ]] --
B] Server
Example :
Lua:player:setShader("Outfit - Rainbow") player:attachEffectById(7) -- id is game_attachedeffects/effects.lua player:attachEffectById(8) -- id is game_attachedeffects/effects.lua player:attachEffectById(9, true) -- Temporary Effect -- id is game_attachedeffects/effects.lua player:setMapShader('Map - Heat', true)
I test in 1.5 nekiro 8.00 and work perfectlyLua:item:setShader(<shader name>)
View attachment 75449
one question does this work with effects or the same as aura and wings?
AttachedEffectManager.register(120, 'Bat Wings', 1366, ThingCategoryCreature, {
speed = 2,
dirOffset = {
[North] = {-16, -0,true},
[East] = {-10, -0},
[South] = {-16, -0},
[West] = {-10, -0}
}
})
ERROR 502 said:this is a "[OTCv8] Auras and wings" post. I only answered Nokturno question. If you have doubts, I recommend that you open another post, so as not to confuse future users who see this post.
g_game.enableFeature(GameWingsAndAura)
g_game.enableFeature(GameOutfitShaders)
g_game.enableFeature(GameWingOffset)
Hello, I managed to compile my origin (source code), but I'm having difficulties in assembling wings and auras, among others. Can someone help me? I activated V8 and nothing works.. just mounts work normally.. I wanted auras and wings...
if (outfit.lookWings != 0) {
Wing* wing = wings.getWingByID(outfit.lookWings);
if (outfit.lookWings != 0) {
Wing* wing = wings.getWingByClientID(outfit.lookWings);
Aura* aura = auras.getAuraByID(outfit.lookAura);
Aura* aura = auras.getAuraByClientID(outfit.lookAura);
now yes it worked fine thank you very much!!!change this
toLua:if (outfit.lookWings != 0) { Wing* wing = wings.getWingByID(outfit.lookWings);
Lua:if (outfit.lookWings != 0) { Wing* wing = wings.getWingByClientID(outfit.lookWings);
change this
toLua:Aura* aura = auras.getAuraByID(outfit.lookAura);
Lua:Aura* aura = auras.getAuraByClientID(outfit.lookAura);
Basically copy/paste Player.hasMount and Player.addMount to replicate aura, wings, shader.what is the function to add wings to the player? Like, player:addWings? And player:addAuras?
Because I'm trying to put a system in which the player clicks on the item to get wings and auras, in addition to having a store that will deliver. Would it be necessary to use wingId and auraId?
Before it had no functions and did not work. Thank God @Levi999x posted it and I added it to my source, and it worked, working properly.Basi
Basically copy/paste Player.hasMount and Player.addMount to replicate aura, wings, shader.
you can share ??agora sim funcionou bem muito obrigado!!!
What would you like to share? It's already here, isn't it? Or do you want a function to add to the player? If so, it's available here.you can share ??
If it is TFS 1.5 8.6 nekiro, yes it works. But with TFS 0.4 it doesn't work.have codes to tfs 0.4?
/home/Naruto/src/protocolgame.cpp: In member function ‘void ProtocolGame:arseSetOutfit(NetworkMessage&)’:
/home/Naruto/src/protocolgame.cpp:839:24: error: ‘otclientV8’ was not declared in this scope
839 | newOutfit.lookWings = otclientV8 ? msg.get<uint16_t>() : 0;
| ^~~~~~~~~~
/home/Naruto/src/protocolgame.cpp: In member function ‘void ProtocolGame:arseToggleMount(NetworkMessage&)’:
/home/Naruto/src/protocolgame.cpp:851:6: error: ‘otclientV8’ was not declared in this scope
851 | if (otclientV8 >= 254) {
| ^~~~~~~~~~
/home/Naruto/src/protocolgame.cpp: In member function ‘void ProtocolGame::sendOutfitWindow()’:
/home/Naruto/src/protocolgame.cpp:2857:5: error: ‘otclientV8’ was not declared in this scope
2857 | if (otclientV8) {
| ^~~~~~~~~~
/home/Naruto/src/protocolgame.cpp: In member function ‘void ProtocolGame::AddOutfit(NetworkMessage&, const Outfit_t&)’:
/home/Naruto/src/protocolgame.cpp:3149:6: error: ‘otclientV8’ was not declared in this scope
3149 | if (otclientV8) {
| ^~~~~~~~~~
I've never tested/added that feature on any server, but with links you will find in this thread multiple OTSes made it 'work'.
What are auras?
It's extra outfit in .dat/.spr rendered before (default)/after rendering player outfit. Ex. of aura with both effect:
View attachment 74195
- before (under) outfit: fire effect on ground
- after (on top of) outfit: fire effect on legs/body
What are wings?
Name says everything. That are wings rendered like 3rd addon on player's outfit back, but with possibility to wear same wings with any outfit (not assigned to 1 outfit like addon). In .dat/.spr it's just another outfit.
It's hard to use wings without 'Bones' feature in .dat, that let you position wings for every outfit (set offset for north/east/south/west directions). Someone sells DatEditor with that 'Bones' feature. I don't remember who.
How to add auras and wings to your server?
First you need to apply changes on server side for these systems (TFS 1.x example code):
Then you must edit file![]()
Comparing 7f5b4fbc08711124dec86b0fcd7bfd78dd1165c4..239f555b0f71cfe0e17b6e5012518b25696d2f76 · OTCv8/forgottenserver
A free and open-source MMORPG server emulator written in C++, compatible with OTClientV8 - Comparing 7f5b4fbc08711124dec86b0fcd7bfd78dd1165c4..239f555b0f71cfe0e17b6e5012518b25696d2f76 · OTCv8/forgo...github.com
modules/game_features/features.lua
in OTCv8:
and under:![]()
otclientv8/modules/game_features/features.lua at 4c1fc24f26f6e3fdc9b46916672340dacfcd4b55 · OTCv8/otclientv8
Clean, ready to use version of OTClientV8 - Alternative, highly optimized Tibia client - OTCv8/otclientv8github.com
add:Lua:-- you can add custom features here, list of them is in the modules\gamelib\const.lua
It's enables basic version of Auras and Wings. Auras are rendered before (below) outfit of player.Lua:g_game.enableFeature(GameWingsAndAura)
Config of auras in on server in filedata/XML/auras.xml
ex.:
Player with 'Aura ID 1' will get extra 20 speed and in OTCv8 it will render outfitXML:<?xml version="1.0" encoding="UTF-8"?> <auras> <aura id="1" clientid="368" name="Widow Queen" speed="20" /> <aura id="2" clientid="369" name="Racing Bird" speed="20" /> <aura id="3" clientid="370" name="War Bear" speed="20" /> </auras>
368
under his outfit. In outfit368
you must put animation of aura you want to add to player.
There are also other features you can enable, to change rendering of Auras:
1. Draw aura after outfit (on top of it):
2. Use 2 layers of outfit from .dat/.spr to draw single aura before and after outfit (below it and on top of it):Lua:GameDrawAuraOnTop = 109
3. I don't know what it is, but someone needed it, so it's in OTCv8:Lua:GameAuraFrontAndBack = 115 -- To use that: First layer is bottom/back, second (blend layer) is top/front
Lua:GameBigAurasCenter = 119 -- Automatic negative offset for aura bigger than 32x32
@alejandro762 You must make a change here in your font for it to work.change this
toLua:if (outfit.lookWings != 0) { Wing* wing = wings.getWingByID(outfit.lookWings);
Lua:if (outfit.lookWings != 0) { Wing* wing = wings.getWingByClientID(outfit.lookWings);
change this
toLua:Aura* aura = auras.getAuraByID(outfit.lookAura);
Lua:Aura* aura = auras.getAuraByClientID(outfit.lookAura);