Java Code Examples for net.runelite.api.Skill#SLAYER
The following examples show how to use
net.runelite.api.Skill#SLAYER .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SlayerPluginTest.java From plugins with GNU General Public License v3.0 | 5 votes |
@Test public void testCorrectlyCapturedTaskKill() { final Player player = mock(Player.class); when(player.getLocalLocation()).thenReturn(new LocalPoint(0, 0)); when(client.getLocalPlayer()).thenReturn(player); when(slayerConfig.taskName()).thenReturn("Dagannoth"); StatChanged statChanged = new StatChanged( Skill.SLAYER, 100, 2, 2 ); slayerPlugin.onStatChanged(statChanged); slayerPlugin.setTask("Dagannoth", 143, 143, true, 0); statChanged = new StatChanged( Skill.SLAYER, 110, 2, 2 ); slayerPlugin.onStatChanged(statChanged); assertEquals(142, slayerPlugin.getCurrentTask().getAmount()); }
Example 2
Source File: SlayerPluginTest.java From plugins with GNU General Public License v3.0 | 5 votes |
@Test public void testJadTaskKill() { final Player player = mock(Player.class); when(player.getLocalLocation()).thenReturn(new LocalPoint(0, 0)); when(client.getLocalPlayer()).thenReturn(player); when(slayerConfig.taskName()).thenReturn("TzTok-Jad"); StatChanged statChanged = new StatChanged( Skill.SLAYER, 100, 2, 2 ); slayerPlugin.onStatChanged(statChanged); slayerPlugin.setTask("TzTok-Jad", 1, 1, true, 0); // One bat kill statChanged = new StatChanged( Skill.SLAYER, 110, 2, 2 ); slayerPlugin.onStatChanged(statChanged); assertEquals(1, slayerPlugin.getCurrentTask().getAmount()); // One Jad kill statChanged = new StatChanged( Skill.SLAYER, 25360, -1, -1 ); slayerPlugin.onStatChanged(statChanged); assertEquals(0, slayerPlugin.getCurrentTask().getAmount()); }
Example 3
Source File: SlayerPluginTest.java From plugins with GNU General Public License v3.0 | 5 votes |
@Test public void testNewAccountSlayerKill() { final Player player = mock(Player.class); when(player.getLocalLocation()).thenReturn(new LocalPoint(0, 0)); when(client.getLocalPlayer()).thenReturn(player); when(slayerConfig.taskName()).thenReturn("Bears"); slayerPlugin.setTask("Bears", 35, 35, true, 0); StatChanged statChanged = new StatChanged( Skill.SLAYER, 0, 1, 1 ); slayerPlugin.onStatChanged(statChanged); statChanged = new StatChanged( Skill.SLAYER, 27, 1, 1 ); slayerPlugin.onStatChanged(statChanged); assertEquals(34, slayerPlugin.getCurrentTask().getAmount()); }
Example 4
Source File: SlayerPluginTest.java From runelite with BSD 2-Clause "Simplified" License | 5 votes |
@Test public void testCorrectlyCapturedTaskKill() { final Player player = mock(Player.class); when(player.getLocalLocation()).thenReturn(new LocalPoint(0, 0)); when(client.getLocalPlayer()).thenReturn(player); StatChanged statChanged = new StatChanged( Skill.SLAYER, 100, 2, 2 ); slayerPlugin.onStatChanged(statChanged); slayerPlugin.setTaskName("Dagannoth"); slayerPlugin.setAmount(143); statChanged = new StatChanged( Skill.SLAYER, 110, 2, 2 ); slayerPlugin.onStatChanged(statChanged); assertEquals(142, slayerPlugin.getAmount()); }
Example 5
Source File: SlayerPluginTest.java From runelite with BSD 2-Clause "Simplified" License | 5 votes |
@Test public void testJadTaskKill() { final Player player = mock(Player.class); when(player.getLocalLocation()).thenReturn(new LocalPoint(0, 0)); when(client.getLocalPlayer()).thenReturn(player); StatChanged statChanged = new StatChanged( Skill.SLAYER, 100, 2, 2 ); slayerPlugin.onStatChanged(statChanged); slayerPlugin.setTaskName("TzTok-Jad"); slayerPlugin.setAmount(1); // One bat kill statChanged = new StatChanged( Skill.SLAYER, 110, 2, 2 ); slayerPlugin.onStatChanged(statChanged); assertEquals(1, slayerPlugin.getAmount()); // One Jad kill statChanged = new StatChanged( Skill.SLAYER, 25360, -1, -1 ); slayerPlugin.onStatChanged(statChanged); assertEquals(0, slayerPlugin.getAmount()); }
Example 6
Source File: SlayerPluginTest.java From runelite with BSD 2-Clause "Simplified" License | 5 votes |
@Test public void testNewAccountSlayerKill() { final Player player = mock(Player.class); when(player.getLocalLocation()).thenReturn(new LocalPoint(0, 0)); when(client.getLocalPlayer()).thenReturn(player); slayerPlugin.setTaskName("Bears"); slayerPlugin.setAmount(35); StatChanged statChanged = new StatChanged( Skill.SLAYER, 0, 1, 1 ); slayerPlugin.onStatChanged(statChanged); statChanged = new StatChanged( Skill.SLAYER, 27, 1, 1 ); slayerPlugin.onStatChanged(statChanged); assertEquals(34, slayerPlugin.getAmount()); }