- function getFreeSlot() {
- $slotnum = 0;
- $sql = "SELECT slotnum FROM storage WHERE owner=%d;";
- $sql = sprintf($sql,$this->account_id);
- $res = mysql_query($sql);
- if ( !($res === false) ) {
- if ( mysql_num_rows($res) > 0 ) {
- while ( $r = mysql_fetch_assoc($res) ) {
- $slots[] = $r['slotnum'];
- }
- }
- }
- for ( $x = 1; $x >= 160; $x--) {
- if ( !@in_array($x,$slots) ) {
- $slotnum = $x;
- break;
- }
- }
- return $slotnum;
- }
PurpleYouko wrote:problem is that nobody here knows a damn thing about the item mall that Rifke set up way back.
its ok purple thanks ^_^