-
Notifications
You must be signed in to change notification settings - Fork 1
/
db.sql
1621 lines (1192 loc) · 220 KB
/
db.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
SQLyog Community v10.5 Beta1
MySQL - 5.5.28 : Database - demogame
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`demogame` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `demogame`;
/*Table structure for table `account` */
DROP TABLE IF EXISTS `account`;
CREATE TABLE `account` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'The unique ID of the account.',
`name` varchar(30) NOT NULL COMMENT 'The account name.',
`password` char(32) NOT NULL COMMENT 'The account password (MD5 hashed).',
`email` varchar(60) NOT NULL COMMENT 'The email address.',
`permissions` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'The permission level bit mask (see UserPermissions enum).',
`time_created` datetime NOT NULL COMMENT 'When the account was created.',
`time_last_login` datetime NOT NULL COMMENT 'When the account was last logged in to.',
`creator_ip` int(10) unsigned NOT NULL COMMENT 'The IP address that created the account.',
`current_ip` int(10) unsigned DEFAULT NULL COMMENT 'IP address currently logged in to the account, or null if nobody is logged in.',
`friends` varchar(800) NOT NULL DEFAULT '' COMMENT 'A list of friends that the user has.',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COMMENT='The user accounts. Multiple chars can exist per account.';
/*Data for the table `account` */
insert into `account`(`id`,`name`,`password`,`email`,`permissions`,`time_created`,`time_last_login`,`creator_ip`,`current_ip`) values (1,'Spodi','3fc0a7acf087f549ac2b266baf94b8b1','spodi@netgore.com',255,'2009-09-07 15:43:16','2013-02-10 15:54:45',16777343,16777343);
/*Table structure for table `account_ban` */
DROP TABLE IF EXISTS `account_ban`;
CREATE TABLE `account_ban` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'The unique ID.',
`account_id` int(11) NOT NULL COMMENT 'The account that this ban is for.',
`start_time` datetime NOT NULL COMMENT 'When this ban started.',
`end_time` datetime NOT NULL COMMENT 'When this ban ends.',
`reason` varchar(255) NOT NULL COMMENT 'The reason why this account was banned.',
`issued_by` varchar(255) DEFAULT NULL COMMENT 'Name of the person or system that issued this ban (not strongly typed at all).',
`expired` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'If the ban is expired. A non-zero value means true.',
PRIMARY KEY (`id`),
KEY `account_id` (`account_id`),
KEY `expired` (`expired`),
CONSTRAINT `account_ban_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='The bans (active and inactive) placed on accounts.';
/*Data for the table `account_ban` */
/*Table structure for table `account_character` */
DROP TABLE IF EXISTS `account_character`;
CREATE TABLE `account_character` (
`character_id` int(11) NOT NULL COMMENT 'The character in the account.',
`account_id` int(11) NOT NULL COMMENT 'The account the character is on.',
`time_deleted` datetime DEFAULT NULL COMMENT 'When the character was removed from the account (NULL if not removed).',
PRIMARY KEY (`character_id`),
KEY `account_id` (`account_id`),
CONSTRAINT `account_character_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `account_character_ibfk_2` FOREIGN KEY (`character_id`) REFERENCES `character` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Links account to many characters. Retains deleted linkages.';
/*Data for the table `account_character` */
insert into `account_character`(`character_id`,`account_id`,`time_deleted`) values (1,1,NULL),(6,3,NULL);
/*Table structure for table `account_ips` */
DROP TABLE IF EXISTS `account_ips`;
CREATE TABLE `account_ips` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The unique row ID.',
`account_id` int(11) NOT NULL COMMENT 'The ID of the account.',
`ip` int(10) unsigned NOT NULL COMMENT 'The IP that logged into the account.',
`time` datetime NOT NULL COMMENT 'When this IP last logged into this account.',
PRIMARY KEY (`id`),
KEY `account_id` (`account_id`),
CONSTRAINT `account_ips_ibfk_1` FOREIGN KEY (`account_id`) REFERENCES `account` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=265 DEFAULT CHARSET=latin1 COMMENT='The IPs used to access accounts.';
/*Data for the table `account_ips` */
insert into `account_ips`(`id`,`account_id`,`ip`,`time`) values (2,1,16777343,'2013-02-04 17:51:11'),(3,1,16777343,'2013-02-04 18:40:11'),(4,1,16777343,'2013-02-04 18:44:04'),(5,1,16777343,'2013-02-04 18:53:39'),(6,3,16777343,'2013-02-04 18:54:54'),(7,3,16777343,'2013-02-04 18:56:44'),(8,1,16777343,'2013-02-04 18:58:18'),(9,1,16777343,'2013-02-04 19:00:04'),(10,1,16777343,'2013-02-04 19:02:34'),(11,1,16777343,'2013-02-04 19:04:45'),(12,1,16777343,'2013-02-04 19:09:20'),(13,3,16777343,'2013-02-04 19:09:24'),(14,3,16777343,'2013-02-04 19:09:56'),(15,3,16777343,'2013-02-04 19:10:06'),(16,1,16777343,'2013-02-04 19:10:27'),(17,1,16777343,'2013-02-04 19:27:25'),(18,1,16777343,'2013-02-04 19:30:15'),(19,1,16777343,'2013-02-04 20:07:22'),(20,1,16777343,'2013-02-04 20:09:33'),(21,1,16777343,'2013-02-04 20:17:30'),(22,1,16777343,'2013-02-04 20:20:24'),(23,1,16777343,'2013-02-04 20:21:32'),(24,1,16777343,'2013-02-04 20:22:53'),(25,1,16777343,'2013-02-04 20:25:07'),(26,1,16777343,'2013-02-04 20:27:19'),(27,1,16777343,'2013-02-04 20:28:56'),(28,1,16777343,'2013-02-04 20:31:00'),(29,1,16777343,'2013-02-04 20:34:08'),(30,1,16777343,'2013-02-04 20:35:09'),(31,1,16777343,'2013-02-04 20:46:02'),(32,1,16777343,'2013-02-04 20:47:15'),(33,1,16777343,'2013-02-04 20:52:52'),(34,1,16777343,'2013-02-04 20:53:14'),(35,1,16777343,'2013-02-04 20:54:35'),(36,1,16777343,'2013-02-04 21:13:11'),(37,1,16777343,'2013-02-04 21:16:10'),(38,1,16777343,'2013-02-04 21:22:13'),(39,1,16777343,'2013-02-04 21:29:09'),(40,1,16777343,'2013-02-04 22:12:28'),(41,3,16777343,'2013-02-04 22:12:55'),(42,1,16777343,'2013-02-04 22:14:55'),(43,3,16777343,'2013-02-04 22:15:17'),(44,1,16777343,'2013-02-04 22:27:07'),(45,1,16777343,'2013-02-04 22:28:05'),(46,1,16777343,'2013-02-04 22:28:46'),(47,1,16777343,'2013-02-04 22:29:48'),(48,1,16777343,'2013-02-04 22:30:56'),(49,1,16777343,'2013-02-04 22:32:26'),(50,1,16777343,'2013-02-04 22:33:12'),(51,1,16777343,'2013-02-04 22:33:36'),(52,1,16777343,'2013-02-04 22:34:08'),(53,1,16777343,'2013-02-04 22:36:47'),(54,1,16777343,'2013-02-04 22:37:49'),(55,1,16777343,'2013-02-04 22:39:10'),(56,1,16777343,'2013-02-04 22:39:41'),(57,1,16777343,'2013-02-04 22:42:48'),(58,1,16777343,'2013-02-04 22:45:24'),(59,1,16777343,'2013-02-04 22:49:32'),(60,1,16777343,'2013-02-04 22:50:12'),(61,1,16777343,'2013-02-04 23:11:00'),(62,1,16777343,'2013-02-04 23:23:43'),(63,1,16777343,'2013-02-04 23:31:07'),(64,1,16777343,'2013-02-04 23:46:08'),(65,1,16777343,'2013-02-05 01:17:09'),(66,1,16777343,'2013-02-05 01:59:14'),(67,3,16777343,'2013-02-05 01:59:35'),(68,1,16777343,'2013-02-05 23:08:42'),(69,1,16777343,'2013-02-05 23:11:21'),(70,1,16777343,'2013-02-05 23:21:36'),(71,1,16777343,'2013-02-05 23:25:56'),(72,1,16777343,'2013-02-05 23:28:16'),(73,1,16777343,'2013-02-05 23:28:58'),(74,1,16777343,'2013-02-05 23:33:46'),(75,1,16777343,'2013-02-05 23:40:58'),(76,1,16777343,'2013-02-05 23:43:08'),(77,1,16777343,'2013-02-06 00:08:12'),(78,1,16777343,'2013-02-06 00:09:31'),(79,1,16777343,'2013-02-06 00:09:43'),(80,1,16777343,'2013-02-06 00:10:08'),(81,1,16777343,'2013-02-06 00:22:59'),(82,3,16777343,'2013-02-06 00:28:06'),(83,1,16777343,'2013-02-06 00:28:11'),(84,1,16777343,'2013-02-06 00:30:29'),(85,3,16777343,'2013-02-06 00:30:34'),(86,1,16777343,'2013-02-06 00:31:53'),(87,3,16777343,'2013-02-06 00:32:23'),(88,3,16777343,'2013-02-06 00:32:44'),(89,1,16777343,'2013-02-06 00:47:10'),(90,1,16777343,'2013-02-06 01:13:24'),(91,1,16777343,'2013-02-06 01:23:57'),(92,1,16777343,'2013-02-06 01:25:24'),(93,1,16777343,'2013-02-06 16:07:17'),(94,1,16777343,'2013-02-07 00:07:30'),(95,1,16777343,'2013-02-07 00:11:57'),(96,1,16777343,'2013-02-07 00:14:38'),(97,1,16777343,'2013-02-07 00:27:49'),(98,1,16777343,'2013-02-07 00:29:25'),(99,1,16777343,'2013-02-07 00:35:36'),(100,1,16777343,'2013-02-08 00:04:47'),(101,1,16777343,'2013-02-08 00:07:57'),(102,1,16777343,'2013-02-08 00:12:46'),(103,1,16777343,'2013-02-08 00:18:05'),(104,1,16777343,'2013-02-08 00:20:47'),(105,1,16777343,'2013-02-08 00:25:03'),(106,1,16777343,'2013-02-08 00:26:43'),(107,1,16777343,'2013-02-08 00:27:56'),(108,1,16777343,'2013-02-08 00:29:18'),(109,1,16777343,'2013-02-08 00:30:23'),(110,1,16777343,'2013-02-08 00:32:10'),(111,1,16777343,'2013-02-08 00:56:16'),(112,1,16777343,'2013-02-08 01:01:34'),(113,1,16777343,'2013-02-08 10:28:33'),(114,1,16777343,'2013-02-08 10:33:49'),(115,1,16777343,'2013-02-08 10:34:40'),(116,1,16777343,'2013-02-08 10:35:34'),(117,1,16777343,'2013-02-09 14:58:55'),(118,1,16777343,'2013-02-09 15:00:20'),(119,1,16777343,'2013-02-09 15:06:40'),(120,1,16777343,'2013-02-09 15:09:23'),(121,1,16777343,'2013-02-09 15:17:52'),(122,1,16777343,'2013-02-09 15:20:42'),(123,1,16777343,'2013-02-09 15:28:45'),(124,1,16777343,'2013-02-09 15:36:00'),(125,1,16777343,'2013-02-09 15:55:07'),(126,1,16777343,'2013-02-09 16:03:40'),(127,1,16777343,'2013-02-09 16:04:12'),(128,1,16777343,'2013-02-09 16:06:02'),(129,1,16777343,'2013-02-09 16:10:26'),(130,1,16777343,'2013-02-09 16:25:40'),(131,1,16777343,'2013-02-09 16:36:27'),(132,1,16777343,'2013-02-09 16:43:07'),(133,1,16777343,'2013-02-09 19:19:59'),(134,1,16777343,'2013-02-09 19:22:19'),(135,1,16777343,'2013-02-09 19:24:03'),(136,1,16777343,'2013-02-09 19:26:18'),(137,1,16777343,'2013-02-09 19:27:46'),(138,1,16777343,'2013-02-09 19:30:11'),(139,1,16777343,'2013-02-09 19:54:27'),(140,1,16777343,'2013-02-09 19:54:30'),(141,1,16777343,'2013-02-09 20:04:21'),(142,1,16777343,'2013-02-09 20:05:17'),(143,1,16777343,'2013-02-09 20:06:18'),(144,1,16777343,'2013-02-09 20:08:55'),(145,1,16777343,'2013-02-09 20:20:20'),(146,1,16777343,'2013-02-09 20:24:02'),(147,1,16777343,'2013-02-09 20:32:08'),(148,1,16777343,'2013-02-09 20:32:40'),(149,1,16777343,'2013-02-09 20:51:27'),(150,1,16777343,'2013-02-09 20:54:11'),(151,1,16777343,'2013-02-09 20:58:09'),(152,1,16777343,'2013-02-09 21:14:16'),(153,1,16777343,'2013-02-09 21:14:57'),(154,1,16777343,'2013-02-09 21:15:28'),(155,1,16777343,'2013-02-09 21:15:59'),(156,1,16777343,'2013-02-09 21:17:29'),(157,3,16777343,'2013-02-09 21:17:53'),(158,3,16777343,'2013-02-09 21:21:26'),(159,1,16777343,'2013-02-09 21:21:51'),(160,1,16777343,'2013-02-09 21:25:15'),(161,1,16777343,'2013-02-09 21:26:47'),(162,1,16777343,'2013-02-09 21:30:32'),(163,1,16777343,'2013-02-09 21:30:42'),(164,1,16777343,'2013-02-09 21:32:15'),(165,1,16777343,'2013-02-09 21:40:01'),(166,1,16777343,'2013-02-09 21:42:56'),(167,1,16777343,'2013-02-09 21:52:06'),(168,1,16777343,'2013-02-09 21:52:57'),(169,1,16777343,'2013-02-09 21:53:43'),(170,1,16777343,'2013-02-09 21:57:10'),(171,1,16777343,'2013-02-09 21:58:32'),(172,1,16777343,'2013-02-09 22:03:36'),(173,1,16777343,'2013-02-09 22:11:37'),(174,1,16777343,'2013-02-09 22:13:05'),(175,1,16777343,'2013-02-09 22:15:42'),(176,1,16777343,'2013-02-09 22:17:27'),(177,1,16777343,'2013-02-09 22:21:57'),(178,1,16777343,'2013-02-09 22:24:48'),(179,1,16777343,'2013-02-09 22:28:03'),(180,1,16777343,'2013-02-09 22:32:00'),(181,1,16777343,'2013-02-09 22:32:31'),(182,1,16777343,'2013-02-09 22:33:53'),(183,1,16777343,'2013-02-09 22:34:24'),(184,1,16777343,'2013-02-09 22:34:41'),(185,1,16777343,'2013-02-09 22:35:14'),(186,1,16777343,'2013-02-09 22:37:17'),(187,1,16777343,'2013-02-09 22:37:56'),(188,1,16777343,'2013-02-09 22:38:50'),(189,1,16777343,'2013-02-09 22:40:04'),(190,1,16777343,'2013-02-09 22:41:47'),(191,1,16777343,'2013-02-09 22:43:11'),(192,1,16777343,'2013-02-09 22:44:13'),(193,1,16777343,'2013-02-09 22:45:22'),(194,1,16777343,'2013-02-09 22:46:39'),(195,1,16777343,'2013-02-09 22:48:33'),(196,1,16777343,'2013-02-09 22:49:37'),(197,1,16777343,'2013-02-09 22:58:34'),(198,1,16777343,'2013-02-09 23:04:27'),(199,1,16777343,'2013-02-09 23:06:38'),(200,1,16777343,'2013-02-09 23:11:19'),(201,1,16777343,'2013-02-09 23:12:22'),(202,1,16777343,'2013-02-09 23:14:17'),(203,1,16777343,'2013-02-09 23:17:54'),(204,1,16777343,'2013-02-09 23:19:28'),(205,1,16777343,'2013-02-09 23:21:24'),(206,1,16777343,'2013-02-09 23:24:01'),(207,1,16777343,'2013-02-09 23:26:24'),(208,1,16777343,'2013-02-09 23:29:59'),(209,1,16777343,'2013-02-10 00:02:48'),(210,1,16777343,'2013-02-10 00:03:13'),(211,1,16777343,'2013-02-10 00:06:40'),(212,1,16777343,'2013-02-10 00:08:38'),(213,1,16777343,'2013-02-10 00:11:11'),(214,1,16777343,'2013-02-10 00:33:45'),(215,1,16777343,'2013-02-10 00:41:13'),(216,1,16777343,'2013-02-10 00:57:10'),(217,1,16777343,'2013-02-10 01:05:22'),(218,1,16777343,'2013-02-10 01:06:28'),(219,1,16777343,'2013-02-10 01:12:50'),(220,1,16777343,'2013-02-10 01:18:53'),(221,1,16777343,'2013-02-10 01:19:45'),(222,1,16777343,'2013-02-10 01:21:57'),(223,1,16777343,'2013-02-10 01:23:54'),(224,1,16777343,'2013-02-10 01:25:01'),(225,1,16777343,'2013-02-10 01:26:50'),(226,1,16777343,'2013-02-10 01:30:57'),(227,1,16777343,'2013-02-10 01:49:33'),(228,1,16777343,'2013-02-10 01:50:21'),(229,1,16777343,'2013-02-10 01:51:08'),(230,1,16777343,'2013-02-10 01:56:04'),(231,1,16777343,'2013-02-10 02:06:05'),(232,1,16777343,'2013-02-10 13:28:28'),(233,1,16777343,'2013-02-10 13:33:54'),(234,1,16777343,'2013-02-10 13:35:24'),(235,1,16777343,'2013-02-10 13:37:45'),(236,1,16777343,'2013-02-10 13:40:05'),(237,1,16777343,'2013-02-10 13:40:39'),(238,1,16777343,'2013-02-10 13:44:31'),(239,1,16777343,'2013-02-10 13:54:26'),(240,1,16777343,'2013-02-10 13:56:48'),(241,1,16777343,'2013-02-10 14:00:28'),(242,1,16777343,'2013-02-10 14:02:28'),(243,1,16777343,'2013-02-10 14:03:36'),(244,1,16777343,'2013-02-10 14:04:17'),(245,1,16777343,'2013-02-10 14:06:19'),(246,1,16777343,'2013-02-10 14:09:36'),(247,1,16777343,'2013-02-10 14:10:50'),(248,1,16777343,'2013-02-10 14:12:17'),(249,1,16777343,'2013-02-10 14:16:26'),(250,1,16777343,'2013-02-10 14:18:27'),(251,1,16777343,'2013-02-10 14:23:54'),(252,1,16777343,'2013-02-10 14:37:10'),(253,1,16777343,'2013-02-10 14:41:08'),(254,1,16777343,'2013-02-10 14:45:23'),(255,1,16777343,'2013-02-10 14:49:49'),(256,1,16777343,'2013-02-10 14:53:43'),(257,1,16777343,'2013-02-10 15:26:26'),(258,1,16777343,'2013-02-10 15:37:20'),(259,1,16777343,'2013-02-10 15:38:17'),(260,1,16777343,'2013-02-10 15:47:03'),(261,1,16777343,'2013-02-10 15:49:53'),(262,1,16777343,'2013-02-10 15:50:37'),(263,1,16777343,'2013-02-10 15:52:10'),(264,1,16777343,'2013-02-10 15:54:45');
/*Table structure for table `active_trade_cash` */
DROP TABLE IF EXISTS `active_trade_cash`;
CREATE TABLE `active_trade_cash` (
`character_id` int(11) NOT NULL COMMENT 'The character that put the cash on the trade table.',
`cash` int(11) NOT NULL COMMENT 'The amount of cash the character put down.',
PRIMARY KEY (`character_id`),
CONSTRAINT `active_trade_cash_ibfk_1` FOREIGN KEY (`character_id`) REFERENCES `character` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Cash that has been put down in an active trade.';
/*Data for the table `active_trade_cash` */
/*Table structure for table `active_trade_item` */
DROP TABLE IF EXISTS `active_trade_item`;
CREATE TABLE `active_trade_item` (
`item_id` int(11) NOT NULL COMMENT 'The ID of the item the character put down.',
`character_id` int(11) NOT NULL COMMENT 'The character that added the item.',
PRIMARY KEY (`item_id`),
KEY `character_id` (`character_id`),
CONSTRAINT `active_trade_item_ibfk_1` FOREIGN KEY (`character_id`) REFERENCES `character` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `active_trade_item_ibfk_2` FOREIGN KEY (`item_id`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Items that have been put down in an active trade.';
/*Data for the table `active_trade_item` */
/*Table structure for table `alliance` */
DROP TABLE IF EXISTS `alliance`;
CREATE TABLE `alliance` (
`id` tinyint(3) unsigned NOT NULL COMMENT 'The unique ID of the alliance.',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT 'The name of the alliance.',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='The different character alliances.';
/*Data for the table `alliance` */
insert into `alliance`(`id`,`name`) values (0,'user'),(1,'monster'),(2,'townsperson'),(3,'aggressive monster');
/*Table structure for table `alliance_attackable` */
DROP TABLE IF EXISTS `alliance_attackable`;
CREATE TABLE `alliance_attackable` (
`alliance_id` tinyint(3) unsigned NOT NULL COMMENT 'The alliance.',
`attackable_id` tinyint(3) unsigned NOT NULL COMMENT 'The alliance that this alliance (alliance_id) can attack.',
PRIMARY KEY (`alliance_id`,`attackable_id`),
KEY `attackable_id` (`attackable_id`),
KEY `alliance_id` (`alliance_id`),
CONSTRAINT `alliance_attackable_ibfk_3` FOREIGN KEY (`attackable_id`) REFERENCES `alliance` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `alliance_attackable_ibfk_4` FOREIGN KEY (`alliance_id`) REFERENCES `alliance` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='List of alliances that an alliance can attack.';
/*Data for the table `alliance_attackable` */
insert into `alliance_attackable`(`alliance_id`,`attackable_id`) values (1,0),(3,0),(0,1),(3,1),(0,3),(3,3);
/*Table structure for table `alliance_hostile` */
DROP TABLE IF EXISTS `alliance_hostile`;
CREATE TABLE `alliance_hostile` (
`alliance_id` tinyint(3) unsigned NOT NULL COMMENT 'The alliance that is hotile.',
`hostile_id` tinyint(3) unsigned NOT NULL COMMENT 'The alliance that this alliance (alliance_id) is hostile towards by default.',
PRIMARY KEY (`alliance_id`,`hostile_id`),
KEY `hostile_id` (`hostile_id`),
KEY `alliance_id` (`alliance_id`),
CONSTRAINT `alliance_hostile_ibfk_3` FOREIGN KEY (`hostile_id`) REFERENCES `alliance` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `alliance_hostile_ibfk_4` FOREIGN KEY (`alliance_id`) REFERENCES `alliance` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Alliances that an alliance is hostile towards by default.';
/*Data for the table `alliance_hostile` */
insert into `alliance_hostile`(`alliance_id`,`hostile_id`) values (1,0),(3,0),(0,1),(3,1),(0,3),(3,3);
/*Table structure for table `applied_patches` */
DROP TABLE IF EXISTS `applied_patches`;
CREATE TABLE `applied_patches` (
`file_name` varchar(255) NOT NULL,
`date_applied` datetime NOT NULL,
PRIMARY KEY (`file_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*Data for the table `applied_patches` */
/*Table structure for table `character` */
DROP TABLE IF EXISTS `character`;
CREATE TABLE `character` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'The unique ID of the character.',
`character_template_id` smallint(5) unsigned DEFAULT NULL COMMENT 'The template that this character was created from (not required - mostly for developer reference).',
`name` varchar(60) NOT NULL DEFAULT '' COMMENT 'The character''s name. Prefixed with `~<ID>_` when its a deleted user. The ~ denotes deleted, and the <ID> ensures a unique value.',
`shop_id` smallint(5) unsigned DEFAULT NULL COMMENT 'The shop that this character runs. Null if not a shopkeeper.',
`chat_dialog` smallint(5) unsigned DEFAULT NULL COMMENT 'The chat dialog that this character displays. Null for no chat. Intended for NPCs only.',
`ai_id` smallint(5) unsigned DEFAULT NULL COMMENT 'The AI used by this character. Null for no AI (does nothing, or is user-controller). Intended for NPCs only.',
`load_map_id` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'The map to load on (when logging in / being created).',
`load_x` smallint(5) unsigned NOT NULL DEFAULT '512' COMMENT 'The x coordinate to load at.',
`load_y` smallint(5) unsigned NOT NULL DEFAULT '512' COMMENT 'The y coordinate to load at.',
`respawn_map_id` smallint(5) unsigned DEFAULT '1' COMMENT 'The map to respawn on (when null, cannot respawn). Used to reposition character after death.',
`respawn_x` float NOT NULL DEFAULT '512' COMMENT 'The x coordinate to respawn at.',
`respawn_y` float NOT NULL DEFAULT '512' COMMENT 'The y coordinate to respawn at.',
`body_id` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'The body to use to display this character.',
`move_speed` smallint(5) unsigned NOT NULL DEFAULT '1800' COMMENT 'The movement speed of the character.',
`cash` int(11) NOT NULL DEFAULT '0' COMMENT 'Amount of cash.',
`level` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Current level.',
`exp` int(11) NOT NULL DEFAULT '0' COMMENT 'Experience points.',
`statpoints` int(11) NOT NULL DEFAULT '0' COMMENT 'Stat points available to be spent.',
`hp` smallint(6) NOT NULL DEFAULT '50' COMMENT 'Current health points.',
`mp` smallint(6) NOT NULL DEFAULT '50' COMMENT 'Current mana points.',
`stat_maxhp` smallint(6) NOT NULL DEFAULT '50' COMMENT 'MaxHP stat.',
`stat_maxmp` smallint(6) NOT NULL DEFAULT '50' COMMENT 'MaxMP stat.',
`stat_minhit` smallint(6) NOT NULL DEFAULT '1' COMMENT 'MinHit stat.',
`stat_maxhit` smallint(6) NOT NULL DEFAULT '1' COMMENT 'MaxHit stat.',
`stat_defence` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Defence stat.',
`stat_agi` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Agi stat.',
`stat_int` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Int stat.',
`stat_str` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Str stat.',
PRIMARY KEY (`id`),
UNIQUE KEY `idx_character_name` (`name`),
KEY `character_ibfk_2` (`load_map_id`),
KEY `shop_id` (`shop_id`),
KEY `character_ibfk_5` (`respawn_map_id`),
KEY `template_id` (`character_template_id`),
CONSTRAINT `character_ibfk_1` FOREIGN KEY (`character_template_id`) REFERENCES `character_template` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `character_ibfk_3` FOREIGN KEY (`shop_id`) REFERENCES `shop` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `character_ibfk_4` FOREIGN KEY (`load_map_id`) REFERENCES `map` (`id`) ON UPDATE CASCADE,
CONSTRAINT `character_ibfk_5` FOREIGN KEY (`respawn_map_id`) REFERENCES `map` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 COMMENT='Persisted (users, persistent NPCs) chars.';
/*Data for the table `character` */
insert into `character`(`id`,`character_template_id`,`name`,`shop_id`,`chat_dialog`,`ai_id`,`load_map_id`,`load_x`,`load_y`,`respawn_map_id`,`respawn_x`,`respawn_y`,`body_id`,`move_speed`,`cash`,`level`,`exp`,`statpoints`,`hp`,`mp`,`stat_maxhp`,`stat_maxmp`,`stat_minhit`,`stat_maxhit`,`stat_defence`,`stat_agi`,`stat_int`,`stat_str`) values (1,NULL,'Spodi',NULL,NULL,NULL,4,690,460,1,512,512,1,1800,515,34,1015,130,50,50,50,50,1,36,1,1,1,1),(6,NULL,'Helix',NULL,NULL,NULL,3,450,316,1,512,512,1,1800,20,1,20,0,50,50,50,50,1,1,1,1,1,1);
/*Table structure for table `character_equipped` */
DROP TABLE IF EXISTS `character_equipped`;
CREATE TABLE `character_equipped` (
`character_id` int(11) NOT NULL COMMENT 'The character who the equipped item is on.',
`item_id` int(11) NOT NULL COMMENT 'The item that is equipped by the character.',
`slot` tinyint(3) unsigned NOT NULL COMMENT 'The slot the equipped item is in.',
PRIMARY KEY (`character_id`,`slot`),
KEY `item_id` (`item_id`),
CONSTRAINT `character_equipped_ibfk_3` FOREIGN KEY (`item_id`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `character_equipped_ibfk_4` FOREIGN KEY (`character_id`) REFERENCES `character` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Items a character has equipped.';
/*Data for the table `character_equipped` */
/*Table structure for table `character_inventory` */
DROP TABLE IF EXISTS `character_inventory`;
CREATE TABLE `character_inventory` (
`character_id` int(11) NOT NULL COMMENT 'The character who has this item in their inventory.',
`item_id` int(11) NOT NULL COMMENT 'The item that is in the character''s inventory.',
`slot` tinyint(3) unsigned NOT NULL COMMENT 'The slot the item is in in the character''s inventory.',
PRIMARY KEY (`character_id`,`slot`),
KEY `item_id` (`item_id`),
KEY `character_id` (`character_id`),
CONSTRAINT `character_inventory_ibfk_3` FOREIGN KEY (`item_id`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `character_inventory_ibfk_4` FOREIGN KEY (`character_id`) REFERENCES `character` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Items in a character''s inventory.';
/*Data for the table `character_inventory` */
/*Table structure for table `character_quest_status` */
DROP TABLE IF EXISTS `character_quest_status`;
CREATE TABLE `character_quest_status` (
`character_id` int(11) NOT NULL COMMENT 'Character this quest status info is for.',
`quest_id` smallint(5) unsigned NOT NULL COMMENT 'The quest this information is for.',
`started_on` datetime NOT NULL COMMENT 'When the quest was started.',
`completed_on` datetime DEFAULT NULL COMMENT 'When the quest was completed. Null if incomplete. Repeatable quests hold time is was most recently completed.',
PRIMARY KEY (`character_id`,`quest_id`),
KEY `quest_id` (`quest_id`),
CONSTRAINT `character_quest_status_ibfk_1` FOREIGN KEY (`quest_id`) REFERENCES `quest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `character_quest_status_ifk_1` FOREIGN KEY (`character_id`) REFERENCES `character` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Quest status for characters. Intended for users chars.';
/*Data for the table `character_quest_status` */
insert into `character_quest_status`(`character_id`,`quest_id`,`started_on`,`completed_on`) values (1,0,'2013-02-07 00:44:31','2013-02-09 15:02:52'),(1,1,'2013-02-10 14:46:29','2013-02-10 15:56:39');
/*Table structure for table `character_quest_status_kills` */
DROP TABLE IF EXISTS `character_quest_status_kills`;
CREATE TABLE `character_quest_status_kills` (
`character_id` int(11) NOT NULL COMMENT 'The character who is doing this quest.',
`quest_id` smallint(5) unsigned NOT NULL COMMENT 'The quest that the kill count is for.',
`character_template_id` smallint(5) unsigned NOT NULL COMMENT 'The character template that is to be killed for the quest.',
`count` smallint(5) unsigned NOT NULL COMMENT 'The current kill count of characters with this template.',
PRIMARY KEY (`character_id`,`quest_id`,`character_template_id`),
KEY `quest_id` (`quest_id`),
KEY `character_template_id` (`character_template_id`),
CONSTRAINT `character_quest_status_kills_ibfk_1` FOREIGN KEY (`character_id`) REFERENCES `character` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `character_quest_status_kills_ibfk_2` FOREIGN KEY (`quest_id`) REFERENCES `quest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `character_quest_status_kills_ibfk_3` FOREIGN KEY (`character_template_id`) REFERENCES `character_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Kill counters for quests.';
/*Data for the table `character_quest_status_kills` */
/*Table structure for table `character_skill` */
DROP TABLE IF EXISTS `character_skill`;
CREATE TABLE `character_skill` (
`character_id` int(11) NOT NULL COMMENT 'The character that knows the skill.',
`skill_id` tinyint(5) unsigned NOT NULL COMMENT 'The skill the character knows.',
`time_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'When this row was added.',
PRIMARY KEY (`character_id`,`skill_id`),
CONSTRAINT `character_skill_ibfk_1` FOREIGN KEY (`character_id`) REFERENCES `character` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Skills known by a character.';
/*Data for the table `character_skill` */
insert into `character_skill`(`character_id`,`skill_id`,`time_added`) values (1,0,'2012-12-15 06:18:10'),(1,1,'2012-12-15 06:18:11');
/*Table structure for table `character_status_effect` */
DROP TABLE IF EXISTS `character_status_effect`;
CREATE TABLE `character_status_effect` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of the status effect instance.',
`character_id` int(11) NOT NULL COMMENT 'ID of the Character that the status effect is on.',
`status_effect_id` tinyint(3) unsigned NOT NULL COMMENT 'ID of the status effect that this effect is for. This corresponds to the StatusEffectType enum''s value.',
`power` smallint(5) unsigned NOT NULL COMMENT 'The power of this status effect instance.',
`time_left_secs` smallint(5) unsigned NOT NULL COMMENT 'The amount of time remaining for this status effect in seconds.',
PRIMARY KEY (`id`),
KEY `character_id` (`character_id`),
CONSTRAINT `character_status_effect_ibfk_1` FOREIGN KEY (`character_id`) REFERENCES `character` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1 COMMENT='Active status effects on a character.';
/*Data for the table `character_status_effect` */
/*Table structure for table `character_template` */
DROP TABLE IF EXISTS `character_template`;
CREATE TABLE `character_template` (
`id` smallint(5) unsigned NOT NULL COMMENT 'The unique ID of the character template.',
`alliance_id` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'The alliance.',
`name` varchar(50) NOT NULL DEFAULT 'New NPC' COMMENT 'Name of the template. NPCs usually use this name, while users usually have their own name and this value is just for dev reference.',
`ai_id` smallint(5) unsigned DEFAULT NULL COMMENT 'The AI (intended for NPCs only).',
`shop_id` smallint(5) unsigned DEFAULT NULL COMMENT 'The shop (intended for NPCs only).',
`chat_dialog` smallint(5) unsigned DEFAULT NULL COMMENT 'The chat dialog (intended for NPCs only).',
`body_id` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'The body to use.',
`move_speed` smallint(5) unsigned NOT NULL DEFAULT '1800' COMMENT 'The movement speed.',
`respawn` smallint(5) unsigned NOT NULL DEFAULT '5' COMMENT 'How long in seconds to wait after death to be respawned (intended for NPCs only).',
`level` smallint(6) NOT NULL DEFAULT '1' COMMENT 'The character''s level.',
`exp` int(11) NOT NULL DEFAULT '0' COMMENT 'Current exp.',
`statpoints` int(11) NOT NULL DEFAULT '0' COMMENT 'Number of stat points available to spend.',
`give_exp` int(11) NOT NULL DEFAULT '0' COMMENT 'Amount of exp to give when killed (intended for NPCs only).',
`give_cash` int(11) NOT NULL DEFAULT '0' COMMENT 'Amount of cash to give when killed (intended for NPCs only).',
`stat_maxhp` smallint(6) NOT NULL DEFAULT '50' COMMENT 'MaxHP stat.',
`stat_maxmp` smallint(6) NOT NULL DEFAULT '50' COMMENT 'MaxMP stat.',
`stat_minhit` smallint(6) NOT NULL DEFAULT '1' COMMENT 'MinHit stat.',
`stat_maxhit` smallint(6) NOT NULL DEFAULT '1' COMMENT 'MaxHit stat.',
`stat_defence` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Defence stat.',
`stat_agi` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Agi stat.',
`stat_int` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Int stat.',
`stat_str` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Str stat.',
PRIMARY KEY (`id`),
KEY `alliance_id` (`alliance_id`),
KEY `shop_id` (`shop_id`),
CONSTRAINT `character_template_ibfk_2` FOREIGN KEY (`alliance_id`) REFERENCES `alliance` (`id`) ON UPDATE CASCADE,
CONSTRAINT `character_template_ibfk_3` FOREIGN KEY (`shop_id`) REFERENCES `shop` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Character templates (used to instantiate characters).';
/*Data for the table `character_template` */
insert into `character_template`(`id`,`alliance_id`,`name`,`ai_id`,`shop_id`,`chat_dialog`,`body_id`,`move_speed`,`respawn`,`level`,`exp`,`statpoints`,`give_exp`,`give_cash`,`stat_maxhp`,`stat_maxmp`,`stat_minhit`,`stat_maxhit`,`stat_defence`,`stat_agi`,`stat_int`,`stat_str`) values (0,0,'User Template',NULL,NULL,NULL,1,1800,5,1,0,0,0,0,50,50,1,2,1,1,1,1),(1,1,'Bee',1,NULL,NULL,5,1500,10,1,0,0,5,5,5,5,1,2,1,1,1,1),(2,2,'Gallot',NULL,NULL,NULL,6,3000,5,1,0,0,0,0,50,50,1,1,1,1,1,1),(4,2,'Shopkeeper',NULL,0,NULL,3,1800,5,1,0,0,0,0,50,50,1,1,1,1,1,1),(5,2,'Inn Keeper',NULL,NULL,0,3,1800,5,1,0,0,0,0,50,50,1,1,1,1,1,1),(6,3,'Brawler',1,NULL,NULL,2,500,5,1,0,0,8,8,20,20,1,2,1,1,1,1);
/*Table structure for table `character_template_equipped` */
DROP TABLE IF EXISTS `character_template_equipped`;
CREATE TABLE `character_template_equipped` (
`id` int(11) NOT NULL COMMENT 'The unique row ID.',
`character_template_id` smallint(5) unsigned NOT NULL COMMENT 'The character template.',
`item_template_id` smallint(5) unsigned NOT NULL COMMENT 'The item the character template has equipped.',
`chance` smallint(5) unsigned NOT NULL COMMENT 'The chance of the item being equipped when a character is instantiated from this template.',
PRIMARY KEY (`id`),
KEY `item_id` (`item_template_id`),
KEY `character_id` (`character_template_id`),
CONSTRAINT `character_template_equipped_ibfk_1` FOREIGN KEY (`character_template_id`) REFERENCES `character_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `character_template_equipped_ibfk_2` FOREIGN KEY (`item_template_id`) REFERENCES `item_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Equipped items on a character template.';
/*Data for the table `character_template_equipped` */
insert into `character_template_equipped`(`id`,`character_template_id`,`item_template_id`,`chance`) values (0,1,7,30000),(1,1,5,2000),(2,1,3,2000),(3,6,8,65535);
/*Table structure for table `character_template_inventory` */
DROP TABLE IF EXISTS `character_template_inventory`;
CREATE TABLE `character_template_inventory` (
`id` int(11) NOT NULL COMMENT 'The unique row ID.',
`character_template_id` smallint(5) unsigned NOT NULL COMMENT 'The character template.',
`item_template_id` smallint(5) unsigned NOT NULL COMMENT 'The item the character template has in their inventory.',
`min` tinyint(3) unsigned NOT NULL COMMENT 'The minimum number of items to be created. Doesn''t affect item creation chance. Each value in range has equal distribution.',
`max` tinyint(3) unsigned NOT NULL COMMENT 'The maximum number of items to be created.',
`chance` smallint(5) unsigned NOT NULL COMMENT 'Chance that this item will be created when the character template is instantiated. Item quantity will be between min and max (equal chance distribution).',
PRIMARY KEY (`id`),
KEY `item_id` (`item_template_id`),
KEY `character_id` (`character_template_id`),
CONSTRAINT `character_template_inventory_ibfk_1` FOREIGN KEY (`character_template_id`) REFERENCES `character_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `character_template_inventory_ibfk_2` FOREIGN KEY (`item_template_id`) REFERENCES `item_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Items in a character template''s inventory.';
/*Data for the table `character_template_inventory` */
insert into `character_template_inventory`(`id`,`character_template_id`,`item_template_id`,`min`,`max`,`chance`) values (0,1,5,0,2,10000),(1,1,5,0,2,10000),(3,1,5,0,2,10000),(4,1,7,1,10,65535),(5,6,3,1,1,655),(6,6,8,1,1,655),(7,1,3,1,1,5000),(8,1,3,1,1,5000),(9,1,7,1,10,65535),(10,1,3,1,1,5000),(11,1,7,1,10,65535),(12,1,3,1,1,5000),(13,1,5,0,2,10000),(14,1,7,1,10,65535),(15,1,3,1,1,5000),(16,1,7,1,10,65535),(17,6,6,1,1,655),(18,6,7,1,1,655),(19,6,5,1,1,3277),(20,6,2,1,1,6554),(21,6,1,1,1,6554);
/*Table structure for table `character_template_quest_provider` */
DROP TABLE IF EXISTS `character_template_quest_provider`;
CREATE TABLE `character_template_quest_provider` (
`character_template_id` smallint(5) unsigned NOT NULL COMMENT 'The character template.',
`quest_id` smallint(5) unsigned NOT NULL COMMENT 'The quest provided by this character template. Only applies for valid quest givers (that is, not users).',
PRIMARY KEY (`character_template_id`,`quest_id`),
KEY `quest_id` (`quest_id`),
CONSTRAINT `character_template_quest_provider_ibfk_1` FOREIGN KEY (`character_template_id`) REFERENCES `character_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `character_template_quest_provider_ibfk_2` FOREIGN KEY (`quest_id`) REFERENCES `quest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Quests provided by character templates.';
/*Data for the table `character_template_quest_provider` */
insert into `character_template_quest_provider`(`character_template_id`,`quest_id`) values (2,0),(2,1);
/*Table structure for table `character_template_skill` */
DROP TABLE IF EXISTS `character_template_skill`;
CREATE TABLE `character_template_skill` (
`character_template_id` smallint(5) unsigned NOT NULL COMMENT 'The character template that knows the skill.',
`skill_id` tinyint(5) unsigned NOT NULL COMMENT 'The skill the character template knows.',
PRIMARY KEY (`character_template_id`,`skill_id`),
CONSTRAINT `character_template_skill_ibfk_1` FOREIGN KEY (`character_template_id`) REFERENCES `character_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Skills known by a character template.';
/*Data for the table `character_template_skill` */
insert into `character_template_skill`(`character_template_id`,`skill_id`) values (0,0),(0,1),(2,0),(6,1);
/*Table structure for table `event_counters_guild` */
DROP TABLE IF EXISTS `event_counters_guild`;
CREATE TABLE `event_counters_guild` (
`guild_id` smallint(5) unsigned NOT NULL COMMENT 'The guild the event occured on.',
`guild_event_counter_id` tinyint(3) unsigned NOT NULL COMMENT 'The ID of the event that the counter is for.',
`counter` bigint(20) NOT NULL COMMENT 'The event counter.',
PRIMARY KEY (`guild_id`,`guild_event_counter_id`),
CONSTRAINT `event_counters_guild_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guild` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Event counters for guilds.';
/*Data for the table `event_counters_guild` */
/*Table structure for table `event_counters_item_template` */
DROP TABLE IF EXISTS `event_counters_item_template`;
CREATE TABLE `event_counters_item_template` (
`item_template_id` smallint(5) unsigned NOT NULL COMMENT 'The template of the item the event occured on.',
`item_template_event_counter_id` tinyint(3) unsigned NOT NULL COMMENT 'The ID of the event that the counter is for.',
`counter` bigint(20) NOT NULL COMMENT 'The event counter.',
PRIMARY KEY (`item_template_id`,`item_template_event_counter_id`),
CONSTRAINT `event_counters_item_template_ibfk_1` FOREIGN KEY (`item_template_id`) REFERENCES `item_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Event counters for item templates.';
/*Data for the table `event_counters_item_template` */
insert into `event_counters_item_template`(`item_template_id`,`item_template_event_counter_id`,`counter`) values (1,0,261),(1,1,11),(1,5,68),(1,6,53),(1,8,11),(2,0,270),(2,5,68),(2,6,53),(2,8,15),(3,0,233),(3,4,666),(3,5,96),(3,6,90),(3,8,23),(4,0,1),(5,0,330),(5,3,2),(5,5,109),(5,6,148),(5,8,43),(6,0,27),(6,5,6),(6,6,6),(7,0,9559),(7,4,10),(7,5,320),(7,6,5344),(7,8,1367),(8,0,2633),(8,5,19),(8,6,4);
/*Table structure for table `event_counters_map` */
DROP TABLE IF EXISTS `event_counters_map`;
CREATE TABLE `event_counters_map` (
`map_id` smallint(5) unsigned NOT NULL COMMENT 'The map the event occured on.',
`map_event_counter_id` tinyint(3) unsigned NOT NULL COMMENT 'The ID of the event that the counter is for.',
`counter` bigint(20) NOT NULL COMMENT 'The event counter.',
PRIMARY KEY (`map_id`,`map_event_counter_id`),
CONSTRAINT `event_counters_map_ibfk_1` FOREIGN KEY (`map_id`) REFERENCES `map` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Event counters for maps.';
/*Data for the table `event_counters_map` */
insert into `event_counters_map`(`map_id`,`map_event_counter_id`,`counter`) values (1,0,46),(1,1,440),(1,2,5440),(1,3,145),(1,4,230),(1,5,15),(1,7,806),(1,8,806),(2,0,12),(2,1,2584),(2,2,141),(2,3,471),(2,4,471),(2,7,672),(2,8,672),(3,0,26),(3,1,94),(4,0,14),(4,1,5);
/*Table structure for table `event_counters_npc` */
DROP TABLE IF EXISTS `event_counters_npc`;
CREATE TABLE `event_counters_npc` (
`npc_template_id` smallint(5) unsigned NOT NULL COMMENT 'The character template of the NPC the event occured on.',
`npc_event_counter_id` tinyint(3) unsigned NOT NULL COMMENT 'The ID of the event that the counter is for.',
`counter` bigint(20) NOT NULL COMMENT 'The event counter.',
PRIMARY KEY (`npc_template_id`,`npc_event_counter_id`),
CONSTRAINT `event_counters_npc_ibfk_1` FOREIGN KEY (`npc_template_id`) REFERENCES `character_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Event counters for NPC templates.';
/*Data for the table `event_counters_npc` */
insert into `event_counters_npc`(`npc_template_id`,`npc_event_counter_id`,`counter`) values (0,6,145),(0,8,32),(1,1,2),(1,2,15),(1,3,1425),(1,4,145),(1,5,1790),(1,7,990),(1,8,144),(6,1,382),(6,3,92),(6,4,20756),(6,5,2136),(6,6,20756),(6,7,20848),(6,8,20959);
/*Table structure for table `event_counters_quest` */
DROP TABLE IF EXISTS `event_counters_quest`;
CREATE TABLE `event_counters_quest` (
`quest_id` smallint(5) unsigned NOT NULL COMMENT 'The quest the event occured on.',
`quest_event_counter_id` tinyint(3) unsigned NOT NULL COMMENT 'The ID of the event that the counter is for.',
`counter` bigint(20) NOT NULL COMMENT 'The event counter.',
PRIMARY KEY (`quest_id`,`quest_event_counter_id`),
CONSTRAINT `event_counters_quest_ibfk_1` FOREIGN KEY (`quest_id`) REFERENCES `quest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Event counters for quests.';
/*Data for the table `event_counters_quest` */
insert into `event_counters_quest`(`quest_id`,`quest_event_counter_id`,`counter`) values (0,1,1),(0,2,1),(1,1,3),(1,2,3);
/*Table structure for table `event_counters_shop` */
DROP TABLE IF EXISTS `event_counters_shop`;
CREATE TABLE `event_counters_shop` (
`shop_id` smallint(5) unsigned NOT NULL COMMENT 'The shop the event occured on.',
`shop_event_counter_id` tinyint(3) unsigned NOT NULL COMMENT 'The ID of the event that the counter is for.',
`counter` bigint(20) NOT NULL COMMENT 'The event counter.',
PRIMARY KEY (`shop_id`,`shop_event_counter_id`),
CONSTRAINT `event_counters_shop_ibfk_1` FOREIGN KEY (`shop_id`) REFERENCES `shop` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Event counters for shops.';
/*Data for the table `event_counters_shop` */
insert into `event_counters_shop`(`shop_id`,`shop_event_counter_id`,`counter`) values (0,1,2),(0,2,2),(0,3,2000);
/*Table structure for table `event_counters_user` */
DROP TABLE IF EXISTS `event_counters_user`;
CREATE TABLE `event_counters_user` (
`user_id` int(11) NOT NULL COMMENT 'The character ID for the user character the event occured on.',
`user_event_counter_id` tinyint(3) unsigned NOT NULL COMMENT 'The ID of the event that the counter is for.',
`counter` bigint(20) NOT NULL COMMENT 'The event counter.',
PRIMARY KEY (`user_id`,`user_event_counter_id`),
CONSTRAINT `event_counters_user_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `character` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Event counters for users.';
/*Data for the table `event_counters_user` */
insert into `event_counters_user`(`user_id`,`user_event_counter_id`,`counter`) values (1,2,232),(1,4,4555),(1,6,1524),(1,7,349),(1,8,1057),(1,9,11),(1,100,13),(1,101,76);
/*Table structure for table `guild` */
DROP TABLE IF EXISTS `guild`;
CREATE TABLE `guild` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'The unique ID of the guild.',
`name` varchar(50) NOT NULL COMMENT 'The name of the guild.',
`tag` varchar(5) NOT NULL COMMENT 'The guild''s tag.',
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'When this guild was created.',
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='The active guilds.';
/*Data for the table `guild` */
/*Table structure for table `guild_event` */
DROP TABLE IF EXISTS `guild_event`;
CREATE TABLE `guild_event` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'The ID of the event.',
`guild_id` smallint(5) unsigned NOT NULL COMMENT 'The guild the event took place on.',
`character_id` int(11) NOT NULL COMMENT 'The character that invoked the event.',
`target_character_id` int(11) DEFAULT NULL COMMENT 'The optional character that the event involves.',
`event_id` tinyint(3) unsigned NOT NULL COMMENT 'The ID of the event that took place.',
`created` datetime NOT NULL COMMENT 'When the event was created.',
`arg0` varchar(0) DEFAULT NULL COMMENT 'The first optional event argument.',
`arg1` varchar(0) DEFAULT NULL COMMENT 'The second optional event argument.',
`arg2` varchar(0) DEFAULT NULL COMMENT 'The third optional event argument.',
PRIMARY KEY (`id`),
KEY `guild_id` (`guild_id`),
KEY `character_id` (`character_id`),
KEY `target_character_id` (`target_character_id`),
CONSTRAINT `guild_event_ibfk_1` FOREIGN KEY (`guild_id`) REFERENCES `guild` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `guild_event_ibfk_2` FOREIGN KEY (`character_id`) REFERENCES `character` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `guild_event_ibfk_3` FOREIGN KEY (`target_character_id`) REFERENCES `character` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Event log for guilds.';
/*Data for the table `guild_event` */
/*Table structure for table `guild_member` */
DROP TABLE IF EXISTS `guild_member`;
CREATE TABLE `guild_member` (
`character_id` int(11) NOT NULL COMMENT 'The character that is a member of the guild.',
`guild_id` smallint(5) unsigned NOT NULL COMMENT 'The guild the member is a part of.',
`rank` tinyint(3) unsigned NOT NULL COMMENT 'The member''s ranking in the guild.',
`joined` datetime NOT NULL COMMENT 'When the member joined the guild.',
PRIMARY KEY (`character_id`),
KEY `guild_id` (`guild_id`),
CONSTRAINT `guild_member_ibfk_1` FOREIGN KEY (`character_id`) REFERENCES `character` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `guild_member_ibfk_2` FOREIGN KEY (`guild_id`) REFERENCES `guild` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='The members of a guild.';
/*Data for the table `guild_member` */
/*Table structure for table `item` */
DROP TABLE IF EXISTS `item`;
CREATE TABLE `item` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'The unique ID of the item.',
`item_template_id` smallint(5) unsigned DEFAULT NULL COMMENT 'The template the item was created from. Not required. Mostly for development reference.',
`type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'The type of item (see ItemType enum).',
`weapon_type` tinyint(3) unsigned NOT NULL COMMENT 'When used as a weapon, the type of weapon (see WeaponType enum).',
`range` smallint(5) unsigned NOT NULL COMMENT 'The range of the item. Usually for attack range, but can depend on ItemType and/or WeaponType.',
`width` tinyint(3) unsigned NOT NULL DEFAULT '16' COMMENT 'Width of the item in pixels. Mostly intended for when on a map. Usually set to the same size as the item''s sprite.',
`height` tinyint(3) unsigned NOT NULL DEFAULT '16' COMMENT 'Height of the item in pixels. Mostly intended for when on a map. Usually set to the same size as the item''s sprite.',
`name` varchar(255) NOT NULL COMMENT 'The name of the item.',
`description` varchar(255) NOT NULL COMMENT 'The item''s textual description (don''t include stuff like stats).',
`amount` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT 'The quantity of the item (for stacked items). Stacks of items count as one single item instance with an amount greater than zero.',
`graphic` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'The GrhData to use to display this item, both in GUI (inventory, equipped) and on the map.',
`value` int(11) NOT NULL DEFAULT '0' COMMENT 'The base monetary value of the item.',
`hp` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Amount of health gained from using this item (mostly for use-once items).',
`mp` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Amount of mana gained from using this item (mostly for use-once items).',
`stat_agi` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_int` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_str` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_minhit` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_maxhit` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_maxhp` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_maxmp` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_defence` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_req_agi` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Required amount of the corresponding stat to use this item.',
`stat_req_int` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Required amount of the corresponding stat to use this item.',
`stat_req_str` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Required amount of the corresponding stat to use this item.',
`equipped_body` varchar(255) DEFAULT NULL COMMENT 'When equipped and not null, sets the character''s paper doll to include this layer.',
`action_display_id` smallint(5) unsigned DEFAULT NULL COMMENT 'The ActionDisplayID to use when using this item (e.g. drink potion, attack with sword, etc).',
`skill_id` tinyint(5) unsigned DEFAULT NULL COMMENT 'The skill the item can set for a user.',
PRIMARY KEY (`id`),
KEY `item_template_id` (`item_template_id`),
CONSTRAINT `item_ibfk_1` FOREIGN KEY (`item_template_id`) REFERENCES `item_template` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=97 DEFAULT CHARSET=latin1 COMMENT='The live, persisted items.';
/*Data for the table `item` */
/*Table structure for table `item_template` */
DROP TABLE IF EXISTS `item_template`;
CREATE TABLE `item_template` (
`id` smallint(5) unsigned NOT NULL COMMENT 'The unique ID of the item template.',
`type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'The type of item (see ItemType enum).',
`weapon_type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'When used as a weapon, the type of weapon (see WeaponType enum).',
`range` smallint(5) unsigned NOT NULL DEFAULT '10' COMMENT 'The range of the item. Usually for attack range, but can depend on ItemType and/or WeaponType.',
`width` tinyint(3) unsigned NOT NULL DEFAULT '16' COMMENT 'Width of the item in pixels. Mostly intended for when on a map. Usually set to the same size as the item''s sprite.',
`height` tinyint(3) unsigned NOT NULL DEFAULT '16' COMMENT 'Height of the item in pixels. Mostly intended for when on a map. Usually set to the same size as the item''s sprite.',
`name` varchar(255) NOT NULL DEFAULT 'New item template' COMMENT 'The name of the item.',
`description` varchar(255) NOT NULL DEFAULT ' ' COMMENT 'The item''s textual description (don''t include stuff like stats).',
`graphic` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'The GrhData to use to display this item, both in GUI (inventory, equipped) and on the map.',
`value` int(11) NOT NULL DEFAULT '0' COMMENT 'The base monetary value of the item.',
`hp` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Amount of health gained from using this item (mostly for use-once items).',
`mp` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Amount of mana gained from using this item (mostly for use-once items).',
`stat_agi` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_int` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_str` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_minhit` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_maxhit` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_maxhp` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_maxmp` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_defence` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Stat modifier bonus. Use-once items often perminately increase this value, while equipped items provide a stat mod bonus.',
`stat_req_agi` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Required amount of the corresponding stat to use this item.',
`stat_req_int` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Required amount of the corresponding stat to use this item.',
`stat_req_str` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Required amount of the corresponding stat to use this item.',
`equipped_body` varchar(255) DEFAULT NULL COMMENT 'When equipped and not null, sets the character''s paper doll to include this layer.',
`action_display_id` smallint(5) unsigned DEFAULT NULL COMMENT 'The ActionDisplayID to use when using this item (e.g. drink potion, attack with sword, etc).',
`skill_id` tinyint(5) unsigned DEFAULT NULL COMMENT 'The skill the item can set for a user.',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED COMMENT='The templates used to instantiate items.';
/*Data for the table `item_template` */
insert into `item_template`(`id`,`type`,`weapon_type`,`range`,`width`,`height`,`name`,`description`,`graphic`,`value`,`hp`,`mp`,`stat_agi`,`stat_int`,`stat_str`,`stat_minhit`,`stat_maxhit`,`stat_maxhp`,`stat_maxmp`,`stat_defence`,`stat_req_agi`,`stat_req_int`,`stat_req_str`,`equipped_body`,`action_display_id`,`skill_id`) values (0,2,1,10,16,16,'Unarmed','Unarmed',1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL),(1,1,0,0,9,16,'Healing Potion','A healing potion',95,15,25,0,0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL),(2,1,0,0,9,16,'Mana Potion','A mana potion',94,10,0,25,0,0,0,0,0,0,0,0,0,0,0,NULL,NULL,NULL),(3,2,1,20,27,21,'Blue Sword','A sword... that is blue.',237,100,0,0,0,0,0,5,10,0,0,0,0,0,0,'Weapon.Sword',NULL,NULL),(4,4,0,0,30,30,'Black Armor','Body armor made out of... black.',234,2000,0,0,5,5,5,5,5,0,0,20,0,0,0,'Body.Black',NULL,NULL),(5,4,0,0,30,30,'Gold Armor','Body armor made out of gold. Designed by The Trump.',235,1000,0,0,-5,0,0,0,0,0,0,10,0,0,5,'Body.Gold',NULL,NULL),(6,2,2,500,16,16,'Pistol','Just point it at whatever you want to die.',177,500,0,0,0,0,0,25,50,0,0,0,3,3,1,NULL,NULL,NULL),(7,2,3,200,11,9,'Rock','Nothing says \"I fight dirty\" quite like a large rock',182,1,0,0,0,0,0,2,6,0,0,0,3,0,8,NULL,1,NULL),(8,4,0,0,30,30,'Iron Armor','Body armor made out of iron.',236,50,0,0,1,0,0,0,0,0,0,6,0,0,0,'Body.Iron',NULL,NULL);
/*Table structure for table `map` */
DROP TABLE IF EXISTS `map`;
CREATE TABLE `map` (
`id` smallint(5) unsigned NOT NULL COMMENT 'The unique ID of the map.',
`name` varchar(255) NOT NULL COMMENT 'Name of the map.',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Map meta-information.';
/*Data for the table `map` */
insert into `map`(`id`,`name`) values (1,'Town'),(2,'Jail'),(3,'Shop'),(4,'New map');
/*Table structure for table `map_spawn` */
DROP TABLE IF EXISTS `map_spawn`;
CREATE TABLE `map_spawn` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'The unique ID of this NPC spawn.',
`map_id` smallint(5) unsigned NOT NULL COMMENT 'The map that this spawn takes place on.',
`character_template_id` smallint(5) unsigned NOT NULL COMMENT 'The character template used to instantiate the spawned NPCs.',
`amount` tinyint(3) unsigned NOT NULL COMMENT 'The total number of NPCs this spawner will spawn.',
`respawn` smallint(5) unsigned NOT NULL DEFAULT '5' COMMENT 'How long in seconds to wait after death to be respawned (intended for NPCs only).',
`x` smallint(5) unsigned DEFAULT NULL COMMENT 'The x coordinate of the spawner (NULL indicates the left-most side of the map). Example: All x/y/width/height set to NULL spawns NPCs anywhere on the map.',
`y` smallint(5) unsigned DEFAULT NULL COMMENT 'The y coordinate of the spawner (NULL indicates the top-most side of the map).',
`width` smallint(5) unsigned DEFAULT NULL COMMENT 'The width of the spawner (NULL indicates the right-most side of the map).',
`height` smallint(5) unsigned DEFAULT NULL COMMENT 'The height of the spawner (NULL indicates the bottom- side of the map).',
`direction_id` smallint(5) NOT NULL DEFAULT '0' COMMENT 'The direction of this spawn; None if randonm',
PRIMARY KEY (`id`),
KEY `character_id` (`character_template_id`),
KEY `map_id` (`map_id`),
CONSTRAINT `map_spawn_ibfk_1` FOREIGN KEY (`character_template_id`) REFERENCES `character_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `map_spawn_ibfk_2` FOREIGN KEY (`map_id`) REFERENCES `map` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1 COMMENT='NPC spawns for the maps.';
/*Data for the table `map_spawn` */
insert into `map_spawn`(`id`,`map_id`,`character_template_id`,`amount`,`respawn`,`x`,`y`,`width`,`height`,`direction_id`) values (5,2,6,45,5,130,165,720,475,0),(9,1,1,3,20,NULL,NULL,NULL,NULL,0),(11,1,2,1,5,600,580,32,32,0),(16,3,4,1,5,250,250,1,1,0),(17,3,5,1,5,678,253,1,1,0),(18,4,2,1,5,600,400,128,128,5);
/*Table structure for table `quest` */
DROP TABLE IF EXISTS `quest`;
CREATE TABLE `quest` (
`id` smallint(5) unsigned NOT NULL COMMENT 'The unique ID of the quest. Note: This table is like a template. Quest and character_quest_status are like character_template and character, respectively.',
`repeatable` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'If this quest can be repeated by a character after they have completed it.',
`reward_cash` int(11) NOT NULL DEFAULT '0' COMMENT 'The base cash reward for completing this quest.',
`reward_exp` int(11) NOT NULL DEFAULT '0' COMMENT 'The base experience reward for completing this quest.',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='The quests.';
/*Data for the table `quest` */
insert into `quest`(`id`,`repeatable`,`reward_cash`,`reward_exp`) values (0,0,500,1000),(1,1,10,10);
/*Table structure for table `quest_require_finish_item` */
DROP TABLE IF EXISTS `quest_require_finish_item`;
CREATE TABLE `quest_require_finish_item` (
`quest_id` smallint(5) unsigned NOT NULL COMMENT 'The quest that this requirement is for.',
`item_template_id` smallint(5) unsigned NOT NULL COMMENT 'The template of the item that is required for this quest to be finished.',
`amount` tinyint(3) unsigned NOT NULL COMMENT 'The amount of the item required to finish this quest.',
PRIMARY KEY (`quest_id`,`item_template_id`),
KEY `item_template_id` (`item_template_id`),
CONSTRAINT `quest_require_finish_item_ibfk_1` FOREIGN KEY (`quest_id`) REFERENCES `quest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `quest_require_finish_item_ibfk_2` FOREIGN KEY (`item_template_id`) REFERENCES `item_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Items required for finishing a quest.';
/*Data for the table `quest_require_finish_item` */
/*Table structure for table `quest_require_finish_quest` */
DROP TABLE IF EXISTS `quest_require_finish_quest`;
CREATE TABLE `quest_require_finish_quest` (
`quest_id` smallint(5) unsigned NOT NULL COMMENT 'The quest that this requirement is for.',
`req_quest_id` smallint(5) unsigned NOT NULL COMMENT 'The quest required to be finished before this quest can be finished.',
PRIMARY KEY (`quest_id`,`req_quest_id`),
KEY `req_quest_id` (`req_quest_id`),
CONSTRAINT `quest_require_finish_quest_ibfk_1` FOREIGN KEY (`quest_id`) REFERENCES `quest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `quest_require_finish_quest_ibfk_2` FOREIGN KEY (`req_quest_id`) REFERENCES `quest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Quests required to be finished before this quest is finished';
/*Data for the table `quest_require_finish_quest` */
/*Table structure for table `quest_require_kill` */
DROP TABLE IF EXISTS `quest_require_kill`;
CREATE TABLE `quest_require_kill` (
`quest_id` smallint(5) unsigned NOT NULL COMMENT 'The quest that this requirement is for.',
`character_template_id` smallint(5) unsigned NOT NULL COMMENT 'The template of the characters that must be killed to complete this quest.',
`amount` smallint(5) unsigned NOT NULL COMMENT 'The number of characters that must be killed to complete this quest.',
PRIMARY KEY (`quest_id`,`character_template_id`),
KEY `character_template_id` (`character_template_id`),
CONSTRAINT `quest_require_kill_ibfk_1` FOREIGN KEY (`quest_id`) REFERENCES `quest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `quest_require_kill_ibfk_2` FOREIGN KEY (`character_template_id`) REFERENCES `character_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Kill requirements to finish a quest.';
/*Data for the table `quest_require_kill` */
insert into `quest_require_kill`(`quest_id`,`character_template_id`,`amount`) values (0,1,5),(1,6,10);
/*Table structure for table `quest_require_start_item` */
DROP TABLE IF EXISTS `quest_require_start_item`;
CREATE TABLE `quest_require_start_item` (
`quest_id` smallint(5) unsigned NOT NULL COMMENT 'Quest that this requirement is for.',
`item_template_id` smallint(5) unsigned NOT NULL COMMENT 'The template of the item that is required to start the quest.',
`amount` tinyint(3) unsigned NOT NULL COMMENT 'The amount of the item that is required.',
PRIMARY KEY (`quest_id`,`item_template_id`),
KEY `item_template_id` (`item_template_id`),
CONSTRAINT `quest_require_start_item_ibfk_1` FOREIGN KEY (`quest_id`) REFERENCES `quest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `quest_require_start_item_ibfk_2` FOREIGN KEY (`item_template_id`) REFERENCES `item_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Items required to start a quest.';
/*Data for the table `quest_require_start_item` */
/*Table structure for table `quest_require_start_quest` */
DROP TABLE IF EXISTS `quest_require_start_quest`;
CREATE TABLE `quest_require_start_quest` (
`quest_id` smallint(5) unsigned NOT NULL COMMENT 'The quest that this requirement is for.',
`req_quest_id` smallint(5) unsigned NOT NULL COMMENT 'The quest that is required to be finished before this quest can be started.',
PRIMARY KEY (`quest_id`,`req_quest_id`),
KEY `req_quest_id` (`req_quest_id`),
CONSTRAINT `quest_require_start_quest_ibfk_1` FOREIGN KEY (`quest_id`) REFERENCES `quest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `quest_require_start_quest_ibfk_2` FOREIGN KEY (`req_quest_id`) REFERENCES `quest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Quests required to be finished to start this quest.';
/*Data for the table `quest_require_start_quest` */
/*Table structure for table `quest_reward_item` */
DROP TABLE IF EXISTS `quest_reward_item`;
CREATE TABLE `quest_reward_item` (
`quest_id` smallint(5) unsigned NOT NULL COMMENT 'The quest that this completion reward is for.',
`item_template_id` smallint(5) unsigned NOT NULL COMMENT 'The template of the item to give as the reward.',
`amount` tinyint(3) unsigned NOT NULL COMMENT 'The amount of the item to give (should be greater than 0).',
PRIMARY KEY (`quest_id`,`item_template_id`),
KEY `item_template_id` (`item_template_id`),
CONSTRAINT `quest_reward_item_ibfk_3` FOREIGN KEY (`quest_id`) REFERENCES `quest` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `quest_reward_item_ibfk_4` FOREIGN KEY (`item_template_id`) REFERENCES `item_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Items given as reward for finishing quest.';
/*Data for the table `quest_reward_item` */
insert into `quest_reward_item`(`quest_id`,`item_template_id`,`amount`) values (0,3,1),(1,3,1);
/*Table structure for table `server_time` */
DROP TABLE IF EXISTS `server_time`;
CREATE TABLE `server_time` (
`server_time` datetime NOT NULL COMMENT 'The current time of the server, as seen by the server process. Only updated when server is running. Especially intended for when comparing the time to the server''s current time. Slightly low resolution (assume ~10 seconds).'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=1 ROW_FORMAT=FIXED COMMENT='Holds the current time of the server.';
/*Data for the table `server_time` */
insert into `server_time`(`server_time`) values ('2013-02-10 16:02:14');
/*Table structure for table `shop` */
DROP TABLE IF EXISTS `shop`;
CREATE TABLE `shop` (
`id` smallint(5) unsigned NOT NULL COMMENT 'The unique ID of the shop.',
`name` varchar(60) NOT NULL COMMENT 'The name of this shop.',
`can_buy` tinyint(1) NOT NULL COMMENT 'Whether or not this shop can buy items from shoppers. When false, the shop only sells items (users cannot sell to it).',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='The shops.';
/*Data for the table `shop` */
insert into `shop`(`id`,`name`,`can_buy`) values (0,'Test Shop',1);
/*Table structure for table `shop_item` */
DROP TABLE IF EXISTS `shop_item`;
CREATE TABLE `shop_item` (
`shop_id` smallint(5) unsigned NOT NULL COMMENT 'The shop that the item is for.',
`item_template_id` smallint(5) unsigned NOT NULL COMMENT 'The item template that this shop sells. Item instantiated when sold to shopper.',
PRIMARY KEY (`shop_id`,`item_template_id`),
KEY `item_template_id` (`item_template_id`),
CONSTRAINT `shop_item_ibfk_1` FOREIGN KEY (`shop_id`) REFERENCES `shop` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `shop_item_ibfk_2` FOREIGN KEY (`item_template_id`) REFERENCES `item_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='The items in a shop''s inventory.';
/*Data for the table `shop_item` */
insert into `shop_item`(`shop_id`,`item_template_id`) values (0,1),(0,2),(0,3),(0,5),(0,6),(0,7);
/*Table structure for table `world_stats_count_consume_item` */
DROP TABLE IF EXISTS `world_stats_count_consume_item`;
CREATE TABLE `world_stats_count_consume_item` (
`item_template_id` smallint(5) unsigned NOT NULL COMMENT 'The item template the counter is for.',
`count` int(11) NOT NULL DEFAULT '0' COMMENT 'Number of times items of this template have been consumed.',
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'When this counter was last updated.',
PRIMARY KEY (`item_template_id`),
CONSTRAINT `world_stats_count_consume_item_ibfk_1` FOREIGN KEY (`item_template_id`) REFERENCES `item_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Counts number of time an use-once item has been consumed.';
/*Data for the table `world_stats_count_consume_item` */
insert into `world_stats_count_consume_item`(`item_template_id`,`count`,`last_update`) values (1,11,'2013-02-09 23:31:56'),(2,14,'2013-02-09 22:25:18');
/*Table structure for table `world_stats_count_item_buy` */
DROP TABLE IF EXISTS `world_stats_count_item_buy`;
CREATE TABLE `world_stats_count_item_buy` (
`item_template_id` smallint(5) unsigned NOT NULL COMMENT 'The template of the item that this counter is for.',
`count` int(11) NOT NULL DEFAULT '0' COMMENT 'The amount of this item that has been purchased from shops. When buying in bulk, this still updates by amount bought (so number of items purchased, not individual transactions).',
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'When this counter was last updated.',
PRIMARY KEY (`item_template_id`),
CONSTRAINT `world_stats_count_item_buy_ibfk_1` FOREIGN KEY (`item_template_id`) REFERENCES `item_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT COMMENT='Counts times an item has been purchased from a shop.';
/*Data for the table `world_stats_count_item_buy` */
insert into `world_stats_count_item_buy`(`item_template_id`,`count`,`last_update`) values (5,2,'2013-02-06 00:48:10');
/*Table structure for table `world_stats_count_item_create` */
DROP TABLE IF EXISTS `world_stats_count_item_create`;
CREATE TABLE `world_stats_count_item_create` (
`item_template_id` smallint(5) unsigned NOT NULL COMMENT 'The item template this counter is for.',
`count` int(11) NOT NULL DEFAULT '0' COMMENT 'The total number of times this item has been instantiated. When instantiating multiple items at once, this is incremented by the amount of the item, not just one.',
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'When this counter was last updated.',
PRIMARY KEY (`item_template_id`),
CONSTRAINT `world_stats_count_item_create_ibfk_1` FOREIGN KEY (`item_template_id`) REFERENCES `item_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT COMMENT='Counts number of times an item has been instantiated.';
/*Data for the table `world_stats_count_item_create` */
insert into `world_stats_count_item_create`(`item_template_id`,`count`,`last_update`) values (1,1288,'2013-02-10 15:56:03'),(2,1411,'2013-02-10 15:55:52'),(3,1039,'2013-02-10 15:56:39'),(4,2,'2013-02-04 22:59:25'),(5,1381,'2013-02-10 15:56:13'),(6,146,'2013-02-10 15:54:32'),(7,34112,'2013-02-10 15:56:26'),(8,13767,'2013-02-10 15:56:32');
/*Table structure for table `world_stats_count_item_sell` */
DROP TABLE IF EXISTS `world_stats_count_item_sell`;
CREATE TABLE `world_stats_count_item_sell` (
`item_template_id` smallint(5) unsigned NOT NULL COMMENT 'The item template this counter is for.',
`count` int(11) NOT NULL DEFAULT '0' COMMENT 'Amount of this item template that has been sold to stores.',
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'When this counter was last updated.',
PRIMARY KEY (`item_template_id`),
CONSTRAINT `world_stats_count_item_sell_ibfk_1` FOREIGN KEY (`item_template_id`) REFERENCES `item_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Counts number of times shopper has sold item to store.';
/*Data for the table `world_stats_count_item_sell` */
/*Table structure for table `world_stats_count_npc_kill_user` */
DROP TABLE IF EXISTS `world_stats_count_npc_kill_user`;
CREATE TABLE `world_stats_count_npc_kill_user` (
`user_id` int(11) NOT NULL COMMENT 'The character this counter is for (logically, should be a user).',
`npc_template_id` smallint(5) unsigned NOT NULL COMMENT 'The character template this counter is for.',
`count` int(11) NOT NULL DEFAULT '0' COMMENT 'The number of times NPCs of this character template have killed the user.',
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'When this counter was last updated.',
PRIMARY KEY (`user_id`,`npc_template_id`),
KEY `npc_template_id` (`npc_template_id`),
CONSTRAINT `world_stats_count_npc_kill_user_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `character` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `world_stats_count_npc_kill_user_ibfk_2` FOREIGN KEY (`npc_template_id`) REFERENCES `character_template` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT COMMENT='Counts times a NPC has killed a user.';
/*Data for the table `world_stats_count_npc_kill_user` */
insert into `world_stats_count_npc_kill_user`(`user_id`,`npc_template_id`,`count`,`last_update`) values (1,1,17,'2013-02-10 14:30:50'),(6,1,3,'2013-02-04 18:55:47');
/*Table structure for table `world_stats_count_shop_buy` */
DROP TABLE IF EXISTS `world_stats_count_shop_buy`;
CREATE TABLE `world_stats_count_shop_buy` (
`shop_id` smallint(5) unsigned NOT NULL COMMENT 'The shop this counter is for.',
`count` int(11) NOT NULL DEFAULT '0' COMMENT 'The number of times this shop has sold (shopper has bought from this shop).',
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'When this counter was last updated.',
PRIMARY KEY (`shop_id`),
CONSTRAINT `world_stats_count_shop_buy_ibfk_2` FOREIGN KEY (`shop_id`) REFERENCES `shop` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT COMMENT='Counts number of items a shop has sold to shopper.';
/*Data for the table `world_stats_count_shop_buy` */
insert into `world_stats_count_shop_buy`(`shop_id`,`count`,`last_update`) values (0,2,'2013-02-06 00:48:10');
/*Table structure for table `world_stats_count_shop_sell` */
DROP TABLE IF EXISTS `world_stats_count_shop_sell`;
CREATE TABLE `world_stats_count_shop_sell` (
`shop_id` smallint(5) unsigned NOT NULL COMMENT 'The shop this counter is for.',
`count` int(11) NOT NULL DEFAULT '0' COMMENT 'The number of times this shop has purchased items (shopper has sold to this shop).',