Code:
using System ;
using System . Collections . Generic ;
using System . Linq ;
using System . Text ;
namespace Conquer_Online_Server . Network . GamePackets
{
public class WareHousePassword : Writer , Interfaces . IPacket
{
public const byte
create )
{
if ( create )
{
Buffer = new byte [ 15 + 8 ];
WriteUInt16 ( 15 , 0 , Buffer );
WriteUInt16 ( 2261 , 2 , Buffer );
}
}
public byte type
{
get {return Buffer [ 4 ]; }
set { Buffer [ 4 ] = value ;}
}
public uint OldPassword
{
get {return BitConverter . ToUInt32 ( Buffer , 8 );}
set { WriteUInt32 ( value , 8 , Buffer );}
}
public uint NewPassword
{
get {return BitConverter . ToUInt32 ( Buffer , 12 );}
set { WriteUInt32 ( value , 12 , Buffer );}
}
public byte [] ToArray ()
{
return Buffer ;
}
public void Deserialize ( byte [] buffer )
{
this . Buffer = buffer ;
}
public void Send ( Client . GameClient client )
{
client . Send ( Buffer );
} } }
Network / PacketHandller.cs and looking for # Region Trade (1056)
Code:
# Region Trade (1056)
case 1056 :
{
if ( client . Action ! = 2 )
return;
if ( client . Entity . PokerTable > 0 ) break;
Trade trade = new Trade ( false );
trade . Deserialize ( packet );
lock ( client . ItemSyncRoot )
{
switch
( client . WarehousePW ! = string . Empty)
{
Npcs dialog =
the warehouse password to trade " );
dialog . Input ( "Password:" , 1 , 16 );
dialog . Option ( "No thank you." , 255 );
dialog . Send ();
}
else
AcceptTrade ( trade , client ) ;
break;
}
}
break;
}
# endregion
And then looking for a
# region Achievement adds underneath
Code:
# Region WarehousePassword (2261)
case two thousand two hundred sixty-one :
{
WareHousePassword whp = new WareHousePassword ( false );
whp . Deserialize ( packet );
switch ( whp . type )
{
case WareHousePassword . SendInformation :
{
if ( client . WarehousePW ! = "" )
{
if
modified! Please remember your secondary password " , System . Drawing . Color . Red , Network . GamePackets . Message . Service )); } else {
whp =
set! Please remember your secondary
(
client . WarehousePW ! = "" )
{
if ( client . WarehousePW == whp . NewPassword . ToString ())
{
client . WarehouseOpen = true ;
whp =
Verified!! Please remember your secondary password " , System . Drawing . Color . Red , Network . GamePackets . Message . Service ));
}
else
{
whp =
Removed Your Passowrd! " , System . Drawing . Color . Red , 0x7d0 ));
}
break;
}
case WareHousePassword . SetNewPass :
{
if
set! Please remember your secondary
And then looking for a
case Data.DeleteCharacter
Code:
case Data . DeleteCharacter :
{
if (( client . WarehousePW == null | | client . WarehousePW == "" | | client . WarehousePW == "0" && GData . DwParam == 0 ) | | ( client . WarehousePW == gData . dwParam . ToString ()))
{
client . Account . EntityID = 0 ;
client . Account . Save ();
client . Disconnect ();
}
break;
}
And then looking for a
# region Captchas
Code:
# Region Captchas
Npcs dialog = new Npcs ( client );
if ( client . ActiveNpc == 9999998 && req . OptionID ! = 255 && client . SMCaptcha ! = "" )
{
if
have spun the wheel 10 times. The current input text: " + client . SMCaptcha + "to verify your humanity." );
dialog . Input ( "Captcha message:" , 1 , ( byte ) client . SMCaptcha . Length );
dialog . Option ( "No thank you . " , 255 );
dialog . Send ();
}
return;
}
if ( client . ActiveNpc == 9.99999 million && client . ExpectingQAnswer )
{
if ( req . OptionID == 255 ) return;
client . ExpectingQAnswer = false ;
if ( req . Input == client . QAnswer && client . QCorrect ! = null )
client . QCorrect ( client );
else
if ( client . QWrong ! = null )
client . QWrong ( client );
client . QAnswer = null ;
client . QWrong = null ;
return;
}
if ( client . ActiveNpc == 9,999,997 && client . WaitingKillCaptcha )
{
if ( req . OptionID == 255 ) return;
if
the current text: " + client . KillCountCaptcha + "to verify your humanity." );
dialog . Input ( "Captcha message:" , 1 , ( byte ) client . KillCountCaptcha . Length );
dialog . Option ( "No thank you. " , 255 );
dialog . Send ();
}
return;
}
if ( client . ActiveNpc == 9999996 && client . WaitingTradePassword )
{
if ( req . OptionID == 255 )
{
CloseTrade (new Trade ( true ) { Type = Trade . Close }, client );
return;
}
if
the warehouse password to trade " );
dialog . Input ( "Password:" , 1 , 16 );
dialog . Option ( "No thank you." , 255 );
dialog . Send ();
}
return;
}
if ( client . ActiveNpc == 9999995 && client . WaitingItemUnlockPassword )
{
if ( req . OptionID == 255 )
{
client . ItemUnlockPacket = null ;
return;
}
if
the warehouse to instantly unlock password. " );
dialog . Input ( "Password:" , 1 , 16 );
dialog . Option ( "No thank you." , 255 );
dialog . Send ();
}
return;
}
# endregion
EntityTable.cs and looking for if (reader.Read ())
Code:
client . WarehousePW = reader . ReadString ( "WarehousePW" );
using (var cmd = new MySqlCommand (MySqlCommandType.UPDATE). Update ("enti ties"))
Code:
cmd . Set ( "WarehousePW" , c . WarehousePW )
. Insert ("Face", client.Entity.Face). Insert ("HairStyle", client.Entity.HairStyle). Insert ("Strength", client.Entity.Strength)
Code:
. Insert ( "WarehousePW" , "" ). Insert ( "Agility" , client . Entity . Agility ). Insert ( "Vitality" , client . Entity . Vitality ). Insert ( "Spirit" , client . Entity . Spirit )
then go on database and work for desingTable






