Price Guide V3

Posts 1630 of 50 · Page 2 of 4
Ok. Approved.
Ok. Thanks
Quote Originally Posted by marinepower View Post
Yes sir, I do. Probably 30 minutes to an hour when you have the images. The hard part would be getting the actual images, so I would wait until @UltraN00b finished his rotmg image exporter.

Or, you could go to this site and grab them from there:
https://forums.wildshadow.com/wiki/r...-god/equipment
oh you meant something like this

Quote Originally Posted by RotMGnub View Post
Thanks

Almost done, just gotta fix Dcircle

Yeah that makes it look better
Just a friendly word of advice:

An example line is as follows:
T8&Fire Dagger&1 Speed&dagger

Here's what I would do:
Code:
String entireFile = readFile("your ******* url");
String[] lines = entireFile.split("\n");
Map<String, ArrayList<Item>> itemMap = new TreeMap<String, ArrayList<Item>>();
for(int x=1;x<lines.length;x++)
{
String[] segments = lines[x].split("&");//[T8,Fire Dagger,1 Speed,dagger];
String identifier = segments[3];
ArrayList<Item> itemList = null;
if(itemMap.contains(identifier))
{
itemList = itemMap.get(identifier);
}
else
{
itemList = new ArrayList<Item>();
itemMap.put(identifier, itemList);
}
itemList.add(new Item(segments[0], segments[1], segments[2]);
}
Now, you have a map of identifiers and arraylist items.

This helps, because now you can do something like this:
Code:
for(String key : itemMap.keySet())
{
Button b = new Button(key);
b.addActionListener(this);
}
And in
Code:
actionPerformed(ActionEvent e){
Button b = (Button)e.getSource()l
ArrayList<Item> items = itemMap.get(b.getName());
System.out.println("Printting "+b.getName());
printItemList(items);
}
Hope this helps.
Quote Originally Posted by marinepower View Post
Just a friendly word of advice:

An example line is as follows:
T8&Fire Dagger&1 Speed&dagger

Here's what I would do:
Code:
String entireFile = readFile("your ******* url");
String[] lines = entireFile.split("\n");
Map<String, ArrayList<Item>> itemMap = new TreeMap<String, ArrayList<Item>>();
for(int x=1;x<lines.length;x++)
{
String[] segments = lines[x].split("&");//[T8,Fire Dagger,1 Speed,dagger];
String identifier = segments[3];
ArrayList<Item> itemList = null;
if(itemMap.contains(identifier))
{
itemList = itemMap.get(identifier);
}
else
{
itemList = new ArrayList<Item>();
itemMap.put(identifier, itemList);
}
itemList.add(new Item(segments[0], segments[1], segments[2]);
}
Now, you have a map of identifiers and arraylist items.

This helps, because now you can do something like this:
Code:
for(String key : itemMap.keySet())
{
Button b = new Button(key);
b.addActionListener(this);
}
And in
Code:
actionPerformed(ActionEvent e){
Button b = (Button)e.getSource()l
ArrayList<Item> items = itemMap.get(b.getName());
System.out.println("Printting "+b.getName());
printItemList(items);
}
Hope this helps.
Very helpful, I did not know about some of the methods or anything about Maps
uhmm... how can i open it, i can't cause its just a java file D:
Quote Originally Posted by _eXtremeXTech_ View Post
uhmm... how can i open it, i can't cause its just a java file D:
Instal java on windows and you should be able to open it..
on linux/ubuntu. instal java sdk 8 then open terminal write java -jar and drop jar file on it
Quote Originally Posted by RotMGnub View Post
It was just a lot of code. The number of lines over tripled with GUI added.
I looked at the source, you could have easily made this all with only ~30 lines (disregarding GUI code) as well as add a search.
Why did you choose the structure you're going with?
It's a terrible thing, competing against java.

I think it's time I delve into learning it.

But I like it. Good job.
Quote Originally Posted by RotMGnub View Post
Very helpful, I did not know about some of the methods or anything about Maps
Very ill see where it takes me
Dude, this is amazing.. you need more likes on this download.. :l
Quote Originally Posted by _eXtremeXTech_ View Post
uhmm... how can i open it, i can't cause its just a java file D:
@_eXtremeXTech_
make a text document and paste this in
Code:
start javaw -jar PriceGuide.jar
then save it as a .bat
keep it in the same directory as the .jar guide
really cool release, it will come in handy!
lol, very good man, thanks.
Posts 1630 of 50 · Page 2 of 4

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?