Hey, i am working on custom npc, that will show private store list of players, by selected category. Example if i select category dagger weapons, npc will show list of available shops with dagger type weapons. I have a little problem, when there is no shops in world, the "No items to show" msg is not shown in npc htm. Maybe someone would know what is bad? For me it's pretty hard.
else if (currentCommand.startsWith("category"))
{
String categoryName = st.nextToken();
final StringBuilder sb = new StringBuilder(200);
for (Player storeChar : World.getInstance().getPlayers())
{
if (storeChar.isInStoreMode() && storeChar.getStoreType() == StoreType.SELL)
{
for (TradeItem i : storeChar.getSellList().getItems())
{
if (categoryName.startsWith("dagger"))
{
if(i.getItem().getItemType() == WeaponType.DAGGER){
sb.append("<tablewidth=240height=42><tr>");
sb.append("<tdwidth=32height=32align=center><imgsrc=Icon.item"+i.getItem().getItemId()+"width=32height=32></td>");
sb.append("<td>" + i.getItem().getName() + "</td>");
sb.append("</tr><tr><tdheight=7></td></tr></table>");
}
else{
sb.append("No items to show");
}
}
}
}
final NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
html.setFile("data/html/auctioneerManager/categoryView.htm");
html.replace("%objectId%", getObjectId());
html.replace("%items%", sb.toString());
player.sendPacket(html);
}
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.
I've been using this for 2 years now with no issues from Discord. I don't use ogg.dll either. This one works with any l2.exe too; I don’t see any difference between them.
hmm.. ok i just see that, is different code first of all. My sources is totally different based in other way, with else libraries.
I have access to modify everything even to make the clock to stop show how many time users play in server.
1) so maybe keep some personal info more hide.
2) i dont use ogg.dll
3) i create it and give it ready + support to install it.
Plus what is mine can working with what ever .exe you want not just l2 with same simple method.
And i am sure if you try this source to compile it, after 3 hours discord will like shadowban your API too
thats my source
Video how to adapt it:
Download for TEST Overlay: https://mega.nz/file/g60nQJIY#i98dP3ma-t3Qh39cFItDBuORLp9lH-jfEXxxXyU4nPE
( if not working try to rename from system/l2 to l2.exe ) <-- Its possible to skip this step with custom made launcher
Download CFF Explorer: https://ntcore.com/explorer-suite/
( required to link .dll with l2.exe to test it )
Price : 50 euro for Discord Overlay
Price : 20 euro for Window Name
Discord : ojsaras
You purchase compiled files with the name and your details one time !
Question
admirolas3
Hey, i am working on custom npc, that will show private store list of players, by selected category. Example if i select category dagger weapons, npc will show list of available shops with dagger type weapons. I have a little problem, when there is no shops in world, the "No items to show" msg is not shown in npc htm. Maybe someone would know what is bad? For me it's pretty hard.
8 answers to this question
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.