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.

 

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
Answer this question...

×   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

    • My official facebook profile!: https://www.facebook.com/spectrumL2 Specifications: Revamped L2JACIS revision FROM the core Private project!!! Revision that has been receiving corrections for over 3 years!!! Events already installed in the revision: TVT CTF KTB PARTY FARM SPOIL EVENT CRAZY RATES TOURNAMENT TIME ZONE (INSTANCE) All working correctly!!! SIEGE ESSENTIAL FEATURES: Walls fix Gates fix Flags fix 100% functional: OLYMPIADS: Implemented settings Hero receives enchanted Weapons with equal status PvP Weapons Optional /true/false Hero can acquire all Hero Weapons Optional true/false OTHER IMPLEMENTATIONS: Teleport fixed (directly to Giran) Teleport effect classic Vip skins vip collor name Pack NPCs with effect already configured BOSES already configured Mobs already configured CLASS BALANCE SPECIAL SYSTEM We have a SPECIAL system developed for Class Balance with only 1 digit in XML %tage of configurable debuffs Player limitation system in BOSES or PvP zones BS blocking system in FLEG zones or events Among others dozens of improvements made in the review... price: 390 USD !  OBS: WE CAN CHANGE THE BANNER AND NAME OF THE SERVICE TO THE ONE OF YOUR PREFERENCE BUT THE SETTINGS MUST BE KEPT ANY CHANGES REQUIRE ADDITION        
    • Server is Online – 1,000+ Active Players! We’re excited to announce the addition of a Europe Proxy to improve connectivity for our EU players! Clans can now benefit from VIP Access to help you catch up faster. 🎯 If you're a clan leader with at least 9 active members, join our Discord and open a ticket to claim your VIP rewards!  
    • The Telegram team is rolling out a new batch of Stars-only gifts you’ll be able to mint as NFTs. Don’t miss your chance to join the next Telegram trend and earn from it! Buy Telegram Stars cheap and KYC-free 1 Star from $0.0149 (min. 50 Stars, bulk discounts available) Promo code STARS5 — 5 % off Pay any way you like: bank cards · crypto · other popular methods How to purchase: ➡Online Store — Click ➡ Telegram bot — Click Other services: ➡ SMM panel — Click Regular buyers get extra discounts and promo codes. Support: ➡ Telegram: https://t.me/solomon_bog ➡ Telegram channel: https://t.me/accsforyou_shop ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store Use these contacts to discuss wholesale orders, partnerships (current list: https://socnet.bgng.io/partners) or to become a supplier. SocNet — your shop for digital goods and premium subscriptions
  • 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