This commit is contained in:
Mysticate 2015-10-10 01:00:49 -04:00
parent 1127764cc3
commit 9a7357e484
4 changed files with 412 additions and 161 deletions

View File

@ -9,31 +9,49 @@ import java.util.HashSet;
import java.util.Iterator;
import java.util.Map.Entry;
import mineplex.core.MiniPlugin;
import mineplex.core.common.util.NautHashMap;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.disguise.disguises.DisguiseArmorStand;
import mineplex.core.disguise.disguises.DisguiseBase;
import mineplex.core.disguise.disguises.DisguiseBlock;
import mineplex.core.disguise.disguises.DisguiseInsentient;
import mineplex.core.disguise.disguises.DisguiseLiving;
import mineplex.core.disguise.disguises.DisguisePlayer;
import mineplex.core.disguise.disguises.DisguiseRabbit;
import mineplex.core.packethandler.IPacketHandler;
import mineplex.core.packethandler.PacketHandler;
import mineplex.core.packethandler.PacketInfo;
import mineplex.core.packethandler.PacketVerifier;
import mineplex.core.timing.TimingManager;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import net.minecraft.server.v1_7_R4.Block;
import net.minecraft.server.v1_7_R4.Chunk;
import net.minecraft.server.v1_7_R4.ChunkSection;
import net.minecraft.server.v1_7_R4.EntityTrackerEntry;
import net.minecraft.server.v1_7_R4.PacketPlayOutAnimation;
import net.minecraft.server.v1_7_R4.ChunkAddEntityEvent;
import net.minecraft.server.v1_7_R4.ChunkSection;
import net.minecraft.server.v1_7_R4.EntityPlayer;
import net.minecraft.server.v1_7_R4.EntityTrackerEntry;
import net.minecraft.server.v1_7_R4.Packet;
import net.minecraft.server.v1_7_R4.PacketPlayOutAnimation;
import net.minecraft.server.v1_7_R4.PacketPlayOutBed;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityEquipment;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityStatus;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityVelocity;
import net.minecraft.server.v1_7_R4.PacketPlayOutMapChunk;
import net.minecraft.server.v1_7_R4.PacketPlayOutMapChunkBulk;
import net.minecraft.server.v1_7_R4.PacketPlayOutNamedEntitySpawn;
import net.minecraft.server.v1_7_R4.PacketPlayOutNamedSoundEffect;
import net.minecraft.server.v1_7_R4.PacketPlayOutPlayerInfo;
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntity;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityVelocity;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityDestroy;
import net.minecraft.server.v1_7_R4.PacketPlayOutRelEntityMove;
import net.minecraft.server.v1_7_R4.PacketPlayOutRelEntityMoveLook;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityTeleport;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityMetadata;
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntity;
import net.minecraft.server.v1_7_R4.PacketPlayOutSpawnEntityLiving;
import net.minecraft.server.v1_7_R4.PacketPlayOutUpdateAttributes;
import net.minecraft.server.v1_7_R4.PacketPlayOutEntityEquipment;
import net.minecraft.server.v1_7_R4.PacketPlayOutNamedSoundEffect;
import net.minecraft.server.v1_7_R4.WorldServer;
import org.bukkit.Bukkit;
@ -57,24 +75,6 @@ import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.event.world.ChunkUnloadEvent;
import org.bukkit.plugin.java.JavaPlugin;
import mineplex.core.MiniPlugin;
import mineplex.core.common.util.NautHashMap;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.disguise.disguises.DisguiseBase;
import mineplex.core.disguise.disguises.DisguiseBlock;
import mineplex.core.disguise.disguises.DisguiseInsentient;
import mineplex.core.disguise.disguises.DisguiseLiving;
import mineplex.core.disguise.disguises.DisguisePlayer;
import mineplex.core.disguise.disguises.DisguiseRabbit;
import mineplex.core.packethandler.IPacketHandler;
import mineplex.core.packethandler.PacketHandler;
import mineplex.core.packethandler.PacketVerifier;
import mineplex.core.packethandler.PacketInfo;
import mineplex.core.timing.TimingManager;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
public class DisguiseManager extends MiniPlugin implements IPacketHandler
{
private NautHashMap<Integer, DisguiseBase> _spawnPacketMap = new NautHashMap<Integer, DisguiseBase>();
@ -831,7 +831,7 @@ public class DisguiseManager extends MiniPlugin implements IPacketHandler
{
final Player player = packetInfo.getPlayer();
if (!UtilPlayer.is1_8(player) && disguise instanceof DisguiseRabbit)
if (!UtilPlayer.is1_8(player) && (disguise instanceof DisguiseRabbit || disguise instanceof DisguiseArmorStand))
{
return;
}

View File

@ -3,6 +3,78 @@ package mineplex.hub;
import java.util.ArrayList;
import java.util.HashMap;
import mineplex.core.MiniClientPlugin;
import mineplex.core.account.CoreClient;
import mineplex.core.account.CoreClientManager;
import mineplex.core.achievement.AchievementManager;
import mineplex.core.aprilfools.AprilFoolsManager;
import mineplex.core.benefit.BenefitManager;
import mineplex.core.blockrestore.BlockRestore;
import mineplex.core.bonuses.BonusManager;
import mineplex.core.botspam.BotSpamManager;
import mineplex.core.common.Rank;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilWorld;
import mineplex.core.cosmetic.CosmeticManager;
import mineplex.core.disguise.DisguiseManager;
import mineplex.core.disguise.disguises.DisguiseSlime;
import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.event.GadgetActivateEvent;
import mineplex.core.gadget.event.GadgetCollideEntityEvent;
import mineplex.core.hologram.HologramManager;
import mineplex.core.inventory.InventoryManager;
import mineplex.core.message.PrivateMessageEvent;
import mineplex.core.mount.MountManager;
import mineplex.core.mount.event.MountActivateEvent;
import mineplex.core.notifier.NotificationManager;
import mineplex.core.npc.NpcManager;
import mineplex.core.packethandler.PacketHandler;
import mineplex.core.party.Party;
import mineplex.core.party.PartyManager;
import mineplex.core.personalServer.PersonalServerManager;
import mineplex.core.pet.PetManager;
import mineplex.core.poll.PollManager;
import mineplex.core.portal.Portal;
import mineplex.core.preferences.PreferencesManager;
import mineplex.core.projectile.ProjectileManager;
import mineplex.core.punish.Punish;
import mineplex.core.stats.StatsManager;
import mineplex.core.task.TaskManager;
import mineplex.core.treasure.TreasureManager;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.hub.commands.DisguiseCommand;
import mineplex.hub.commands.ForcefieldRadius;
import mineplex.hub.commands.GadgetToggle;
import mineplex.hub.commands.GameModeCommand;
import mineplex.hub.commands.NewsCommand;
import mineplex.hub.modules.ForcefieldManager;
import mineplex.hub.modules.HubVisibilityManager;
import mineplex.hub.modules.JumpManager;
import mineplex.hub.modules.KothManager;
import mineplex.hub.modules.NewsManager;
import mineplex.hub.modules.ParkourManager;
import mineplex.hub.modules.SoccerManager;
import mineplex.hub.modules.TextManager;
import mineplex.hub.modules.WorldManager;
import mineplex.hub.profile.gui.GUIProfile;
import mineplex.hub.tutorial.TutorialManager;
import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent;
import mineplex.minecraft.game.classcombat.item.event.ItemTriggerEvent;
import mineplex.minecraft.game.core.combat.DeathMessageType;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import mineplex.minecraft.game.core.condition.ConditionManager;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.GameMode;
@ -34,85 +106,11 @@ import org.bukkit.event.player.PlayerVelocityEvent;
import org.bukkit.event.server.ServerListPingEvent;
import org.bukkit.event.world.ChunkLoadEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.BookMeta;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scoreboard.DisplaySlot;
import org.bukkit.scoreboard.Objective;
import org.bukkit.scoreboard.Scoreboard;
import mineplex.core.MiniClientPlugin;
import mineplex.core.account.CoreClient;
import mineplex.core.account.CoreClientManager;
import mineplex.core.achievement.AchievementManager;
import mineplex.core.aprilfools.AprilFoolsManager;
import mineplex.core.benefit.BenefitManager;
import mineplex.core.blockrestore.BlockRestore;
import mineplex.core.botspam.BotSpamManager;
import mineplex.core.common.Rank;
import mineplex.core.common.util.C;
import mineplex.core.common.util.F;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilInv;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilWorld;
import mineplex.core.cosmetic.CosmeticManager;
import mineplex.core.disguise.DisguiseManager;
import mineplex.core.disguise.disguises.DisguiseSlime;
import mineplex.core.donation.DonationManager;
import mineplex.core.gadget.GadgetManager;
import mineplex.core.gadget.event.GadgetActivateEvent;
import mineplex.core.gadget.event.GadgetCollideEntityEvent;
import mineplex.core.hologram.HologramManager;
import mineplex.core.inventory.InventoryManager;
import mineplex.core.message.PrivateMessageEvent;
import mineplex.core.mount.MountManager;
import mineplex.core.mount.event.MountActivateEvent;
import mineplex.core.notifier.NotificationManager;
import mineplex.core.npc.NpcManager;
import mineplex.core.packethandler.PacketHandler;
import mineplex.core.party.Party;
import mineplex.core.party.PartyManager;
import mineplex.core.personalServer.PersonalServerManager;
import mineplex.core.pet.PetManager;
import mineplex.core.portal.Portal;
import mineplex.core.preferences.PreferencesManager;
import mineplex.core.projectile.ProjectileManager;
import mineplex.core.punish.Punish;
import mineplex.core.reward.RewardManager;
import mineplex.core.stats.StatsManager;
import mineplex.core.task.TaskManager;
import mineplex.core.treasure.TreasureManager;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.core.bonuses.BonusManager;
import mineplex.hub.commands.DisguiseCommand;
import mineplex.hub.commands.ForcefieldRadius;
import mineplex.hub.commands.GadgetToggle;
import mineplex.hub.commands.GameModeCommand;
import mineplex.hub.commands.NewsCommand;
import mineplex.hub.modules.ForcefieldManager;
import mineplex.hub.modules.HubVisibilityManager;
import mineplex.hub.modules.JumpManager;
import mineplex.hub.modules.KothManager;
import mineplex.hub.modules.NewsManager;
import mineplex.hub.modules.ParkourManager;
import mineplex.hub.modules.SoccerManager;
import mineplex.hub.modules.TextManager;
import mineplex.hub.modules.WorldManager;
import mineplex.core.poll.PollManager;
import mineplex.hub.profile.gui.GUIProfile;
import mineplex.hub.tutorial.TutorialManager;
import mineplex.minecraft.game.classcombat.Skill.event.SkillTriggerEvent;
import mineplex.minecraft.game.classcombat.item.event.ItemTriggerEvent;
import mineplex.minecraft.game.core.combat.DeathMessageType;
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
import mineplex.minecraft.game.core.condition.ConditionManager;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
public class HubManager extends MiniClientPlugin<HubClient>
{
// Snowman!
@ -142,6 +140,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
private PetManager _petManager;
private PacketHandler _packetHandler;
private PersonalServerManager _personalServerManager;
// private HalloweenSpookinessManager _halloweenManager;
private Location _spawn;
private int _scoreboardTick = 0;
@ -220,7 +219,8 @@ public class HubManager extends MiniClientPlugin<HubClient>
new BonusManager(plugin, clientManager, donationManager, pollManager , npcManager, hologramManager, statsManager, _inventoryManager, petManager);
// _halloweenManager = new HalloweenSpookinessManager(this);
// NotificationManager notificationManager = new NotificationManager(plugin, clientManager, donationManager);
// new MailManager(_plugin, notificationManager);
@ -843,6 +843,11 @@ public class HubManager extends MiniClientPlugin<HubClient>
return _visibilityManager;
}
// public HalloweenSpookinessManager getHalloweenManager()
// {
// return _halloweenManager;
// }
@EventHandler(priority = EventPriority.MONITOR)
public void gadgetCollide(GadgetCollideEntityEvent event)
{

View File

@ -0,0 +1,233 @@
package mineplex.hub.modules;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
import mineplex.core.MiniPlugin;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilPlayer;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.disguise.disguises.DisguiseArmorStand;
import mineplex.core.itemstack.ItemBuilder;
import mineplex.core.itemstack.ItemStackFactory;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.hub.HubManager;
import mineplex.hub.HubType;
import org.bukkit.Color;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.entity.Skeleton;
import org.bukkit.event.EventHandler;
import org.bukkit.util.Vector;
public class HalloweenSpookinessManager extends MiniPlugin
{
/**
*
* This class doesn't work (yet.) I haven't had time to debug it due to the halloween update
* releasing in.. one hour..?
* Maybe release later this week or in future halloweens.
* @author Mysticate
*
*/
protected class CreepyDudeData
{
public final Location Location;
public final Skeleton Skeleton;
public final DisguiseArmorStand Disguise;
public CreepyDudeData(Location loc, Skeleton skel, DisguiseArmorStand stand)
{
Location = loc;
Skeleton = skel;
Disguise = stand;
}
public void resetStare()
{
Disguise.setHeadPosition(new Vector(UtilAlg.GetPitch(Location.getDirection()), UtilAlg.GetYaw(Location.getDirection()), 0));
}
}
private HubManager _manager;
private final boolean _enabled;
private Set<CreepyDudeData> _creepyDudes = new HashSet<CreepyDudeData>();
private Player _target;
private long _targetTime = System.currentTimeMillis();
private long _lastTarget = System.currentTimeMillis();
public HalloweenSpookinessManager(HubManager manager)
{
super("Halloween Manager", manager.getPlugin());
_manager = manager;
_enabled = manager.Type == HubType.Halloween;
}
@Override
public void enable()
{
if (!_enabled)
return;
Location creepyDudeLoc = new Location(_manager.GetSpawn().getWorld(), 9.5, 72.0, -8.5, 70, 46);
Location creepyLittleDude1Loc = new Location(_manager.GetSpawn().getWorld(), 10.25, 72.0, -7.75, 70, 46);
Location creepyLittleDude2Loc = new Location(_manager.GetSpawn().getWorld(), 8.75, 72.0, -9.25, 70, 46);
Skeleton creepyDude = spawnCreepyDude(creepyDudeLoc);
Skeleton creepyLittleDude1 = spawnCreepyDude(creepyLittleDude1Loc);
Skeleton creepyLittleDude2 = spawnCreepyDude(creepyLittleDude2Loc);
DisguiseArmorStand creepyDudeDisguise = disguiseCreepyDude(creepyDude, creepyDudeLoc, false);
DisguiseArmorStand creepyLittleDude1Disguise = disguiseCreepyDude(creepyLittleDude1, creepyLittleDude1Loc, true);
DisguiseArmorStand creepyLittleDude2Disguise = disguiseCreepyDude(creepyLittleDude2, creepyLittleDude2Loc, true);
_creepyDudes.add(new CreepyDudeData(creepyDudeLoc, creepyDude, creepyDudeDisguise));
_creepyDudes.add(new CreepyDudeData(creepyLittleDude1Loc, creepyLittleDude1, creepyLittleDude1Disguise));
_creepyDudes.add(new CreepyDudeData(creepyLittleDude2Loc, creepyLittleDude2, creepyLittleDude2Disguise));
}
@Override
public void disable()
{
if (!_enabled)
return;
for (CreepyDudeData data : _creepyDudes)
{
data.Skeleton.remove();
}
}
private Skeleton spawnCreepyDude(Location loc)
{
Skeleton skeleton = loc.getWorld().spawn(loc, Skeleton.class);
UtilEnt.silence(skeleton, true);
UtilEnt.Vegetate(skeleton);
UtilEnt.ghost(skeleton, true, false);
skeleton.getEquipment().setItemInHand(ItemStackFactory.Instance.CreateStack(0));
skeleton.getEquipment().setHelmet(ItemStackFactory.Instance.CreateStack(Material.SKULL_ITEM));
skeleton.getEquipment().setChestplate(new ItemBuilder(Material.LEATHER_CHESTPLATE).setUnbreakable(true).setColor(Color.BLACK).build());
skeleton.getEquipment().setLeggings(new ItemBuilder(Material.LEATHER_LEGGINGS).setUnbreakable(true).setColor(Color.BLACK).build());
skeleton.getEquipment().setHelmet(new ItemBuilder(Material.LEATHER_BOOTS).setUnbreakable(true).setColor(Color.BLACK).build());
return skeleton;
}
private DisguiseArmorStand disguiseCreepyDude(Skeleton creepyDude, Location loc, boolean small)
{
DisguiseArmorStand disguise = new DisguiseArmorStand(creepyDude);
disguise.setHeadPosition(new Vector(UtilAlg.GetPitch(loc.getDirection()), UtilAlg.GetYaw(loc.getDirection()), 0));
disguise.setCustomNameVisible(false);
disguise.setInvisible(true);
disguise.setRemoveBase();
if (small)
disguise.setSmall();
_manager.GetDisguise().disguise(disguise);
return disguise;
}
@EventHandler
public void creepSmallChildOut(UpdateEvent event)
{
if (!_enabled)
return;
if (event.getType() != UpdateType.TICK)
return;
if (_target == null)
return;
//Follow for 2 seconds
if (!_target.isOnline() || _manager.getPreferences().Get(_target).Invisibility || UtilTime.elapsed(_targetTime, 2000))
{
resetFollowing();
return;
}
for (CreepyDudeData data : _creepyDudes)
{
Vector vec = UtilAlg.getTrajectory(data.Skeleton.getEyeLocation(), _target.getEyeLocation());
data.Disguise.setHeadPosition(new Vector(UtilAlg.GetPitch(vec), UtilAlg.GetYaw(vec), 0));
}
}
@EventHandler
public void targetSmallChild(UpdateEvent event)
{
if (!_enabled)
return;
if (event.getType() != UpdateType.FAST)
return;
if (_target != null)
return;
if (!UtilTime.elapsed(_lastTarget, 1000 * 60 + UtilMath.r(30) * 1000))
return;
Player target = findTarget();
if (target == null)
return;
_target = target;
_targetTime = System.currentTimeMillis();
}
private void resetFollowing()
{
_target = null;
_lastTarget = System.currentTimeMillis();
for (CreepyDudeData data : _creepyDudes)
{
data.resetStare();
}
}
private Player findTarget()
{
ArrayList<Location> dudeLocations = new ArrayList<Location>();
for (CreepyDudeData data : _creepyDudes)
{
dudeLocations.add(data.Location);
}
Location average = UtilAlg.getAverageLocation(dudeLocations);
ArrayList<Player> best = new ArrayList<Player>();
for (Player player : UtilServer.getPlayers())
{
if (!UtilPlayer.is1_8(player))
continue;
if (_manager.getPreferences().Get(player).Invisibility)
continue;
if (UtilMath.offset(player.getLocation(), average) <= 7)
best.add(player);
}
if (best.isEmpty())
return null;
return UtilAlg.Random(best);
}
}

View File

@ -263,70 +263,83 @@ public class NewsManager extends MiniPlugin
* Myst's sexy ass animation :>
*/
_animationIndex = (_animationIndex + 1) % 100;
if (_animationIndex < 24)
_animationIndex = (_animationIndex + 1) % 40;
if (_animationIndex < 20)
{
//Start up
if (_animationIndex == 0 || _animationIndex == 1) text = C.cGoldB + "M";
if (_animationIndex == 2 || _animationIndex == 3) text = C.cGoldB + "MI";
if (_animationIndex == 4 || _animationIndex == 5) text = C.cGoldB + "MINE";
if (_animationIndex == 6 || _animationIndex == 7) text = C.cGoldB + "MINEP";
if (_animationIndex == 8 || _animationIndex == 9) text = C.cGoldB + "MINEPL";
if (_animationIndex == 10 || _animationIndex == 11) text = C.cGoldB + "MINEPLE";
if (_animationIndex >= 12) text = C.cGoldB + "MINEPLEX";
if (_animationIndex % 3 == 0) text = C.cWhiteB + "2015" + C.cGoldB + " HAPPY HALLOWEEN " + C.cWhiteB + "2015";
else if (_animationIndex % 3 == 1) text = C.cWhiteB + "2015" + C.cRedB + " HAPPY HALLOWEEN " + C.cWhiteB + "2015";
else text = C.cWhiteB + "2015" + C.cYellowB + " HAPPY HALLOWEEN " + C.cWhiteB + "2015";
}
if (_animationIndex >= 20 && _animationIndex < 50)
{
//Happy halloween
if (_animationIndex == 20) text = C.cWhiteB + C.Scramble + "2" + C.cGoldB + " " + " MINEPLEX " + C.cWhiteB + " " + C.Scramble + "5";
if (_animationIndex == 21) text = C.cWhiteB + C.Scramble + "20" + C.cGoldB + " " + " MINEPLEX " + C.cWhiteB + " " + C.Scramble + "15";
if (_animationIndex == 22) text = C.cWhiteB + C.Scramble + "201" + C.cGoldB + " " + " MINEPLEX " + C.cWhiteB + " " + C.Scramble + "015";
if (_animationIndex == 23) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " MINEPLEX " + C.cWhiteB + C.Scramble + "2015";
if (_animationIndex == 24) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " MIN" + C.Scramble + "EP" + C.cGoldB + "LEX " + C.cWhiteB + C.Scramble + "2015";
if (_animationIndex == 25) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " MI" + C.Scramble + "NEPL" + C.cGoldB + "EX " + C.cWhiteB + C.Scramble + "2015";
if (_animationIndex == 26) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " M" + C.Scramble + "INEPLE" + C.cGoldB + "X " + C.cWhiteB + C.Scramble + "2015";
if (_animationIndex == 27) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "MINEPLEX" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
if (_animationIndex == 28) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HAL" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
if (_animationIndex == 29) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HALL" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
if (_animationIndex == 30) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HALLO" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
if (_animationIndex == 31) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HALLOW" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
if (_animationIndex == 32) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HALLOWE" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
if (_animationIndex == 33) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HALLOWEE" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
if (_animationIndex == 34) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HALLOWEEN" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
if (_animationIndex > 34)
{
if (_animationIndex % 3 == 0) text = C.cWhiteB + "2015" + C.cGoldB + " HAPPY HALLOWEEN " + C.cWhiteB + "2015";
else if (_animationIndex % 3 == 1) text = C.cWhiteB + "2015" + C.cRedB + " HAPPY HALLOWEEN " + C.cWhiteB + "2015";
else text = C.cWhiteB + "2015" + C.cYellowB + " HAPPY HALLOWEEN " + C.cWhiteB + "2015";
}
}
//Halloween horror
if (_animationIndex >= 50 && _animationIndex < 66)
{
if (_animationIndex % 2 == 0) text = C.cWhiteB + "Event" + C.cGoldB + " HALLOWEEN HORROR " + C.cWhiteB + "Event";
else if (_animationIndex % 2 == 1) text = C.cWhiteB + "Event" + C.cRedB + " HALLOWEEN HORROR " + C.cWhiteB + "Event";
else text = C.cWhiteB + "Event" + C.cYellowB + " HALLOWEEN HORROR " + C.cWhiteB + "Event";
}
//Spider Mount
if (_animationIndex >= 66 && _animationIndex < 82)
{
if (_animationIndex % 2 == 0) text = C.cWhiteB + "Limited Time" + C.cGoldB + " SPIDER MOUNT " + C.cWhiteB + "Limited Time";
else if (_animationIndex % 2 == 1) text = C.cWhiteB + "Limited Time" + C.cRedB + " SPIDER MOUNT " + C.cWhiteB + "Limited Time";
else text = C.cWhiteB + "Limited Time" + C.cYellowB + " SPIDER MOUNT " + C.cWhiteB + "Limited Time";
}
//Sale
if (_animationIndex >= 82 && _animationIndex <= 100)
else
{
if (_animationIndex % 2 == 0) text = C.cWhiteB + "50% Off" + C.cGoldB + " SPOOKY SALE " + C.cWhiteB + "50% Off";
else if (_animationIndex % 2 == 1) text = C.cWhiteB + "50% Off" + C.cRedB + " SPOOKY SALE " + C.cWhiteB + "50% Off";
else text = C.cWhiteB + "50% Off" + C.cYellowB + " SPOOKY SALE " + C.cWhiteB + "50% Off";
}
// if (_animationIndex < 24)
// {
// //Start up
// if (_animationIndex == 0 || _animationIndex == 1) text = C.cGoldB + "M";
// if (_animationIndex == 2 || _animationIndex == 3) text = C.cGoldB + "MI";
// if (_animationIndex == 4 || _animationIndex == 5) text = C.cGoldB + "MINE";
// if (_animationIndex == 6 || _animationIndex == 7) text = C.cGoldB + "MINEP";
// if (_animationIndex == 8 || _animationIndex == 9) text = C.cGoldB + "MINEPL";
// if (_animationIndex == 10 || _animationIndex == 11) text = C.cGoldB + "MINEPLE";
// if (_animationIndex >= 12) text = C.cGoldB + "MINEPLEX";
// }
//
// if (_animationIndex >= 20 && _animationIndex < 50)
// {
// //Happy halloween
// if (_animationIndex == 20) text = C.cWhiteB + C.Scramble + "2" + C.cGoldB + " " + " MINEPLEX " + C.cWhiteB + " " + C.Scramble + "5";
// if (_animationIndex == 21) text = C.cWhiteB + C.Scramble + "20" + C.cGoldB + " " + " MINEPLEX " + C.cWhiteB + " " + C.Scramble + "15";
// if (_animationIndex == 22) text = C.cWhiteB + C.Scramble + "201" + C.cGoldB + " " + " MINEPLEX " + C.cWhiteB + " " + C.Scramble + "015";
// if (_animationIndex == 23) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " MINEPLEX " + C.cWhiteB + C.Scramble + "2015";
// if (_animationIndex == 24) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " MIN" + C.Scramble + "EP" + C.cGoldB + "LEX " + C.cWhiteB + C.Scramble + "2015";
// if (_animationIndex == 25) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " MI" + C.Scramble + "NEPL" + C.cGoldB + "EX " + C.cWhiteB + C.Scramble + "2015";
// if (_animationIndex == 26) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " M" + C.Scramble + "INEPLE" + C.cGoldB + "X " + C.cWhiteB + C.Scramble + "2015";
// if (_animationIndex == 27) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "MINEPLEX" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
// if (_animationIndex == 28) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HAL" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
// if (_animationIndex == 29) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HALL" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
// if (_animationIndex == 30) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HALLO" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
// if (_animationIndex == 31) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HALLOW" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
// if (_animationIndex == 32) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HALLOWE" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
// if (_animationIndex == 33) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HALLOWEE" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
// if (_animationIndex == 34) text = C.cWhiteB + C.Scramble + "2015" + C.cGoldB + " " + C.Scramble + "HAPPY_HALLOWEEN" + C.cGoldB + " " + C.cWhiteB + C.Scramble + "2015";
//
// if (_animationIndex > 34)
// {
// if (_animationIndex % 3 == 0) text = C.cWhiteB + "2015" + C.cGoldB + " HAPPY HALLOWEEN " + C.cWhiteB + "2015";
// else if (_animationIndex % 3 == 1) text = C.cWhiteB + "2015" + C.cRedB + " HAPPY HALLOWEEN " + C.cWhiteB + "2015";
// else text = C.cWhiteB + "2015" + C.cYellowB + " HAPPY HALLOWEEN " + C.cWhiteB + "2015";
// }
// }
//
// //Halloween horror
// if (_animationIndex >= 50 && _animationIndex < 66)
// {
// if (_animationIndex % 2 == 0) text = C.cWhiteB + "Event" + C.cGoldB + " HALLOWEEN HORROR " + C.cWhiteB + "Event";
// else if (_animationIndex % 2 == 1) text = C.cWhiteB + "Event" + C.cRedB + " HALLOWEEN HORROR " + C.cWhiteB + "Event";
// else text = C.cWhiteB + "Event" + C.cYellowB + " HALLOWEEN HORROR " + C.cWhiteB + "Event";
// }
//
// //Spider Mount
// if (_animationIndex >= 66 && _animationIndex < 82)
// {
// if (_animationIndex % 2 == 0) text = C.cWhiteB + "Limited Time" + C.cGoldB + " SPIDER MOUNT " + C.cWhiteB + "Limited Time";
// else if (_animationIndex % 2 == 1) text = C.cWhiteB + "Limited Time" + C.cRedB + " SPIDER MOUNT " + C.cWhiteB + "Limited Time";
// else text = C.cWhiteB + "Limited Time" + C.cYellowB + " SPIDER MOUNT " + C.cWhiteB + "Limited Time";
// }
//
// //Sale
// if (_animationIndex >= 82 && _animationIndex <= 100)
// {
// if (_animationIndex % 2 == 0) text = C.cWhiteB + "50% Off" + C.cGoldB + " SPOOKY SALE " + C.cWhiteB + "50% Off";
// else if (_animationIndex % 2 == 1) text = C.cWhiteB + "50% Off" + C.cRedB + " SPOOKY SALE " + C.cWhiteB + "50% Off";
// else text = C.cWhiteB + "50% Off" + C.cYellowB + " SPOOKY SALE " + C.cWhiteB + "50% Off";
// }
}
else
{