Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Eclipse Workspace Patch 1.0
- #P aCis_datapack
- Index: tools/database_installer.sh
- ===================================================================
- --- tools/database_installer.sh (revision 8)
- +++ tools/database_installer.sh (working copy)
- @@ -78,6 +78,7 @@
- $MYG < ../sql/auction.sql &> /dev/null
- $MYG < ../sql/auction_bid.sql &> /dev/null
- $MYG < ../sql/augmentations.sql &> /dev/null
- +$MYG < ../sql/bbs_announcements.sql &> /dev/null
- $MYG < ../sql/bookmarks.sql &> /dev/null
- $MYG < ../sql/buffer_schemes.sql &> /dev/null
- $MYG < ../sql/buylists.sql &> /dev/null
- Index: data/html/CommunityBoard/stats/topRaid.htm
- ===================================================================
- --- data/html/CommunityBoard/stats/topRaid.htm (revision 0)
- +++ data/html/CommunityBoard/stats/topRaid.htm (revision 0)
- @@ -0,0 +1,29 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Top Raid Boss Killers</font>
- + <br>
- + <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 height=24 width=610>
- + <tr>
- + <td FIXWIDTH=5></td>
- + <td FIXWIDTH=20>#</td>
- + <td FIXWIDTH=180>Name</td>
- + <td FIXWIDTH=175>Class</td>
- + <td fixwidth=60>PvP</td>
- + <td fixwidth=60>Pk</td>
- + <td fixwidth=70 align=center><font color="CCCC66">R.Points</font></td>
- + <td fixwidth=140>Adenas</td>
- + <td fixwidth=150>In Game</td>
- + <td FIXWIDTH=65>Status</td>
- + </tr>
- + </table>
- + %topraid%
- + <br>
- + <font color="585858">Last updated: %lastUpdate%</font>
- + </center>
- + </body>
- +</html>
- Index: data/html/CommunityBoard/announcements/adminWrite.htm
- ===================================================================
- --- data/html/CommunityBoard/announcements/adminWrite.htm (revision 0)
- +++ data/html/CommunityBoard/announcements/adminWrite.htm (revision 0)
- @@ -0,0 +1,48 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">News Announcements.</font>
- + <img src="l2ui.squaregray" width="500" height="1">
- + <br>
- + <br>
- + <table width=500>
- + <tr>
- + <td>1. Please use HTML tag for your post!<br></td>
- + </tr>
- + <tr>
- + <td>2. Do not use any kind of (table) content!<br></td>
- + </tr>
- + <tr>
- + <td>3. The post cannot contain more then 1000 symbols.<br></td>
- + </tr>
- + <tr>
- + <td>4. Using url addresses is possible by using command for your button:<br></td>
- + </tr>
- + <tr>
- + <td>5. bypass -h visitUrl;yourURLaddress<br></td>
- + </tr>
- + <tr>
- + <td>6. Images outside client cannot be used.<br></td>
- + </tr>
- + </table>
- + <img src="l2ui.squaregray" width="500" height="1">
- + <br>
- + <table width=450>
- + <tr>
- + <td width=50 align=center>Title</td>
- + <td><edit var="title" width=400 height=13></td>
- + </tr>
- + <tr><td></td></tr>
- + <tr><td></td></tr>
- + </table>
- + <br><br>
- + <button value="Continue ->" action="bypass _bbsannouncements;postTitle $title" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"/>
- + </center>
- + <br>
- + <img src="l2ui.squaregray" width="610" height="1">
- + </body>
- +</html>
- \ No newline at end of file
- Index: data/html/CommunityBoard/donation/showMethods.htm
- ===================================================================
- --- data/html/CommunityBoard/donation/showMethods.htm (revision 0)
- +++ data/html/CommunityBoard/donation/showMethods.htm (revision 0)
- @@ -0,0 +1,42 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Pick Your Donation Method.</font>
- + <img src="l2ui.squaregray" width="500" height="1">
- + <br>
- + <br>
- + <table width=500>
- + <tr>
- + <td>1. Please be aware that you will not receive your reward right after you donate!</br></td>
- + </tr>
- + <tr>
- + <td>2. Firstly a member of our staff must confirm that the donation is valid.</br></td>
- + </tr>
- + <tr>
- + <td>3. Do not try to spam! You cannot make more donations until the first one is confirmed.</br></td>
- + </tr>
- + <tr>
- + <td>4. Please have patience. The staff members will receive message. But they might not react in 2 minutes.</br></td>
- + </tr>
- + <tr>
- + <td>5. Fake donations might get your self banned!</br></td>
- + </tr>
- + </table>
- + <br>
- + <img src="l2ui.squaregray" width="500" height="1"><br>
- + <table width=300>
- + <tr>
- + <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>
- + <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>
- + </tr>
- + </table>
- + </center>
- + <br>
- + <img src="l2ui.squaregray" width="610" height="1">
- + <br>
- + </body>
- +</html>
- \ No newline at end of file
- Index: data/html/CommunityBoard/donation/paysafe.htm
- ===================================================================
- --- data/html/CommunityBoard/donation/paysafe.htm (revision 0)
- +++ data/html/CommunityBoard/donation/paysafe.htm (revision 0)
- @@ -0,0 +1,67 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Donation Via PaySafe Card.</font>
- + <img src="l2ui.squaregray" width="500" height="1">
- + <br>
- + <br>
- + <table width=500>
- + <tr>
- + <td>1. The fields with <font color=LEVEL>*</font> are required!<br></td>
- + </tr>
- + <tr>
- + <td>2. Once submitted you cannot edit the details you've put bellow.<br></td>
- + </tr>
- + </table>
- + <br>
- + <img src="l2ui.squaregray" width="500" height="1"><br>
- + <font color="AAAAAA">Donation Form.</font>
- + <br>
- + <table width=500>
- + <tr>
- + <td width="75">Account:</td>
- + <td width="425">%charAcc%</td>
- + </tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width="75">Character:</td>
- + <td width="425">%charName%</td>
- + </tr>
- + <tr><td></td></tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width="75">Card Amount: <font color=LEVEL>*</font></td>
- + <td width="425"><combobox width=80 height=12 var="amount" list=10-Euro;25-Euro;50-Euro;100-Euro;></td>
- + </tr>
- + </table>
- + <table width=500>
- + <tr>
- + <td width="75">Card Pin: <font color=LEVEL>*</font></td>
- + <td width="50"><edit var="pin1" width=50 height=12 type=number></td>
- + <td width="50"><edit var="pin2" width=50 height=12 type=number></td>
- + <td width="50"><edit var="pin3" width=50 height=12 type=number></td>
- + <td width="50"><edit var="pin4" width=50 height=12 type=number></td>
- + <td width="190"></td>
- + </tr>
- + </table>
- + <br><br>
- + <table width=500>
- + <tr>
- + <td width="75">Message: <font color=LEVEL>*</font></td>
- + <td width="425"><edit var="message" width=240 height=12></td>
- + </tr>
- + </table>
- + <br>
- + <img src="l2ui.squaregray" width="500" height="1">
- + <br>
- + <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">
- + <br>
- + <img src="l2ui.squaregray" width="610" height="1"><br>
- + <br>
- + </center>
- + </body>
- +</html>
- \ No newline at end of file
- Index: data/html/CommunityBoard/announcements/adminWrite2.htm
- ===================================================================
- --- data/html/CommunityBoard/announcements/adminWrite2.htm (revision 0)
- +++ data/html/CommunityBoard/announcements/adminWrite2.htm (revision 0)
- @@ -0,0 +1,33 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">News Announcements.</font>
- + <img src="l2ui.squaregray" width="500" height="1">
- + <br>
- + <br>
- + <table width=450>
- + <tr>
- + <td width=50 align=center>Title:</td>
- + <td>%title%</td>
- + </tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width=50 align=center>Content:</td>
- + <td><multiedit var="content" width=400 height=200></td>
- + </tr>
- + </table>
- + <br>
- + <br>
- + <img src="l2ui.squaregray" width="500" height="1">
- + <br>
- + <br>
- + <button value="Post Announcement" action="bypass _bbsannouncements;postText $content" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"/>
- + </center>
- + <br>
- + <img src="l2ui.squaregray" width="610" height="1">
- + </body>
- +</html>
- \ No newline at end of file
- Index: data/html/CommunityBoard/top/index.htm
- ===================================================================
- --- data/html/CommunityBoard/top/index.htm (revision 8)
- +++ data/html/CommunityBoard/top/index.htm (working copy)
- @@ -1,67 +1,70 @@
- -<html><body><br>
- - <table width="610">
- - <tr>
- - <td align="center" height="30"><img src="l2ui.bbs_lineage2" width="128" height="16"></td>
- - </tr>
- - </table>
- - <table width="610" bgcolor="A7A19A">
- - <tr>
- - <td width="50" align="center">&$412;</td>
- - <td width="380" align="center">&$413;</td>
- - <td width="90" align="center">&$414;</td>
- - <td width="90" align="center">&$415;</td>
- - </tr>
- - </table><br>
- - <table width="610">
- - <tr>
- - <td width="50" align="center"><img src="l2ui.bbs_folder" width="32" height="32"></td>
- - <td width="380" align="left"><a action="bypass _bbsgetfav">Favorites</a><br1><font color="AAAAAA">Bookmarks</font></td>
- - <td width="90" align="center">0</td>
- - <td width="90" align="center">admin</td>
- - </tr>
- - </table>
- - <table border=0 cellspacing=0 cellpadding=0>
- - <tr>
- - <td width=610><img src="l2ui.squaregray" width="600" height="1"></td>
- - </tr>
- - </table><br>
- - <table border=0 cellspacing=0 cellpadding=2>
- - <tr>
- - <td FIXWIDTH=50 align=right valign=top><img src="l2ui.bbs_folder" width=32 height=32></td>
- - <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>
- - <td FIXWIDTH=90 align=center valign=top>0</td>
- - <td FIXWIDTH=90 align=center valign=top>admin</td>
- - </tr>
- - </table>
- - <table border=0 cellspacing=0 cellpadding=0>
- - <tr>
- - <td width=610><img src="l2ui.squaregray" width="600" height="1"></td>
- - </tr>
- - </table><br>
- - <table border=0 cellspacing=0 cellpadding=2>
- - <tr>
- - <td FIXWIDTH=50 align=right valign=top><img src="l2ui.bbs_folder" width=32 height=32></td>
- - <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>
- - <td FIXWIDTH=90 align=center valign=top>0</td>
- - <td FIXWIDTH=90 align=center valign=top>admin</td>
- - </tr>
- - </table>
- - <table border=0 cellspacing=0 cellpadding=0>
- - <tr>
- - <td width=610><img src="l2ui.squaregray" width="600" height="1"></td>
- - </tr>
- - </table><br>
- - <table border=0 cellspacing=0 cellpadding=2>
- - <tr>
- - <td FIXWIDTH=50 align=right valign=top><img src="l2ui.bbs_folder" width=32 height=32></td>
- - <td FIXWIDTH=380 align=left valign=top><a action="bypass _bbsclan">Clan Community</a><br1><font color="AAAAAA">Clan Community</font></td>
- - <td FIXWIDTH=90 align=center valign=top>0</td>
- - <td FIXWIDTH=90 align=center valign=top>admin</td>
- - </tr>
- - </table>
- - <table border=0 cellspacing=0 cellpadding=0>
- - <tr>
- - <td width=610><img src="l2ui.squaregray" width="600" height="1"></td>
- - </tr>
- - </table>
- -</center></body></html>
- \ No newline at end of file
- +<html>
- + <body>
- + <br>
- + <center><img src="l2ui.bbs_lineage2" width="80" height="16"></center>
- + <br>
- + <center><img src="l2ui.squaregray" width="600" height="1"></center>
- + <table width="610">
- + <tr>
- + <td width="50" align="center"><img src="l2ui.bbs_folder" width="32" height="32"></td>
- + <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>
- + </tr>
- + </table>
- + <center><img src="l2ui.squaregray" width="600" height="1"></center>
- + <table width="610">
- + <tr>
- + <td width="50" align="center"><img src="l2ui.maincharacter_small" width="32" height="32"></td>
- + <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>
- + </tr>
- + </table>
- + <center><img src="l2ui.squaregray" width="600" height="1"></center>
- + <table width="610">
- + <tr>
- + <td width="50" align="center"><img src="l2ui.mainsystem_small" width="32" height="32"></td>
- + <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>
- + </tr>
- + </table>
- + <center><img src="l2ui.squaregray" width="600" height="1"></center>
- + <br><br><br>
- + <center><img src="L2UI_CH3.herotower_deco" width=256 height=32></center>
- + <br><br><br>
- + <center><img src="l2ui.squaregray" width="600" height="1"></center>
- + <table width="610">
- + <tr>
- + <td width="50" align="center"><img src="l2ui.mainskill_small" width="32" height="32"></td>
- + <td width="380" align="left">
- + <a action="bypass _bbsstats;pvp">Top PvP Killers</a> |
- + <a action="bypass _bbsstats;pk">Top Pk Killers</a> |
- + <a action="bypass _bbsstats;raid">Top Raid Points</a> |
- + <a action="bypass _bbsstats;adena">Most Rich Players</a> |
- + <a action="bypass _bbsstats;online">Most Active Players</a><br1>
- + <font color=AAAAAA>Find out which are our best players.</font><br>
- + </td>
- + </tr>
- + </table>
- + <center><img src="l2ui.squaregray" width="600" height="1"></center>
- + <table width="610">
- + <tr>
- + <td width="50" align="center"><img src="l2ui.mainquest_small" width="32" height="32"></td>
- + <td width="380" align="left">
- + <a action="bypass _bbsOlStats">Olympiad Status</a> |
- + <a action="bypass _bbsGrandBoss">Grand Boss Status</a><br1>
- + <font color=AAAAAA>Learn valuable information about our world.</font><br>
- + </td>
- + </tr>
- + </table>
- + <center><img src="l2ui.squaregray" width="600" height="1"></center>
- + <table width="610">
- + <tr>
- + <td width="50" align="center"><img src="l2ui.mainstatus_small" width="32" height="32"></td>
- + <td width="380" align="left">
- + <a action="bypass _bbsShowRepair">Repair Broken Character</a> |
- + <a action="bypass _bbshome;passChange.htm">Change Account Password</a><br1>
- + <font color=AAAAAA>Use our special services to help your self out.</font><br>
- + </td>
- + </tr>
- + </table>
- + <center><img src="l2ui.squaregray" width="600" height="1"></center>
- + <br><br><br><br>
- + </body>
- +</html>
- \ No newline at end of file
- Index: data/html/CommunityBoard/announcements/main.htm
- ===================================================================
- --- data/html/CommunityBoard/announcements/main.htm (revision 0)
- +++ data/html/CommunityBoard/announcements/main.htm (revision 0)
- @@ -0,0 +1,21 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center><img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Announcements List:</font></center>
- + <br><br>
- + %adminMenu%
- + <table width=610 bgcolor="000000">
- + <tr>
- + <td width=50 height=18 align="center">#</td>
- + <td width=400 height=18 align="left">Title</td>
- + <td width=100 height=18 align="center">Date</td>
- + </tr>
- + </table>
- + %showList%
- + <br><br>
- + <center><font color="585858">For older announcements please visit our forum.</font></center>
- + </body>
- +</html>
- Index: data/html/CommunityBoard/top/repair.htm
- ===================================================================
- --- data/html/CommunityBoard/top/repair.htm (revision 0)
- +++ data/html/CommunityBoard/top/repair.htm (revision 0)
- @@ -0,0 +1,36 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Character Repair Function</font><br>
- + <img src="l2ui.squaregray" width="500" height="1"><br>
- + <br>
- + <table width="300" cellpadding="5">
- + <tr>
- + <td width="45" valign="top" align="center"><img src="icon.skill4376" width="32" height="32"></td>
- + <td valign="top">Use this tool, to fix problems with your other<br1>character. Like client crashing while loading.</td>
- + </tr>
- + </table>
- + <br>
- + <img src="l2ui.SquareGray" width="300" height="1">
- + <br>
- + <table width="300" cellpadding="5">
- + <tr>
- + <td valign="top"><font color="FF6600">Choose broken character name.</font><br1>
- + Choose character name, that you wish to<br1>attempt to fix. It will be moved to Floran<br1>
- + and removed shortcuts and keyboard<br1>configuration.</td>
- + </tr>
- + <tr>
- + <td align=center><combobox var="name" list="%acc_chars%" width="170" height="15"/></td>
- + </tr>
- + </table>
- + <br>
- + <img src="l2ui.SquareGray" width="300" height="1"><br>
- + <button value="Repair the character" action="bypass _bbsRepair $name" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton">
- + </center>
- + <center><img src="l2ui.squaregray" width="500" height="1"></center><br>
- + </body>
- +</html>
- Index: data/html/CommunityBoard/reporting/description.htm
- ===================================================================
- --- data/html/CommunityBoard/reporting/description.htm (revision 0)
- +++ data/html/CommunityBoard/reporting/description.htm (revision 0)
- @@ -0,0 +1,45 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Report Form</font>
- + <img src="l2ui.squaregray" width="500" height="1">
- + <br>
- + <br>
- + <table width=500>
- + <tr>
- + <td width="100" align=left>Character:</td>
- + <td width="400" align=left>%charName%</td>
- + </tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width="100" align=left>Majority:</td>
- + <td width="400" align=left>%majority%</td>
- + </tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width="100" align=left>Type:</td>
- + <td width="400" align=left>%type%</td>
- + </tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width="100">Title:</td>
- + <td align=left>%title%</td>
- + </tr>
- + <tr>
- + <td width="100">Description:</td>
- + <td align=left><multiedit var="description" width=350 height=200></td>
- + </tr>
- + </table>
- + <br>
- + <img src="l2ui.squaregray" width="500" height="1"><br>
- + <button value="Submit Report" action="bypass _bbsProblemReport;submit $description" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton">
- + </center>
- + <br>
- + <img src="l2ui.squaregray" width="610" height="1">
- + <br>
- + </body>
- +</html>
- \ No newline at end of file
- Index: data/html/CommunityBoard/stats/topOnline.htm
- ===================================================================
- --- data/html/CommunityBoard/stats/topOnline.htm (revision 0)
- +++ data/html/CommunityBoard/stats/topOnline.htm (revision 0)
- @@ -0,0 +1,29 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Most Active Players</font>
- + <br>
- + <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 height=24 width=610>
- + <tr>
- + <td FIXWIDTH=5></td>
- + <td FIXWIDTH=20>#</td>
- + <td FIXWIDTH=180>Name</td>
- + <td FIXWIDTH=175>Class</td>
- + <td fixwidth=60>PvP</td>
- + <td fixwidth=60>Pk</td>
- + <td fixwidth=70 align=center>R.Points</td>
- + <td fixwidth=140>Adenas</td>
- + <td fixwidth=150><font color="CCCC66">In Game</font></td>
- + <td FIXWIDTH=65>Status</td>
- + </tr>
- + </table>
- + %toponline%
- + <br>
- + <font color="585858">Last updated: %lastUpdate%</font>
- + </center>
- + </body>
- +</html>
- Index: data/html/CommunityBoard/reporting/main.htm
- ===================================================================
- --- data/html/CommunityBoard/reporting/main.htm (revision 0)
- +++ data/html/CommunityBoard/reporting/main.htm (revision 0)
- @@ -0,0 +1,59 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Problem Reporting</font>
- + <img src="l2ui.squaregray" width="500" height="1">
- + <br>
- + <br>
- + <table width=500>
- + <tr>
- + <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>
- + </tr>
- + <tr>
- + <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>
- + </tr>
- + <tr>
- + <td>3. It remembers to choose the correct option before reporting an error.<br></td>
- + </tr>
- + <tr>
- + <td>4. In case that you haven't got any answer, in 24 hours, we suggested to you to return to report.<br></td>
- + </tr>
- + </table>
- + <br>
- + <img src="l2ui.squaregray" width="500" height="1"><br>
- + <font color="AAAAAA">Report Form.</font>
- + <br>
- + <table width=500>
- + <tr>
- + <td width="100" align=left>Character:</td>
- + <td width="400" align=left>%charName%</td>
- + </tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width="100" align=left>Majority:</td>
- + <td width="400" align=left><combobox width=80 height=12 var="mojority" list=Low;Normal;Critical;></td>
- + </tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width="100" align=left>Type:</td>
- + <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>
- + </tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width="100">Title:</td>
- + <td align=left><edit var="title" width=150 height=12></td>
- + </tr>
- + </table>
- + <br>
- + <img src="l2ui.squaregray" width="500" height="1"><br>
- + <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">
- + </center>
- + <br>
- + <img src="l2ui.squaregray" width="610" height="1">
- + <br>
- + </body>
- +</html>
- \ No newline at end of file
- Index: data/html/CommunityBoard/stats/boss/grandBoss.htm
- ===================================================================
- --- data/html/CommunityBoard/stats/boss/grandBoss.htm (revision 0)
- +++ data/html/CommunityBoard/stats/boss/grandBoss.htm (revision 0)
- @@ -0,0 +1,19 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Grand Boss Status</font>
- + <br>
- + <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 height=24 width=400>
- + <tr>
- + <td FIXWIDTH=200 align=center>Raid Name</td>
- + <td FIXWIDTH=200 align=center>Status</td>
- + </tr>
- + </table>
- + %showList%
- + </center>
- + </body>
- +</html>
- Index: data/html/CommunityBoard/top/passChange.htm
- ===================================================================
- --- data/html/CommunityBoard/top/passChange.htm (revision 0)
- +++ data/html/CommunityBoard/top/passChange.htm (revision 0)
- @@ -0,0 +1,44 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Password Change Function</font><br>
- + <img src="l2ui.squaregray" width="500" height="1"><br>
- + <br>
- + <table width="400" cellpadding="5">
- + <tr>
- + <td width="45" valign="top" align="center"><img src="icon.action006" width="32" height="32"></td>
- + <td valign="top">
- + Changing your password often is not recommended, because<br1>
- + more passwords means more confusion and you might forget it.
- + </td>
- + </tr>
- + </table>
- + <br>
- + <img src="l2ui.SquareGray" width="400" height="1">
- + <br>
- + Please fill all the fields bellow.<br>
- + <table width="210" cellpadding="5">
- + <tr>
- + <td width=100 valign="top">Current Password:</td>
- + <td width=100 valign="top"><edit var="cur" width=100 height=12></td>
- + </tr>
- + <tr>
- + <td width=100 valign="top">New Password:</td>
- + <td width=100 valign="top"><edit var="new" width=100 height=12></td>
- + </tr>
- + <tr>
- + <td width=100 valign="top">Repeat Password:</td>
- + <td width=100 valign="top"><edit var="repeatnew" width=100 height=12></td>
- + </tr>
- + </table>
- + <br>
- + <img src="l2ui.SquareGray" width="400" height="1"><br>
- + <button value="Change my password" action="bypass _bbsChangePass $cur $new $repeatnew" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"/>
- + </center>
- + <center><img src="l2ui.squaregray" width="500" height="1"></center><br>
- + </body>
- +</html>
- Index: data/html/CommunityBoard/donation/paypal.htm
- ===================================================================
- --- data/html/CommunityBoard/donation/paypal.htm (revision 0)
- +++ data/html/CommunityBoard/donation/paypal.htm (revision 0)
- @@ -0,0 +1,77 @@
- +<html>
- + <body>
- + <br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Donation Via PayPal.</font>
- + <img src="l2ui.squaregray" width="500" height="1">
- + <br>
- + <br>
- + <table width=500>
- + <tr>
- + <td>Donation Guide:<br></td>
- + </tr>
- + <tr>
- + <td>1. Firstly visit the paypal website link. (Button Bellow)<br></td>
- + </tr>
- + <tr>
- + <td>2. Fill the fields in your browser and complete the donation payment.<br></td>
- + </tr>
- + <tr>
- + <td>3. After everything is completed fill the fields bellow with the information from your donation.<br></td>
- + </tr>
- + <tr><td></td></tr>
- + <tr>
- + <td>4. The fields with <font color=LEVEL>*</font> are required!<br></td>
- + </tr>
- + <tr>
- + <td>5. Please enter only information about your paypal account!<br></td>
- + </tr>
- + </table>
- + <br>
- + <img src="l2ui.squaregray" width="500" height="1"><br>
- + <font color="AAAAAA">Donation Form.</font>
- + <br>
- + <table width=500>
- + <tr>
- + <td width="100" align=left>Account:</td>
- + <td width="400" align=left>%charAcc%</td>
- + </tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width="100" align=left>Character:</td>
- + <td width="400" align=left>%charName%</td>
- + </tr>
- + <tr><td></td></tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width="75">Amount: <font color=LEVEL>*</font></td>
- + <td width="425"><edit var="amount" width=50 height=12></td>
- + </tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width="75">Email: <font color=LEVEL>*</font></td>
- + <td width="425"><edit var="email" width=150 height=12></td>
- + </tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width="75">Transaction Id: <font color=LEVEL>*</font></td>
- + <td width="425"><edit var="transId" width=150 height=12></td>
- + </tr>
- + <tr><td></td></tr>
- + <tr>
- + <td width="75">Message: <font color=LEVEL>*</font></td>
- + <td width="425"><edit var="message" width=300 height=12></td>
- + </tr>
- + </table>
- + <br>
- + <img src="l2ui.squaregray" width="500" height="1">
- + <br>
- + <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">
- + <br>
- + <img src="l2ui.squaregray" width="610" height="1"><br>
- + <br>
- + </center>
- + </body>
- +</html>
- \ No newline at end of file
- Index: tools/database_installer.bat
- ===================================================================
- --- tools/database_installer.bat (revision 8)
- +++ tools/database_installer.bat (working copy)
- @@ -59,6 +59,7 @@
- %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/auction.sql
- %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/auction_bid.sql
- %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/augmentations.sql
- +%mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/bbs_announcements.sql
- %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/bookmarks.sql
- %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/buffer_schemes.sql
- %mysqlPath% -h %gshost% -u %gsuser% --password=%gspass% -D %gsdb% < ../sql/buylists.sql
- Index: data/html/CommunityBoard/donation/completed.htm
- ===================================================================
- --- data/html/CommunityBoard/donation/completed.htm (revision 0)
- +++ data/html/CommunityBoard/donation/completed.htm (revision 0)
- @@ -0,0 +1,12 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + Thank you for your donation!<br>
- + Please wait while GM confirms it and you will get your reward.
- + </center>
- + </body>
- +</html>
- \ No newline at end of file
- Index: data/html/CommunityBoard/stats/topPk.htm
- ===================================================================
- --- data/html/CommunityBoard/stats/topPk.htm (revision 0)
- +++ data/html/CommunityBoard/stats/topPk.htm (revision 0)
- @@ -0,0 +1,29 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Top Pk Killers</font>
- + <br>
- + <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 height=24 width=610>
- + <tr>
- + <td FIXWIDTH=5></td>
- + <td FIXWIDTH=20>#</td>
- + <td FIXWIDTH=180>Name</td>
- + <td FIXWIDTH=175>Class</td>
- + <td fixwidth=60>PvP</td>
- + <td fixwidth=60><font color="CCCC66">Pk</font></td>
- + <td fixwidth=70 align=center>R.Points</td>
- + <td fixwidth=140>Adenas</td>
- + <td fixwidth=150>In Game</td>
- + <td FIXWIDTH=65>Status</td>
- + </tr>
- + </table>
- + %toppk%
- + <br>
- + <font color="585858">Last updated: %lastUpdate%</font>
- + </center>
- + </body>
- +</html>
- Index: data/html/CommunityBoard/top/repaired.htm
- ===================================================================
- --- data/html/CommunityBoard/top/repaired.htm (revision 0)
- +++ data/html/CommunityBoard/top/repaired.htm (revision 0)
- @@ -0,0 +1,17 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Character Repair Function</font><br>
- + <img src="l2ui.squaregray" width="500" height="1"><br>
- + <br>
- + Repairing procedure has been successfully finished!<br>
- + Relog now on broken character, to confirm that repairing operation was sucessfull.<br>
- + If not, contact server Support and ask for help.<br>
- + </center>
- + <center><img src="l2ui.squaregray" width="500" height="1"></center><br>
- + </body>
- +</html>
- Index: data/html/CommunityBoard/stats/olympiad/list.htm
- ===================================================================
- --- data/html/CommunityBoard/stats/olympiad/list.htm (revision 0)
- +++ data/html/CommunityBoard/stats/olympiad/list.htm (revision 0)
- @@ -0,0 +1,27 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">%className% Status</font>
- + <br>
- + <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 width=610>
- + <tr>
- + <td FIXWIDTH=10></td>
- + <td FIXWIDTH=40>#</td>
- + <td FIXWIDTH=190>Name</td>
- + <td FIXWIDTH=140>Class</td>
- + <td FIXWIDTH=100>Points</td>
- + <td FIXWIDTH=120>Competitions</td>
- + <td FIXWIDTH=120>Clan</td>
- + <td FIXWIDTH=120>Ally</td>
- + <td FIXWIDTH=70>Status</td>
- + <td FIXWIDTH=5></td>
- + </tr>
- + </table>
- + %showList%
- + </center>
- + </body>
- +</html>
- Index: sql/bbs_announcements.sql
- ===================================================================
- --- sql/bbs_announcements.sql (revision 0)
- +++ sql/bbs_announcements.sql (revision 0)
- @@ -0,0 +1,8 @@
- +CREATE TABLE IF NOT EXISTS `bbs_announcements` (
- + `announce_id` INT NOT NULL default 0,
- + `announce_title` varchar(150),
- + `announce_text` varchar(1000),
- + `announce_date` varchar(10),
- + `author` varchar(16),
- + PRIMARY KEY (`announce_id`)
- +);
- \ No newline at end of file
- Index: data/html/CommunityBoard/reporting/completed.htm
- ===================================================================
- --- data/html/CommunityBoard/reporting/completed.htm (revision 0)
- +++ data/html/CommunityBoard/reporting/completed.htm (revision 0)
- @@ -0,0 +1,13 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + Thank you for your report!<br>
- + We value player's problem reports because they are important for our server.<br>
- + Every reporting is making our server even more stronger :)
- + </center>
- + </body>
- +</html>
- \ No newline at end of file
- Index: data/html/CommunityBoard/stats/olympiad/main.htm
- ===================================================================
- --- data/html/CommunityBoard/stats/olympiad/main.htm (revision 0)
- +++ data/html/CommunityBoard/stats/olympiad/main.htm (revision 0)
- @@ -0,0 +1,79 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Olympiad Status</font>
- + <br>
- + <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 width=610>
- + <tr>
- + <td FIXWIDTH=10></td>
- + <td FIXWIDTH=40>#</td>
- + <td FIXWIDTH=190>Name</td>
- + <td FIXWIDTH=140>Class</td>
- + <td FIXWIDTH=100>Points</td>
- + <td FIXWIDTH=120>Competitions</td>
- + <td FIXWIDTH=120>Clan</td>
- + <td FIXWIDTH=120>Ally</td>
- + <td FIXWIDTH=70>Status</td>
- + <td FIXWIDTH=5></td>
- + </tr>
- + </table>
- + <br><br><br>
- + <font color="AAAAAA">Please select class:</font>
- + <br>
- + <table border=0 cellspacing=0 cellpadding=2 width=610>
- + <tr>
- + <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>
- + <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>
- + <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>
- + <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>
- + </tr>
- + <tr>
- + <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>
- + <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>
- + <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>
- + <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>
- + </tr>
- + <tr>
- + <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>
- + <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>
- + <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>
- + <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>
- + </tr>
- + <tr>
- + <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>
- + <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>
- + <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>
- + <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>
- + </tr>
- + <tr>
- + <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>
- + <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>
- + <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>
- + <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>
- + </tr>
- + <tr>
- + <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>
- + <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>
- + <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>
- + <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>
- + </tr>
- + <tr>
- + <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>
- + <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>
- + <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>
- + <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>
- + </tr>
- + <tr>
- + <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>
- + <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>
- + <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>
- + <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>
- + </tr>
- + </table>
- + </center>
- + </body>
- +</html>
- Index: data/html/CommunityBoard/stats/topAdena.htm
- ===================================================================
- --- data/html/CommunityBoard/stats/topAdena.htm (revision 0)
- +++ data/html/CommunityBoard/stats/topAdena.htm (revision 0)
- @@ -0,0 +1,29 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Most Rich Players</font>
- + <br>
- + <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 height=24 width=610>
- + <tr>
- + <td FIXWIDTH=5></td>
- + <td FIXWIDTH=20>#</td>
- + <td FIXWIDTH=180>Name</td>
- + <td FIXWIDTH=175>Class</td>
- + <td fixwidth=60>PvP</td>
- + <td fixwidth=60>Pk</td>
- + <td fixwidth=70 align=center>R.Points</td>
- + <td fixwidth=140><font color="CCCC66">Adenas</font></td>
- + <td fixwidth=150>In Game</td>
- + <td FIXWIDTH=65>Status</td>
- + </tr>
- + </table>
- + %topadena%
- + <br>
- + <font color="585858">Last updated: %lastUpdate%</font>
- + </center>
- + </body>
- +</html>
- Index: data/html/CommunityBoard/announcements/postTemplate.htm
- ===================================================================
- --- data/html/CommunityBoard/announcements/postTemplate.htm (revision 0)
- +++ data/html/CommunityBoard/announcements/postTemplate.htm (revision 0)
- @@ -0,0 +1,26 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">%title%</font>
- + <br>
- + <table width=500 bgcolor="000000">
- + <tr>
- + <td width=100 height=18 align="center">Published at %date% by <font color="88FF11">%author%</font></td>
- + </tr>
- + </table>
- + <br>
- + <table width=500>
- + <tr>
- + <td>%text%</td>
- + </tr>
- + </table>
- + </center>
- + <br>
- + <img src="l2ui.squaregray" width="610" height="1">
- + <br>
- + </body>
- +</html>
- \ No newline at end of file
- Index: data/html/CommunityBoard/donation/main.htm
- ===================================================================
- --- data/html/CommunityBoard/donation/main.htm (revision 0)
- +++ data/html/CommunityBoard/donation/main.htm (revision 0)
- @@ -0,0 +1,45 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Donation Rules & Terms of agreement.</font>
- + <img src="l2ui.squaregray" width="500" height="1">
- + <br>
- + <br>
- + <table width=500>
- + <tr>
- + <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>
- + </tr>
- + <tr>
- + <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>
- + </tr>
- + <tr>
- + <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>
- + </tr>
- + <tr>
- + <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>
- + </tr>
- + <tr>
- + <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>
- + </tr>
- + <tr>
- + <td>6. After you have donated please state the following, in a forum private message to Administrator, in this format<br></td>
- + </tr>
- + </table>
- + <br>
- + <img src="l2ui.squaregray" width="500" height="1"><br>
- + <table width=300>
- + <tr>
- + <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>
- + <td><button value="I Disagee" action="bypass _bbshome" width=140 height=21 back="L2UI_ch3.msnbutton_down" fore="L2UI_ch3.msnbutton"></td>
- + </tr>
- + </table>
- + </center>
- + <br>
- + <img src="l2ui.squaregray" width="610" height="1">
- + <br>
- + </body>
- +</html>
- \ No newline at end of file
- Index: data/html/CommunityBoard/stats/topPvp.htm
- ===================================================================
- --- data/html/CommunityBoard/stats/topPvp.htm (revision 0)
- +++ data/html/CommunityBoard/stats/topPvp.htm (revision 0)
- @@ -0,0 +1,29 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Top PvP Killers</font>
- + <br>
- + <table border=0 cellspacing=0 cellpadding=2 bgcolor=000000 height=24 width=610>
- + <tr>
- + <td FIXWIDTH=5></td>
- + <td FIXWIDTH=20>#</td>
- + <td FIXWIDTH=180>Name</td>
- + <td FIXWIDTH=175>Class</td>
- + <td fixwidth=60><font color="CCCC66">PvP</font></td>
- + <td fixwidth=60>Pk</td>
- + <td fixwidth=70 align=center>R.Points</td>
- + <td fixwidth=140>Adenas</td>
- + <td fixwidth=150>In Game</td>
- + <td FIXWIDTH=65>Status</td>
- + </tr>
- + </table>
- + %toppvp%
- + <br>
- + <font color="585858">Last updated: %lastUpdate%</font>
- + </center>
- + </body>
- +</html>
- Index: tools/full_install.sql
- ===================================================================
- --- tools/full_install.sql (revision 8)
- +++ tools/full_install.sql (working copy)
- @@ -3,6 +3,7 @@
- DROP TABLE IF EXISTS auction;
- DROP TABLE IF EXISTS auction_bid;
- DROP TABLE IF EXISTS augmentations;
- +DROP TABLE IF EXISTS bbs_announcements;
- DROP TABLE IF EXISTS bookmarks;
- DROP TABLE IF EXISTS buffer_schemes;
- DROP TABLE IF EXISTS buylists;
- Index: data/html/CommunityBoard/top/passChanged.htm
- ===================================================================
- --- data/html/CommunityBoard/top/passChanged.htm (revision 0)
- +++ data/html/CommunityBoard/top/passChanged.htm (revision 0)
- @@ -0,0 +1,16 @@
- +<html>
- + <body>
- + <br>
- + <br><br><br>
- + <center>
- + <img src="L2UI_CH3.herotower_deco" width=256 height=32>
- + <br>
- + <font color="AAAAAA">Password Change Function</font><br>
- + <img src="l2ui.squaregray" width="500" height="1"><br>
- + <br>
- + Password changing procedure has been successfully finished!<br>
- + Please re-login to confirm your new password.<br>
- + </center>
- + <center><img src="l2ui.squaregray" width="500" height="1"></center><br>
- + </body>
- +</html>
- #P aCis_gameserver
- Index: java/net/sf/l2j/gameserver/communitybbs/Manager/StatsBBSManager.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/communitybbs/Manager/StatsBBSManager.java (revision 0)
- +++ java/net/sf/l2j/gameserver/communitybbs/Manager/StatsBBSManager.java (revision 0)
- @@ -0,0 +1,120 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package net.sf.l2j.gameserver.communitybbs.Manager;
- +
- +import java.util.StringTokenizer;
- +
- +import net.sf.l2j.gameserver.cache.HtmCache;
- +import net.sf.l2j.gameserver.communitybbs.tasks.PlayerStatsUpdateTask;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +
- +public class StatsBBSManager extends BaseBBSManager
- +{
- + @Override
- + public void parseCmd(String command, L2PcInstance activeChar)
- + {
- + if (command.startsWith("_bbsstats"))
- + {
- + StringTokenizer st = new StringTokenizer(command, ";");
- + st.nextToken();
- + String secondCommand = st.nextToken();
- + if (secondCommand.equals("pvp"))
- + {
- + showTopPvpList(activeChar);
- + }
- + else if (secondCommand.equals("pk"))
- + {
- + showTopPkList(activeChar);
- + }
- + else if (secondCommand.equals("raid"))
- + {
- + showTopRaidList(activeChar);
- + }
- + else if (secondCommand.equals("adena"))
- + {
- + showTopAdenaList(activeChar);
- + }
- + else if (secondCommand.equals("online"))
- + {
- + showTopOnlineList(activeChar);
- + }
- + }
- + else
- + {
- + super.parseCmd(command, activeChar);
- + }
- + }
- +
- + @Override
- + protected String getFolder()
- + {
- + return "stats/";
- + }
- +
- + public static StatsBBSManager getInstance()
- + {
- + return SingletonHolder._instance;
- + }
- +
- + private static void showTopPvpList(L2PcInstance activeChar)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/topPvp.htm");
- +
- + content = content.replaceAll("%toppvp%", PlayerStatsUpdateTask.pvpList());
- + content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
- + separateAndSend(content, activeChar);
- + }
- +
- + private static void showTopPkList(L2PcInstance activeChar)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/topPk.htm");
- +
- + content = content.replaceAll("%toppk%", PlayerStatsUpdateTask.pkList());
- + content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
- + separateAndSend(content, activeChar);
- + }
- +
- + private static void showTopRaidList(L2PcInstance activeChar)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/topRaid.htm");
- +
- + content = content.replaceAll("%topraid%", PlayerStatsUpdateTask.raidList());
- + content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
- + separateAndSend(content, activeChar);
- + }
- +
- + private static void showTopAdenaList(L2PcInstance activeChar)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/topAdena.htm");
- +
- + content = content.replaceAll("%topadena%", PlayerStatsUpdateTask.adenaList());
- + content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
- + separateAndSend(content, activeChar);
- + }
- +
- + private static void showTopOnlineList(L2PcInstance activeChar)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/topOnline.htm");
- +
- + content = content.replaceAll("%toponline%", PlayerStatsUpdateTask.onlineList());
- + content = content.replace("%lastUpdate%", PlayerStatsUpdateTask.getLastUpdate());
- + separateAndSend(content, activeChar);
- + }
- +
- + private static class SingletonHolder
- + {
- + protected static final StatsBBSManager _instance = new StatsBBSManager();
- + }
- +}
- Index: java/net/sf/l2j/gameserver/GameServer.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/GameServer.java (revision 8)
- +++ java/net/sf/l2j/gameserver/GameServer.java (working copy)
- @@ -31,6 +31,8 @@
- import net.sf.l2j.gameserver.cache.CrestCache;
- import net.sf.l2j.gameserver.cache.HtmCache;
- import net.sf.l2j.gameserver.communitybbs.Manager.ForumsBBSManager;
- +import net.sf.l2j.gameserver.communitybbs.tasks.AnnouncementsUpdateManager;
- +import net.sf.l2j.gameserver.communitybbs.tasks.PlayerStatsUpdateTask;
- import net.sf.l2j.gameserver.datatables.AccessLevels;
- import net.sf.l2j.gameserver.datatables.AdminCommandAccessRights;
- import net.sf.l2j.gameserver.datatables.ArmorSetsTable;
- @@ -181,7 +183,11 @@
- Util.printSection("Community server");
- if (Config.ENABLE_COMMUNITY_BOARD) // Forums has to be loaded before clan data
- + {
- + AnnouncementsUpdateManager.loadSection();
- + PlayerStatsUpdateTask.updateTask();
- ForumsBBSManager.getInstance().initRoot();
- + }
- else
- _log.config("Community server is disabled.");
- Index: java/net/sf/l2j/L2DatabaseFactory.java
- ===================================================================
- --- java/net/sf/l2j/L2DatabaseFactory.java (revision 8)
- +++ java/net/sf/l2j/L2DatabaseFactory.java (working copy)
- @@ -168,4 +168,13 @@
- }
- }
- }
- +
- + public static void close(Connection con)
- + {
- + try
- + {
- + con.close();
- + }
- + catch (Exception e) {}
- + }
- }
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/communitybbs/CommunityBoard.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/communitybbs/CommunityBoard.java (revision 8)
- +++ java/net/sf/l2j/gameserver/communitybbs/CommunityBoard.java (working copy)
- @@ -15,12 +15,20 @@
- package net.sf.l2j.gameserver.communitybbs;
- import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.communitybbs.Manager.AnnouncementsBBSManager;
- import net.sf.l2j.gameserver.communitybbs.Manager.BaseBBSManager;
- +import net.sf.l2j.gameserver.communitybbs.Manager.BossBBSManager;
- import net.sf.l2j.gameserver.communitybbs.Manager.ClanBBSManager;
- +import net.sf.l2j.gameserver.communitybbs.Manager.DonationBBSManager;
- import net.sf.l2j.gameserver.communitybbs.Manager.FriendsBBSManager;
- import net.sf.l2j.gameserver.communitybbs.Manager.MailBBSManager;
- +import net.sf.l2j.gameserver.communitybbs.Manager.OlStatsBBSManager;
- +import net.sf.l2j.gameserver.communitybbs.Manager.PasswordBBSManager;
- import net.sf.l2j.gameserver.communitybbs.Manager.PostBBSManager;
- +import net.sf.l2j.gameserver.communitybbs.Manager.ProblemReportBBSManager;
- import net.sf.l2j.gameserver.communitybbs.Manager.RegionBBSManager;
- +import net.sf.l2j.gameserver.communitybbs.Manager.RepairBBSManager;
- +import net.sf.l2j.gameserver.communitybbs.Manager.StatsBBSManager;
- import net.sf.l2j.gameserver.communitybbs.Manager.TopBBSManager;
- import net.sf.l2j.gameserver.communitybbs.Manager.TopicBBSManager;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- @@ -66,6 +74,38 @@
- TopicBBSManager.getInstance().parseCmd(command, activeChar);
- else if (command.startsWith("_bbsposts"))
- PostBBSManager.getInstance().parseCmd(command, activeChar);
- + else if (command.startsWith("_bbsstats"))
- + {
- + StatsBBSManager.getInstance().parseCmd(command, activeChar);
- + }
- + else if ((command.startsWith("_bbsOlStats")) || (command.startsWith("_bbsClassList")))
- + {
- + OlStatsBBSManager.getInstance().parseCmd(command, activeChar);
- + }
- + else if (command.startsWith("_bbsannouncements"))
- + {
- + AnnouncementsBBSManager.getInstance().parseCmd(command, activeChar);
- + }
- + else if (command.startsWith("_bbsdonation"))
- + {
- + DonationBBSManager.getInstance().parseCmd(command, activeChar);
- + }
- + else if (command.startsWith("_bbsProblemReport"))
- + {
- + ProblemReportBBSManager.getInstance().parseCmd(command, activeChar);
- + }
- + else if (command.equals("_bbsGrandBoss"))
- + {
- + BossBBSManager.getInstance().parseCmd(command, activeChar);
- + }
- + else if ((command.equals("_bbsShowRepair")) || (command.startsWith("_bbsRepair")))
- + {
- + RepairBBSManager.getInstance().parseCmd(command, activeChar);
- + }
- + else if ((command.equals("_bbsPassPanel")) || (command.startsWith("_bbsChangePass")))
- + {
- + PasswordBBSManager.getInstance().parseCmd(command, activeChar);
- + }
- else
- BaseBBSManager.separateAndSend("<html><body><br><br><center>The command: " + command + " isn't implemented.</center></body></html>", activeChar);
- }
- Index: java/net/sf/l2j/gameserver/communitybbs/Manager/RepairBBSManager.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/communitybbs/Manager/RepairBBSManager.java (revision 0)
- +++ java/net/sf/l2j/gameserver/communitybbs/Manager/RepairBBSManager.java (revision 0)
- @@ -0,0 +1,315 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package net.sf.l2j.gameserver.communitybbs.Manager;
- +
- +import java.sql.Connection;
- +import java.sql.PreparedStatement;
- +import java.sql.ResultSet;
- +import java.sql.SQLException;
- +import java.util.StringTokenizer;
- +import java.util.logging.Logger;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.L2DatabaseFactory;
- +import net.sf.l2j.gameserver.cache.HtmCache;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +
- +public class RepairBBSManager extends BaseBBSManager
- +{
- + private static final Logger _log = Logger.getLogger(RepairBBSManager.class.getName());
- +
- + public static RepairBBSManager getInstance()
- + {
- + return SingletonHolder._instance;
- + }
- +
- + @Override
- + public void parseCmd(String command, L2PcInstance activeChar)
- + {
- + if (command.equals("_bbsShowRepair"))
- + {
- + showRepairWindow(activeChar);
- + }
- + else if (command.startsWith("_bbsRepair"))
- + {
- + StringTokenizer st = new StringTokenizer(command);
- + st.nextToken();
- + String repairChar = st.nextToken();
- + if (repairChar == null)
- + {
- + activeChar.sendMessage("Please first select character to be repaired.");
- + return;
- + }
- + if (checkAcc(activeChar, repairChar))
- + {
- + if (checkChar(activeChar, repairChar))
- + {
- + activeChar.sendMessage("You cannot repair your self.");
- + return;
- + }
- + if (checkJail(activeChar, repairChar))
- + {
- + activeChar.sendMessage("The character that you are attempting to repair is in jail and this function cannot be used to help him.");
- + return;
- + }
- + repairBadCharacter(repairChar);
- + separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/repaired.htm"), activeChar);
- + }
- + else
- + {
- + activeChar.sendMessage("Something went wrong. Please contact with the server's administrator.");
- + return;
- + }
- + }
- + else
- + {
- + super.parseCmd(command, activeChar);
- + }
- + }
- +
- + private static void showRepairWindow(L2PcInstance activeChar)
- + {
- + if (Config.ENABLE_REPAIR_BBS)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/repair.htm");
- +
- + content = content.replaceAll("%acc_chars%", getCharList(activeChar));
- + separateAndSend(content, activeChar);
- + }
- + else
- + {
- + separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/functionDisabled.htm"), activeChar);
- + }
- + }
- +
- + private static String getCharList(L2PcInstance activeChar)
- + {
- + String result = "";
- + String repCharAcc = activeChar.getAccountName();
- + Connection con = null;
- + try
- + {
- + con = L2DatabaseFactory.getInstance().getConnection();
- + PreparedStatement statement = con.prepareStatement("SELECT char_name FROM characters WHERE account_name=?");
- + statement.setString(1, repCharAcc);
- + ResultSet rset = statement.executeQuery();
- + while (rset.next())
- + {
- + if (activeChar.getName().compareTo(rset.getString(1)) != 0)
- + {
- + result = result + rset.getString(1) + ";";
- + }
- + }
- + rset.close();
- + statement.close();
- + }
- + catch (SQLException e)
- + {
- + e.printStackTrace();
- + return result;
- + }
- + finally
- + {
- + L2DatabaseFactory.close(con);
- + }
- + return result;
- + }
- +
- + @SuppressWarnings("null")
- + private static boolean checkAcc(L2PcInstance activeChar, String repairChar)
- + {
- + boolean result = false;
- + String repCharAcc = "";
- + Connection con = null;
- + try
- + {
- + con = L2DatabaseFactory.getInstance().getConnection();
- + PreparedStatement statement = con.prepareStatement("SELECT account_name FROM characters WHERE char_name=?");
- + statement.setString(1, repairChar);
- + ResultSet rset = statement.executeQuery();
- + if (rset.next())
- + {
- + repCharAcc = rset.getString(1);
- + }
- + rset.close();
- + statement.close();
- + try
- + {
- + if (con != null)
- + {
- + con.close();
- + }
- + }
- + catch (SQLException e)
- + {
- + e.printStackTrace();
- + }
- + if (activeChar.getAccountName().compareTo(repCharAcc) != 0)
- + {
- + return result;
- + }
- + }
- + catch (SQLException e)
- + {
- + e.printStackTrace();
- + return result;
- + }
- + finally
- + {
- + try
- + {
- + if (con != null)
- + {
- + con.close();
- + }
- + }
- + catch (SQLException e)
- + {
- + e.printStackTrace();
- + }
- + }
- + result = true;
- + return result;
- + }
- +
- + @SuppressWarnings("null")
- + private static boolean checkJail(L2PcInstance activeChar, String repairChar)
- + {
- + boolean result = false;
- + int repCharJail = 0;
- + Connection con = null;
- + try
- + {
- + con = L2DatabaseFactory.getInstance().getConnection();
- + PreparedStatement statement = con.prepareStatement("SELECT punish_level FROM characters WHERE char_name=?");
- + statement.setString(1, repairChar);
- + ResultSet rset = statement.executeQuery();
- + if (rset.next())
- + {
- + repCharJail = rset.getInt(1);
- + }
- + rset.close();
- + statement.close();
- + try
- + {
- + if (con != null)
- + {
- + con.close();
- + }
- + }
- + catch (SQLException e)
- + {
- + e.printStackTrace();
- + }
- + if (repCharJail <= 1)
- + {
- + return result;
- + }
- + }
- + catch (SQLException e)
- + {
- + e.printStackTrace();
- + return result;
- + }
- + finally
- + {
- + try
- + {
- + if (con != null)
- + {
- + con.close();
- + }
- + }
- + catch (SQLException e)
- + {
- + e.printStackTrace();
- + }
- + }
- + result = true;
- + return result;
- + }
- +
- + private static boolean checkChar(L2PcInstance activeChar, String repairChar)
- + {
- + boolean result = false;
- + if (activeChar.getName().compareTo(repairChar) == 0)
- + {
- + result = true;
- + }
- + return result;
- + }
- +
- + private static void repairBadCharacter(String charName)
- + {
- + Connection con = null;
- + try
- + {
- + con = L2DatabaseFactory.getInstance().getConnection();
- +
- + PreparedStatement statement = con.prepareStatement("SELECT obj_Id FROM characters WHERE char_name=?");
- + statement.setString(1, charName);
- + ResultSet rset = statement.executeQuery();
- +
- + int objId = 0;
- + if (rset.next())
- + {
- + objId = rset.getInt(1);
- + }
- + rset.close();
- + statement.close();
- + if (objId == 0)
- + {
- + con.close();
- + return;
- + }
- + statement = con.prepareStatement("UPDATE characters SET x=17867, y=170259, z=-3503 WHERE obj_Id=?");
- + statement.setInt(1, objId);
- + statement.execute();
- + statement.close();
- + statement = con.prepareStatement("DELETE FROM character_shortcuts WHERE char_obj_id=?");
- + statement.setInt(1, objId);
- + statement.execute();
- + statement.close();
- + statement = con.prepareStatement("UPDATE items SET loc=\"WAREHOUSE\" WHERE owner_id=? AND loc=\"PAPERDOLL\"");
- + statement.setInt(1, objId);
- + statement.execute();
- + statement.close(); return;
- + }
- + catch (Exception e)
- + {
- + _log.warning("GameServer: could not repair character:" + e);
- + }
- + finally
- + {
- +
- + try
- + {
- + if (con != null)
- + {
- + con.close();
- + }
- + }
- + catch (SQLException e)
- + {
- + e.printStackTrace();
- + }
- + }
- + }
- +
- + private static class SingletonHolder
- + {
- + protected static final RepairBBSManager _instance = new RepairBBSManager();
- + }
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/communitybbs/tasks/AnnouncementsUpdateManager.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/communitybbs/tasks/AnnouncementsUpdateManager.java (revision 0)
- +++ java/net/sf/l2j/gameserver/communitybbs/tasks/AnnouncementsUpdateManager.java (revision 0)
- @@ -0,0 +1,161 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package net.sf.l2j.gameserver.communitybbs.tasks;
- +
- +import java.sql.Connection;
- +import java.sql.PreparedStatement;
- +import java.sql.ResultSet;
- +import java.sql.SQLException;
- +import java.util.logging.Level;
- +import java.util.logging.Logger;
- +
- +import net.sf.l2j.L2DatabaseFactory;
- +
- +public class AnnouncementsUpdateManager
- +{
- + static Logger _log = Logger.getLogger(AnnouncementsUpdateManager.class.getName());
- +
- + private static StringBuilder _announcementsList = new StringBuilder();
- +
- + public static void loadSection()
- + {
- + _log.log(Level.INFO, "[CommunityBoard]: Loading announcements section.");
- + try
- + {
- + Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
- + try
- + {
- + PreparedStatement st = con.prepareStatement("SELECT announce_id,announce_title,announce_date FROM bbs_announcements ORDER BY announce_id DESC LIMIT 5;");
- + ResultSet rset = st.executeQuery();
- +
- + int id = 0;
- + String title = "";
- + String date = "";
- + while (rset.next())
- + {
- + id = rset.getInt("announce_id");
- + title = rset.getString("announce_title");
- + date = rset.getString("announce_date");
- +
- + _announcementsList.append("<table width=610 height=40><tr>");
- + _announcementsList.append("<td width=50 align=center>" + id + "</td>");
- + _announcementsList.append("<td width=400 align=left><a action=\"bypass _bbsannouncements;read " + id + "\">" + title + "</a></td>");
- + _announcementsList.append("<td width=100 align=center>" + date + "</td>");
- + _announcementsList.append("</tr></table><img src=\"l2ui.squaregray\" width=\"610\" height=\"1\">");
- + }
- + rset.close();
- + st.close();
- + }
- + catch (Throwable localThrowable1)
- + {
- + localThrowable3 = localThrowable1;throw localThrowable1;
- + }
- + finally
- + {
- + if (con != null)
- + {
- + if (localThrowable3 != null)
- + {
- + try
- + {
- + con.close();
- + }
- + catch (Throwable localThrowable2)
- + {
- + localThrowable3.addSuppressed(localThrowable2);
- + }
- + }
- + else
- + {
- + con.close();
- + }
- + }
- + }
- + }
- + catch (SQLException e)
- + {
- + _log.log(Level.WARNING, "Failed to load announcements list " + e.getMessage(), e);
- + }
- + }
- +
- + public static void updateList()
- + {
- + _log.log(Level.INFO, "[CommunityBoard]: Announcements section has been updated.");
- +
- + _announcementsList.delete(0, _announcementsList.length());
- + try
- + {
- + Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
- + try
- + {
- + PreparedStatement st = con.prepareStatement("SELECT announce_id,announce_title,announce_date FROM bbs_announcements ORDER BY announce_id DESC LIMIT 5;");
- + ResultSet rset = st.executeQuery();
- +
- +
- + int id = 0;
- + String title = "";
- + String date = "";
- + while (rset.next())
- + {
- + id = rset.getInt("announce_id");
- + title = rset.getString("announce_title");
- + date = rset.getString("announce_date");
- +
- + _announcementsList.append("<table width=610 height=40><tr>");
- + _announcementsList.append("<td width=50 align=center>" + id + "</td>");
- + _announcementsList.append("<td width=400 align=left><a action=\"bypass _bbsannouncements;read " + id + "\">" + title + "</a></td>");
- + _announcementsList.append("<td width=100 align=center>" + date + "</td>");
- + _announcementsList.append("</tr></table><img src=\"l2ui.squaregray\" width=\"610\" height=\"1\">");
- + }
- + rset.close();
- + st.close();
- + }
- + catch (Throwable localThrowable1)
- + {
- + localThrowable3 = localThrowable1;throw localThrowable1;
- + }
- + finally
- + {
- + if (con != null)
- + {
- + if (localThrowable3 != null)
- + {
- + try
- + {
- + con.close();
- + }
- + catch (Throwable localThrowable2)
- + {
- + localThrowable3.addSuppressed(localThrowable2);
- + }
- + }
- + else
- + {
- + con.close();
- + }
- + }
- + }
- + }
- + catch (SQLException e)
- + {
- + _log.log(Level.WARNING, "Failed to update announcements list " + e.getMessage(), e);
- + }
- + }
- +
- + public static String showList()
- + {
- + return _announcementsList.toString();
- + }
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/Config.java
- ===================================================================
- --- java/net/sf/l2j/Config.java (revision 11)
- +++ java/net/sf/l2j/Config.java (working copy)
- @@ -644,6 +644,13 @@
- /** Community Board */
- public static boolean ENABLE_COMMUNITY_BOARD;
- public static String BBS_DEFAULT;
- + public static boolean ENABLE_PAY_SAFE_DONATION_BBS;
- + public static boolean ENABLE_PAY_PAL_DONATION_BBS;
- + public static int TOP_PLAYER_ROW_HEIGHT;
- + public static int TOP_PLAYER_RESULTS;
- + public static boolean ENABLE_BBS_REPORT;
- + public static boolean ENABLE_REPAIR_BBS;
- + public static boolean ENABLE_BBS_PASS_CHANGE;
- /** Misc */
- public static boolean L2WALKER_PROTECTION;
- @@ -1239,6 +1246,13 @@
- ENABLE_COMMUNITY_BOARD = server.getProperty("EnableCommunityBoard", false);
- BBS_DEFAULT = server.getProperty("BBSDefault", "_bbshome");
- + ENABLE_PAY_SAFE_DONATION_BBS = server.getProperty("EnablePaySafeBBSDonation", true);
- + ENABLE_PAY_PAL_DONATION_BBS = server.getProperty("EnablePayPalBBSDonation", true);
- + TOP_PLAYER_ROW_HEIGHT = server.getProperty("TopPlayerRowHeight", 19);
- + TOP_PLAYER_RESULTS = server.getProperty("TopPlayerResults", 15);
- + ENABLE_BBS_REPORT = server.getProperty("EnableProblemReportingBBSFuncion", true);
- + ENABLE_REPAIR_BBS = server.getProperty("EnableRepairBBS", true);
- + ENABLE_BBS_PASS_CHANGE = server.getProperty("EnablePasswordChangeBBS", true);
- L2WALKER_PROTECTION = server.getProperty("L2WalkerProtection", false);
- AUTODELETE_INVALID_QUEST_DATA = server.getProperty("AutoDeleteInvalidQuestData", false);
- Index: config/server.properties
- ===================================================================
- --- config/server.properties (revision 11)
- +++ config/server.properties (working copy)
- @@ -275,11 +275,46 @@
- # =================================================================
- # Activate or no the community board.
- -EnableCommunityBoard = False
- +EnableCommunityBoard = True
- # Show this community board section when you open it.
- BBSDefault = _bbshome
- +# Donation Functions
- +# - Donations will be saved into /data/donations/ folder.
- +# - And message will be send to the staff on login if there are new donations.
- +# - Once you've confirmed the donation delete the file or move it to other
- +# - folder because the system will not allow more donations from that player.
- +# Default: False
- +EnablePaySafeBBSDonation = True
- +
- +# PayPal donation Page.
- +# Default: False
- +EnablePayPalBBSDonation = True
- +
- +# Top Players Options
- +# Default value: 24
- +TopPlayerRowHeight = 24
- +
- +# Here you can specify the amount of the results that will be displayed.
- +# Default value: 15
- +TopPlayerResults = 15
- +
- +# Problem Reporting Function.
- +# - Problem reports will be saved into /data/reports/ folder.
- +# - Staff members will receive message on enter world if there is any bug report.
- +# - The file should be deleted / moved to other folder after reading it because the player will not be able to submit more reports.
- +# Default: False
- +EnableProblemReportingBBSFuncion = True
- +
- +# Character Repair Function.
- +# Default: False
- +EnableRepairBBS = True
- +
- +# Password Change Function.
- +# Default: False
- +EnablePasswordChangeBBS = True
- +
- # =================================================================
- # Misc
- # =================================================================
- Index: java/net/sf/l2j/gameserver/communitybbs/Manager/BossBBSManager.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/communitybbs/Manager/BossBBSManager.java (revision 0)
- +++ java/net/sf/l2j/gameserver/communitybbs/Manager/BossBBSManager.java (revision 0)
- @@ -0,0 +1,98 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package net.sf.l2j.gameserver.communitybbs.Manager;
- +
- +import java.util.logging.Level;
- +import java.util.logging.Logger;
- +
- +import net.sf.l2j.gameserver.cache.HtmCache;
- +import net.sf.l2j.gameserver.datatables.NpcTable;
- +import net.sf.l2j.gameserver.instancemanager.GrandBossManager;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +
- +public class BossBBSManager extends BaseBBSManager
- +{
- + private static final Logger _log = Logger.getLogger(BossBBSManager.class.getName());
- +
- + private static final int[] BOSSES = { 25512, 29001, 29006, 29014, 29019, 29020, 29022, 29028, 29065 };
- +
- + public static BossBBSManager getInstance()
- + {
- + return SingletonHolder._instance;
- + }
- +
- + @Override
- + public void parseCmd(String command, L2PcInstance activeChar)
- + {
- + if (command.equals("_bbsGrandBoss"))
- + {
- + showGrandBossStatus(activeChar);
- + }
- + else
- + {
- + super.parseCmd(command, activeChar);
- + }
- + }
- +
- + @Override
- + protected String getFolder()
- + {
- + return "stats/boss";
- + }
- +
- + private static void showGrandBossStatus(L2PcInstance activeChar)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/boss/grandBoss.htm");
- + StringBuilder tb = new StringBuilder();
- + try
- + {
- + for (int boss : BOSSES)
- + {
- + String name = NpcTable.getInstance().getTemplate(boss).getName();
- + long delay = GrandBossManager.getInstance().getStatsSet(boss).getLong("respawn_time");
- + if (delay <= System.currentTimeMillis())
- + {
- + tb.append("<table border=0 cellspacing=0 cellpadding=2 height=24 width=400><tr>");
- + tb.append("<td FIXWIDTH=200 align=center>" + name + "</td>");
- + tb.append("<td FIXWIDTH=200 align=center><font color=99FF00>Alive</font></td>");
- + tb.append("</tr></table>");
- + tb.append("<img src=\"L2UI.Squaregray\" width=\"400\" height=\"1\">");
- + }
- + else
- + {
- + int hours = (int)((delay - System.currentTimeMillis()) / 1000L / 60L / 60L);
- + int mins = (int)((delay - hours * 60 * 60 * 1000 - System.currentTimeMillis()) / 1000L / 60L);
- +
- + tb.append("<table border=0 cellspacing=0 cellpadding=2 height=24 width=400><tr>");
- + tb.append("<td FIXWIDTH=200 align=center>" + name + "</td>");
- + tb.append("<td FIXWIDTH=200 align=center><font color=CC0000>" + hours + " hours and " + mins + " minutes to respawn</font></td>");
- + tb.append("</tr></table>");
- + tb.append("<img src=\"L2UI.Squaregray\" width=\"400\" height=\"1\">");
- + }
- + }
- + }
- + catch (Exception e)
- + {
- + _log.log(Level.WARNING, "Failed to load grand boss list.");
- + }
- + content = content.replaceAll("%showList%", tb.toString());
- + separateAndSend(content, activeChar);
- + }
- +
- + private static class SingletonHolder
- + {
- + protected static final BossBBSManager _instance = new BossBBSManager();
- + }
- +}
- Index: java/net/sf/l2j/gameserver/communitybbs/tasks/PlayerStatsUpdateTask.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/communitybbs/tasks/PlayerStatsUpdateTask.java (revision 0)
- +++ java/net/sf/l2j/gameserver/communitybbs/tasks/PlayerStatsUpdateTask.java (revision 0)
- @@ -0,0 +1,580 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package net.sf.l2j.gameserver.communitybbs.tasks;
- +
- +import java.sql.Connection;
- +import java.sql.PreparedStatement;
- +import java.sql.ResultSet;
- +import java.util.Date;
- +import java.util.HashMap;
- +import java.util.Map;
- +import java.util.logging.Level;
- +import java.util.logging.Logger;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.L2DatabaseFactory;
- +import net.sf.l2j.gameserver.ThreadPoolManager;
- +
- +public class PlayerStatsUpdateTask
- +{
- + static Logger _log = Logger.getLogger(PlayerStatsUpdateTask.class.getName());
- + private static StringBuilder _pvpList = new StringBuilder();
- + private static StringBuilder _pkList = new StringBuilder();
- + private static StringBuilder _raidList = new StringBuilder();
- + private static StringBuilder _adenaList = new StringBuilder();
- + private static StringBuilder _onlineList = new StringBuilder();
- + private static String _lastUpdate = "Error";
- + Connection con = L2DatabaseFactory.getInstance().getConnection();
- +
- + public static void updateTask()
- + {
- + _log.log(Level.INFO, "[CommunityBoard]: Started player stats update task!");
- +
- + ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new Runnable()
- + {
- + @Override
- + public void run()
- + {
- + PlayerStatsUpdateTask.cleanUpTask();
- + PlayerStatsUpdateTask.updatePvPList();
- + PlayerStatsUpdateTask.updatePkList();
- + PlayerStatsUpdateTask.updateRaidList();
- + PlayerStatsUpdateTask.updateAdenaList();
- + PlayerStatsUpdateTask.updateOnlineList();
- +
- + Date date = new Date();
- + PlayerStatsUpdateTask.lastUpdate(date.toString());
- + }
- + }, 1000L, 600000L);
- + }
- +
- + static void cleanUpTask()
- + {
- + _pvpList.delete(0, _pvpList.length());
- + _pkList.delete(0, _pkList.length());
- + _raidList.delete(0, _raidList.length());
- + _adenaList.delete(0, _adenaList.length());
- + _onlineList.delete(0, _onlineList.length());
- + }
- +
- + static void updatePvPList()
- + {
- + try
- + {
- + Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
- + try
- + {
- + int pos = 0;
- +
- + 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);
- + ResultSet result = statement.executeQuery();
- + while (result.next())
- + {
- + pos++;
- + boolean status = false;
- + if (result.getInt("online") == 1)
- + {
- + status = true;
- + }
- + String timeon = getPlayerRunTime(result.getInt("ch.onlinetime"));
- + String adenas = getAdenas(result.getInt("SUM(it.count)"));
- +
- + _pvpList.append("<table border=0 cellspacing=0 cellpadding=2 height=" + Config.TOP_PLAYER_ROW_HEIGHT + " width=610><tr><td FIXWIDTH=5></td>");
- + _pvpList.append("<td FIXWIDTH=25>" + pos + "</td>");
- + _pvpList.append("<td FIXWIDTH=180>" + result.getString("ch.char_name") + "</td>");
- + _pvpList.append("<td FIXWIDTH=175>" + className(result.getInt("base_class")) + "</td>");
- + _pvpList.append("<td FIXWIDTH=60>" + result.getInt("ch.pvpkills") + "</td>");
- + _pvpList.append("<td FIXWIDTH=60>" + result.getInt("ch.pkkills") + "</td>");
- + _pvpList.append("<td FIXWIDTH=70>" + result.getInt("SUM(chr.points)") + "</td>");
- + _pvpList.append("<td FIXWIDTH=140>" + adenas + "</td>");
- + _pvpList.append("<td FIXWIDTH=150>" + timeon + "</td>");
- + _pvpList.append("<td FIXWIDTH=65>" + (status ? "<font color=99FF00>Online</font>" : "<font color=CC0000>Offline</font>") + "</td>");
- + _pvpList.append("</tr></table><img src=\"L2UI.Squaregray\" width=\"610\" height=\"1\">");
- + }
- + result.close();
- + statement.close();
- + }
- + catch (Throwable localThrowable1)
- + {
- + localThrowable3 = localThrowable1;throw localThrowable1;
- + }
- + finally
- + {
- + if (con != null)
- + {
- + if (localThrowable3 != null)
- + {
- + try
- + {
- + con.close();
- + }
- + catch (Throwable localThrowable2)
- + {
- + localThrowable3.addSuppressed(localThrowable2);
- + }
- + }
- + else
- + {
- + con.close();
- + }
- + }
- + }
- + }
- + catch (Exception e)
- + {
- + _log.log(Level.WARNING, "Failed to update pvp list!");
- + e.printStackTrace();
- + }
- + }
- +
- + static void updatePkList()
- + {
- + try
- + {
- + Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
- + try
- + {
- + int pos = 0;
- +
- + 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);
- + ResultSet result = statement.executeQuery();
- + while (result.next())
- + {
- + pos++;
- + boolean status = false;
- + if (result.getInt("online") == 1)
- + {
- + status = true;
- + }
- + String timeon = getPlayerRunTime(result.getInt("ch.onlinetime"));
- + String adenas = getAdenas(result.getInt("SUM(it.count)"));
- +
- + _pkList.append("<table border=0 cellspacing=0 cellpadding=2 height=" + Config.TOP_PLAYER_ROW_HEIGHT + " width=610><tr><td FIXWIDTH=5></td>");
- + _pkList.append("<td FIXWIDTH=25>" + pos + "</td>");
- + _pkList.append("<td FIXWIDTH=180>" + result.getString("ch.char_name") + "</td>");
- + _pkList.append("<td FIXWIDTH=175>" + className(result.getInt("base_class")) + "</td>");
- + _pkList.append("<td FIXWIDTH=60>" + result.getInt("ch.pvpkills") + "</td>");
- + _pkList.append("<td FIXWIDTH=60>" + result.getInt("ch.pkkills") + "</td>");
- + _pkList.append("<td FIXWIDTH=70>" + result.getInt("SUM(chr.points)") + "</td>");
- + _pkList.append("<td FIXWIDTH=140>" + adenas + "</td>");
- + _pkList.append("<td FIXWIDTH=150>" + timeon + "</td>");
- + _pkList.append("<td FIXWIDTH=65>" + (status ? "<font color=99FF00>Online</font>" : "<font color=CC0000>Offline</font>") + "</td>");
- + _pkList.append("</tr></table><img src=\"L2UI.Squaregray\" width=\"610\" height=\"1\">");
- + }
- + result.close();
- + statement.close();
- + }
- + catch (Throwable localThrowable1)
- + {
- + localThrowable3 = localThrowable1;throw localThrowable1;
- + }
- + finally
- + {
- + if (con != null)
- + {
- + if (localThrowable3 != null)
- + {
- + try
- + {
- + con.close();
- + }
- + catch (Throwable localThrowable2)
- + {
- + localThrowable3.addSuppressed(localThrowable2);
- + }
- + }
- + else
- + {
- + con.close();
- + }
- + }
- + }
- + }
- + catch (Exception e)
- + {
- + _log.log(Level.WARNING, "Failed to update pk list!");
- + e.printStackTrace();
- + }
- + }
- +
- + static void updateRaidList()
- + {
- + try
- + {
- + Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
- + try
- + {
- + int pos = 0;
- +
- + 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);
- + ResultSet result = statement.executeQuery();
- + while (result.next())
- + {
- + pos++;
- + boolean status = false;
- + if (result.getInt("online") == 1)
- + {
- + status = true;
- + }
- + String timeon = getPlayerRunTime(result.getInt("ch.onlinetime"));
- + String adenas = getAdenas(result.getInt("SUM(it.count)"));
- +
- + _raidList.append("<table border=0 cellspacing=0 cellpadding=2 height=" + Config.TOP_PLAYER_ROW_HEIGHT + " width=610><tr><td FIXWIDTH=5></td>");
- + _raidList.append("<td FIXWIDTH=25>" + pos + "</td>");
- + _raidList.append("<td FIXWIDTH=180>" + result.getString("ch.char_name") + "</td>");
- + _raidList.append("<td FIXWIDTH=175>" + className(result.getInt("base_class")) + "</td>");
- + _raidList.append("<td FIXWIDTH=60>" + result.getInt("ch.pvpkills") + "</td>");
- + _raidList.append("<td FIXWIDTH=60>" + result.getInt("ch.pkkills") + "</td>");
- + _raidList.append("<td FIXWIDTH=70>" + result.getInt("SUM(chr.points)") + "</td>");
- + _raidList.append("<td FIXWIDTH=140>" + adenas + "</td>");
- + _raidList.append("<td FIXWIDTH=150>" + timeon + "</td>");
- + _raidList.append("<td FIXWIDTH=65>" + (status ? "<font color=99FF00>Online</font>" : "<font color=CC0000>Offline</font>") + "</td>");
- + _raidList.append("</tr></table><img src=\"L2UI.Squaregray\" width=\"610\" height=\"1\">");
- + }
- + result.close();
- + statement.close();
- + }
- + catch (Throwable localThrowable1)
- + {
- + localThrowable3 = localThrowable1;throw localThrowable1;
- + }
- + finally
- + {
- + if (con != null)
- + {
- + if (localThrowable3 != null)
- + {
- + try
- + {
- + con.close();
- + }
- + catch (Throwable localThrowable2)
- + {
- + localThrowable3.addSuppressed(localThrowable2);
- + }
- + }
- + else
- + {
- + con.close();
- + }
- + }
- + }
- + }
- + catch (Exception e)
- + {
- + _log.log(Level.WARNING, "Failed to update raid list!");
- + e.printStackTrace();
- + }
- + }
- +
- + static void updateAdenaList()
- + {
- + try
- + {
- + Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
- + try
- + {
- + int pos = 0;
- +
- + 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);
- + ResultSet result = statement.executeQuery();
- + while (result.next())
- + {
- + pos++;
- + boolean status = false;
- + if (result.getInt("online") == 1)
- + {
- + status = true;
- + }
- + String timeon = getPlayerRunTime(result.getInt("ch.onlinetime"));
- + String adenas = getAdenas(result.getInt("SUM(it.count)"));
- +
- + _adenaList.append("<table border=0 cellspacing=0 cellpadding=2 height=" + Config.TOP_PLAYER_ROW_HEIGHT + " width=610><tr><td FIXWIDTH=5></td>");
- + _adenaList.append("<td FIXWIDTH=25>" + pos + "</td>");
- + _adenaList.append("<td FIXWIDTH=180>" + result.getString("ch.char_name") + "</td>");
- + _adenaList.append("<td FIXWIDTH=175>" + className(result.getInt("base_class")) + "</td>");
- + _adenaList.append("<td FIXWIDTH=60>" + result.getInt("ch.pvpkills") + "</td>");
- + _adenaList.append("<td FIXWIDTH=60>" + result.getInt("ch.pkkills") + "</td>");
- + _adenaList.append("<td FIXWIDTH=70>" + result.getInt("SUM(chr.points)") + "</td>");
- + _adenaList.append("<td FIXWIDTH=140>" + adenas + "</td>");
- + _adenaList.append("<td FIXWIDTH=150>" + timeon + "</td>");
- + _adenaList.append("<td FIXWIDTH=65>" + (status ? "<font color=99FF00>Online</font>" : "<font color=CC0000>Offline</font>") + "</td>");
- + _adenaList.append("</tr></table><img src=\"L2UI.Squaregray\" width=\"610\" height=\"1\">");
- + }
- + result.close();
- + statement.close();
- + }
- + catch (Throwable localThrowable1)
- + {
- + localThrowable3 = localThrowable1;throw localThrowable1;
- + }
- + finally
- + {
- + if (con != null)
- + {
- + if (localThrowable3 != null)
- + {
- + try
- + {
- + con.close();
- + }
- + catch (Throwable localThrowable2)
- + {
- + localThrowable3.addSuppressed(localThrowable2);
- + }
- + }
- + else
- + {
- + con.close();
- + }
- + }
- + }
- + }
- + catch (Exception e)
- + {
- + _log.log(Level.WARNING, "Failed to update adena list!");
- + e.printStackTrace();
- + }
- + }
- +
- + static void updateOnlineList()
- + {
- + try
- + {
- + Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
- + try
- + {
- + int pos = 0;
- + 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);
- + ResultSet result = statement.executeQuery();
- + while (result.next())
- + {
- + pos++;
- + boolean status = false;
- + if (result.getInt("online") == 1)
- + {
- + status = true;
- + }
- + String timeon = getPlayerRunTime(result.getInt("ch.onlinetime"));
- + String adenas = getAdenas(result.getInt("SUM(it.count)"));
- +
- + _onlineList.append("<table border=0 cellspacing=0 cellpadding=2 height=" + Config.TOP_PLAYER_ROW_HEIGHT + " width=610><tr><td FIXWIDTH=5></td>");
- + _onlineList.append("<td FIXWIDTH=25>" + pos + "</td>");
- + _onlineList.append("<td FIXWIDTH=180>" + result.getString("ch.char_name") + "</td>");
- + _onlineList.append("<td FIXWIDTH=175>" + className(result.getInt("base_class")) + "</td>");
- + _onlineList.append("<td FIXWIDTH=60>" + result.getInt("ch.pvpkills") + "</td>");
- + _onlineList.append("<td FIXWIDTH=60>" + result.getInt("ch.pkkills") + "</td>");
- + _onlineList.append("<td FIXWIDTH=70>" + result.getInt("SUM(chr.points)") + "</td>");
- + _onlineList.append("<td FIXWIDTH=140>" + adenas + "</td>");
- + _onlineList.append("<td FIXWIDTH=150>" + timeon + "</td>");
- + _onlineList.append("<td FIXWIDTH=65>" + (status ? "<font color=99FF00>Online</font>" : "<font color=CC0000>Offline</font>") + "</td>");
- + _onlineList.append("</tr></table><img src=\"L2UI.Squaregray\" width=\"610\" height=\"1\">");
- + }
- + result.close();
- + statement.close();
- + }
- + catch (Throwable localThrowable1)
- + {
- + localThrowable3 = localThrowable1;throw localThrowable1;
- + }
- + finally
- + {
- + if (con != null)
- + {
- + if (localThrowable3 != null)
- + {
- + try
- + {
- + con.close();
- + }
- + catch (Throwable localThrowable2)
- + {
- + localThrowable3.addSuppressed(localThrowable2);
- + }
- + }
- + else
- + {
- + con.close();
- + }
- + }
- + }
- + }
- + catch (Exception e)
- + {
- + _log.log(Level.WARNING, "Failed to update online time list!");
- + e.printStackTrace();
- + }
- + }
- +
- + public static String pvpList()
- + {
- + return _pvpList.toString();
- + }
- +
- + public static String pkList()
- + {
- + return _pkList.toString();
- + }
- +
- + public static String raidList()
- + {
- + return _raidList.toString();
- + }
- +
- + public static String adenaList()
- + {
- + return _adenaList.toString();
- + }
- +
- + public static String onlineList()
- + {
- + return _onlineList.toString();
- + }
- +
- + static void lastUpdate(String format)
- + {
- + _lastUpdate = format;
- + }
- +
- + public static String getLastUpdate()
- + {
- + return _lastUpdate;
- + }
- +
- + public static final String className(int classid)
- + {
- + Map<Integer, String> classList = new HashMap<>();
- +
- + classList.put(Integer.valueOf(0), "Fighter");
- + classList.put(Integer.valueOf(1), "Warrior");
- + classList.put(Integer.valueOf(2), "Gladiator");
- + classList.put(Integer.valueOf(3), "Warlord");
- + classList.put(Integer.valueOf(4), "Knight");
- + classList.put(Integer.valueOf(5), "Paladin");
- + classList.put(Integer.valueOf(6), "Dark Avenger");
- + classList.put(Integer.valueOf(7), "Rogue");
- + classList.put(Integer.valueOf(8), "Treasure Hunter");
- + classList.put(Integer.valueOf(9), "Hawkeye");
- + classList.put(Integer.valueOf(10), "Mage");
- + classList.put(Integer.valueOf(11), "Wizard");
- + classList.put(Integer.valueOf(12), "Sorcerer");
- + classList.put(Integer.valueOf(13), "Necromancer");
- + classList.put(Integer.valueOf(14), "Warlock");
- + classList.put(Integer.valueOf(15), "Cleric");
- + classList.put(Integer.valueOf(16), "Bishop");
- + classList.put(Integer.valueOf(17), "Prophet");
- + classList.put(Integer.valueOf(18), "Elven Fighter");
- + classList.put(Integer.valueOf(19), "Elven Knight");
- + classList.put(Integer.valueOf(20), "Temple Knight");
- + classList.put(Integer.valueOf(21), "Swordsinger");
- + classList.put(Integer.valueOf(22), "Elven Scout");
- + classList.put(Integer.valueOf(23), "Plains Walker");
- + classList.put(Integer.valueOf(24), "Silver Ranger");
- + classList.put(Integer.valueOf(25), "Elven Mage");
- + classList.put(Integer.valueOf(26), "Elven Wizard");
- + classList.put(Integer.valueOf(27), "Spellsinger");
- + classList.put(Integer.valueOf(28), "Elemental Summoner");
- + classList.put(Integer.valueOf(29), "Oracle");
- + classList.put(Integer.valueOf(30), "Elder");
- + classList.put(Integer.valueOf(31), "Dark Fighter");
- + classList.put(Integer.valueOf(32), "Palus Knightr");
- + classList.put(Integer.valueOf(33), "Shillien Knight");
- + classList.put(Integer.valueOf(34), "Bladedancer");
- + classList.put(Integer.valueOf(35), "Assasin");
- + classList.put(Integer.valueOf(36), "Abyss Walker");
- + classList.put(Integer.valueOf(37), "Phantom Ranger");
- + classList.put(Integer.valueOf(38), "Dark Mage");
- + classList.put(Integer.valueOf(39), "Dark Wizard");
- + classList.put(Integer.valueOf(40), "Spellhowler");
- + classList.put(Integer.valueOf(41), "Phantom Summoner");
- + classList.put(Integer.valueOf(42), "Shillien Oracle");
- + classList.put(Integer.valueOf(43), "Shilien Elder");
- + classList.put(Integer.valueOf(44), "Orc Fighter");
- + classList.put(Integer.valueOf(45), "Orc Raider");
- + classList.put(Integer.valueOf(46), "Destroyer");
- + classList.put(Integer.valueOf(47), "Orc Monk");
- + classList.put(Integer.valueOf(48), "Tyrant");
- + classList.put(Integer.valueOf(49), "Orc Mage");
- + classList.put(Integer.valueOf(50), "Orc Shaman");
- + classList.put(Integer.valueOf(51), "Overlord");
- + classList.put(Integer.valueOf(52), "Warcryer");
- + classList.put(Integer.valueOf(53), "Dwarven Fighter");
- + classList.put(Integer.valueOf(54), "Scavenger");
- + classList.put(Integer.valueOf(55), "Bounty Hunter");
- + classList.put(Integer.valueOf(56), "Artisan");
- + classList.put(Integer.valueOf(57), "Warsmith");
- + classList.put(Integer.valueOf(88), "Duelist");
- + classList.put(Integer.valueOf(89), "Dreadnought");
- + classList.put(Integer.valueOf(90), "Phoenix Knight");
- + classList.put(Integer.valueOf(91), "Hell Knight");
- + classList.put(Integer.valueOf(92), "Sagittarius");
- + classList.put(Integer.valueOf(93), "Adventurer");
- + classList.put(Integer.valueOf(94), "Archmage");
- + classList.put(Integer.valueOf(95), "Soultaker");
- + classList.put(Integer.valueOf(96), "Arcana Lord");
- + classList.put(Integer.valueOf(97), "Cardinal");
- + classList.put(Integer.valueOf(98), "Hierophant");
- + classList.put(Integer.valueOf(99), "Evas Templar");
- + classList.put(Integer.valueOf(100), "Sword Muse");
- + classList.put(Integer.valueOf(101), "Wind Rider");
- + classList.put(Integer.valueOf(102), "Moonlight Sentinel");
- + classList.put(Integer.valueOf(103), "Mystic Muse");
- + classList.put(Integer.valueOf(104), "Elemental Master");
- + classList.put(Integer.valueOf(105), "Evas Saint");
- + classList.put(Integer.valueOf(106), "Shillien Templar");
- + classList.put(Integer.valueOf(107), "Spectral Dancer");
- + classList.put(Integer.valueOf(108), "Ghost Hunter");
- + classList.put(Integer.valueOf(109), "Ghost Sentinel");
- + classList.put(Integer.valueOf(110), "Storm Screamer");
- + classList.put(Integer.valueOf(111), "Spectral Master");
- + classList.put(Integer.valueOf(112), "Shillien Saint");
- + classList.put(Integer.valueOf(113), "Titan");
- + classList.put(Integer.valueOf(114), "Grand Khavatari");
- + classList.put(Integer.valueOf(115), "Dominator");
- + classList.put(Integer.valueOf(116), "Doomcryer");
- + classList.put(Integer.valueOf(117), "Fortune Seeker");
- + classList.put(Integer.valueOf(118), "Maestro");
- +
- + return classList.get(Integer.valueOf(classid));
- + }
- +
- + static String getPlayerRunTime(int secs)
- + {
- + String timeResult = "";
- + if (secs >= 86400)
- + {
- + timeResult = Integer.toString(secs / 86400) + " Days " + Integer.toString(secs % 86400 / 3600) + " hours";
- + }
- + else
- + {
- + timeResult = Integer.toString(secs / 3600) + " Hours " + Integer.toString(secs % 3600 / 60) + " mins";
- + }
- + return timeResult;
- + }
- +
- + static String getAdenas(int adena)
- + {
- + String adenas = "";
- + if (adena >= 1000000000)
- + {
- + adenas = Integer.toString(adena / 1000000000) + " Billion " + Integer.toString(adena % 1000000000 / 1000000) + " million";
- + }
- + else
- + {
- + adenas = Integer.toString(adena / 1000000) + " Million " + Integer.toString(adena % 1000000 / 1000) + " k";
- + }
- + return adenas;
- + }
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/communitybbs/Manager/DonationBBSManager.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/communitybbs/Manager/DonationBBSManager.java (revision 0)
- +++ java/net/sf/l2j/gameserver/communitybbs/Manager/DonationBBSManager.java (revision 0)
- @@ -0,0 +1,261 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package net.sf.l2j.gameserver.communitybbs.Manager;
- +
- +import java.io.BufferedWriter;
- +import java.io.File;
- +import java.io.FileWriter;
- +import java.util.NoSuchElementException;
- +import java.util.StringTokenizer;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.cache.HtmCache;
- +import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +
- +public class DonationBBSManager extends BaseBBSManager
- +{
- + public static DonationBBSManager getInstance()
- + {
- + return SingletonHolder._instance;
- + }
- +
- + @Override
- + public void parseCmd(String command, L2PcInstance activeChar)
- + {
- + if (command.startsWith("_bbsdonation"))
- + {
- + StringTokenizer st = new StringTokenizer(command, ";");
- + st.nextToken();
- + String secondCommand = st.nextToken();
- + if (secondCommand.equalsIgnoreCase("paysafe"))
- + {
- + handlePaySafeDonation(activeChar);
- + }
- + else if (secondCommand.equalsIgnoreCase("paypal"))
- + {
- + handlePayPalDonation(activeChar);
- + }
- + else
- + {
- + FileWriter fstream;
- + if (secondCommand.startsWith("submitPaySafe"))
- + {
- + StringTokenizer cmds = new StringTokenizer(secondCommand);
- + cmds.nextToken();
- +
- + String quantity = null;
- + String pin1 = "0";
- + String pin2 = "0";
- + String pin3 = "0";
- + String pin4 = "0";
- + String message = "";
- +
- + quantity = cmds.nextToken();
- + try
- + {
- + pin1 = cmds.nextToken();
- + pin2 = cmds.nextToken();
- + pin3 = cmds.nextToken();
- + pin4 = cmds.nextToken();
- + }
- + catch (NumberFormatException enf)
- + {
- + activeChar.sendMessage("Only numbers are allowed!");
- + return;
- + }
- + catch (NoSuchElementException enf)
- + {
- + activeChar.sendMessage("Enter a valid pin.");
- + return;
- + }
- + while (cmds.hasMoreTokens())
- + {
- + message = message + cmds.nextToken() + " ";
- + }
- + try
- + {
- + String fname = "data/donations/paysafe_donation_" + activeChar.getName() + ".txt";
- + File file = new File(fname);
- + boolean exist = file.createNewFile();
- + if (!exist)
- + {
- + activeChar.sendMessage("You have already sent a donation, staff member must confirm it first.");
- + return;
- + }
- + fstream = new FileWriter(fname);
- + BufferedWriter out = new BufferedWriter(fstream);
- + out.write("PaySafe donation.");
- + out.newLine();
- + out.write("- - - - - - - - - - - - - - - - - - - -");
- + out.newLine();
- + out.write("Player Details:");
- + out.newLine();
- + out.write("Account: " + activeChar.getAccountName());
- + out.newLine();
- + out.write("Name: " + activeChar.getName());
- + out.newLine();
- + out.write("IP: " + activeChar.getClient().getConnection().getInetAddress().getHostAddress());
- + out.newLine();
- + out.write("- - - - - - - - - - - - - - - - - - - -");
- + out.newLine();
- + out.write("Card Amount: " + quantity);
- + out.newLine();
- + out.write("Pin Code: " + pin1 + " " + pin2 + " " + pin3 + " " + pin4);
- + out.newLine();
- + out.write("- - - - - - - - - - - - - - - - - - - -");
- + out.newLine();
- + out.write("Message from player:" + message);
- + out.close();
- +
- + separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/donation/completed.htm"), activeChar);
- +
- + L2World.getInstance();
- + for (L2PcInstance gms : L2World.getAllGMs())
- + {
- + gms.sendMessage("ATTENTION: " + activeChar.getName() + " just submited a donation! Please confirm this donation by browsing in /data/donations folder.");
- + }
- + }
- + catch (Exception e)
- + {
- + activeChar.sendMessage("Failed to submit donation. Try again or contact with staff member. This error should not occur.");
- + e.printStackTrace();
- + return;
- + }
- + }
- + else if (secondCommand.startsWith("submitPayPal"))
- + {
- + StringTokenizer cmds = new StringTokenizer(secondCommand);
- + cmds.nextToken();
- +
- + String quantity = null;
- + String email = "";
- + String transId = "";
- + String message = "";
- +
- + quantity = cmds.nextToken();
- +
- + email = cmds.nextToken();
- +
- + transId = cmds.nextToken();
- + while (cmds.hasMoreTokens())
- + {
- + message = message + cmds.nextToken() + " ";
- + }
- + try
- + {
- + String fname = "data/donations/paypal_donation_" + activeChar.getName() + ".txt";
- + File file = new File(fname);
- + boolean exist = file.createNewFile();
- + if (!exist)
- + {
- + activeChar.sendMessage("You have already sent a donation, staff member must confirm it first.");
- + return;
- + }
- + FileWriter fstream1 = new FileWriter(fname);
- + BufferedWriter out = new BufferedWriter(fstream1);
- + out.write("PayPal donation.");
- + out.newLine();
- + out.write("- - - - - - - - - - - - - - - - - - - -");
- + out.newLine();
- + out.write("Player Details:");
- + out.newLine();
- + out.write("Account: " + activeChar.getAccountName());
- + out.newLine();
- + out.write("Name: " + activeChar.getName());
- + out.newLine();
- + out.write("IP: " + activeChar.getClient().getConnection().getInetAddress().getHostAddress());
- + out.newLine();
- + out.write("- - - - - - - - - - - - - - - - - - - -");
- + out.newLine();
- + out.write("Card Amount: " + quantity);
- + out.newLine();
- + out.write("Email Address: " + email);
- + out.newLine();
- + out.write("Transaction Id: " + transId);
- + out.newLine();
- + out.write("- - - - - - - - - - - - - - - - - - - -");
- + out.newLine();
- + out.write("Message from player:" + message);
- + out.close();
- +
- + separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/donation/completed.htm"), activeChar);
- +
- + L2World.getInstance();
- + for (L2PcInstance gms : L2World.getAllGMs())
- + {
- + gms.sendMessage("ATTENTION: " + activeChar.getName() + " just submited a donation! Please confirm this donation by browsing in /data/donations folder.");
- + }
- + }
- + catch (Exception e)
- + {
- + activeChar.sendMessage("Failed to submit donation. Try again or contact with staff member. This error should not occur.");
- + e.printStackTrace();
- + return;
- + }
- + }
- + }
- + }
- + else
- + {
- + super.parseCmd(command, activeChar);
- + }
- + }
- +
- + @Override
- + protected String getFolder()
- + {
- + return "donation/";
- + }
- +
- + private static void handlePaySafeDonation(L2PcInstance activeChar)
- + {
- + if (Config.ENABLE_PAY_SAFE_DONATION_BBS)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/donation/paysafe.htm");
- +
- + content = content.replaceAll("%charName%", activeChar.getName());
- + content = content.replaceAll("%charAcc%", activeChar.getAccountName());
- + separateAndSend(content, activeChar);
- + }
- + else
- + {
- + activeChar.sendMessage("We currently are not accepting paysafe card donations. Thank you for your interest!");
- + return;
- + }
- + }
- +
- + private static void handlePayPalDonation(L2PcInstance activeChar)
- + {
- + if (Config.ENABLE_PAY_PAL_DONATION_BBS)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/donation/paypal.htm");
- +
- + content = content.replaceAll("%charName%", activeChar.getName());
- + content = content.replaceAll("%charAcc%", activeChar.getAccountName());
- + separateAndSend(content, activeChar);
- + }
- + else
- + {
- + activeChar.sendMessage("We currently are not accepting paypal donations. Thank you for your interest!");
- + return;
- + }
- + }
- +
- + private static class SingletonHolder
- + {
- + protected static final DonationBBSManager _instance = new DonationBBSManager();
- + }
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/communitybbs/Manager/PasswordBBSManager.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/communitybbs/Manager/PasswordBBSManager.java (revision 0)
- +++ java/net/sf/l2j/gameserver/communitybbs/Manager/PasswordBBSManager.java (revision 0)
- @@ -0,0 +1,163 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package net.sf.l2j.gameserver.communitybbs.Manager;
- +
- +import java.security.MessageDigest;
- +import java.sql.Connection;
- +import java.sql.PreparedStatement;
- +import java.sql.ResultSet;
- +import java.util.StringTokenizer;
- +import java.util.logging.Level;
- +import java.util.logging.Logger;
- +
- +import net.sf.l2j.Base64;
- +import net.sf.l2j.Config;
- +import net.sf.l2j.L2DatabaseFactory;
- +import net.sf.l2j.gameserver.cache.HtmCache;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +
- +public class PasswordBBSManager extends BaseBBSManager
- +{
- + private static final Logger _log = Logger.getLogger(PasswordBBSManager.class.getName());
- +
- + public static PasswordBBSManager getInstance()
- + {
- + return SingletonHolder._instance;
- + }
- +
- + @Override
- + public void parseCmd(String command, L2PcInstance activeChar)
- + {
- + if (command.equals("_bbsPassPanel"))
- + {
- + if (Config.ENABLE_BBS_PASS_CHANGE)
- + {
- + separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/passChange.htm"), activeChar);
- + }
- + else
- + {
- + separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/functionDisabled.htm"), activeChar);
- + }
- + }
- + else if (command.startsWith("_bbsChangePass"))
- + {
- + StringTokenizer st = new StringTokenizer(command);
- + st.nextToken();
- +
- + String currPass = null;
- + String newPass = null;
- + String repeatNewPass = null;
- + try
- + {
- + if (st.hasMoreTokens())
- + {
- + currPass = st.nextToken();
- + newPass = st.nextToken();
- + repeatNewPass = st.nextToken();
- + }
- + else
- + {
- + activeChar.sendMessage("Please fill in all the blank fields before requesting for a password change.");
- + return;
- + }
- + changePassword(currPass, newPass, repeatNewPass, activeChar);
- + }
- + catch (StringIndexOutOfBoundsException e)
- + {
- + activeChar.sendMessage("Something went wrong please contact with server's administrator with this error.");
- + _log.log(Level.WARNING, "[PasswordChangeFunction: Something went wrong for " + activeChar.getName());
- + e.getStackTrace();
- + return;
- + }
- + }
- + else
- + {
- + super.parseCmd(command, activeChar);
- + }
- + }
- +
- + public static void changePassword(String currPass, String newPass, String repeatNewPass, L2PcInstance activeChar)
- + {
- + if (newPass.length() < 5)
- + {
- + activeChar.sendMessage("The new password should be bigger then 5 letters.");
- + return;
- + }
- + if (newPass.length() > 20)
- + {
- + activeChar.sendMessage("The new password cannot be bigger then 20 letters.");
- + return;
- + }
- + if (!newPass.equals(repeatNewPass))
- + {
- + activeChar.sendMessage("Repeated password doesn't match the new password.");
- + return;
- + }
- + Connection con = null;
- + String password = null;
- + try
- + {
- + MessageDigest md = MessageDigest.getInstance("SHA");
- + byte[] raw = currPass.getBytes("UTF-8");
- + raw = md.digest(raw);
- + String currPassEncoded = Base64.encodeBytes(raw);
- +
- + con = L2DatabaseFactory.getInstance().getConnection();
- + PreparedStatement statement = con.prepareStatement("SELECT password FROM accounts WHERE login=?");
- + statement.setString(1, activeChar.getAccountName());
- + ResultSet rset = statement.executeQuery();
- + while (rset.next())
- + {
- + password = rset.getString("password");
- + }
- + rset.close();
- + statement.close();
- +
- + byte[] password2 = null;
- + if (currPassEncoded.equals(password))
- + {
- + password2 = newPass.getBytes("UTF-8");
- + password2 = md.digest(password2);
- +
- + PreparedStatement statement2 = con.prepareStatement("UPDATE accounts SET password=? WHERE login=?");
- + statement2.setString(1, Base64.encodeBytes(password2));
- + statement2.setString(2, activeChar.getAccountName());
- + statement2.executeUpdate();
- + statement2.close();
- +
- + separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/passChanged.htm"), activeChar);
- + }
- + else
- + {
- + activeChar.sendMessage("The current password you've inserted is incorrect! Please try again!");
- + return;
- + }
- + }
- + catch (Exception e)
- + {
- + _log.warning("could not update the password of account: " + activeChar.getAccountName());
- + e.getStackTrace();
- + }
- + finally
- + {
- + L2DatabaseFactory.close(con);
- + }
- + }
- +
- + private static class SingletonHolder
- + {
- + protected static final PasswordBBSManager _instance = new PasswordBBSManager();
- + }
- +}
- Index: java/net/sf/l2j/gameserver/communitybbs/Manager/OlStatsBBSManager.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/communitybbs/Manager/OlStatsBBSManager.java (revision 0)
- +++ java/net/sf/l2j/gameserver/communitybbs/Manager/OlStatsBBSManager.java (revision 0)
- @@ -0,0 +1,170 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package net.sf.l2j.gameserver.communitybbs.Manager;
- +
- +import java.sql.Connection;
- +import java.sql.PreparedStatement;
- +import java.sql.ResultSet;
- +import java.util.HashMap;
- +import java.util.Map;
- +import java.util.StringTokenizer;
- +import java.util.logging.Level;
- +import java.util.logging.Logger;
- +
- +import net.sf.l2j.L2DatabaseFactory;
- +import net.sf.l2j.gameserver.cache.HtmCache;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +
- +public class OlStatsBBSManager extends BaseBBSManager
- +{
- + private static final Logger _log = Logger.getLogger(OlStatsBBSManager.class.getName());
- +
- + private static int _posId;
- +
- + @Override
- + public void parseCmd(String command, L2PcInstance activeChar)
- + {
- + if (command.equals("_bbsOlStats"))
- + {
- + showClassMenu(activeChar);
- + }
- + else if (command.startsWith("_bbsClassList"))
- + {
- + StringTokenizer st = new StringTokenizer(command, ";");
- + st.nextToken();
- + int classId = Integer.valueOf(st.nextToken()).intValue();
- +
- + showClassList(activeChar, classId);
- + }
- + else
- + {
- + super.parseCmd(command, activeChar);
- + }
- + }
- +
- + @Override
- + protected String getFolder()
- + {
- + return "stats/olympiad/";
- + }
- +
- + public static OlStatsBBSManager getInstance()
- + {
- + return SingletonHolder._instance;
- + }
- +
- + private static void showClassMenu(L2PcInstance activeChar)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/olympiad/main.htm");
- + separateAndSend(content, activeChar);
- + }
- +
- + private static void showClassList(L2PcInstance activeChar, int classId)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/stats/olympiad/list.htm");
- + StringBuilder tb = new StringBuilder();
- + Connection con = null;
- + try
- + {
- + _posId = 0;
- + con = L2DatabaseFactory.getInstance().getConnection();
- + 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");
- +
- + statement.setInt(1, classId);
- + ResultSet result = statement.executeQuery();
- + while (result.next())
- + {
- + boolean status = false;
- + _posId += 1;
- + if (result.getInt("online") == 1)
- + {
- + status = true;
- + }
- + tb.append("<table border=0 cellspacing=0 cellpadding=2 width=610>");
- + tb.append("<tr>");
- + tb.append("<td FIXWIDTH=10></td>");
- + tb.append("<td FIXWIDTH=40>" + _posId + ".</td>");
- + tb.append("<td FIXWIDTH=190>" + result.getString("char_name") + "</td>");
- + tb.append("<td FIXWIDTH=140>" + className(classId) + "</td>");
- + tb.append("<td FIXWIDTH=100>" + result.getInt("olympiad_points") + "</td>");
- + tb.append("<td FIXWIDTH=120>" + result.getInt("competitions_done") + "</td>");
- + tb.append("<td FIXWIDTH=120>" + result.getString("clan_name") + "</td>");
- + tb.append("<td FIXWIDTH=120>" + result.getString("ally_name") + "</td>");
- + tb.append("<td FIXWIDTH=70>" + (status ? "<font color=99FF00>Online</font>" : "<font color=CC0000>Offline</font>") + "</td>");
- + tb.append("<td FIXWIDTH=5></td>");
- + tb.append("</tr>");
- + tb.append("</table>");
- + tb.append("<img src=\"L2UI.Squaregray\" width=\"610\" height=\"1\">");
- + }
- + result.close();
- + statement.close();
- + }
- + catch (Exception e)
- + {
- + _log.log(Level.WARNING, "Failed to load " + className(classId) + " list " + e.getMessage(), e);
- + }
- + finally
- + {
- + L2DatabaseFactory.close(con);
- + }
- + content = content.replaceAll("%showList%", tb.toString());
- + content = content.replaceAll("%className%", className(classId));
- + separateAndSend(content, activeChar);
- + }
- +
- + public static final String className(int classid)
- + {
- + Map<Integer, String> classList = new HashMap<>();
- +
- + classList.put(Integer.valueOf(88), "Duelist");
- + classList.put(Integer.valueOf(89), "Dreadnought");
- + classList.put(Integer.valueOf(90), "Phoenix Knight");
- + classList.put(Integer.valueOf(91), "Hell Knight");
- + classList.put(Integer.valueOf(92), "Sagittarius");
- + classList.put(Integer.valueOf(93), "Adventurer");
- + classList.put(Integer.valueOf(94), "Archmage");
- + classList.put(Integer.valueOf(95), "Soultaker");
- + classList.put(Integer.valueOf(96), "Arcana Lord");
- + classList.put(Integer.valueOf(97), "Cardinal");
- + classList.put(Integer.valueOf(98), "Hierophant");
- + classList.put(Integer.valueOf(99), "Evas Templar");
- + classList.put(Integer.valueOf(100), "Sword Muse");
- + classList.put(Integer.valueOf(101), "Wind Rider");
- + classList.put(Integer.valueOf(102), "Moonlight Sentinel");
- + classList.put(Integer.valueOf(103), "Mystic Muse");
- + classList.put(Integer.valueOf(104), "Elemental Master");
- + classList.put(Integer.valueOf(105), "Evas Saint");
- + classList.put(Integer.valueOf(106), "Shillien Templar");
- + classList.put(Integer.valueOf(107), "Spectral Dancer");
- + classList.put(Integer.valueOf(108), "Ghost Hunter");
- + classList.put(Integer.valueOf(109), "Ghost Sentinel");
- + classList.put(Integer.valueOf(110), "Storm Screamer");
- + classList.put(Integer.valueOf(111), "Spectral Master");
- + classList.put(Integer.valueOf(112), "Shillien Saint");
- + classList.put(Integer.valueOf(113), "Titan");
- + classList.put(Integer.valueOf(114), "Grand Khavatari");
- + classList.put(Integer.valueOf(115), "Dominator");
- + classList.put(Integer.valueOf(116), "Doomcryer");
- + classList.put(Integer.valueOf(117), "Fortune Seeker");
- + classList.put(Integer.valueOf(118), "Maestro");
- +
- + return classList.get(Integer.valueOf(classid));
- + }
- +
- + private static class SingletonHolder
- + {
- + protected static final OlStatsBBSManager _instance = new OlStatsBBSManager();
- + }
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/model/L2World.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/model/L2World.java (revision 11)
- +++ java/net/sf/l2j/gameserver/model/L2World.java (working copy)
- @@ -21,6 +21,7 @@
- import java.util.logging.Logger;
- import net.sf.l2j.gameserver.datatables.CharNameTable;
- +import net.sf.l2j.gameserver.datatables.GmListTable;
- import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- import net.sf.l2j.gameserver.model.actor.instance.L2PetInstance;
- @@ -136,6 +137,11 @@
- return _allObjects.size();
- }
- + public static List<L2PcInstance> getAllGMs()
- + {
- + return GmListTable.getInstance().getAllGms(true);
- + }
- +
- /**
- * @return a collection containing all players in game.
- */
- Index: java/net/sf/l2j/gameserver/communitybbs/Manager/AnnouncementsBBSManager.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/communitybbs/Manager/AnnouncementsBBSManager.java (revision 0)
- +++ java/net/sf/l2j/gameserver/communitybbs/Manager/AnnouncementsBBSManager.java (revision 0)
- @@ -0,0 +1,321 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package net.sf.l2j.gameserver.communitybbs.Manager;
- +
- +import java.sql.Connection;
- +import java.sql.PreparedStatement;
- +import java.sql.ResultSet;
- +import java.sql.SQLException;
- +import java.text.DateFormat;
- +import java.text.SimpleDateFormat;
- +import java.util.Date;
- +import java.util.StringTokenizer;
- +import java.util.logging.Level;
- +import java.util.logging.Logger;
- +
- +import net.sf.l2j.L2DatabaseFactory;
- +import net.sf.l2j.gameserver.cache.HtmCache;
- +import net.sf.l2j.gameserver.communitybbs.tasks.AnnouncementsUpdateManager;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +
- +public class AnnouncementsBBSManager extends BaseBBSManager
- +{
- + private static final Logger _log = Logger.getLogger(AnnouncementsBBSManager.class.getName());
- +
- + static String _title;
- +
- + public static AnnouncementsBBSManager getInstance()
- + {
- + return SingletonHolder._instance;
- + }
- +
- + @Override
- + public void parseCmd(String command, L2PcInstance activeChar)
- + {
- + if (command.startsWith("_bbsannouncements"))
- + {
- + StringTokenizer st = new StringTokenizer(command, ";");
- + st.nextToken();
- + String secondCommand = st.nextToken();
- +
- + if (secondCommand.equalsIgnoreCase("show"))
- + {
- + showList(activeChar);
- + }
- + else if (secondCommand.equalsIgnoreCase("write"))
- + {
- + separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/announcements/adminWrite.htm"), activeChar);
- + }
- + else if (secondCommand.startsWith("postTitle"))
- + {
- + String title = secondCommand.substring(9);
- + if (title == "")
- + {
- + activeChar.sendMessage("Please insert title first.");
- + return;
- + }
- + if (title.length() >= 150)
- + {
- + activeChar.sendMessage("The current title lenght is " + title.length() + ". Maximum lenght is 150!");
- + return;
- + }
- + setTitle(title);
- +
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/announcements/adminWrite2.htm");
- + content = content.replaceAll("%title%", getTitle());
- + separateAndSend(content, activeChar);
- + }
- + else if (secondCommand.startsWith("postText"))
- + {
- + String content = secondCommand.substring(9);
- + if (content == "")
- + {
- + activeChar.sendMessage("Please insert your post content. This message cannot be empty.");
- + return;
- + }
- + if (content.length() >= 1000)
- + {
- + activeChar.sendMessage("The current content lenght is " + content.length() + ". Maximum lenght is 1000!");
- + return;
- + }
- + insertAnnouncement(getTitle(), content, activeChar);
- + }
- + else if (secondCommand.startsWith("read"))
- + {
- + StringTokenizer st2 = new StringTokenizer(secondCommand);
- + st2.nextToken();
- +
- + String command_Id = st2.nextToken();
- + int announcement_id = Integer.valueOf(command_Id).intValue();
- + showAnnouncement(activeChar, announcement_id);
- + }
- + }
- + else
- + {
- + super.parseCmd(command, activeChar);
- + }
- + }
- +
- + @Override
- + protected String getFolder()
- + {
- + return "announcements/";
- + }
- +
- + static String getTitle()
- + {
- + return _title;
- + }
- +
- + static void setTitle(String text)
- + {
- + _title = text;
- + }
- +
- + private static void insertAnnouncement(String title, String content, L2PcInstance activeChar)
- + {
- + DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
- + Date date = new Date();
- + try
- + {
- + Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
- + try
- + {
- + PreparedStatement statement = con.prepareStatement("INSERT INTO bbs_announcements (announce_id,announce_title,announce_text,announce_date,author) VALUES (?,?,?,?,?)");
- +
- + statement.setInt(1, getAnnouncementId());
- + statement.setString(2, title);
- + statement.setString(3, content);
- + statement.setString(4, dateFormat.format(date));
- + statement.setString(5, activeChar.getName());
- + statement.execute();
- + statement.close();
- + }
- + catch (Throwable localThrowable1)
- + {
- + localThrowable3 = localThrowable1;throw localThrowable1;
- + }
- + finally
- + {
- + if (con != null)
- + {
- + if (localThrowable3 != null)
- + {
- + try
- + {
- + con.close();
- + }
- + catch (Throwable localThrowable2)
- + {
- + localThrowable3.addSuppressed(localThrowable2);
- + }
- + }
- + else
- + {
- + con.close();
- + }
- + }
- + }
- + }
- + catch (SQLException e)
- + {
- + _log.log(Level.WARNING, "Failed to insert new announcement in database " + e.getMessage(), e);
- + }
- + AnnouncementsUpdateManager.updateList();
- + showList(activeChar);
- + }
- +
- + private static int getAnnouncementId()
- + {
- + int id = 0;
- + try
- + {
- + Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
- + try
- + {
- + PreparedStatement statement = con.prepareStatement("SELECT announce_id FROM bbs_announcements ORDER BY announce_id DESC LIMIT 1");
- + ResultSet rset = statement.executeQuery();
- + while (rset.next())
- + {
- + id = rset.getInt("announce_id");
- + }
- + rset.close();
- + statement.close();
- + }
- + catch (Throwable localThrowable1)
- + {
- + localThrowable3 = localThrowable1;throw localThrowable1;
- + }
- + finally
- + {
- + if (con != null)
- + {
- + if (localThrowable3 != null)
- + {
- + try
- + {
- + con.close();
- + }
- + catch (Throwable localThrowable2)
- + {
- + localThrowable3.addSuppressed(localThrowable2);
- + }
- + }
- + else
- + {
- + con.close();
- + }
- + }
- + }
- + }
- + catch (Exception e)
- + {
- + _log.log(Level.WARNING, "Failed to load announcementId " + e.getMessage(), e);
- + }
- + return id + 1;
- + }
- +
- + private static void showList(L2PcInstance activeChar)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/announcements/main.htm");
- + if (activeChar.isGM())
- + {
- + content = content.replaceAll("%adminMenu%", showAdminMenu());
- + }
- + else
- + {
- + content = content.replaceAll("%adminMenu%", "");
- + }
- + content = content.replaceAll("%showList%", AnnouncementsUpdateManager.showList());
- + separateAndSend(content, activeChar);
- + }
- +
- + private static void showAnnouncement(L2PcInstance activeChar, int announcement_id)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/announcements/postTemplate.htm");
- + String title = "";String text = "";String date = "";String author = "";
- + try
- + {
- + Connection con = L2DatabaseFactory.getInstance().getConnection();Throwable localThrowable3 = null;
- + try
- + {
- + PreparedStatement st = con.prepareStatement("SELECT announce_title,announce_text,announce_date,author FROM bbs_announcements WHERE announce_id=?;");
- + st.setInt(1, announcement_id);
- + ResultSet rset = st.executeQuery();
- + while (rset.next())
- + {
- + title = rset.getString("announce_title");
- + text = rset.getString("announce_text");
- + date = rset.getString("announce_date");
- + author = rset.getString("author");
- + }
- + rset.close();
- + st.close();
- + }
- + catch (Throwable localThrowable1)
- + {
- + localThrowable3 = localThrowable1;throw localThrowable1;
- + }
- + finally
- + {
- + if (con != null)
- + {
- + if (localThrowable3 != null)
- + {
- + try
- + {
- + con.close();
- + }
- + catch (Throwable localThrowable2)
- + {
- + localThrowable3.addSuppressed(localThrowable2);
- + }
- + }
- + else
- + {
- + con.close();
- + }
- + }
- + }
- + }
- + catch (SQLException e)
- + {
- + _log.log(Level.WARNING, "Failed to load post with id " + announcement_id + " and error trace: " + e.getMessage(), e);
- + }
- + content = content.replaceAll("%title%", title);
- + content = content.replaceAll("%text%", text);
- + content = content.replaceAll("%date%", date);
- + content = content.replaceAll("%author%", author);
- + separateAndSend(content, activeChar);
- + }
- +
- + static String showAdminMenu()
- + {
- + StringBuilder tb = new StringBuilder();
- +
- + tb.append("<img src=\"l2ui.squaregray\" width=\"610\" height=\"1\"/><table width=610><tr>");
- + tb.append("<td width=110 height=18 align=center><font color=FF0000>Admin Only:</font></td>");
- + tb.append("<td width=400 height=18 align=left>The list will show only latest 5 announcements.</td>");
- + 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>");
- + tb.append("</tr></table><img src=\"l2ui.squaregray\" width=\"610\" height=\"1\"><br><br>");
- +
- + return tb.toString();
- + }
- +
- + private static class SingletonHolder
- + {
- + protected static final AnnouncementsBBSManager _instance = new AnnouncementsBBSManager();
- + }
- +}
- \ No newline at end of file
- Index: java/net/sf/l2j/gameserver/communitybbs/Manager/ProblemReportBBSManager.java
- ===================================================================
- --- java/net/sf/l2j/gameserver/communitybbs/Manager/ProblemReportBBSManager.java (revision 0)
- +++ java/net/sf/l2j/gameserver/communitybbs/Manager/ProblemReportBBSManager.java (revision 0)
- @@ -0,0 +1,212 @@
- +/*
- + * This program is free software: you can redistribute it and/or modify it under
- + * the terms of the GNU General Public License as published by the Free Software
- + * Foundation, either version 3 of the License, or (at your option) any later
- + * version.
- + *
- + * This program is distributed in the hope that it will be useful, but WITHOUT
- + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- + * details.
- + *
- + * You should have received a copy of the GNU General Public License along with
- + * this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package net.sf.l2j.gameserver.communitybbs.Manager;
- +
- +import java.io.BufferedWriter;
- +import java.io.File;
- +import java.io.FileWriter;
- +import java.util.StringTokenizer;
- +
- +import net.sf.l2j.Config;
- +import net.sf.l2j.gameserver.cache.HtmCache;
- +import net.sf.l2j.gameserver.model.L2World;
- +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
- +
- +public class ProblemReportBBSManager extends BaseBBSManager
- +{
- + static String _type = "";
- + static String _majority = "";
- + static String _title = "";
- +
- + public static ProblemReportBBSManager getInstance()
- + {
- + return SingletonHolder._instance;
- + }
- +
- + @Override
- + public void parseCmd(String command, L2PcInstance activeChar)
- + {
- + if (command.equals("_bbsProblemReport"))
- + {
- + showReportWindow(activeChar);
- + }
- + else if (command.startsWith("_bbsProblemReport"))
- + {
- + StringTokenizer st = new StringTokenizer(command, ";");
- + st.nextToken();
- + String secondCommand = st.nextToken();
- + if (secondCommand.startsWith("toDescription"))
- + {
- + StringTokenizer st1 = new StringTokenizer(secondCommand);
- + st1.nextToken();
- +
- + String text = "";
- +
- + setMajority(st1.nextToken());
- +
- + setType(st1.nextToken());
- + while (st1.hasMoreTokens())
- + {
- + text = text + st1.nextToken() + " ";
- + }
- + if (text == "")
- + {
- + activeChar.sendMessage("Please insert title first.");
- + return;
- + }
- + setTitle(text);
- +
- + showDescriptionWindow(activeChar);
- + }
- + else if (secondCommand.startsWith("submit"))
- + {
- + String description = secondCommand.substring(9);
- + if (description == "")
- + {
- + activeChar.sendMessage("Please insert description first.");
- + return;
- + }
- + if (description.length() >= 150)
- + {
- + activeChar.sendMessage("The current description lenght is " + description.length() + ". Maximum lenght is 800!");
- + return;
- + }
- + try
- + {
- + String fname = "data/reports/" + getMajority() + "_" + getType() + "_report_" + activeChar.getName() + ".txt";
- + File file = new File(fname);
- + boolean exist = file.createNewFile();
- + if (!exist)
- + {
- + activeChar.sendMessage("You have already submit a report, staff member must confirm it first.");
- + return;
- + }
- + FileWriter fstream = new FileWriter(fname);
- + BufferedWriter out = new BufferedWriter(fstream);
- + out.write("Problem Report");
- + out.newLine();
- + out.write("- - - - - - - - - - - - - - - - - - - -");
- + out.newLine();
- + out.write("Player Details:");
- + out.newLine();
- + out.write("Account: " + activeChar.getAccountName());
- + out.newLine();
- + out.write("Name: " + activeChar.getName());
- + out.newLine();
- + out.write("IP: " + activeChar.getClient().getConnection().getInetAddress().getHostAddress());
- + out.newLine();
- + out.write("- - - - - - - - - - - - - - - - - - - -");
- + out.newLine();
- + out.write("Type of report: " + getType());
- + out.newLine();
- + out.newLine();
- + out.write("Majority of report: " + getMajority());
- + out.newLine();
- + out.newLine();
- + out.write("Title: " + getTitle());
- + out.newLine();
- + out.newLine();
- + out.write("Description: " + description);
- + out.close();
- +
- + separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/reporting/completed.htm"), activeChar);
- +
- + L2World.getInstance();
- + for (L2PcInstance gms : L2World.getAllGMs())
- + {
- + gms.sendMessage("ATTENTION: " + activeChar.getName() + " just submited a report! Please take care of his report by browsing in /data/reports folder.");
- + }
- + }
- + catch (Exception e)
- + {
- + activeChar.sendMessage("Failed to submit report. Try again or contact with staff member. This error should not occur.");
- + e.printStackTrace();
- + return;
- + }
- + }
- + }
- + else
- + {
- + super.parseCmd(command, activeChar);
- + }
- + }
- +
- + @Override
- + protected String getFolder()
- + {
- + return "reporting/";
- + }
- +
- + private static void showReportWindow(L2PcInstance activeChar)
- + {
- + if (Config.ENABLE_BBS_REPORT)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/reporting/main.htm");
- +
- + content = content.replaceAll("%charName%", activeChar.getName());
- + separateAndSend(content, activeChar);
- + }
- + else
- + {
- + separateAndSend(HtmCache.getInstance().getHtm("data/html/CommunityBoard/top/functionDisabled.htm"), activeChar);
- + }
- + }
- +
- + static void setType(String val)
- + {
- + _type = val;
- + }
- +
- + static void setMajority(String val)
- + {
- + _majority = val;
- + }
- +
- + static void setTitle(String val)
- + {
- + _title = val;
- + }
- +
- + static String getType()
- + {
- + return _type;
- + }
- +
- + static String getMajority()
- + {
- + return _majority;
- + }
- +
- + static String getTitle()
- + {
- + return _title;
- + }
- +
- + private static void showDescriptionWindow(L2PcInstance activeChar)
- + {
- + String content = HtmCache.getInstance().getHtm("data/html/CommunityBoard/reporting/description.htm");
- +
- + content = content.replaceAll("%charName%", activeChar.getName());
- + content = content.replaceAll("%type%", getType());
- + content = content.replaceAll("%majority%", getMajority());
- + content = content.replaceAll("%title%", getTitle());
- + separateAndSend(content, activeChar);
- + }
- +
- + private static class SingletonHolder
- + {
- + protected static final ProblemReportBBSManager _instance = new ProblemReportBBSManager();
- + }
- +}
- \ No newline at end of file
Add Comment
Please, Sign In to add comment