Jump to content
  • 0

L2J Reunion Add Problem Command Mass Hero :d


Question

9 answers to this question

Recommended Posts

  • 0
Posted


package l2r.gameserver.scripts.handlers.admincommandhandlers;

 

import l2r.gameserver.handler.IAdminCommandHandler;

import l2r.gameserver.model.L2World;

import l2r.gameserver.model.actor.instance.L2PcInstance;

import l2r.gameserver.network.serverpackets.SocialAction;

 

public class AdminMassHero implements IAdminCommandHandler

{

 

@Override

public String[] getAdminCommandList()

{

return ADMIN_COMMANDS;

}

 

@Override

public boolean useAdminCommand(String command, L2PcInstance activeChar)

{

if (activeChar == null)

{

return false;

}

 

if (command.startsWith("admin_masshero"))

{

for (L2PcInstance player : L2World.getInstance().getAllPlayersArray())

{

if (!player.isHero() || !player.isInOlympiadMode())

{

player.setHero(true);

player.sendMessage("Admin is rewarding all online players with Hero Status.");

player.broadcastPacket(new SocialAction(player.getObjectId(), 16));

player.broadcastUserInfo();

}

player = null;

}

}

return true;

}

 

private static String[] ADMIN_COMMANDS =

{

"admin_masshero"

};

}

Guest
This topic is now closed to further replies.


×
×
  • Create New...