-Community gatekeeper reworked.

-Close community after teleport.
-Other minor community html changes.
This commit is contained in:
mobius
2015-02-10 04:14:29 +00:00
parent ea6de92728
commit ef76b0b7e0
5 changed files with 187 additions and 174 deletions

View File

@ -139,7 +139,7 @@
</td>
</tr>
<tr>
<td height=100></td>
<td height=150></td>
</tr>
</table>
<table border=0 cellpadding=0 cellspacing=0 width=555>

View File

@ -1,6 +1,4 @@
<html noscrollbar>
<head>
<body>
<html noscrollbar><body>
<table width=700>
<tr>
<td height=10></td>
@ -58,43 +56,26 @@
<tr>
<td height=25></td>
</tr>
<tr>
<td height=25 align="center"><font name="hs12">Gatekeeper</font></td>
</tr>
<tr>
<td>
<center><img src="L2UI.SquareGray" width=200 height=1></center>
</td>
</tr>
<tr>
<td height=30></td>
</tr>
<tr>
<td align="center">
Well i can teleport you all over the continent...
From here you can teleport all over the continent.
<br1>
You just need to choose the destination!
</td>
</tr>
<tr>
<td height=20></td>
</tr>
<tr>
<td align="center">
<table align=center border="0" height=45>
<tr>
<td><button value="Giran" action="bypass _bbsteleport;82698,148638,-3473,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Aden" action="bypass _bbsteleport;147450,27064,-2208,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Goddard" action="bypass _bbsteleport;147725,-56517,-2780,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
<tr>
<td><button value="Rune" action="bypass _bbsteleport;44070,-50243,-796,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Dion" action="bypass _bbsteleport;18748,145437,-3132,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Oren" action="bypass _bbsteleport;82321,55139,-1529,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
<tr>
<td><button value="Gludio" action="bypass _bbsteleport;-14225,123540,-3121,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Schuttgart" action="bypass _bbsteleport;87358,-141982,-1341,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Heine" action="bypass _bbsteleport;111115,219017,-3547,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
<tr>
<td><button value="Gludin" action="bypass _bbsteleport;-83063,150791,-3133,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Hunters" action="bypass _bbsteleport;116589,76268,-2734,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Arcan" action="bypass _bbsteleport;207320,87617,-1112,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
<table align=center border="0">
<tr>
<td height=20></td>
<td height=25></td>
</tr>
<tr>
<td>
@ -104,46 +85,65 @@
<tr>
<td height=25></td>
</tr>
</table>
<table align=center border="0" height=45>
<tr>
<td><button value="Talking Island" action="bypass _bbsteleport;-114351,255286,-1520,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Dwarven" action="bypass _bbsteleport;116551,-182493,-1525,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Orc" action="bypass _bbsteleport;-44211,-113521,-241,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
<tr>
<td><button value="Dark Elven" action="bypass _bbsteleport;12428,16551,-4588,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Elven" action="bypass _bbsteleport;45873,49288,-3064,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Kamael" action="bypass _bbsteleport;-116934,46616,368,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
<tr>
<td><button value="Ertheia" action="bypass _bbsteleport;-80353,247981,-3507,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Floran" action="bypass _bbsteleport;17144,170156,-3502,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Gainak" action="bypass _bbsteleport;16358,-114071,-229,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
<table align=center border="0" width=465 height=45>
<tr>
<td height=15></td>
</tr>
<tr>
<td align="center">
Hm... maybe you would like to try our custom areas?
</td>
<table align=center border="0" height=45>
<tr>
<td><button value="Giran" action="bypass _bbsteleport;82698,148638,-3473" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Aden" action="bypass _bbsteleport;147450,27064,-2208" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Goddard" action="bypass _bbsteleport;147725,-56517,-2780" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
<tr>
<td><button value="Rune" action="bypass _bbsteleport;44070,-50243,-796" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Dion" action="bypass _bbsteleport;18748,145437,-3132" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Oren" action="bypass _bbsteleport;82321,55139,-1529" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
<tr>
<td><button value="Gludio" action="bypass _bbsteleport;-14225,123540,-3121" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Schuttgart" action="bypass _bbsteleport;87358,-141982,-1341" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Heine" action="bypass _bbsteleport;111115,219017,-3547" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
<tr>
<td><button value="Gludin" action="bypass _bbsteleport;-83063,150791,-3133" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Hunters" action="bypass _bbsteleport;116589,76268,-2734" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Arcan" action="bypass _bbsteleport;207320,87617,-1112" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
<table align=center border="0" height=45>
<table align=center border="0">
<tr>
<td height=15></td>
</tr>
<tr>
<td><button value="Farm Zone" action="bypass _bbsteleport;-9554,-116672,-2599,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Battalion Zone" action="bypass _bbsteleport;144117,142913,-11889,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Main Town" action="bypass _bbsteleport;-114351,255286,-1520,gatekeeper/main" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td>
<center><img src="L2UI.SquareGray" width=500 height=1></center>
</td>
</tr>
<tr>
<td height=20></td>
</tr>
</table>
<table align=center border="0" height=45>
<tr>
<td><button value="Talking Island" action="bypass _bbsteleport;-114351,255286,-1520" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Dwarven" action="bypass _bbsteleport;116551,-182493,-1525" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Orc" action="bypass _bbsteleport;-44211,-113521,-241" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
<tr>
<td><button value="Dark Elven" action="bypass _bbsteleport;12428,16551,-4588" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Elven" action="bypass _bbsteleport;45873,49288,-3064" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Kamael" action="bypass _bbsteleport;-116934,46616,368" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
<tr>
<td><button value="Ertheia" action="bypass _bbsteleport;-80353,247981,-3507" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Floran" action="bypass _bbsteleport;17144,170156,-3502" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
<td><button value="Gainak" action="bypass _bbsteleport;16358,-114071,-229" width=140 height=27 back="L2UI_CT1.Button_DF_Down" fore="L2UI_CT1.Button_DF"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height=60></td>
</tr>
</table>
<table border=0 cellpadding=0 cellspacing=0 width=555>
<tr>
@ -165,5 +165,4 @@
</td>
</tr>
</table>
</body>
</html>
</body></html>

View File

@ -59,6 +59,11 @@
<tr>
<td height=25 align="center"><font name="hs12">Merchant</font></td>
</tr>
<tr>
<td>
<center><img src="L2UI.SquareGray" width=200 height=1></center>
</td>
</tr>
<tr>
<td height=25></td>
</tr>

View File

@ -35,6 +35,7 @@ import com.l2jserver.gameserver.model.actor.L2Summon;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.serverpackets.BuyList;
import com.l2jserver.gameserver.network.serverpackets.ExBuySellList;
import com.l2jserver.gameserver.network.serverpackets.ShowBoard;
/**
* Home board.
@ -110,16 +111,14 @@ public final class HomeBoard implements IParseBoardHandler
final int x = Integer.parseInt(buypassOptions[0]);
final int y = Integer.parseInt(buypassOptions[1]);
final int z = Integer.parseInt(buypassOptions[2]);
final String page = buypassOptions[3];
if (activeChar.getInventory().getInventoryItemCount(Config.COMMUNITYBOARD_CURRENCY, -1) < Config.COMMUNITYBOARD_TELEPORT_PRICE)
{
activeChar.sendMessage("Not enough currency!");
return false;
}
activeChar.sendPacket(new ShowBoard());
activeChar.getInventory().destroyItemByItemId("CB_Teleport", Config.COMMUNITYBOARD_CURRENCY, Config.COMMUNITYBOARD_TELEPORT_PRICE, activeChar, activeChar);
activeChar.teleToLocation(x, y, z, 0);
final String html = HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/" + page + ".html");
CommunityBoardHandler.separateAndSend(html, activeChar);
}
else if (Config.CUSTOM_CB_ENABLED && Config.COMMUNITYBOARD_ENABLE_BUFFS && command.startsWith("_bbsbuff"))
{

View File

@ -25,12 +25,22 @@ import com.l2jserver.util.StringUtil;
public class ShowBoard extends L2GameServerPacket
{
private final String _content;
private int _showBoard = 1; // 1 show, 0 hide
public ShowBoard(String htmlCode, String id)
{
_content = id + "\u0008" + htmlCode;
}
/**
* Hides the community board
*/
public ShowBoard()
{
_showBoard = 0;
_content = "";
}
public ShowBoard(List<String> arg)
{
StringBuilder builder = new StringBuilder(5 + StringUtil.getLength(arg) + arg.size()).append("1002\u0008");
@ -45,7 +55,7 @@ public class ShowBoard extends L2GameServerPacket
protected final void writeImpl()
{
writeC(0x7B);
writeC(0x01); // c4 1 to show community 00 to hide
writeC(_showBoard); // c4 1 to show community 00 to hide
writeS("bypass _bbshome"); // top
writeS("bypass _bbsgetfav"); // favorite
writeS("bypass _bbsloc"); // region