Jump to content

Recommended Posts

Posted

Hello folks,

Index:net.sf.l2j.gameserver.handlers.[b]voicecommandhandlers[/b]
========================================================
/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/

package handlers.voicedcommandhandlers;

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

/**
*
*@author Jve
*
*/
public class Pvp implements IVoicedCommandHandler
{
    private static final String[] VOICED_COMMANDS = { "pvp" };

    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
    {   
       
        if (command.equalsIgnoreCase("pvp"))
        {          
             if(activeChar.isInJail())
            {
                activeChar.sendMessage("Sorry, you cant use this command,you are in Jail");
                return false;
            }
            else if(activeChar.isInOlympiadMode())
            {
                activeChar.sendMessage("Sorry,you cant use this command,you are in the Olympiad now");
                return false;
            }
                    
            else if(activeChar.atEvent)
            {
                activeChar.sendMessage("Sorry,you cant use this command,you are in an event");
                return false;
            }
            else  if (activeChar.isInDuel())
            {
                activeChar.sendMessage("Sorry,you cant use this command,you are in a duel");
                return false;
            }
            else if (activeChar.inObserverMode())
            {
               activeChar.sendMessage("Sorry,you cant use this command,you are in the observation.");
               return false;
            }
               
               activeChar.teleToLocation(your X, your y, your Z);
               activeChar.sendMessage("You have been teleported to PvP zone");
        }
        return true;
    }
    public String[] getVoicedCommandList()
    {
        return VOICED_COMMANDS;
    }
}

Index:net.sf.l2j.gameserver.gameserver.Java

==========================================

+import net.sf.l2j.gameserver.handler.voicedcommandhandlers.pvp;

 

import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Wedding;

 

 

_voicedCommandHandler.registerVoicedCommandHandler(new Banking());

 

+_voicedCommandHandler.registerVoicedCommandHandler(new pvp());

 


Note:I did this share according to TheEnd's guide

you just press .pvp and it teleports you to your locations(actually you have to put your pvp locations to be nice),as you can see it has restrictions.

Thats all,

I know its pretty pretty simple to make something like that,but ok someone maybe need it for his server.

 

Posted

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.

 

. . . .

Posted

@Coyote:I think he created in his own without seeing that one..

 

Read TheEnd's "sendMessage()" messages, and read his.

Read TheEnd's int values and read his.

 

And last proof, TheEnd included some more stuff in his code. Jve deleted them, so the code does not work as supposed now.

To be more specific:

 

else if (activeChar.inObserverMode())
           {
              activeChar.sendMessage("Sorry,you cant use this command,you are in the observation.");
         
              int placex;
              int placey;
              int placez;
              
              placex = [b]<--Put your PvP Loc area[/b];
              placey = [b]<--Put your PvP Loc area[/b];
              placez = [b]<--Put your PvP Loc area[/b];
              
              activeChar.teleToLocation(placex, placey, placez);
    activeChar.sendMessage("You have been teleported to PvP zone");
       }

 

Do you know what will be the result of this?

Posted

It's a pvp or a teleport command?

 

@Coyote:I think he created in his own without seeing that one..

Its a teleport command,i make as .pvp beacuse you can put your own pvp's location area

press .pvp and it ports you to your location.

@Coyote i dint leach anyone and nothing.

Posted

y i make it according to TheEnd's guide >.>

but i did some edits.

 

Mate, the only thing you edited was the authorship and the name of the code..

You even removed some basic checks and made the code wrong..

Now, the player will be teleported to this PvP Area, only while he is observing the Olympiad..

 

If you really want to practice your Java skills, then start with your own codes.

Even if they are small in size, even if they are useless, you have to know that we all started in this way..

Posted

Mate, the only thing you edited was the authorship and the name of the code..

You even removed some basic checks and made the code wrong..

Now, the player will be teleported to this PvP Area, only while he is observing the Olympiad..

 

If you really want to practice your Java skills, then start with your own codes.

Even if they are small in size, even if they are useless, you have to know that we all started in this way..

ah,yes i know

but actualy i did practise even if you dont bealive i read again and again TheEnd's guide and i did this. :D

Btw i ll do what you told me,be sure for this.

Posted

Replace it with that

Index:net.sf.l2j.gameserver.handlers.[b]voicecommandhandlers[/b]
========================================================
/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/

package handlers.voicedcommandhandlers;

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

/**
*
*@author Jve
*
*/
public class Pvp implements IVoicedCommandHandler
{
    private static final String[] VOICED_COMMANDS = { "pvp" };

    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
    {   
       
        if (command.equalsIgnoreCase("pvp"))
        {          
             if(activeChar.isInJail())
            {
                activeChar.sendMessage("Sorry, you cant use this command,you are in Jail");
                return false;
            }
            else if(activeChar.isInOlympiadMode())
            {
                activeChar.sendMessage("Sorry,you cant use this command,you are in the Olympiad now");
                return false;
            }
                    
            else if(activeChar.atEvent)
            {
                activeChar.sendMessage("Sorry,you cant use this command,you are in an event");
                return false;
            }
            else  if (activeChar.isInDuel())
            {
                activeChar.sendMessage("Sorry,you cant use this command,you are in a duel");
                return false;
            }
            else if (activeChar.inObserverMode())
            {
               activeChar.sendMessage("Sorry,you cant use this command,you are in the observation.");
               return false;
            }
               
               activeChar.teleToLocation(your X, your y, your Z);
               activeChar.sendMessage("You have been teleported to PvP zone");
        }
        return true;
    }
    public String[] getVoicedCommandList()
    {
        return VOICED_COMMANDS;
    }
}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Looking to hire a skilled L2J developer or team to build a custom private server for solo play with advanced server-side AI bots. This is NOT for public launch — just a self-hosted project where I can simulate a full L2 experience alone or with a few friends. 🔹 What I Need A private L2J server ( High Five preferred, newer versions can work as well) with bots that: Farm 24/7 on their own (solo or in bot parties) Can be invited into party and follow basic orders (attack, follow, res, heal, etc.) Are able to join Olympiad, fight with proper logic (per class), and rank up Can coordinate for Raid Bosses (check spawn, move, assist, heal, DPS, etc.) Act like real players: town routines, rebuffing, restocking, even chatting if possible Have different roles: tanks, healers, nukers, archers, etc. Can interact through simple in-game commands or NPC interface 🔹 Your Job Set up the server and geodata Integrate a scalable bot system (written in Java or scriptable) Write clean, modular AI behavior (farming, PvP, party play, raid logic, etc.) Allow me to control/assign bots easily (in-game or config) Bonus: basic UI or GM panel for bot config 🔹 Payment Serious budget for serious work PayPal, crypto, or preferred method Project-based or hourly, negotiable Milestone-based OK 🔹 Contact Send me: Your experience with L2J or similar projects Any bot/AI systems you've built before Estimated timeframe Pricing expectations
    • Yeah, it’s wild how much gambling has changed. When I was growing up, even scratch-off tickets felt like a big thing, but now with so many casino apps and betting sites, it’s just everywhere. I know a few people who got caught up in online slots during lockdown and really struggled to stop, just because it was always on their phone.   I stick to in-game stuff like skin trading for games like CS2 or Dota, which to me feels less risky, especially if you know the value of the items. If you’re curious how these trades work or want to see some guides, just visit website—there’s a lot of info about trading without real gambling involved.
    • Yea, his work is amazing, very well done designs, but the timing is not really his thing. I’m waiting for logo and launcher design since December 2024, so 10 days is not really that much lol
    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market Auto Buy Store  : https://utchihamkt.mysellauth.com/ Not sure if we’re legit? Check Our server — real reviews, real buyers https://discord.gg/uthciha-servicess  | https://campsite.bio/utchihaamkt  
  • 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