· 8 years ago · Feb 08, 2018, 01:58 PM
1### Eclipse Workspace Patch 1.0
2#P aCis_datapack
3Index: tools/database_installer.sh
4===================================================================
5--- tools/database_installer.sh (revision 8)
6+++ tools/database_installer.sh (working copy)
7@@ -78,6 +78,7 @@
8 $MYG < ../sql/auction.sql &> /dev/null
9 $MYG < ../sql/auction_bid.sql &> /dev/null
10 $MYG < ../sql/augmentations.sql &> /dev/null
11+$MYG < ../sql/bbs_announcements.sql &> /dev/null
12 $MYG < ../sql/bookmarks.sql &> /dev/null
13 $MYG < ../sql/buffer_schemes.sql &> /dev/null
14 $MYG < ../sql/buylists.sql &> /dev/null
15Index: data/html/CommunityBoard/stats/topRaid.htm
16===================================================================
17--- data/html/CommunityBoard/stats/topRaid.htm (revision 0)
18+++ data/html/CommunityBoard/stats/topRaid.htm (revision 0)
19@@ -0,0 +1,29 @@
20+<html>
21+ <body>
22+ <br>
23+ <br><br><br>
24+ <center>
25+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
26+ <br>
27+ <font color="AAAAAA">Top Raid Boss Killers</font>
28+ <br>
29+ <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 height=24 width=610>
30+ <tr>
31+ <td FIXWIDTH=5></td>
32+ <td FIXWIDTH=20>#</td>
33+ <td FIXWIDTH=180>Name</td>
34+ <td FIXWIDTH=175>Class</td>
35+ <td fixwidth=60>PvP</td>
36+ <td fixwidth=60>Pk</td>
37+ <td fixwidth=70 align=center><font color="CCCC66">R.Points</font></td>
38+ <td fixwidth=140>Adenas</td>
39+ <td fixwidth=150>In Game</td>
40+ <td FIXWIDTH=65>Status</td>
41+ </tr>
42+ </table>
43+ %topraid%
44+ <br>
45+ <font color="585858">Last updated: %lastUpdate%</font>
46+ </center>
47+ </body>
48+</html>
49Index: data/html/CommunityBoard/announcements/adminWrite.htm
50===================================================================
51--- data/html/CommunityBoard/announcements/adminWrite.htm (revision 0)
52+++ data/html/CommunityBoard/announcements/adminWrite.htm (revision 0)
53@@ -0,0 +1,48 @@
54+<html>
55+ <body>
56+ <br>
57+ <br><br><br>
58+ <center>
59+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
60+ <br>
61+ <font color="AAAAAA">News Announcements.</font>
62+ <img src="l2ui.squaregray" width="500" height="1">
63+ <br>
64+ <br>
65+ <table width=500>
66+ <tr>
67+ <td>1. Please use HTML tag for your post!<br></td>
68+ </tr>
69+ <tr>
70+ <td>2. Do not use any kind of (table) content!<br></td>
71+ </tr>
72+ <tr>
73+ <td>3. The post cannot contain more then 1000 symbols.<br></td>
74+ </tr>
75+ <tr>
76+ <td>4. Using url addresses is possible by using command for your button:<br></td>
77+ </tr>
78+ <tr>
79+ <td>5. bypass -h visitUrl;yourURLaddress<br></td>
80+ </tr>
81+ <tr>
82+ <td>6. Images outside client cannot be used.<br></td>
83+ </tr>
84+ </table>
85+ <img src="l2ui.squaregray" width="500" height="1">
86+ <br>
87+ <table width=450>
88+ <tr>
89+ <td width=50 align=center>Title</td>
90+ <td><edit var="title" width=400 height=13></td>
91+ </tr>
92+ <tr><td></td></tr>
93+ <tr><td></td></tr>
94+ </table>
95+ <br><br>
96+ <button value="Continue ->" action="bypass _bbsannouncements;postTitle $title" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"/>
97+ </center>
98+ <br>
99+ <img src="l2ui.squaregray" width="610" height="1">
100+ </body>
101+</html>
102\ No newline at end of file
103Index: data/html/CommunityBoard/donation/showMethods.htm
104===================================================================
105--- data/html/CommunityBoard/donation/showMethods.htm (revision 0)
106+++ data/html/CommunityBoard/donation/showMethods.htm (revision 0)
107@@ -0,0 +1,42 @@
108+<html>
109+ <body>
110+ <br>
111+ <br><br><br>
112+ <center>
113+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
114+ <br>
115+ <font color="AAAAAA">Pick Your Donation Method.</font>
116+ <img src="l2ui.squaregray" width="500" height="1">
117+ <br>
118+ <br>
119+ <table width=500>
120+ <tr>
121+ <td>1. Please be aware that you will not receive your reward right after you donate!</br></td>
122+ </tr>
123+ <tr>
124+ <td>2. Firstly a member of our staff must confirm that the donation is valid.</br></td>
125+ </tr>
126+ <tr>
127+ <td>3. Do not try to spam! You cannot make more donations until the first one is confirmed.</br></td>
128+ </tr>
129+ <tr>
130+ <td>4. Please have patience. The staff members will receive message. But they might not react in 2 minutes.</br></td>
131+ </tr>
132+ <tr>
133+ <td>5. Fake donations might get your self banned!</br></td>
134+ </tr>
135+ </table>
136+ <br>
137+ <img src="l2ui.squaregray" width="500" height="1"><br>
138+ <table width=300>
139+ <tr>
140+ <td><button value="I will donate via PaySafe" action="bypass _bbsdonation;paysafe" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
141+ <td><button value="I will donate via PayPal" action="bypass _bbsdonation;paypal" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
142+ </tr>
143+ </table>
144+ </center>
145+ <br>
146+ <img src="l2ui.squaregray" width="610" height="1">
147+ <br>
148+ </body>
149+</html>
150\ No newline at end of file
151Index: data/html/CommunityBoard/donation/paysafe.htm
152===================================================================
153--- data/html/CommunityBoard/donation/paysafe.htm (revision 0)
154+++ data/html/CommunityBoard/donation/paysafe.htm (revision 0)
155@@ -0,0 +1,67 @@
156+<html>
157+ <body>
158+ <br>
159+ <br><br><br>
160+ <center>
161+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
162+ <br>
163+ <font color="AAAAAA">Donation Via PaySafe Card.</font>
164+ <img src="l2ui.squaregray" width="500" height="1">
165+ <br>
166+ <br>
167+ <table width=500>
168+ <tr>
169+ <td>1. The fields with <font color=LEVEL>*</font> are required!<br></td>
170+ </tr>
171+ <tr>
172+ <td>2. Once submitted you cannot edit the details you've put bellow.<br></td>
173+ </tr>
174+ </table>
175+ <br>
176+ <img src="l2ui.squaregray" width="500" height="1"><br>
177+ <font color="AAAAAA">Donation Form.</font>
178+ <br>
179+ <table width=500>
180+ <tr>
181+ <td width="75">Account:</td>
182+ <td width="425">%charAcc%</td>
183+ </tr>
184+ <tr><td></td></tr>
185+ <tr>
186+ <td width="75">Character:</td>
187+ <td width="425">%charName%</td>
188+ </tr>
189+ <tr><td></td></tr>
190+ <tr><td></td></tr>
191+ <tr>
192+ <td width="75">Card Amount: <font color=LEVEL>*</font></td>
193+ <td width="425"><combobox width=80 height=12 var="amount" list=10-Euro;25-Euro;50-Euro;100-Euro;></td>
194+ </tr>
195+ </table>
196+ <table width=500>
197+ <tr>
198+ <td width="75">Card Pin: <font color=LEVEL>*</font></td>
199+ <td width="50"><edit var="pin1" width=50 height=12 type=number></td>
200+ <td width="50"><edit var="pin2" width=50 height=12 type=number></td>
201+ <td width="50"><edit var="pin3" width=50 height=12 type=number></td>
202+ <td width="50"><edit var="pin4" width=50 height=12 type=number></td>
203+ <td width="190"></td>
204+ </tr>
205+ </table>
206+ <br><br>
207+ <table width=500>
208+ <tr>
209+ <td width="75">Message: <font color=LEVEL>*</font></td>
210+ <td width="425"><edit var="message" width=240 height=12></td>
211+ </tr>
212+ </table>
213+ <br>
214+ <img src="l2ui.squaregray" width="500" height="1">
215+ <br>
216+ <button value="Submit Donation" action="bypass _bbsdonation;submitPaySafe $amount $pin1 $pin2 $pin3 $pin4 $message" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton">
217+ <br>
218+ <img src="l2ui.squaregray" width="610" height="1"><br>
219+ <br>
220+ </center>
221+ </body>
222+</html>
223\ No newline at end of file
224Index: data/html/CommunityBoard/announcements/adminWrite2.htm
225===================================================================
226--- data/html/CommunityBoard/announcements/adminWrite2.htm (revision 0)
227+++ data/html/CommunityBoard/announcements/adminWrite2.htm (revision 0)
228@@ -0,0 +1,33 @@
229+<html>
230+ <body>
231+ <br>
232+ <br><br><br>
233+ <center>
234+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
235+ <br>
236+ <font color="AAAAAA">News Announcements.</font>
237+ <img src="l2ui.squaregray" width="500" height="1">
238+ <br>
239+ <br>
240+ <table width=450>
241+ <tr>
242+ <td width=50 align=center>Title:</td>
243+ <td>%title%</td>
244+ </tr>
245+ <tr><td></td></tr>
246+ <tr>
247+ <td width=50 align=center>Content:</td>
248+ <td><multiedit var="content" width=400 height=200></td>
249+ </tr>
250+ </table>
251+ <br>
252+ <br>
253+ <img src="l2ui.squaregray" width="500" height="1">
254+ <br>
255+ <br>
256+ <button value="Post Announcement" action="bypass _bbsannouncements;postText $content" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"/>
257+ </center>
258+ <br>
259+ <img src="l2ui.squaregray" width="610" height="1">
260+ </body>
261+</html>
262\ No newline at end of file
263Index: data/html/CommunityBoard/top/index.htm
264===================================================================
265--- data/html/CommunityBoard/top/index.htm (revision 8)
266+++ data/html/CommunityBoard/top/index.htm (working copy)
267@@ -1,67 +1,70 @@
268-<html><body><br>
269- <table width="610">
270- <tr>
271- <td align="center" height="30"><img src="l2ui.bbs_lineage2" width="128" height="16"></td>
272- </tr>
273- </table>
274- <table width="610" bgcolor="A7A19A">
275- <tr>
276- <td width="50" align="center">&$412;</td>
277- <td width="380" align="center">&$413;</td>
278- <td width="90" align="center">&$414;</td>
279- <td width="90" align="center">&$415;</td>
280- </tr>
281- </table><br>
282- <table width="610">
283- <tr>
284- <td width="50" align="center"><img src="l2ui.bbs_folder" width="32" height="32"></td>
285- <td width="380" align="left"><a action="bypass _bbsgetfav">Favorites</a><br1><font color="AAAAAA">Bookmarks</font></td>
286- <td width="90" align="center">0</td>
287- <td width="90" align="center">admin</td>
288- </tr>
289- </table>
290- <table border=0 cellspacing=0 cellpadding=0>
291- <tr>
292- <td width=610><img src="l2ui.squaregray" width="600" height="1"></td>
293- </tr>
294- </table><br>
295- <table border=0 cellspacing=0 cellpadding=2>
296- <tr>
297- <td FIXWIDTH=50 align=right valign=top><img src="l2ui.bbs_folder" width=32 height=32></td>
298- <td FIXWIDTH=380 align=left valign=top><a action="bypass _bbshome;rules.htm">Server Rules</a><br1><font color="AAAAAA">Read them carefully</font></td>
299- <td FIXWIDTH=90 align=center valign=top>0</td>
300- <td FIXWIDTH=90 align=center valign=top>admin</td>
301- </tr>
302- </table>
303- <table border=0 cellspacing=0 cellpadding=0>
304- <tr>
305- <td width=610><img src="l2ui.squaregray" width="600" height="1"></td>
306- </tr>
307- </table><br>
308- <table border=0 cellspacing=0 cellpadding=2>
309- <tr>
310- <td FIXWIDTH=50 align=right valign=top><img src="l2ui.bbs_folder" width=32 height=32></td>
311- <td FIXWIDTH=380 align=left valign=top><a action="bypass _bbshome;news.htm">Lineage II News</a><br1><font color="AAAAAA">New Information</font></td>
312- <td FIXWIDTH=90 align=center valign=top>0</td>
313- <td FIXWIDTH=90 align=center valign=top>admin</td>
314- </tr>
315- </table>
316- <table border=0 cellspacing=0 cellpadding=0>
317- <tr>
318- <td width=610><img src="l2ui.squaregray" width="600" height="1"></td>
319- </tr>
320- </table><br>
321- <table border=0 cellspacing=0 cellpadding=2>
322- <tr>
323- <td FIXWIDTH=50 align=right valign=top><img src="l2ui.bbs_folder" width=32 height=32></td>
324- <td FIXWIDTH=380 align=left valign=top><a action="bypass _bbsclan">Clan Community</a><br1><font color="AAAAAA">Clan Community</font></td>
325- <td FIXWIDTH=90 align=center valign=top>0</td>
326- <td FIXWIDTH=90 align=center valign=top>admin</td>
327- </tr>
328- </table>
329- <table border=0 cellspacing=0 cellpadding=0>
330- <tr>
331- <td width=610><img src="l2ui.squaregray" width="600" height="1"></td>
332- </tr>
333- </table>
334-</center></body></html>
335\ No newline at end of file
336+<html>
337+ <body>
338+ <br>
339+ <center><img src="l2ui.bbs_lineage2" width="80" height="16"></center>
340+ <br>
341+ <center><img src="l2ui.squaregray" width="600" height="1"></center>
342+ <table width="610">
343+ <tr>
344+ <td width="50" align="center"><img src="l2ui.bbs_folder" width="32" height="32"></td>
345+ <td width="380" align="left"><a action="bypass _bbsannouncements;show">Announcements</a><br1><font color="AAAAAA">Here you can read about our latest server announcements.</font></td>
346+ </tr>
347+ </table>
348+ <center><img src="l2ui.squaregray" width="600" height="1"></center>
349+ <table width="610">
350+ <tr>
351+ <td width="50" align="center"><img src="l2ui.maincharacter_small" width="32" height="32"></td>
352+ <td width="380" align="left"><a action="bypass _bbshome;../donation/main.htm">Submit Donation</a><br1><font color="AAAAAA">Every donation is making our server stronger! We need this money to pay our feeds.</font></td>
353+ </tr>
354+ </table>
355+ <center><img src="l2ui.squaregray" width="600" height="1"></center>
356+ <table width="610">
357+ <tr>
358+ <td width="50" align="center"><img src="l2ui.mainsystem_small" width="32" height="32"></td>
359+ <td width="380" align="left"><a action="bypass _bbsProblemReport">Problem Report</a><br1><font color="AAAAAA">If you have noticed any problems, bugs or bots. Please report them to the staff.</font></td>
360+ </tr>
361+ </table>
362+ <center><img src="l2ui.squaregray" width="600" height="1"></center>
363+ <br><br><br>
364+ <center><img src="L2UI_CH3.herotower_deco" width=256 height=32></center>
365+ <br><br><br>
366+ <center><img src="l2ui.squaregray" width="600" height="1"></center>
367+ <table width="610">
368+ <tr>
369+ <td width="50" align="center"><img src="l2ui.mainskill_small" width="32" height="32"></td>
370+ <td width="380" align="left">
371+ <a action="bypass _bbsstats;pvp">Top PvP Killers</a> |
372+ <a action="bypass _bbsstats;pk">Top Pk Killers</a> |
373+ <a action="bypass _bbsstats;raid">Top Raid Points</a> |
374+ <a action="bypass _bbsstats;adena">Most Rich Players</a> |
375+ <a action="bypass _bbsstats;online">Most Active Players</a><br1>
376+ <font color=AAAAAA>Find out which are our best players.</font><br>
377+ </td>
378+ </tr>
379+ </table>
380+ <center><img src="l2ui.squaregray" width="600" height="1"></center>
381+ <table width="610">
382+ <tr>
383+ <td width="50" align="center"><img src="l2ui.mainquest_small" width="32" height="32"></td>
384+ <td width="380" align="left">
385+ <a action="bypass _bbsOlStats">Olympiad Status</a> |
386+ <a action="bypass _bbsGrandBoss">Grand Boss Status</a><br1>
387+ <font color=AAAAAA>Learn valuable information about our world.</font><br>
388+ </td>
389+ </tr>
390+ </table>
391+ <center><img src="l2ui.squaregray" width="600" height="1"></center>
392+ <table width="610">
393+ <tr>
394+ <td width="50" align="center"><img src="l2ui.mainstatus_small" width="32" height="32"></td>
395+ <td width="380" align="left">
396+ <a action="bypass _bbsShowRepair">Repair Broken Character</a> |
397+ <a action="bypass _bbshome;passChange.htm">Change Account Password</a><br1>
398+ <font color=AAAAAA>Use our special services to help your self out.</font><br>
399+ </td>
400+ </tr>
401+ </table>
402+ <center><img src="l2ui.squaregray" width="600" height="1"></center>
403+ <br><br><br><br>
404+ </body>
405+</html>
406\ No newline at end of file
407Index: data/html/CommunityBoard/announcements/main.htm
408===================================================================
409--- data/html/CommunityBoard/announcements/main.htm (revision 0)
410+++ data/html/CommunityBoard/announcements/main.htm (revision 0)
411@@ -0,0 +1,21 @@
412+<html>
413+ <body>
414+ <br>
415+ <br><br><br>
416+ <center><img src="L2UI_CH3.herotower_deco" width=256 height=32>
417+ <br>
418+ <font color="AAAAAA">Announcements List:</font></center>
419+ <br><br>
420+ %adminMenu%
421+ <table width=610 bgcolor="000000">
422+ <tr>
423+ <td width=50 height=18 align="center">#</td>
424+ <td width=400 height=18 align="left">Title</td>
425+ <td width=100 height=18 align="center">Date</td>
426+ </tr>
427+ </table>
428+ %showList%
429+ <br><br>
430+ <center><font color="585858">For older announcements please visit our forum.</font></center>
431+ </body>
432+</html>
433Index: data/html/CommunityBoard/top/repair.htm
434===================================================================
435--- data/html/CommunityBoard/top/repair.htm (revision 0)
436+++ data/html/CommunityBoard/top/repair.htm (revision 0)
437@@ -0,0 +1,36 @@
438+<html>
439+ <body>
440+ <br>
441+ <br><br><br>
442+ <center>
443+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
444+ <br>
445+ <font color="AAAAAA">Character Repair Function</font><br>
446+ <img src="l2ui.squaregray" width="500" height="1"><br>
447+ <br>
448+ <table width="300" cellpadding="5">
449+ <tr>
450+ <td width="45" valign="top" align="center"><img src="icon.skill4376" width="32" height="32"></td>
451+ <td valign="top">Use this tool, to fix problems with your other<br1>character. Like client crashing while loading.</td>
452+ </tr>
453+ </table>
454+ <br>
455+ <img src="l2ui.SquareGray" width="300" height="1">
456+ <br>
457+ <table width="300" cellpadding="5">
458+ <tr>
459+ <td valign="top"><font color="FF6600">Choose broken character name.</font><br1>
460+ Choose character name, that you wish to<br1>attempt to fix. It will be moved to Floran<br1>
461+ and removed shortcuts and keyboard<br1>configuration.</td>
462+ </tr>
463+ <tr>
464+ <td align=center><combobox var="name" list="%acc_chars%" width="170" height="15"/></td>
465+ </tr>
466+ </table>
467+ <br>
468+ <img src="l2ui.SquareGray" width="300" height="1"><br>
469+ <button value="Repair the character" action="bypass _bbsRepair $name" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton">
470+ </center>
471+ <center><img src="l2ui.squaregray" width="500" height="1"></center><br>
472+ </body>
473+</html>
474Index: data/html/CommunityBoard/reporting/description.htm
475===================================================================
476--- data/html/CommunityBoard/reporting/description.htm (revision 0)
477+++ data/html/CommunityBoard/reporting/description.htm (revision 0)
478@@ -0,0 +1,45 @@
479+<html>
480+ <body>
481+ <br>
482+ <br><br><br>
483+ <center>
484+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
485+ <br>
486+ <font color="AAAAAA">Report Form</font>
487+ <img src="l2ui.squaregray" width="500" height="1">
488+ <br>
489+ <br>
490+ <table width=500>
491+ <tr>
492+ <td width="100" align=left>Character:</td>
493+ <td width="400" align=left>%charName%</td>
494+ </tr>
495+ <tr><td></td></tr>
496+ <tr>
497+ <td width="100" align=left>Majority:</td>
498+ <td width="400" align=left>%majority%</td>
499+ </tr>
500+ <tr><td></td></tr>
501+ <tr>
502+ <td width="100" align=left>Type:</td>
503+ <td width="400" align=left>%type%</td>
504+ </tr>
505+ <tr><td></td></tr>
506+ <tr>
507+ <td width="100">Title:</td>
508+ <td align=left>%title%</td>
509+ </tr>
510+ <tr>
511+ <td width="100">Description:</td>
512+ <td align=left><multiedit var="description" width=350 height=200></td>
513+ </tr>
514+ </table>
515+ <br>
516+ <img src="l2ui.squaregray" width="500" height="1"><br>
517+ <button value="Submit Report" action="bypass _bbsProblemReport;submit $description" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton">
518+ </center>
519+ <br>
520+ <img src="l2ui.squaregray" width="610" height="1">
521+ <br>
522+ </body>
523+</html>
524\ No newline at end of file
525Index: data/html/CommunityBoard/stats/topOnline.htm
526===================================================================
527--- data/html/CommunityBoard/stats/topOnline.htm (revision 0)
528+++ data/html/CommunityBoard/stats/topOnline.htm (revision 0)
529@@ -0,0 +1,29 @@
530+<html>
531+ <body>
532+ <br>
533+ <br><br><br>
534+ <center>
535+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
536+ <br>
537+ <font color="AAAAAA">Most Active Players</font>
538+ <br>
539+ <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 height=24 width=610>
540+ <tr>
541+ <td FIXWIDTH=5></td>
542+ <td FIXWIDTH=20>#</td>
543+ <td FIXWIDTH=180>Name</td>
544+ <td FIXWIDTH=175>Class</td>
545+ <td fixwidth=60>PvP</td>
546+ <td fixwidth=60>Pk</td>
547+ <td fixwidth=70 align=center>R.Points</td>
548+ <td fixwidth=140>Adenas</td>
549+ <td fixwidth=150><font color="CCCC66">In Game</font></td>
550+ <td FIXWIDTH=65>Status</td>
551+ </tr>
552+ </table>
553+ %toponline%
554+ <br>
555+ <font color="585858">Last updated: %lastUpdate%</font>
556+ </center>
557+ </body>
558+</html>
559Index: data/html/CommunityBoard/reporting/main.htm
560===================================================================
561--- data/html/CommunityBoard/reporting/main.htm (revision 0)
562+++ data/html/CommunityBoard/reporting/main.htm (revision 0)
563@@ -0,0 +1,59 @@
564+<html>
565+ <body>
566+ <br>
567+ <br><br><br>
568+ <center>
569+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
570+ <br>
571+ <font color="AAAAAA">Problem Reporting</font>
572+ <img src="l2ui.squaregray" width="500" height="1">
573+ <br>
574+ <br>
575+ <table width=500>
576+ <tr>
577+ <td>1. You are pleased to have clarity about your speech to be easy to read understand your problem by the reader in order to help you. Otherwise your topic will be locked and may you will be punished.<br></td>
578+ </tr>
579+ <tr>
580+ <td>2. In case that you haven't got any idea about your words or you don't know where is the problem, you are pleased to don't even try to answer. You will be punished for wrong guidance.<br></td>
581+ </tr>
582+ <tr>
583+ <td>3. It remembers to choose the correct option before reporting an error.<br></td>
584+ </tr>
585+ <tr>
586+ <td>4. In case that you haven't got any answer, in 24 hours, we suggested to you to return to report.<br></td>
587+ </tr>
588+ </table>
589+ <br>
590+ <img src="l2ui.squaregray" width="500" height="1"><br>
591+ <font color="AAAAAA">Report Form.</font>
592+ <br>
593+ <table width=500>
594+ <tr>
595+ <td width="100" align=left>Character:</td>
596+ <td width="400" align=left>%charName%</td>
597+ </tr>
598+ <tr><td></td></tr>
599+ <tr>
600+ <td width="100" align=left>Majority:</td>
601+ <td width="400" align=left><combobox width=80 height=12 var="mojority" list=Low;Normal;Critical;></td>
602+ </tr>
603+ <tr><td></td></tr>
604+ <tr>
605+ <td width="100" align=left>Type:</td>
606+ <td width="400" align=left><combobox width=120 height=12 var="type" list=Bug-Report;Quest-Report;Skill-Report;Character-Report;Bot-Report;Other;></td>
607+ </tr>
608+ <tr><td></td></tr>
609+ <tr>
610+ <td width="100">Title:</td>
611+ <td align=left><edit var="title" width=150 height=12></td>
612+ </tr>
613+ </table>
614+ <br>
615+ <img src="l2ui.squaregray" width="500" height="1"><br>
616+ <button value="Continue to Description" action="bypass _bbsProblemReport;toDescription $mojority $type $title" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton">
617+ </center>
618+ <br>
619+ <img src="l2ui.squaregray" width="610" height="1">
620+ <br>
621+ </body>
622+</html>
623\ No newline at end of file
624Index: data/html/CommunityBoard/stats/boss/grandBoss.htm
625===================================================================
626--- data/html/CommunityBoard/stats/boss/grandBoss.htm (revision 0)
627+++ data/html/CommunityBoard/stats/boss/grandBoss.htm (revision 0)
628@@ -0,0 +1,19 @@
629+<html>
630+ <body>
631+ <br>
632+ <br><br><br>
633+ <center>
634+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
635+ <br>
636+ <font color="AAAAAA">Grand Boss Status</font>
637+ <br>
638+ <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 height=24 width=400>
639+ <tr>
640+ <td FIXWIDTH=200 align=center>Raid Name</td>
641+ <td FIXWIDTH=200 align=center>Status</td>
642+ </tr>
643+ </table>
644+ %showList%
645+ </center>
646+ </body>
647+</html>
648Index: data/html/CommunityBoard/top/passChange.htm
649===================================================================
650--- data/html/CommunityBoard/top/passChange.htm (revision 0)
651+++ data/html/CommunityBoard/top/passChange.htm (revision 0)
652@@ -0,0 +1,44 @@
653+<html>
654+ <body>
655+ <br>
656+ <br><br><br>
657+ <center>
658+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
659+ <br>
660+ <font color="AAAAAA">Password Change Function</font><br>
661+ <img src="l2ui.squaregray" width="500" height="1"><br>
662+ <br>
663+ <table width="400" cellpadding="5">
664+ <tr>
665+ <td width="45" valign="top" align="center"><img src="icon.action006" width="32" height="32"></td>
666+ <td valign="top">
667+ Changing your password often is not recommended, because<br1>
668+ more passwords means more confusion and you might forget it.
669+ </td>
670+ </tr>
671+ </table>
672+ <br>
673+ <img src="l2ui.SquareGray" width="400" height="1">
674+ <br>
675+ Please fill all the fields bellow.<br>
676+ <table width="210" cellpadding="5">
677+ <tr>
678+ <td width=100 valign="top">Current Password:</td>
679+ <td width=100 valign="top"><edit var="cur" width=100 height=12></td>
680+ </tr>
681+ <tr>
682+ <td width=100 valign="top">New Password:</td>
683+ <td width=100 valign="top"><edit var="new" width=100 height=12></td>
684+ </tr>
685+ <tr>
686+ <td width=100 valign="top">Repeat Password:</td>
687+ <td width=100 valign="top"><edit var="repeatnew" width=100 height=12></td>
688+ </tr>
689+ </table>
690+ <br>
691+ <img src="l2ui.SquareGray" width="400" height="1"><br>
692+ <button value="Change my password" action="bypass _bbsChangePass $cur $new $repeatnew" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"/>
693+ </center>
694+ <center><img src="l2ui.squaregray" width="500" height="1"></center><br>
695+ </body>
696+</html>
697Index: data/html/CommunityBoard/donation/paypal.htm
698===================================================================
699--- data/html/CommunityBoard/donation/paypal.htm (revision 0)
700+++ data/html/CommunityBoard/donation/paypal.htm (revision 0)
701@@ -0,0 +1,77 @@
702+<html>
703+ <body>
704+ <br>
705+ <center>
706+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
707+ <br>
708+ <font color="AAAAAA">Donation Via PayPal.</font>
709+ <img src="l2ui.squaregray" width="500" height="1">
710+ <br>
711+ <br>
712+ <table width=500>
713+ <tr>
714+ <td>Donation Guide:<br></td>
715+ </tr>
716+ <tr>
717+ <td>1. Firstly visit the paypal website link. (Button Bellow)<br></td>
718+ </tr>
719+ <tr>
720+ <td>2. Fill the fields in your browser and complete the donation payment.<br></td>
721+ </tr>
722+ <tr>
723+ <td>3. After everything is completed fill the fields bellow with the information from your donation.<br></td>
724+ </tr>
725+ <tr><td></td></tr>
726+ <tr>
727+ <td>4. The fields with <font color=LEVEL>*</font> are required!<br></td>
728+ </tr>
729+ <tr>
730+ <td>5. Please enter only information about your paypal account!<br></td>
731+ </tr>
732+ </table>
733+ <br>
734+ <img src="l2ui.squaregray" width="500" height="1"><br>
735+ <font color="AAAAAA">Donation Form.</font>
736+ <br>
737+ <table width=500>
738+ <tr>
739+ <td width="100" align=left>Account:</td>
740+ <td width="400" align=left>%charAcc%</td>
741+ </tr>
742+ <tr><td></td></tr>
743+ <tr>
744+ <td width="100" align=left>Character:</td>
745+ <td width="400" align=left>%charName%</td>
746+ </tr>
747+ <tr><td></td></tr>
748+ <tr><td></td></tr>
749+ <tr>
750+ <td width="75">Amount: <font color=LEVEL>*</font></td>
751+ <td width="425"><edit var="amount" width=50 height=12></td>
752+ </tr>
753+ <tr><td></td></tr>
754+ <tr>
755+ <td width="75">Email: <font color=LEVEL>*</font></td>
756+ <td width="425"><edit var="email" width=150 height=12></td>
757+ </tr>
758+ <tr><td></td></tr>
759+ <tr>
760+ <td width="75">Transaction Id: <font color=LEVEL>*</font></td>
761+ <td width="425"><edit var="transId" width=150 height=12></td>
762+ </tr>
763+ <tr><td></td></tr>
764+ <tr>
765+ <td width="75">Message: <font color=LEVEL>*</font></td>
766+ <td width="425"><edit var="message" width=300 height=12></td>
767+ </tr>
768+ </table>
769+ <br>
770+ <img src="l2ui.squaregray" width="500" height="1">
771+ <br>
772+ <button value="Submit Donation" action="bypass _bbsdonation;submitPayPal $amount $email $transId $message" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton">
773+ <br>
774+ <img src="l2ui.squaregray" width="610" height="1"><br>
775+ <br>
776+ </center>
777+ </body>
778+</html>
779\ No newline at end of file
780Index: tools/database_installer.bat
781===================================================================
782--- tools/database_installer.bat (revision 8)
783+++ tools/database_installer.bat (working copy)
784@@ -59,6 +59,7 @@
785%mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/auction.sql
786%mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/auction_bid.sql
787%mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/augmentations.sql
788+%mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/bbs_announcements.sql
789%mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/bookmarks.sql
790%mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/buffer_schemes.sql
791%mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/buylists.sql
792Index: data/html/CommunityBoard/donation/completed.htm
793===================================================================
794--- data/html/CommunityBoard/donation/completed.htm (revision 0)
795+++ data/html/CommunityBoard/donation/completed.htm (revision 0)
796@@ -0,0 +1,12 @@
797+<html>
798+ <body>
799+ <br>
800+ <br><br><br>
801+ <center>
802+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
803+ <br>
804+ Thank you for your donation!<br>
805+ Please wait while GM confirms it and you will get your reward.
806+ </center>
807+ </body>
808+</html>
809\ No newline at end of file
810Index: data/html/CommunityBoard/stats/topPk.htm
811===================================================================
812--- data/html/CommunityBoard/stats/topPk.htm (revision 0)
813+++ data/html/CommunityBoard/stats/topPk.htm (revision 0)
814@@ -0,0 +1,29 @@
815+<html>
816+ <body>
817+ <br>
818+ <br><br><br>
819+ <center>
820+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
821+ <br>
822+ <font color="AAAAAA">Top Pk Killers</font>
823+ <br>
824+ <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 height=24 width=610>
825+ <tr>
826+ <td FIXWIDTH=5></td>
827+ <td FIXWIDTH=20>#</td>
828+ <td FIXWIDTH=180>Name</td>
829+ <td FIXWIDTH=175>Class</td>
830+ <td fixwidth=60>PvP</td>
831+ <td fixwidth=60><font color="CCCC66">Pk</font></td>
832+ <td fixwidth=70 align=center>R.Points</td>
833+ <td fixwidth=140>Adenas</td>
834+ <td fixwidth=150>In Game</td>
835+ <td FIXWIDTH=65>Status</td>
836+ </tr>
837+ </table>
838+ %toppk%
839+ <br>
840+ <font color="585858">Last updated: %lastUpdate%</font>
841+ </center>
842+ </body>
843+</html>
844Index: data/html/CommunityBoard/top/repaired.htm
845===================================================================
846--- data/html/CommunityBoard/top/repaired.htm (revision 0)
847+++ data/html/CommunityBoard/top/repaired.htm (revision 0)
848@@ -0,0 +1,17 @@
849+<html>
850+ <body>
851+ <br>
852+ <br><br><br>
853+ <center>
854+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
855+ <br>
856+ <font color="AAAAAA">Character Repair Function</font><br>
857+ <img src="l2ui.squaregray" width="500" height="1"><br>
858+ <br>
859+ Repairing procedure has been successfully finished!<br>
860+ Relog now on broken character, to confirm that repairing operation was sucessfull.<br>
861+ If not, contact server Support and ask for help.<br>
862+ </center>
863+ <center><img src="l2ui.squaregray" width="500" height="1"></center><br>
864+ </body>
865+</html>
866Index: data/html/CommunityBoard/stats/olympiad/list.htm
867===================================================================
868--- data/html/CommunityBoard/stats/olympiad/list.htm (revision 0)
869+++ data/html/CommunityBoard/stats/olympiad/list.htm (revision 0)
870@@ -0,0 +1,27 @@
871+<html>
872+ <body>
873+ <br>
874+ <br><br><br>
875+ <center>
876+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
877+ <br>
878+ <font color="AAAAAA">%className% Status</font>
879+ <br>
880+ <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 width=610>
881+ <tr>
882+ <td FIXWIDTH=10></td>
883+ <td FIXWIDTH=40>#</td>
884+ <td FIXWIDTH=190>Name</td>
885+ <td FIXWIDTH=140>Class</td>
886+ <td FIXWIDTH=100>Points</td>
887+ <td FIXWIDTH=120>Competitions</td>
888+ <td FIXWIDTH=120>Clan</td>
889+ <td FIXWIDTH=120>Ally</td>
890+ <td FIXWIDTH=70>Status</td>
891+ <td FIXWIDTH=5></td>
892+ </tr>
893+ </table>
894+ %showList%
895+ </center>
896+ </body>
897+</html>
898Index: sql/bbs_announcements.sql
899===================================================================
900--- sql/bbs_announcements.sql (revision 0)
901+++ sql/bbs_announcements.sql (revision 0)
902@@ -0,0 +1,8 @@
903+CREATE TABLE IF NOT EXISTS `bbs_announcements` (
904+ `announce_id` INT NOT NULL default 0,
905+ `announce_title` varchar(150),
906+ `announce_text` varchar(1000),
907+ `announce_date` varchar(10),
908+ `author` varchar(16),
909+ PRIMARY KEY (`announce_id`)
910+);
911\ No newline at end of file
912Index: data/html/CommunityBoard/reporting/completed.htm
913===================================================================
914--- data/html/CommunityBoard/reporting/completed.htm (revision 0)
915+++ data/html/CommunityBoard/reporting/completed.htm (revision 0)
916@@ -0,0 +1,13 @@
917+<html>
918+ <body>
919+ <br>
920+ <br><br><br>
921+ <center>
922+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
923+ <br>
924+ Thank you for your report!<br>
925+ We value player's problem reports because they are important for our server.<br>
926+ Every reporting is making our server even more stronger :)
927+ </center>
928+ </body>
929+</html>
930\ No newline at end of file
931Index: data/html/CommunityBoard/stats/olympiad/main.htm
932===================================================================
933--- data/html/CommunityBoard/stats/olympiad/main.htm (revision 0)
934+++ data/html/CommunityBoard/stats/olympiad/main.htm (revision 0)
935@@ -0,0 +1,79 @@
936+<html>
937+ <body>
938+ <br>
939+ <br><br><br>
940+ <center>
941+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
942+ <br>
943+ <font color="AAAAAA">Olympiad Status</font>
944+ <br>
945+ <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 width=610>
946+ <tr>
947+ <td FIXWIDTH=10></td>
948+ <td FIXWIDTH=40>#</td>
949+ <td FIXWIDTH=190>Name</td>
950+ <td FIXWIDTH=140>Class</td>
951+ <td FIXWIDTH=100>Points</td>
952+ <td FIXWIDTH=120>Competitions</td>
953+ <td FIXWIDTH=120>Clan</td>
954+ <td FIXWIDTH=120>Ally</td>
955+ <td FIXWIDTH=70>Status</td>
956+ <td FIXWIDTH=5></td>
957+ </tr>
958+ </table>
959+ <br><br><br>
960+ <font color="AAAAAA">Please select class:</font>
961+ <br>
962+ <table border=0 cellspacing=0 cellpadding=2 width=610>
963+ <tr>
964+ <td FIXWIDTH=150 align=center><button value="Duelist" action="bypass _bbsClassList;88" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
965+ <td FIXWIDTH=150 align=center><button value="Dreadnought" action="bypass _bbsClassList;89" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
966+ <td FIXWIDTH=150 align=center><button value="Phoenix Knight" action="bypass _bbsClassList;90" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
967+ <td FIXWIDTH=150 align=center><button value="Hell Knight" action="bypass _bbsClassList;91" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
968+ </tr>
969+ <tr>
970+ <td FIXWIDTH=150 align=center><button value="Sagittarius" action="bypass _bbsClassList;92" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
971+ <td FIXWIDTH=150 align=center><button value="Adventurer" action="bypass _bbsClassList;93" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
972+ <td FIXWIDTH=150 align=center><button value="Archmage" action="bypass _bbsClassList;94" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
973+ <td FIXWIDTH=150 align=center><button value="Soultaker" action="bypass _bbsClassList;95" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
974+ </tr>
975+ <tr>
976+ <td FIXWIDTH=150 align=center><button value="Arcana Lord" action="bypass _bbsClassList;96" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
977+ <td FIXWIDTH=150 align=center><button value="Cardinal" action="bypass _bbsClassList;97" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
978+ <td FIXWIDTH=150 align=center><button value="Hierophant" action="bypass _bbsClassList;98" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
979+ <td FIXWIDTH=150 align=center><button value="Evas Templar" action="bypass _bbsClassList;99" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
980+ </tr>
981+ <tr>
982+ <td FIXWIDTH=150 align=center><button value="Sword Muse" action="bypass _bbsClassList;100" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
983+ <td FIXWIDTH=150 align=center><button value="Wind Rider" action="bypass _bbsClassList;101" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
984+ <td FIXWIDTH=150 align=center><button value="Moonlight Sentinel" action="bypass _bbsClassList;102" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
985+ <td FIXWIDTH=150 align=center><button value="Mystic Muse" action="bypass _bbsClassList;103" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
986+ </tr>
987+ <tr>
988+ <td FIXWIDTH=150 align=center><button value="Elemental Master" action="bypass _bbsClassList;104" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
989+ <td FIXWIDTH=150 align=center><button value="Evas Saint" action="bypass _bbsClassList;105" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
990+ <td FIXWIDTH=150 align=center><button value="Shillien Templar" action="bypass _bbsClassList;106" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
991+ <td FIXWIDTH=150 align=center><button value="Spectral Dancer" action="bypass _bbsClassList;107" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
992+ </tr>
993+ <tr>
994+ <td FIXWIDTH=150 align=center><button value="Ghost Hunter" action="bypass _bbsClassList;108" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
995+ <td FIXWIDTH=150 align=center><button value="Ghost Sentinel" action="bypass _bbsClassList;109" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
996+ <td FIXWIDTH=150 align=center><button value="Storm Screamer" action="bypass _bbsClassList;110" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
997+ <td FIXWIDTH=150 align=center><button value="Soultaker" action="bypass _bbsClassList;95" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
998+ </tr>
999+ <tr>
1000+ <td FIXWIDTH=150 align=center><button value="Spectral Master" action="bypass _bbsClassList;111" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
1001+ <td FIXWIDTH=150 align=center><button value="Shillien Saint" action="bypass _bbsClassList;112" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
1002+ <td FIXWIDTH=150 align=center><button value="Titan" action="bypass _bbsClassList;113" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
1003+ <td FIXWIDTH=150 align=center><button value="Grand Khavatari" action="bypass _bbsClassList;114" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
1004+ </tr>
1005+ <tr>
1006+ <td FIXWIDTH=150 align=center><button value="Dominator" action="bypass _bbsClassList;115" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
1007+ <td FIXWIDTH=150 align=center><button value="Doomcryer" action="bypass _bbsClassList;116" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
1008+ <td FIXWIDTH=150 align=center><button value="Fortune Seeker" action="bypass _bbsClassList;117" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
1009+ <td FIXWIDTH=150 align=center><button value="Maestro" action="bypass _bbsClassList;118" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
1010+ </tr>
1011+ </table>
1012+ </center>
1013+ </body>
1014+</html>
1015Index: data/html/CommunityBoard/stats/topAdena.htm
1016===================================================================
1017--- data/html/CommunityBoard/stats/topAdena.htm (revision 0)
1018+++ data/html/CommunityBoard/stats/topAdena.htm (revision 0)
1019@@ -0,0 +1,29 @@
1020+<html>
1021+ <body>
1022+ <br>
1023+ <br><br><br>
1024+ <center>
1025+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
1026+ <br>
1027+ <font color="AAAAAA">Most Rich Players</font>
1028+ <br>
1029+ <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 height=24 width=610>
1030+ <tr>
1031+ <td FIXWIDTH=5></td>
1032+ <td FIXWIDTH=20>#</td>
1033+ <td FIXWIDTH=180>Name</td>
1034+ <td FIXWIDTH=175>Class</td>
1035+ <td fixwidth=60>PvP</td>
1036+ <td fixwidth=60>Pk</td>
1037+ <td fixwidth=70 align=center>R.Points</td>
1038+ <td fixwidth=140><font color="CCCC66">Adenas</font></td>
1039+ <td fixwidth=150>In Game</td>
1040+ <td FIXWIDTH=65>Status</td>
1041+ </tr>
1042+ </table>
1043+ %topadena%
1044+ <br>
1045+ <font color="585858">Last updated: %lastUpdate%</font>
1046+ </center>
1047+ </body>
1048+</html>
1049Index: data/html/CommunityBoard/announcements/postTemplate.htm
1050===================================================================
1051--- data/html/CommunityBoard/announcements/postTemplate.htm (revision 0)
1052+++ data/html/CommunityBoard/announcements/postTemplate.htm (revision 0)
1053@@ -0,0 +1,26 @@
1054+<html>
1055+ <body>
1056+ <br>
1057+ <br><br><br>
1058+ <center>
1059+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
1060+ <br>
1061+ <font color="AAAAAA">%title%</font>
1062+ <br>
1063+ <table width=500 bgcolor="000000">
1064+ <tr>
1065+ <td width=100 height=18 align="center">Published at %date% by <font color="88FF11">%author%</font></td>
1066+ </tr>
1067+ </table>
1068+ <br>
1069+ <table width=500>
1070+ <tr>
1071+ <td>%text%</td>
1072+ </tr>
1073+ </table>
1074+ </center>
1075+ <br>
1076+ <img src="l2ui.squaregray" width="610" height="1">
1077+ <br>
1078+ </body>
1079+</html>
1080\ No newline at end of file
1081Index: data/html/CommunityBoard/donation/main.htm
1082===================================================================
1083--- data/html/CommunityBoard/donation/main.htm (revision 0)
1084+++ data/html/CommunityBoard/donation/main.htm (revision 0)
1085@@ -0,0 +1,45 @@
1086+<html>
1087+ <body>
1088+ <br>
1089+ <br><br><br>
1090+ <center>
1091+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
1092+ <br>
1093+ <font color="AAAAAA">Donation Rules & Terms of agreement.</font>
1094+ <img src="l2ui.squaregray" width="500" height="1">
1095+ <br>
1096+ <br>
1097+ <table width=500>
1098+ <tr>
1099+ <td>1. Donating is completely voluntary and is not needed to play our server, by submitting any type of donation to us, you agree that its a one-way contribution and you are not entitled to receive anything. Donations will not be refunded under any circumstances. If one were to recall their donation they will lose their donated items and will have their accounts suspended.<br></td>
1100+ </tr>
1101+ <tr>
1102+ <td>2. Most donation reward like gear are exchangable for up to 72 hours after that there will be no free exchanging. Please choose carefully when deciding what items you wish to receive. There are no discounts or extra items unless its in the special offers section. So please never ask for discounts or extra items your donation unless your referring to the special offers list or some sort of announcement.<br></td>
1103+ </tr>
1104+ <tr>
1105+ <td>3. You may not sell any donation rewards to another player for real world currency, if you do, the rewards will be deleted and and punishment will be taken.<br></td>
1106+ </tr>
1107+ <tr>
1108+ <td>4. If one loses their donated items from trading, scamming, dropping from karma, or really any way at all, you are not entitled to reimbursement.<br></td>
1109+ </tr>
1110+ <tr>
1111+ <td>5. People who donate will not receive any sort of special treatment, they still have to follow the rules and will be punished likewise, donators and non-donaters are equals. prejudice towards donators and non donators will not be tolerated.<br></td>
1112+ </tr>
1113+ <tr>
1114+ <td>6. After you have donated please state the following, in a forum private message to Administrator, in this format<br></td>
1115+ </tr>
1116+ </table>
1117+ <br>
1118+ <img src="l2ui.squaregray" width="500" height="1"><br>
1119+ <table width=300>
1120+ <tr>
1121+ <td><button value="I Agree" action="bypass _bbshome;../donation/showMethods.htm" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
1122+ <td><button value="I Disagee" action="bypass _bbshome" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
1123+ </tr>
1124+ </table>
1125+ </center>
1126+ <br>
1127+ <img src="l2ui.squaregray" width="610" height="1">
1128+ <br>
1129+ </body>
1130+</html>
1131\ No newline at end of file
1132Index: data/html/CommunityBoard/stats/topPvp.htm
1133===================================================================
1134--- data/html/CommunityBoard/stats/topPvp.htm (revision 0)
1135+++ data/html/CommunityBoard/stats/topPvp.htm (revision 0)
1136@@ -0,0 +1,29 @@
1137+<html>
1138+ <body>
1139+ <br>
1140+ <br><br><br>
1141+ <center>
1142+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
1143+ <br>
1144+ <font color="AAAAAA">Top PvP Killers</font>
1145+ <br>
1146+ <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 height=24 width=610>
1147+ <tr>
1148+ <td FIXWIDTH=5></td>
1149+ <td FIXWIDTH=20>#</td>
1150+ <td FIXWIDTH=180>Name</td>
1151+ <td FIXWIDTH=175>Class</td>
1152+ <td fixwidth=60><font color="CCCC66">PvP</font></td>
1153+ <td fixwidth=60>Pk</td>
1154+ <td fixwidth=70 align=center>R.Points</td>
1155+ <td fixwidth=140>Adenas</td>
1156+ <td fixwidth=150>In Game</td>
1157+ <td FIXWIDTH=65>Status</td>
1158+ </tr>
1159+ </table>
1160+ %toppvp%
1161+ <br>
1162+ <font color="585858">Last updated: %lastUpdate%</font>
1163+ </center>
1164+ </body>
1165+</html>
1166Index: tools/full_install.sql
1167===================================================================
1168--- tools/full_install.sql (revision 8)
1169+++ tools/full_install.sql (working copy)
1170@@ -3,6 +3,7 @@
1171 DROP TABLE IF EXISTS auction;
1172 DROP TABLE IF EXISTS auction_bid;
1173 DROP TABLE IF EXISTS augmentations;
1174+DROP TABLE IF EXISTS bbs_announcements;
1175 DROP TABLE IF EXISTS bookmarks;
1176 DROP TABLE IF EXISTS buffer_schemes;
1177 DROP TABLE IF EXISTS buylists;
1178Index: data/html/CommunityBoard/top/passChanged.htm
1179===================================================================
1180--- data/html/CommunityBoard/top/passChanged.htm (revision 0)
1181+++ data/html/CommunityBoard/top/passChanged.htm (revision 0)
1182@@ -0,0 +1,16 @@
1183+<html>
1184+ <body>
1185+ <br>
1186+ <br><br><br>
1187+ <center>
1188+ <img src="L2UI_CH3.herotower_deco" width=256 height=32>
1189+ <br>
1190+ <font color="AAAAAA">Password Change Function</font><br>
1191+ <img src="l2ui.squaregray" width="500" height="1"><br>
1192+ <br>
1193+ Password changing procedure has been successfully finished!<br>
1194+ Please re-login to confirm your new password.<br>
1195+ </center>
1196+ <center><img src="l2ui.squaregray" width="500" height="1"></center><br>
1197+ </body>
1198+</html>
1199#P aCis_gameserver
1200Index: java/net/sf/l2j/gameserver/communitybbs/Manager/StatsBBSManager.java
1201===================================================================
1202--- java/net/sf/l2j/gameserver/communitybbs/Manager/StatsBBSManager.java (revision 0)
1203+++ java/net/sf/l2j/gameserver/communitybbs/Manager/StatsBBSManager.java (revision 0)
1204@@ -0,0 +1,120 @@
1205+/*
1206+ * This program is free software: you can redistribute it and/or modify it under
1207+ * the terms of the GNU General Public License as published by the Free Software
1208+ * Foundation, either version 3 of the License, or (at your option) any later
1209+ * version.
1210+ *
1211+ * This program is distributed in the hope that it will be useful, but WITHOUT
1212+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1213+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1214+ * details.
1215+ *
1216+ * You should have received a copy of the GNU General Public License along with
1217+ * this program. If not, see <http://www.gnu.org/licenses/>.
1218+ */
1219+package net.sf.l2j.gameserver.communitybbs.Manager;
1220+
1221+import java.util.StringTokenizer;
1222+
1223+import net.sf.l2j.gameserver.cache.HtmCache;
1224+import net.sf.l2j.gameserver.communitybbs.tasks.PlayerStatsUpdateTask;
1225+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
1226+
1227+public class StatsBBSManager extends BaseBBSManager
1228+{
1229+ @Override
1230+ public void parseCmd(String command, L2PcInstance activeChar)
1231+ {
1232+ if (command.startsWith("_bbsstats"))
1233+ {
1234+ StringTokenizer st = new StringTokenizer(command, ";");
1235+ st.nextToken();
1236+ String secondCommand = st.nextToken();
1237+ if (secondCommand.equals("pvp"))
1238+ {
1239+ showTopPvpList(activeChar);
1240+ }
1241+ else if (secondCommand.equals("pk"))
1242+ {
1243+ showTopPkList(activeChar);
1244+ }
1245+ else if (secondCommand.equals("raid"))
1246+ {
1247+ showTopRaidList(activeChar);
1248+ }
1249+ else if (secondCommand.equals("adena"))
1250+ {
1251+ showTopAdenaList(activeChar);
1252+ }
1253+ else if (secondCommand.equals("online"))
1254+ {
1255+ showTopOnlineList(activeChar);
1256+ }
1257+ }
1258+ else
1259+ {
1260+ super.parseCmd(command, activeChar);
1261+ }
1262+ }
1263+
1264+ @Override
1265+ protected String getFolder()
1266+ {
1267+ return "stats/";
1268+ }
1269+
1270+ public static StatsBBSManager getInstance()
1271+ {
1272+ return SingletonHolder._instance;
1273+ }
1274+
1275+ private static void showTopPvpList(L2PcInstance activeChar)
1276+ {
1277+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/topPvp.htm");
1278+
1279+ content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
1280+ content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
1281+ separateAndSend(content, activeChar);
1282+ }
1283+
1284+ private static void showTopPkList(L2PcInstance activeChar)
1285+ {
1286+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/topPk.htm");
1287+
1288+ content = content.replaceAll("%toppk%", PlayerStatsUpdateTask.pkList());
1289+ content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
1290+ separateAndSend(content, activeChar);
1291+ }
1292+
1293+ private static void showTopRaidList(L2PcInstance activeChar)
1294+ {
1295+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/topRaid.htm");
1296+
1297+ content = content.replaceAll("%topraid%", PlayerStatsUpdateTask.raidList());
1298+ content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
1299+ separateAndSend(content, activeChar);
1300+ }
1301+
1302+ private static void showTopAdenaList(L2PcInstance activeChar)
1303+ {
1304+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/topAdena.htm");
1305+
1306+ content = content.replaceAll("%topadena%", PlayerStatsUpdateTask.adenaList());
1307+ content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
1308+ separateAndSend(content, activeChar);
1309+ }
1310+
1311+ private static void showTopOnlineList(L2PcInstance activeChar)
1312+ {
1313+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/topOnline.htm");
1314+
1315+ content = content.replaceAll("%toponline%", PlayerStatsUpdateTask.onlineList());
1316+ content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
1317+ separateAndSend(content, activeChar);
1318+ }
1319+
1320+ private static class SingletonHolder
1321+ {
1322+ protected static final StatsBBSManager _instance = new StatsBBSManager();
1323+ }
1324+}
1325Index: java/net/sf/l2j/gameserver/GameServer.java
1326===================================================================
1327--- java/net/sf/l2j/gameserver/GameServer.java (revision 8)
1328+++ java/net/sf/l2j/gameserver/GameServer.java (working copy)
1329@@ -31,6 +31,8 @@
1330 import net.sf.l2j.gameserver.cache.CrestCache;
1331 import net.sf.l2j.gameserver.cache.HtmCache;
1332 import net.sf.l2j.gameserver.communitybbs.Manager.ForumsBBSManager;
1333+import net.sf.l2j.gameserver.communitybbs.tasks.AnnouncementsUpdateManager;
1334+import net.sf.l2j.gameserver.communitybbs.tasks.PlayerStatsUpdateTask;
1335 import net.sf.l2j.gameserver.datatables.AccessLevels;
1336 import net.sf.l2j.gameserver.datatables.AdminCommandAccessRights;
1337 import net.sf.l2j.gameserver.datatables.ArmorSetsTable;
1338@@ -181,7 +183,11 @@
1339
1340 Util.printSection("Community server");
1341 if (Config.ENABLE_COMMUNITY_BOARD) // Forums has to be loaded before clan data
1342+ {
1343+ AnnouncementsUpdateManager.loadSection();
1344+ PlayerStatsUpdateTask.updateTask();
1345 ForumsBBSManager.getInstance().initRoot();
1346+ }
1347 else
1348 _log.config("Community server is disabled.");
1349
1350Index: java/net/sf/l2j/L2DatabaseFactory.java
1351===================================================================
1352--- java/net/sf/l2j/L2DatabaseFactory.java (revision 8)
1353+++ java/net/sf/l2j/L2DatabaseFactory.java (working copy)
1354@@ -168,4 +168,13 @@
1355 }
1356 }
1357 }
1358+
1359+ public static void close(Connection con)
1360+ {
1361+ try
1362+ {
1363+ con.close();
1364+ }
1365+ catch (Exception e) {}
1366+ }
1367 }
1368\ No newline at end of file
1369Index: java/net/sf/l2j/gameserver/communitybbs/CommunityBoard.java
1370===================================================================
1371--- java/net/sf/l2j/gameserver/communitybbs/CommunityBoard.java (revision 8)
1372+++ java/net/sf/l2j/gameserver/communitybbs/CommunityBoard.java (working copy)
1373@@ -15,12 +15,20 @@
1374 package net.sf.l2j.gameserver.communitybbs;
1375
1376 import net.sf.l2j.Config;
1377+import net.sf.l2j.gameserver.communitybbs.Manager.AnnouncementsBBSManager;
1378 import net.sf.l2j.gameserver.communitybbs.Manager.BaseBBSManager;
1379+import net.sf.l2j.gameserver.communitybbs.Manager.BossBBSManager;
1380 import net.sf.l2j.gameserver.communitybbs.Manager.ClanBBSManager;
1381+import net.sf.l2j.gameserver.communitybbs.Manager.DonationBBSManager;
1382 import net.sf.l2j.gameserver.communitybbs.Manager.FriendsBBSManager;
1383 import net.sf.l2j.gameserver.communitybbs.Manager.MailBBSManager;
1384+import net.sf.l2j.gameserver.communitybbs.Manager.OlStatsBBSManager;
1385+import net.sf.l2j.gameserver.communitybbs.Manager.PasswordBBSManager;
1386 import net.sf.l2j.gameserver.communitybbs.Manager.PostBBSManager;
1387+import net.sf.l2j.gameserver.communitybbs.Manager.ProblemReportBBSManager;
1388 import net.sf.l2j.gameserver.communitybbs.Manager.RegionBBSManager;
1389+import net.sf.l2j.gameserver.communitybbs.Manager.RepairBBSManager;
1390+import net.sf.l2j.gameserver.communitybbs.Manager.StatsBBSManager;
1391 import net.sf.l2j.gameserver.communitybbs.Manager.TopBBSManager;
1392 import net.sf.l2j.gameserver.communitybbs.Manager.TopicBBSManager;
1393 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
1394@@ -66,6 +74,38 @@
1395 TopicBBSManager.getInstance().parseCmd(command, activeChar);
1396 else if (command.startsWith("_bbsposts"))
1397 PostBBSManager.getInstance().parseCmd(command, activeChar);
1398+ else if (command.startsWith("_bbsstats"))
1399+ {
1400+ StatsBBSManager.getInstance().parseCmd(command, activeChar);
1401+ }
1402+ else if ((command.startsWith("_bbsOlStats")) || (command.startsWith("_bbsClassList")))
1403+ {
1404+ OlStatsBBSManager.getInstance().parseCmd(command, activeChar);
1405+ }
1406+ else if (command.startsWith("_bbsannouncements"))
1407+ {
1408+ AnnouncementsBBSManager.getInstance().parseCmd(command, activeChar);
1409+ }
1410+ else if (command.startsWith("_bbsdonation"))
1411+ {
1412+ DonationBBSManager.getInstance().parseCmd(command, activeChar);
1413+ }
1414+ else if (command.startsWith("_bbsProblemReport"))
1415+ {
1416+ ProblemReportBBSManager.getInstance().parseCmd(command, activeChar);
1417+ }
1418+ else if (command.equals("_bbsGrandBoss"))
1419+ {
1420+ BossBBSManager.getInstance().parseCmd(command, activeChar);
1421+ }
1422+ else if ((command.equals("_bbsShowRepair")) || (command.startsWith("_bbsRepair")))
1423+ {
1424+ RepairBBSManager.getInstance().parseCmd(command, activeChar);
1425+ }
1426+ else if ((command.equals("_bbsPassPanel")) || (command.startsWith("_bbsChangePass")))
1427+ {
1428+ PasswordBBSManager.getInstance().parseCmd(command, activeChar);
1429+ }
1430 else
1431 BaseBBSManager.separateAndSend("<html><body><br><br><center>The command: " + command + " isn't implemented.</center></body></html>", activeChar);
1432 }
1433Index: java/net/sf/l2j/gameserver/communitybbs/Manager/RepairBBSManager.java
1434===================================================================
1435--- java/net/sf/l2j/gameserver/communitybbs/Manager/RepairBBSManager.java (revision 0)
1436+++ java/net/sf/l2j/gameserver/communitybbs/Manager/RepairBBSManager.java (revision 0)
1437@@ -0,0 +1,315 @@
1438+/*
1439+ * This program is free software: you can redistribute it and/or modify it under
1440+ * the terms of the GNU General Public License as published by the Free Software
1441+ * Foundation, either version 3 of the License, or (at your option) any later
1442+ * version.
1443+ *
1444+ * This program is distributed in the hope that it will be useful, but WITHOUT
1445+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1446+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1447+ * details.
1448+ *
1449+ * You should have received a copy of the GNU General Public License along with
1450+ * this program. If not, see <http://www.gnu.org/licenses/>.
1451+ */
1452+package net.sf.l2j.gameserver.communitybbs.Manager;
1453+
1454+import java.sql.Connection;
1455+import java.sql.PreparedStatement;
1456+import java.sql.ResultSet;
1457+import java.sql.SQLException;
1458+import java.util.StringTokenizer;
1459+import java.util.logging.Logger;
1460+
1461+import net.sf.l2j.Config;
1462+import net.sf.l2j.L2DatabaseFactory;
1463+import net.sf.l2j.gameserver.cache.HtmCache;
1464+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
1465+
1466+public class RepairBBSManager extends BaseBBSManager
1467+{
1468+ private static final Logger _log = Logger.getLogger(RepairBBSManager.class.getName());
1469+
1470+ public static RepairBBSManager getInstance()
1471+ {
1472+ return SingletonHolder._instance;
1473+ }
1474+
1475+ @Override
1476+ public void parseCmd(String command, L2PcInstance activeChar)
1477+ {
1478+ if (command.equals("_bbsShowRepair"))
1479+ {
1480+ showRepairWindow(activeChar);
1481+ }
1482+ else if (command.startsWith("_bbsRepair"))
1483+ {
1484+ StringTokenizer st = new StringTokenizer(command);
1485+ st.nextToken();
1486+ String repairChar = st.nextToken();
1487+ if (repairChar == null)
1488+ {
1489+ activeChar.sendMessage("Please first select character to be repaired.");
1490+ return;
1491+ }
1492+ if (checkAcc(activeChar, repairChar))
1493+ {
1494+ if (checkChar(activeChar, repairChar))
1495+ {
1496+ activeChar.sendMessage("You cannot repair your self.");
1497+ return;
1498+ }
1499+ if (checkJail(activeChar, repairChar))
1500+ {
1501+ activeChar.sendMessage("The character that you are attempting to repair is in jail and this function cannot be used to help him.");
1502+ return;
1503+ }
1504+ repairBadCharacter(repairChar);
1505+ separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/repaired.htm"), activeChar);
1506+ }
1507+ else
1508+ {
1509+ activeChar.sendMessage("Something went wrong. Please contact with the server's administrator.");
1510+ return;
1511+ }
1512+ }
1513+ else
1514+ {
1515+ super.parseCmd(command, activeChar);
1516+ }
1517+ }
1518+
1519+ private static void showRepairWindow(L2PcInstance activeChar)
1520+ {
1521+ if (Config.ENABLE_REPAIR_BBS)
1522+ {
1523+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/repair.htm");
1524+
1525+ content = content.replaceAll("%acc_chars%", getCharList(activeChar));
1526+ separateAndSend(content, activeChar);
1527+ }
1528+ else
1529+ {
1530+ separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/functionDisabled.htm"), activeChar);
1531+ }
1532+ }
1533+
1534+ private static String getCharList(L2PcInstance activeChar)
1535+ {
1536+ String result = "";
1537+ String repCharAcc = activeChar.getAccountName();
1538+ Connection con = null;
1539+ try
1540+ {
1541+ con = L2DatabaseFactory.getInstance().getConnection();
1542+ PreparedStatement statement = con.prepareStatement("SELECT char_name FROM characters WHERE account_name=?");
1543+ statement.setString(1, repCharAcc);
1544+ ResultSet rset = statement.executeQuery();
1545+ while (rset.next())
1546+ {
1547+ if (activeChar.getName().compareTo(rset.getString(1)) != 0)
1548+ {
1549+ result = result + rset.getString(1) + ";";
1550+ }
1551+ }
1552+ rset.close();
1553+ statement.close();
1554+ }
1555+ catch (SQLException e)
1556+ {
1557+ e.printStackTrace();
1558+ return result;
1559+ }
1560+ finally
1561+ {
1562+ L2DatabaseFactory.close(con);
1563+ }
1564+ return result;
1565+ }
1566+
1567+ @SuppressWarnings("null")
1568+ private static boolean checkAcc(L2PcInstance activeChar, String repairChar)
1569+ {
1570+ boolean result = false;
1571+ String repCharAcc = "";
1572+ Connection con = null;
1573+ try
1574+ {
1575+ con = L2DatabaseFactory.getInstance().getConnection();
1576+ PreparedStatement statement = con.prepareStatement("SELECT account_name FROM characters WHERE char_name=?");
1577+ statement.setString(1, repairChar);
1578+ ResultSet rset = statement.executeQuery();
1579+ if (rset.next())
1580+ {
1581+ repCharAcc = rset.getString(1);
1582+ }
1583+ rset.close();
1584+ statement.close();
1585+ try
1586+ {
1587+ if (con != null)
1588+ {
1589+ con.close();
1590+ }
1591+ }
1592+ catch (SQLException e)
1593+ {
1594+ e.printStackTrace();
1595+ }
1596+ if (activeChar.getAccountName().compareTo(repCharAcc) != 0)
1597+ {
1598+ return result;
1599+ }
1600+ }
1601+ catch (SQLException e)
1602+ {
1603+ e.printStackTrace();
1604+ return result;
1605+ }
1606+ finally
1607+ {
1608+ try
1609+ {
1610+ if (con != null)
1611+ {
1612+ con.close();
1613+ }
1614+ }
1615+ catch (SQLException e)
1616+ {
1617+ e.printStackTrace();
1618+ }
1619+ }
1620+ result = true;
1621+ return result;
1622+ }
1623+
1624+ @SuppressWarnings("null")
1625+ private static boolean checkJail(L2PcInstance activeChar, String repairChar)
1626+ {
1627+ boolean result = false;
1628+ int repCharJail = 0;
1629+ Connection con = null;
1630+ try
1631+ {
1632+ con = L2DatabaseFactory.getInstance().getConnection();
1633+ PreparedStatement statement = con.prepareStatement("SELECT punish_level FROM characters WHERE char_name=?");
1634+ statement.setString(1, repairChar);
1635+ ResultSet rset = statement.executeQuery();
1636+ if (rset.next())
1637+ {
1638+ repCharJail = rset.getInt(1);
1639+ }
1640+ rset.close();
1641+ statement.close();
1642+ try
1643+ {
1644+ if (con != null)
1645+ {
1646+ con.close();
1647+ }
1648+ }
1649+ catch (SQLException e)
1650+ {
1651+ e.printStackTrace();
1652+ }
1653+ if (repCharJail <= 1)
1654+ {
1655+ return result;
1656+ }
1657+ }
1658+ catch (SQLException e)
1659+ {
1660+ e.printStackTrace();
1661+ return result;
1662+ }
1663+ finally
1664+ {
1665+ try
1666+ {
1667+ if (con != null)
1668+ {
1669+ con.close();
1670+ }
1671+ }
1672+ catch (SQLException e)
1673+ {
1674+ e.printStackTrace();
1675+ }
1676+ }
1677+ result = true;
1678+ return result;
1679+ }
1680+
1681+ private static boolean checkChar(L2PcInstance activeChar, String repairChar)
1682+ {
1683+ boolean result = false;
1684+ if (activeChar.getName().compareTo(repairChar) == 0)
1685+ {
1686+ result = true;
1687+ }
1688+ return result;
1689+ }
1690+
1691+ private static void repairBadCharacter(String charName)
1692+ {
1693+ Connection con = null;
1694+ try
1695+ {
1696+ con = L2DatabaseFactory.getInstance().getConnection();
1697+
1698+ PreparedStatement statement = con.prepareStatement("SELECT obj_Id FROM characters WHERE char_name=?");
1699+ statement.setString(1, charName);
1700+ ResultSet rset = statement.executeQuery();
1701+
1702+ int objId = 0;
1703+ if (rset.next())
1704+ {
1705+ objId = rset.getInt(1);
1706+ }
1707+ rset.close();
1708+ statement.close();
1709+ if (objId == 0)
1710+ {
1711+ con.close();
1712+ return;
1713+ }
1714+ statement = con.prepareStatement("UPDATE characters SET x=17867, y=170259, z=-3503 WHERE obj_Id=?");
1715+ statement.setInt(1, objId);
1716+ statement.execute();
1717+ statement.close();
1718+ statement = con.prepareStatement("DELETE FROM character_shortcuts WHERE char_obj_id=?");
1719+ statement.setInt(1, objId);
1720+ statement.execute();
1721+ statement.close();
1722+ statement = con.prepareStatement("UPDATE items SET loc=\"WAREHOUSE\" WHERE owner_id=? AND loc=\"PAPERDOLL\"");
1723+ statement.setInt(1, objId);
1724+ statement.execute();
1725+ statement.close(); return;
1726+ }
1727+ catch (Exception e)
1728+ {
1729+ _log.warning("GameServer: could not repair character:" + e);
1730+ }
1731+ finally
1732+ {
1733+
1734+ try
1735+ {
1736+ if (con != null)
1737+ {
1738+ con.close();
1739+ }
1740+ }
1741+ catch (SQLException e)
1742+ {
1743+ e.printStackTrace();
1744+ }
1745+ }
1746+ }
1747+
1748+ private static class SingletonHolder
1749+ {
1750+ protected static final RepairBBSManager _instance = new RepairBBSManager();
1751+ }
1752+}
1753\ No newline at end of file
1754Index: java/net/sf/l2j/gameserver/communitybbs/tasks/AnnouncementsUpdateManager.java
1755===================================================================
1756--- java/net/sf/l2j/gameserver/communitybbs/tasks/AnnouncementsUpdateManager.java (revision 0)
1757+++ java/net/sf/l2j/gameserver/communitybbs/tasks/AnnouncementsUpdateManager.java (revision 0)
1758@@ -0,0 +1,161 @@
1759+/*
1760+ * This program is free software: you can redistribute it and/or modify it under
1761+ * the terms of the GNU General Public License as published by the Free Software
1762+ * Foundation, either version 3 of the License, or (at your option) any later
1763+ * version.
1764+ *
1765+ * This program is distributed in the hope that it will be useful, but WITHOUT
1766+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1767+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1768+ * details.
1769+ *
1770+ * You should have received a copy of the GNU General Public License along with
1771+ * this program. If not, see <http://www.gnu.org/licenses/>.
1772+ */
1773+package net.sf.l2j.gameserver.communitybbs.tasks;
1774+
1775+import java.sql.Connection;
1776+import java.sql.PreparedStatement;
1777+import java.sql.ResultSet;
1778+import java.sql.SQLException;
1779+import java.util.logging.Level;
1780+import java.util.logging.Logger;
1781+
1782+import net.sf.l2j.L2DatabaseFactory;
1783+
1784+public class AnnouncementsUpdateManager
1785+{
1786+ static Logger _log = Logger.getLogger(AnnouncementsUpdateManager.class.getName());
1787+
1788+ private static StringBuilder _announcementsList = new StringBuilder();
1789+
1790+ public static void loadSection()
1791+ {
1792+ _log.log(Level.INFO, "[CommunityBoard]: Loading announcements section.");
1793+ try
1794+ {
1795+ Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
1796+ try
1797+ {
1798+ PreparedStatement st = con.prepareStatement("SELECT announce_id,announce_title,announce_date FROM bbs_announcements ORDER BY announce_id DESC LIMIT 5;");
1799+ ResultSet rset = st.executeQuery();
1800+
1801+ int id = 0;
1802+ String title = "";
1803+ String date = "";
1804+ while (rset.next())
1805+ {
1806+ id = rset.getInt("announce_id");
1807+ title = rset.getString("announce_title");
1808+ date = rset.getString("announce_date");
1809+
1810+ _announcementsList.append("<table width=610 height=40><tr>");
1811+ _announcementsList.append("<td width=50 align=center>" + id + "</td>");
1812+ _announcementsList.append("<td width=400 align=left><a action=\"bypass _bbsannouncements;read " + id + "\">" + title + "</a></td>");
1813+ _announcementsList.append("<td width=100 align=center>" + date + "</td>");
1814+ _announcementsList.append("</tr></table><img src=\"l2ui.squaregray\" width=\"610\" height=\"1\">");
1815+ }
1816+ rset.close();
1817+ st.close();
1818+ }
1819+ catch (Throwable localThrowable1)
1820+ {
1821+ localThrowable3 = localThrowable1;throw localThrowable1;
1822+ }
1823+ finally
1824+ {
1825+ if (con != null)
1826+ {
1827+ if (localThrowable3 != null)
1828+ {
1829+ try
1830+ {
1831+ con.close();
1832+ }
1833+ catch (Throwable localThrowable2)
1834+ {
1835+ localThrowable3.addSuppressed(localThrowable2);
1836+ }
1837+ }
1838+ else
1839+ {
1840+ con.close();
1841+ }
1842+ }
1843+ }
1844+ }
1845+ catch (SQLException e)
1846+ {
1847+ _log.log(Level.WARNING, "Failed to load announcements list " + e.getMessage(), e);
1848+ }
1849+ }
1850+
1851+ public static void updateList()
1852+ {
1853+ _log.log(Level.INFO, "[CommunityBoard]: Announcements section has been updated.");
1854+
1855+ _announcementsList.delete(0, _announcementsList.length());
1856+ try
1857+ {
1858+ Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
1859+ try
1860+ {
1861+ PreparedStatement st = con.prepareStatement("SELECT announce_id,announce_title,announce_date FROM bbs_announcements ORDER BY announce_id DESC LIMIT 5;");
1862+ ResultSet rset = st.executeQuery();
1863+
1864+
1865+ int id = 0;
1866+ String title = "";
1867+ String date = "";
1868+ while (rset.next())
1869+ {
1870+ id = rset.getInt("announce_id");
1871+ title = rset.getString("announce_title");
1872+ date = rset.getString("announce_date");
1873+
1874+ _announcementsList.append("<table width=610 height=40><tr>");
1875+ _announcementsList.append("<td width=50 align=center>" + id + "</td>");
1876+ _announcementsList.append("<td width=400 align=left><a action=\"bypass _bbsannouncements;read " + id + "\">" + title + "</a></td>");
1877+ _announcementsList.append("<td width=100 align=center>" + date + "</td>");
1878+ _announcementsList.append("</tr></table><img src=\"l2ui.squaregray\" width=\"610\" height=\"1\">");
1879+ }
1880+ rset.close();
1881+ st.close();
1882+ }
1883+ catch (Throwable localThrowable1)
1884+ {
1885+ localThrowable3 = localThrowable1;throw localThrowable1;
1886+ }
1887+ finally
1888+ {
1889+ if (con != null)
1890+ {
1891+ if (localThrowable3 != null)
1892+ {
1893+ try
1894+ {
1895+ con.close();
1896+ }
1897+ catch (Throwable localThrowable2)
1898+ {
1899+ localThrowable3.addSuppressed(localThrowable2);
1900+ }
1901+ }
1902+ else
1903+ {
1904+ con.close();
1905+ }
1906+ }
1907+ }
1908+ }
1909+ catch (SQLException e)
1910+ {
1911+ _log.log(Level.WARNING, "Failed to update announcements list " + e.getMessage(), e);
1912+ }
1913+ }
1914+
1915+ public static String showList()
1916+ {
1917+ return _announcementsList.toString();
1918+ }
1919+}
1920\ No newline at end of file
1921Index: java/net/sf/l2j/Config.java
1922===================================================================
1923--- java/net/sf/l2j/Config.java (revision 11)
1924+++ java/net/sf/l2j/Config.java (working copy)
1925@@ -644,6 +644,13 @@
1926 /** Community Board */
1927 public static boolean ENABLE_COMMUNITY_BOARD;
1928 public static String BBS_DEFAULT;
1929+ public static boolean ENABLE_PAY_SAFE_DONATION_BBS;
1930+ public static boolean ENABLE_PAY_PAL_DONATION_BBS;
1931+ public static int TOP_PLAYER_ROW_HEIGHT;
1932+ public static int TOP_PLAYER_RESULTS;
1933+ public static boolean ENABLE_BBS_REPORT;
1934+ public static boolean ENABLE_REPAIR_BBS;
1935+ public static boolean ENABLE_BBS_PASS_CHANGE;
1936
1937 /** Misc */
1938 public static boolean L2WALKER_PROTECTION;
1939@@ -1239,6 +1246,13 @@
1940
1941 ENABLE_COMMUNITY_BOARD = server.getProperty("EnableCommunityBoard", false);
1942 BBS_DEFAULT = server.getProperty("BBSDefault", "_bbshome");
1943+ ENABLE_PAY_SAFE_DONATION_BBS = server.getProperty("EnablePaySafeBBSDonation", true);
1944+ ENABLE_PAY_PAL_DONATION_BBS = server.getProperty("EnablePayPalBBSDonation", true);
1945+ TOP_PLAYER_ROW_HEIGHT = server.getProperty("TopPlayerRowHeight", 19);
1946+ TOP_PLAYER_RESULTS = server.getProperty("TopPlayerResults", 15);
1947+ ENABLE_BBS_REPORT = server.getProperty("EnableProblemReportingBBSFuncion", true);
1948+ ENABLE_REPAIR_BBS = server.getProperty("EnableRepairBBS", true);
1949+ ENABLE_BBS_PASS_CHANGE = server.getProperty("EnablePasswordChangeBBS", true);
1950
1951 L2WALKER_PROTECTION = server.getProperty("L2WalkerProtection", false);
1952 AUTODELETE_INVALID_QUEST_DATA = server.getProperty("AutoDeleteInvalidQuestData", false);
1953Index: config/server.properties
1954===================================================================
1955--- config/server.properties (revision 11)
1956+++ config/server.properties (working copy)
1957@@ -275,11 +275,46 @@
1958 # =================================================================
1959
1960 # Activate or no the community board.
1961-EnableCommunityBoard = False
1962+EnableCommunityBoard = True
1963
1964 # Show this community board section when you open it.
1965 BBSDefault = _bbshome
1966
1967+# Donation Functions
1968+# - Donations will be saved into /data/donations/ folder.
1969+# - And message will be send to the staff on login if there are new donations.
1970+# - Once you've confirmed the donation delete the file or move it to other
1971+# - folder because the system will not allow more donations from that player.
1972+# Default: False
1973+EnablePaySafeBBSDonation = True
1974+
1975+# PayPal donation Page.
1976+# Default: False
1977+EnablePayPalBBSDonation = True
1978+
1979+# Top Players Options
1980+# Default value: 24
1981+TopPlayerRowHeight = 24
1982+
1983+# Here you can specify the amount of the results that will be displayed.
1984+# Default value: 15
1985+TopPlayerResults = 15
1986+
1987+# Problem Reporting Function.
1988+# - Problem reports will be saved into /data/reports/ folder.
1989+# - Staff members will receive message on enter world if there is any bug report.
1990+# - The file should be deleted / moved to other folder after reading it because the player will not be able to submit more reports.
1991+# Default: False
1992+EnableProblemReportingBBSFuncion = True
1993+
1994+# Character Repair Function.
1995+# Default: False
1996+EnableRepairBBS = True
1997+
1998+# Password Change Function.
1999+# Default: False
2000+EnablePasswordChangeBBS = True
2001+
2002# =================================================================
2003# Misc
2004# =================================================================
2005Index: java/net/sf/l2j/gameserver/communitybbs/Manager/BossBBSManager.java
2006===================================================================
2007--- java/net/sf/l2j/gameserver/communitybbs/Manager/BossBBSManager.java (revision 0)
2008+++ java/net/sf/l2j/gameserver/communitybbs/Manager/BossBBSManager.java (revision 0)
2009@@ -0,0 +1,98 @@
2010+/*
2011+ * This program is free software: you can redistribute it and/or modify it under
2012+ * the terms of the GNU General Public License as published by the Free Software
2013+ * Foundation, either version 3 of the License, or (at your option) any later
2014+ * version.
2015+ *
2016+ * This program is distributed in the hope that it will be useful, but WITHOUT
2017+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2018+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
2019+ * details.
2020+ *
2021+ * You should have received a copy of the GNU General Public License along with
2022+ * this program. If not, see <http://www.gnu.org/licenses/>.
2023+ */
2024+package net.sf.l2j.gameserver.communitybbs.Manager;
2025+
2026+import java.util.logging.Level;
2027+import java.util.logging.Logger;
2028+
2029+import net.sf.l2j.gameserver.cache.HtmCache;
2030+import net.sf.l2j.gameserver.datatables.NpcTable;
2031+import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
2032+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
2033+
2034+public class BossBBSManager extends BaseBBSManager
2035+{
2036+ private static final Logger _log = Logger.getLogger(BossBBSManager.class.getName());
2037+
2038+ private static final int[] BOSSES = { 25512, 29001, 29006, 29014, 29019, 29020, 29022, 29028, 29065 };
2039+
2040+ public static BossBBSManager getInstance()
2041+ {
2042+ return SingletonHolder._instance;
2043+ }
2044+
2045+ @Override
2046+ public void parseCmd(String command, L2PcInstance activeChar)
2047+ {
2048+ if (command.equals("_bbsGrandBoss"))
2049+ {
2050+ showGrandBossStatus(activeChar);
2051+ }
2052+ else
2053+ {
2054+ super.parseCmd(command, activeChar);
2055+ }
2056+ }
2057+
2058+ @Override
2059+ protected String getFolder()
2060+ {
2061+ return "stats/boss";
2062+ }
2063+
2064+ private static void showGrandBossStatus(L2PcInstance activeChar)
2065+ {
2066+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/boss/grandBoss.htm");
2067+ StringBuilder tb = new StringBuilder();
2068+ try
2069+ {
2070+ for (int boss : BOSSES)
2071+ {
2072+ String name = NpcTable.getInstance().getTemplate(boss).getName();
2073+ long delay = GrandBossManager.getInstance().getStatsSet(boss).getLong("respawn_time");
2074+ if (delay <= System.currentTimeMillis())
2075+ {
2076+ tb.append("<table border=0 cellspacing=0 cellpadding=2 height=24 width=400><tr>");
2077+ tb.append("<td FIXWIDTH=200 align=center>" + name + "</td>");
2078+ tb.append("<td FIXWIDTH=200 align=center><font color=99FF00>Alive</font></td>");
2079+ tb.append("</tr></table>");
2080+ tb.append("<img src=\"L2UI.Squaregray\" width=\"400\" height=\"1\">");
2081+ }
2082+ else
2083+ {
2084+ int hours = (int)((delay - System.currentTimeMillis()) / 1000L / 60L / 60L);
2085+ int mins = (int)((delay - hours * 60 * 60 * 1000 - System.currentTimeMillis()) / 1000L / 60L);
2086+
2087+ tb.append("<table border=0 cellspacing=0 cellpadding=2 height=24 width=400><tr>");
2088+ tb.append("<td FIXWIDTH=200 align=center>" + name + "</td>");
2089+ tb.append("<td FIXWIDTH=200 align=center><font color=CC0000>" + hours + " hours and " + mins + " minutes to respawn</font></td>");
2090+ tb.append("</tr></table>");
2091+ tb.append("<img src=\"L2UI.Squaregray\" width=\"400\" height=\"1\">");
2092+ }
2093+ }
2094+ }
2095+ catch (Exception e)
2096+ {
2097+ _log.log(Level.WARNING, "Failed to load grand boss list.");
2098+ }
2099+ content = content.replaceAll("%showList%", tb.toString());
2100+ separateAndSend(content, activeChar);
2101+ }
2102+
2103+ private static class SingletonHolder
2104+ {
2105+ protected static final BossBBSManager _instance = new BossBBSManager();
2106+ }
2107+}
2108Index: java/net/sf/l2j/gameserver/communitybbs/tasks/PlayerStatsUpdateTask.java
2109===================================================================
2110--- java/net/sf/l2j/gameserver/communitybbs/tasks/PlayerStatsUpdateTask.java (revision 0)
2111+++ java/net/sf/l2j/gameserver/communitybbs/tasks/PlayerStatsUpdateTask.java (revision 0)
2112@@ -0,0 +1,580 @@
2113+/*
2114+ * This program is free software: you can redistribute it and/or modify it under
2115+ * the terms of the GNU General Public License as published by the Free Software
2116+ * Foundation, either version 3 of the License, or (at your option) any later
2117+ * version.
2118+ *
2119+ * This program is distributed in the hope that it will be useful, but WITHOUT
2120+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2121+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
2122+ * details.
2123+ *
2124+ * You should have received a copy of the GNU General Public License along with
2125+ * this program. If not, see <http://www.gnu.org/licenses/>.
2126+ */
2127+package net.sf.l2j.gameserver.communitybbs.tasks;
2128+
2129+import java.sql.Connection;
2130+import java.sql.PreparedStatement;
2131+import java.sql.ResultSet;
2132+import java.util.Date;
2133+import java.util.HashMap;
2134+import java.util.Map;
2135+import java.util.logging.Level;
2136+import java.util.logging.Logger;
2137+
2138+import net.sf.l2j.Config;
2139+import net.sf.l2j.L2DatabaseFactory;
2140+import net.sf.l2j.gameserver.ThreadPoolManager;
2141+
2142+public class PlayerStatsUpdateTask
2143+{
2144+ static Logger _log = Logger.getLogger(PlayerStatsUpdateTask.class.getName());
2145+ private static StringBuilder _pvpList = new StringBuilder();
2146+ private static StringBuilder _pkList = new StringBuilder();
2147+ private static StringBuilder _raidList = new StringBuilder();
2148+ private static StringBuilder _adenaList = new StringBuilder();
2149+ private static StringBuilder _onlineList = new StringBuilder();
2150+ private static String _lastUpdate = "Error";
2151+ Connection con = L2DatabaseFactory.getInstance().getConnection();
2152+
2153+ public static void updateTask()
2154+ {
2155+ _log.log(Level.INFO, "[CommunityBoard]: Started player stats update task!");
2156+
2157+ ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new Runnable()
2158+ {
2159+ @Override
2160+ public void run()
2161+ {
2162+ PlayerStatsUpdateTask.cleanUpTask();
2163+ PlayerStatsUpdateTask.updatePvPList();
2164+ PlayerStatsUpdateTask.updatePkList();
2165+ PlayerStatsUpdateTask.updateRaidList();
2166+ PlayerStatsUpdateTask.updateAdenaList();
2167+ PlayerStatsUpdateTask.updateOnlineList();
2168+
2169+ Date date = new Date();
2170+ PlayerStatsUpdateTask.lastUpdate(date.toString());
2171+ }
2172+ }, 1000L, 600000L);
2173+ }
2174+
2175+ static void cleanUpTask()
2176+ {
2177+ _pvpList.delete(0, _pvpList.length());
2178+ _pkList.delete(0, _pkList.length());
2179+ _raidList.delete(0, _raidList.length());
2180+ _adenaList.delete(0, _adenaList.length());
2181+ _onlineList.delete(0, _onlineList.length());
2182+ }
2183+
2184+ static void updatePvPList()
2185+ {
2186+ try
2187+ {
2188+ Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
2189+ try
2190+ {
2191+ int pos = 0;
2192+
2193+ PreparedStatement statement = con.prepareStatement("SELECT SUM(chr.points), SUM(it.count), ch.char_name, ch.pkkills, ch.pvpkills, ch.onlinetime, ch.base_class, ch.online FROM characters ch LEFT JOIN character_raid_points chr ON ch.obj_Id=chr.char_id LEFT OUTER JOIN items it ON ch.obj_Id=it.owner_id WHERE item_id=57 GROUP BY ch.obj_Id ORDER BY pvpkills DESC LIMIT " + Config.TOP_PLAYER_RESULTS);
2194+ ResultSet result = statement.executeQuery();
2195+ while (result.next())
2196+ {
2197+ pos++;
2198+ boolean status = false;
2199+ if (result.getInt("online") == 1)
2200+ {
2201+ status = true;
2202+ }
2203+ String timeon = getPlayerRunTime(result.getInt("ch.onlinetime"));
2204+ String adenas = getAdenas(result.getInt("SUM(it.count)"));
2205+
2206+ _pvpList.append("<table border=0 cellspacing=0 cellpadding=2 height=" + Config.TOP_PLAYER_ROW_HEIGHT + " width=610><tr><td FIXWIDTH=5></td>");
2207+ _pvpList.append("<td FIXWIDTH=25>" + pos + "</td>");
2208+ _pvpList.append("<td FIXWIDTH=180>" + result.getString("ch.char_name") + "</td>");
2209+ _pvpList.append("<td FIXWIDTH=175>" + className(result.getInt("base_class")) + "</td>");
2210+ _pvpList.append("<td FIXWIDTH=60>" + result.getInt("ch.pvpkills") + "</td>");
2211+ _pvpList.append("<td FIXWIDTH=60>" + result.getInt("ch.pkkills") + "</td>");
2212+ _pvpList.append("<td FIXWIDTH=70>" + result.getInt("SUM(chr.points)") + "</td>");
2213+ _pvpList.append("<td FIXWIDTH=140>" + adenas + "</td>");
2214+ _pvpList.append("<td FIXWIDTH=150>" + timeon + "</td>");
2215+ _pvpList.append("<td FIXWIDTH=65>" + (status ? "<font color=99FF00>Online</font>" : "<font color=CC0000>Offline</font>") + "</td>");
2216+ _pvpList.append("</tr></table><img src=\"L2UI.Squaregray\" width=\"610\" height=\"1\">");
2217+ }
2218+ result.close();
2219+ statement.close();
2220+ }
2221+ catch (Throwable localThrowable1)
2222+ {
2223+ localThrowable3 = localThrowable1;throw localThrowable1;
2224+ }
2225+ finally
2226+ {
2227+ if (con != null)
2228+ {
2229+ if (localThrowable3 != null)
2230+ {
2231+ try
2232+ {
2233+ con.close();
2234+ }
2235+ catch (Throwable localThrowable2)
2236+ {
2237+ localThrowable3.addSuppressed(localThrowable2);
2238+ }
2239+ }
2240+ else
2241+ {
2242+ con.close();
2243+ }
2244+ }
2245+ }
2246+ }
2247+ catch (Exception e)
2248+ {
2249+ _log.log(Level.WARNING, "Failed to update pvp list!");
2250+ e.printStackTrace();
2251+ }
2252+ }
2253+
2254+ static void updatePkList()
2255+ {
2256+ try
2257+ {
2258+ Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
2259+ try
2260+ {
2261+ int pos = 0;
2262+
2263+ PreparedStatement statement = con.prepareStatement("SELECT SUM(chr.points), SUM(it.count), ch.char_name, ch.pkkills, ch.pvpkills, ch.onlinetime, ch.base_class, ch.online FROM characters ch LEFT JOIN character_raid_points chr ON ch.obj_Id=chr.char_id LEFT OUTER JOIN items it ON ch.obj_Id=it.owner_id WHERE item_id=57 GROUP BY ch.obj_Id ORDER BY pkkills DESC LIMIT " + Config.TOP_PLAYER_RESULTS);
2264+ ResultSet result = statement.executeQuery();
2265+ while (result.next())
2266+ {
2267+ pos++;
2268+ boolean status = false;
2269+ if (result.getInt("online") == 1)
2270+ {
2271+ status = true;
2272+ }
2273+ String timeon = getPlayerRunTime(result.getInt("ch.onlinetime"));
2274+ String adenas = getAdenas(result.getInt("SUM(it.count)"));
2275+
2276+ _pkList.append("<table border=0 cellspacing=0 cellpadding=2 height=" + Config.TOP_PLAYER_ROW_HEIGHT + " width=610><tr><td FIXWIDTH=5></td>");
2277+ _pkList.append("<td FIXWIDTH=25>" + pos + "</td>");
2278+ _pkList.append("<td FIXWIDTH=180>" + result.getString("ch.char_name") + "</td>");
2279+ _pkList.append("<td FIXWIDTH=175>" + className(result.getInt("base_class")) + "</td>");
2280+ _pkList.append("<td FIXWIDTH=60>" + result.getInt("ch.pvpkills") + "</td>");
2281+ _pkList.append("<td FIXWIDTH=60>" + result.getInt("ch.pkkills") + "</td>");
2282+ _pkList.append("<td FIXWIDTH=70>" + result.getInt("SUM(chr.points)") + "</td>");
2283+ _pkList.append("<td FIXWIDTH=140>" + adenas + "</td>");
2284+ _pkList.append("<td FIXWIDTH=150>" + timeon + "</td>");
2285+ _pkList.append("<td FIXWIDTH=65>" + (status ? "<font color=99FF00>Online</font>" : "<font color=CC0000>Offline</font>") + "</td>");
2286+ _pkList.append("</tr></table><img src=\"L2UI.Squaregray\" width=\"610\" height=\"1\">");
2287+ }
2288+ result.close();
2289+ statement.close();
2290+ }
2291+ catch (Throwable localThrowable1)
2292+ {
2293+ localThrowable3 = localThrowable1;throw localThrowable1;
2294+ }
2295+ finally
2296+ {
2297+ if (con != null)
2298+ {
2299+ if (localThrowable3 != null)
2300+ {
2301+ try
2302+ {
2303+ con.close();
2304+ }
2305+ catch (Throwable localThrowable2)
2306+ {
2307+ localThrowable3.addSuppressed(localThrowable2);
2308+ }
2309+ }
2310+ else
2311+ {
2312+ con.close();
2313+ }
2314+ }
2315+ }
2316+ }
2317+ catch (Exception e)
2318+ {
2319+ _log.log(Level.WARNING, "Failed to update pk list!");
2320+ e.printStackTrace();
2321+ }
2322+ }
2323+
2324+ static void updateRaidList()
2325+ {
2326+ try
2327+ {
2328+ Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
2329+ try
2330+ {
2331+ int pos = 0;
2332+
2333+ PreparedStatement statement = con.prepareStatement("SELECT SUM(chr.points), SUM(it.count), ch.char_name, ch.pkkills, ch.pvpkills, ch.onlinetime, ch.base_class, ch.online FROM characters ch LEFT JOIN character_raid_points chr ON ch.obj_Id=chr.char_id LEFT OUTER JOIN items it ON ch.obj_Id=it.owner_id WHERE item_id=57 GROUP BY ch.obj_Id ORDER BY SUM(chr.points) DESC LIMIT " + Config.TOP_PLAYER_RESULTS);
2334+ ResultSet result = statement.executeQuery();
2335+ while (result.next())
2336+ {
2337+ pos++;
2338+ boolean status = false;
2339+ if (result.getInt("online") == 1)
2340+ {
2341+ status = true;
2342+ }
2343+ String timeon = getPlayerRunTime(result.getInt("ch.onlinetime"));
2344+ String adenas = getAdenas(result.getInt("SUM(it.count)"));
2345+
2346+ _raidList.append("<table border=0 cellspacing=0 cellpadding=2 height=" + Config.TOP_PLAYER_ROW_HEIGHT + " width=610><tr><td FIXWIDTH=5></td>");
2347+ _raidList.append("<td FIXWIDTH=25>" + pos + "</td>");
2348+ _raidList.append("<td FIXWIDTH=180>" + result.getString("ch.char_name") + "</td>");
2349+ _raidList.append("<td FIXWIDTH=175>" + className(result.getInt("base_class")) + "</td>");
2350+ _raidList.append("<td FIXWIDTH=60>" + result.getInt("ch.pvpkills") + "</td>");
2351+ _raidList.append("<td FIXWIDTH=60>" + result.getInt("ch.pkkills") + "</td>");
2352+ _raidList.append("<td FIXWIDTH=70>" + result.getInt("SUM(chr.points)") + "</td>");
2353+ _raidList.append("<td FIXWIDTH=140>" + adenas + "</td>");
2354+ _raidList.append("<td FIXWIDTH=150>" + timeon + "</td>");
2355+ _raidList.append("<td FIXWIDTH=65>" + (status ? "<font color=99FF00>Online</font>" : "<font color=CC0000>Offline</font>") + "</td>");
2356+ _raidList.append("</tr></table><img src=\"L2UI.Squaregray\" width=\"610\" height=\"1\">");
2357+ }
2358+ result.close();
2359+ statement.close();
2360+ }
2361+ catch (Throwable localThrowable1)
2362+ {
2363+ localThrowable3 = localThrowable1;throw localThrowable1;
2364+ }
2365+ finally
2366+ {
2367+ if (con != null)
2368+ {
2369+ if (localThrowable3 != null)
2370+ {
2371+ try
2372+ {
2373+ con.close();
2374+ }
2375+ catch (Throwable localThrowable2)
2376+ {
2377+ localThrowable3.addSuppressed(localThrowable2);
2378+ }
2379+ }
2380+ else
2381+ {
2382+ con.close();
2383+ }
2384+ }
2385+ }
2386+ }
2387+ catch (Exception e)
2388+ {
2389+ _log.log(Level.WARNING, "Failed to update raid list!");
2390+ e.printStackTrace();
2391+ }
2392+ }
2393+
2394+ static void updateAdenaList()
2395+ {
2396+ try
2397+ {
2398+ Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
2399+ try
2400+ {
2401+ int pos = 0;
2402+
2403+ PreparedStatement statement = con.prepareStatement("SELECT SUM(chr.points), SUM(it.count), ch.char_name, ch.pkkills, ch.pvpkills, ch.onlinetime, ch.base_class, ch.online FROM characters ch LEFT JOIN character_raid_points chr ON ch.obj_Id=chr.char_id LEFT OUTER JOIN items it ON ch.obj_Id=it.owner_id WHERE item_id=57 GROUP BY ch.obj_Id ORDER BY SUM(it.count) DESC LIMIT " + Config.TOP_PLAYER_RESULTS);
2404+ ResultSet result = statement.executeQuery();
2405+ while (result.next())
2406+ {
2407+ pos++;
2408+ boolean status = false;
2409+ if (result.getInt("online") == 1)
2410+ {
2411+ status = true;
2412+ }
2413+ String timeon = getPlayerRunTime(result.getInt("ch.onlinetime"));
2414+ String adenas = getAdenas(result.getInt("SUM(it.count)"));
2415+
2416+ _adenaList.append("<table border=0 cellspacing=0 cellpadding=2 height=" + Config.TOP_PLAYER_ROW_HEIGHT + " width=610><tr><td FIXWIDTH=5></td>");
2417+ _adenaList.append("<td FIXWIDTH=25>" + pos + "</td>");
2418+ _adenaList.append("<td FIXWIDTH=180>" + result.getString("ch.char_name") + "</td>");
2419+ _adenaList.append("<td FIXWIDTH=175>" + className(result.getInt("base_class")) + "</td>");
2420+ _adenaList.append("<td FIXWIDTH=60>" + result.getInt("ch.pvpkills") + "</td>");
2421+ _adenaList.append("<td FIXWIDTH=60>" + result.getInt("ch.pkkills") + "</td>");
2422+ _adenaList.append("<td FIXWIDTH=70>" + result.getInt("SUM(chr.points)") + "</td>");
2423+ _adenaList.append("<td FIXWIDTH=140>" + adenas + "</td>");
2424+ _adenaList.append("<td FIXWIDTH=150>" + timeon + "</td>");
2425+ _adenaList.append("<td FIXWIDTH=65>" + (status ? "<font color=99FF00>Online</font>" : "<font color=CC0000>Offline</font>") + "</td>");
2426+ _adenaList.append("</tr></table><img src=\"L2UI.Squaregray\" width=\"610\" height=\"1\">");
2427+ }
2428+ result.close();
2429+ statement.close();
2430+ }
2431+ catch (Throwable localThrowable1)
2432+ {
2433+ localThrowable3 = localThrowable1;throw localThrowable1;
2434+ }
2435+ finally
2436+ {
2437+ if (con != null)
2438+ {
2439+ if (localThrowable3 != null)
2440+ {
2441+ try
2442+ {
2443+ con.close();
2444+ }
2445+ catch (Throwable localThrowable2)
2446+ {
2447+ localThrowable3.addSuppressed(localThrowable2);
2448+ }
2449+ }
2450+ else
2451+ {
2452+ con.close();
2453+ }
2454+ }
2455+ }
2456+ }
2457+ catch (Exception e)
2458+ {
2459+ _log.log(Level.WARNING, "Failed to update adena list!");
2460+ e.printStackTrace();
2461+ }
2462+ }
2463+
2464+ static void updateOnlineList()
2465+ {
2466+ try
2467+ {
2468+ Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
2469+ try
2470+ {
2471+ int pos = 0;
2472+ PreparedStatement statement = con.prepareStatement("SELECT SUM(chr.points), SUM(it.count), ch.char_name, ch.pkkills, ch.pvpkills, ch.onlinetime, ch.base_class, ch.online FROM characters ch LEFT JOIN character_raid_points chr ON ch.obj_Id=chr.char_id LEFT OUTER JOIN items it ON ch.obj_Id=it.owner_id WHERE item_id=57 GROUP BY ch.obj_Id ORDER BY onlinetime DESC LIMIT " + Config.TOP_PLAYER_RESULTS);
2473+ ResultSet result = statement.executeQuery();
2474+ while (result.next())
2475+ {
2476+ pos++;
2477+ boolean status = false;
2478+ if (result.getInt("online") == 1)
2479+ {
2480+ status = true;
2481+ }
2482+ String timeon = getPlayerRunTime(result.getInt("ch.onlinetime"));
2483+ String adenas = getAdenas(result.getInt("SUM(it.count)"));
2484+
2485+ _onlineList.append("<table border=0 cellspacing=0 cellpadding=2 height=" + Config.TOP_PLAYER_ROW_HEIGHT + " width=610><tr><td FIXWIDTH=5></td>");
2486+ _onlineList.append("<td FIXWIDTH=25>" + pos + "</td>");
2487+ _onlineList.append("<td FIXWIDTH=180>" + result.getString("ch.char_name") + "</td>");
2488+ _onlineList.append("<td FIXWIDTH=175>" + className(result.getInt("base_class")) + "</td>");
2489+ _onlineList.append("<td FIXWIDTH=60>" + result.getInt("ch.pvpkills") + "</td>");
2490+ _onlineList.append("<td FIXWIDTH=60>" + result.getInt("ch.pkkills") + "</td>");
2491+ _onlineList.append("<td FIXWIDTH=70>" + result.getInt("SUM(chr.points)") + "</td>");
2492+ _onlineList.append("<td FIXWIDTH=140>" + adenas + "</td>");
2493+ _onlineList.append("<td FIXWIDTH=150>" + timeon + "</td>");
2494+ _onlineList.append("<td FIXWIDTH=65>" + (status ? "<font color=99FF00>Online</font>" : "<font color=CC0000>Offline</font>") + "</td>");
2495+ _onlineList.append("</tr></table><img src=\"L2UI.Squaregray\" width=\"610\" height=\"1\">");
2496+ }
2497+ result.close();
2498+ statement.close();
2499+ }
2500+ catch (Throwable localThrowable1)
2501+ {
2502+ localThrowable3 = localThrowable1;throw localThrowable1;
2503+ }
2504+ finally
2505+ {
2506+ if (con != null)
2507+ {
2508+ if (localThrowable3 != null)
2509+ {
2510+ try
2511+ {
2512+ con.close();
2513+ }
2514+ catch (Throwable localThrowable2)
2515+ {
2516+ localThrowable3.addSuppressed(localThrowable2);
2517+ }
2518+ }
2519+ else
2520+ {
2521+ con.close();
2522+ }
2523+ }
2524+ }
2525+ }
2526+ catch (Exception e)
2527+ {
2528+ _log.log(Level.WARNING, "Failed to update online time list!");
2529+ e.printStackTrace();
2530+ }
2531+ }
2532+
2533+ public static String pvpList()
2534+ {
2535+ return _pvpList.toString();
2536+ }
2537+
2538+ public static String pkList()
2539+ {
2540+ return _pkList.toString();
2541+ }
2542+
2543+ public static String raidList()
2544+ {
2545+ return _raidList.toString();
2546+ }
2547+
2548+ public static String adenaList()
2549+ {
2550+ return _adenaList.toString();
2551+ }
2552+
2553+ public static String onlineList()
2554+ {
2555+ return _onlineList.toString();
2556+ }
2557+
2558+ static void lastUpdate(String format)
2559+ {
2560+ _lastUpdate = format;
2561+ }
2562+
2563+ public static String getLastUpdate()
2564+ {
2565+ return _lastUpdate;
2566+ }
2567+
2568+ public static final String className(int classid)
2569+ {
2570+ Map<Integer, String> classList = new HashMap<>();
2571+
2572+ classList.put(Integer.valueOf(0), "Fighter");
2573+ classList.put(Integer.valueOf(1), "Warrior");
2574+ classList.put(Integer.valueOf(2), "Gladiator");
2575+ classList.put(Integer.valueOf(3), "Warlord");
2576+ classList.put(Integer.valueOf(4), "Knight");
2577+ classList.put(Integer.valueOf(5), "Paladin");
2578+ classList.put(Integer.valueOf(6), "Dark Avenger");
2579+ classList.put(Integer.valueOf(7), "Rogue");
2580+ classList.put(Integer.valueOf(8), "Treasure Hunter");
2581+ classList.put(Integer.valueOf(9), "Hawkeye");
2582+ classList.put(Integer.valueOf(10), "Mage");
2583+ classList.put(Integer.valueOf(11), "Wizard");
2584+ classList.put(Integer.valueOf(12), "Sorcerer");
2585+ classList.put(Integer.valueOf(13), "Necromancer");
2586+ classList.put(Integer.valueOf(14), "Warlock");
2587+ classList.put(Integer.valueOf(15), "Cleric");
2588+ classList.put(Integer.valueOf(16), "Bishop");
2589+ classList.put(Integer.valueOf(17), "Prophet");
2590+ classList.put(Integer.valueOf(18), "Elven Fighter");
2591+ classList.put(Integer.valueOf(19), "Elven Knight");
2592+ classList.put(Integer.valueOf(20), "Temple Knight");
2593+ classList.put(Integer.valueOf(21), "Swordsinger");
2594+ classList.put(Integer.valueOf(22), "Elven Scout");
2595+ classList.put(Integer.valueOf(23), "Plains Walker");
2596+ classList.put(Integer.valueOf(24), "Silver Ranger");
2597+ classList.put(Integer.valueOf(25), "Elven Mage");
2598+ classList.put(Integer.valueOf(26), "Elven Wizard");
2599+ classList.put(Integer.valueOf(27), "Spellsinger");
2600+ classList.put(Integer.valueOf(28), "Elemental Summoner");
2601+ classList.put(Integer.valueOf(29), "Oracle");
2602+ classList.put(Integer.valueOf(30), "Elder");
2603+ classList.put(Integer.valueOf(31), "Dark Fighter");
2604+ classList.put(Integer.valueOf(32), "Palus Knightr");
2605+ classList.put(Integer.valueOf(33), "Shillien Knight");
2606+ classList.put(Integer.valueOf(34), "Bladedancer");
2607+ classList.put(Integer.valueOf(35), "Assasin");
2608+ classList.put(Integer.valueOf(36), "Abyss Walker");
2609+ classList.put(Integer.valueOf(37), "Phantom Ranger");
2610+ classList.put(Integer.valueOf(38), "Dark Mage");
2611+ classList.put(Integer.valueOf(39), "Dark Wizard");
2612+ classList.put(Integer.valueOf(40), "Spellhowler");
2613+ classList.put(Integer.valueOf(41), "Phantom Summoner");
2614+ classList.put(Integer.valueOf(42), "Shillien Oracle");
2615+ classList.put(Integer.valueOf(43), "Shilien Elder");
2616+ classList.put(Integer.valueOf(44), "Orc Fighter");
2617+ classList.put(Integer.valueOf(45), "Orc Raider");
2618+ classList.put(Integer.valueOf(46), "Destroyer");
2619+ classList.put(Integer.valueOf(47), "Orc Monk");
2620+ classList.put(Integer.valueOf(48), "Tyrant");
2621+ classList.put(Integer.valueOf(49), "Orc Mage");
2622+ classList.put(Integer.valueOf(50), "Orc Shaman");
2623+ classList.put(Integer.valueOf(51), "Overlord");
2624+ classList.put(Integer.valueOf(52), "Warcryer");
2625+ classList.put(Integer.valueOf(53), "Dwarven Fighter");
2626+ classList.put(Integer.valueOf(54), "Scavenger");
2627+ classList.put(Integer.valueOf(55), "Bounty Hunter");
2628+ classList.put(Integer.valueOf(56), "Artisan");
2629+ classList.put(Integer.valueOf(57), "Warsmith");
2630+ classList.put(Integer.valueOf(88), "Duelist");
2631+ classList.put(Integer.valueOf(89), "Dreadnought");
2632+ classList.put(Integer.valueOf(90), "Phoenix Knight");
2633+ classList.put(Integer.valueOf(91), "Hell Knight");
2634+ classList.put(Integer.valueOf(92), "Sagittarius");
2635+ classList.put(Integer.valueOf(93), "Adventurer");
2636+ classList.put(Integer.valueOf(94), "Archmage");
2637+ classList.put(Integer.valueOf(95), "Soultaker");
2638+ classList.put(Integer.valueOf(96), "Arcana Lord");
2639+ classList.put(Integer.valueOf(97), "Cardinal");
2640+ classList.put(Integer.valueOf(98), "Hierophant");
2641+ classList.put(Integer.valueOf(99), "Evas Templar");
2642+ classList.put(Integer.valueOf(100), "Sword Muse");
2643+ classList.put(Integer.valueOf(101), "Wind Rider");
2644+ classList.put(Integer.valueOf(102), "Moonlight Sentinel");
2645+ classList.put(Integer.valueOf(103), "Mystic Muse");
2646+ classList.put(Integer.valueOf(104), "Elemental Master");
2647+ classList.put(Integer.valueOf(105), "Evas Saint");
2648+ classList.put(Integer.valueOf(106), "Shillien Templar");
2649+ classList.put(Integer.valueOf(107), "Spectral Dancer");
2650+ classList.put(Integer.valueOf(108), "Ghost Hunter");
2651+ classList.put(Integer.valueOf(109), "Ghost Sentinel");
2652+ classList.put(Integer.valueOf(110), "Storm Screamer");
2653+ classList.put(Integer.valueOf(111), "Spectral Master");
2654+ classList.put(Integer.valueOf(112), "Shillien Saint");
2655+ classList.put(Integer.valueOf(113), "Titan");
2656+ classList.put(Integer.valueOf(114), "Grand Khavatari");
2657+ classList.put(Integer.valueOf(115), "Dominator");
2658+ classList.put(Integer.valueOf(116), "Doomcryer");
2659+ classList.put(Integer.valueOf(117), "Fortune Seeker");
2660+ classList.put(Integer.valueOf(118), "Maestro");
2661+
2662+ return classList.get(Integer.valueOf(classid));
2663+ }
2664+
2665+ static String getPlayerRunTime(int secs)
2666+ {
2667+ String timeResult = "";
2668+ if (secs >= 86400)
2669+ {
2670+ timeResult = Integer.toString(secs / 86400) + " Days " + Integer.toString(secs % 86400 / 3600) + " hours";
2671+ }
2672+ else
2673+ {
2674+ timeResult = Integer.toString(secs / 3600) + " Hours " + Integer.toString(secs % 3600 / 60) + " mins";
2675+ }
2676+ return timeResult;
2677+ }
2678+
2679+ static String getAdenas(int adena)
2680+ {
2681+ String adenas = "";
2682+ if (adena >= 1000000000)
2683+ {
2684+ adenas = Integer.toString(adena / 1000000000) + " Billion " + Integer.toString(adena % 1000000000 / 1000000) + " million";
2685+ }
2686+ else
2687+ {
2688+ adenas = Integer.toString(adena / 1000000) + " Million " + Integer.toString(adena % 1000000 / 1000) + " k";
2689+ }
2690+ return adenas;
2691+ }
2692+}
2693\ No newline at end of file
2694Index: java/net/sf/l2j/gameserver/communitybbs/Manager/DonationBBSManager.java
2695===================================================================
2696--- java/net/sf/l2j/gameserver/communitybbs/Manager/DonationBBSManager.java (revision 0)
2697+++ java/net/sf/l2j/gameserver/communitybbs/Manager/DonationBBSManager.java (revision 0)
2698@@ -0,0 +1,261 @@
2699+/*
2700+ * This program is free software: you can redistribute it and/or modify it under
2701+ * the terms of the GNU General Public License as published by the Free Software
2702+ * Foundation, either version 3 of the License, or (at your option) any later
2703+ * version.
2704+ *
2705+ * This program is distributed in the hope that it will be useful, but WITHOUT
2706+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2707+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
2708+ * details.
2709+ *
2710+ * You should have received a copy of the GNU General Public License along with
2711+ * this program. If not, see <http://www.gnu.org/licenses/>.
2712+ */
2713+package net.sf.l2j.gameserver.communitybbs.Manager;
2714+
2715+import java.io.BufferedWriter;
2716+import java.io.File;
2717+import java.io.FileWriter;
2718+import java.util.NoSuchElementException;
2719+import java.util.StringTokenizer;
2720+
2721+import net.sf.l2j.Config;
2722+import net.sf.l2j.gameserver.cache.HtmCache;
2723+import net.sf.l2j.gameserver.model.L2World;
2724+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
2725+
2726+public class DonationBBSManager extends BaseBBSManager
2727+{
2728+ public static DonationBBSManager getInstance()
2729+ {
2730+ return SingletonHolder._instance;
2731+ }
2732+
2733+ @Override
2734+ public void parseCmd(String command, L2PcInstance activeChar)
2735+ {
2736+ if (command.startsWith("_bbsdonation"))
2737+ {
2738+ StringTokenizer st = new StringTokenizer(command, ";");
2739+ st.nextToken();
2740+ String secondCommand = st.nextToken();
2741+ if (secondCommand.equalsIgnoreCase("paysafe"))
2742+ {
2743+ handlePaySafeDonation(activeChar);
2744+ }
2745+ else if (secondCommand.equalsIgnoreCase("paypal"))
2746+ {
2747+ handlePayPalDonation(activeChar);
2748+ }
2749+ else
2750+ {
2751+ FileWriter fstream;
2752+ if (secondCommand.startsWith("submitPaySafe"))
2753+ {
2754+ StringTokenizer cmds = new StringTokenizer(secondCommand);
2755+ cmds.nextToken();
2756+
2757+ String quantity = null;
2758+ String pin1 = "0";
2759+ String pin2 = "0";
2760+ String pin3 = "0";
2761+ String pin4 = "0";
2762+ String message = "";
2763+
2764+ quantity = cmds.nextToken();
2765+ try
2766+ {
2767+ pin1 = cmds.nextToken();
2768+ pin2 = cmds.nextToken();
2769+ pin3 = cmds.nextToken();
2770+ pin4 = cmds.nextToken();
2771+ }
2772+ catch (NumberFormatException enf)
2773+ {
2774+ activeChar.sendMessage("Only numbers are allowed!");
2775+ return;
2776+ }
2777+ catch (NoSuchElementException enf)
2778+ {
2779+ activeChar.sendMessage("Enter a valid pin.");
2780+ return;
2781+ }
2782+ while (cmds.hasMoreTokens())
2783+ {
2784+ message = message + cmds.nextToken() + " ";
2785+ }
2786+ try
2787+ {
2788+ String fname = "data/donations/paysafe_donation_" + activeChar.getName() + ".txt";
2789+ File file = new File(fname);
2790+ boolean exist = file.createNewFile();
2791+ if (!exist)
2792+ {
2793+ activeChar.sendMessage("You have already sent a donation, staff member must confirm it first.");
2794+ return;
2795+ }
2796+ fstream = new FileWriter(fname);
2797+ BufferedWriter out = new BufferedWriter(fstream);
2798+ out.write("PaySafe donation.");
2799+ out.newLine();
2800+ out.write("- - - - - - - - - - - - - - - - - - - -");
2801+ out.newLine();
2802+ out.write("Player Details:");
2803+ out.newLine();
2804+ out.write("Account: " + activeChar.getAccountName());
2805+ out.newLine();
2806+ out.write("Name: " + activeChar.getName());
2807+ out.newLine();
2808+ out.write("IP: " + activeChar.getClient().getConnection().getInetAddress().getHostAddress());
2809+ out.newLine();
2810+ out.write("- - - - - - - - - - - - - - - - - - - -");
2811+ out.newLine();
2812+ out.write("Card Amount: " + quantity);
2813+ out.newLine();
2814+ out.write("Pin Code: " + pin1 + " " + pin2 + " " + pin3 + " " + pin4);
2815+ out.newLine();
2816+ out.write("- - - - - - - - - - - - - - - - - - - -");
2817+ out.newLine();
2818+ out.write("Message from player:" + message);
2819+ out.close();
2820+
2821+ separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/donation/completed.htm"), activeChar);
2822+
2823+ L2World.getInstance();
2824+ for (L2PcInstance gms : L2World.getAllGMs())
2825+ {
2826+ gms.sendMessage("ATTENTION: " + activeChar.getName() + " just submited a donation! Please confirm this donation by browsing in /data/donations folder.");
2827+ }
2828+ }
2829+ catch (Exception e)
2830+ {
2831+ activeChar.sendMessage("Failed to submit donation. Try again or contact with staff member. This error should not occur.");
2832+ e.printStackTrace();
2833+ return;
2834+ }
2835+ }
2836+ else if (secondCommand.startsWith("submitPayPal"))
2837+ {
2838+ StringTokenizer cmds = new StringTokenizer(secondCommand);
2839+ cmds.nextToken();
2840+
2841+ String quantity = null;
2842+ String email = "";
2843+ String transId = "";
2844+ String message = "";
2845+
2846+ quantity = cmds.nextToken();
2847+
2848+ email = cmds.nextToken();
2849+
2850+ transId = cmds.nextToken();
2851+ while (cmds.hasMoreTokens())
2852+ {
2853+ message = message + cmds.nextToken() + " ";
2854+ }
2855+ try
2856+ {
2857+ String fname = "data/donations/paypal_donation_" + activeChar.getName() + ".txt";
2858+ File file = new File(fname);
2859+ boolean exist = file.createNewFile();
2860+ if (!exist)
2861+ {
2862+ activeChar.sendMessage("You have already sent a donation, staff member must confirm it first.");
2863+ return;
2864+ }
2865+ FileWriter fstream1 = new FileWriter(fname);
2866+ BufferedWriter out = new BufferedWriter(fstream1);
2867+ out.write("PayPal donation.");
2868+ out.newLine();
2869+ out.write("- - - - - - - - - - - - - - - - - - - -");
2870+ out.newLine();
2871+ out.write("Player Details:");
2872+ out.newLine();
2873+ out.write("Account: " + activeChar.getAccountName());
2874+ out.newLine();
2875+ out.write("Name: " + activeChar.getName());
2876+ out.newLine();
2877+ out.write("IP: " + activeChar.getClient().getConnection().getInetAddress().getHostAddress());
2878+ out.newLine();
2879+ out.write("- - - - - - - - - - - - - - - - - - - -");
2880+ out.newLine();
2881+ out.write("Card Amount: " + quantity);
2882+ out.newLine();
2883+ out.write("Email Address: " + email);
2884+ out.newLine();
2885+ out.write("Transaction Id: " + transId);
2886+ out.newLine();
2887+ out.write("- - - - - - - - - - - - - - - - - - - -");
2888+ out.newLine();
2889+ out.write("Message from player:" + message);
2890+ out.close();
2891+
2892+ separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/donation/completed.htm"), activeChar);
2893+
2894+ L2World.getInstance();
2895+ for (L2PcInstance gms : L2World.getAllGMs())
2896+ {
2897+ gms.sendMessage("ATTENTION: " + activeChar.getName() + " just submited a donation! Please confirm this donation by browsing in /data/donations folder.");
2898+ }
2899+ }
2900+ catch (Exception e)
2901+ {
2902+ activeChar.sendMessage("Failed to submit donation. Try again or contact with staff member. This error should not occur.");
2903+ e.printStackTrace();
2904+ return;
2905+ }
2906+ }
2907+ }
2908+ }
2909+ else
2910+ {
2911+ super.parseCmd(command, activeChar);
2912+ }
2913+ }
2914+
2915+ @Override
2916+ protected String getFolder()
2917+ {
2918+ return "donation/";
2919+ }
2920+
2921+ private static void handlePaySafeDonation(L2PcInstance activeChar)
2922+ {
2923+ if (Config.ENABLE_PAY_SAFE_DONATION_BBS)
2924+ {
2925+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/donation/paysafe.htm");
2926+
2927+ content = content.replaceAll("%charName%", activeChar.getName());
2928+ content = content.replaceAll("%charAcc%", activeChar.getAccountName());
2929+ separateAndSend(content, activeChar);
2930+ }
2931+ else
2932+ {
2933+ activeChar.sendMessage("We currently are not accepting paysafe card donations. Thank you for your interest!");
2934+ return;
2935+ }
2936+ }
2937+
2938+ private static void handlePayPalDonation(L2PcInstance activeChar)
2939+ {
2940+ if (Config.ENABLE_PAY_PAL_DONATION_BBS)
2941+ {
2942+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/donation/paypal.htm");
2943+
2944+ content = content.replaceAll("%charName%", activeChar.getName());
2945+ content = content.replaceAll("%charAcc%", activeChar.getAccountName());
2946+ separateAndSend(content, activeChar);
2947+ }
2948+ else
2949+ {
2950+ activeChar.sendMessage("We currently are not accepting paypal donations. Thank you for your interest!");
2951+ return;
2952+ }
2953+ }
2954+
2955+ private static class SingletonHolder
2956+ {
2957+ protected static final DonationBBSManager _instance = new DonationBBSManager();
2958+ }
2959+}
2960\ No newline at end of file
2961Index: java/net/sf/l2j/gameserver/communitybbs/Manager/PasswordBBSManager.java
2962===================================================================
2963--- java/net/sf/l2j/gameserver/communitybbs/Manager/PasswordBBSManager.java (revision 0)
2964+++ java/net/sf/l2j/gameserver/communitybbs/Manager/PasswordBBSManager.java (revision 0)
2965@@ -0,0 +1,163 @@
2966+/*
2967+ * This program is free software: you can redistribute it and/or modify it under
2968+ * the terms of the GNU General Public License as published by the Free Software
2969+ * Foundation, either version 3 of the License, or (at your option) any later
2970+ * version.
2971+ *
2972+ * This program is distributed in the hope that it will be useful, but WITHOUT
2973+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2974+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
2975+ * details.
2976+ *
2977+ * You should have received a copy of the GNU General Public License along with
2978+ * this program. If not, see <http://www.gnu.org/licenses/>.
2979+ */
2980+package net.sf.l2j.gameserver.communitybbs.Manager;
2981+
2982+import java.security.MessageDigest;
2983+import java.sql.Connection;
2984+import java.sql.PreparedStatement;
2985+import java.sql.ResultSet;
2986+import java.util.StringTokenizer;
2987+import java.util.logging.Level;
2988+import java.util.logging.Logger;
2989+
2990+import net.sf.l2j.Base64;
2991+import net.sf.l2j.Config;
2992+import net.sf.l2j.L2DatabaseFactory;
2993+import net.sf.l2j.gameserver.cache.HtmCache;
2994+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
2995+
2996+public class PasswordBBSManager extends BaseBBSManager
2997+{
2998+ private static final Logger _log = Logger.getLogger(PasswordBBSManager.class.getName());
2999+
3000+ public static PasswordBBSManager getInstance()
3001+ {
3002+ return SingletonHolder._instance;
3003+ }
3004+
3005+ @Override
3006+ public void parseCmd(String command, L2PcInstance activeChar)
3007+ {
3008+ if (command.equals("_bbsPassPanel"))
3009+ {
3010+ if (Config.ENABLE_BBS_PASS_CHANGE)
3011+ {
3012+ separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/passChange.htm"), activeChar);
3013+ }
3014+ else
3015+ {
3016+ separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/functionDisabled.htm"), activeChar);
3017+ }
3018+ }
3019+ else if (command.startsWith("_bbsChangePass"))
3020+ {
3021+ StringTokenizer st = new StringTokenizer(command);
3022+ st.nextToken();
3023+
3024+ String currPass = null;
3025+ String newPass = null;
3026+ String repeatNewPass = null;
3027+ try
3028+ {
3029+ if (st.hasMoreTokens())
3030+ {
3031+ currPass = st.nextToken();
3032+ newPass = st.nextToken();
3033+ repeatNewPass = st.nextToken();
3034+ }
3035+ else
3036+ {
3037+ activeChar.sendMessage("Please fill in all the blank fields before requesting for a password change.");
3038+ return;
3039+ }
3040+ changePassword(currPass, newPass, repeatNewPass, activeChar);
3041+ }
3042+ catch (StringIndexOutOfBoundsException e)
3043+ {
3044+ activeChar.sendMessage("Something went wrong please contact with server's administrator with this error.");
3045+ _log.log(Level.WARNING, "[PasswordChangeFunction: Something went wrong for " + activeChar.getName());
3046+ e.getStackTrace();
3047+ return;
3048+ }
3049+ }
3050+ else
3051+ {
3052+ super.parseCmd(command, activeChar);
3053+ }
3054+ }
3055+
3056+ public static void changePassword(String currPass, String newPass, String repeatNewPass, L2PcInstance activeChar)
3057+ {
3058+ if (newPass.length() < 5)
3059+ {
3060+ activeChar.sendMessage("The new password should be bigger then 5 letters.");
3061+ return;
3062+ }
3063+ if (newPass.length() > 20)
3064+ {
3065+ activeChar.sendMessage("The new password cannot be bigger then 20 letters.");
3066+ return;
3067+ }
3068+ if (!newPass.equals(repeatNewPass))
3069+ {
3070+ activeChar.sendMessage("Repeated password doesn't match the new password.");
3071+ return;
3072+ }
3073+ Connection con = null;
3074+ String password = null;
3075+ try
3076+ {
3077+ MessageDigest md = MessageDigest.getInstance("SHA");
3078+ byte[] raw = currPass.getBytes("UTF-8");
3079+ raw = md.digest(raw);
3080+ String currPassEncoded = Base64.encodeBytes(raw);
3081+
3082+ con = L2DatabaseFactory.getInstance().getConnection();
3083+ PreparedStatement statement = con.prepareStatement("SELECT password FROM accounts WHERE login=?");
3084+ statement.setString(1, activeChar.getAccountName());
3085+ ResultSet rset = statement.executeQuery();
3086+ while (rset.next())
3087+ {
3088+ password = rset.getString("password");
3089+ }
3090+ rset.close();
3091+ statement.close();
3092+
3093+ byte[] password2 = null;
3094+ if (currPassEncoded.equals(password))
3095+ {
3096+ password2 = newPass.getBytes("UTF-8");
3097+ password2 = md.digest(password2);
3098+
3099+ PreparedStatement statement2 = con.prepareStatement("UPDATE accounts SET password=? WHERE login=?");
3100+ statement2.setString(1, Base64.encodeBytes(password2));
3101+ statement2.setString(2, activeChar.getAccountName());
3102+ statement2.executeUpdate();
3103+ statement2.close();
3104+
3105+ separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/passChanged.htm"), activeChar);
3106+ }
3107+ else
3108+ {
3109+ activeChar.sendMessage("The current password you've inserted is incorrect! Please try again!");
3110+ return;
3111+ }
3112+ }
3113+ catch (Exception e)
3114+ {
3115+ _log.warning("could not update the password of account: " + activeChar.getAccountName());
3116+ e.getStackTrace();
3117+ }
3118+ finally
3119+ {
3120+ L2DatabaseFactory.close(con);
3121+ }
3122+ }
3123+
3124+ private static class SingletonHolder
3125+ {
3126+ protected static final PasswordBBSManager _instance = new PasswordBBSManager();
3127+ }
3128+}
3129Index: java/net/sf/l2j/gameserver/communitybbs/Manager/OlStatsBBSManager.java
3130===================================================================
3131--- java/net/sf/l2j/gameserver/communitybbs/Manager/OlStatsBBSManager.java (revision 0)
3132+++ java/net/sf/l2j/gameserver/communitybbs/Manager/OlStatsBBSManager.java (revision 0)
3133@@ -0,0 +1,170 @@
3134+/*
3135+ * This program is free software: you can redistribute it and/or modify it under
3136+ * the terms of the GNU General Public License as published by the Free Software
3137+ * Foundation, either version 3 of the License, or (at your option) any later
3138+ * version.
3139+ *
3140+ * This program is distributed in the hope that it will be useful, but WITHOUT
3141+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
3142+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
3143+ * details.
3144+ *
3145+ * You should have received a copy of the GNU General Public License along with
3146+ * this program. If not, see <http://www.gnu.org/licenses/>.
3147+ */
3148+package net.sf.l2j.gameserver.communitybbs.Manager;
3149+
3150+import java.sql.Connection;
3151+import java.sql.PreparedStatement;
3152+import java.sql.ResultSet;
3153+import java.util.HashMap;
3154+import java.util.Map;
3155+import java.util.StringTokenizer;
3156+import java.util.logging.Level;
3157+import java.util.logging.Logger;
3158+
3159+import net.sf.l2j.L2DatabaseFactory;
3160+import net.sf.l2j.gameserver.cache.HtmCache;
3161+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
3162+
3163+public class OlStatsBBSManager extends BaseBBSManager
3164+{
3165+ private static final Logger _log = Logger.getLogger(OlStatsBBSManager.class.getName());
3166+
3167+ private static int _posId;
3168+
3169+ @Override
3170+ public void parseCmd(String command, L2PcInstance activeChar)
3171+ {
3172+ if (command.equals("_bbsOlStats"))
3173+ {
3174+ showClassMenu(activeChar);
3175+ }
3176+ else if (command.startsWith("_bbsClassList"))
3177+ {
3178+ StringTokenizer st = new StringTokenizer(command, ";");
3179+ st.nextToken();
3180+ int classId = Integer.valueOf(st.nextToken()).intValue();
3181+
3182+ showClassList(activeChar, classId);
3183+ }
3184+ else
3185+ {
3186+ super.parseCmd(command, activeChar);
3187+ }
3188+ }
3189+
3190+ @Override
3191+ protected String getFolder()
3192+ {
3193+ return "stats/olympiad/";
3194+ }
3195+
3196+ public static OlStatsBBSManager getInstance()
3197+ {
3198+ return SingletonHolder._instance;
3199+ }
3200+
3201+ private static void showClassMenu(L2PcInstance activeChar)
3202+ {
3203+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/olympiad/main.htm");
3204+ separateAndSend(content, activeChar);
3205+ }
3206+
3207+ private static void showClassList(L2PcInstance activeChar, int classId)
3208+ {
3209+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/olympiad/list.htm");
3210+ StringBuilder tb = new StringBuilder();
3211+ Connection con = null;
3212+ try
3213+ {
3214+ _posId = 0;
3215+ con = L2DatabaseFactory.getInstance().getConnection();
3216+ PreparedStatement statement = con.prepareStatement("SELECT h.char_id, h.olympiad_points, h.competitions_done, ch.char_name, ch.online, cl.clan_name, cl.ally_name FROM olympiad_nobles h LEFT JOIN characters ch ON ch.obj_Id=h.char_id LEFT OUTER JOIN clan_data cl ON cl.clan_id=ch.clanid where h.class_id=? ORDER BY h.olympiad_points DESC, h.competitions_done DESC");
3217+
3218+ statement.setInt(1, classId);
3219+ ResultSet result = statement.executeQuery();
3220+ while (result.next())
3221+ {
3222+ boolean status = false;
3223+ _posId += 1;
3224+ if (result.getInt("online") == 1)
3225+ {
3226+ status = true;
3227+ }
3228+ tb.append("<table border=0 cellspacing=0 cellpadding=2 width=610>");
3229+ tb.append("<tr>");
3230+ tb.append("<td FIXWIDTH=10></td>");
3231+ tb.append("<td FIXWIDTH=40>" + _posId + ".</td>");
3232+ tb.append("<td FIXWIDTH=190>" + result.getString("char_name") + "</td>");
3233+ tb.append("<td FIXWIDTH=140>" + className(classId) + "</td>");
3234+ tb.append("<td FIXWIDTH=100>" + result.getInt("olympiad_points") + "</td>");
3235+ tb.append("<td FIXWIDTH=120>" + result.getInt("competitions_done") + "</td>");
3236+ tb.append("<td FIXWIDTH=120>" + result.getString("clan_name") + "</td>");
3237+ tb.append("<td FIXWIDTH=120>" + result.getString("ally_name") + "</td>");
3238+ tb.append("<td FIXWIDTH=70>" + (status ? "<font color=99FF00>Online</font>" : "<font color=CC0000>Offline</font>") + "</td>");
3239+ tb.append("<td FIXWIDTH=5></td>");
3240+ tb.append("</tr>");
3241+ tb.append("</table>");
3242+ tb.append("<img src=\"L2UI.Squaregray\" width=\"610\" height=\"1\">");
3243+ }
3244+ result.close();
3245+ statement.close();
3246+ }
3247+ catch (Exception e)
3248+ {
3249+ _log.log(Level.WARNING, "Failed to load " + className(classId) + " list " + e.getMessage(), e);
3250+ }
3251+ finally
3252+ {
3253+ L2DatabaseFactory.close(con);
3254+ }
3255+ content = content.replaceAll("%showList%", tb.toString());
3256+ content = content.replaceAll("%className%", className(classId));
3257+ separateAndSend(content, activeChar);
3258+ }
3259+
3260+ public static final String className(int classid)
3261+ {
3262+ Map<Integer, String> classList = new HashMap<>();
3263+
3264+ classList.put(Integer.valueOf(88), "Duelist");
3265+ classList.put(Integer.valueOf(89), "Dreadnought");
3266+ classList.put(Integer.valueOf(90), "Phoenix Knight");
3267+ classList.put(Integer.valueOf(91), "Hell Knight");
3268+ classList.put(Integer.valueOf(92), "Sagittarius");
3269+ classList.put(Integer.valueOf(93), "Adventurer");
3270+ classList.put(Integer.valueOf(94), "Archmage");
3271+ classList.put(Integer.valueOf(95), "Soultaker");
3272+ classList.put(Integer.valueOf(96), "Arcana Lord");
3273+ classList.put(Integer.valueOf(97), "Cardinal");
3274+ classList.put(Integer.valueOf(98), "Hierophant");
3275+ classList.put(Integer.valueOf(99), "Evas Templar");
3276+ classList.put(Integer.valueOf(100), "Sword Muse");
3277+ classList.put(Integer.valueOf(101), "Wind Rider");
3278+ classList.put(Integer.valueOf(102), "Moonlight Sentinel");
3279+ classList.put(Integer.valueOf(103), "Mystic Muse");
3280+ classList.put(Integer.valueOf(104), "Elemental Master");
3281+ classList.put(Integer.valueOf(105), "Evas Saint");
3282+ classList.put(Integer.valueOf(106), "Shillien Templar");
3283+ classList.put(Integer.valueOf(107), "Spectral Dancer");
3284+ classList.put(Integer.valueOf(108), "Ghost Hunter");
3285+ classList.put(Integer.valueOf(109), "Ghost Sentinel");
3286+ classList.put(Integer.valueOf(110), "Storm Screamer");
3287+ classList.put(Integer.valueOf(111), "Spectral Master");
3288+ classList.put(Integer.valueOf(112), "Shillien Saint");
3289+ classList.put(Integer.valueOf(113), "Titan");
3290+ classList.put(Integer.valueOf(114), "Grand Khavatari");
3291+ classList.put(Integer.valueOf(115), "Dominator");
3292+ classList.put(Integer.valueOf(116), "Doomcryer");
3293+ classList.put(Integer.valueOf(117), "Fortune Seeker");
3294+ classList.put(Integer.valueOf(118), "Maestro");
3295+
3296+ return classList.get(Integer.valueOf(classid));
3297+ }
3298+
3299+ private static class SingletonHolder
3300+ {
3301+ protected static final OlStatsBBSManager _instance = new OlStatsBBSManager();
3302+ }
3303+}
3304\ No newline at end of file
3305Index: java/net/sf/l2j/gameserver/model/L2World.java
3306===================================================================
3307--- java/net/sf/l2j/gameserver/model/L2World.java (revision 11)
3308+++ java/net/sf/l2j/gameserver/model/L2World.java (working copy)
3309@@ -21,6 +21,7 @@
3310 import java.util.logging.Logger;
3311
3312 import net.sf.l2j.gameserver.datatables.CharNameTable;
3313+import net.sf.l2j.gameserver.datatables.GmListTable;
3314 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
3315 import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
3316
3317@@ -136,6 +137,11 @@
3318 return _allObjects.size();
3319 }
3320
3321+ public static List<L2PcInstance> getAllGMs()
3322+ {
3323+ return GmListTable.getInstance().getAllGms(true);
3324+ }
3325+
3326 /**
3327 * @return a collection containing all players in game.
3328 */
3329Index: java/net/sf/l2j/gameserver/communitybbs/Manager/AnnouncementsBBSManager.java
3330===================================================================
3331--- java/net/sf/l2j/gameserver/communitybbs/Manager/AnnouncementsBBSManager.java (revision 0)
3332+++ java/net/sf/l2j/gameserver/communitybbs/Manager/AnnouncementsBBSManager.java (revision 0)
3333@@ -0,0 +1,321 @@
3334+/*
3335+ * This program is free software: you can redistribute it and/or modify it under
3336+ * the terms of the GNU General Public License as published by the Free Software
3337+ * Foundation, either version 3 of the License, or (at your option) any later
3338+ * version.
3339+ *
3340+ * This program is distributed in the hope that it will be useful, but WITHOUT
3341+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
3342+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
3343+ * details.
3344+ *
3345+ * You should have received a copy of the GNU General Public License along with
3346+ * this program. If not, see <http://www.gnu.org/licenses/>.
3347+ */
3348+package net.sf.l2j.gameserver.communitybbs.Manager;
3349+
3350+import java.sql.Connection;
3351+import java.sql.PreparedStatement;
3352+import java.sql.ResultSet;
3353+import java.sql.SQLException;
3354+import java.text.DateFormat;
3355+import java.text.SimpleDateFormat;
3356+import java.util.Date;
3357+import java.util.StringTokenizer;
3358+import java.util.logging.Level;
3359+import java.util.logging.Logger;
3360+
3361+import net.sf.l2j.L2DatabaseFactory;
3362+import net.sf.l2j.gameserver.cache.HtmCache;
3363+import net.sf.l2j.gameserver.communitybbs.tasks.AnnouncementsUpdateManager;
3364+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
3365+
3366+public class AnnouncementsBBSManager extends BaseBBSManager
3367+{
3368+ private static final Logger _log = Logger.getLogger(AnnouncementsBBSManager.class.getName());
3369+
3370+ static String _title;
3371+
3372+ public static AnnouncementsBBSManager getInstance()
3373+ {
3374+ return SingletonHolder._instance;
3375+ }
3376+
3377+ @Override
3378+ public void parseCmd(String command, L2PcInstance activeChar)
3379+ {
3380+ if (command.startsWith("_bbsannouncements"))
3381+ {
3382+ StringTokenizer st = new StringTokenizer(command, ";");
3383+ st.nextToken();
3384+ String secondCommand = st.nextToken();
3385+
3386+ if (secondCommand.equalsIgnoreCase("show"))
3387+ {
3388+ showList(activeChar);
3389+ }
3390+ else if (secondCommand.equalsIgnoreCase("write"))
3391+ {
3392+ separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/announcements/adminWrite.htm"), activeChar);
3393+ }
3394+ else if (secondCommand.startsWith("postTitle"))
3395+ {
3396+ String title = secondCommand.substring(9);
3397+ if (title == "")
3398+ {
3399+ activeChar.sendMessage("Please insert title first.");
3400+ return;
3401+ }
3402+ if (title.length() >= 150)
3403+ {
3404+ activeChar.sendMessage("The current title lenght is " + title.length() + ". Maximum lenght is 150!");
3405+ return;
3406+ }
3407+ setTitle(title);
3408+
3409+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/announcements/adminWrite2.htm");
3410+ content = content.replaceAll("%title%", getTitle());
3411+ separateAndSend(content, activeChar);
3412+ }
3413+ else if (secondCommand.startsWith("postText"))
3414+ {
3415+ String content = secondCommand.substring(9);
3416+ if (content == "")
3417+ {
3418+ activeChar.sendMessage("Please insert your post content. This message cannot be empty.");
3419+ return;
3420+ }
3421+ if (content.length() >= 1000)
3422+ {
3423+ activeChar.sendMessage("The current content lenght is " + content.length() + ". Maximum lenght is 1000!");
3424+ return;
3425+ }
3426+ insertAnnouncement(getTitle(), content, activeChar);
3427+ }
3428+ else if (secondCommand.startsWith("read"))
3429+ {
3430+ StringTokenizer st2 = new StringTokenizer(secondCommand);
3431+ st2.nextToken();
3432+
3433+ String command_Id = st2.nextToken();
3434+ int announcement_id = Integer.valueOf(command_Id).intValue();
3435+ showAnnouncement(activeChar, announcement_id);
3436+ }
3437+ }
3438+ else
3439+ {
3440+ super.parseCmd(command, activeChar);
3441+ }
3442+ }
3443+
3444+ @Override
3445+ protected String getFolder()
3446+ {
3447+ return "announcements/";
3448+ }
3449+
3450+ static String getTitle()
3451+ {
3452+ return _title;
3453+ }
3454+
3455+ static void setTitle(String text)
3456+ {
3457+ _title = text;
3458+ }
3459+
3460+ private static void insertAnnouncement(String title, String content, L2PcInstance activeChar)
3461+ {
3462+ DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
3463+ Date date = new Date();
3464+ try
3465+ {
3466+ Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
3467+ try
3468+ {
3469+ PreparedStatement statement = con.prepareStatement("INSERT INTO bbs_announcements (announce_id,announce_title,announce_text,announce_date,author) VALUES (?,?,?,?,?)");
3470+
3471+ statement.setInt(1, getAnnouncementId());
3472+ statement.setString(2, title);
3473+ statement.setString(3, content);
3474+ statement.setString(4, dateFormat.format(date));
3475+ statement.setString(5, activeChar.getName());
3476+ statement.execute();
3477+ statement.close();
3478+ }
3479+ catch (Throwable localThrowable1)
3480+ {
3481+ localThrowable3 = localThrowable1;throw localThrowable1;
3482+ }
3483+ finally
3484+ {
3485+ if (con != null)
3486+ {
3487+ if (localThrowable3 != null)
3488+ {
3489+ try
3490+ {
3491+ con.close();
3492+ }
3493+ catch (Throwable localThrowable2)
3494+ {
3495+ localThrowable3.addSuppressed(localThrowable2);
3496+ }
3497+ }
3498+ else
3499+ {
3500+ con.close();
3501+ }
3502+ }
3503+ }
3504+ }
3505+ catch (SQLException e)
3506+ {
3507+ _log.log(Level.WARNING, "Failed to insert new announcement in database " + e.getMessage(), e);
3508+ }
3509+ AnnouncementsUpdateManager.updateList();
3510+ showList(activeChar);
3511+ }
3512+
3513+ private static int getAnnouncementId()
3514+ {
3515+ int id = 0;
3516+ try
3517+ {
3518+ Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
3519+ try
3520+ {
3521+ PreparedStatement statement = con.prepareStatement("SELECT announce_id FROM bbs_announcements ORDER BY announce_id DESC LIMIT 1");
3522+ ResultSet rset = statement.executeQuery();
3523+ while (rset.next())
3524+ {
3525+ id = rset.getInt("announce_id");
3526+ }
3527+ rset.close();
3528+ statement.close();
3529+ }
3530+ catch (Throwable localThrowable1)
3531+ {
3532+ localThrowable3 = localThrowable1;throw localThrowable1;
3533+ }
3534+ finally
3535+ {
3536+ if (con != null)
3537+ {
3538+ if (localThrowable3 != null)
3539+ {
3540+ try
3541+ {
3542+ con.close();
3543+ }
3544+ catch (Throwable localThrowable2)
3545+ {
3546+ localThrowable3.addSuppressed(localThrowable2);
3547+ }
3548+ }
3549+ else
3550+ {
3551+ con.close();
3552+ }
3553+ }
3554+ }
3555+ }
3556+ catch (Exception e)
3557+ {
3558+ _log.log(Level.WARNING, "Failed to load announcementId " + e.getMessage(), e);
3559+ }
3560+ return id + 1;
3561+ }
3562+
3563+ private static void showList(L2PcInstance activeChar)
3564+ {
3565+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/announcements/main.htm");
3566+ if (activeChar.isGM())
3567+ {
3568+ content = content.replaceAll("%adminMenu%", showAdminMenu());
3569+ }
3570+ else
3571+ {
3572+ content = content.replaceAll("%adminMenu%", "");
3573+ }
3574+ content = content.replaceAll("%showList%", AnnouncementsUpdateManager.showList());
3575+ separateAndSend(content, activeChar);
3576+ }
3577+
3578+ private static void showAnnouncement(L2PcInstance activeChar, int announcement_id)
3579+ {
3580+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/announcements/postTemplate.htm");
3581+ String title = "";String text = "";String date = "";String author = "";
3582+ try
3583+ {
3584+ Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
3585+ try
3586+ {
3587+ PreparedStatement st = con.prepareStatement("SELECT announce_title,announce_text,announce_date,author FROM bbs_announcements WHERE announce_id=?;");
3588+ st.setInt(1, announcement_id);
3589+ ResultSet rset = st.executeQuery();
3590+ while (rset.next())
3591+ {
3592+ title = rset.getString("announce_title");
3593+ text = rset.getString("announce_text");
3594+ date = rset.getString("announce_date");
3595+ author = rset.getString("author");
3596+ }
3597+ rset.close();
3598+ st.close();
3599+ }
3600+ catch (Throwable localThrowable1)
3601+ {
3602+ localThrowable3 = localThrowable1;throw localThrowable1;
3603+ }
3604+ finally
3605+ {
3606+ if (con != null)
3607+ {
3608+ if (localThrowable3 != null)
3609+ {
3610+ try
3611+ {
3612+ con.close();
3613+ }
3614+ catch (Throwable localThrowable2)
3615+ {
3616+ localThrowable3.addSuppressed(localThrowable2);
3617+ }
3618+ }
3619+ else
3620+ {
3621+ con.close();
3622+ }
3623+ }
3624+ }
3625+ }
3626+ catch (SQLException e)
3627+ {
3628+ _log.log(Level.WARNING, "Failed to load post with id " + announcement_id + " and error trace: " + e.getMessage(), e);
3629+ }
3630+ content = content.replaceAll("%title%", title);
3631+ content = content.replaceAll("%text%", text);
3632+ content = content.replaceAll("%date%", date);
3633+ content = content.replaceAll("%author%", author);
3634+ separateAndSend(content, activeChar);
3635+ }
3636+
3637+ static String showAdminMenu()
3638+ {
3639+ StringBuilder tb = new StringBuilder();
3640+
3641+ tb.append("<img src=\"l2ui.squaregray\" width=\"610\" height=\"1\"/><table width=610><tr>");
3642+ tb.append("<td width=110 height=18 align=center><font color=FF0000>Admin Only:</font></td>");
3643+ tb.append("<td width=400 height=18 align=left>The list will show only latest 5 announcements.</td>");
3644+ tb.append("<td width=100 height=18 align=center><button value=\"Write\" action=\"bypass _bbsannouncements;write\" width=75 height=21 back=\"L2UI_ch3.Btn1_normalOn\" fore=\"L2UI_ch3.Btn1_normal\"></td>");
3645+ tb.append("</tr></table><img src=\"l2ui.squaregray\" width=\"610\" height=\"1\"><br><br>");
3646+
3647+ return tb.toString();
3648+ }
3649+
3650+ private static class SingletonHolder
3651+ {
3652+ protected static final AnnouncementsBBSManager _instance = new AnnouncementsBBSManager();
3653+ }
3654+}
3655\ No newline at end of file
3656Index: java/net/sf/l2j/gameserver/communitybbs/Manager/ProblemReportBBSManager.java
3657===================================================================
3658--- java/net/sf/l2j/gameserver/communitybbs/Manager/ProblemReportBBSManager.java (revision 0)
3659+++ java/net/sf/l2j/gameserver/communitybbs/Manager/ProblemReportBBSManager.java (revision 0)
3660@@ -0,0 +1,212 @@
3661+/*
3662+ * This program is free software: you can redistribute it and/or modify it under
3663+ * the terms of the GNU General Public License as published by the Free Software
3664+ * Foundation, either version 3 of the License, or (at your option) any later
3665+ * version.
3666+ *
3667+ * This program is distributed in the hope that it will be useful, but WITHOUT
3668+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
3669+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
3670+ * details.
3671+ *
3672+ * You should have received a copy of the GNU General Public License along with
3673+ * this program. If not, see <http://www.gnu.org/licenses/>.
3674+ */
3675+package net.sf.l2j.gameserver.communitybbs.Manager;
3676+
3677+import java.io.BufferedWriter;
3678+import java.io.File;
3679+import java.io.FileWriter;
3680+import java.util.StringTokenizer;
3681+
3682+import net.sf.l2j.Config;
3683+import net.sf.l2j.gameserver.cache.HtmCache;
3684+import net.sf.l2j.gameserver.model.L2World;
3685+import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
3686+
3687+public class ProblemReportBBSManager extends BaseBBSManager
3688+{
3689+ static String _type = "";
3690+ static String _majority = "";
3691+ static String _title = "";
3692+
3693+ public static ProblemReportBBSManager getInstance()
3694+ {
3695+ return SingletonHolder._instance;
3696+ }
3697+
3698+ @Override
3699+ public void parseCmd(String command, L2PcInstance activeChar)
3700+ {
3701+ if (command.equals("_bbsProblemReport"))
3702+ {
3703+ showReportWindow(activeChar);
3704+ }
3705+ else if (command.startsWith("_bbsProblemReport"))
3706+ {
3707+ StringTokenizer st = new StringTokenizer(command, ";");
3708+ st.nextToken();
3709+ String secondCommand = st.nextToken();
3710+ if (secondCommand.startsWith("toDescription"))
3711+ {
3712+ StringTokenizer st1 = new StringTokenizer(secondCommand);
3713+ st1.nextToken();
3714+
3715+ String text = "";
3716+
3717+ setMajority(st1.nextToken());
3718+
3719+ setType(st1.nextToken());
3720+ while (st1.hasMoreTokens())
3721+ {
3722+ text = text + st1.nextToken() + " ";
3723+ }
3724+ if (text == "")
3725+ {
3726+ activeChar.sendMessage("Please insert title first.");
3727+ return;
3728+ }
3729+ setTitle(text);
3730+
3731+ showDescriptionWindow(activeChar);
3732+ }
3733+ else if (secondCommand.startsWith("submit"))
3734+ {
3735+ String description = secondCommand.substring(9);
3736+ if (description == "")
3737+ {
3738+ activeChar.sendMessage("Please insert description first.");
3739+ return;
3740+ }
3741+ if (description.length() >= 150)
3742+ {
3743+ activeChar.sendMessage("The current description lenght is " + description.length() + ". Maximum lenght is 800!");
3744+ return;
3745+ }
3746+ try
3747+ {
3748+ String fname = "data/reports/" + getMajority() + "_" + getType() + "_report_" + activeChar.getName() + ".txt";
3749+ File file = new File(fname);
3750+ boolean exist = file.createNewFile();
3751+ if (!exist)
3752+ {
3753+ activeChar.sendMessage("You have already submit a report, staff member must confirm it first.");
3754+ return;
3755+ }
3756+ FileWriter fstream = new FileWriter(fname);
3757+ BufferedWriter out = new BufferedWriter(fstream);
3758+ out.write("Problem Report");
3759+ out.newLine();
3760+ out.write("- - - - - - - - - - - - - - - - - - - -");
3761+ out.newLine();
3762+ out.write("Player Details:");
3763+ out.newLine();
3764+ out.write("Account: " + activeChar.getAccountName());
3765+ out.newLine();
3766+ out.write("Name: " + activeChar.getName());
3767+ out.newLine();
3768+ out.write("IP: " + activeChar.getClient().getConnection().getInetAddress().getHostAddress());
3769+ out.newLine();
3770+ out.write("- - - - - - - - - - - - - - - - - - - -");
3771+ out.newLine();
3772+ out.write("Type of report: " + getType());
3773+ out.newLine();
3774+ out.newLine();
3775+ out.write("Majority of report: " + getMajority());
3776+ out.newLine();
3777+ out.newLine();
3778+ out.write("Title: " + getTitle());
3779+ out.newLine();
3780+ out.newLine();
3781+ out.write("Description: " + description);
3782+ out.close();
3783+
3784+ separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/reporting/completed.htm"), activeChar);
3785+
3786+ L2World.getInstance();
3787+ for (L2PcInstance gms : L2World.getAllGMs())
3788+ {
3789+ gms.sendMessage("ATTENTION: " + activeChar.getName() + " just submited a report! Please take care of his report by browsing in /data/reports folder.");
3790+ }
3791+ }
3792+ catch (Exception e)
3793+ {
3794+ activeChar.sendMessage("Failed to submit report. Try again or contact with staff member. This error should not occur.");
3795+ e.printStackTrace();
3796+ return;
3797+ }
3798+ }
3799+ }
3800+ else
3801+ {
3802+ super.parseCmd(command, activeChar);
3803+ }
3804+ }
3805+
3806+ @Override
3807+ protected String getFolder()
3808+ {
3809+ return "reporting/";
3810+ }
3811+
3812+ private static void showReportWindow(L2PcInstance activeChar)
3813+ {
3814+ if (Config.ENABLE_BBS_REPORT)
3815+ {
3816+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/reporting/main.htm");
3817+
3818+ content = content.replaceAll("%charName%", activeChar.getName());
3819+ separateAndSend(content, activeChar);
3820+ }
3821+ else
3822+ {
3823+ separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/functionDisabled.htm"), activeChar);
3824+ }
3825+ }
3826+
3827+ static void setType(String val)
3828+ {
3829+ _type = val;
3830+ }
3831+
3832+ static void setMajority(String val)
3833+ {
3834+ _majority = val;
3835+ }
3836+
3837+ static void setTitle(String val)
3838+ {
3839+ _title = val;
3840+ }
3841+
3842+ static String getType()
3843+ {
3844+ return _type;
3845+ }
3846+
3847+ static String getMajority()
3848+ {
3849+ return _majority;
3850+ }
3851+
3852+ static String getTitle()
3853+ {
3854+ return _title;
3855+ }
3856+
3857+ private static void showDescriptionWindow(L2PcInstance activeChar)
3858+ {
3859+ String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/reporting/description.htm");
3860+
3861+ content = content.replaceAll("%charName%", activeChar.getName());
3862+ content = content.replaceAll("%type%", getType());
3863+ content = content.replaceAll("%majority%", getMajority());
3864+ content = content.replaceAll("%title%", getTitle());
3865+ separateAndSend(content, activeChar);
3866+ }
3867+
3868+ private static class SingletonHolder
3869+ {
3870+ protected static final ProblemReportBBSManager _instance = new ProblemReportBBSManager();
3871+ }
3872+}