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

New Ooutfits Tfs 0.4 Problem

jareczekjsp

Member
Joined
Jan 30, 2023
Messages
188
Reaction score
9
GitHub
Jarek123
Hello guys I use TFS 0.4 tibia 8.6
and I Have 25 Addons When I add one more so is 26 I cant see last one (new addon)
and this is maximum or I can add more?? my script Outfits.xml is:


Lua:
<?xml version="1.0"?>
<outfits>
<outfit id="1">
<list gender="0" lookType="136" name="Citizen"/>
<list gender="1" lookType="128" name="Citizen"/>
</outfit>

<outfit id="2">
<list gender="0" lookType="137" name="Hunter"><skills dist="2"/><stats maxHealth="50" /></list>
<list gender="1" lookType="129" name="Hunter"><skills dist="2"/><stats maxHealth="50" /></list>
</outfit>

<outfit id="3">
<list gender="0" lookType="138" name="Mage"><stats maxMana="50" magLevel="1" /><absorb percentEnergy="5"/></list>
<list gender="1" lookType="130" name="Mage"><stats maxMana="50" magLevel="1" /><absorb percentEnergy="5"/></list>
</outfit>

<outfit id="4">
<list gender="0" lookType="139" name="Knight"><stats maxHealth="100" /><skills shield="1" sword="3"/></list>
<list gender="1" lookType="131" name="Knight"><stats maxHealth="100" /><skills shield="1" sword="3"/></list>
</outfit>

<outfit id="5" premium="yes">
<list gender="0" lookType="141" name="Summoner"><stats maxMana="150" magLevel="2" /></list>
<list gender="1" lookType="133" name="Summoner"><stats maxMana="150" magLevel="2" /></list>
</outfit>

<outfit id="6" premium="yes">
<list gender="0" lookType="142" name="Warrior"><stats maxHealth="100" /><absorb percentPhysical="2"/><skills sword="7"/></list>
<list gender="1" lookType="134" name="Warrior"><stats maxHealth="100" /><absorb percentPhysical="2"/><skills sword="7"/></list>
</outfit>

<outfit id="7" premium="yes">
<list gender="0" lookType="147" name="Barbarian"><skills axe="5"/><stats maxHealth="200" /></list>
<list gender="1" lookType="143" name="Barbarian"><skills axe="5"/><stats maxHealth="200" /></list>
</outfit>

<outfit id="8" premium="yes">
<list gender="0" lookType="148" name="Druid"><stats maxMana="300" /></list>
<list gender="1" lookType="144" name="Druid"><stats maxMana="300" /></list>
</outfit>

<outfit id="9" premium="yes">
<list gender="0" lookType="149" name="Wizard"><absorb percentDeath="5" percentEnergy="10" /><stats maxMana="50" magLevel="2" /></list>
<list gender="1" lookType="145" name="Wizard"><absorb percentDeath="5" percentEnergy="10" /><stats maxMana="50" magLevel="2" /></list>
</outfit>

<outfit id="10" premium="yes">
<list gender="0" lookType="150" name="Oriental"><stats maxHealth="25" /><absorb percentPhysical="3" /><skills sword="2"/></list>
<list gender="1" lookType="146" name="Oriental"><stats maxHealth="25" /><absorb percentPhysical="3" /><skills sword="2"/></list>
</outfit>

<outfit id="11" premium="yes">
<list gender="0" lookType="155" name="Pirate" speed="10"><stats maxHealth="75" maxMana="50" /><absorb percentPhysical="5" /><skills sword="5"/></list>
<list gender="1" lookType="151" name="Pirate" speed="10"><stats maxHealth="75" maxMana="50" /><absorb percentPhysical="5" /><skills sword="5"/></list>
</outfit>

<outfit id="12" premium="yes">
<list gender="0" lookType="156" name="Assassin" speed="20"><skills dist="6"/></list>
<list gender="1" lookType="152" name="Assassin" speed="20"><skills dist="6"/></list>
</outfit>

<outfit id="13" premium="yes">
<list gender="0" lookType="157" name="Beggar"><stats maxHealth="200" maxMana="200" /></list>
<list gender="1" lookType="153" name="Beggar"><stats maxHealth="200" maxMana="200" /></list>
</outfit>

<outfit id="14" premium="yes">
<list gender="0" lookType="158" name="Shaman"><stats maxMana="270" magLevel="1" /><absorb percentEarth="3" /></list>
<list gender="1" lookType="154" name="Shaman"><stats maxMana="270" magLevel="1" /><absorb percentEarth="3" /></list>
</outfit>

<outfit id="15" premium="yes">
<list gender="0" lookType="269" name="Nightmare"><skills axe="5" /><stats maxHealth="50" /><absorb percentDeath="2" percentEnergy="2" percentPhysical="5" /><skills shield="6" /></list>
<list gender="1" lookType="268" name="Nightmare"><skills axe="5" /><stats maxHealth="50" /><absorb percentDeath="2" percentEnergy="2" percentPhysical="5" /><skills shield="6" /></list>
</outfit>

<outfit id="16" premium="yes">
<list gender="0" lookType="270" name="Jester"><stats maxHealth="60" magLevel="1" maxMana="70" /><absorb percentDeath="1" percentEarth="1" percentEnergy="1" percentFire="1" /><skills shield="1" /></list>
<list gender="1" lookType="273" name="Jester"><stats maxHealth="60" magLevel="1" maxMana="70" /><absorb percentDeath="1" percentEarth="1" percentEnergy="1" percentFire="1" /><skills shield="1" /></list>
</outfit>

<outfit id="17" premium="yes">
<list gender="0" lookType="279" name="Brotherhood"><skills axe="3" club="3" /><stats maxMana="100" /><absorb percentDeath="4" percentFire="4" /><skills shield="3" /></list>
<list gender="1" lookType="278" name="Brotherhood"><skills axe="3" club="3" /><stats maxMana="100" /><absorb percentDeath="4" percentFire="4" /><skills shield="3" /></list>
</outfit>

<outfit id="18" premium="yes">
<list gender="0" lookType="288" name="Demonhunter"><stats maxHealth="50" maxMana="50" /><absorb percentFire="9" /><skills sword="3"/></list>
<list gender="1" lookType="289" name="Demonhunter"><stats maxHealth="50" maxMana="50" /><absorb percentFire="9" /><skills sword="3"/></list>
</outfit>

<outfit id="19" premium="yes">
<list gender="0" lookType="127" name="Angel" speed="25"><stats maxHealth="75" /><absorb percentEnergy="2" percentFire="2" percentPhysical="5" /></list>
<list gender="1" lookType="126" name="Angel" speed="25"><stats maxHealth="75" /><absorb percentEnergy="2" percentFire="2" percentPhysical="5" /></list>
</outfit>

<outfit id="20" premium="yes">
<list gender="0" lookType="89" name="Vegeta"><stats maxHealth="200" /><absorb percentEnergy="3" percentDeath="3" percentPhysical="5" /><skills sword="3" shield="3" /></list>
<list gender="1" lookType="89" name="Vegeta"><stats maxHealth="200" /><absorb percentEnergy="3" percentDeath="3" percentPhysical="5" /><skills sword="3" shield="3" /></list>
</outfit>

<outfit id="21" premium="yes">
<list gender="0" lookType="88" name="Songo"><stats maxHealth="200" /><absorb percentEnergy="3" percentDeath="3" percentPhysical="5" /><skills sword="3" shield="3" /></list>
<list gender="1" lookType="88" name="Songo"><stats maxHealth="200" /><absorb percentEnergy="3" percentDeath="3" percentPhysical="5" /><skills sword="3" shield="3" /></list>
</outfit>

<outfit id="22" premium="yes">
<list gender="0" lookType="249" name="Grandfather"><stats maxHealth="100" /><absorb percentEnergy="5" percentDeath="5" percentPhysical="5" /><skills sword="3" shield="3" /></list>
<list gender="1" lookType="249" name="Grandfather"><stats maxHealth="100" /><absorb percentEnergy="5" percentDeath="5" percentPhysical="5" /><skills sword="3" shield="3" /></list>
</outfit>
<outfit id="23" premium="yes">
<list gender="0" lookType="205" name="Assassino" speed="400"><stats maxHealth="150" /></list>
<list gender="1" lookType="204" name="Assassino" speed="400"><stats maxHealth="150" /></list>
</outfit>
<outfit id="24" premium="yes">
<list gender="0" lookType="202" name="Norsewoman" speed="3"><skills axe="3" club="3" /><absorb percentIce="3" /></list>
<list gender="1" lookType="202" name="Norseman" speed="3"><skills axe="3" club="3" /><absorb percentIce="3" /></list>
</outfit>

<outfit id="25" premium="yes">
<list gender="0" lookType="206" name="Yalaharian"><stats magLevel="2" maxMana="300" /><absorb percentDeath="5" percentEarth="3" /></list>
<list gender="1" lookType="208" name="Yalaharian"><stats magLevel="2" maxMana="300" /><absorb percentDeath="5" percentEarth="3" /></list>
</outfit>
</outfits>
 
I have in protocolgame.cpp like that

void ProtocolGame::sendOutfitWindow()
{
NetworkMessage_ptr msg = getOutputBuffer();
if(msg)
{
TRACK_MESSAGE(msg);
msg->put<char>(0xC8);
AddCreatureOutfit(msg, player, player->getDefaultOutfit(), true);

std::list<Outfit> outfitList;
for(OutfitMap::iterator it = player->outfits.begin(); it != player->outfits.end(); ++it)
{
if(player->canWearOutfit(it->first, it->second.addons))
outfitList.push_back(it->second);
}

if(outfitList.size())
{
msg->put<char>((size_t)std::min((size_t)OUTFITS_MAX_NUMBER, outfitList.size()));
std::list<Outfit>::iterator it = outfitList.begin();
for(int32_t i = 0; it != outfitList.end() && i < OUTFITS_MAX_NUMBER; ++it, ++i)
{
msg->put<uint16_t>(it->lookType);
msg->putString(it->name);
if(player->hasCustomFlag(PlayerCustomFlag_CanWearAllAddons))
msg->put<char>(0x03);
else if(!g_config.getBool(ConfigManager::ADDONS_PREMIUM) || player->isPremium())
msg->put<char>(it->addons);
else
msg->put<char>(0x00);
}
}
else
{
msg->put<char>(1);
msg->put<uint16_t>(player->getDefaultOutfit().lookType);
msg->putString("Your outfit");
msg->put<char>(player->getDefaultOutfit().lookAddons);
}

player->hasRequestedOutfit(true);
}
}
Post automatically merged:

In Outfit.h I find like that
#define OUTFITS_MAX_NUMBER 25

enum AddonRequirement_t
{
REQUIREMENT_NONE = 0,
REQUIREMENT_FIRST,
REQUIREMENT_SECOND,
REQUIREMENT_BOTH,
REQUIREMENT_ANY
};
but when I change #define OUTFITS_MAX_NUMBER 25 TO #define OUTFITS_MAX_NUMBER 35

When I try choose addon is debug in tibia client
 
I have in protocolgame.cpp like that


Post automatically merged:

In Outfit.h I find like that

but when I change #define OUTFITS_MAX_NUMBER 25 TO #define OUTFITS_MAX_NUMBER 35

When I try choose addon is debug in tibia client
You barely touch that, just use the SaiyansKing program and set it to 255 and that's it.
 
Back
Top