Jimbo Posted March 23, 2015 Posted March 23, 2015 Just want a simple shared housing. The partner with the lower value house automatically moves into the higher value house and have the same amount of will. I'm actually not looking for someone to code this as I can do it on my own. I just would like some ideas, I'm not exactly sure how I should go with it. Seems like there can be a lot of exploits with this and I want to make sure everything runs smoothly. Quote
Coly010 Posted March 23, 2015 Posted March 23, 2015 I made a somewhat advanced shared housing mod. Hell if it ain't complicated, hell if it there isn't a lot of exploits and hell if you won't be finding bugs up to a week later. Take your time with it, think it out carefully before you start coding. Quote
Veramys Posted March 23, 2015 Posted March 23, 2015 I'm not sure why people want to do such a thing, with the way you want it it would be rather easy for someone that is high in the game to have the best house and marry a noob friend of theirs and that friend easily be able to out train people because of the housing. I don't see this as fair. Quote
SRB Posted March 24, 2015 Posted March 24, 2015 In design, the easiest way would be to have the estate.php populate 2 fields; 1 new one, for arguments sake, "housewill". 1 old one, maxwill; By using housewill, and only housewill, in the estate.php - it doesn't pollute the field anywhere in the game but locks down the buying and selling of property to that field alone. Then use maxwill as it currently is. if ($ir['married']) { $sql = "SELECT MAX(maxwill) as max_will FROM users WHERE userid IN ($ir['userid'], $ir['married']);"; $result = $db->query($sql); if ($db->num_rows($result)) { $row = $db->fetch_row($result); if ($ir['maxwill'] != $row['max_will']) { $sql = "UPDATE users SET maxwill = $row['max_will'] WHERE userid = " . $ir['userid']; $db->query($sql); } } } NOTE - I said simplest, not best. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.