Jump to content

Recommended Posts

Posted

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.

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

    • Hello community, I’d like to share an improved version of the L2smr editor for StaticMeshes, focused on solving some workflow issues I found in the original tool. CreditsThis project is based on the original acmi/L2smr repository https://github.com/acmi/L2smr , created by acmi, and I updated it to Java 17 with some additional features. Issues in the original L2smr Too many windows: each StaticMesh opened in a new one → cluttered desktop. No search: navigating through hundreds of StaticMeshActors was slow and tedious. Added improvements Flexible views Single Window Mode: reuse one window instead of opening new ones. Multiple Window Mode: still available for those who prefer having several views open simultaneously. Real-time Search Field Instant filtering as you type. Case-insensitive search. “Reset” button to quickly clear the search.     Installation and Execution: Clone the repository: git clone https://github.com/Jeep12/l2smr.git cd l2smr        2.Build the project:   ./gradlew build        3. Run the application:     ./run.bat      Or simply double-click on run.bat.     The run.bat script automatically extracts JavaFX from the included javafx-17.0.2.zip file in the javafx/ directory, sets up the required libraries, and launches the application. You don’t    need to install JavaFX separately.      Repository: https://github.com/Jeep12/l2smr     Maybe these features already existed in another version or fork, and they might not be very big changes, but since I didn’t know about them and found them necessary, I decided to          implement them myself and wanted to share them.      
    • no....Mobius L2Clientdat and L2FileEditor can do that...but still cant works with TaiWanese Grand Crusade ,especially Armorgrp.dat and Armorgrp-Classic.dat
    • L2GOLD - Halcyon x45 Project Classic Interlude   C6 - Classic Interlude: Protocol 110     Is a complete copy of L2Gold in Classic [110 Protocol] with L2OFF files.   Fully L2Gold Features - Daily Quest - Daily Mining Quest - Ancient Weapons -Refine System  -Rebirth System -Fully configurable everything you want -Gold stats/Gold skills/Gold items working 100% -Zones 100% alike  -Unique donations system (npc or voicedcommand .donate) - On Enchant success announcement ( if +16 for weapon, 8 for armor , 7 for jewel) - Announce of Castle Lord - Announce of Hero  - Olympiad Max A grade - Olympiad Buffs on matches changed to Gold Alike - Working fully Dreadbane   - AI Mods: Static Time for RB   Automated Events: Squash Watermelon RB Event High rate  (those are fully automated)   Server is running a Test Server: Online to anyone can test it.   Game Client: https://www.mediafire.com/file/1d8xe18rvgi04lx/L2_Classic_Interlude_Client_V2.rar/file   Game Patch: https://www.mediafire.com/file/3z4b8ezy93h2z1g/L2Halcyon+Gold+Patch.rar/file   GM Accounts: ID: root pass root [ accounts go from  root1 until root20 ]   Regular Accounts Registrations: http://84.247.164.27/?page=register   Some Screenshots: https://imgur.com/a/o7TxzTN   Contact me here via PM (only serious buyers).    Price of the product: Fully Server Pack + Source ( 250 Euros )
    • ✨ A Service with Vibes  Vibe SMS ✨   Vibe SMS is not just a platform for working with numbers. We’ve built it to be simple, convenient, and stress-free, so your tasks get done without hassle. We value real communication: we listen to your ideas, provide support, and make sure everyone feels calm and confident. With us, you’re not just a client  you’re part of a space built on trust, support, and a human touch. Vibe SMS is a place where people matter and where we create an atmosphere you’ll want to stay in.   Website link — https://vibe-sms.net/ Our Telegram channel — https://t.me/vibe_sms
  • 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