zdrastvuite vot zdelal alt+b premium service nu posle restarta ischezaet hero
ne paimu vchom dela
ne paimu vchom dela
код:
else if (param.equalsIgnoreCase("SetHero30"))
{
if (activeChar.getInventory().getItemByItemId(Config.HeroItemId) == null)
{
activeChar.sendPacket((L2GameServerPacket)SystemMessage.getSystemMessage(SystemMessageId.NOT_ENOUGH_ITEMS));
return;
}
if (activeChar.getInventory().getItemByItemId(Config.HeroItemId).getCount() < Config.HeroItemCount30)
{
activeChar.sendPacket((L2GameServerPacket)SystemMessage.getSystemMessage(SystemMessageId.NOT_ENOUGH_ITEMS));
return;
}
if (activeChar.isHero())
{
activeChar.sendMessage("You are already a hero.");
return;
}
else
{
activeChar.destroyItemByItemId("ShopBBS", Config.HeroItemId, Config.HeroItemCount30, (WorldObject)activeChar, true);
activeChar.sendPacket(new ItemList(activeChar, false));
activeChar.setHero(true);
activeChar.setHeroUntil(System.currentTimeMillis() + (1000 * 60 * 60 * 24 * heroDays30));
activeChar.store();
activeChar.sendMessage("You are now a Hero for the next " + heroDays30 + " days.");
activeChar.broadcastUserInfo();
ThreadPool.schedule(new Runnable()
{
@Override
public void run()
{
if (activeChar.isOnline() && activeChar.isHero())
{
activeChar.setHero(true);
activeChar.setHeroUntil(System.currentTimeMillis() + (1000 * 60 * 60 * 24 * heroDays30));
activeChar.store();
activeChar.broadcastUserInfo();
activeChar.sendMessage("Your hero status has expired.");
}
}
}
, activeChar.getHeroUntil() - System.currentTimeMillis());
}
}
else if (param.equalsIgnoreCase("SetHero90"))
{
if (activeChar.getInventory().getItemByItemId(Config.HeroItemId) == null)
{
activeChar.sendPacket((L2GameServerPacket)SystemMessage.getSystemMessage(SystemMessageId.NOT_ENOUGH_ITEMS));
return;
}
if (activeChar.getInventory().getItemByItemId(Config.HeroItemId).getCount() < Config.HeroItemCount90)
{
activeChar.sendPacket((L2GameServerPacket)SystemMessage.getSystemMessage(SystemMessageId.NOT_ENOUGH_ITEMS));
return;
}
if (activeChar.isHero())
{
activeChar.sendMessage("You are already a hero.");
return;
}
else
{
activeChar.destroyItemByItemId("ShopBBS", Config.HeroItemId, Config.HeroItemCount90, (WorldObject)activeChar, true);
activeChar.sendPacket(new ItemList(activeChar, false));
activeChar.setHero(true);
activeChar.setHeroUntil(System.currentTimeMillis() + (1000 * 60 * 60 * 24 * heroDays90));
activeChar.store();
activeChar.sendMessage("You are now a Hero for the next " + heroDays90 + " days.");
activeChar.broadcastUserInfo();
ThreadPool.schedule(new Runnable()
{
@Override
public void run()
{
if (activeChar.isOnline() && activeChar.isHero())
{
activeChar.setHero(true);
activeChar.setHeroUntil(System.currentTimeMillis() + (1000 * 60 * 60 * 24 * heroDays90));
activeChar.store();
activeChar.broadcastUserInfo();
activeChar.sendMessage("Your hero status has expired.");
}
}
}
, activeChar.getHeroUntil() - System.currentTimeMillis());
}
}
Последнее редактирование модератором: