HH CPU fixes

This commit is contained in:
Chiss 2013-10-28 13:54:10 +11:00
parent 505dd57715
commit 1d4f902298
15 changed files with 345 additions and 465 deletions

View File

@ -23,6 +23,7 @@ import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilServer;
import mineplex.core.common.util.UtilTime;
import mineplex.core.common.util.UtilTime.TimeUnit;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
@ -40,14 +41,13 @@ public class Halloween extends SoloGame
{
//Wave Data
private ArrayList<ArrayList<Location>> _spawns;
private ArrayList<WaveBase> _waves;
private int _wave = 0;
private int _maxMobs = 80;
private HashSet<CreatureBase> _mobs = new HashSet<CreatureBase>();
private PumpkinKing _king;
private ArrayList<CreatureBase> _mobs = new ArrayList<CreatureBase>();
public Halloween(ArcadeManager manager)
{
super(manager, GameType.Halloween,
@ -68,14 +68,14 @@ public class Halloween extends SoloGame
});
this.DamagePvP = false;
this.WorldTimeSet = 16000;
this.ItemDrop = false;
this.ItemPickup = false;
this.PrepareFreeze = false;
this.HungerSet = 20;
}
@ -87,13 +87,13 @@ public class Halloween extends SoloGame
_spawns.add(WorldData.GetDataLocs("YELLOW"));
_spawns.add(WorldData.GetDataLocs("GREEN"));
_spawns.add(WorldData.GetDataLocs("BLUE"));
_waves = new ArrayList<WaveBase>();
_waves.add(new Wave1(this));
_waves.add(new Wave2(this));
_waves.add(new Wave3(this));
_waves.add(new Wave4(this));
_waves.add(new Wave5(this));
//_waves.add(new Wave1(this));
//_waves.add(new Wave2(this));
//_waves.add(new Wave3(this));
//_waves.add(new Wave4(this));
//_waves.add(new Wave5(this));
_waves.add(new WaveBoss(this));
_waves.add(new WaveVictory(this));
}
@ -106,19 +106,19 @@ public class Halloween extends SoloGame
GetTeamList().add(new GameTeam("Pumpkin King", ChatColor.RED, WorldData.GetDataLocs("RED")));
}
@EventHandler
public void SoundUpdate(UpdateEvent event)
{
if (event.getType() != UpdateType.SLOW)
return;
if (!IsLive())
return;
if (Math.random() > 0.85)
return;
for (Player player : UtilServer.getPlayers())
player.playSound(player.getLocation(), Sound.AMBIENCE_CAVE, 3f, 1f);
}
@ -135,32 +135,53 @@ public class Halloween extends SoloGame
if (_waves.get(_wave).Update(_wave+1))
{
_wave++;
EndCheck();
}
}
public ArrayList<Location> GetSpawnSet(int i)
{
return _spawns.get(i);
}
public Location GetRandomSpawn()
{
ArrayList<Location> locSet = GetSpawnSet(UtilMath.r(_spawns.size()));
return locSet.get(UtilMath.r(locSet.size()));
}
public void AddCreature(CreatureBase mob)
{
_mobs.add(mob);
}
public HashSet<CreatureBase> GetCreatures()
public ArrayList<CreatureBase> GetCreatures()
{
return _mobs;
}
@EventHandler
public void CreatureMoveUpdate(UpdateEvent event)
{
if (event.getType() != UpdateType.TICK)
return;
if (_mobs.isEmpty())
return;
CreatureBase base = _mobs.remove(0);
if (base instanceof InterfaceMove)
{
InterfaceMove move = (InterfaceMove)base;
move.Move();
}
_mobs.add(base);
}
@EventHandler
public void CreatureUpdate(UpdateEvent event)
{
@ -177,21 +198,21 @@ public class Halloween extends SoloGame
mobIterator.remove();
}
}
@EventHandler
public void CreatureDamage(CustomDamageEvent event)
{
for (CreatureBase base : _mobs)
base.Damage(event);
}
@EventHandler
public void CreatureTarget(EntityTargetEvent event)
{
for (CreatureBase base : _mobs)
base.Target(event);
}
@EventHandler(priority = EventPriority.HIGHEST)
public void EntityDeath(EntityDeathEvent event)
{
@ -212,7 +233,7 @@ public class Halloween extends SoloGame
Manager.GetGame().AddGems(player, 30, "Killing the Pumpkin King", false);
Manager.GetGame().AddGems(player, 10, "Participation", false);
}
SetState(GameState.End);
SetCustomWinLine("You earned Pumpkin Kings Head!");
AnnounceEnd(this.GetTeamList().get(0));
@ -224,66 +245,66 @@ public class Halloween extends SoloGame
{
Manager.GetGame().AddGems(player, 10, "Participation", false);
}
SetState(GameState.End);
SetCustomWinLine("You lost...");
AnnounceEnd(this.GetTeamList().get(1));
}
}
@EventHandler(priority = EventPriority.LOWEST)
public void Explosion(EntityExplodeEvent event)
{
if (event.getEntity() instanceof Fireball)
{
event.blockList().clear();
Collection<Block> blocks = UtilBlock.getInRadius(event.getLocation(), 3.5d).keySet();
Iterator<Block> blockIterator = blocks.iterator();
while (blockIterator.hasNext())
{
Block block = blockIterator.next();
if (block.getY() < 4)
blockIterator.remove();
}
Manager.GetExplosion().BlockExplosion(blocks, event.getLocation(), false);
}
}
@EventHandler
public void ItemSpawn(ItemSpawnEvent event)
{
Material type = event.getEntity().getItemStack().getType();
if (type == Material.DIAMOND_AXE || type == Material.FIRE || type == Material.SNOW_BALL)
return;
event.setCancelled(true);
}
@EventHandler(priority = EventPriority.MONITOR)
public void GemAward(CustomDamageEvent event)
{
if (event.IsCancelled())
return;
Player player = event.GetDamagerPlayer(true);
if (player == null) return;
for (int i=0 ; i<event.GetDamage() ; i++)
Manager.GetGame().AddGems(player, 0.02, "Damage", true);
}
public int GetMaxMobs()
{
return _maxMobs;
}
private long _helpTimer = 0;
private int _helpIndex = 0;
private String[] _help = new String[]
@ -298,23 +319,23 @@ public class Halloween extends SoloGame
C.cAqua + "Stick together to survive.",
C.cGreen + "The Pumpkin King gets harder over time!",
};
@EventHandler
public void StateUpdate(UpdateEvent event)
{
if (event.getType() != UpdateType.SEC)
return;
if (this.GetState() != GameState.Recruit)
return;
if (!UtilTime.elapsed(_helpTimer, 8000))
return;
_helpTimer = System.currentTimeMillis();
Announce(C.cWhite + C.Bold + "TIP " + ChatColor.RESET + _help[_helpIndex]);
_helpIndex = (_helpIndex + 1)%_help.length;
}
}

View File

@ -1,11 +1,15 @@
package nautilus.game.arcade.game.games.halloween.creatures;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilMath;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.Game;
import net.minecraft.server.v1_6_R3.EntityCreature;
import net.minecraft.server.v1_6_R3.Navigation;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.entity.EntityTargetEvent;
@ -106,4 +110,23 @@ public abstract class CreatureBase<T extends LivingEntity>
public abstract void Damage(CustomDamageEvent event);
public abstract void Target(EntityTargetEvent event);
public void DefaultMove()
{
EntityCreature ec = ((CraftCreature)GetEntity()).getHandle();
Navigation nav = ec.getNavigation();
if (UtilMath.offset(GetEntity().getLocation(), GetTarget()) > 16)
{
Location target = GetEntity().getLocation();
target.add(UtilAlg.getTrajectory(GetEntity().getLocation(), GetTarget()).multiply(16));
nav.a(target.getX(), target.getY(), target.getZ(), 1f);
}
else
{
nav.a(GetTarget().getX(), GetTarget().getY(), GetTarget().getZ(), 1f);
}
}
}

View File

@ -0,0 +1,6 @@
package nautilus.game.arcade.game.games.halloween.creatures;
public interface InterfaceMove
{
public void Move();
}

View File

@ -1,21 +1,16 @@
package nautilus.game.arcade.game.games.halloween.creatures;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.Game;
import net.minecraft.server.v1_6_R3.EntityCreature;
import net.minecraft.server.v1_6_R3.Navigation;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
import org.bukkit.entity.Creeper;
import org.bukkit.event.entity.EntityTargetEvent;
public class MobCreeper extends CreatureBase<Creeper>
public class MobCreeper extends CreatureBase<Creeper> implements InterfaceMove
{
public MobCreeper(Game game, Location loc)
{
@ -26,6 +21,8 @@ public class MobCreeper extends CreatureBase<Creeper>
public void SpawnCustom(Creeper ent)
{
ent.setCustomName("Creeper");
Move();
}
@Override
@ -43,14 +40,16 @@ public class MobCreeper extends CreatureBase<Creeper>
@Override
public void Update(UpdateEvent event)
{
if (event.getType() != UpdateType.SLOW)
return;
}
public void Move()
{
//New Target via Distance
if (GetTarget() == null ||
UtilMath.offset(GetEntity().getLocation(), GetTarget()) < 10 ||
UtilMath.offset2d(GetEntity().getLocation(), GetTarget()) < 6 ||
UtilTime.elapsed(GetTargetTime(), 10000))
UtilMath.offset(GetEntity().getLocation(), GetTarget()) < 10 ||
UtilMath.offset2d(GetEntity().getLocation(), GetTarget()) < 6 ||
UtilTime.elapsed(GetTargetTime(), 10000))
{
SetTarget(GetRoamTarget());
return;
@ -67,21 +66,7 @@ public class MobCreeper extends CreatureBase<Creeper>
//Move
else
{
EntityCreature ec = ((CraftCreature)GetEntity()).getHandle();
Navigation nav = ec.getNavigation();
if (UtilMath.offset(GetEntity().getLocation(), GetTarget()) > 12)
{
Location target = GetEntity().getLocation();
target.add(UtilAlg.getTrajectory(GetEntity().getLocation(), GetTarget()).multiply(12));
nav.a(target.getX(), target.getY(), target.getZ(), 1f);
}
else
{
nav.a(GetTarget().getX(), GetTarget().getY(), GetTarget().getZ(), 1f);
}
DefaultMove();
}
}
}

View File

@ -13,8 +13,6 @@ import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
public class MobGhast extends CreatureBase<Ghast>
{
private Location _loc;
public MobGhast(Game game, Location loc)
{
super(game, null, Ghast.class, loc);
@ -23,9 +21,6 @@ public class MobGhast extends CreatureBase<Ghast>
@Override
public void SpawnCustom(Ghast ent)
{
//UtilEnt.Vegetate(ent);
_loc = ent.getLocation();
ent.setMaxHealth(80);
ent.setHealth(80);

View File

@ -1,22 +1,17 @@
package nautilus.game.arcade.game.games.halloween.creatures;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime;
import mineplex.core.disguise.disguises.DisguisePigZombie;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.Game;
import net.minecraft.server.v1_6_R3.EntityCreature;
import net.minecraft.server.v1_6_R3.Navigation;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
import org.bukkit.entity.Zombie;
import org.bukkit.event.entity.EntityTargetEvent;
public class MobPigZombie extends CreatureBase<Zombie>
public class MobPigZombie extends CreatureBase<Zombie> implements InterfaceMove
{
public MobPigZombie(Game game, Location loc)
{
@ -32,6 +27,8 @@ public class MobPigZombie extends CreatureBase<Zombie>
Host.Manager.GetCondition().Factory().Speed("Speed", ent, ent, 99999, 1, false, false, false);
ent.setCustomName("Nether Zombie");
Move();
}
@Override
@ -49,11 +46,10 @@ public class MobPigZombie extends CreatureBase<Zombie>
@Override
public void Update(UpdateEvent event)
{
if (event.getType() == UpdateType.SLOW)
Move();
}
private void Move()
public void Move()
{
//New Target via Distance
if (GetTarget() == null ||
@ -76,21 +72,7 @@ public class MobPigZombie extends CreatureBase<Zombie>
//Move
else
{
EntityCreature ec = ((CraftCreature)GetEntity()).getHandle();
Navigation nav = ec.getNavigation();
if (UtilMath.offset(GetEntity().getLocation(), GetTarget()) > 12)
{
Location target = GetEntity().getLocation();
target.add(UtilAlg.getTrajectory(GetEntity().getLocation(), GetTarget()).multiply(12));
nav.a(target.getX(), target.getY(), target.getZ(), 1f);
}
else
{
nav.a(GetTarget().getX(), GetTarget().getY(), GetTarget().getZ(), 1f);
}
DefaultMove();
}
}
}

View File

@ -1,23 +1,18 @@
package nautilus.game.arcade.game.games.halloween.creatures;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.Game;
import net.minecraft.server.v1_6_R3.EntityCreature;
import net.minecraft.server.v1_6_R3.Navigation;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
import org.bukkit.entity.Skeleton;
import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.inventory.ItemStack;
public class MobSkeletonArcher extends CreatureBase<Skeleton>
public class MobSkeletonArcher extends CreatureBase<Skeleton> implements InterfaceMove
{
public MobSkeletonArcher(Game game, Location loc)
{
@ -31,6 +26,8 @@ public class MobSkeletonArcher extends CreatureBase<Skeleton>
ent.setCustomName("Skeleton Archer");
Host.Manager.GetCondition().Factory().Speed("Speed", ent, ent, 99999, 0, false, false, false);
Move();
}
@Override
@ -48,14 +45,16 @@ public class MobSkeletonArcher extends CreatureBase<Skeleton>
@Override
public void Update(UpdateEvent event)
{
if (event.getType() != UpdateType.SLOW)
return;
}
public void Move()
{
//New Target via Distance
if (GetTarget() == null ||
UtilMath.offset(GetEntity().getLocation(), GetTarget()) < 10 ||
UtilMath.offset2d(GetEntity().getLocation(), GetTarget()) < 6 ||
UtilTime.elapsed(GetTargetTime(), 10000))
UtilMath.offset(GetEntity().getLocation(), GetTarget()) < 10 ||
UtilMath.offset2d(GetEntity().getLocation(), GetTarget()) < 6 ||
UtilTime.elapsed(GetTargetTime(), 10000))
{
SetTarget(GetRoamTarget());
return;
@ -72,21 +71,7 @@ public class MobSkeletonArcher extends CreatureBase<Skeleton>
//Move
else
{
EntityCreature ec = ((CraftCreature)GetEntity()).getHandle();
Navigation nav = ec.getNavigation();
if (UtilMath.offset(GetEntity().getLocation(), GetTarget()) > 12)
{
Location target = GetEntity().getLocation();
target.add(UtilAlg.getTrajectory(GetEntity().getLocation(), GetTarget()).multiply(12));
nav.a(target.getX(), target.getY(), target.getZ(), 1f);
}
else
{
nav.a(GetTarget().getX(), GetTarget().getY(), GetTarget().getZ(), 1f);
}
DefaultMove();
}
}
}

View File

@ -1,25 +1,19 @@
package nautilus.game.arcade.game.games.halloween.creatures;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime;
import mineplex.core.disguise.disguises.DisguiseSkeleton;
import mineplex.core.disguise.disguises.DisguiseSpider;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.Game;
import net.minecraft.server.v1_6_R3.EntityCreature;
import net.minecraft.server.v1_6_R3.Navigation;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
import org.bukkit.entity.Zombie;
import org.bukkit.event.entity.EntityTargetEvent;
import org.bukkit.inventory.ItemStack;
public class MobSkeletonWarrior extends CreatureBase<Zombie>
public class MobSkeletonWarrior extends CreatureBase<Zombie> implements InterfaceMove
{
public MobSkeletonWarrior(Game game, Location loc)
{
@ -35,6 +29,8 @@ public class MobSkeletonWarrior extends CreatureBase<Zombie>
ent.getEquipment().setItemInHand(new ItemStack(Material.WOOD_HOE));
Host.Manager.GetCondition().Factory().Speed("Speed", ent, ent, 99999, 0, false, false, false);
Move();
}
@Override
@ -52,14 +48,16 @@ public class MobSkeletonWarrior extends CreatureBase<Zombie>
@Override
public void Update(UpdateEvent event)
{
if (event.getType() != UpdateType.SLOW)
return;
}
public void Move()
{
//New Target via Distance
if (GetTarget() == null ||
UtilMath.offset(GetEntity().getLocation(), GetTarget()) < 10 ||
UtilMath.offset2d(GetEntity().getLocation(), GetTarget()) < 6 ||
UtilTime.elapsed(GetTargetTime(), 10000))
UtilMath.offset(GetEntity().getLocation(), GetTarget()) < 10 ||
UtilMath.offset2d(GetEntity().getLocation(), GetTarget()) < 6 ||
UtilTime.elapsed(GetTargetTime(), 10000))
{
SetTarget(GetRoamTarget());
return;
@ -76,21 +74,7 @@ public class MobSkeletonWarrior extends CreatureBase<Zombie>
//Move
else
{
EntityCreature ec = ((CraftCreature)GetEntity()).getHandle();
Navigation nav = ec.getNavigation();
if (UtilMath.offset(GetEntity().getLocation(), GetTarget()) > 12)
{
Location target = GetEntity().getLocation();
target.add(UtilAlg.getTrajectory(GetEntity().getLocation(), GetTarget()).multiply(12));
nav.a(target.getX(), target.getY(), target.getZ(), 1f);
}
else
{
nav.a(GetTarget().getX(), GetTarget().getY(), GetTarget().getZ(), 1f);
}
DefaultMove();
}
}
}

View File

@ -9,15 +9,12 @@ import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.Game;
import net.minecraft.server.v1_6_R3.EntityCreature;
import net.minecraft.server.v1_6_R3.Navigation;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
import org.bukkit.entity.CaveSpider;
import org.bukkit.event.entity.EntityTargetEvent;
public class MobSpiderLeaper extends CreatureBase<CaveSpider>
public class MobSpiderLeaper extends CreatureBase<CaveSpider> implements InterfaceMove
{
public MobSpiderLeaper(Game game, Location loc)
{
@ -30,6 +27,8 @@ public class MobSpiderLeaper extends CreatureBase<CaveSpider>
ent.setCustomName("Leaping Spider");
Host.Manager.GetCondition().Factory().Speed("Speed", GetEntity(), GetEntity(), 99999, 1, false, false, false);
Move();
}
@Override
@ -47,9 +46,6 @@ public class MobSpiderLeaper extends CreatureBase<CaveSpider>
@Override
public void Update(UpdateEvent event)
{
if (event.getType() == UpdateType.SLOW)
Move();
if (event.getType() == UpdateType.SEC)
Leap();
}
@ -71,7 +67,7 @@ public class MobSpiderLeaper extends CreatureBase<CaveSpider>
UtilAction.velocity(GetEntity(), UtilAlg.getTrajectory2d(GetEntity().getLocation(), GetTarget()), 1, true, 0.6, 0, 10, true);
}
private void Move()
public void Move()
{
//New Target via Distance
if (GetTarget() == null ||
@ -94,21 +90,7 @@ public class MobSpiderLeaper extends CreatureBase<CaveSpider>
//Move
else
{
EntityCreature ec = ((CraftCreature)GetEntity()).getHandle();
Navigation nav = ec.getNavigation();
if (UtilMath.offset(GetEntity().getLocation(), GetTarget()) > 12)
{
Location target = GetEntity().getLocation();
target.add(UtilAlg.getTrajectory(GetEntity().getLocation(), GetTarget()).multiply(12));
nav.a(target.getX(), target.getY(), target.getZ(), 1.6f);
}
else
{
nav.a(GetTarget().getX(), GetTarget().getY(), GetTarget().getZ(), 1.2f);
}
DefaultMove();
}
}
}

View File

@ -1,6 +1,5 @@
package nautilus.game.arcade.game.games.halloween.creatures;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime;
import mineplex.core.disguise.disguises.DisguiseSpider;
@ -8,17 +7,14 @@ import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.Game;
import net.minecraft.server.v1_6_R3.EntityCreature;
import net.minecraft.server.v1_6_R3.Navigation;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
import org.bukkit.entity.Zombie;
import org.bukkit.event.entity.EntityTargetEvent;
public class MobSpiderWebber extends CreatureBase<Zombie>
public class MobSpiderSmasher extends CreatureBase<Zombie> implements InterfaceMove
{
public MobSpiderWebber(Game game, Location loc)
public MobSpiderSmasher(Game game, Location loc)
{
super(game, null, Zombie.class, loc);
}
@ -29,6 +25,8 @@ public class MobSpiderWebber extends CreatureBase<Zombie>
DisguiseSpider spider = new DisguiseSpider(ent);
Host.Manager.GetDisguise().disguise(spider);
ent.setCustomName("Smashing Spider");
Move();
}
@Override
@ -46,14 +44,11 @@ public class MobSpiderWebber extends CreatureBase<Zombie>
@Override
public void Update(UpdateEvent event)
{
if (event.getType() == UpdateType.SLOW)
Move();
if (event.getType() == UpdateType.SLOW)
Speed();
}
private void Move()
public void Move()
{
//New Target via Distance
if (GetTarget() == null ||
@ -76,21 +71,7 @@ public class MobSpiderWebber extends CreatureBase<Zombie>
//Move
else
{
EntityCreature ec = ((CraftCreature)GetEntity()).getHandle();
Navigation nav = ec.getNavigation();
if (UtilMath.offset(GetEntity().getLocation(), GetTarget()) > 12)
{
Location target = GetEntity().getLocation();
target.add(UtilAlg.getTrajectory(GetEntity().getLocation(), GetTarget()).multiply(12));
nav.a(target.getX(), target.getY(), target.getZ(), 1.6f);
}
else
{
nav.a(GetTarget().getX(), GetTarget().getY(), GetTarget().getZ(), 1.2f);
}
DefaultMove();
}
}

View File

@ -1,106 +0,0 @@
package nautilus.game.arcade.game.games.halloween.creatures;
import mineplex.core.common.util.UtilAction;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.Game;
import net.minecraft.server.v1_6_R3.EntityCreature;
import net.minecraft.server.v1_6_R3.Navigation;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
import org.bukkit.entity.ThrownPotion;
import org.bukkit.entity.Witch;
import org.bukkit.event.entity.EntityTargetEvent;
public class MobWitch extends CreatureBase<Witch>
{
public MobWitch(Game game, Location loc)
{
super(game, null, Witch.class, loc);
}
@Override
public void SpawnCustom(Witch ent)
{
Move();
}
@Override
public void Damage(CustomDamageEvent event)
{
}
@Override
public void Update(UpdateEvent event)
{
if (event.getType() == UpdateType.SEC)
Move();
if (event.getType() == UpdateType.SLOW)
Potion();
}
private void Potion()
{
if (GetEntity().getTarget() == null)
return;
ThrownPotion pot = GetEntity().launchProjectile(ThrownPotion.class);
Host.Announce("THROWN");
UtilAction.velocity(pot, UtilAlg.getTrajectory(GetEntity(), GetEntity().getTarget()), 1.2, false, 0, 0.3, 10, false);
}
private void Move()
{
//New Target via Distance
if (GetTarget() == null ||
UtilMath.offset(GetEntity().getLocation(), GetTarget()) < 10 ||
UtilMath.offset2d(GetEntity().getLocation(), GetTarget()) < 6 ||
UtilTime.elapsed(GetTargetTime(), 10000))
{
SetTarget(GetRoamTarget());
return;
}
//Untarget
if (GetEntity().getTarget() != null)
{
if (UtilMath.offset2d(GetEntity(), GetEntity().getTarget()) > 10)
{
GetEntity().setTarget(null);
}
}
//Move
else
{
EntityCreature ec = ((CraftCreature)GetEntity()).getHandle();
Navigation nav = ec.getNavigation();
if (UtilMath.offset(GetEntity().getLocation(), GetTarget()) > 12)
{
Location target = GetEntity().getLocation();
target.add(UtilAlg.getTrajectory(GetEntity().getLocation(), GetTarget()).multiply(12));
nav.a(target.getX(), target.getY(), target.getZ(), 1.6f);
}
else
{
nav.a(GetTarget().getX(), GetTarget().getY(), GetTarget().getZ(), 1.2f);
}
}
}
@Override
public void Target(EntityTargetEvent event)
{
}
}

View File

@ -1,21 +1,17 @@
package nautilus.game.arcade.game.games.halloween.creatures;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
import nautilus.game.arcade.game.Game;
import net.minecraft.server.v1_6_R3.EntityCreature;
import net.minecraft.server.v1_6_R3.Navigation;
import org.bukkit.Location;
import org.bukkit.craftbukkit.v1_6_R3.entity.CraftCreature;
import org.bukkit.entity.Zombie;
import org.bukkit.event.entity.EntityTargetEvent;
public class MobZombie extends CreatureBase<Zombie>
public class MobZombie extends CreatureBase<Zombie> implements InterfaceMove
{
public MobZombie(Game game, Location loc)
{
@ -38,14 +34,11 @@ public class MobZombie extends CreatureBase<Zombie>
@Override
public void Update(UpdateEvent event)
{
if (event.getType() == UpdateType.SLOW)
Move();
if (event.getType() == UpdateType.SLOW)
Speed();
}
private void Move()
public void Move()
{
//New Target via Distance
if (GetTarget() == null ||
@ -68,21 +61,7 @@ public class MobZombie extends CreatureBase<Zombie>
//Move
else
{
EntityCreature ec = ((CraftCreature)GetEntity()).getHandle();
Navigation nav = ec.getNavigation();
if (UtilMath.offset(GetEntity().getLocation(), GetTarget()) > 12)
{
Location target = GetEntity().getLocation();
target.add(UtilAlg.getTrajectory(GetEntity().getLocation(), GetTarget()).multiply(12));
nav.a(target.getX(), target.getY(), target.getZ(), 1f);
}
else
{
nav.a(GetTarget().getX(), GetTarget().getY(), GetTarget().getZ(), 1f);
}
DefaultMove();
}
}

View File

@ -56,22 +56,23 @@ public class PumpkinKing extends CreatureBase<Skeleton>
private ArrayList<Skeleton> _minions = new ArrayList<Skeleton>();
private int _minionsMax = 12; //12
private HashMap<Entity, Player> _minionTargets = new HashMap<Entity, Player>();
private boolean _minionSpawn = true;
private HashMap<Entity, Player> _minionTargets = new HashMap<Entity, Player>();
private HashMap<Skeleton, Long> _minionAttack = new HashMap<Skeleton, Long>();
private ArrayList<Slime> _shields = new ArrayList<Slime>();
private int _shieldsMax = 6; //6
private long _shieldSpawn = 0;
private Location _kingLocation;
private Player _kingTarget = null;
private HashSet<Arrow> _arrows = new HashSet<Arrow>();
public PumpkinKing(Game game, Location loc)
{
super(game, null, Skeleton.class, loc);
_kingLocation = loc;
}
@ -83,7 +84,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
ent.setMaxHealth(400);
ent.setHealth(ent.getMaxHealth());
ent.getWorld().strikeLightningEffect(ent.getLocation());
ent.getWorld().strikeLightningEffect(ent.getLocation());
ent.getWorld().strikeLightningEffect(ent.getLocation());
@ -97,7 +98,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
{
if (event.GetProjectile() != null)
event.GetProjectile().remove();
if (_shields.size() > 0)
{
event.SetCancelled("Shielded");
@ -108,10 +109,10 @@ public class PumpkinKing extends CreatureBase<Skeleton>
event.SetCancelled("Shielded");
UtilPlayer.message(event.GetDamagerPlayer(true), F.main("Boss", "You must destroy " + F.elem("Pumpkin Minions") + " first!"));
}
if (event.GetDamagerPlayer(true) == null)
event.SetCancelled("Non-Player");
event.SetKnockback(false);
}
//Attacked Minion
@ -119,7 +120,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
{
if (event.GetProjectile() != null)
event.GetProjectile().remove();
if (_shields.size() > 0)
{
event.SetCancelled("Shielded");
@ -138,9 +139,9 @@ public class PumpkinKing extends CreatureBase<Skeleton>
if (event.GetCause() != DamageCause.PROJECTILE && event.GetCause() != DamageCause.LIGHTNING)
return;
event.GetProjectile().remove();
if (event.GetDamagerPlayer(true) == null)
return;
@ -175,27 +176,33 @@ public class PumpkinKing extends CreatureBase<Skeleton>
//Minions
if (event.getType() == UpdateType.TICK)
MinionControl();
MinionOrbit();
if (event.getType() == UpdateType.TICK)
MinionAttack();
if (event.getType() == UpdateType.TICK)
MinionAttackDamage();
if (event.getType() == UpdateType.FASTEST)
MinionArrow();
if (event.getType() == UpdateType.FAST)
MinionSpawn();
//Final
if (event.getType() == UpdateType.FAST)
KingControl();
if (event.getType() == UpdateType.SEC)
KingLeap();
if (event.getType() == UpdateType.SEC)
KingBomb();
if (event.getType() == UpdateType.SLOW)
KingTarget();
if (event.getType() == UpdateType.TICK)
KingTrail();
@ -207,6 +214,8 @@ public class PumpkinKing extends CreatureBase<Skeleton>
ShieldSpawn();
}
private void KingTrail()
{
if (GetState() >= 4)
@ -228,7 +237,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
{
if (_kingTarget == null)
_kingTarget = GetRandomPlayer();
GetEntity().setTarget(_kingTarget);
Location loc = _kingTarget.getLocation();
@ -250,31 +259,31 @@ public class PumpkinKing extends CreatureBase<Skeleton>
{
if (GetState() < 4)
return;
if (_kingTarget == null)
return;
if (Math.random() > 0.4)
return;
UtilAction.velocity(GetEntity(), UtilAlg.getTrajectory2d(GetEntity(), _kingTarget), 1.2, false, 0, 0.4, 10, true);
}
private void KingBomb()
{
if (GetState() < 4)
return;
if (_kingTarget == null)
return;
if (Math.random() > 0.4)
return;
TNTPrimed tnt = GetEntity().getWorld().spawn(GetEntity().getEyeLocation().add(GetEntity().getLocation().getDirection()), TNTPrimed.class);
Player target = GetRandomPlayer();
UtilAction.velocity(tnt, UtilAlg.getTrajectory(tnt, target), 1.2, false, 0, 0.4, 10, false);
}
@ -323,79 +332,138 @@ public class PumpkinKing extends CreatureBase<Skeleton>
if (!_minionSpawn)
return;
if (_minions.size() >= _minionsMax)
for (int i=0 ; i<_minionsMax ; i++)
{
_minionSpawn = false;
return;
}
Host.CreatureAllowOverride = true;
Skeleton skel = GetEntity().getWorld().spawn(GetEntity().getLocation(), Skeleton.class);
Host.CreatureAllowOverride = false;
Host.Manager.GetCondition().Factory().Invisible("Cloak", skel, skel, 999999, 0, false, false, false);
Host.CreatureAllowOverride = true;
Skeleton skel = GetEntity().getWorld().spawn(GetEntity().getLocation(), Skeleton.class);
Host.Manager.GetCondition().Factory().Invisible("Cloak", skel, skel, 999999, 0, false, false, false);
skel.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
skel.getEquipment().setItemInHand(new ItemStack(Material.BOW));
skel.setMaxHealth(50);
skel.setHealth(skel.getMaxHealth());
_minions.add(skel);
UtilEnt.Vegetate(skel);
}
skel.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
skel.getEquipment().setItemInHand(new ItemStack(Material.BOW));
skel.setMaxHealth(50);
skel.setHealth(skel.getMaxHealth());
_minions.add(skel);
Host.CreatureAllowOverride = false;
_minionSpawn = false;
}
public void MinionControl()
public void MinionOrbit()
{
if (GetState() != 0 && GetState() != 1 && GetState() != 2)
return;
for (int i=0 ; i<_minions.size() ; i++)
{
Skeleton minion = _minions.get(i);
UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, minion.getEyeLocation(), 0.1f, 0.1f, 0.1f, 0, 1);
minion.setTarget(null);
double lead = i * ((2d * Math.PI)/_minions.size());
double sizeMod = 2 + (_minions.size() / 12);
//Orbit
if (GetState() == 0 || GetState() == 1 || GetState() == 2)
double speed = 20d;
double oX = Math.sin(GetEntity().getTicksLived()/speed + lead) * 2 * sizeMod;
double oY = 1;
double oZ = Math.cos(GetEntity().getTicksLived()/speed + lead) * 2 * sizeMod;
Location loc = GetEntity().getLocation().add(oX, oY, oZ);
if (UtilMath.offset(loc, minion.getLocation()) > 16)
{
minion.setTarget(null);
Host.Manager.GetBlood().Effects(minion.getEyeLocation(), 10, 0.2, Sound.SKELETON_HURT, 1f, 1f, Material.BONE, (byte)0, 20, false);
minion.teleport(loc);
continue;
}
double lead = i * ((2d * Math.PI)/_minions.size());
loc.setYaw(UtilAlg.GetYaw(UtilAlg.getTrajectory(GetEntity(), minion)));
double sizeMod = 2 + (_minions.size() / 12);
//Move
EntityCreature ec = ((CraftCreature)minion).getHandle();
ec.getControllerMove().a(loc.getX(), loc.getY(), loc.getZ(), 1.4);
}
}
//Orbit
double speed = 20d;
double oX = Math.sin(GetEntity().getTicksLived()/speed + lead) * 2 * sizeMod;
double oY = 1;
double oZ = Math.cos(GetEntity().getTicksLived()/speed + lead) * 2 * sizeMod;
public void MinionAttack()
{
if (GetState() != 3)
return;
Location loc = GetEntity().getLocation().add(oX, oY, oZ);
if (UtilMath.offset(loc, minion.getLocation()) > 16)
if (_minions.isEmpty())
return;
Skeleton minion = _minions.remove(0);
LivingEntity target = _minionTargets.get(minion);
if (target == null)
return;
minion.setTarget(target);
Location loc = target.getLocation().add(UtilAlg.getTrajectory(target, minion).multiply(1));
if (UtilMath.offset(loc, minion.getLocation()) > 12)
loc = minion.getLocation().add(UtilAlg.getTrajectory(minion.getLocation(), loc).multiply(12));
//Move
EntityCreature ec = ((CraftCreature)minion).getHandle();
Navigation nav = ec.getNavigation();
nav.a(loc.getX(), loc.getY(), loc.getZ(), 1f);
_minions.add(minion);
}
private void MinionAttackDamage()
{
if (GetState() != 3)
return;
for (int i=0 ; i<_minions.size() ; i++)
{
final Skeleton minion = _minions.get(i);
UtilParticle.PlayParticle(ParticleType.WITCH_MAGIC, minion.getEyeLocation(), 0.1f, 0.1f, 0.1f, 0, 1);
LivingEntity target = _minionTargets.get(minion);
if (target == null)
continue;
if (UtilMath.offset(minion, target) > 2)
continue;
if (_minionAttack.containsKey(minion) && !UtilTime.elapsed(_minionAttack.get(minion), 500))
continue;
//Damage Event
Host.Manager.GetDamage().NewDamageEvent(target, minion, null,
DamageCause.ENTITY_ATTACK, 3, true, true, false,
UtilEnt.getName(minion), GetName());
//Sound
minion.getWorld().playSound(minion.getLocation(), Sound.ENDERMAN_SCREAM, 2f, 2f);
minion.getWorld().playSound(minion.getLocation(), Sound.ENDERMAN_SCREAM, 2f, 2f);
//Visual Start
minion.getEquipment().setHelmet(new ItemStack(Material.JACK_O_LANTERN));
//Visual End
UtilServer.getServer().getScheduler().scheduleSyncDelayedTask(Host.Manager.GetPlugin(), new Runnable()
{
public void run()
{
Host.Manager.GetBlood().Effects(minion.getLocation(), 10, 0.2, Sound.SKELETON_HURT, 1f, 1f, Material.BONE, (byte)0, 20, false);
minion.teleport(loc);
continue;
minion.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
}
}, 4);
//Move
EntityCreature ec = ((CraftCreature)minion).getHandle();
Navigation nav = ec.getNavigation();
nav.a(loc.getX(), loc.getY(), loc.getZ(), 1.2f);
}
//Attack
else
{
LivingEntity target = _minionTargets.get(minion);
if (target == null)
continue;
minion.setTarget(target);
Location loc = target.getLocation();
if (UtilMath.offset(loc, minion.getLocation()) > 12)
loc = minion.getLocation().add(UtilAlg.getTrajectory(minion.getLocation(), loc).multiply(12));
//Move
EntityCreature ec = ((CraftCreature)minion).getHandle();
Navigation nav = ec.getNavigation();
nav.a(loc.getX(), loc.getY(), loc.getZ(), 1f);
}
_minionAttack.put(minion, System.currentTimeMillis());
}
}
@ -406,7 +474,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
while (arrowIterator.hasNext())
{
Arrow arrow = arrowIterator.next();
if (arrow.getLocation().getY() > 30 && arrow.getVelocity().getY() > 0)
{
Player target = Host.GetPlayers(true).get(UtilMath.r(Host.GetPlayers(true).size()));
@ -414,7 +482,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
arrow.setVelocity(arrow.getVelocity().setY(-0.1));
continue;
}
if (arrow.getTicksLived() > 200 || arrow.isOnGround())
{
if (arrow.isValid() && Math.random() > 0.50)
@ -436,7 +504,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
int z = fieldZ.getInt(entityArrow);
Block block = arrow.getWorld().getBlockAt(x, y, z);
if (block.getY() > GetEntity().getLocation().getY())
block.breakNaturally();
}
@ -445,12 +513,12 @@ public class PumpkinKing extends CreatureBase<Skeleton>
e.printStackTrace();
}
}
arrow.remove();
arrowIterator.remove();
}
}
//Circle
if (GetState() == 1)
{
@ -466,11 +534,11 @@ public class PumpkinKing extends CreatureBase<Skeleton>
Arrow arrow = GetEntity().getWorld().spawnArrow(minion.getEyeLocation().add(traj), traj, 2f, 16f);
arrow.setShooter(minion);
_arrows.add(arrow);
}
}
//Up
else if (GetState() == 2)
{
@ -485,7 +553,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
Arrow arrow = GetEntity().getWorld().spawnArrow(minion.getEyeLocation().add(traj), traj, 2f, 16f);
arrow.setShooter(minion);
_arrows.add(arrow);
}
}
@ -508,10 +576,10 @@ public class PumpkinKing extends CreatureBase<Skeleton>
if (!UtilTime.elapsed(_shieldSpawn, 10000))
return;
if (_shields.size() >= _shieldsMax)
return;
//Delay
_shieldSpawn = System.currentTimeMillis();
@ -519,10 +587,10 @@ public class PumpkinKing extends CreatureBase<Skeleton>
if (_shields.size() == 0)
{
toSpawn = _shieldsMax;
//Sound
GetEntity().getWorld().playSound(GetEntity().getLocation(), Sound.WITHER_HURT, 10f, 1.5f);
if (GetEntity().getTicksLived() > 100)
Host.Announce(C.cAqua + C.Bold + "Flame Shield has regenerated!");
}
@ -531,7 +599,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
//Sound
GetEntity().getWorld().playSound(GetEntity().getLocation(), Sound.WITHER_HURT, 1f, 2f);
}
for (int i=0 ; i<toSpawn ; i++)
{
//Spawn
@ -577,7 +645,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
0.4, false, 0, 0.1, 1, true);
}
}
if (_shields.size() > 0)
GetEntity().getWorld().playEffect(GetEntity().getLocation().add(0, 6, 0), Effect.ENDER_SIGNAL, 0);
}
@ -591,29 +659,30 @@ public class PumpkinKing extends CreatureBase<Skeleton>
{
_state = state;
_stateTime = System.currentTimeMillis();
if (state == 3)
{
//Update Gear
for (int i=0 ; i<_minions.size() ; i++)
{
Skeleton minion = _minions.get(i);
minion.getEquipment().setHelmet(new ItemStack(Material.JACK_O_LANTERN));
minion.getEquipment().setItemInHand(new ItemStack(Material.WOOD_AXE));
minion.getEquipment().setItemInHand(null);
//Speed
Host.Manager.GetCondition().Factory().Speed("Minion Speed", minion, minion, 15, 0, false, false, false);
//Sound
GetEntity().getWorld().playSound(GetEntity().getLocation(), Sound.WITHER_SPAWN, 10f, 1.5f);
//Target
_minionTargets.put(minion, GetRandomPlayer());
}
//Announce
Host.Announce(C.cAqua + C.Bold + "Kill the Pumpkin Minions!");
MinionAttack();
}
}
@ -653,7 +722,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
if (UtilTime.elapsed(_stateTime, 20000))
{
SetState(0);
//Update Minions
for (int i=0 ; i<_minions.size() ; i++)
{
@ -662,13 +731,13 @@ public class PumpkinKing extends CreatureBase<Skeleton>
minion.getEquipment().setHelmet(new ItemStack(Material.PUMPKIN));
minion.getEquipment().setItemInHand(new ItemStack(Material.BOW));
}
ShieldSpawn();
_minionTargets.clear();
}
}
//Skeleton Scatter
if (GetState() != 3 && UtilTime.elapsed(_stateTime, 2000))
{
@ -677,23 +746,23 @@ public class PumpkinKing extends CreatureBase<Skeleton>
SetState(3);
}
}
//Final Stage
if (GetState() != 4 && UtilTime.elapsed(_stateTime, 2000))
{
if (_shields.size() == 0 && _minions.size() == 0)
{
SetState(4);
//Announce
Host.Announce(C.cAqua + C.Bold + "Kill the Pumpkin King!!!");
//Sound
GetEntity().getWorld().playSound(GetEntity().getLocation(), Sound.WITHER_SPAWN, 10f, 1.5f);
//Speed
Host.Manager.GetCondition().Factory().Speed("King Speed", GetEntity(), GetEntity(), 9999, 1, false, false, false);
//Equip
GetEntity().getEquipment().setItemInHand(new ItemStack(Material.IRON_SWORD));
}
@ -709,7 +778,7 @@ public class PumpkinKing extends CreatureBase<Skeleton>
event.setCancelled(true);
}
}
if (_minions.contains(event.getEntity()))
{
if (GetState() != 3)
@ -725,22 +794,22 @@ public class PumpkinKing extends CreatureBase<Skeleton>
else
{
Player player = _minionTargets.get(event.getEntity());
if (!player.equals(event.getTarget()))
event.setCancelled(true);
if (!Host.IsAlive(player))
_minionTargets.put(event.getEntity(), GetRandomPlayer());
}
}
}
}
public Player GetRandomPlayer()
{
if (Host.GetPlayers(true).isEmpty())
return null;
return Host.GetPlayers(true).get(UtilMath.r(Host.GetPlayers(true).size()));
}

View File

@ -3,7 +3,7 @@ package nautilus.game.arcade.game.games.halloween.waves;
import mineplex.core.common.util.UtilTime;
import nautilus.game.arcade.game.games.halloween.Halloween;
import nautilus.game.arcade.game.games.halloween.creatures.MobSpiderLeaper;
import nautilus.game.arcade.game.games.halloween.creatures.MobSpiderWebber;
import nautilus.game.arcade.game.games.halloween.creatures.MobSpiderSmasher;
public class Wave3 extends WaveBase
{
@ -19,7 +19,7 @@ public class Wave3 extends WaveBase
return;
if (tick > 200 && tick % 10 == 0 && !UtilTime.elapsed(_start, 35000))
Host.AddCreature(new MobSpiderWebber(Host, GetSpawn()));
Host.AddCreature(new MobSpiderSmasher(Host, GetSpawn()));
if (tick % 8 == 0 && !UtilTime.elapsed(_start, 25000))
Host.AddCreature(new MobSpiderLeaper(Host, GetSpawn()));

View File

@ -12,7 +12,7 @@ public class WaveVictory extends WaveBase
{
public WaveVictory(Halloween host)
{
super(host, "Celebration!", 0, host.GetSpawnSet(3));
super(host, "Celebration!", 15000, host.GetSpawnSet(3));
}
@Override
@ -28,7 +28,7 @@ public class WaveVictory extends WaveBase
//Mobs
for (CreatureBase mob : Host.GetCreatures())
mob.GetEntity().damage(1);
mob.GetEntity().damage(5);
//Time
if (Host.WorldTimeSet != 6000)
@ -37,10 +37,4 @@ public class WaveVictory extends WaveBase
Host.WorldData.World.setTime(Host.WorldTimeSet);
}
}
@Override
public boolean CanEnd()
{
return Host.WorldTimeSet == 6000;
}
}