Jump to content

Question

Posted (edited)

I have code, tips that why not working?

 

i click tiara and nothing...

 

 

Trailer.java

package l2ro.gameserver.model.instances;

import l2ro.gameserver.model.Player;
import l2ro.gameserver.templates.npc.NpcTemplate;

public final class CustomTrainer extends NpcInstance
{
	private static final long serialVersionUID = 5938813598479742068L;
	
	public CustomTrainer(int objectId, NpcTemplate template)
	{
		super(objectId, template);
	}
	
	@Override
	public void onBypassFeedback(Player player, String command)
	{
		if (!canBypassCheck(player, this))
		{
			return;
		}
		if (command.equalsIgnoreCase("learn"))
		{
			player.sendMessage("Your gender has been changed !!");
		}
		else
		{
			super.onBypassFeedback(player, command);
		}
	}
	
	@Override
	public boolean isNpc()
	{
		return true;
	}
	
}

NPC xml

<npc id="53000" template_id="37006" name="Skill Trainer" title="Skill Trainer">
		<set name="aggroRange" value="0" />
		<set name="ai_type" value="CharacterAI" />
		<set name="baseAtkRange" value="40" />
		<set name="baseCON" value="43" />
		<set name="baseCritRate" value="40" />
		<set name="baseDEX" value="30" />
		<set name="baseHpMax" value="2444.468" />
		<set name="baseHpRate" value="1" />
		<set name="baseHpReg" value="7.5" />
		<set name="baseINT" value="21" />
		<set name="baseMAtk" value="780" />
		<set name="baseMAtkSpd" value="500" />
		<set name="baseMDef" value="382" />
		<set name="baseMEN" value="20" />
		<set name="baseMpMax" value="1345.8" />
		<set name="baseMpReg" value="2.7" />
		<set name="basePAtk" value="1303" />
		<set name="basePAtkSpd" value="253" />
		<set name="basePDef" value="471" />
		<set name="baseRunSpd" value="120" />
		<set name="baseSTR" value="40" />
		<set name="baseShldDef" value="0" />
		<set name="baseShldRate" value="0" />
		<set name="baseWIT" value="20" />
		<set name="baseWalkSpd" value="80" />
		<set name="collision_height" value="60.00" />
		<set name="collision_radius" value="20.0" />
		<set name="level" value="70" />
		<set name="rewardExp" value="0" />
		<set name="rewardRp" value="0" />
		<set name="rewardSp" value="0" />
		<set name="shots" value="NONE" />
		<set name="texture" value="" />
		<set name="type" value="CustomTrainer" />
		<!-- <set name="type" value="Npc" /> -->
		<attributes>
			<defence attribute="fire" value="150" />
			<defence attribute="water" value="150" />
			<defence attribute="wind" value="150" />
			<defence attribute="earth" value="150" />
			<defence attribute="holy" value="150" />
			<defence attribute="unholy" value="150" />
		</attributes>
	</npc>

53000.htm

<html noscrollbar>
<body>
<title>Open Beta Store</title>
<table border=0 cellpadding=0 cellspacing=0 width=292 height=358 background="l2ui_ct1.Windows_DF_TooltipBG">
	<tr>
		<td align=center>
			<br>
			<table cellpadding=0 cellspacing=0>
				<tr>
					<td align=center width=290 height=12>
						<font color="AAAAAA">Hello %nick%</font>
						<br>
					</td> 
				</tr>
				<tr>
					<td align=center>
						<font color="AAAAAA">This is a free shop for just for Beta Test.</font>
					</td> 
				</tr>
				<tr>
					<td align=center>
					<br>
						<img src="L2UI.SquareGray" width=290 height=1>
					</td> 
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td align=center>
			<table cellspacing=0 cellpadding=0>
				<tr>
					<td align=center>
						<table cellspacing=0 cellpadding=0 border=0 width=128 height=128 valign=top background="L2UI_CH3.Icon.refinegrade2_00">
							<tr>
								<td height=33></td><td></td>
							</tr>
							<tr>
								<td width=3></td>
								<td width=32 height=32 align=center >
									<table border=0 cellspacing=0 cellpadding=0 width=32 height=32 background="icon.accessory_noblesse_tiara_i00">
										<tr>
											<td width=32 height=32 align=center valign=top>
												<button action="bypass -h CustomTrainer learn" width=34 height=34 back="L2UI_CT1.ItemWindow_DF_Frame_Down" fore="L2UI_CT1.ItemWindow_DF_Frame"/>
											</td>
										</tr>
									</table>
									<font name=CREDITTEXTNORMAL>Addd RandomSkill</font>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
</center>
</body>
</html>
Edited by Heroic9614

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

Bypass seems wrong, such style normally is used for quests / scripts. Instance npc use bypass -h %getObjectId%_learn or so, typing from memory :P

 

And you miss showChatWindow / getHtmlPatch? Check other instances, the structure.

Edited by SweeTs
  • 0
Posted (edited)

Instance - https://pastebin.com/2mqfFCPA put your htm into custom folder. The inNpc() method is not necessary, I guess.

 

Bypass - checked L2Ro htm and seems like the npc bypass looks like, but it's not as a button

[npc_%objectId%_learn|Press me]

Button

<button value="Press me" action="bypass npc_%objectId%_learn" width=34 height=34 back="L2UI_CT1.ItemWindow_DF_Frame_Down" fore="L2UI_CT1.ItemWindow_DF_Frame">
Edited by SweeTs
  • 0
Posted (edited)

http://imgur.com/a/VqSwG

 

 

this is problem... :/

[21.07.17 14:11:43:018]  WARN model.Player: Direct access to bypass: npc_268436770_learn / Player: Test
[21.07.17 14:11:43:550]  WARN model.Player: Direct access to bypass: npc_268436770_learn / Player: Test
[21.07.17 14:11:43:730]  WARN model.Player: Direct access to bypass: npc_268436770_learn / Player: Test
[21.07.17 14:11:43:895]  WARN model.Player: Direct access to bypass: npc_268436770_learn / Player: Test
[21.07.17 14:11:44:081]  WARN model.Player: Direct access to bypass: npc_268436770_learn / Player: Test
[21.07.17 14:11:44:248]  WARN model.Player: Direct access to bypass: npc_268436770_learn / Player: Test
[21.07.17 14:11:44:433]  WARN model.Player: Direct access to bypass: npc_268436770_learn / Player: Test
[21.07.17 14:11:44:574]  WARN model.Player: Direct access to bypass: npc_268436770_learn / Player: Test
Edited by Heroic9614

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

    • ⚡ Fast delivery & verified quality! Enjoy uninterrupted Google AI One for up to 18 months.
    • We are officially opening! Grand Opening: Saturday, 19 September at 16:00 (Greek time — server time). Server is now in TEST/BETA phase → everything will be alive & complete at opening. == WHY YOU SHOULD BE THERE AT 16:00 ==  Rates 9300x EXP / 3000x SP / 5500x Adena — fast start, non-stop action Gracia Final — the real, nostalgic line-up. Like L2 Pride, but fresh & stable No wipe, no close, 24/7 with AntiDoss protection  Safe Enchant +3 · Max Enchant +25 Drop 1x — epic drops feel EPIC == AT OPENING (19/9, 16:00) == - Full server live ceremony: everyone starts in the world together - Community events & giveaways announced LIVE on Discord - Forum + support fully active == GET READY ==  Download the client: https://l2aquila.com/downloads.html Install guide (3 steps, 2 minutes): https://l2aquila.com/install-guide.html  Join Discord to be there at launch: https://discord.gg/5ZyBRvG4k == Countdown is running on the site: https://l2aquila.com == Be part of L2Aquila from the very first minute. 
    • support for new protocols https://imgur.com/PhwtEEX https://imgur.com/Dyul5wt
    • TOPSERVERS200 is a platform for promoting Lineage 2 projects and helping players discover new servers. Add your server, announce your upcoming launch, and compete in the TOP 200 rankings. ━━━━━━━━━━━━━ ◆ ━━━━━━━━━━━━━ TOPSERVERS200 FEATURES   📅 Launch Announcements - announce your new server and attract players both before and after its launch. 🏆 TOP 200 - earn votes from players and climb the Lineage 2 server rankings. 🌐 Server Page - chronicles, rates, launch dates, descriptions, reviews, and other key information about your server. 📺 Lineage 2 Streams - player streams from Twitch, YouTube, and Kick collected in a dedicated section of the platform. 📢 Promotion - VIP placement, banner advertising, and additional options to increase your project's visibility.   ━━━━━━━━━━━━━ ◆ ━━━━━━━━━━━━━ AVAILABLE GAMES   Lineage 2 • Minecraft • World of Warcraft • GTA 5 • MuOnline • SAMP • Perfect World   ━━━━━━━━━━━━━ ◆ ━━━━━━━━━━━━━ LINEAGE 2 ON TOPSERVERS200   Current servers, upcoming launches, rankings, and player reviews - all gathered in one section. VIEW LINEAGE 2 SERVER RANKINGS
    • L2Elite is still around fortunately or unfortunately, Archon I don't remember, RaceSupremacy was such a cool server, I really enjoyed my time there I was playing Grand Khavatary there, Core i've played also but I have no memory of it, one other server I really enjoyed was L2Total I remember a glitch/bug I found there where before clicking ok on exchanging goldbars to adena you would spam screenshot and it would duplicate the item, loved it.
  • 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..