· 8 years ago · Aug 19, 2018, 06:46 PM
1Ok so first of all i would like to credit a user named hydranoid where he explained how to fix the database by yourself.
2
3What we are going to need are realms reso source, fabiano source which you can find if you search on the google, VS 2013 or newer for obvious reasons, rabcdasm and rabcdasm easy which you can find on the mpgh (needed to decompress the client.swf so you can open it with yogda), yogda, and the programs needed to set up like any other source (heidisql etc.)
4
5Once you have these programs, you will have to open both realms resolution source folder and fabiano source folder. Now i want you to delete the Packages folder in the realms resolution forlder and move Rotmg.Common.dll from fabiano to realms reso. Then you will need to go to server/php on both realms reso and fabiano sources and move ALL of the files from the fabiano source to the realms reso source. You can close the fabiano source now since we won't need it anymore. Go to your desktop and create a text document and name it rotmgprod.sql so it becomes a .sql file. right click it and click edit. Now paste this code again all credit goes to hydranoid:
6
7
8-- phpMyAdmin SQL Dump
9-- version 4.0.2
10-- https://www.phpmyadmin.net
11--
12-- Host: localhost
13-- Erstellungszeit: 10. Mai 2015 um 10:43
14-- Server Version: 5.5.16
15-- PHP-Version: 5.3.8
16
17SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
18SET time_zone = "+00:00";
19
20
21/*!40101 SET @old_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
22/*!40101 SET @old_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
23/*!40101 SET @old_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
24/*!40101 SET NAMES utf8 */;
25
26CREATE DATABASE IF NOT EXISTS `rotmgprod` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
27USE `rotmgprod`;
28
29--
30-- Datenbank: `rotmgprod`
31--
32CREATE DATABASE IF NOT EXISTS `rotmgprod` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
33USE `rotmgprod`;
34
35-- --------------------------------------------------------
36
37--
38-- Tabellenstruktur für Tabelle `accounts`
39--
40
41CREATE TABLE IF NOT EXISTS `accounts` (
42`id` bigint(255) NOT NULL AUTO_INCREMENT,
43`uuid` varchar(128) NOT NULL,
44`password` varchar(256) NOT NULL,
45`name` varchar(64) NOT NULL DEFAULT 'DEFAULT',
46`rank` int(1) NOT NULL DEFAULT '0',
47`namechosen` tinyint(1) NOT NULL DEFAULT '0',
48`verified` tinyint(1) NOT NULL DEFAULT '1',
49`guild` int(11) NOT NULL,
50`guildRank` int(11) NOT NULL,
51`guildFame` int(11) NOT NULL DEFAULT '0',
52`lastip` varchar(128) NOT NULL DEFAULT '',
53`vaultCount` int(11) NOT NULL DEFAULT '1',
54`maxCharSlot` int(11) NOT NULL DEFAULT '2',
55`regTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
56`guest` tinyint(1) NOT NULL DEFAULT '0',
57`banned` tinyint(1) NOT NULL DEFAULT '0',
58`publicMuledump` int(1) NOT NULL DEFAULT '1',
59`muted` tinyint(1) NOT NULL,
60`prodAcc` tinyint(1) NOT NULL DEFAULT '0',
61`locked` varchar(512) NOT NULL,
62`ignored` varchar(512) NOT NULL,
63`gifts` varchar(10000) NOT NULL DEFAULT '',
64`isAgeVerified` tinyint(1) NOT NULL DEFAULT '0',
65`petYardType` int(11) NOT NULL DEFAULT '1',
66`ownedSkins` varchar(2048) NOT NULL,
67`authToken` varchar(128) NOT NULL DEFAULT '',
68`acceptedNewTos` tinyint(1) NOT NULL DEFAULT '1',
69`lastSeen` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
70`accountInUse` tinyint(1) NOT NULL,
71`enchantmentLevel` int(1) NOT NULL DEFAULT '1',
72PRIMARY KEY (`id`,`uuid`,`guild`,`lastip`,`banned`)
73) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
74
75-- --------------------------------------------------------
76
77--
78-- Tabellenstruktur für Tabelle `arenalb`
79--
80
81CREATE TABLE IF NOT EXISTS `arenalb` (
82`id` int(11) NOT NULL AUTO_INCREMENT,
83`wave` int(11) NOT NULL,
84`accid` int(11) NOT NULL,
85`charid` int(11) NOT NULL,
86`petid` int(11) DEFAULT NULL,
87`time` varchar(256) NOT NULL,
88`date` datetime NOT NULL,
89PRIMARY KEY (`id`,`wave`)
90) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
91
92-- --------------------------------------------------------
93
94--
95-- Tabellenstruktur für Tabelle `backpacks`
96--
97
98CREATE TABLE IF NOT EXISTS `backpacks` (
99`accId` int(11) NOT NULL,
100`charId` int(11) NOT NULL,
101`items` varchar(128) NOT NULL DEFAULT '-1, -1, -1, -1, -1, -1, -1, -1',
102PRIMARY KEY (`accId`,`charId`)
103) ENGINE=MyISAM DEFAULT CHARSET=utf8;
104
105-- --------------------------------------------------------
106
107--
108-- Tabellenstruktur für Tabelle `boards`
109--
110
111CREATE TABLE IF NOT EXISTS `boards` (
112`guildId` int(11) NOT NULL,
113`text` varchar(1024) NOT NULL,
114PRIMARY KEY (`guildId`)
115) ENGINE=MyISAM DEFAULT CHARSET=utf8;
116
117-- --------------------------------------------------------
118
119--
120-- Tabellenstruktur für Tabelle `characters`
121--
122
123CREATE TABLE IF NOT EXISTS `characters` (
124`id` int(11) NOT NULL AUTO_INCREMENT,
125`accId` int(11) NOT NULL,
126`charId` int(11) NOT NULL,
127`charType` int(11) NOT NULL DEFAULT '782',
128`level` int(11) NOT NULL DEFAULT '1',
129`exp` int(11) NOT NULL DEFAULT '0',
130`fame` int(11) NOT NULL DEFAULT '0',
131`items` varchar(128) NOT NULL DEFAULT '-1, -1, -1, -1',
132`hpPotions` int(11) NOT NULL DEFAULT '0',
133`mpPotions` int(11) NOT NULL DEFAULT '0',
134`hp` int(11) NOT NULL DEFAULT '1',
135`mp` int(11) NOT NULL DEFAULT '1',
136`stats` varchar(128) NOT NULL DEFAULT '1, 1, 1, 1, 1, 1, 1, 1',
137`dead` tinyint(1) NOT NULL DEFAULT '0',
138`tex1` int(11) NOT NULL DEFAULT '0',
139`tex2` int(11) NOT NULL DEFAULT '0',
140`pet` int(11) NOT NULL DEFAULT '-1',
141`petId` int(11) NOT NULL DEFAULT '-1',
142`hasBackpack` int(11) NOT NULL DEFAULT '0',
143`skin` int(11) NOT NULL DEFAULT '0',
144`xpBoosterTime` int(11) NOT NULL DEFAULT '0',
145`ldTimer` int(11) NOT NULL DEFAULT '0',
146`ltTimer` int(11) NOT NULL DEFAULT '0',
147`fameStats` varchar(512) NOT NULL,
148`createTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
149`deathTime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
150`totalFame` int(11) NOT NULL DEFAULT '0',
151`lastSeen` datetime NOT NULL,
152`lastLocation` varchar(128) NOT NULL,
153PRIMARY KEY (`id`,`accId`,`dead`)
154) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
155
156-- --------------------------------------------------------
157
158--
159-- Tabellenstruktur für Tabelle `classstats`
160--
161
162CREATE TABLE IF NOT EXISTS `classstats` (
163`accId` int(11) NOT NULL,
164`objType` int(11) NOT NULL,
165`bestLv` int(11) NOT NULL DEFAULT '1',
166`bestFame` int(11) NOT NULL DEFAULT '0',
167PRIMARY KEY (`accId`,`objType`)
168) ENGINE=MyISAM DEFAULT CHARSET=utf8;
169
170-- --------------------------------------------------------
171
172--
173-- Tabellenstruktur für Tabelle `dailyquests`
174--
175
176CREATE TABLE IF NOT EXISTS `dailyquests` (
177`accId` int(11) NOT NULL,
178`goals` varchar(512) NOT NULL,
179`tier` int(11) NOT NULL DEFAULT '1',
180`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
181PRIMARY KEY (`accId`)
182) ENGINE=InnoDB DEFAULT CHARSET=latin1;
183
184-- --------------------------------------------------------
185
186--
187-- Tabellenstruktur für Tabelle `death`
188--
189
190CREATE TABLE IF NOT EXISTS `death` (
191`accId` int(11) NOT NULL,
192`chrId` int(11) NOT NULL,
193`name` varchar(64) NOT NULL DEFAULT 'DEFAULT',
194`charType` int(11) NOT NULL DEFAULT '782',
195`tex1` int(11) NOT NULL DEFAULT '0',
196`tex2` int(11) NOT NULL DEFAULT '0',
197`skin` int(11) NOT NULL DEFAULT '0',
198`items` varchar(128) NOT NULL DEFAULT '-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1',
199`fame` int(11) NOT NULL DEFAULT '0',
200`exp` int(11) NOT NULL,
201`fameStats` varchar(256) NOT NULL,
202`totalFame` int(11) NOT NULL DEFAULT '0',
203`firstBorn` tinyint(1) NOT NULL,
204`killer` varchar(128) NOT NULL,
205`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
206PRIMARY KEY (`accId`,`chrId`,`time`)
207) ENGINE=MyISAM DEFAULT CHARSET=utf8;
208
209-- --------------------------------------------------------
210
211--
212-- Tabellenstruktur für Tabelle `giftcodes`
213--
214
215CREATE TABLE IF NOT EXISTS `giftcodes` (
216`code` varchar(128) NOT NULL,
217`content` varchar(512) NOT NULL
218) ENGINE=InnoDB DEFAULT CHARSET=latin1;
219
220-- --------------------------------------------------------
221
222--
223-- Tabellenstruktur für Tabelle `globalnews`
224--
225
226CREATE TABLE IF NOT EXISTS `globalnews` (
227`slot` int(11) NOT NULL,
228`linkType` int(11) NOT NULL,
229`title` varchar(65) NOT NULL,
230`image` text NOT NULL,
231`priority` int(11) NOT NULL,
232`linkDetail` text NOT NULL,
233`platform` varchar(128) NOT NULL DEFAULT 'kabam.com,kongregate,steam,rotmg',
234`startTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
235`endTime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
236PRIMARY KEY (`slot`)
237) ENGINE=InnoDB DEFAULT CHARSET=latin1;
238
239-- --------------------------------------------------------
240
241--
242-- Tabellenstruktur für Tabelle `guilds`
243--
244
245CREATE TABLE IF NOT EXISTS `guilds` (
246`id` int(11) NOT NULL AUTO_INCREMENT,
247`name` varchar(128) NOT NULL DEFAULT 'DEFAULT_GUILD',
248`members` varchar(128) NOT NULL,
249`guildFame` int(11) NOT NULL,
250`totalGuildFame` int(11) NOT NULL,
251`level` int(11) NOT NULL DEFAULT '1',
252PRIMARY KEY (`id`,`members`)
253) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
254
255-- --------------------------------------------------------
256
257--
258-- Tabellenstruktur für Tabelle `mysteryboxes`
259--
260
261CREATE TABLE IF NOT EXISTS `mysteryboxes` (
262`id` int(11) NOT NULL,
263`title` varchar(128) NOT NULL,
264`weight` int(11) NOT NULL,
265`description` varchar(128) NOT NULL,
266`contents` text NOT NULL,
267`priceAmount` int(11) NOT NULL,
268`priceCurrency` int(11) NOT NULL,
269`image` text NOT NULL,
270`icon` text NOT NULL,
271`salePrice` int(11) NOT NULL,
272`saleCurrency` int(11) NOT NULL,
273`saleEnd` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
274`startTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
275`boxEnd` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
276PRIMARY KEY (`id`)
277) ENGINE=InnoDB DEFAULT CHARSET=latin1;
278
279-- --------------------------------------------------------
280
281--
282-- Tabellenstruktur für Tabelle `news`
283--
284
285CREATE TABLE IF NOT EXISTS `news` (
286`id` int(11) NOT NULL AUTO_INCREMENT,
287`icon` varchar(16) NOT NULL DEFAULT 'info',
288`title` varchar(128) NOT NULL DEFAULT 'Default news title',
289`text` varchar(128) NOT NULL DEFAULT 'Default news text',
290`link` varchar(256) NOT NULL DEFAULT 'https://mmoe.net/',
291`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
292PRIMARY KEY (`id`,`text`)
293) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
294
295-- --------------------------------------------------------
296
297--
298-- Tabellenstruktur für Tabelle `packages`
299--
300
301CREATE TABLE IF NOT EXISTS `packages` (
302`id` int(11) NOT NULL AUTO_INCREMENT,
303`name` varchar(128) NOT NULL,
304`maxPurchase` int(11) NOT NULL DEFAULT '-1',
305`weight` int(11) NOT NULL DEFAULT '0',
306`contents` text NOT NULL,
307`bgUrl` varchar(512) NOT NULL,
308`price` int(11) NOT NULL,
309`quantity` int(11) NOT NULL DEFAULT '-1',
310`endDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
311PRIMARY KEY (`id`)
312) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
313
314-- --------------------------------------------------------
315
316--
317-- Tabellenstruktur für Tabelle `pets`
318--
319
320CREATE TABLE IF NOT EXISTS `pets` (
321`accId` int(11) NOT NULL,
322`petId` int(11) NOT NULL AUTO_INCREMENT,
323`objType` smallint(5) NOT NULL,
324`skinName` varchar(128) NOT NULL,
325`skin` int(11) NOT NULL,
326`family` int(11) NOT NULL,
327`rarity` int(11) NOT NULL,
328`maxLevel` int(11) NOT NULL DEFAULT '30',
329`abilities` varchar(128) NOT NULL,
330`levels` varchar(128) NOT NULL,
331`xp` varchar(128) NOT NULL DEFAULT '0, 0, 0',
332PRIMARY KEY (`accId`,`petId`)
333) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
334
335-- --------------------------------------------------------
336
337--
338-- Tabellenstruktur für Tabelle `stats`
339--
340
341CREATE TABLE IF NOT EXISTS `stats` (
342`accId` int(11) NOT NULL,
343`fame` int(11) NOT NULL,
344`totalFame` int(11) NOT NULL,
345`credits` int(11) NOT NULL,
346`totalCredits` int(11) NOT NULL,
347`fortuneTokens` int(11) NOT NULL,
348`totalFortuneTokens` int(11) NOT NULL,
349`onraneCurrency` int(11) NOT NULL,
350`totalOnrane` int(11) NOT NULL,
351PRIMARY KEY (`accId`,`fame`,`totalFame`)
352) ENGINE=MyISAM DEFAULT CHARSET=utf8;
353
354-- --------------------------------------------------------
355
356--
357-- Tabellenstruktur für Tabelle `thealchemist`
358--
359
360CREATE TABLE IF NOT EXISTS `thealchemist` (
361`id` int(11) NOT NULL,
362`title` varchar(512) NOT NULL,
363`description` varchar(512) DEFAULT NULL,
364`image` varchar(512) NOT NULL,
365`icon` varchar(512) NOT NULL,
366`contents` text NOT NULL,
367`priceFirstInGold` int(11) NOT NULL DEFAULT '51',
368`priceFirstInToken` int(11) NOT NULL DEFAULT '1',
369`priceSecondInGold` int(11) NOT NULL DEFAULT '75',
370`startTime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
371`endTime` datetime NOT NULL,
372PRIMARY KEY (`id`)
373) ENGINE=InnoDB DEFAULT CHARSET=latin1;
374
375-- --------------------------------------------------------
376
377--
378-- Tabellenstruktur für Tabelle `unlockedclasses`
379--
380
381CREATE TABLE IF NOT EXISTS `unlockedclasses` (
382`id` int(11) NOT NULL AUTO_INCREMENT,
383`accId` int(11) NOT NULL,
384`class` varchar(128) NOT NULL,
385`available` varchar(128) NOT NULL,
386PRIMARY KEY (`id`)
387) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
388
389-- --------------------------------------------------------
390
391--
392-- Tabellenstruktur für Tabelle `vaults`
393--
394
395CREATE TABLE IF NOT EXISTS `vaults` (
396`accId` int(11) NOT NULL,
397`chestId` int(11) NOT NULL AUTO_INCREMENT,
398`items` varchar(128) NOT NULL,
399PRIMARY KEY (`accId`,`chestId`)
400) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
401
402/*!40101 SET CHARACTER_SET_CLIENT @old_CHARACTER_SET_CLIENT */;
403/*!40101 SET CHARACTER_SET_RESULTS @old_CHARACTER_SET_RESULTS */;
404/*!40101 SET COLLATION_CONNECTION @old_COLLATION_CONNECTION */;
405
406
407Once you do that, save. Now go to your realms resolution source and go to the folder named 'db'. Oncethere replace the rotmgprod.sql with the one you just created.
408
409Now, we fixed the db and time to open your server.sln in the main folder. If you get any errors dont worry. Once there right click where it says Solution server (6 projects) and click restore NuGet packages. While you are at it you might want to edit your server files to your hamachi ip or whatever you are using. Once you are done, rebuild.
410
411Ok so now we have fixed everything but you might notice that if you want to edit your client.swf with yogda, it will come up with an error. To fix that we will need to use the program called rabcdasm combined with rabcdasm easy. NOTE: both rabcdasm and rabcdasm easy have to be in the same folder. Once you have those programs you want to move your client.swf to where rabcdasm and rabcdasm easy are located. After that, open your rabcdasm easy program. in the client name type client or whatever your swf file is named that you just moved and click make execution files if you havent done that yet. After that press the button decompress.
412
413After its done you can close the rabcdasm easy program and you might not notice any differences but your client.swf file will be fixed now. move your client.swf back to your realms resolution folder. Now you want to open up your Yogda and open the swf file with Yogda. Now find '104.168.142.240' and replace this adress with whatever you will be using to run the server for example your hamachi ipv4 adress. After that click on save and i think thats it unless i missed something. I wont tell you how to set up the server since its like with any other source i just told you how to fix the source.
414
415NOTE: i only combined everything that i found i barely found out how to fix the source myself so i might not know how to fix errors if you get any i just shared my way of fixing the source with the help of other people.
416
417EDIT: Important thing i missed: delete whats written after dbauth in server.cfg and wserver.cfg or else your server.exe will come up with an error