Jump to content
  • 0

[Help]How to use a method, via html.


Question

Posted

Guys, i am working on a new kind of voiced command for teleport, and i have created a method in my voiced command file. I want to use this method, via html. What i mean? When i press the button teleport on html, the action it will do, will be written on my java file for voiced command. Like other teleport htmls, they say action: _goto x. How can i do that, please?

12 answers to this question

Recommended Posts

  • 0
Posted

bump. sorry for making another bump today, i just modified the whole post, i solved the previous problem, and since it's about the same thing, i decided not to make a new post...

  • 0
Posted

Guys, i am working on a new kind of voiced command for teleport, and i have created a method in my voiced command file. I want to use this method, via html. What i mean? When i press the button teleport on html, the action it will do, will be written on my java file for voiced command. Like other teleport htmls, they say action: _goto x. How can i do that, please?

you can build an new html via java and can use teleToLocation method instead of make a new html file.
  • 0
Posted

you can build an new html via java and can use teleToLocation method instead of make a new html file.

no it has nothing to do with teletolocation, it's a completely different thing. and i want to have the html on 'soft' mode not hard coded :P so users will be able to edit that...

  • 0
Posted

Don't quite understand but do you mean  like this where you click button and it teleports you? you want to know the html code for it? well here that is:

 

<a action="bypass -h npc_%objectId%_goto 9900" msg="811;Gludin Arena">Gludin Arena - 1 Olympiad Token</a>

 

or for actual buttons like in L2J admin menu:

 

<button value="To Town" action="bypass -h npc_%objectId%_goto 1111" width=150 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">

 

 

  • 0
Posted

Don't quite understand but do you mean  like this where you click button and it teleports you? you want to know the html code for it? well here that is:

 

<a action="bypass -h npc_%objectId%_goto 9900" msg="811;Gludin Arena">Gludin Arena - 1 Olympiad Token</a>

 

or for actual buttons like in L2J admin menu:

 

<button value="To Town" action="bypass -h npc_%objectId%_goto 1111" width=150 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">

 

 

pff no. if you can understand, this _goto 1111 is a method in L2TeleporterInstance(if i am right) file. i have created a new method and i want to use it instead of _goto, for example:

<button value="To Town" action="bypass -h npc_%objectId%_OLYMPUS" width=150 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">

  • 0
Posted

I told you, edit L2TeleporterInstance and create new bypass.

hmm w8 going to try this... and i tell you again. sorry i didn't see your first post :P

 

EDIT:

        if (actualCommand.equalsIgnoreCase("teleport"))
        {
    	int idx,idy,idz;
	if (name.equalsIgnoreCase("Giran")) {
		idx = 83400;
		idy = 147943;
		idz = -3404; }
	else if (name.equalsIgnoreCase("Aden")) {
		idx = 146331;
		idy = 25762;
		idz = -2018; }
	else { 
		idx=0;
		idy=0;
		idz=0;
	}
		String val = command.substring(17);
		st = new StringTokenizer(val);
		if (st.countTokens() == 1)
		{
			String names = st.nextToken();
			if(name != null)
			{
				String num = st.nextToken();
	               player.teleToLocation(idx, idy, idz, true);
			}
		}
}

here is my bypass. i tested it and it doesn't work. maybe i have to add sth else too in it? i added this after:

                if (10 >= minPrivilegeLevel) // NOTE: Replace 10 with privilege level of player
                doTeleport(player, whereTo);
                else player.sendMessage("You don't have the sufficient access level to teleport there.");
                return;
            }
        }

  • 0
Posted

pff no. if you can understand, this _goto 1111 is a method in L2TeleporterInstance(if i am right) file. i have created a new method and i want to use it instead of _goto, for example:

<button value="To Town" action="bypass -h npc_%objectId%_OLYMPUS" width=150 height=21 back="L2UI_ct1.button_df" fore="L2UI_ct1.button_df">

 

why you wanna create a new method instead of goto..lawl.., anyway just add bypass

  • 0
Posted

Just make sure to insert new bypass in correct place.

 

L2TeleporterInstance.java

 

There is void:

 

	@Override
public void onBypassFeedback(L2PcInstance player, String command)
{

        }

 

And for example now add test bypass:

 

		else if (command.startsWith("TestLol"))
	{
		player.sendMessage("it works, lol!");
	}

 

Now use this bypass at html (only for NPC's with L2Teleporter Type, since its L2TeleporterInstance)

 

Simple and clear.

 

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

    • If you’re juggling mixed payment methods and tricky setups, I’ve found that easing the pressure on the subscription side can make the whole flow smoother. I started using Subscription Revenue Growth for handling my own recurring payments, upgrades, and all that messy churn stuff, and it took a big weight off. Pairing something stable for subs with your gateway setup can keep cashflow from going off the rails.
    • L2Avalon launches February 20 High Five project (Salvation client) focused on classic world progression — not instance spam and not “twink” metas. What is L2Avalon? L2Avalon is built around real Lineage 2 gameplay: farming spots, open world conflict, raids, epics, economy and competition. No Kamael Reduced instanced content **Discord:** https://discord.gg/NbM2cXmAem 🌐 **Website:** https://l2avalon.net Balance & Economy Every class is tuned to be viable in PvE and PvP Off-meta classes get buffed instead of adding power-creep garbage Adena-based economy Farming matters: boosted Drop/Spoil for each stage of progression Rates & Settings Dynamic XP: 50x (Lv 1–40) → 1x (Lv 78+) Staged progression with new content unlocking weekly Adena / Drop / Spoil: 3x / 5x / 5x NPC Buffer: 2 hours (Premium: 3 hours) Box limit: 2+1 windows per PC MP potion: 1000 MP, 10s cooldown Free2Play System (earn Donate Coins by playing) You don’t have to donate to progress. Donate Coins drop in-game, so everything is achievable through playtime and activity. Where Donate Coins drop: Mobs Lv 76+, Raid Bosses Lv 70+, Epic Bosses Auto-farm (controlled) Limit: only 1 window can use auto-farm at the same time Daily time: 1 hour/day without Premium Extra tickets: purchasable with PC Bang points (earned by being online) Disabled zones: CC / IT / FOG / VARKA / KETRA Equipment Changes Reworked set bonuses Reworked SA system Enchanted set bonuses Enchanted shirt bonuses Fake Epic jewelry (weakened alternative) Skills (High Five mechanics) New skills added Old skills updated New enchant branches + updated existing ones Subclass skills Clan skills Daily Activities (solo-friendly) Events / Missions / Instances Stages Soon — stage schedule and weekly unlocks will be published February 20 — we start. **Discord:** https://discord.gg/NbM2cXmAem 🌐 **Website:** https://l2avalon.net
    • Hello MxC community, i want to buy client dev / patch maker services for the client of salvation. Im using L2jeternity multiprotocol (h5-salvation 140). I want a Patch full optimized for the h5 content. Everything that is not needed must be removed, as well as some textures like maps for example should be also adjusted to h5 content. If you know anyone that can take the job feel free to contact me here or in Discord. Only professional work.   Discord: ch4osroxas   Thank you very much!
    • Hi dude, i`m in the same way of nawaro, leaning how to edit interfaces, could u help me too?
  • 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..

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