Chinchompa will no longer steal food and xp casts are now caught
This commit is contained in:
@@ -359,4 +359,5 @@ public final class AnimationID
|
||||
public static final int WAVE_SPELL_ANIMATION = 727;
|
||||
public static final int SURGE_SPELL_ANIMATION = 7855;
|
||||
public static final int HIGH_ALCH_ANIMATION = 713;
|
||||
public static final int LUNAR_HUMIDIFY = 6294;
|
||||
}
|
||||
@@ -67,7 +67,7 @@ public enum ItemType
|
||||
|| item.getName().toLowerCase().contains(" arrow") || item.getName().toLowerCase().contains("javelin")
|
||||
|| item.getName().toLowerCase().contains("knive") || item.getName().toLowerCase().contains("throwing")
|
||||
|| item.getName().toLowerCase().contains("zulrah's scale") || item.getName().toLowerCase().contains("cannonball")
|
||||
|| item.getName().toLowerCase().contains("knife"))
|
||||
|| item.getName().toLowerCase().contains("knife") || item.getName().toLowerCase().contains("chinchompa"))
|
||||
{
|
||||
return ItemType.AMMO;
|
||||
}
|
||||
|
||||
@@ -181,6 +181,7 @@ public class SuppliesTrackerPlugin extends Plugin
|
||||
private SuppliesTrackerConfig config;
|
||||
@Inject
|
||||
private Client client;
|
||||
private boolean noXpCast = false;
|
||||
|
||||
/**
|
||||
* Checks if item name is potion
|
||||
@@ -254,8 +255,6 @@ public class SuppliesTrackerPlugin extends Plugin
|
||||
{
|
||||
skipTick = true;
|
||||
magicXpChanged = true;
|
||||
checkUsedRunePouch();
|
||||
magicXp = event.getXp();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -284,18 +283,28 @@ public class SuppliesTrackerPlugin extends Plugin
|
||||
ticks = 0;
|
||||
}
|
||||
|
||||
amountused1 = 0;
|
||||
amountused2 = 0;
|
||||
amountused3 = 0;
|
||||
|
||||
|
||||
if (skipTick)
|
||||
{
|
||||
skipTick = false;
|
||||
return;
|
||||
}
|
||||
else
|
||||
else if (magicXpChanged)
|
||||
{
|
||||
checkUsedRunePouch();
|
||||
magicXpChanged = false;
|
||||
noXpCast = false;
|
||||
}
|
||||
else if (noXpCast)
|
||||
{
|
||||
checkUsedRunePouch();
|
||||
noXpCast = false;
|
||||
}
|
||||
|
||||
amountused1 = 0;
|
||||
amountused2 = 0;
|
||||
amountused3 = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -560,7 +569,8 @@ public class SuppliesTrackerPlugin extends Plugin
|
||||
else if ( playerAniId == LOW_LEVEL_STANDARD_SPELLS ||
|
||||
playerAniId == WAVE_SPELL_ANIMATION ||
|
||||
playerAniId == SURGE_SPELL_ANIMATION ||
|
||||
playerAniId == HIGH_ALCH_ANIMATION)
|
||||
playerAniId == HIGH_ALCH_ANIMATION ||
|
||||
playerAniId == LUNAR_HUMIDIFY)
|
||||
{
|
||||
old = client.getItemContainer(InventoryID.INVENTORY);
|
||||
|
||||
@@ -570,6 +580,11 @@ public class SuppliesTrackerPlugin extends Plugin
|
||||
MenuAction newAction = new MenuAction(CAST, old.getItems());
|
||||
actionStack.push(newAction);
|
||||
}
|
||||
if (!magicXpChanged)
|
||||
{
|
||||
skipTick = true;
|
||||
noXpCast = true;
|
||||
}
|
||||
}
|
||||
else if (playerAniId == SCYTHE_OF_VITUR_ANIMATION)
|
||||
{
|
||||
@@ -1226,7 +1241,7 @@ public class SuppliesTrackerPlugin extends Plugin
|
||||
|
||||
private void checkUsedRunePouch()
|
||||
{
|
||||
if (magicXpChanged)
|
||||
if (magicXpChanged || noXpCast)
|
||||
{
|
||||
if (amountused1 != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user