ProxDox Posted April 28, 2015 Share Posted April 28, 2015 Haven't scripted for 1.5 years now so how do i check if my player is in the area with this current api? Quote Link to comment Share on other sites More sharing options...
Apaec Posted April 28, 2015 Share Posted April 28, 2015 Area a = new Area(x,y,x,y); if (a.contains(myPlayer()) { //blah } Quote Link to comment Share on other sites More sharing options...
ProxDox Posted April 28, 2015 Author Share Posted April 28, 2015 (edited) Area a = new Area(x,y,x,y); if (a.contains(myPlayer()) { //blah } One more, back in the day we had selectinventoryoption what is it now? Edited April 28, 2015 by ProxDox Quote Link to comment Share on other sites More sharing options...
Apaec Posted April 28, 2015 Share Posted April 28, 2015 One more, back in the day we had selectinventoryoption what is it now? select inventory option? not sure what that's trying to do. Perhaps you mean interacting with an item in ur inventory? inventory.interact(this.inventory.getSlot("item name"), "Use"); Quote Link to comment Share on other sites More sharing options...
ProxDox Posted April 28, 2015 Author Share Posted April 28, 2015 (edited) select inventory option? not sure what that's trying to do. Perhaps you mean interacting with an item in ur inventory? inventory.interact(this.inventory.getSlot("item name"), "Use"); Yeha that helped me thanks just one more x.D can you give an example of getting the distance between player and grounditem Edited April 28, 2015 by ProxDox Quote Link to comment Share on other sites More sharing options...
Apaec Posted April 28, 2015 Share Posted April 28, 2015 Yeha that helped me thanks just one more x.D can you give an example of getting the distance between player and grounditem GroundItem g = new GroundItem("name"); int dist = map.distance(g); i think Quote Link to comment Share on other sites More sharing options...
Joseph Posted April 28, 2015 Share Posted April 28, 2015 select inventory option? not sure what that's trying to do. Perhaps you mean interacting with an item in ur inventory? inventory.interact(this.inventory.getSlot("item name"), "Use"); Why you give him ugly code getInventory().getItem("item name").interact("action"); Quote Link to comment Share on other sites More sharing options...