botutils: uses click instead of moveclick for mouse handling
This commit is contained in:
parent
a8f279a5d6
commit
05ef84c58c
|
@ -25,7 +25,7 @@ import ProjectVersions.openosrsVersion
|
|||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
version = "3.2.0"
|
||||
version = "3.3.0"
|
||||
|
||||
project.extra["PluginName"] = "BotUtils"
|
||||
project.extra["PluginDescription"] = "Illumine - Utils required for plugins to function with added automation"
|
||||
|
|
|
@ -262,7 +262,7 @@ public class BotUtils extends Plugin
|
|||
}
|
||||
|
||||
@Nullable
|
||||
public NPC findNearestAttackableNpcWithin(WorldPoint worldPoint, int dist, String... names)
|
||||
public NPC findNearestAttackableNpcWithin(WorldPoint worldPoint, int dist, String name)
|
||||
{
|
||||
assert client.isClientThread();
|
||||
|
||||
|
@ -272,15 +272,14 @@ public class BotUtils extends Plugin
|
|||
}
|
||||
|
||||
return new NPCQuery()
|
||||
.nameContains(names)
|
||||
.isWithinDistance(worldPoint, dist)
|
||||
.filter(npc -> npc.getInteracting() == null && npc.getHealthRatio() != 0)
|
||||
.filter(npc -> npc.getName() != null && npc.getName().toLowerCase().contains(name) && npc.getInteracting() == null && npc.getHealthRatio() != 0)
|
||||
.result(client)
|
||||
.nearestTo(client.getLocalPlayer());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public NPC findNearestNpcTargetingLocal(String... names)
|
||||
public NPC findNearestNpcTargetingLocal(String name)
|
||||
{
|
||||
assert client.isClientThread();
|
||||
|
||||
|
@ -290,8 +289,7 @@ public class BotUtils extends Plugin
|
|||
}
|
||||
|
||||
return new NPCQuery()
|
||||
.nameContains(names)
|
||||
.filter(npc -> npc.getInteracting() == client.getLocalPlayer() && npc.getHealthRatio() != 0)
|
||||
.filter(npc -> npc.getName() != null && npc.getName().toLowerCase().contains(name) && npc.getInteracting() == client.getLocalPlayer() && npc.getHealthRatio() != 0)
|
||||
.result(client)
|
||||
.nearestTo(client.getLocalPlayer());
|
||||
}
|
||||
|
@ -725,7 +723,7 @@ public class BotUtils extends Plugin
|
|||
assert !client.isClientThread();
|
||||
|
||||
Point point = getClickPoint(rectangle);
|
||||
moveClick(point);
|
||||
click(point);
|
||||
}
|
||||
|
||||
public void moveClick(Point p)
|
||||
|
@ -822,7 +820,7 @@ public class BotUtils extends Plugin
|
|||
assert !client.isClientThread();
|
||||
|
||||
Point point = new Point(client.getCenterX() + getRandomIntBetweenRange(min, max), client.getCenterY() + getRandomIntBetweenRange(min, max));
|
||||
moveClick(point);
|
||||
click(point);
|
||||
}
|
||||
|
||||
public void delayClickRandomPointCenter(int min, int max, long delay)
|
||||
|
@ -858,7 +856,7 @@ public class BotUtils extends Plugin
|
|||
clickRandomPointCenter(-200, 200);
|
||||
return;
|
||||
}
|
||||
moveClick(point);
|
||||
click(point);
|
||||
}
|
||||
|
||||
public void handleMouseClick(Rectangle rectangle)
|
||||
|
@ -866,7 +864,7 @@ public class BotUtils extends Plugin
|
|||
assert !client.isClientThread();
|
||||
|
||||
Point point = getClickPoint(rectangle);
|
||||
handleMouseClick(point);
|
||||
click(point);
|
||||
}
|
||||
|
||||
public void delayMouseClick(Point point, long delay)
|
||||
|
@ -1300,7 +1298,7 @@ public class BotUtils extends Plugin
|
|||
assert !client.isClientThread();
|
||||
|
||||
targetMenu = new MenuEntry("", "", item.getId(), MenuOpcode.ITEM_DROP.getId(), item.getIndex(), 9764864, false);
|
||||
moveClick(item.getCanvasBounds());
|
||||
click(item.getCanvasBounds());
|
||||
}
|
||||
|
||||
public void dropItems(Collection<Integer> ids, boolean dropAll, int minDelayBetween, int maxDelayBetween)
|
||||
|
@ -1629,7 +1627,7 @@ public class BotUtils extends Plugin
|
|||
boolean depositBox = isDepositBoxOpen();
|
||||
targetMenu = new MenuEntry("", "", (depositBox) ? 1 : 2, MenuOpcode.CC_OP.getId(), item.getIndex(),
|
||||
(depositBox) ? 12582914 : 983043, false);
|
||||
moveClick(item.getCanvasBounds());
|
||||
click(item.getCanvasBounds());
|
||||
}
|
||||
|
||||
public void depositAllOfItem(int itemID)
|
||||
|
|
|
@ -1 +1 @@
|
|||
[{"projectUrl":"https://discord.gg/9fGzEDR","provider":"illumine","name":"BotUtils","description":"Illumine - Utils required for plugins to function with added automation","id":"botutils-plugin","releases":[{"date":"2020-08-10","sha512sum":"C51B3CA404A2C80F101EE771F5C7BF49C389C03826E61E6C751F6AA3270019F4FB93D5FEE1E0DCCCB87F9383D154E3D8EE5042E72AF261214A6C74DF69A00C3C","version":"3.2.0","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/botutils-3.2.0.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/9fGzEDR","provider":"illumine","name":"Combination Runecrafter Plugin","description":"Illumine - Combination Runecrafting plugin","id":"combinationrunecrafterplugin-plugin","releases":[{"date":"2020-08-10","sha512sum":"E5BCD2881199F3B916CB115E70DE29900051A4F3CA84FA7B0048B31DAB18504A43FF4E0187BDDB0B31E0584EC6BC7E26443D75113B67E7327B0A2E602A23DD97","version":"1.2.3","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/combinationrunecrafter-1.2.3.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/9fGzEDR","provider":"illumine","name":"Magic Splasher","description":"Illumine automated magic splasher","id":"magicsplasher-plugin","releases":[{"date":"2020-08-10","sha512sum":"26BCDDDF8636DFB4655A74698CDB36707E960B09CFEDD61DB9DBE2F1F86E89754C864F623E0CA96F49F69A5A4B1618E667F7096BEDA8D1FF8B72FE1E7307CE63","version":"2.1.3","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/magicsplasher-2.1.3.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/9fGzEDR","provider":"illumine","name":"Power Skiller","description":"Illumine auto power skiller plugin","id":"powerskiller-plugin","releases":[{"date":"2020-08-10","sha512sum":"D468E4DBAA1BAA057562D239A14D56F19B7E2DA395A08EA61B09D09F914B692C7213B2834ADD5CD277D97461823949871EAB079AAC0487F16769AE02E816DA65","version":"3.7.5","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/powerskiller-3.7.5.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/9fGzEDR","provider":"illumine","name":"Quick Eater","description":"Illumine - auto eat food below configured HP","id":"quickeater-plugin","releases":[{"date":"2020-08-10","sha512sum":"752E3D1C1B43464D74A28EC91BF60B95BA5BA395C669D56F6FBAD25B9229018FC355D1DC3C65132833003F9B009D729C859F1C37CDD1CBD8374D2A9C03B59DC8","version":"2.4.0","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/quickeater-2.4.0.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/9fGzEDR","provider":"illumine","name":"Rooftop Agility","description":"Illumine automated rooftop agility plugin","id":"rooftopagility-plugin","releases":[{"date":"2020-08-10","sha512sum":"FD51FBFD8F4D73B3D5F20343859B57D7FCD8BFD748E84FF0CF1CF9E98486850B1A1062500741E8185E4C4FBDC692CB57E6C4D24E8E57743458CBE6B0A2D712BE","version":"3.0.2","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/rooftopagility-3.0.2.jar?raw=true","requires":"0.0.1"}]}]
|
||||
[{"projectUrl":"https://discord.gg/9fGzEDR","provider":"illumine","name":"BotUtils","description":"Illumine - Utils required for plugins to function with added automation","id":"botutils-plugin","releases":[{"date":"2020-08-14","sha512sum":"BAF3A722C8EEB5A314A56DA3665C62D17B709B39668610591479BEB5FCF37D2B6D8686FBD9DB1CD210A001BC4D3034C89BA81699CC476A646EABE19C130F4DD2","version":"3.3.0","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/botutils-3.3.0.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/9fGzEDR","provider":"illumine","name":"Combination Runecrafter Plugin","description":"Illumine - Combination Runecrafting plugin","id":"combinationrunecrafterplugin-plugin","releases":[{"date":"2020-08-14","sha512sum":"E5BCD2881199F3B916CB115E70DE29900051A4F3CA84FA7B0048B31DAB18504A43FF4E0187BDDB0B31E0584EC6BC7E26443D75113B67E7327B0A2E602A23DD97","version":"1.2.3","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/combinationrunecrafter-1.2.3.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/9fGzEDR","provider":"illumine","name":"Magic Splasher","description":"Illumine automated magic splasher","id":"magicsplasher-plugin","releases":[{"date":"2020-08-14","sha512sum":"26BCDDDF8636DFB4655A74698CDB36707E960B09CFEDD61DB9DBE2F1F86E89754C864F623E0CA96F49F69A5A4B1618E667F7096BEDA8D1FF8B72FE1E7307CE63","version":"2.1.3","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/magicsplasher-2.1.3.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/9fGzEDR","provider":"illumine","name":"Power Skiller","description":"Illumine auto power skiller plugin","id":"powerskiller-plugin","releases":[{"date":"2020-08-14","sha512sum":"D468E4DBAA1BAA057562D239A14D56F19B7E2DA395A08EA61B09D09F914B692C7213B2834ADD5CD277D97461823949871EAB079AAC0487F16769AE02E816DA65","version":"3.7.5","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/powerskiller-3.7.5.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/9fGzEDR","provider":"illumine","name":"Quick Eater","description":"Illumine - auto eat food below configured HP","id":"quickeater-plugin","releases":[{"date":"2020-08-14","sha512sum":"752E3D1C1B43464D74A28EC91BF60B95BA5BA395C669D56F6FBAD25B9229018FC355D1DC3C65132833003F9B009D729C859F1C37CDD1CBD8374D2A9C03B59DC8","version":"2.4.0","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/quickeater-2.4.0.jar?raw=true","requires":"0.0.1"}]}, {"projectUrl":"https://discord.gg/9fGzEDR","provider":"illumine","name":"Rooftop Agility","description":"Illumine automated rooftop agility plugin","id":"rooftopagility-plugin","releases":[{"date":"2020-08-14","sha512sum":"FD51FBFD8F4D73B3D5F20343859B57D7FCD8BFD748E84FF0CF1CF9E98486850B1A1062500741E8185E4C4FBDC692CB57E6C4D24E8E57743458CBE6B0A2D712BE","version":"3.0.2","url":"https://github.com/illumineawake/illu-plugins/blob/master/release/rooftopagility-3.0.2.jar?raw=true","requires":"0.0.1"}]}]
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue