for (Summon summon : player.getSummonList())
{
for (EffectTemplate et : skill.getEffectTemplates())
{
Env env = new Env(summon, summon, skill);
Effect effect = et.getEffect(env);
effect.setPeriod(time);
summon.getEffectList().addEffect(effect);
summon.updateEffectIconsImpl();
}
}
}
else
{
for (EffectTemplate et : skill.getEffectTemplates())
{
Env env = new Env(player, player, skill);
Effect effect = et.getEffect(env);
effect.setPeriod(time);
player.getEffectList().addEffect(effect);
player.updateEffectIconsImpl();
}
}
player.reduceAdena(pice);
ShowHtml(page, player);
}
else if (bypass.startsWith("_bbsbaim"))
{
StringTokenizer st2 = new StringTokenizer(bypass, ";");
String[] mBypass = st2.nextToken().split(":");
player.setVar("isPlayerBuff", player.getVarB("isPlayerBuff") ? "0" : "1", -1);
ShowHtml(mBypass[1], player);
}
else if (bypass.startsWith("_bbsbregen"))
{
StringTokenizer st2 = new StringTokenizer(bypass, ";");
String[] mBypass = st2.nextToken().split(":");
int pice = Config.COMMUNITYBOARD_BUFF_PICE;
if (player.getAdena() < (pice * 10))
{
player.sendMessage("It is not enough money!");
ShowHtml(mBypass[1], player);
return;
}
if (!player.getVarB("isPlayerBuff"))
{
if (player.getSummonList().getServitors() != null)
{
for (Summon summon : player.getSummonList())
{
summon.setCurrentHpMp(summon.getMaxHp(), summon.getMaxMp());
summon.setCurrentCp(summon.getMaxCp(), true);
}
}
}
else
{
player.setCurrentHpMp(player.getMaxHp(), player.getMaxMp());
player.setCurrentCp(player.getMaxCp());
}
player.reduceAdena(pice * 10);
ShowHtml(mBypass[1], player);
}
else if (bypass.startsWith("_bbsbcansel"))
{
StringTokenizer st2 = new StringTokenizer(bypass, ";");
String[] mBypass = st2.nextToken().split(":");
if (player.getVarB("isPlayerBuff") && (player.getEffectList().getEffectsBySkillId(Skill.SKILL_RAID_CURSE) == null))
{
player.getEffectList().stopAllEffects();
}
else if (!player.getVarB("isPlayerBuff") && (player.getSummonList().getServitors() != null))
{
for (Summon summon : player.getSummonList())
{
summon.getEffectList().stopAllEffects();
}
}
ShowHtml(mBypass[1], player);
}
else if (bypass.startsWith("_bbsbsave"))
{
StringTokenizer st2 = new StringTokenizer(bypass, ";");
String[] mBypass = st2.nextToken().split(":");
String name = "";
try
{
if (mBypass[2].length() > 1)
{
name = mBypass[2].substring(1);
}
}
catch (ArrayIndexOutOfBoundsException e)
{
player.sendMessage("You did not enter a name to save!");
return;
}
SBufferScheme scheme = new SBufferScheme();
if (ManageBbsBuffer.getCountOnePlayer(player.getObjectId()) >= 3)
{
player.sendMessage("Exceeded the number of schemes!");
ShowHtml(mBypass[1], player);
return;
}
if (ManageBbsBuffer.existName(player.getObjectId(), name))
{
player.sendMessage("Scheme with that name already exists!");
ShowHtml(mBypass[1], player);
return;
}
if (name.length() > 15)
{
name = name.substring(0, 15);
}
if (name.length() > 0)
{
scheme.obj_id = player.getObjectId();
scheme.name = name;
Effect skill[] = player.getEffectList().getAllFirstEffects();
if (skill != null)
{
for (Effect element : skill)
{
if (Config.COMMUNITYBOARD_BUFF_ALLOW.contains(element.getSkill().getId()))