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

[OTCv8] Auras and wings

Gesior.pl

Mega Noob&LOL 2012
Senator
Joined
Sep 18, 2007
Messages
2,955
Solutions
98
Reaction score
3,351
Location
Poland
GitHub
gesior
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:
1679082358340.png
  • 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 modules/game_features/features.lua in OTCv8:
and under:
Lua:
-- you can add custom features here, list of them is in the modules\gamelib\const.lua
add:
Lua:
g_game.enableFeature(GameWingsAndAura)
It's enables basic version of Auras and Wings. Auras are rendered before (below) outfit of player.
Config of auras in on server in file data/XML/auras.xml ex.:
XML:
<?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>
Player with 'Aura ID 1' will get extra 20 speed and in OTCv8 it will render outfit 368 under his outfit. In outfit 368 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):
Lua:
GameDrawAuraOnTop = 109
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:
GameAuraFrontAndBack = 115 -- To use that: First layer is bottom/back, second (blend layer) is top/front
3. I don't know what it is, but someone needed it, so it's in OTCv8:
Lua:
GameBigAurasCenter = 119 -- Automatic negative offset for aura bigger than 32x32
 
I managed to put it in my otx2 source, but it has to be repositioned. I use 8.60 sprites, I'll have to do this within OTCv8, won't I? even when you have mounts you have to go a little higher.


image.png
 
I managed to put it in my otx2 source, but it has to be repositioned. I use 8.60 sprites, I'll have to do this within OTCv8, won't I? even when you have mounts you have to go a little higher.
As I wrote: you got to get (buy?) DatEditor with Bones attribute. That attribute is already added in OTCv8:
with this attribute, you can set x,y axis offset of wings for every outfit, every direction (north, east etc.) and probably mount on/off too.
 
Can someone help in placing an actionscript to give wings to a player who uses an item please?
 
Lua:
local config1 = {
        [35311] = {wingId = 1, name = "WING NAME"},
    }

local wings_on_click = Action()
function wings_on_click.onUse(player, item, fromPosition, target, toPosition, isHotkey)
    

    local wings = config1[item.itemid]

    if not wings then
        return true
    end

    if not player:hasWing(wings.wingId) then
        player:addWings(wings.wingId)
        player:getPosition():sendMagicEffect(31)
        player:say("You have gained: "..wings.name..".", TALKTYPE_MONSTER_SAY)
        item:remove(1)
    else
        player:sendTextMessage(19, "You already have this wing.")
    end
    return true
end

for k,_ in pairs(config1) do
  wings_on_click:id(k)
end
wings_on_click:register()
 
how do I add
Lua:
    features[GameWingsAndAura] = true;
    features[GameOutfitShaders] = true;
If I don't have
Code:
// OTCv8
void ProtocolGame::sendFeatures()
TFS 1.4.2
Post automatically merged:

the error causes otclientV8
 
Last edited:
If any kind soul knows how to activate this bone option in the ItemEditor or Object Builder, help us... I need it to make it work xD
 
how do I add
Lua:
    features[GameWingsAndAura] = true;
    features[GameOutfitShaders] = true;
If I don't have
Code:
// OTCv8
void ProtocolGame::sendFeatures()
TFS 1.4.2
Post automatically merged:

the error causes otclientV8
As I've posted:
Edit modules/game_features/features.lua in client and add:
Lua:
g_game.enableFeature(GameWingsAndAura)
g_game.enableFeature(GameOutfitShaders)
It activates Wings, Auras and Shaders in client, without sendFeatures.
Last time I've tested sendFeatures, it was bugged in OTCv8. Not all features could have been enabled by server and it crashed on first packet (black screen in OTC).
 
As I've posted:
Edit modules/game_features/features.lua in client and add:
Lua:
g_game.enableFeature(GameWingsAndAura)
g_game.enableFeature(GameOutfitShaders)
It activates Wings, Auras and Shaders in client, without sendFeatures.
Last time I've tested sendFeatures, it was bugged in OTCv8. Not all features could have been enabled by server and it crashed on first packet (black screen in OTC).
I can't compile the server (this part is causing the problem)
src/protocolgame.cpp
C++:
Severity Code Description Project File String Suppression Status
Error C2065 otclientV8: undeclared theforgottenserver ID D:\forgottenserver-1.4.2\src\protocolgame.cpp 143
Severity Code Description Project File String Suppression Status
Error C2065 otclientV8: undeclared theforgottenserver ID D:\forgottenserver-1.4.2\src\protocolgame.cpp 144
Severity Code Description Project File String Suppression Status
Error C3861 sendFeatures: theforgottenserver ID not found D:\forgottenserver-1.4.2\src\protocolgame.cpp 145
Severity Code Description Project File String Suppression Status
Error C2065 otclientV8: undeclared theforgottenserver ID D:\forgottenserver-1.4.2\src\protocolgame.cpp 850
Severity Code Description Project File String Suppression Status
Error C2065 otclientV8: undeclared theforgottenserver ID D:\forgottenserver-1.4.2\src\protocolgame.cpp 851
Severity Code Description Project File String Suppression Status
Error C2065 otclientV8: undeclared theforgottenserver ID D:\forgottenserver-1.4.2\src\protocolgame.cpp 852
Severity Code Description Project File String Suppression Status
Error C2065 otclientV8: undeclared theforgottenserver ID D:\forgottenserver-1.4.2\src\protocolgame.cpp 862
    Severity Code Description Project File String Suppression Status
Error C2065 otclientV8: undeclared theforgottenserver ID D:\forgottenserver-1.4.2\src\protocolgame.cpp 2867
Severity Code Description Project File String Suppression Status
Error C2065 otclientV8: undeclared theforgottenserver ID D:\forgottenserver-1.4.2\src\protocolgame.cpp 3142
Everything below remains on my server

C++:
void ProtocolGame::parseExtendedOpcode(NetworkMessage& msg)
{
    uint8_t opcode = msg.getByte();
    const std::string& buffer = msg.getString();

    // process additional opcodes via lua script event
    addGameTask(&Game::parsePlayerExtendedOpcode, player->getID(), opcode, buffer);
}
 
Simple solution to reposition the wings in otcv8 created by me:


*there are still some bugs in the outfit preview, but it's usable :)
 
does this work in mehah's otc?


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
by mehah

2.- edit this in client
by mehah

3.- and Enable Feature

Lua:
g_game.enableFeature(GameItemShader)
g_game.enableFeature(GameCreatureShader)
g_game.enableFeature(GameCreatureAttachedEffect)

mehah have :
  • attachEffect (Apng(ThingExternalTexture) // dat effect(ThingCategoryEffect) // dat outfit (ThingCategoryCreature) WITH OFFSET
  • shader (map // creature // item // widget )
4.- Edit
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)
Lua:
        item:setShader(<shader name>)
I test in 1.5 nekiro 8.00 and work perfectly


sdasd.gif
 
Last edited:
I still don't know why I haven't announced it yet or made a release, but Mehah does have "attachedeffects"

need this in your server
by mehah
by mehah
by mehah

and edit this in client
by mehah

and enable

Code:
g_game.enableFeature(GameItemShader)
g_game.enableFeature(GameCreatureShader)
g_game.enableFeature(GameCreatureAttachedEffect)

mehah have :
  • attachEffect (Apng(ThingExternalTexture) // dat effect(ThingCategoryEffect) // dat outfit (ThingCategoryCreature)
  • shader (map // creature // item // widget )
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)
Lua:
item:setShader(<shader name>)
I test in 1.5 nekiro 8.00 and work perfectly


View attachment 75449
I love you mate
 

fachada: efeito anexado e shader · mehah/ forgetserver-optimized@fd3c39a

Servidor otimizado feito por @SaiyansKing. Contribua com o desenvolvimento otimizado para mehah/forgottenserver criando uma conta no GitHub.

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
by mehah

2.- edit this in client
by mehah

3.- and Enable Feature

Lua:
g_game.enableFeature(GameItemShader)
g_game.enableFeature(GameCreatureShader)
g_game.enableFeature(GameCreatureAttachedEffect)

mehah have :
  • attachEffect (Apng(ThingExternalTexture) // dat effect(ThingCategoryEffect) // dat outfit (ThingCategoryCreature) WITH OFFSET
  • shader (map // creature // item // widget )
4.- Edit
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)
Lua:
        item:setShader(<shader name>)
I test in 1.5 nekiro 8.00 and work perfectly


View attachment 75449
is it possible to use otc v8?
 
Back
Top