Java Code Examples for net.runelite.api.NpcID#ABYSSAL_SIRE_5890

The following examples show how to use net.runelite.api.NpcID#ABYSSAL_SIRE_5890 . 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: TimersPlugin.java    From plugins with GNU General Public License v3.0 4 votes vote down vote up
@Subscribe
private void onAnimationChanged(AnimationChanged event)
{
	Actor actor = event.getActor();

	if (config.showAbyssalSireStun()
		&& actor instanceof NPC)
	{
		int npcId = ((NPC) actor).getId();

		switch (npcId)
		{
			// Show the countdown when the Sire enters the stunned state.
			case NpcID.ABYSSAL_SIRE_5887:
				createGameTimer(ABYSSAL_SIRE_STUN);
				break;

			// Hide the countdown if the Sire isn't in the stunned state.
			// This is necessary because the Sire leaves the stunned
			// state early once all all four respiratory systems are killed.
			case NpcID.ABYSSAL_SIRE:
			case NpcID.ABYSSAL_SIRE_5888:
			case NpcID.ABYSSAL_SIRE_5889:
			case NpcID.ABYSSAL_SIRE_5890:
			case NpcID.ABYSSAL_SIRE_5891:
			case NpcID.ABYSSAL_SIRE_5908:
				removeGameTimer(ABYSSAL_SIRE_STUN);
				break;
		}
	}

	Player player = client.getLocalPlayer();

	if (player == null || actor != player)
	{
		return;
	}

	if (config.showHomeMinigameTeleports()
		&& player.getAnimation() == AnimationID.IDLE
		&& (lastAnimation == AnimationID.BOOK_HOME_TELEPORT_5
		|| lastAnimation == AnimationID.COW_HOME_TELEPORT_6))
	{
		if (lastTeleportClicked == TeleportWidget.HOME_TELEPORT)
		{
			createGameTimer(HOME_TELEPORT);
		}
		else if (lastTeleportClicked == TeleportWidget.MINIGAME_TELEPORT)
		{
			createGameTimer(MINIGAME_TELEPORT);
		}
	}

	if (config.showDFSSpecial() && lastAnimation == AnimationID.DRAGONFIRE_SHIELD_SPECIAL)
	{
		createGameTimer(DRAGON_FIRE_SHIELD);
	}

	lastAnimation = player.getAnimation();
}
 
Example 2
Source File: TimersPlugin.java    From runelite with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Subscribe
public void onAnimationChanged(AnimationChanged event)
{
	Actor actor = event.getActor();

	if (config.showAbyssalSireStun()
		&& actor instanceof NPC)
	{
		int npcId = ((NPC)actor).getId();

		switch (npcId)
		{
			// Show the countdown when the Sire enters the stunned state.
			case NpcID.ABYSSAL_SIRE_5887:
				createGameTimer(ABYSSAL_SIRE_STUN);
				break;

			// Hide the countdown if the Sire isn't in the stunned state.
			// This is necessary because the Sire leaves the stunned
			// state early once all all four respiratory systems are killed.
			case NpcID.ABYSSAL_SIRE:
			case NpcID.ABYSSAL_SIRE_5888:
			case NpcID.ABYSSAL_SIRE_5889:
			case NpcID.ABYSSAL_SIRE_5890:
			case NpcID.ABYSSAL_SIRE_5891:
			case NpcID.ABYSSAL_SIRE_5908:
				removeGameTimer(ABYSSAL_SIRE_STUN);
				break;
		}
	}

	if (actor != client.getLocalPlayer())
	{
		return;
	}

	if (config.showHomeMinigameTeleports()
		&& client.getLocalPlayer().getAnimation() == AnimationID.IDLE
		&& (lastAnimation == AnimationID.BOOK_HOME_TELEPORT_5
		|| lastAnimation == AnimationID.COW_HOME_TELEPORT_6))
	{
		if (lastTeleportClicked == TeleportWidget.HOME_TELEPORT)
		{
			createGameTimer(HOME_TELEPORT);
		}
		else if (lastTeleportClicked == TeleportWidget.MINIGAME_TELEPORT)
		{
			createGameTimer(MINIGAME_TELEPORT);
		}
	}

	if (config.showDFSSpecial() && lastAnimation == AnimationID.DRAGONFIRE_SHIELD_SPECIAL)
	{
		createGameTimer(DRAGON_FIRE_SHIELD);
	}

	lastAnimation = client.getLocalPlayer().getAnimation();
}