1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

account

Discussion in 'Script Support' started by stacey, Jun 8, 2013.

  1. stacey
    Offline

    stacey Member

    Joined:
    Mar 20, 2013
    Messages:
    95
    Likes Received:
    2
    hi how do I make it so ever one can only have 1 player per account plz
    Code (C#):
    1. /// <summary>
    2.         /// Gets the current number of characters on this account.
    3.         /// </summary>
    4.         public int Count
    5.         {
    6.             get
    7.             {
    8.                 int count = 0;
    9.  
    10.                 for (int i = 0; i < this.Length; ++i)
    11.                 {
    12.                     if (this[i] != null)
    13.                         ++count;
    14.                 }
    15.  
    16.                 return count;
    17.             }
    18.         }
    19.         /// <summary>
    20.         /// Gets the maximum amount of characters allowed to be created on this account. Values other than 1, 5, 6, or 7 are not supported by the client.
    21.         /// </summary>
    22.         public int Limit
    23.         {
    24.             get
    25.             {
    26.                 return (Core.SA ? 7 : Core.AOS ? 6 : 5);
    27.             }
    28.         }
    29.         /// <summary>
    30.         /// Gets the maxmimum amount of characters that this account can hold.
    31.         /// </summary>
     
  2. stacey
    Offline

    stacey Member

    Joined:
    Mar 20, 2013
    Messages:
    95
    Likes Received:
    2
    and the number of house I what to let player have 2 house how do I change that plz
    Code (C#):
    1.  public static bool HasAccountHouse(Mobile m)
    2.         {
    3.             Account a = m.Account as Account;
    4.  
    5.             if (a == null)
    6.                 return false;
    7.  
    8.             for (int i = 0; i < a.Length; ++i)
    9.                 if (a[i] != null && HasHouse(a[i]))
    10.                     return true;
    11.  
    12.             return false;
    13.         }
    14.  
    15.         public bool IsOwner(Mobile m)
    16.         {
    17.             if (m == null)
    18.                 return false;
    19.  
    20.             if (m == this.m_Owner || m.AccessLevel >= AccessLevel.GameMaster)
    21.                 return true;
    22.  
    23.             return this.IsAosRules && AccountHandler.CheckAccount(m, this.m_Owner);
    24.         }
     
  3. manofwar
    Offline

    manofwar Member

    Joined:
    Mar 22, 2013
    Messages:
    34
    Likes Received:
    7
    for ( int i = 0; i < list.Count; ++i )
    Change the 0 to a 1 for 2 houses per account, 2 for 3 and so on.
     
  4. manofwar
    Offline

    manofwar Member

    Joined:
    Mar 22, 2013
    Messages:
    34
    Likes Received:
    7
    also,
    get
    {
    return (Core.SA ? 7 : Core.AOS ? 6 : 5);
    }

    change the 7,6 and 5 to 1.
     
  5. stacey
    Offline

    stacey Member

    Joined:
    Mar 20, 2013
    Messages:
    95
    Likes Received:
    2
    thx I will try that
     
  6. pall
    Offline

    pall Member

    Joined:
    Aug 20, 2014
    Messages:
    166
    Likes Received:
    6
    when i do that. if i try to create a new character my server crash.. :S
     
  7. Kilra Yan
    Offline

    Kilra Yan Member

    Joined:
    Aug 26, 2015
    Messages:
    284
    Likes Received:
    19
    try this

    Code (C#):
    1.  
    2. public int Limit  { get  { if ( AccessLevel >= AccessLevel.Counselor) { return 5; } else return 1; } }
    3.  
     
  8. pall
    Offline

    pall Member

    Joined:
    Aug 20, 2014
    Messages:
    166
    Likes Received:
    6
    the same, crash.
     
  9. Kilra Yan
    Offline

    Kilra Yan Member

    Joined:
    Aug 26, 2015
    Messages:
    284
    Likes Received:
    19
    strange, when does it happen? when u create character or on server start? have you tryed to temp backup and remove all server data and apply the script only after?
     
  10. pall
    Offline

    pall Member

    Joined:
    Aug 20, 2014
    Messages:
    166
    Likes Received:
    6
    when i create a new character (the 2on character)
     
  11. dmurphy
    Offline

    Admin ServUO Developer

    Joined:
    Feb 10, 2014
    Messages:
    1,009
    Likes Received:
    191
    Please post the crash log.
     
  12. pall
    Offline

    pall Member

    Joined:
    Aug 20, 2014
    Messages:
    166
    Likes Received:
    6
    Code (C#):
    1. Server Crash Report
    2. ===================
    3.  
    4. RunUO Version 0.5, Build 5752.24497
    5. Operating System: Unix 2.6.32.42
    6. .NET Framework: 4.0.30319.17020
    7. Time: 10/27/2015 15:51:43
    8. Mobiles: 38128
    9. Items: 116384
    10. Exception:
    11. System.NullReferenceException: Object reference not set to an instance of an object
    12.   at Server.Health.InfectionUtility.GetCondition (Server.Mobile m) [0x00000] in <filename unknown>:0
    13.   at Server.Health.InfectionUtility.EventSink_CharacterCreatedHealthCheck (Server.CharacterCreatedEventArgs args) [0x00000] in <filename unknown>:0
    14.   at (wrapper delegate-invoke) <Module>:invoke_void__this___CharacterCreatedEventArgs (Server.CharacterCreatedEventArgs)
    15.   at Server.EventSink.InvokeCharacterCreated (Server.CharacterCreatedEventArgs e) [0x00000] in <filename unknown>:0
    16.   at Server.Network.PacketHandlers.CreateCharacter (Server.Network.NetState state, Server.Network.PacketReader pvSrc) [0x00000] in <filename unknown>:0
    17.   at Server.Network.MessagePump.HandleReceive (Server.Network.NetState ns) [0x00000] in <filename unknown>:0
    18.   at Server.Network.MessagePump.Slice () [0x00000] in <filename unknown>:0
    19.   at Server.Core.Main (System.String[] args) [0x00000] in <filename unknown>:0
    20.  
    21. Clients:
    22. - Count: 2
    23. + 84.120.4.212: (account = asth) (mobile = 0x6D4 'Larry')
    24. + 79.159.81.41: (account = pallo)
    25.  
     
Similar Threads: account
Forum Title Date
Script Support HTML form for accounts Sep 22, 2017
Script Support AccountHandler Mod - Unable to get owner identified. Aug 8, 2017
Archived Bug Reports HouseRaffleStone needs update to take gold from "Account balance" Jul 9, 2017
General Discussion Ways to block Shared accounting? Jun 13, 2017
Windows Support Lost all accounts? May 16, 2017
ServUO Discussion Characters limit per account May 14, 2017
Windows Support (SOLVED) TOL Buy Bank Account Apr 15, 2017