Jump to content

Recommended Posts

Posted

First Of all :

Put this code on handlers/voicecommandhandlers

package handlers.voicedcommandhandlers;

import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

/**
*
*@author TheEnd
*
*/
public class Giran implements IVoicedCommandHandler
{
    private static final String[] VOICED_COMMANDS = { "giran" };

    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
    {   
       
        if (command.equalsIgnoreCase("giran"))
        {          
             if(activeChar.isInJail())
            {
                activeChar.sendMessage("Sorry,you are in Jail!");
                return false;
            }
            else if(activeChar.isInOlympiadMode())
            {
                activeChar.sendMessage("Sorry,you are in the Olympiad now.");
                return false;
            }
                    
            else if(activeChar.atEvent)
            {
                activeChar.sendMessage("Sorry,you are in an event.");
                return false;
            }
            else  if (activeChar.isInDuel())
            {
                activeChar.sendMessage("Sorry,you are in a duel!");
                return false;
            }
            else if (activeChar.inObserverMode())
            {
               activeChar.sendMessage("Sorry,you are in the observation.");
            }            
            else if (activeChar.isFestivalParticipant())
            {
                activeChar.sendMessage("Sorry,you are in a festival.");
                return false;
            }         
           if(activeChar.getInventory().getItemByItemId(3470) == null)
           {
              activeChar.sendMessage("You need one or more Gold Bars to use the teleport system.");
             return false;
           }
               int placex;
               int placey;
               int placez;
               
               placex = 81304;
               placey = 14589;
               placez = -3469;
               
               activeChar.teleToLocation(placex, placey, placez);
     activeChar.sendMessage("You have been teleported to Giran!");
    activeChar.getInventory().destroyItemByItemId("Gold Bat", 3470, 1, activeChar, activeChar.getTarget());
    activeChar.sendMessage("One GoldBar has dissapeared! Thank you!");
        }
        return true;
    }
    public String[] getVoicedCommandList()
    {
        return VOICED_COMMANDS;
    }

}

       

We will change the command, nwo it is .giran , to change it , just replace this in Red:

    private static final String[] VOICED_COMMANDS = { "giran" };

 

    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)

    { 

     

        if (command.equalsIgnoreCase("giran"))

---------------------------

Then We will change the location. Change the Red with the location you want:

 

              placex = 81304; Here u Put X

              placey = 14589; Here u Put Y

              placez = -3469; Here U Put Z

 

-----------------------------------------------

Now the last thing that we will change is the Item that will be needed. Change the Red with Id the green with amount

 

          if(activeChar.getInventory().getItemByItemId(3470) == null)

          {

              activeChar.sendMessage("You need one or more Gold Bars to use the teleport system.");

            return false;

}

              int placex;

              int placey;

              int placez;

             

              placex = 81304;

              placey = 14589;

              placez = -3469;

             

              activeChar.teleToLocation(placex, placey, placez);

    activeChar.sendMessage("You have been teleported to Giran!");

    activeChar.getInventory().destroyItemByItemId("Gold Bat", 3470, 1, activeChar, activeChar.getTarget());

    activeChar.sendMessage("One GoldBar has dissapeared! Thank you!");

 

-------------------------------------------

Save the File.

Now we are going to register it.

Run this Patch But Change where it says Giran with your file name.

Index: data/scripts/handlers/MasterHandler.java
===================================================================
--- data/scripts/handlers/MasterHandler.java	(revision 6529)
+++ data/scripts/handlers/MasterHandler.java	(working copy)
@@ -221,6 +222,7 @@
	private static void loadVoicedHandlers()
	{
		VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new stats());
+		VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Giran());
		if (Config.L2JMOD_ALLOW_WEDDING)
			VoicedCommandHandler.getInstance().registerVoicedCommandHandler(new Wedding());
		if (Config.BANKING_SYSTEM_ENABLED)

 

----------------------

And now you have your own teleport command.

Simply Press : .giran (or your name)and you are ready.....

 

Credits: TheEnd

Posted

thanks!i have seen it in many server

Also I will update the code with a delay... like unstuck...

Posted

Nice, also You could make config for alow or disalow this command and config for X/Y/Z - this is simple.

 

Good Share  ;)

Posted

Nice, also You could make config for alow or disalow this command and config for X/Y/Z - this is simple.

 

Good Share  ;)

yeah.. This is waht I wanted to do for the next guide :D

Posted

yeah.. This is waht I wanted to do for the next guide :D

 

awesome share , but there are some typo which need fix :P

 

whatever. as a code , its awesome , and very useful. but it can be hacked easily

Posted

Nothing usefull, But nice idea. Good Work.

 

Yea its good ,something like .valakas command :]

GJ ,gonna use it for my next share :)

 

This cmd already exists here in the forum.. :P

  • 1 year later...
Posted

i know this thread is old, but i was redirected here from a newer one and since this one is much complex i dont want to post in the other one the thanks :P

for me will be useful and i guess a bump will be good too :P

 

Posted

i know this thread is old, but i was redirected here from a newer one and since this one is much complex i dont want to post in the other one the thanks :P

for me will be useful and i guess a bump will be good too :P

 

 

First of all use this little thing called fullstop ".", and this little thing called comma ",".

Secondly, did you bump a 1 year old topic just to say thanks? JESUS!

Posted

First of all use this little thing called fullstop ".", and this little thing called comma ",".

Secondly, did you bump a 1 year old topic just to say thanks? JESUS!

http://www.maxcheaters.com/forum/index.php?topic=184194.0

http://www.maxcheaters.com/forum/index.php?topic=77872.0

 

And also the code is messed up, because you deleted one of his checks.

So not only you leeched his code, but you even did it in the wrong way.

 

. . . .

 

why to post there since this one is much complex ?

and no i didnt bump it for thanks, i bump it for ppl like me that may find it useful.

 

and btw my emoticon > ur "fullstop"

dont play smart since u cant handle it ;)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Tell a Škoda 1.4 driver that a Škoda 1.8 is faster — and suddenly, you’re riding a mini race car. On the way, they might share random stories — gas prices, the perfect BBQ recipe, or how passengers once called them “just for a minute.” Maybe even how someone left a suitcase full of money in their car once.     The important part? You’ll get there on time, no delays.     Vibe SMS works just as fast — messages fly like that driver who just heard their 1.8 isn’t the fastest.     🌐 https://vibe-sms.net/ 📲 https://t.me/vibe_sms  
    • ⚔️ The Grand Opening Has Arrived! ⚔️ In just a few hours the gate to the eternal battlefield will be open and the war between Order and Chaos will be set once again ! Its time to claim your destiny 🔥 👉 Register now and join the fight today! 🌐 https://l2ovc.com register now : https://l2ovc.com The gates are open the war between Order and Chaos has officially started! 🔥 Join the battlefield NOW and claim your destiny in Order vs Chaos! 💥 Don’t fall behind your faction needs you. ➡️ https://l2ovc.com  
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • Don’t miss the new Telegram gifts with our Telegram Stars purchasing bot! A great opportunity to invest in a stable digital asset at an early stage while the market is still forming. Buy other existing gifts in the official store using Telegram Stars, pay for subscriptions, donate to games and projects, pay for Premium subscriptions, and react to messages in channels! Low prices, multiple payment options, and other cool unique features! ⚡ Try it today — SOCNET STARS BOT ⚡ Active links to SOCNET stores: Digital Goods Store (Website): Go Store Telegram Bot: Go – convenient access to the store via Telegram messenger. ⭐ Telegram Stars Purchase Bot: Go – fast and profitable way to buy stars in Telegram. SMM Panel: Go – promote your social media accounts. We present to you the current list of promotions and special offers for purchasing our products and services: 1️⃣ Promo code OCTOBER2025 (8% discount) for purchases in our store (Website, bot) in October! You can also use the promo code SOCNET (15% discount) for your first purchase. 2️⃣ Get $1 on your store balance or a 10–20% discount — just write your username after registration on our website using the template: "SEND ME BONUS, MY USERNAME IS..." — post it in our forum thread! 3️⃣ Get $1 for your first SMM Panel trial — simply open a ticket titled “Get Trial Bonus” on our website (Support). 4️⃣ Weekly ⭐ Telegram Stars giveaways in our Telegram channel and in our Telegram Stars bot! News: ➡ Telegram Channel: https://t.me/accsforyou_shop ➡ WhatsApp Channel: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord Server: https://discord.gg/y9AStFFsrh Contacts and Support: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock