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

Number of Accounts and houses

Discussion in 'Script Support' started by Rochaven, Jan 28, 2014.

  1. Rochaven
    Offline

    Rochaven Member

    Joined:
    Jan 21, 2014
    Messages:
    162
    Likes Received:
    1
    Publish Number:
    54
    Does anyone know which .cs files i need to modify to change the number of accounts per ip and number of houses allowed per account ? Simple lol question but has yet to be captured by my never ending search . Thanks as always for everyone's input. :D
     
  2. IanE
    Offline

    IanE Member

    Joined:
    Dec 27, 2013
    Messages:
    220
    Likes Received:
    16
    I would like to know this as well.

    Thanks!
     
  3. Kalamus
    Offline

    Kalamus Active Member

    Joined:
    Apr 24, 2013
    Messages:
    282
    Likes Received:
    32
    Scripts/Accounting/AccountHandler.cs
    Code (C#):
    1. private static readonly int MaxAccountsPerIP = 1;
    For the houses you would have to do a bit of coding in BaseHouse.cs. There are few examples on RunUO forums for this but I don't have any code handy for it.
     
    • Two Thumbs Up Two Thumbs Up x 1
  4. Ravenwolfe
    Offline

    Moderator ServUO Developer

    Joined:
    Sep 7, 2013
    Messages:
    1,105
    Likes Received:
    117
    Basehouse.cs

    Code (C#):
    1. public static bool HasHouse( Mobile m )
    2.         {
    3.             if ( m == null )
    4.                 return false;
    5.             List<BaseHouse> list = null;
    6.             m_Table.TryGetValue( m, out list );
    7.             if ( list == null )
    8.                 return false;
    9.             // # of Houses per Account 0=1, 1=2, 2=3 per account etc etc
    10.             for ( int i = 2; i < list.Count; ++i )
    11.             {
    12.                 BaseHouse h = list[i];
    13.                 if ( !h.Deleted )
    14.                     return true;
    15.             }
    16.             return false;
    17.         }
     
    • Two Thumbs Up Two Thumbs Up x 3
  5. Tresdni
    Offline

    Tresdni Member

    Joined:
    Mar 10, 2013
    Messages:
    91
    Likes Received:
    36
    I've always done it in the HasAccountHouse method.
     
  6. Hank
    Offline

    Hank Active Member

    Joined:
    Nov 14, 2013
    Messages:
    972
    Likes Received:
    152
    http://lmgtfy.com/?q=site:runuo.com house limit
    http://lmgtfy.com/?q=site:runuo.com houses per account
    http://www.runuo.com/community/threads/how-to-change-house-limit.92393/

    Remember ServUO use to be ForkUO which was a fork of Runuo. You can still find tons of information about how to do this kind of stuff on the runuo forums.
    Edit: of course I'm not saying it should not be here. Just that this information is already readily available if you know how to use a 'search engine'.
    EditEdit: So now that this thread is established. We should not see this question get asked ever again in the future here on servuo... right?
     
    #6 Hank, Jan 29, 2014
    Last edited: Jan 29, 2014
  7. Rochaven
    Offline

    Rochaven Member

    Joined:
    Jan 21, 2014
    Messages:
    162
    Likes Received:
    1
    Maybe, or maybe someone else who's completely new to the forums will drop in. LOL But to be honest, the format you just used is awesome, easy and very professional. I am nominating you for the "Forurm Professional Of the Year" award ! Do they give those here?:D
     
  8. Ravenwolfe
    Offline

    Moderator ServUO Developer

    Joined:
    Sep 7, 2013
    Messages:
    1,105
    Likes Received:
    117
    @Tresdni
    Yeah, that might be the better way, depending on your goal.
    I think that will allow the account to have more houses but not the character. If you want a single character to be able to own more than one house, you use the HasHouse method. My shard only allowed one character per account and therefore I had to use the HasHouse method to let them have more than one house.
     
  9. Rochaven
    Offline

    Rochaven Member

    Joined:
    Jan 21, 2014
    Messages:
    162
    Likes Received:
    1
    I just wish the account which is allowed to have the normal char count to have a total of 4 per account total. I think the link above worked, it had me add alot of lines to HasHouse .cs we'll see lol, thank you all again, very much
     
  10. jase giffin
    Offline

    jase giffin Active Member

    Joined:
    Sep 14, 2013
    Messages:
    253
    Likes Received:
    72
  11. Rochaven
    Offline

    Rochaven Member

    Joined:
    Jan 21, 2014
    Messages:
    162
    Likes Received:
    1
    Awesome thank you once again !
     
  12. Döschl
    Offline

    Döschl Member

    Joined:
    Aug 11, 2014
    Messages:
    50
    Likes Received:
    0
    hi, i have a problem with the houses if you can have more than one house.
    the first house didint decay...if i refresh. but all the others decay after 24 hours.

    i didnt know, wich line in the basehouse.cs i have to edit, to fix the problem.

    can anybody help please?

    Greetings Döschl
     
  13. Döschl
    Offline

    Döschl Member

    Joined:
    Aug 11, 2014
    Messages:
    50
    Likes Received:
    0
    push
     
    • Disagree Disagree x 1
  14. ATruGod
    Offline

    ATruGod Member

    Joined:
    Dec 26, 2014
    Messages:
    87
    Likes Received:
    31
    BaseHouse.cs
    Code (C#):
    1. public const bool DecayEnabled = false;
     
  15. Döschl
    Offline

    Döschl Member

    Joined:
    Aug 11, 2014
    Messages:
    50
    Likes Received:
    0
    but this will set all houses for decay=false. that isnt waht i want.
    i dont know, if you understand it.... the first house decay routine works fine. but i set the number of houses up to 4 .... after this, the second, third and fourth house cant be refreshed more than 24 hours....there get a status named "Grandfatherd".... cant find that string in the script. and all these houses 2., 3., 4. will decay after 24 hours...not the same routine that works with the first house.
     
  16. thistle
    Offline

    thistle Member

    Joined:
    Sep 19, 2014
    Messages:
    59
    Likes Received:
    4
    so does anyone know how this works with the new config file as i have set it and still players cant have two houses per account.
    i went into basehouse script but i got a little frustrated at that point,as i could not pin down what i was looking for. does anyone have any ideas?
    the first few lines has the line for the config and i set to two but it still did not work with both edits basehouse and config.
     
  17. PyrO
    Offline

    PyrO Active Member

    Joined:
    Jan 27, 2015
    Messages:
    700
    Likes Received:
    30
    in BaseHouse.cs in the HasAccountHouse function you can either remove or change
    Code (C#):
    1. if(HasHouse(m))
    2. {
    3.     return true;
    4. }
    to
    Code (C#):
    1. if(m_AccountHouseLimit == 1 && HasHouse(m))
    2. {
    3.     return true;
    4. }
     
  18. thistle
    Offline

    thistle Member

    Joined:
    Sep 19, 2014
    Messages:
    59
    Likes Received:
    4
    ty ill give it a try
    --- Double Post Merged, Nov 23, 2016 ---
    is it still 0=1 , 1=2 and so on
     
  19. PyrO
    Offline

    PyrO Active Member

    Joined:
    Jan 27, 2015
    Messages:
    700
    Likes Received:
    30
    oh wait I even misread it as that you want to remove the limit / extend it so you can have more on one character.
    I dont see why it wouldnt allow to have more houses per account if you changed the config file to allow so with AccountHouseLimit
     
  20. thistle
    Offline

    thistle Member

    Joined:
    Sep 19, 2014
    Messages:
    59
    Likes Received:
    4
    i changed it in the config and base house in the line for the config got no results. so do i need to reedit what you sent to original?
    and all i wanted was two houses per account.
    --- Double Post Merged, Nov 23, 2016 ---
    also i am using the newest svn
     
Similar Threads: Number Accounts
Forum Title Date
ServUO Discussion Number of items in the world Friday at 12:12 PM
ServUO Discussion limited number of items Aug 17, 2017
General Discussion Harpsichord color numbers Jul 25, 2017
Script Support Delucia's number Jul 20, 2017
Archived Bug Reports Number of Visits a house has Jun 28, 2017
Archived Bug Reports Velocity - Heartwood Fletcher Tool (and durability/number of props) Jun 26, 2017
Script Support Need help solving point system label number, or item identified. May 13, 2017