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

Compiling Big Problem Lua screept 7.92 - 8.10 !

danylook2

Member
Joined
Dec 17, 2011
Messages
63
Reaction score
5
Location
United Kingdom, Birmingham
I Host my server 4 years i love this forum maybe someone can faind solutions for can wear outfit for tibia bot ng there is something like this in client 8.5 but my problem is only for old client so lets start what i found in my source. this is canwear in player.cpp
Code:
const OutfitListType& Player::getPlayerOutfits()
{
return m_playerOutfits.getOutfits();
}

bool Player::canWear(uint32_t _looktype)
{
if(m_playerOutfits.isInList(_looktype)){
return true;
}
return false;
}

void Player::genReservedStorageRange()
{
unsigned long base_key;
//generate outfits range
base_key = PSTRG_OUTFITS_RANGE_START + 1;

const OutfitList& global_outfits = Outfits::getInstance()->getOutfitList(sex);

const OutfitListType& outfits = m_playerOutfits.getOutfits();
OutfitListType::const_iterator it;
for(it = outfits.begin(); it != outfits.end(); ++it){
uint32_t looktype = (*it)->looktype;
if(!global_outfits.isInList(looktype)){
long value = (looktype << 16);
storageMap[base_key] = value;
base_key++;
if(base_key > PSTRG_OUTFITS_RANGE_START + PSTRG_OUTFITS_RANGE_SIZE){
std::cout << "Warning: [Player::genReservedStorageRange()] Player " << getName() << " with more than 500 outfits!." << std::endl;
break;
}
}
}
}

void Player::addOutfit(uint32_t _looktype, uint32_t _premium)
{
Outfit outfit;
outfit.looktype = _looktype;
outfit.premium = _premium;
m_playerOutfits.addOutfit(outfit);
}

bool Player::remOutfit(uint32_t _looktype, uint32_t _premium)
{
Outfit outfit;
outfit.looktype = _looktype;
outfit.premium = _premium;
return m_playerOutfits.remOutfit(outfit);
}
______________________________________________________

I tray add this two options i am very close to add this i do my best .

______________________________________________________
Code:
bool Player::canWear(uint32_t _looktype)
{
if(m_playerOutfits.isInList(_looktype)){
return true;
}
return false;
}

-- Moderator edit: Use code tags
 

Attachments

Last edited by a moderator:
sorry for my bad english, just so that the player could not change its Outfit with bot only by click on addon : (

Its a lot of c++ if someone have time to help me i leave my Skype here : danylook100 "and i will explain everything, just send me message and if u don't like Skype .also i live my Team Speak server 3
srv2.multigaming.pl:12509 thanks for replay :)
 
Last edited by a moderator:
Back
Top