Heal for community board.
Contributed by MrNapz.
This commit is contained in:
parent
e1e6b1986e
commit
254d0ec00a
@ -419,6 +419,10 @@ CommunityTeleportPrice = 0
|
||||
# Default: 0 (free)
|
||||
CommunityBuffPrice = 0
|
||||
|
||||
# Price for Heal.
|
||||
# Default: 0 (free)
|
||||
CommunityHealPrice = 0
|
||||
|
||||
# Disable Community Board while in combat.
|
||||
# Default: True
|
||||
CommunityCombatDisabled = True
|
||||
|
@ -99,13 +99,19 @@
|
||||
</tr>
|
||||
</table>
|
||||
<table align=center border="0">
|
||||
<tr>
|
||||
<td align=center>Heal</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align=center><button value="." action="bypass _bbsheal;buffer/main" width=32 height=32 back="icon.skill11756" fore="icon.skill11756"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<center><img src="L2UI.SquareGray" width=500 height=1></center>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=10></td>
|
||||
<td height=15></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
@ -116,7 +122,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td height=150></td>
|
||||
<td height=120></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border=0 cellpadding=0 cellspacing=0 width=555>
|
||||
|
@ -57,7 +57,8 @@ public final class HomeBoard implements IParseBoardHandler
|
||||
"_bbssell",
|
||||
"_bbsteleport",
|
||||
"_bbspremium",
|
||||
"_bbsbuff"
|
||||
"_bbsbuff",
|
||||
"_bbsheal"
|
||||
};
|
||||
|
||||
@Override
|
||||
@ -208,6 +209,35 @@ public final class HomeBoard implements IParseBoardHandler
|
||||
}
|
||||
CommunityBoardHandler.separateAndSend(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/" + page + ".html"), activeChar);
|
||||
}
|
||||
else if ((Config.CUSTOM_CB_ENABLED && command.startsWith("_bbsheal")))
|
||||
{
|
||||
final String page = command.replace("_bbsheal;", "");
|
||||
if (activeChar.getInventory().getInventoryItemCount(Config.COMMUNITYBOARD_CURRENCY, -1) < (Config.COMMUNITYBOARD_BUFF_PRICE))
|
||||
{
|
||||
activeChar.sendMessage("Not enough currency!");
|
||||
}
|
||||
else
|
||||
{
|
||||
activeChar.destroyItemByItemId("CB_Heal", Config.COMMUNITYBOARD_CURRENCY, Config.COMMUNITYBOARD_BUFF_PRICE, activeChar, true);
|
||||
activeChar.setCurrentHp(activeChar.getMaxHp());
|
||||
activeChar.setCurrentMp(activeChar.getMaxMp());
|
||||
activeChar.setCurrentCp(activeChar.getMaxCp());
|
||||
if (activeChar.hasPet())
|
||||
{
|
||||
activeChar.getPet().setCurrentHp(activeChar.getPet().getMaxHp());
|
||||
activeChar.getPet().setCurrentMp(activeChar.getPet().getMaxMp());
|
||||
activeChar.getPet().setCurrentCp(activeChar.getPet().getMaxCp());
|
||||
}
|
||||
for (L2Summon summon : activeChar.getServitors().values())
|
||||
{
|
||||
summon.setCurrentHp(summon.getMaxHp());
|
||||
summon.setCurrentMp(summon.getMaxMp());
|
||||
summon.setCurrentCp(summon.getMaxCp());
|
||||
}
|
||||
activeChar.sendMessage("You used heal!");
|
||||
CommunityBoardHandler.separateAndSend(HtmCache.getInstance().getHtm(activeChar.getHtmlPrefix(), "data/html/CommunityBoard/Custom/" + page + ".html"), activeChar);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -658,6 +658,7 @@ public final class Config
|
||||
public static boolean COMMUNITYBOARD_ENABLE_BUFFS;
|
||||
public static int COMMUNITYBOARD_TELEPORT_PRICE;
|
||||
public static int COMMUNITYBOARD_BUFF_PRICE;
|
||||
public static int COMMUNITYBOARD_HEAL_PRICE;
|
||||
public static boolean COMMUNITYBOARD_COMBAT_DISABLED;
|
||||
public static boolean COMMUNITYBOARD_KARMA_DISABLED;
|
||||
public static boolean COMMUNITYBOARD_CAST_ANIMATIONS;
|
||||
@ -2110,6 +2111,7 @@ public final class Config
|
||||
COMMUNITYBOARD_ENABLE_BUFFS = CustomSettings.getBoolean("CommunityEnableBuffs", true);
|
||||
COMMUNITYBOARD_TELEPORT_PRICE = CustomSettings.getInt("CommunityTeleportPrice", 0);
|
||||
COMMUNITYBOARD_BUFF_PRICE = CustomSettings.getInt("CommunityBuffPrice", 0);
|
||||
COMMUNITYBOARD_HEAL_PRICE = CustomSettings.getInt("CommunityHealPrice", 0);
|
||||
COMMUNITYBOARD_COMBAT_DISABLED = CustomSettings.getBoolean("CommunityCombatDisabled", true);
|
||||
COMMUNITYBOARD_KARMA_DISABLED = CustomSettings.getBoolean("CommunityKarmaDisabled", true);
|
||||
COMMUNITYBOARD_CAST_ANIMATIONS = CustomSettings.getBoolean("CommunityCastAnimations", false);
|
||||
|
Loading…
Reference in New Issue
Block a user