Jump to content
  • 0

[HELP]Custom Death Statistic


Question

12 answers to this question

Recommended Posts

  • 0
Posted

Some serverpacks from here have this or something like that whit command .stats ... try to see on a pack who is shared here whit source code.

 

correct. search for dodie methode on pcinstance, there are several ways to complete it.

  • 0
Posted

On death get object of player that killed you (L2PcInstance) and from this object.. for example:

 

L2PcInstance killer;

killer.getName();

killer.getMaxHp();

 

And now include those in html window.

  • 0
Posted

Look, for of all you should at least show us what have you tried already.

 

Its request dev HELP, not request ready CODE .. :)

 

Show us a little personal effort to do it.

 

Most simple way if you really don't know how to start (instead of asking for ready code)

 

- check dev share section (codes)

 

- find similar share with your ide (for example you need something that will show html window)

 

- practise and try to remake it (for your own purposes)

 

or for example, take a look at L2J source.. think a bit, where it could be used already?

 

oh yeah, showing welcome html window at player enter..

 

So now check EnterWorld.java and check how does showing html window work.

  • 0
Posted

Look, for of all you should at least show us what have you tried already.

 

Its request dev HELP, not request ready CODE .. :)

 

Show us a little personal effort to do it.

 

Most simple way if you really don't know how to start (instead of asking for ready code)

 

- check dev share section (codes)

 

- find similar share with your ide (for example you need something that will show html window)

 

- practise and try to remake it (for your own purposes)

 

or for example, take a look at L2J source.. think a bit, where it could be used already?

 

oh yeah, showing welcome html window at player enter..

 

So now check EnterWorld.java and check how does showing html window work.

0k thanks can lock topic!

  • 0
Posted

Topic Locked as requested.

 

Anyway, if you still can't find sollution about how to do it, pm me to unlock this thread

 

and I will show you sample code.

 

Till now, topic locked, hope you will do it by yourself.

 


 

UNLOCKED.

 

As we can see you gave up after a few minutes, but since I said I will show you example, I will:

 

	public void showWindow(L2PcInstance player)
{
	TextBuilder tb = new TextBuilder();
	tb.append("<html><title>Test</title><body><center><br>");
	tb.append("Welcome <font color=LEVEL>" + player.getName() + "</font>!<br>");
	tb.append("</body></html>");


	NpcHtmlMessage msg = new NpcHtmlMessage(this.getObjectId());
	msg.setHtml(tb.toString());
	msg.replace("%objectId%", String.valueOf(this.getObjectId()));

	player.sendPacket(msg);
}

 

Now use this method (where you wish)

 

And you will see new htm window with your name (as a example)

 

Now you will need the same but with object of your killer, not you, and with this object get infos:

 

hp etc.

  • 0
Posted

	public void showWindow(L2PcInstance player, L2Character killer)
{
	TextBuilder tb = new TextBuilder();
	tb.append("<html><title>Death Panel</title><body><center><br>");
	tb.append("Player <font color=LEVEL>" + player.getName() + "</font>!<br>");
	tb.append("Killer <font color=LEVEL>" + killer.getName() + "</font>!<br>");
	tb.append("CP Max <font color=LEVEL>" + killer.getMaxCp() + "</font> | Current CP <font color=LEVEL>"+ killer.getCurrentCp() + "</font>!<br>");
	tb.append("HP Max <font color=LEVEL>" + killer.getMaxHp() + "</font> | Current HP <font color=LEVEL>"+ killer.getCurrentHp() + "</font>!<br>");
	tb.append("MP Max <font color=LEVEL>" + killer.getMaxMp() + "</font> | Current MP <font color=LEVEL>"+ killer.getCurrentMp() + "</font>!<br>");
	tb.append("</body></html>");


	NpcHtmlMessage msg = new NpcHtmlMessage(this.getObjectId());
	msg.setHtml(tb.toString());
	msg.replace("%objectId%", String.valueOf(this.getObjectId()));

	player.sendPacket(msg);
}

 

should do the trick

Guest
This topic is now closed to further replies.


  • Posts

    • I’ve worked with a web designer Tacoma before, and it really reminded me how much smoother projects run when design and development stay in sync. Your setup looks solid, and pairing clean UI work with steady backend support can save a ton of back‑and‑forth later. If you ever decide to push harder on conversions or need outside perspective on structure, that mix helped me spot gaps early on.
    • 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!
  • 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