Nilinking Posted October 19, 2010 Posted October 19, 2010 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? Quote
Sindelia Posted October 19, 2010 Author Posted October 19, 2010 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. Quote
Sindelia Posted October 19, 2010 Author Posted October 19, 2010 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. Quote
Nilinking Posted October 19, 2010 Posted October 19, 2010 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) Quote
Sindelia Posted October 19, 2010 Author Posted October 19, 2010 I don't see why it won't work for you. :S Quote
Nilinking Posted October 19, 2010 Posted October 19, 2010 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 :) Quote
JustPr0 Posted October 22, 2010 Posted October 22, 2010 hmm.. i need it .. thank's and good work ;) Quote
roy.rm Posted October 29, 2010 Posted October 29, 2010 Can I show html in Chat Window more large, or can I choose the size ?, Quote
Sindelia Posted October 29, 2010 Author Posted October 29, 2010 Can I show html in Chat Window more large, or can I choose the size ?, I'm afraid you can't java-side. Quote
raimonbrinks Posted November 16, 2010 Posted November 16, 2010 oO thanks share sure i will use this Quote
lexua Posted November 17, 2010 Posted November 17, 2010 Thanks :) i try and i love this thing :) Quote
Recommended Posts
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.