-
Chat Command For Races
Can u print a example ? Obviously when you have time ! xD
-
Chat Command For Races
else p.sendPacket(new CreatureSay(activeChar.getObjectId(), Say2.ALL, activeChar.getName(), "message")); Now ?
-
Chat Command For Races
i have try: else p.sendPacket(new CreatureSay(activeChar.getObjectId(), Say2.ALL, activeChar.getName() + "message")); and else p.sendPacket(new CreatureSay(0, Say2.ALL, activeChar.getName() + " message")); but the console print: The constructor CreatureSay(int, int, String) ah now the staff can read the message ! ty
-
Chat Command For Races
ok ty
-
Chat Command For Races
To let the staff read the message, just add this? if(p.getRace() == charRace || activeChar.getAccessLevel().isGm() == true) p.sendPacket(new CreatureSay(activeChar.getObjectId(),Say2.ALL,activeChar.getName(),params));
-
Chat Command For Races
It's a server RP with 30 players, i dont have a problem... if cause lag i remove the change
-
Chat Command For Races
In practice, once launched, the commando must come out of a standard message that everyone can read
-
Chat Command For Races
In practice, once launched, the commando must come out of a standard message that everyone can read
-
Chat Command For Races
Ok work man, i love u ! One last thing, how do I print a standard message in chat all?
-
Chat Command For Races
H5 build 2015
-
Chat Command For Races
To record the command just add the file to the right MasterHandler.java ??
-
Chat Command For Races
import handlers.voicedcommandhandlers.RaceCommand; (MasterHandler.java)
-
Chat Command For Races
I accept all guys, of course if it was php I would have already solved the problem! Anyway, thank you all for the help and of course put the credits on the script site.
-
Chat Command For Races
package handlers.chathandlers; import java.util.Collection; import java.util.StringTokenizer; import java.util.logging.Logger; import com.l2jserver.Config; import com.l2jserver.gameserver.handler.IChatHandler; import com.l2jserver.gameserver.handler.IVoicedCommandHandler; import com.l2jserver.gameserver.handler.VoicedCommandHandler; import com.l2jserver.gameserver.model.BlockList; import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; import com.l2jserver.gameserver.network.SystemMessageId; import com.l2jserver.gameserver.network.serverpackets.CreatureSay; import com.l2jserver.gameserver.model.base.Race; import com.l2jserver.gameserver.util.Util; /** * A chat handler * @author durgus */ public class RaceVoice implements IVoicedCommandHandler { private static final String[] _voicedCommands = {"d, de, e, h, o"}; @Override public boolean useVoicedCommand(String command, Player activeChar, String target) { if (command.startsWith("d") && activeChar.getRace() == Race.Dwarf) { // Code } else if (command.startsWith("de") && activeChar.getRace() == Race.DarkElf) { // Code } // ... return true; } @Override public String[] getVoicedCommandList() { return _voicedCommands; } }
-
Chat Command For Races
My code after edit: if (command.startWith("d") && activeChar.getRace() == Race.Dwarf) { player.sendPacket(new CreatureSay(0, player.getName(),activeChar.getName())); } Is correct ? Im noob with java :( And i have a problem i have import com.l2jserver.gameserver.model.base.Race; but the console server print this message: 1. ERROR in C:\Users\Administrator\Desktop\l2j\game\data\scripts\handlers\chatha ndlers\RaceVoice.java (at line 34) import com.l2jserver.gameserver.model.base; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Only a type can be imported. com.l2jserver.gameserver.model.base resolves to a package Race cannot be resolved to a variable