TheMcPker 74 Share Posted May 19, 2017 Hey i have a few small questions about Player's 1. is it possible to check what armor someone else is wearing? and if so how? 2. How do i check for example what item (string/Id) is in a certain equipment slot any help is greatly appriciated Link to comment Share on other sites More sharing options...
Ayylmao42000 6 Share Posted May 19, 2017 https://dreambot.org/javadocs/org/dreambot/api/wrappers/interactive/composite/PlayerComposite.html getAppearance() Link to comment Share on other sites More sharing options...
floon 9 Share Posted May 19, 2017 Are you writing a looter? Yes Link to comment Share on other sites More sharing options...
floon 9 Share Posted May 19, 2017 this is not your thread, are you themcpker, multilogger? wtf ban I'm just confused why you thought he was writing a looter cause he asked how to check what people are wearing. Link to comment Share on other sites More sharing options...
Time 10 Share Posted May 19, 2017 If you keep track of what ppl loose on death and their death time/tile you can probably increase profit p/h rather than just looting what you see idk if time lost waiting when you could be gathering and who is to say the killer did not pick up all items. Link to comment Share on other sites More sharing options...
Time 10 Share Posted May 19, 2017 you can set a timer to when loot will appear and stick arround that area if potential loot value is high Yeah that is true but the downside of that is a lot of people pick up valuable items. Although just getting the food sometimes is a good 10-15k. Link to comment Share on other sites More sharing options...
LogicSoup 92 Share Posted May 20, 2017 Hey i have a few small questions about Player's 1. is it possible to check what armor someone else is wearing? and if so how? 2. How do i check for example what item (string/Id) is in a certain equipment slot any help is greatly appriciated Snippet needs some work. Sample private List<String> getOthersEquipment(Player p) { List<String> equipmentList = new LinkedList<String>(); if(p != null) { int[] equipment = p.getComposite().getApperance(); for (int i = 0; i < equipment.length; i++) { if (equipment[i] - 512 > 0) equipmentList.add(ItemDefinition.forId(equipment[i] - 512).getName()); } } return equipmentList; } ItemDefinition is from a different api so u will need to find a workround in this API. i cba rlly. Found off-site enjoy Data int[] equipment = p.getComposite().getApperance(); Index Order: [0] = helmet [1] = cape [2] = necklace [3] = weapon [4] = chest [5] = shield [7] = legs [9] = gloves [10] = boots - Can only grab visible items (no ring or ammo, etc.) - Each value from getAppearance() needs to have 512 subtracted from it in order to get the item id let me know if it helps Link to comment Share on other sites More sharing options...
Hashtag 8706 Share Posted May 20, 2017 Snippet needs some work. Sample private List<String> getOthersEquipment(Player p) { List<String> equipmentList = new LinkedList<String>(); if(p != null) { int[] equipment = p.getComposite().getApperance(); for (int i = 0; i < equipment.length; i++) { if (equipment[i] - 512 > 0) equipmentList.add(ItemDefinition.forId(equipment[i] - 512).getName()); } } return equipmentList; } ItemDefinition is from a different api so u will need to find a workround in this API. i cba rlly. Found off-site enjoy Data int[] equipment = p.getComposite().getApperance(); Index Order: [0] = helmet [1] = cape [2] = necklace [3] = weapon [4] = chest [5] = shield [7] = legs [9] = gloves [10] = boots - Can only grab visible items (no ring or ammo, etc.) - Each value from getAppearance() needs to have 512 subtracted from it in order to get the item id let me know if it helps Nice. You could try to use new Item(id - 512).getName() The Item constructor had 2 other params but I can't remember them and I'm on mobile so :shrug:. Link to comment Share on other sites More sharing options...
LogicSoup 92 Share Posted May 21, 2017 Nice. You could try to use new Item(id - 512).getName() The Item constructor had 2 other params but I can't remember them and I'm on mobile so :shrug:. Item(int itemId, int stack, org.dreambot.core.Instance instance) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.