I noticed firescape v2 does not drop inventory items onto the world ground, So I made a fix and thought id share it
Tutorial Rated: Easy, just copy and past.
Base Firescape: v2.
Files used: 2
File Names: InvActionHandler.java , DropEvent.java
Open your InvActionHandler.java
find code
Code:
if(p.getID() == 147) // Drop
replace the entire if statment with this 1, This adds the item on to the world ground.
Code:
if(p.getID() == 147) // Drop
{
int idx = (int)p.readShort();
if(idx < 0 || idx >= player.getInventory().size())
{
player.setSuspicious(true);
return;
}
if(System.currentTimeMillis() - player.getLastDrop() <= 300)
return;
InvItem item = player.getInventory().get(idx);
//System.out.println("Drop Slot: "+idx);
//System.out.println("Drop Item: "+item.getId());
world.getDelayedEventHandler().add(new DropEvent(player, idx));
}
Save it.
Then open DropEvent.java
In
Code:
public void run() {
look for the code:
Add into the line:
Code:
|| !owner.getInventory().contains(item)
It should look something like this after:
Code:
if(owner.isBusy() || !owner.getInventory().contains(item)) {
owner.resetPath();
super.running = false;
return;
}
Then your all done. Yay compile and run it.