- Joined
- Aug 16, 2007
- Messages
- 343
- Reaction score
- 263
SWFs: https://mega.co.nz/#!tMkx2YIS!LaIEUBKhm6W0B9I8DIfKg3FEpU5TRYx2_xE0fnz7ghs
Recommend you to use the vars released with revision 3 as I changed some stuff.
Current Revision Download [REVISION 5]
https://mega.co.nz/#!UZVkjL6Q!ZBxJqWGEY1qRGP2CIjVK3U7opRthQLVtganrgSrMEyA
Revision 5 patch notes
For personal reasons I can't further develop this. However I've promissed a Release 5 so I'm posting this, thourgh it doesn't have all features I said it would. I will complete the gifting system anyway soon.
An item can't cost both Duckets and Diamonds. If it happens to cost both in catalog_items_copy, diamonds will be serialized.
Perfomance analysis:
/*
Navicat MySQL Data Transfer
Source Server : weblink
Source Server Version : 50141
Source Host : localhost:3306
Source Database : adma1
Target Server Type : MYSQL
Target Server Version : 50141
File Encoding : 65001
Date: 2013-07-03 12:38:41
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `user_gifts`
-- ----------------------------
DROP TABLE IF EXISTS `user_gifts`;
CREATE TABLE `user_gifts` (
`gift_id` int(10) NOT NULL AUTO_INCREMENT,
`page_id` int(10) unsigned NOT NULL DEFAULT '5',
`item_id` mediumint(10) NOT NULL,
`extradata` varchar(50) NOT NULL DEFAULT '',
`target_name` varchar(50) NOT NULL,
`message` varchar(115) NOT NULL DEFAULT '',
`ribbon` tinyint(1) NOT NULL DEFAULT '0',
`color` tinyint(1) NOT NULL DEFAULT '0',
`gift_sprite` int(10) NOT NULL,
`show_sender` tinyint(4) NOT NULL DEFAULT '1',
`rare_id` int(10) NOT NULL DEFAULT '0',
`inventory_id` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`gift_id`)
) ENGINE=MyISAM AUTO_INCREMENT=48 DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of user_gifts
-- ----------------------------
Buying gifts is almost all coded. Disconnects you when sending furni such Limited Rares and Exchange. Half of gift wrapped cases are working too.
If you are going to dev this, you can change your the following packet:
Incoming.PurchaseGift = 0x0901 to 0x0900. It will enable buying gifts. Don't do that for live servers! Will bug alot
Download: https://mega.co.nz/#!UZVkjL6Q!ZBxJqWGEY1qRGP2CIjVK3U7opRthQLVtganrgSrMEyA
REVISION 4.1
REVISION 4 Notes
REVISION 3 Notes
REVISION 2 Database: http://forum.ragezone.com/attachmen...-release-swift-emulator-fixes-edits-adma2.rar
REVISION 2 Notes
Catalog fix tool. This should fix 99.9% of your catalog problems.
//Removed single update references. Text went too damn long.
Recommend you to use the vars released with revision 3 as I changed some stuff.
Current Revision Download [REVISION 5]
https://mega.co.nz/#!UZVkjL6Q!ZBxJqWGEY1qRGP2CIjVK3U7opRthQLVtganrgSrMEyA
Revision 5 patch notes
- Fixed an error when trying to save a bot speech which contains ';'
- Fixed a glitch making Relationships not to show and throw a packet error;
- Fixed ' Remove all rights' function;
- *Diamonds catalog implemented;
- Diamonds amount now updates when buying furni;
- Fix for Limited Edition rares ids disappering on status update;
- Added support for custom duckets upper limit in configuration file;
- Removed bot's 'There's no need to shout' message;
- Improved bot's AI. Now they won't always move at the same time and to the same directions;
- Added swear word filter for chat messages;
- BOTs now move when they are placed in a room or when the room is loaded. Pretty much like Sulake's now.
- Room ads_backgrounds are now working;
- Added a query to remove furni by amount from catalogue when this furni is allowed to be sent as gift; You can remove that when you run it at least once: dbClient.runFastQuery("UPDATE catalog_items_copy,items_base SET catalog_items_copy.amount = 1 WHERE items_base.allow_gift = 1 AND catalog_items_copy.amount > 1");
- You can now ban an user from room;
- Placing pets in others room now works if they allow it;
- All can ride a horse now works;
- Removed some erros regarding guild lists not being locked;
- Removing admin privileges is ok now.
For personal reasons I can't further develop this. However I've promissed a Release 5 so I'm posting this, thourgh it doesn't have all features I said it would. I will complete the gifting system anyway soon.
An item can't cost both Duckets and Diamonds. If it happens to cost both in catalog_items_copy, diamonds will be serialized.
Perfomance analysis:
Fine till 1K users;
Laggy till 1.5K;
Will crash any point after that. Mostly because of BOTs is my guess.
--Not finished
- Started support for gifts in general. Not finished though. Here is the mysql you gonna need to keep deving it further:
- Started mannequin serializing. Not working currectly yet. It only serialize the outfit when it's owner is online I think. Not finished too
/*
Navicat MySQL Data Transfer
Source Server : weblink
Source Server Version : 50141
Source Host : localhost:3306
Source Database : adma1
Target Server Type : MYSQL
Target Server Version : 50141
File Encoding : 65001
Date: 2013-07-03 12:38:41
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `user_gifts`
-- ----------------------------
DROP TABLE IF EXISTS `user_gifts`;
CREATE TABLE `user_gifts` (
`gift_id` int(10) NOT NULL AUTO_INCREMENT,
`page_id` int(10) unsigned NOT NULL DEFAULT '5',
`item_id` mediumint(10) NOT NULL,
`extradata` varchar(50) NOT NULL DEFAULT '',
`target_name` varchar(50) NOT NULL,
`message` varchar(115) NOT NULL DEFAULT '',
`ribbon` tinyint(1) NOT NULL DEFAULT '0',
`color` tinyint(1) NOT NULL DEFAULT '0',
`gift_sprite` int(10) NOT NULL,
`show_sender` tinyint(4) NOT NULL DEFAULT '1',
`rare_id` int(10) NOT NULL DEFAULT '0',
`inventory_id` int(10) NOT NULL DEFAULT '0',
PRIMARY KEY (`gift_id`)
) ENGINE=MyISAM AUTO_INCREMENT=48 DEFAULT CHARSET=latin1;
-- ----------------------------
-- Records of user_gifts
-- ----------------------------
Buying gifts is almost all coded. Disconnects you when sending furni such Limited Rares and Exchange. Half of gift wrapped cases are working too.
If you are going to dev this, you can change your the following packet:
Incoming.PurchaseGift = 0x0901 to 0x0900. It will enable buying gifts. Don't do that for live servers! Will bug alot
Download: https://mega.co.nz/#!UZVkjL6Q!ZBxJqWGEY1qRGP2CIjVK3U7opRthQLVtganrgSrMEyA
REVISION 4.1
4.1 : Fixed injection exploit
https://mega.co.nz/#!VZ9QUD7D!RTU2bgc5p43rH_3QTUYi8UztY8AJ00Pi592gSAX2FwU
https://mega.co.nz/#!VZ9QUD7D!RTU2bgc5p43rH_3QTUYi8UztY8AJ00Pi592gSAX2FwU
REVISION 4 Notes
REVISION 4:
Download: https://mega.co.nz/#!tI1mlTqQ!MqruyBiUdYw4DtswGuxJ_lRL5LkpV-jWYz4B2zWkWhc
(Clean database and english gamedata included)
MySQL Querys for old databases:
Keep in mind that the following features works only with English furnidata for now (if you are using my items_base)
Images:
Let me know if you find any bugs. I didn't remove the packetlogger for this release because I was really tired. I will do that in the next one.
Download: https://mega.co.nz/#!tI1mlTqQ!MqruyBiUdYw4DtswGuxJ_lRL5LkpV-jWYz4B2zWkWhc
(Clean database and english gamedata included)
- Fixed possible MySQL injection exploit;
- Fixed room rating;
- Quests are now working;
- Possibly fix for pets database management causing some critical errors since Butterfly;
- Added proper shutdown system for forced closure;
- Freeze is now working;
- Now you have the option to give an user a badge when he buys a furni. Place the badge code in catalog_pages_copy badge column;
- Furni-o-matic is now working (thanks to =dj.matias=). Make sure you edit your ecotron_rewards table;
- Fixed bots name change;
- Other stability stuff you don't care.
MySQL Querys for old databases:
Code:
[COLOR=#01557D]ALTER TABLE [/COLOR]catalog_items_copy[COLOR=#01557D] ADD badge VARCHAR(20) [/COLOR]NOT NULL DEFAULT ''[COLOR=#01557D];
[/COLOR]INSERT INTO catalog_pages VALUES ('1060', '9999', 'Rewards', '3', '983', '1', '1', '1', '0', '0', '2', 'recycler_prizes', 'catalog_header_furnimatic', '', '', '', '', '', '', '', '', '', '0', '', '');
Keep in mind that the following features works only with English furnidata for now (if you are using my items_base)
- Jukebox
- Battle Banzai Furni
Images:
REMOVED
REMOVED
REMOVED
REMOVED
REMOVED
Let me know if you find any bugs. I didn't remove the packetlogger for this release because I was really tired. I will do that in the next one.
REVISION 3 Notes
Revision 3:
https://mega.co.nz/#!EUshUT4B!S9cl8SkiNSriOAPA6Bxwehf2Ap4deMCaqBuJO-4sGK8
Query:
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `user_bots`
-- ----------------------------
DROP TABLE IF EXISTS `user_bots`;
CREATE TABLE `user_bots` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`room_id` int(10) unsigned NOT NULL DEFAULT '0',
`ai_type` enum('generic','guide','pet') NOT NULL DEFAULT 'generic',
`name` varchar(100) NOT NULL,
`motto` varchar(120) NOT NULL,
`look` text NOT NULL,
`x` int(11) NOT NULL DEFAULT '0',
`y` int(11) NOT NULL DEFAULT '0',
`z` int(11) NOT NULL DEFAULT '0',
`rotation` int(11) NOT NULL DEFAULT '0',
`walk_mode` enum('stand','freeroam','specified_range') NOT NULL DEFAULT 'stand',
`min_x` int(11) NOT NULL DEFAULT '0',
`min_y` int(11) NOT NULL DEFAULT '0',
`max_x` int(11) NOT NULL DEFAULT '0',
`max_y` int(11) NOT NULL DEFAULT '0',
`user_id` int(11) NOT NULL DEFAULT '0',
`template_id` int(11) NOT NULL DEFAULT '0',
`automatic_chat` enum('false','true') NOT NULL DEFAULT 'false',
`speaking_interval` int(11) NOT NULL DEFAULT '7',
PRIMARY KEY (`id`),
KEY `room_id` (`room_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
~ To be fixed yet:
After all this is completed, I will update this emulator to the same release as PlusEmulator or for the one I've got cracked from may.
If you have some problem regarding dyeing or mounting your horse you should use the variables inside this revision's .rar
Note: In-game profiles doesn't work for accounts created using Illumina CMS. It's a bad CMS anyway so you shouldn't use it. I don't know almost anything about php so I will not try to fix that. But It would be great if someone could fix this. ( In-game profiles work fine for UberCMS2)
At this point I must say that this Revision is more stable than any other BCStorm edit. Also, I'm interested in any error you may log so we can fix this and make it better.
https://mega.co.nz/#!EUshUT4B!S9cl8SkiNSriOAPA6Bxwehf2Ap4deMCaqBuJO-4sGK8
Query:
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `user_bots`
-- ----------------------------
DROP TABLE IF EXISTS `user_bots`;
CREATE TABLE `user_bots` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`room_id` int(10) unsigned NOT NULL DEFAULT '0',
`ai_type` enum('generic','guide','pet') NOT NULL DEFAULT 'generic',
`name` varchar(100) NOT NULL,
`motto` varchar(120) NOT NULL,
`look` text NOT NULL,
`x` int(11) NOT NULL DEFAULT '0',
`y` int(11) NOT NULL DEFAULT '0',
`z` int(11) NOT NULL DEFAULT '0',
`rotation` int(11) NOT NULL DEFAULT '0',
`walk_mode` enum('stand','freeroam','specified_range') NOT NULL DEFAULT 'stand',
`min_x` int(11) NOT NULL DEFAULT '0',
`min_y` int(11) NOT NULL DEFAULT '0',
`max_x` int(11) NOT NULL DEFAULT '0',
`max_y` int(11) NOT NULL DEFAULT '0',
`user_id` int(11) NOT NULL DEFAULT '0',
`template_id` int(11) NOT NULL DEFAULT '0',
`automatic_chat` enum('false','true') NOT NULL DEFAULT 'false',
`speaking_interval` int(11) NOT NULL DEFAULT '7',
PRIMARY KEY (`id`),
KEY `room_id` (`room_id`) USING BTREE
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
- Added support handle to not handled items in database. Should fix that random glitch of BCStorm where you placed an item in the room and couldn't enter anymore;
- Fixed alert messages;
- Fixed an error where furniture weren't send to the currect owner when picked up. It's now 100% safe to place your furni into others room. If the room gets deleted or if the owner pickup your furni, It will come back to you;
- Fixed bots and pets serialize. Now It won't mess up anymore because of equals virtual ID;
- Completed bot handler. Now the Automatic chat function and the bot actions are 100% functional. Also, bots shouldn't get stucked in corners anymore.
- Improved a little bit groups composer perfomance. More to be done about this yet;
- Send support ticket is now working again.
~ To be fixed yet:
- All can ride a horse;
- Quests tab opening;
- Jukebox handler sometimes stop working. Don't know what It is yet. I might go for a full rewrite for Jukeboxes. ( Could be something related to variables as Horse dyeing too, but I don't know what It is right now)
- Mannequin header update ? I guess I forgot that for this revision. Might do for the next one;
- Football look changer;
- One-way doors;
- Apply fixes for Ecotron/Furni-o-matic and get an emblem when buying a furniture. Already released here. Only requires headers update I guess.
After all this is completed, I will update this emulator to the same release as PlusEmulator or for the one I've got cracked from may.
If you have some problem regarding dyeing or mounting your horse you should use the variables inside this revision's .rar
Note: In-game profiles doesn't work for accounts created using Illumina CMS. It's a bad CMS anyway so you shouldn't use it. I don't know almost anything about php so I will not try to fix that. But It would be great if someone could fix this. ( In-game profiles work fine for UberCMS2)
At this point I must say that this Revision is more stable than any other BCStorm edit. Also, I'm interested in any error you may log so we can fix this and make it better.
REVISION 2 Notes
Thanks for the commentaries, I really enjoy deving Habbo for knowledment. I got some time today so I finished another core update that was bugging me alot. Since It's release the BCStorm group system was broken. It was leaky, not optimal and, as I got to know later, very ambiguous. For example, every time you request some group to load from your memory, the program used to perfomed that task twice. That is not efficient and can be taken as a bug. However I think that I figured out the whole memory consuming and low performance dilemma for this release and made I good and optimal system to dispose and handle groups objetcs. After hours of testing, I can show you this data:
For each group cached, there is a consume of 13,1 ~ 13,3 K + GroupMemberNumber*0,07K of memory. It means that if you have 5000 groups with average 100 members loaded, you should have a memory consume of ~ 100MBytes. As I don't have acess to any high-populated hotel to test It, I belive that there should be 5000groups loaded for every 500online users. That seemed a good performance. But It wasn't enough. So I also created a system to dispose unused groups (the ones that are loaded by loading a profile, for example). That system disposes about to 95% of the loaded guilds on every LowPriorityWork.Process cycle ( 30s ). It means that 95% of this 100MBytes used by 5000 loaded groups is free to be used again after 30 seconds.
With that result, I belive that I was able to fix this problem regarding BCStorm's Edits/Upgrates performance instability regarding groups, making it possible to use for high populated live servers. However, this is just a presupposition based on the data I gathered. It requires testing that aspect.
As I did too much edits, I didn't rip the code out like I did for Relationships(zzzzz') . But fell free to use It at your own build. That also fix the problem regarding not being able to Edit your group after buying it, where I did need to reload your emulator to take acess to this function.
Download AKllX's Swift Emulator Revision 2: https://mega.co.nz/#!1ck0haRB!XdAeYy...vdSDoLXBMCubyE
To be fixed yet:
Serialize placing bots/pets at the room(client-side speaking they are the same);
Handle owner rights at public furni for ickall and room deleting. As It is now, all furni placed in a room by some user that doesn't own the room can be picked up by the room owner;
Handle some of these weird bugs that randomly(not really) happen. I'm interested in any bugs you may find. Just post it here.
For each group cached, there is a consume of 13,1 ~ 13,3 K + GroupMemberNumber*0,07K of memory. It means that if you have 5000 groups with average 100 members loaded, you should have a memory consume of ~ 100MBytes. As I don't have acess to any high-populated hotel to test It, I belive that there should be 5000groups loaded for every 500online users. That seemed a good performance. But It wasn't enough. So I also created a system to dispose unused groups (the ones that are loaded by loading a profile, for example). That system disposes about to 95% of the loaded guilds on every LowPriorityWork.Process cycle ( 30s ). It means that 95% of this 100MBytes used by 5000 loaded groups is free to be used again after 30 seconds.
With that result, I belive that I was able to fix this problem regarding BCStorm's Edits/Upgrates performance instability regarding groups, making it possible to use for high populated live servers. However, this is just a presupposition based on the data I gathered. It requires testing that aspect.
As I did too much edits, I didn't rip the code out like I did for Relationships(zzzzz') . But fell free to use It at your own build. That also fix the problem regarding not being able to Edit your group after buying it, where I did need to reload your emulator to take acess to this function.
Download AKllX's Swift Emulator Revision 2: https://mega.co.nz/#!1ck0haRB!XdAeYy...vdSDoLXBMCubyE
To be fixed yet:
Serialize placing bots/pets at the room(client-side speaking they are the same);
Handle owner rights at public furni for ickall and room deleting. As It is now, all furni placed in a room by some user that doesn't own the room can be picked up by the room owner;
Handle some of these weird bugs that randomly(not really) happen. I'm interested in any bugs you may find. Just post it here.
Catalog fix tool. This should fix 99.9% of your catalog problems.
Code:
<?php
$db_host = "localhost"; // MySQL Host
$db_user = "root"; // MySQL User
$db_pass = "akllxistheebest"; // MySQL Passwort
$db_database = "adma1"; // MySQL Datenbank
$connect = mysql_connect($db_host, $db_user, $db_pass) or die("Konnte keine Verbindung zum MySQL-Server aufbauen, Fehler: ".mysql_error());
$db = mysql_select_db($db_database, $connect) or die("Konnte keine Verbindung mit der MySQL-Datenbank aufbauen, Fehler: ".mysql_error());
$data = file_get_contents("http://localhost/swfs/furnidata.txt");
$data = str_replace("\n", "", $data);
$data = str_replace("[[", "[", $data);
$data = str_replace("]]", "]", $data);
$data = str_replace("][", "],[", $data);
foreach (explode('],[', $data) as $val)
{
$val = str_replace('[', '', $val);
$val = str_replace(']', '', $val);
$bits = explode(',', $val);
$name = str_replace('"', '', $bits[2]);
$stufftoupdate[] = '[' . $val . ']';
}
foreach ($stufftoupdate as $stuff)
{
#Start main stuff
$stuff = str_replace('"s",', '', $stuff);
$stuff = str_replace('"i",', '', $stuff);
$furni = explode('[', $stuff);
$furni = explode(']', $furni[1]);
#End main stuff
#Start select item_name
$nome = explode('","', $furni[0]);
$nome = explode('","', $nome[1]);
$nome = $nome[0];
#End select item_name
#Start select sprite_id
$id = explode('"', $furni[0]);
$id = explode('","', $id[1]);
$id = $id[0];
#End select sprite_id
#Start select width
$width = explode('","', $furni[0]);
$width = explode('","', $width[4]);
$width = $width[0];
#End select width
#Start select length
$length = explode('","', $furni[0]);
$length = explode('","', $length[5]);
$length = $length[0];
#End select length
#Start select name
$name = explode('","', $furni[0]);
$name = explode('","', $name[7]);
$name = $name[0];
#End select name
$idfurni = mysql_query("SELECT * FROM items_base WHERE item_name = '$nome'");
$furni = mysql_fetch_array($idfurni);
$furniid = $furni['item_id'];
$update = mysql_query("UPDATE items_base SET sprite_id='$id', public_name='$name', width='$width', length='$length' WHERE item_id='$furniid' LIMIT 1");
if ($update==FALSE) echo("MySQL error in item ".$nome."<br/><br/>");
else echo("Item ".$nome." updated<br/><br/>");
}
?>
//Removed single update references. Text went too damn long.
Attachments
Last edited: