Jump to content

mattiamartucci

Members
  • Posts

    16
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

About mattiamartucci

Profile Information

  • Gender
    Male
  • Country
    Italy

Recent Profile Visitors

176 profile views

mattiamartucci's Achievements

Newbie

Newbie (1/16)

0

Reputation

  1. Can u print a example ? Obviously when you have time ! xD
  2. else p.sendPacket(new CreatureSay(activeChar.getObjectId(), Say2.ALL, activeChar.getName(), "message")); Now ?
  3. 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
  4. 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));
  5. It's a server RP with 30 players, i dont have a problem... if cause lag i remove the change
  6. In practice, once launched, the commando must come out of a standard message that everyone can read
  7. In practice, once launched, the commando must come out of a standard message that everyone can read
  8. Ok work man, i love u ! One last thing, how do I print a standard message in chat all?
  9. To record the command just add the file to the right MasterHandler.java ??
  10. import handlers.voicedcommandhandlers.RaceCommand; (MasterHandler.java)
  11. 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.
  12. 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; } }
  13. 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
×
×
  • Create New...