• 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!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

[OTCv8] Auras and wings

Gesior.pl

Mega Noob&LOL 2012
Senator
Premium User
Joined
Sep 18, 2007
Messages
2,860
Solutions
92
Reaction score
3,048
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
 

Vagnerking

New Member
Joined
Jan 20, 2023
Messages
9
Reaction score
1
GitHub
Vagnerking
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
 
OP
OP
Gesior.pl

Gesior.pl

Mega Noob&LOL 2012
Senator
Premium User
Joined
Sep 18, 2007
Messages
2,860
Solutions
92
Reaction score
3,048
Location
Poland
GitHub
gesior
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.
 

leik meris

Active Member
Joined
Feb 17, 2010
Messages
74
Solutions
1
Reaction score
36
Can someone help in placing an actionscript to give wings to a player who uses an item please?
 

Niloahs

Well-Known Member
Joined
Feb 10, 2020
Messages
105
Solutions
1
Reaction score
76
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()
 

Gubailovo

Active Member
Joined
Dec 19, 2013
Messages
366
Solutions
2
Reaction score
46
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:
OP
OP
Gesior.pl

Gesior.pl

Mega Noob&LOL 2012
Senator
Premium User
Joined
Sep 18, 2007
Messages
2,860
Solutions
92
Reaction score
3,048
Location
Poland
GitHub
gesior
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).
 
Top