Jump to content

Recommended Posts

Posted
13 hours ago, Nightw0lf said:

http://prntscr.com/j77h2z

this is how you start this will open a window.

you register also the voiced command on the voiced handler, this is an example of what you ask the rest is up to the brain.

i think you understand me wrong mate , because i think my english is little bad .... i want to make an command for example ( .gatekeeper ) and when i use that command in chat i want to open gatekeper html just that only 

Posted
17 minutes ago, Prostyle1990 said:

i think you understand me wrong mate , because i think my english is little bad .... i want to make an command for example ( .gatekeeper ) and when i use that command in chat i want to open gatekeper html just that only 

the answer is in nightw0lf's link. try to understand what you have to change.

 

Btw, learn some basics before you continue...

Posted

i am not sure if is working but i think that you need i make you a code open html .gatekeeper can use more chat like .pageGk and can teleport and stay in same page with .tele like .tele pageId and teleId from teleports.xml list

 

/*
 * 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 net.sf.l2j.gameserver.handler.voicedcommandhandlers;

import java.util.StringTokenizer;

import net.sf.l2j.gameserver.data.xml.TeleportLocationData;
import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.PcInstance;
import net.sf.l2j.gameserver.model.location.TeleportLocation;
import net.sf.l2j.gameserver.model.zone.ZoneId;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;

public class gatekeeperCmd implements IVoicedCommandHandler
{
	private static final String[] VOICED_COMMANDS =
	{
		"gatekeeper",
		"PageGk",
		"tele"
	};
	
	@Override
	public boolean useVoicedCommand(final String command, final PcInstance activeChar, final String target)
	{
		final StringTokenizer st = new StringTokenizer(command, " ");
		int page = 0;
		int locId = 0;
		if (command.startsWith("gatekeeper"))
		{
			mainHtm(activeChar, page);
		}
		else if (command.startsWith("PageGk"))
		{
			if (st.hasMoreTokens())
			{
				page = Integer.parseInt(st.nextToken());
			}
			mainHtm(activeChar, page);
		}
		else if (command.startsWith("tele"))
		{
			if (st.hasMoreTokens())
			{
				page = Integer.parseInt(st.nextToken());
				locId = Integer.parseInt(st.nextToken());
			}
			final TeleportLocation list = TeleportLocationData.getInstance().getTeleportLocation(locId);
			Teleport(activeChar, page, list);
		}
		return true;
	}
	
	@Override
	public String[] getVoicedCommandList()
	{
		return VOICED_COMMANDS;
	}
	
	public boolean mainHtm(final PcInstance activeChar, int page)
	{
		if (activeChar == null)
		{
			return false;
		}
		
		else if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
		{
			activeChar.sendMessage("You can't use this command out of town or peace zone.");
			return false;
		}
		else
		{
			NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile("data/html/gatekeeper/customTele" + (page == 0 ? "" : "-" + page) + ".htm");
			activeChar.sendPacket(html);
			return true;
		}
	}
	
	public boolean Teleport(final PcInstance activeChar, int page, TeleportLocation list)
	{
		if (activeChar == null)
		{
			return false;
		}
		
		NpcHtmlMessage html = new NpcHtmlMessage(0);
		html.setFile("data/html/gatekeeper/customTele" + (page == 0 ? "" : "-" + page) + ".htm");
		activeChar.teleToLocation(list, 20);
		activeChar.sendPacket(html);
		return true;
		
	}
}

 

Posted
9 hours ago, tazerman2 said:

i am not sure if is working but i think that you need i make you a code open html .gatekeeper can use more chat like .pageGk and can teleport and stay in same page with .tele like .tele pageId and teleId from teleports.xml list

 


/*
 * 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 net.sf.l2j.gameserver.handler.voicedcommandhandlers;

import java.util.StringTokenizer;

import net.sf.l2j.gameserver.data.xml.TeleportLocationData;
import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.PcInstance;
import net.sf.l2j.gameserver.model.location.TeleportLocation;
import net.sf.l2j.gameserver.model.zone.ZoneId;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;

public class gatekeeperCmd implements IVoicedCommandHandler
{
	private static final String[] VOICED_COMMANDS =
	{
		"gatekeeper",
		"PageGk",
		"tele"
	};
	
	@Override
	public boolean useVoicedCommand(final String command, final PcInstance activeChar, final String target)
	{
		final StringTokenizer st = new StringTokenizer(command, " ");
		int page = 0;
		int locId = 0;
		if (command.startsWith("gatekeeper"))
		{
			mainHtm(activeChar, page);
		}
		else if (command.startsWith("PageGk"))
		{
			if (st.hasMoreTokens())
			{
				page = Integer.parseInt(st.nextToken());
			}
			mainHtm(activeChar, page);
		}
		else if (command.startsWith("tele"))
		{
			if (st.hasMoreTokens())
			{
				page = Integer.parseInt(st.nextToken());
				locId = Integer.parseInt(st.nextToken());
			}
			final TeleportLocation list = TeleportLocationData.getInstance().getTeleportLocation(locId);
			Teleport(activeChar, page, list);
		}
		return true;
	}
	
	@Override
	public String[] getVoicedCommandList()
	{
		return VOICED_COMMANDS;
	}
	
	public boolean mainHtm(final PcInstance activeChar, int page)
	{
		if (activeChar == null)
		{
			return false;
		}
		
		else if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
		{
			activeChar.sendMessage("You can't use this command out of town or peace zone.");
			return false;
		}
		else
		{
			NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile("data/html/gatekeeper/customTele" + (page == 0 ? "" : "-" + page) + ".htm");
			activeChar.sendPacket(html);
			return true;
		}
	}
	
	public boolean Teleport(final PcInstance activeChar, int page, TeleportLocation list)
	{
		if (activeChar == null)
		{
			return false;
		}
		
		NpcHtmlMessage html = new NpcHtmlMessage(0);
		html.setFile("data/html/gatekeeper/customTele" + (page == 0 ? "" : "-" + page) + ".htm");
		activeChar.teleToLocation(list, 20);
		activeChar.sendPacket(html);
		return true;
		
	}
}

 

you just helped him to raise to many questions that he dont even know how to ask he has to start from the basics good luck on that complex way to start

Posted
On 4/19/2018 at 11:16 PM, tazerman2 said:

i am not sure if is working but i think that you need i make you a code open html .gatekeeper can use more chat like .pageGk and can teleport and stay in same page with .tele like .tele pageId and teleId from teleports.xml list

 


/*
 * 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 net.sf.l2j.gameserver.handler.voicedcommandhandlers;

import java.util.StringTokenizer;

import net.sf.l2j.gameserver.data.xml.TeleportLocationData;
import net.sf.l2j.gameserver.handler.IVoicedCommandHandler;
import net.sf.l2j.gameserver.model.actor.instance.PcInstance;
import net.sf.l2j.gameserver.model.location.TeleportLocation;
import net.sf.l2j.gameserver.model.zone.ZoneId;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;

public class gatekeeperCmd implements IVoicedCommandHandler
{
	private static final String[] VOICED_COMMANDS =
	{
		"gatekeeper",
		"PageGk",
		"tele"
	};
	
	@Override
	public boolean useVoicedCommand(final String command, final PcInstance activeChar, final String target)
	{
		final StringTokenizer st = new StringTokenizer(command, " ");
		int page = 0;
		int locId = 0;
		if (command.startsWith("gatekeeper"))
		{
			mainHtm(activeChar, page);
		}
		else if (command.startsWith("PageGk"))
		{
			if (st.hasMoreTokens())
			{
				page = Integer.parseInt(st.nextToken());
			}
			mainHtm(activeChar, page);
		}
		else if (command.startsWith("tele"))
		{
			if (st.hasMoreTokens())
			{
				page = Integer.parseInt(st.nextToken());
				locId = Integer.parseInt(st.nextToken());
			}
			final TeleportLocation list = TeleportLocationData.getInstance().getTeleportLocation(locId);
			Teleport(activeChar, page, list);
		}
		return true;
	}
	
	@Override
	public String[] getVoicedCommandList()
	{
		return VOICED_COMMANDS;
	}
	
	public boolean mainHtm(final PcInstance activeChar, int page)
	{
		if (activeChar == null)
		{
			return false;
		}
		
		else if (!activeChar.isInsideZone(ZoneId.TOWN) || !activeChar.isInsideZone(ZoneId.PEACE))
		{
			activeChar.sendMessage("You can't use this command out of town or peace zone.");
			return false;
		}
		else
		{
			NpcHtmlMessage html = new NpcHtmlMessage(0);
			html.setFile("data/html/gatekeeper/customTele" + (page == 0 ? "" : "-" + page) + ".htm");
			activeChar.sendPacket(html);
			return true;
		}
	}
	
	public boolean Teleport(final PcInstance activeChar, int page, TeleportLocation list)
	{
		if (activeChar == null)
		{
			return false;
		}
		
		NpcHtmlMessage html = new NpcHtmlMessage(0);
		html.setFile("data/html/gatekeeper/customTele" + (page == 0 ? "" : "-" + page) + ".htm");
		activeChar.teleToLocation(list, 20);
		activeChar.sendPacket(html);
		return true;
		
	}
}

 

man thank you for you answer , but i already lost 1 week without any succes :( maybe can you make for me just an command like .gatekeeper and when i press .gatekeeper i want to open _bbsgatekeper html page please ? i want to use that commmand in l2mythras file witch is shared here on mxc please 

Posted
2 hours ago, SweeTs said:

I don't get it. Why would I use .gatekeeper rather than pressing directly ALT+G? I wonder.

alt + g + 1 click = 2 buttons 1 click
tele = 4 buttons
true why?????? well maybe is some old server with default cb xD somebody opens official server again!

Posted

Maybe you mean Alt + B to send Board package?
Alt + G is Admin package...

Also i'm sure that this command will be not his only problem if he run server with this knowledge.

Posted
1 hour ago, Tony360 said:

Maybe you mean Alt + B to send Board package?
Alt + G is Admin package...

Also i'm sure that this command will be not his only problem if he run server with this knowledge.

You have right alt+g its only for admin  ! now i will explain why i want to make this commands , just because i adapted this shortcuts to my interface and when i press each button just appear in chat .buffer .gatekeeper .shop etc....because commands are not implemented in java :D to open the html page for each button 

 

 

here is the pic ---------> https://ibb.co/gBW1rx <--------------

Posted
7 hours ago, Tony360 said:

Maybe you mean Alt + B to send Board package?
Alt + G is Admin package...

Also i'm sure that this command will be not his only problem if he run server with this knowledge.

yes alt+b oh i did not know alt + g is "admin package" can you tell us more about it? what it does?

 

6 hours ago, Prostyle1990 said:

You have right alt+g its only for admin  ! now i will explain why i want to make this commands , just because i adapted this shortcuts to my interface and when i press each button just appear in chat .buffer .gatekeeper .shop etc....because commands are not implemented in java :D to open the html page for each button 

 

 

here is the pic ---------> https://ibb.co/gBW1rx <--------------

but you have the code and i gave you an example you have the tools you have the materials USE them now its like having a naked lady in your bed and asking the crowd how to fuck her. ffs.

Posted
2 hours ago, Nightw0lf said:

yes alt+b oh i did not know alt + g is "admin package" can you tell us more about it? what it does?

 

Dude he said something about community and I though you and SweeTs mistakly said “G”and not “B” stop be toxic.

Posted

guys what i want to do its only to create a command for my buttons when i press button gatekeper to open "bypass _bbsgatekeeper" page but right now when i press button with gatekeper only appear in chat .gatekeeper because i have no voicedcommands maybe someone can make for me an example ? files what i use its shared here L2Mythras file  https://ibb.co/gBW1rx 

Posted

well finally i did this working for me but now i have another problem for example when i type .gk open me gatekeeper page but not in corectly dimension and open in dialog dimension that mean my original gatekeper html page its 780x512 and when i press .gk it open in 289x359 how i can fix that ?any can help ?

Posted (edited)

guys my code look like that but i dont know why in game when i use .gatekeeper appear me gk page but in a small window and not on original window maybe someone can help me please ???? 

 

 


 

package l2f.gameserver.handler.voicecommands.impl;

import l2f.gameserver.handler.voicecommands.IVoicedCommandHandler;
import l2f.gameserver.model.Player;
import l2f.gameserver.network.serverpackets.NpcHtmlMessage;

public class gatekeeper implements IVoicedCommandHandler
{

    @Override
    public boolean useVoicedCommand(String command, Player activeChar, String target)
    {
        if (!target.isEmpty())
        {


        }
        showMainPage(activeChar);
        return true;
    }


    private static void showMainPage(Player activeChar)
    {
        activeChar.sendPacket(new NpcHtmlMessage(0).setFile("scripts/services/communityPVP/gatekeeper/main.htm"));
    }

    @Override
    public String[] getVoicedCommandList()
    {
        return new String[]
        {
            "gatekeeper"
        };
    }

}


 

Edited by Prostyle1990

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

    • I would like to clarify something publicly because false statements should not go unanswered. I have absolutely no relationship, partnership, or special connection with SkyLord. Any claim suggesting otherwise is entirely unsupported and based on assumptions rather than facts. It is disappointing to see people making accusations against others without presenting a single piece of evidence. Disagreement is one thing; inventing narratives and presenting personal opinions as facts is something completely different. If someone believes I have acted improperly, they are welcome to provide verifiable proof. Until then, these allegations are nothing more than speculation and should be treated as such. I have always been responsible for my own actions and opinions, and I do not need anyone's protection, influence, or assistance to participate in any community. Making accusations without evidence does not strengthen an argumen it only damages the credibility of the person making them. It should be clarified that I have already filed a report so that action can be taken; it is not fair that a post is being distorted in the way that has been happening.  
    • I don't think there is any bias on maxcheaters, this is the only forum left of the major ones where there is an honest administration. You may have meant mmodev, where the administration really has an interest in such fakes about competitors. I am not in favor of posting other people's correspondence, where they discuss with each other how to destroy us... but I'm not going to do this and post it, it's low, I hope that people themselves will finally understand that they are behaving completely wrong and unprofessionally.
    • I am really sorry for what SkyLord is doing to you. Unfortunately, this is not an isolated problem. The same kind of attacks have been happening to me as well. From my point of view, the issue is bigger than just one person, because SkyLord works closely with UnknownSoldier, who is a moderator on MaxCheaters, and that gives them influence and protection inside the forum. This is why they attack you in the same way they attack me: with pressure, manipulation, false accusations, and attempts to damage your reputation. In my opinion, the real problem is that privileges were given to the wrong people. As long as people like this have power there, the forum cannot be trusted anymore. I just wanted to tell you that I understand what you are going through, and I stand with you. They have done the same to me.
    • Let's be clear about what's happening here. You came to this thread as a provocateur, having already created a coordinated thread on MMO-Dev and invited people who have never been our clients and never will be — because their entire approach to this industry is based on free downloads and reverse engineering other people's work. Not a single person who wrote negatively about us on MMO-Dev has ever been our customer. Not one. Meanwhile, real clients wrote there too — but you conveniently ignore those. Your goal was never objectivity. It was a deliberate smear campaign, and the pattern is transparent to anyone reading this thread. As for MMO-Dev — platforms built on facilitating hatred and settling personal scores don't tend to last. We've seen it before with Zonegame. Communities that exist to tear others down eventually turn on themselves. In the meantime, our clients are running successful projects — the kind that generate real revenue, real growth, real results. That's where our focus is and will remain. While you wait for the 58th reopening of your server, we'll be here doing what we've been doing for 20 years — working.     Haha, well, the math is flattering — thank you for doing it for us! 😄 On the AI point — you might actually be right, and we're not afraid of that. We've been adapting for 20 years already. When new tools arrive, experienced developers use them better than anyone else. AI helps us work faster, not replace us — at least for now. And when the day comes that AI can fully build, maintain, and support a complex private L2 server end-to-end — we'll be the first to embrace it. Until then, our developers are doing just fine. 😉
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..