Do I see Active record? :)
Printable View
Do I see Active record? :)
Of course!
Back home now so I'll try update.
Tried implementing a script engine w/ jruby, it's bugged though.
Will sort it out soon.
I'll be using memcached for cutting down queries and the like, in production.
Speaking of production, I'll put up a dummy cms soon (hopefully).
Working on fuseranks and bans, now.
I am very tempted to switch to a flash client (flash is cross-platform, as far as I'm aware, shockwave is only properly supported on windows or something).
--
Won't be able to do much, going on holiday in a few days.
shockwave works on mac too, comfirmed
Oh, didn't know that :P.
Whoops.
Anyway, backed up my v13 build of shark, will be experimenting with flash now.
Good job so far Adil, good to see a v13 (Old School) emulator in dev. Wish you best of luck m8.
Thanks ^^.
Thinking of performing some minor backend changes (for the api, and network or s/t).
Will update soon.
Hm, do you have a database structure all planned out and ready to go? I would love to add support for this inside the CMS I'm developing.
Also, stick with old school.
I do have a database structure, and I am sticking with oldschool.
Anyway, haven't worked it on over the past few days, busy with other stuff.
Going to do as much as possible tomorrow, if I can be bothered ^_^.
Sorting stuff out for my holiday and a trip on Saturday.
Going to work on the CMS so the sso ticket is dynamically generated (32bit random hash based on username, email & timestamp should suffice :) ).
Also, should I be receiving a message when I search? Cause atm, I'm not :S.
I also do have a simple MySQL system built into it, so if anyone would like to use that over Hibernate it shouldn't be too hard porting :).
Database structure for the moment, a lot of the columns in the user table are generated through devise :).Code:
/*
Navicat MySQL Data Transfer
Source Server : Redstone
Source Server Version : 50516
Source Host : localhost:3306
Source Database : shark
Target Server Type : MYSQL
Target Server Version : 50516
File Encoding : 65001
Date: 2012-08-07 00:33:55
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `ban`
-- ----------------------------
DROP TABLE IF EXISTS `ban`;
CREATE TABLE `ban` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`habbo_id` int(10) NOT NULL DEFAULT '0',
`reason` int(10) NOT NULL DEFAULT '0',
`given_by` int(10) NOT NULL DEFAULT '0',
`created_at` datetime DEFAULT NULL,
`expires_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
KEY `FK_ban_habbo` (`habbo_id`),
CONSTRAINT `FK_ban_habbo` FOREIGN KEY (`habbo_id`) REFERENCES `habbo` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='a table for bans\r\n';
-- ----------------------------
-- Records of ban
-- ----------------------------
-- ----------------------------
-- Table structure for `friend_request`
-- ----------------------------
DROP TABLE IF EXISTS `friend_request`;
CREATE TABLE `friend_request` (
`id` int(10) NOT NULL DEFAULT '0',
`habbo_id` int(10) NOT NULL DEFAULT '0',
`friend_id` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='handles requests\r\n';
-- ----------------------------
-- Records of friend_request
-- ----------------------------
-- ----------------------------
-- Table structure for `fuserank`
-- ----------------------------
DROP TABLE IF EXISTS `fuserank`;
CREATE TABLE `fuserank` (
`id` int(10) NOT NULL DEFAULT '1',
`name` varchar(20) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='a table for fuserank stuff';
-- ----------------------------
-- Records of fuserank
-- ----------------------------
-- ----------------------------
-- Table structure for `habbo`
-- ----------------------------
DROP TABLE IF EXISTS `habbo`;
CREATE TABLE `habbo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`realname` varchar(256) NOT NULL,
`email` varchar(50) NOT NULL,
`sso_ticket` varchar(128) NOT NULL,
`sso_ip` varchar(128) NOT NULL,
`figure` varchar(256) DEFAULT '1150318001270012900121001',
`motto` varchar(256) DEFAULT 'Shark',
`fuserank` int(1) DEFAULT '1',
`gender` varchar(50) NOT NULL,
`credits` int(255) DEFAULT '100',
`activity_points` int(255) DEFAULT '100',
`last_online` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `sso_ticket` (`sso_ticket`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COMMENT='A table to store habbo data.\r\n';
-- ----------------------------
-- Records of habbo
-- ----------------------------
INSERT INTO `habbo` VALUES ('1', 'adil', '', 'adil@lolcats.net', 'adil', '', '1150318001270012900121001', 'I like cats', '1', 'M', '100', '100', '0000-00-00 00:00:00');
INSERT INTO `habbo` VALUES ('2', 'test', 'test', 'test@asdf.net', 'adil123', '', '1150318001270012900121001', 'Shark', '1', 'M', '100', '100', '0000-00-00 00:00:00');
-- ----------------------------
-- Table structure for `habbo_friend`
-- ----------------------------
DROP TABLE IF EXISTS `habbo_friend`;
CREATE TABLE `habbo_friend` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`habbo_id` int(10) NOT NULL,
`friend_id` int(10) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COMMENT='friend table (id: 1 friend of id: 2)';
-- ----------------------------
-- Records of habbo_friend
-- ----------------------------
INSERT INTO `habbo_friend` VALUES ('1', '1', '2');
-- ----------------------------
-- Table structure for `habbo_user`
-- ----------------------------
DROP TABLE IF EXISTS `habbo_user`;
CREATE TABLE `habbo_user` (
`id` int(10) NOT NULL DEFAULT '0',
`user_id` int(10) DEFAULT NULL,
`habbo_id` int(10) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`),
UNIQUE KEY `user_id` (`user_id`),
KEY `FK_habbo_user_habbo` (`habbo_id`),
CONSTRAINT `FK_habbo_user_habbo` FOREIGN KEY (`habbo_id`) REFERENCES `habbo` (`id`),
CONSTRAINT `FK_habbo_user_users` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='links habbo and users table\r\n';
-- ----------------------------
-- Records of habbo_user
-- ----------------------------
-- ----------------------------
-- Table structure for `users`
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(32) NOT NULL,
`email` varchar(50) NOT NULL,
`encrypted_password` varchar(256) NOT NULL,
`gender` enum('F','M') NOT NULL,
`sign_in_counts` int(11) NOT NULL,
`user_ip` varchar(24) NOT NULL,
`last_ip` varchar(24) NOT NULL,
`created_at` datetime NOT NULL,
`last_signed_in_at` datetime NOT NULL,
PRIMARY KEY (`user_id`),
UNIQUE KEY `user_id` (`user_id`),
UNIQUE KEY `username` (`username`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Generic users table, this is not for in-game stuff, only for web stuff.\r\n';
-- ----------------------------
-- Records of users
-- ----------------------------
Please use UTF8 instead of latin1