SendZeny() public method

Update the Zeny of the client. One value for Zeny and Rufi. '12000' = 1 Zeni 2000 Rufi.
public SendZeny ( ) : void
return void
Esempio n. 1
0
        public void ProcessRCash( MapClient client, string args )
        {
            int tzeny, trufi;
            string[] inputs = args.Split( " ".ToCharArray() );
            if( inputs.Length != 3 )
                client.SendMessage( _MasterName, "To remote lootz use ~cash <name> <rufi> <zeny>" );
            else
            {
                ActorPC remote = client.map.GetPC( inputs[0] );
                if( remote == null )
                    client.SendMessage( _MasterName, "To remote lootz use ~cash <name> <rufi> <zeny>" );
                else
                {
                    trufi = int.Parse( inputs[1] );
                    tzeny = int.Parse( inputs[2] );

                    int total = ( tzeny * 10000 ) + trufi;
                    uint modtotal = (uint)Math.Abs( total );

                    if( total > 0 )
                    {
                        remote.zeny += modtotal;
                        remote.e.OnSendMessage( "Cashier", "Your monies have been modified" );
                    }
                    else
                    {
                        if( ( client.Char.zeny - modtotal ) >= 0 )
                            client.Char.zeny -= modtotal;
                        else
                            client.SendMessage( "Cashier", "Character doesn't have enough money" );
                        remote.e.OnSendMessage( "Cashier", "Your monies have been modified" );
                    }
                    client.SendZeny();
                }
            }
        }
Esempio n. 2
0
        public void ProcessCash( MapClient client, string args )
        {
            int tzeny, trufi;
            string[] inputs = args.Split( " ".ToCharArray() );
            if( inputs.Length != 2 )
                client.SendMessage( _MasterName, "To get lootz use !cash <rufi> <zeny>" );
            else
            {
                trufi = int.Parse( inputs[0] );
                tzeny = int.Parse( inputs[1] );

                int total = ( tzeny * 10000 ) + trufi;
                uint modtotal = (uint)Math.Abs( total );

                if( total > 0 )
                {
                    client.Char.zeny += modtotal;
                    client.SendMessage( "Cashier", "Enjoy your loot" );
                }
                else
                {
                    if( ( client.Char.zeny - modtotal ) >= 0 )
                        client.Char.zeny -= modtotal;
                    else
                        client.SendMessage( "Cashier", "You don't have enough loot!" );
                    client.SendMessage( "Cashier", "All your loot are belong to me" );
                }
                client.SendZeny();
            }
        }