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.
Where to look for this symbol in the launch file LoginServer.bat or in the database file? Maybe someone can throw off their server that was actually launched. Or a file to register the server. I downloaded the server and inserted the MSQL password everywhere. I don't understand the rest. Help please.
GameServer.
I apologize, I managed to launch it without errors. I moved the server from the desktop to the root of the C drive and it launched without errors. Thank you very much. If anyone has the RegisterGameServer.bat file, I would be very grateful.
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.