Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use
viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Asthena
Posts: 17 Joined: Mon Jan 02, 2012 4:24 am
Post
by Asthena » Thu Apr 05, 2012 11:03 am
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision
Number :
L2JDP Revision
Number :
Ive built off the Clan Leader script here in forums,
And corrected as asked thru consul but now dont give me errors but wont load.
anyone give a hand?
Code: Select all
package com.l2jserver.gameserver.handlers.voicedcommandhandlers; import com.l2jserver.gameserver.handler.IVoicedCommandHandler;import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; public class Party implements IVoicedCommandHandler{ private static final String[]_voicedCommands = {"mypt"}; public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { if (command.startsWith("mypt")) { L2PcInstance leader = null; if (activeChar.getParty() != null) leader = activeChar.getParty().getLeader(); else { activeChar.sendMessage("You don't have a Party.."); return false; } if (leader.isInOlympiadMode() || leader.isTeleporting() || leader.isInCombat() || leader.isInJail() || leader.isFlying() || leader.isIn7sDungeon()) { activeChar.sendMessage("You cannot teleport to your leader now"); return false; } int leaderX = leader.getX(); int leaderY = leader.getY(); int leaderZ = leader.getZ(); activeChar.sendMessage("You are teleporting to your Party leader"); activeChar.teleToLocation(leaderX, leaderY, leaderZ); leader.sendMessage(activeChar.getName() + " is teleporting to you."); } return true; } public String[] getVoicedCommandList() { return _voicedCommands; }}
tukune
Posts: 533 Joined: Sun Mar 29, 2009 2:35 pm
Location: Japan
Post
by tukune » Thu Apr 05, 2012 1:38 pm
package com.l2jserver.gameserver.handlers.voicedcommandhandlers;
package handlers.voicedcommandhandlers;
Have you add to MasterHandler.java?
Asthena
Posts: 17 Joined: Mon Jan 02, 2012 4:24 am
Post
by Asthena » Thu Apr 05, 2012 2:15 pm
Yes I have, I'm at work now but I've added to corresponding place.
***** party;
If I have it open on master on restart it won't load any handlers.
So ill void until loaded then unvoid and load thru server.
Starter
Posts: 484 Joined: Sat Jan 23, 2010 4:42 pm
Post
by Starter » Fri Apr 06, 2012 5:13 pm
I have promises to keep and miles to go before I sleep.
Asthena
Posts: 17 Joined: Mon Jan 02, 2012 4:24 am
Post
by Asthena » Mon Nov 04, 2013 2:15 pm
Ok so Im Back to Playing Again,
I Have Reinstaed this Command But Its not consuming the item.
Code: Select all
package handlers.voicedcommandhandlers; import com.l2jserver.gameserver.datatables.ItemTable; import com.l2jserver.gameserver.handler.IVoicedCommandHandler;import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; public class MyPt implements IVoicedCommandHandler{ private static final String[] _voicedCommands = {"mypt"}; @Override public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { final int neededItemId = 3484; // 3484 = gold giant final int neededItemCount = 5; if (command.startsWith("mypt")) { L2PcInstance leader = null; if (activeChar.getParty() != null) leader = activeChar.getParty().getLeader(); else { activeChar.sendMessage("You don't have a Party.."); return false; } if (leader.isInOlympiadMode() || leader.isTeleporting() || leader.isInJail() || leader.isFlying() || leader.isIn7sDungeon()) { activeChar.sendMessage("You cannot teleport to your leader now"); return false; } if (activeChar.getInventory() != null) { if (activeChar.getInventory().getItemByItemId(neededItemId) == null) { activeChar.sendMessage("You need at least " + neededItemCount + " " + ItemTable.getInstance().getTemplate(neededItemId).getName() + " to use this command."); return false; } int leaderX = leader.getX(); int leaderY = leader.getY(); int leaderZ = leader.getZ(); activeChar.destroyItem("Consume", neededItemId, 5, null, false); activeChar.sendMessage("You are teleporting to your Party Leader"); activeChar.teleToLocation(leaderX, leaderY, leaderZ); leader.sendMessage(activeChar.getName() + " is teleporting to you."); } } return true; } @Override public String[] getVoicedCommandList() { return _voicedCommands; }}
Please Help
tukune
Posts: 533 Joined: Sun Mar 29, 2009 2:35 pm
Location: Japan
Post
by tukune » Tue Nov 05, 2013 11:16 pm
activeChar.destroyItem("Consume", neededItemId, 5, null, false);
activeChar.
destroyItemByItemId ("Consume", neededItemId, 5, null, false);
Asthena
Posts: 17 Joined: Mon Jan 02, 2012 4:24 am
Post
by Asthena » Wed Nov 06, 2013 12:21 pm
That did the trick, Ty JoJo
+100 For JoJo