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

    • just with this extender that I have shared it is not possible to start with c4 client, you have to make some changes to the extender and it works with c4 client perfectly. regarding the updates in this last revision   🔹dll is not packaged with vmprotect   New custom zone types have been added: 🔹 NO_NOBLESS begin MinX=84638 MaxX=92616 MinY=-87170 MaxY=-82018 MinZ=-6000 MaxZ=0 Type=NO_NOBLESS KickOutPos=83007/148057/-3464 end   ▶️ This zone checks if the character is noble. If it does not meet the condition, it will be automatically kicked to the indicated position (KickOutPos). 🔹 CUSTOM_SPAWN_ZONE begin MinX=77275 MaxX=85704 MinY=10122 MaxY=18066 MinZ=-8000 MaxZ=5000 Type=CUSTOM_SPAWN_ZONE OutPos=83007/148057/-3464 Spawns={{82984/18066/-5256}};{{79275/15147/-5248}};{{82922/14263/-5256}};{{83704/10122/-5288}} end ▶️ This zone allows characters, upon death, to respawn with full buff, CP, HP and MP if they press “Fixed”. They will only be able to revive in one of the positions defined in Spawns. 🔧 Both zones are fully configurable from territorydata.txt
    • Could you tell me what changed in this update?   more one question: Is it possible to log in through the c4 client instead of interlude? That would be great  
    • ➡ Discount for your purchase: JULY2025 (11% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: JULY2025 (11% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
  • 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