Λοιπόν, εδώ και πολλές μέρες έψαχνα πώς να κάνω στο διάλογο του NPC να λέει το όνομα του χαρακτήρα π.χ: Hello 'name'! Ζήτησα βοήθεια και απο L2J , μου έδωσαν ένα κωδικό να τον βάλω αλλά δεν ξέρω που ακριβώς, ορίστε τι μου είπαν:
You have as basis the source file "net.sf.l2j.gameserver.model.actor.L2Npc.java" with the function "onBypassFeedback". If you created a new extension of L2Npc class, then you have to override this function, otherwise you have to handle it in this way:
Κώδικας:
# NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
# html.setFile("HERE THE PATH TO THE HTM FILE");
# html.replace("%playername%", player.getName());
# player.sendPacket(html);
Now you will be answered by the npc with the htm file but replacing the plain text %playername% in this file transformed into the player name.
You can add as many replacements as you want.
Τους είπα πως δεν γινόταν τίποτα και μου είπε να σιγουρευτώ αν το NPC μου είναι L2Npc , και πάλι...δεν δουλεύει.
Αν κάποιος έχει καμία ιδέα και μπορεί να με βοηθήσει θα το εκτιμούσα πολύ!
Ευχαριστώ!
Υ.Γ: Αν πειράζει που έκανα επικόληση αυτά που μου είπαν η παραβίασα κάποιον κανόνα , ζητώ συγνώμη.
Hello, dear friends, we are the GAMEMONEY in-game currency store. We offer adena, donation coins, and items from all top projects. Please contact us with any questions.
DISCORD - GODDARDSHOP
Perhaps I misexpressed myself. What I meant to say is that this back accessory only has animations for male warriors, and there are no animations for back accessories of other races. I would like to know how to add animations for other races to complete this back accessory
Question
Sindelia
Καλησπέρα!
Λοιπόν, εδώ και πολλές μέρες έψαχνα πώς να κάνω στο διάλογο του NPC να λέει το όνομα του χαρακτήρα π.χ: Hello 'name'! Ζήτησα βοήθεια και απο L2J , μου έδωσαν ένα κωδικό να τον βάλω αλλά δεν ξέρω που ακριβώς, ορίστε τι μου είπαν:
You have as basis the source file "net.sf.l2j.gameserver.model.actor.L2Npc.java" with the function "onBypassFeedback". If you created a new extension of L2Npc class, then you have to override this function, otherwise you have to handle it in this way:
Κώδικας:
# NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
# html.setFile("HERE THE PATH TO THE HTM FILE");
# html.replace("%playername%", player.getName());
# player.sendPacket(html);
Now you will be answered by the npc with the htm file but replacing the plain text %playername% in this file transformed into the player name.
You can add as many replacements as you want.
Τους είπα πως δεν γινόταν τίποτα και μου είπε να σιγουρευτώ αν το NPC μου είναι L2Npc , και πάλι...δεν δουλεύει.
Αν κάποιος έχει καμία ιδέα και μπορεί να με βοηθήσει θα το εκτιμούσα πολύ!
Ευχαριστώ!
Υ.Γ: Αν πειράζει που έκανα επικόληση αυτά που μου είπαν η παραβίασα κάποιον κανόνα , ζητώ συγνώμη.
10 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now