L2JMobius

High Five Introducing Ghost Services

mastermind007 · 35 · 1279

Online GuruGel

  • Knight
  • ***
    • Posts: 91
I noticed that when I try to use the Recall command on traders through the admin panel, they just disappear from the game. How to fix this?


Online Stayway

  • Grand Duke
  • *****
    • Posts: 754
    • http://l2ahyura.com
Since we use java 25,
For xml editor you should replace it "_" as var to other name e.g
Code: [Select]
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {}

SwingUtilities.invokeLater(() -> new XmlEditor().setVisible(true));
}

And may here too you use
Code: [Select]
private void updateItemFromForm() {
int row = itemTable.getSelectedRow();
if (row != -1) {
Item sel = itemDataList.get(row);

When you have it itemTable.setAutoCreateRowSorter(true); so for it I think you should convert the indice
Code: [Select]
private void updateItemFromForm() {
int viewRow = itemTable.getSelectedRow();

if (viewRow != -1) {
int modelRow = itemTable.convertRowIndexToModel(viewRow);
Item sel = itemDataList.get(modelRow);

sel.mincount = txtMin.getText();
sel.maxcount = txtMax.getText();
sel.buylow = txtBuyL.getText();
sel.buyhigh = txtBuyH.getText();
sel.selllow = txtSellL.getText();
sel.sellhigh = txtSellH.getText();
sel.level = txtLvl.getText();
}
}
is just a idea may works better


Online mastermind007

  • Heir
  • **
    • Posts: 20
I noticed that when I try to use the Recall command on traders through the admin panel, they just disappear from the game. How to fix this?

You don't. The traders do have a character record in the DB but there are not a full blown character. Add to that, they are running a stripped down client-less method.
If you want to change the random spawn locations. Look in the GhostShopManager.jave file. In the createGhostShopRandom() are the X Min/Max and Y Min/Max that stets up the various box locations. Just take a character and do a /loc command at the opposite corners of whatever box you want to create.
If it ain't broke, you're not trying hard enough.


Online mastermind007

  • Heir
  • **
    • Posts: 20
Since we use java 25,
For xml editor you should replace it "_" as var to other name e.g
Code: [Select]
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {}

SwingUtilities.invokeLater(() -> new XmlEditor().setVisible(true));
}

And may here too you use
Code: [Select]
private void updateItemFromForm() {
int row = itemTable.getSelectedRow();
if (row != -1) {
Item sel = itemDataList.get(row);

When you have it itemTable.setAutoCreateRowSorter(true); so for it I think you should convert the indice
Code: [Select]
private void updateItemFromForm() {
int viewRow = itemTable.getSelectedRow();

if (viewRow != -1) {
int modelRow = itemTable.convertRowIndexToModel(viewRow);
Item sel = itemDataList.get(modelRow);

sel.mincount = txtMin.getText();
sel.maxcount = txtMax.getText();
sel.buylow = txtBuyL.getText();
sel.buyhigh = txtBuyH.getText();
sel.selllow = txtSellL.getText();
sel.sellhigh = txtSellH.getText();
sel.level = txtLvl.getText();
}
}
is just a idea may works better

I am sure that would be better. I knocked that out in about 20 minutes  and did not put any polish on it. Had some people ask about an easy way to edit the shops XML and that's what I came up with. Personally I have the data in a SQL database and built the XML output using SQL procedures, but I know not everyone is fluent in SQL.

Thanks for taking the time to write up the suggestion.
If it ain't broke, you're not trying hard enough.


Online mastermind007

  • Heir
  • **
    • Posts: 20
I created a version of the ghost services for Interlude. 
Wish there was a way to add multiple chronicle tags to a post. It there is I did not see it.
If it ain't broke, you're not trying hard enough.