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

Lua Don't change colors

SonekaBR

New Member
Joined
Nov 8, 2008
Messages
127
Reaction score
0
How can i put for players don't change colors, i'm using Avesta 7.6

OBS: It Don't have this option in config.lua
 
Check it.
  • protocolgame.cpp / ProtocolGame / parseSetOutfit(NetworkMessage& msg)
    PHP:
    void ProtocolGame::parseSetOutfit(NetworkMessage& msg)
    {
    #ifdef __PROTOCOL_77__
    	uint16_t lookType = msg.GetU16();
    #else
    	uint8_t lookType = msg.GetByte();
    #endif // __PROTOCOL_77__
    
    	Outfit_t newOutfit;
    	
    	// only first 4 outfits
    	uint8_t lastFemaleOutfit = 0x8B;
    	uint8_t lastMaleOutfit = 0x83;
    
    	// if premium then all 7 outfits
    	if (player->getSex() == PLAYERSEX_FEMALE && player->isPremium())
    		lastFemaleOutfit = 0x8E;
    	else if (player->getSex() == PLAYERSEX_MALE && player->isPremium())
    		lastMaleOutfit = 0x86;
    	
    	if ((player->getSex() == PLAYERSEX_FEMALE && 
    		lookType >= PLAYER_FEMALE_1 && 
    		lookType <= lastFemaleOutfit) || 
    		(player->getSex() == PLAYERSEX_MALE &&
    		lookType >= PLAYER_MALE_1 &&
    		lookType <= lastMaleOutfit))
    	{
    		msg.SkipBytes(32);
    		newOutfit = player->getCurrentOutfit();
    		newOutfit.lookType = lookType;
    		// newOutfit.lookHead = msg.GetByte();
    		// newOutfit.lookBody = msg.GetByte();
    		// newOutfit.lookLegs = msg.GetByte();
    		// newOutfit.lookFeet = msg.GetByte();
    	}
        
        addGameTask(&Game::playerChangeOutfit, player->getID(), newOutfit);
    }
 
Last edited:
Check it.
  • protocolgame.cpp / ProtocolGame::parseSetOutfit(NetworkMessage& msg)
    PHP:
    void ProtocolGame::parseSetOutfit(NetworkMessage& msg)
    {
    #ifdef __PROTOCOL_77__
    	uint16_t lookType = msg.GetU16();
    #else
    	uint8_t lookType = msg.GetByte();
    #endif // __PROTOCOL_77__
    
    	Outfit_t newOutfit;
    	
    	// only first 4 outfits
    	uint8_t lastFemaleOutfit = 0x8B;
    	uint8_t lastMaleOutfit = 0x83;
    
    	// if premium then all 7 outfits
    	if (player->getSex() == PLAYERSEX_FEMALE && player->isPremium())
    		lastFemaleOutfit = 0x8E;
    	else if (player->getSex() == PLAYERSEX_MALE && player->isPremium())
    		lastMaleOutfit = 0x86;
    	
    	if ((player->getSex() == PLAYERSEX_FEMALE && 
    		lookType >= PLAYER_FEMALE_1 && 
    		lookType <= lastFemaleOutfit) || 
    		(player->getSex() == PLAYERSEX_MALE &&
    		lookType >= PLAYER_MALE_1 &&
    		lookType <= lastMaleOutfit))
    	{
    		msg.SkipBytes(32);
    		newOutfit = player->getCurrentOutfit();
    		newOutfit.lookType = lookType;
    		// newOutfit.lookHead = msg.GetByte();
    		// newOutfit.lookBody = msg.GetByte();
    		// newOutfit.lookLegs = msg.GetByte();
    		// newOutfit.lookFeet = msg.GetByte();
    	}
        
        addGameTask(&Game::playerChangeOutfit, player->getID(), newOutfit);
    }

Sn3ejk can u put the way to found this archive?


I'm the biggest noob on sources, so i dunno where to found them
 
Back
Top