-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathl2db.sql
More file actions
99 lines (91 loc) · 2.97 KB
/
l2db.sql
File metadata and controls
99 lines (91 loc) · 2.97 KB
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
SET client_encoding = 'UTF8';
CREATE TABLE accounts (
id integer GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
login character varying NOT NULL,
password character varying NOT NULL,
access_level integer DEFAULT 0
);
CREATE TABLE characters (
object_id integer PRIMARY KEY,
user_login character varying(30) NOT NULL,
character_name character varying(30) NOT NULL,
title character varying NOT NULL,
level integer NOT NULL,
gender integer NOT NULL,
hair_style integer NOT NULL,
hair_color integer NOT NULL,
face integer NOT NULL,
heading integer NOT NULL,
access_level integer NOT NULL,
online boolean DEFAULT false NOT NULL,
online_time integer NOT NULL,
is_gm boolean NOT NULL,
exp integer NOT NULL,
sp integer NOT NULL,
pvp integer NOT NULL,
pk integer NOT NULL,
karma integer NOT NULL,
class_id integer NOT NULL,
class_name character varying NOT NULL,
race_id integer NOT NULL,
str integer NOT NULL,
dex integer NOT NULL,
con integer NOT NULL,
"int" integer NOT NULL,
wit integer NOT NULL,
men integer NOT NULL,
current_hp integer NOT NULL,
max_hp integer NOT NULL,
current_mp integer NOT NULL,
max_mp integer NOT NULL,
base_run_speed integer NOT NULL,
base_walk_speed integer NOT NULL,
x integer NOT NULL,
y integer NOT NULL,
z integer NOT NULL,
attack_speed_multiplier numeric NOT NULL,
collision_radius numeric NOT NULL,
collision_height numeric NOT NULL,
created_at timestamp without time zone NOT NULL
);
CREATE TABLE gameservers (
id integer GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
gameserver_id integer NOT NULL,
host character varying(20) NOT NULL,
port integer NOT NULL,
age_limit integer DEFAULT 0 NOT NULL,
is_pvp boolean DEFAULT false NOT NULL,
max_players integer DEFAULT 100 NOT NULL,
server_status integer DEFAULT 0 NOT NULL,
server_type integer DEFAULT 1 NOT NULL
);
CREATE TABLE items (
id integer GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
object_id integer NOT NULL,
item_id integer NOT NULL,
item_count integer NOT NULL,
location character varying(100) NOT NULL,
owner_object_id integer NOT NULL,
equip_slot integer
);
CREATE TABLE object_id_registry (
registry_id integer GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
registry_name character varying NOT NULL,
last_object_id integer NOT NULL
);
CREATE TABLE scheduled_tasks (
id integer GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
type character varying,
payload json,
scheduled_at timestamp without time zone,
status character varying,
created_account_id character varying,
created_type character varying
);
CREATE TABLE skills (
id integer GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
skill_id integer NOT NULL,
skill_level integer NOT NULL,
owner_object_id integer NOT NULL
);
INSERT INTO public.object_id_registry (registry_name, last_object_id) VALUES ('world', 1);