Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved A few bugs...

Java Warlord
Joined
Nov 17, 2014
Messages
4,906
1) When an item is added, the InventoryListener calls the item added method twice, sometimes 3 times (I am pretty sure I don't do anything wrong)

2) Grandexchange price checker does not work well, for example Wine of Zamorak, which is like 3k gp, is 5k gp when I grab the price over the API

3)

Traversal.getDefaultWeb().getPathBuilder().buildTo(TEMPLE).step(true);

Throws a NullPointerException at some points, even if there is no blockage on the way to the spot.
 
Last edited:
Author of MaxiBots
Joined
Dec 3, 2013
Messages
6,770
3. The web isn't perfect so even though there may not have been any obstacles, some positions won't be able to generate a path.
What you should be doing is storing the path before performing step on it so that you can null check the path. If the path is null you can then use the same logic with regionpath or bresenhampath to build a path and traverse it.

@Cloud
 
Java Warlord
Joined
Nov 17, 2014
Messages
4,906
3. The web isn't perfect so even though there may not have been any obstacles, some positions won't be able to generate a path.
What you should be doing is storing the path before performing step on it so that you can null check the path. If the path is null you can then use the same logic with regionpath or bresenhampath to build a path and traverse it.

@Cloud
okay good idea, I will try it :)

Edit:
@Aidden I am now doing this, but now it takes the character ages to move each step.
 
Last edited:
Engineer
Joined
Jul 28, 2013
Messages
2,776
okay good idea, I will try it :)

Edit:
@Aidden I am now doing this, but now it takes the character ages to move each step.
Then there is something wrong with your script that is preventing it from stepping quickly.
1) When an item is added, the InventoryListener calls the item added method twice, sometimes 3 times (I am pretty sure I don't do anything wrong)

2) Grandexchange price checker does not work well, for example Wine of Zamorak, which is like 3k gp, is 5k gp when I grab the price over the API

3)

Traversal.getDefaultWeb().getPathBuilder().buildTo(TEMPLE).step(true);

Throws a NullPointerException at some points, even if there is no blockage on the way to the spot.
1. I'll investigate although I think it is unlikely. The events will be called again however if you logout and log back in, however item removed events will also have been called when you logged out.
2. We rely on a 3rd party service for getting item prices, so unfortunately that's out of our control for the near future.
 
Author of MaxiBots
Joined
Dec 3, 2013
Messages
6,770
Then there is something wrong with your script that is preventing it from stepping quickly.

1. I'll investigate although I think it is unlikely. The events will be called again however if you logout and log back in, however item removed events will also have been called when you logged out.
2. We rely on a 3rd party service for getting item prices, so unfortunately that's out of our control for the near future.
Iirc defeat3d had the same issue with the inventory listener a week or two ago
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
The update that fixes this has been released, can you please verify it has been resolved.
 
Top