Skip to content

Commit 7a16012

Browse files
committed
1 parent d24f0ef commit 7a16012

File tree

3,038 files changed

+342690
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,038 files changed

+342690
-0
lines changed

LICENSE

+674
Large diffs are not rendered by default.

Makefile.in

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
@SET_MAKE@
2+
3+
HAVE_MYSQL=@HAVE_MYSQL@
4+
5+
ifeq ($(HAVE_MYSQL),yes)
6+
ALL_DEPENDS = common login map
7+
else
8+
ALL_DEPENDS = needs_mysql
9+
endif
10+
11+
##########################################################
12+
.PHONY: common conf \
13+
login \
14+
map \
15+
clean help
16+
17+
all: $(ALL_DEPENDS)
18+
19+
common:
20+
@$(MAKE) -C src/common all
21+
22+
login: common
23+
@$(MAKE) -C src/login all
24+
25+
map: common
26+
@$(MAKE) -C src/map all
27+
28+
clean:
29+
@$(MAKE) -C src/common $@
30+
@$(MAKE) -C src/login $@
31+
@$(MAKE) -C src/map $@
32+
33+
help:
34+
@echo "most common targets are 'all' 'common' 'help' 'clean'"
35+
@echo "possible targets are:"
36+
@echo "'common' - builds object files used in SQL servers"
37+
@echo "'login' - ";
38+
@echo "'map' - ";
39+
@echo "'conf' - ";
40+
@echo "'clean' - cleans builds and object"
41+
@echo "'help' - output thid message"
42+
43+
##############################################################
44+
45+
needs_mysql:
46+
@echo "MySQL not found or disabled by the configure script"
47+
@exit 1
48+
49+
##############################################################
50+
#
51+
52+
install:
53+
$(shell read -p "WARNING: Those target does not work properly yet. Press Ctrl+C to cancel or Enter to continue")
54+
$(shell mkdir -p /opt/dsproject/bin/)
55+
$(shell mkdir -p /opt/dsproject/etc/dsproject/)
56+
$(shell mkdir -p /opt/dsproject/var/log/dsproject/)
57+
$(shell mv conf /opt/dsproject/etc/dsproject/conf)
58+
$(shell mv log /opt/dsproject/var/log/dsproject/)
59+
$(shell cp *-server* /opt/dsproject/bin/)
60+
$(shell ln -s /opt/dsproject/var/log/dsproject/ /opt/dsproject/bin/log)
61+
$(shell ln -s /opt/dsproject/etc/dsproject/conf /opt/dsproject/bin)
62+
63+
bin-clean:
64+
$(shell rm /opt/dsproject/bin/login-server*)
65+
$(shell rm /opt/dsproject/bin/map-server*)
66+
67+
unistall: bin-clean
68+
$(shell read -p "WARNING: This target does not work properly yet. Press Ctrl+c to cancel or Enter to continue.")
69+
$(shell rm /opt/dsproject/bin/log)
70+
$(shell rm /opt/dsproject/bin/conf)
71+
$(shell rm -rf /opt/dsproject/etc/dsproject)
72+
$(shell rm -rf /opt/dsproject/var/log/dsproject)
73+
$(shell rm -rf /opt/dsproject)
74+
75+

compress.dat

2 KB
Binary file not shown.

conf/commands.conf

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
-----------------------------------
2+
--
3+
-- GLOBAL_COMMANDS
4+
--
5+
-----------------------------------
6+
7+
commands_ini = {};
8+
9+
-----------------------------------
10+
-- Example
11+
-- 3 types of parameters:
12+
-- i - int, s - string, f - float
13+
-----------------------------------
14+
15+
commands_ini[1] = { ["name"] = "additem", ["path"] = "scripts/commands", ["parameters"] = "ii" };
16+
commands_ini[2] = { ["name"] = "release", ["path"] = "scripts/commands", ["parameters"] = "" };
17+
commands_ini[3] = { ["name"] = "cs", ["path"] = "scripts/commands", ["parameters"] = "i" };
18+
commands_ini[4] = { ["name"] = "addkeyitem", ["path"] = "scripts/commands", ["parameters"] = "i" };
19+
commands_ini[5] = { ["name"] = "delkeyitem", ["path"] = "scripts/commands", ["parameters"] = "i" };
20+
commands_ini[6] = { ["name"] = "setgil", ["path"] = "scripts/commands", ["parameters"] = "i" };
21+
commands_ini[7] = { ["name"] = "animation", ["path"] = "scripts/commands", ["parameters"] = "i" };
22+
commands_ini[8] = { ["name"] = "zone", ["path"] = "scripts/commands", ["parameters"] = "i" };
23+
commands_ini[9] = { ["name"] = "inject", ["path"] = "scripts/commands", ["parameters"] = "s" };
24+
commands_ini[10] = { ["name"] = "speed", ["path"] = "scripts/commands", ["parameters"] = "i" };
25+
commands_ini[11] = { ["name"] = "spawnmob", ["path"] = "scripts/commands", ["parameters"] = "i" };
26+
commands_ini[12] = { ["name"] = "timeoffset", ["path"] = "scripts/commands", ["parameters"] = "i" };
27+
commands_ini[13] = { ["name"] = "where", ["path"] = "scripts/commands", ["parameters"] = "" };
28+
commands_ini[14] = { ["name"] = "hp", ["path"] = "scripts/commands", ["parameters"] = "i" };
29+
commands_ini[15] = { ["name"] = "mp", ["path"] = "scripts/commands", ["parameters"] = "i" };
30+
commands_ini[16] = { ["name"] = "tp", ["path"] = "scripts/commands", ["parameters"] = "i" };
31+
commands_ini[17] = { ["name"] = "pos", ["path"] = "scripts/commands", ["parameters"] = "iii" };

conf/lan_config.conf

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//darkstar lan config
2+
map_lan_ip: 127.0.0.1
3+
map_lan_port: 53999
4+
5+
login_lan_ip: 127.0.0.1
6+
login_lan_port: 53998
7+
8+
9+
wait_time: 10
10+
connect_try_num: 10

conf/login_darkstar.conf

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//Darkstar login server conf
2+
3+
// login server parametres
4+
5+
//Time-stamp format which will be printed before all messages.
6+
//Can at most be 20 characters long.
7+
//Common formats:
8+
// %I:%M:%S %p (hour:minute:second 12 hour, AM/PM format)
9+
// %H:%M:%S (hour:minute:second, 24 hour format)
10+
// %d/%b/%Y (day/Month/year)
11+
//For full format information, consult the strftime() manual.
12+
timestamp_format: [%d/%b %H:%M]
13+
14+
//If redirected output contains escape sequences (color codes)
15+
stdout_with_ansisequence: no
16+
17+
//Makes server output more silent by ommitting certain types of messages:
18+
//1: Hide Information messages
19+
//2: Hide Status messages
20+
//4: Hide Notice Messages
21+
//8: Hide Warning Messages
22+
//16: Hide Error and SQL Error messages.
23+
//32: Hide Debug Messages
24+
//Example: "console_silent: 7" Hides information, status and notice messages (1+2+4)
25+
console_silent: 0
26+
27+
//--------------------------------//
28+
// SQL PARAMETRES //
29+
//--------------------------------//
30+
31+
mysql_host: 127.0.01
32+
mysql_port: 3306
33+
mysql_login: root
34+
mysql_password: root
35+
mysql_database: dspdb

conf/map_darkstar.conf

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
//Darkstar map server conf
2+
3+
// map server parametres
4+
5+
//map server port
6+
map_port: 54230
7+
8+
//Time-stamp format which will be printed before all messages.
9+
//Can at most be 20 characters long.
10+
//Common formats:
11+
// %I:%M:%S %p (hour:minute:second 12 hour, AM/PM format)
12+
// %H:%M:%S (hour:minute:second, 24 hour format)
13+
// %d/%b/%Y (day/Month/year)
14+
//For full format information, consult the strftime() manual.
15+
timestamp_format: [%H:%M:%S]
16+
17+
//If redirected output contains escape sequences (color codes)
18+
stdout_with_ansisequence: no
19+
20+
//Makes server output more silent by ommitting certain types of messages:
21+
//1: Hide Information messages
22+
//2: Hide Status messages
23+
//4: Hide Notice Messages
24+
//8: Hide Warning Messages
25+
//16: Hide Error and SQL Error messages.
26+
//32: Hide Debug Messages
27+
//64: Hide Lua script messages
28+
//Example: "console_silent: 7" Hides information, status and notice messages (1+2+4)
29+
console_silent: 0
30+
31+
32+
//--------------------------------//
33+
// SQL PARAMETRES //
34+
//--------------------------------//
35+
36+
mysql_host: 127.0.0.1
37+
mysql_port: 3306
38+
mysql_login: root
39+
mysql_password: root
40+
mysql_database: dspdb
41+
42+
43+
//--------------------------------//
44+
// Packet settings //
45+
//--------------------------------//
46+
47+
buff_maxsize: 1874
48+
49+
//time_wait_between2recv = 100 ms
50+
51+
// 60 seconds
52+
max_time_lastupdate: 60000

conf/packet_darkstar_tcp.conf

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
// Darkstar tcp sockets Configuration file
2+
3+
// Display debug reports (When something goes wrong during the report, the report is saved.)
4+
debug: no
5+
6+
// How long can a socket stall before closing the connection (in seconds)
7+
stall_time: 60
8+
9+
//----- IP Rules Settings -----
10+
11+
// If IP's are checked when connecting.
12+
// This also enables DDoS protection.
13+
enable_ip_rules: yes
14+
15+
// Order of the checks
16+
// deny,allow : Checks deny rules, then allow rules. Allows if no rules match.
17+
// allow,deny : Checks allow rules, then deny rules. Allows if no rules match.
18+
// mutual-failure : Allows only if an allow rule matches and no deny rules match.
19+
// (default is deny,allow)
20+
21+
order: deny,allow
22+
// order: allow,deny
23+
// order: mutual-failture
24+
25+
// IP rules
26+
// allow : Accepts connections from the ip range (even if flagged as DDoS)
27+
// deny : Rejects connections from the ip range
28+
// The rules are processed in order, the first matching rule of each list (allow and deny) is used
29+
30+
// allow: 127.0.0.1
31+
// allow: 192.168.0.0/16
32+
// allow: 10.0.0.0/255.0.0.0
33+
// allow: all
34+
35+
// deny: 127.0.0.1
36+
37+
38+
//---- DDoS Protection Settings ----
39+
// If ddos_count connection request are made within ddos_interval msec, it assumes it's a DDoS attack
40+
41+
// Consecutive attempts interval (msec)
42+
// (default is 3000 msecs, 3 seconds)
43+
ddos_interval: 3000
44+
45+
// Consecutive attempts trigger
46+
// (default is 5 attemps)
47+
ddos_count: 5
48+
49+
// The time interval after which the threat of DDoS is assumed to be gone. (msec)
50+
// After this amount of time, the DDoS restrictions are lifted.
51+
// (default is 600000 msecs, 10 minutes)
52+
ddos_autoreset: 600000
53+
54+
55+
//import: conf/import/packet_conf.txt

conf/packet_darkstar_udp.conf

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Darkstar tcp sockets Configuration file
2+
3+
// Display debug reports (When something goes wrong during the report, the report is saved.)
4+
debug: no

0 commit comments

Comments
 (0)