Jump to content

Recommended Posts

Posted

You can do "your" share in one line

"find "showChatWindow" method from L2NpcInstance and add

"html.replace("%pname%", String.valueOf(player.getName()));"

"

 

bro that isnt wornking for me... mmmm Gracia epilogue servers dont have the showChatWindow method on L2NpcInstance, instead it is on L2Npc, i added the code in there but... is not working XD i want to make this code global, like: if i write %name% in any html it returns the activeChar name... any ideas?

Posted

corect i forgot it !...can i make this for interlude and ι combining with the welcome msg??

 

As far as I know, Interlude doesn't have that welcome msg by default so, I guess it's a custom mod. Maybe I could help you on a PM if u gave me your enterworld.java, paste it on http://pastebin.com.

Posted

bro that isnt wornking for me... mmmm Gracia epilogue servers dont have the showChatWindow method on L2NpcInstance, instead it is on L2Npc, i added the code in there but... is not working XD i want to make this code global, like: if i write %name% in any html it returns the activeChar name... any ideas?

 

Didn't work for me either but I found the way. ;) (It's global but ONLY for NPC dialogues)

 

L2NPC:

// Send a Server->Client NpcHtmlMessage containing the text of the L2NpcInstance to the L2PcInstance
	NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
	html.setFile(player.getHtmlPrefix(), filename);
	html.replace("%pname%", String.valueOf(player.getName()));

 

Sorry for double post.

Posted

ive added some modifications to my L2Npc.java... here they are:

 

	public void showChatWindow(L2PcInstance player, String filename)
{
	// Send a Server->Client NpcHtmlMessage containing the text of the L2NpcInstance to the L2PcInstance 
	NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
	html.setFile(player.getHtmlPrefix(), filename);
	html.replace("%objectId%", String.valueOf(getObjectId()));
+		html.replace("%playername%", String.valueOf(player.getName()));
+		html.replace("%npcname%", getName());
	player.sendPacket(html);

 

but for some VERY ANOYING and estrange reason its not working... can someone lend me a hand with this?

 

(Gracia Epilogue Server)

 

 

EDIT:

Didn't work for me either but I found the way. ;) (It's global but ONLY for NPC dialogues)

 

L2NPC:

// Send a Server->Client NpcHtmlMessage containing the text of the L2NpcInstance to the L2PcInstance
	NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
	html.setFile(player.getHtmlPrefix(), filename);
	html.replace("%pname%", String.valueOf(player.getName()));

 

Sorry for double post.

 

Ahhh! i did that too... but i didnt make it work :S did you? can you explain it a little bit more? only npc dialogues? but i did it on a L2Npc and it isnt working :S (Npc pixie murika, ID 31852)

 

Posted

well... pixie murika is an L2NpcInstance maybe is because of that? dunno... im doing some little coding... ill edit this post if i find the problem :) tnx anyway for your atention

 

EDIT:

 

Okay ppl! i finally maked it really GLOBAL but if you want it you will need a little bit dedication and patience... this will also work for any server version and any chronicle...

 

steps:

you will need to use the search tool of eclipse, search for this:

 

player.sendPacket(html);

 

you will find around 140 matches... so now open each one of them and add this line over the another one:

 

html.replace("%playername%", String.valueOf(player.getName()));

 

be sure it looks like this:

 

html.replace("%playername%", String.valueOf(player.getName()));
player.sendPacket(html);

 

now press CONTROL+K (next match) and repeat the steps with all the matches in the Gameserver :) thats it! i did it on 15 mins XD i hope this help the comunity! and tnx to Pokiokio for this very cool and original idea :)

  • 3 weeks later...

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
Reply to this topic...

×   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

    • We've worked hard for 14 years to gather all the information for your preferred type of game server - we've put together your ideas, your suggestions, information and researches from different knowledge bases and we've made a lot of tests to make the project as good as you love it. Our goal is to create a masterpiece that everyone can enjoy. We are one of the best server and we will be forever. There are many things we did damn right in the past and we will do more in future! Because of that - you're going to see many things you have not seen before on any other servers! Our team knows what you want and what we should do! You value quality and technical excellence? You need safety and exceptional security? You seek true adventures, unique game world, exquisite and eventful game? It means you are in right place! Welcome to L2Blaze, only here you will find and enjoy real game! X150 WARFIRE INTERLUDE SPRING SEASON: 2025 APRIL 26th! Opening time: 14:00 UTC+3 Poland opening time: 13:00 UTC+2 Norway opening time: 14:00 UTC+3 UK opening time: 12:00 UTC+1 Brazil opening time: 8:00 UTC-3 OPENING BONUS Opening bonus for first 100 players who will reach 3rd class will receive VIP Coin as bonus! Automatic registration on game login window, unnecessary to register in website! Do you want stability? Lagless and bugless game? Instant support? Daily PVP? Long-Term playing? You are in the right place, time to start! How to connect STEP BY STEP: 1. Install clear Lineage2 Interlude client 2. Download our patch, delete old system folder and add our 3. Delete, turn off anti virus or add our system folder to anti virus exceptions 4. Run l2.exe from Lineage2/system 5. Enter data on login window and enjoy the game! * You have to remove, turn off or use exceptions of antivirus because of our security protection. It is not a virus. * If you have connection issues with Windows 8 or 10, press right mouse button on l2.exe icon, press Properties, choose compatibility and unmark compatibility mode. Hearts of War EVENT! Collect War Hearts from Hot Springs monsters: Yeti, Buffalo, Antelope, Bandersnatch, Atroxspawn, Flava, Nepenthes, Grendel (3%), Atrox with (6%) and Heart Breaker Boss in Hot Springs Stage 2! You can trade it, sell it or spend in shop! Raid Boss Heart Breaker spawn every 4 hours (+4 hours random) Custom Raid Boss drop list: - Raid Boss Horus, Ember and Brakki, Nakondas: 1 VIP COIN (25%) | Korim (70%). - Raid Boss Apepi, Shacram, Atraiban, Korim: 1 BEWS (10%). - Raid Boss Glaki, Olkuth: 1-2 BEAS (40%). - Raid Boss Golkonda, Galaxia: 1-3 BEAS (60%). - Raid Boss Shyeed: 1-3 BEWS (30%) | 1-7 BEAS (40%) | 1-5 TOP LS 76 (50%). - Raid Boss Shuriel: 1-7 TOP LS 76 (50%) | 1-4 BEAS (60%). - Raid Boss Ashakiel: 1-2 BEWS (30%) | 1-7 TOP LS 76 (50%) | 1-4 BEAS (75%). - Raid Boss Antharas Priest Cloe: 1-3 BEWS (30%) | 1-7 TOP LS 76 (70%). ------------------------------------------------ - Hestia: Demon Splinters / Forgotten Blande (30%). - Ember: Arcana Mace / Draconic Bow (30%). - Galaxia: Angel Slayer / Heaven's Divider (30%) Take your friends, clan, alliance, enemys, sharp your sword, clean your armors and meet your destiny at 2025 APRIL 26th! WEBSITE: http://WWW.L2BLAZE.NET
    • ➡ Discount for your purchase: APRIL (10% 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: APRIL (10% 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 
    • Refunded Too bad that you couldn't finish it on time.
  • Topics

×
×
  • Create New...