|
RuneHive-Game
|
Handles miscellaneous methods. More...
Static Public Member Functions | |
| static String | bigDaddyTime (long period) |
| static String | capitalizeSentence (final String string) |
| Capitalize each letter after . | |
| static boolean | checkRequirements (Player player, int[] requirements, String action) |
| static String | convertWord (int amount) |
| Converts an integer into words. | |
| static Position | findAccessableTile (Interactable source) |
| static Position | findBestInside (Interactable source, Interactable target) |
| static void | fixInsidePosition (Mob source, Interactable target) |
| static String | formatDigits (final double amount) |
| Formats digits for doubles. | |
| static String | formatDigits (final int amount) |
| Formats digits for integers. | |
| static String | formatDigits (final long amount) |
| Formats digits for longs. | |
| static String | formatEnum (final String string) |
| Formats name of enum. | |
| static String | formatName (final String input) |
| static String | formatPrice (final long amount) |
| Formats a price for longs. | |
| static String | formatText (String s) |
| static String | getAOrAn (String nextWord) |
| A or an. | |
| static Position[] | getBoundaries (Interactable interactable) |
| static List< Object > | getClassesInDirectory (String directory) |
| Gets all of the classes in a directory. | |
| static int | getCurrentDay () |
| static String | getDate () |
| Gets the date of server. | |
| static Position | getDelta (Interactable source, Interactable target) |
| static Position | getDelta (Position source, int sourceWidth, int sourceLength, Position target, int targetWidth, int targetLength) |
| static Position | getDelta (Position source, Position target) |
| static int | getDistance (Interactable source, Interactable target) |
| static int | getDistance (Interactable source, Position target) |
| static int | getDistance (Position source, int sourceWidth, int sourceLength, Position target, int targetWidth, int targetLength) |
| static Position[] | getInnerBoundaries (Interactable interactable) |
| static Position[] | getInnerBoundaries (Position position, int width, int length) |
| static double | getPercentageAmount (int progress, int total) |
| Gets a percentage amount. | |
| static String | getSimpleDate () |
| Gets the date of server. | |
| static int | getStarters (String host) |
| static List< String > | getSubDirectories (Class<?> clazz) |
| Gets all of the sub directories of a folder. | |
| static String | getTime () |
| Gets the current server time and formats it. | |
| static String | getTime (int ticks) |
| Gets a basic time based off seconds. | |
| static String | getTime (long period) |
| Gets the time based off a long. | |
| static String | getUptime () |
| Gets the current uptime of server and formats it. | |
| static final boolean | goodDistance (int objectX, int objectY, int playerX, int playerY, int distance) |
| static long | hash (String input) |
| static boolean | hasOneOutOf (double chance) |
| static boolean | inRange (int absX, int absY, int size, int targetX, int targetY, int targetSize, int distance) |
| static boolean | inRange (Interactable source, Interactable target, int distance) |
| static boolean | inside (Interactable source, Interactable target) |
| static boolean | inside (Interactable source, Position target) |
| static boolean | inside (Position source, int sourceWidth, int sourceLength, Position target, int targetWidth, int targetLength) |
| static boolean | isLarger (Interactable source, Interactable other) |
| static boolean | isRegionChange (Position position, Position region) |
| static String | longToString (long l) |
| static int | min (int... values) |
| static long | nameToLong (String text) |
| Converts the first 12 characters in a string of text to a hash. | |
| static int | random (int bound) |
| static int | random (int lowerBound, int upperBound) |
| static int | random (int lowerBound, int upperBound, boolean inclusive) |
| static< T > T | randomElement (Collection< T > collection) |
| Picks a random element out of any array type. | |
| static int | randomElement (int[] array) |
| Picks a random element out of any array type. | |
| static< T > T | randomElement (List< T > list) |
| Picks a random element out of any list type. | |
| static< T > T | randomElement (T[] array) |
| Picks a random element out of any array type. | |
| static String | rank (final String string) |
| Formats the player name. | |
| static boolean | setStarter (Player player) |
| static int[] | shuffleArray (int[] array) |
| static long | stringToLong (String string) |
| static boolean | within (Interactable source, Interactable target, int distance) |
| static boolean | within (Position source, int sourceWidth, int sourceLength, Position target, int targetWidth, int targetLength, int distance) |
| static boolean | within (Position source, Position target, int distance) |
| static boolean | withinDistance (Interactable source, Interactable target, int radius) |
| static boolean | withinDistance (Interactable source, Position target, int radius) |
| static boolean | withinOctal (Interactable source, Interactable target, int distance) |
| static boolean | withinOctal (Position source, int sourceWidth, int sourceLength, Position target, int targetWidth, int targetLength, int distance) |
| static boolean | withinViewingDistance (Interactable source, Interactable target, int radius) |
Static Private Attributes | |
| static final Random | RANDOM = new Random(System.currentTimeMillis()) |
| Random instance, used to generate pseudo-random primitive types. | |
| static final char[] | VALID_CHARS = {'_', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '/'} |
| Array of all valid characters. | |
Handles miscellaneous methods.
Definition at line 27 of file Utility.java.
|
static |
Definition at line 150 of file Utility.java.
|
static |
Capitalize each letter after .
Definition at line 99 of file Utility.java.
Referenced by com.runehive.util.tools.wiki.impl.ItemDefParser.format(), formatEnum(), com.runehive.content.skill.guides.SkillGuides.openInterface(), com.runehive.game.world.World.sendBroadcast(), com.runehive.content.gambling.GambleManager.sendRequest(), com.runehive.game.world.entity.skill.SkillData.toString(), and com.runehive.content.Yell.yell().
|
static |
Definition at line 807 of file Utility.java.
References com.runehive.game.world.entity.skill.SkillManager.getMaxLevel(), com.runehive.game.world.entity.skill.Skill.getName(), com.runehive.game.world.entity.mob.player.Player.send(), and com.runehive.game.world.entity.mob.Mob.skills.
Referenced by com.runehive.game.world.items.containers.equipment.Equipment.equip().
|
static |
Converts an integer into words.
Definition at line 136 of file Utility.java.
References com.runehive.util.Words.getInstance(), and com.runehive.util.Words.getNumberInWords().
Referenced by com.runehive.game.world.entity.mob.player.PlayerAssistant.useROW().
|
static |
Definition at line 478 of file Utility.java.
References getBoundaries(), com.runehive.game.world.entity.mob.Direction.getDirection(), com.runehive.game.world.Interactable.getPosition(), inside(), com.runehive.game.world.pathfinding.TraversalMap.isTraversable(), com.runehive.game.world.Interactable.length(), and com.runehive.game.world.Interactable.width().
Referenced by com.runehive.content.pet.Pets.onObtain(), and com.runehive.content.pet.Pets.onSpawn().
|
static |
Definition at line 498 of file Utility.java.
References com.runehive.game.world.position.Position.equals(), com.runehive.game.world.entity.mob.Direction.getDirection(), com.runehive.game.world.entity.mob.Direction.getDirectionX(), com.runehive.game.world.entity.mob.Direction.getDirectionY(), getDistance(), com.runehive.game.world.Interactable.getPosition(), com.runehive.game.world.Interactable.getX(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.Interactable.getY(), com.runehive.game.world.position.Position.getY(), com.runehive.game.world.Interactable.length(), com.runehive.game.world.position.Position.transform(), and com.runehive.game.world.Interactable.width().
Referenced by com.runehive.game.world.pathfinding.path.impl.SimplePathFinder.addWalks(), com.runehive.game.world.pathfinding.path.SimplePathChecker.checkLine(), com.runehive.game.world.pathfinding.path.SimplePathChecker.checkProjectile(), com.runehive.game.world.pathfinding.path.impl.DijkstraPathFinder.find(), com.runehive.game.world.entity.mob.movement.waypoint.WalkToWaypoint.onDestination(), com.runehive.game.world.entity.combat.strategy.npc.boss.Callisto.Roar.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Derwen.LightingRain.start(), and com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Justiciar.LightingRain.start().
|
static |
Definition at line 567 of file Utility.java.
References com.runehive.game.world.entity.mob.movement.Movement.addPath(), getBoundaries(), getDelta(), com.runehive.game.world.entity.mob.Direction.getDirection(), com.runehive.game.world.entity.mob.Direction.getFaceLocation(), com.runehive.game.world.entity.Entity.getPosition(), com.runehive.game.world.Interactable.getPosition(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.position.Position.getY(), inside(), com.runehive.game.world.pathfinding.TraversalMap.isTraversable(), com.runehive.game.world.entity.Entity.length, com.runehive.game.world.Interactable.length(), com.runehive.game.world.entity.mob.Mob.movement, com.runehive.game.world.entity.mob.movement.Movement.needsPlacement(), com.runehive.game.world.entity.mob.Direction.NONE, random(), com.runehive.game.world.entity.mob.Mob.setFixingInside(), com.runehive.game.world.position.Position.transform(), com.runehive.game.world.entity.Entity.width, and com.runehive.game.world.Interactable.width().
Referenced by com.runehive.game.world.entity.mob.movement.waypoint.Waypoint.execute().
|
static |
Formats digits for doubles.
Definition at line 51 of file Utility.java.
|
static |
Formats digits for integers.
Definition at line 41 of file Utility.java.
Referenced by com.runehive.content.clanchannel.channel.ClanChannel.activateAchievement(), com.runehive.game.world.entity.mob.player.PlayerAssistant.activateSkilling(), com.runehive.content.clanchannel.channel.ClanChannel.activateTask(), com.runehive.game.world.items.containers.bank.BankVault.add(), com.runehive.content.clanchannel.channel.ClanChannel.addExperience(), com.runehive.content.combat.Killstreak.announce(), com.runehive.content.triviabot.TriviaBot.answered(), com.runehive.content.tradingpost.TradingPost.buyingDialogueOptions(), com.runehive.content.pet.Pets.buyInsurance(), com.runehive.content.itemaction.impl.MagmaHelm.charge(), com.runehive.content.itemaction.impl.SerpentineHelm.charge(), com.runehive.content.itemaction.impl.TanzaniteHelm.charge(), com.runehive.content.itemaction.impl.ToxicBlowpipe.charge(), com.runehive.content.itemaction.impl.CelestialRing.check(), com.runehive.content.itemaction.impl.CrawsBow.check(), com.runehive.content.itemaction.impl.ThammaronsSceptre.check(), com.runehive.content.itemaction.impl.TridentOfTheSeas.check(), com.runehive.content.itemaction.impl.TridentOfTheSwamp.check(), com.runehive.content.itemaction.impl.ViggorasChainmace.check(), com.runehive.content.pet.Pets.claimLostPets(), com.runehive.content.dialogue.impl.ClanmasterDialogue.clanLevel(), com.runehive.content.dialogue.impl.ClanmasterDialogue.clanTask(), com.runehive.content.WellOfGoodwill.contribute(), com.runehive.content.skill.impl.magic.RunePouch.deposit(), com.runehive.game.world.items.containers.bank.BankVault.deposit(), com.runehive.content.DropDisplay.display(), com.runehive.content.skill.impl.construction.BuildableInterface.display(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.drop(), com.runehive.content.combat.Killstreak.end(), com.runehive.content.dialogue.impl.VoteDialogue.exchange(), com.runehive.content.skill.impl.thieving.Thieving.exchange(), com.runehive.content.activity.impl.barrows.BarrowsUtility.generateRewards(), com.runehive.content.clanchannel.content.ClanViewer.getDetails(), com.runehive.content.clanchannel.content.ClanViewer.getProfile(), com.runehive.content.store.currency.CurrencyType.getValue(), com.runehive.net.packet.in.ExaminePacketListener.handleInterfaceExamine(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.handleMessages(), com.runehive.content.itemaction.impl.ToxicBlowpipe.load(), com.runehive.content.store.impl.PersonalStore.modify(), com.runehive.content.skill.impl.slayer.SlayerOfferings.offer(), com.runehive.game.world.items.containers.impl.LootingBag.onRefresh(), com.runehive.game.world.items.containers.pricechecker.PriceChecker.onRefresh(), com.runehive.content.ActivityLogger.open(), com.runehive.content.ItemsKeptOnDeath.open(), com.runehive.content.RoyaltyProgram.open(), com.runehive.content.WellOfGoodwill.open(), com.runehive.game.world.items.containers.bank.BankVault.open(), com.runehive.content.pet.Pets.openInsurance(), com.runehive.game.world.items.containers.equipment.Equipment.openInterface(), com.runehive.content.pet.Pets.openLostPets(), com.runehive.content.store.impl.PersonalStore.openMenu(), com.runehive.content.donators.Donation.redeem(), com.runehive.content.skill.impl.slayer.SlayerTab.refresh(), com.runehive.content.activity.impl.duelarena.DuelArenaActivity.reward(), com.runehive.content.combat.Killstreak.reward(), com.runehive.game.world.items.containers.pricechecker.PriceChecker.search(), com.runehive.game.world.items.containers.pricechecker.PriceChecker.searchItem(), com.runehive.content.dialogue.impl.WellOfGoodwillDialogue.sendDialogues(), com.runehive.content.tradingpost.TradingPost.sendItemHistoryData(), com.runehive.content.store.Store.sendPurchaseValue(), com.runehive.content.store.Store.sendSellValue(), com.runehive.content.clanchannel.channel.ClanChannel.splitLoot(), com.runehive.content.skill.impl.slayer.Slayer.store(), com.runehive.content.ProfileViewer.string(), com.runehive.content.itemaction.impl.MagmaHelm.uncharge(), com.runehive.content.itemaction.impl.SerpentineHelm.uncharge(), com.runehive.content.itemaction.impl.TanzaniteHelm.uncharge(), com.runehive.content.itemaction.impl.ToxicBlowpipe.uncharge(), com.runehive.content.activity.impl.fightcaves.FightCaves.update(), com.runehive.content.activity.inferno.Inferno.update(), com.runehive.content.tradingpost.TradingPost.updateBuyingPageWidgets(), com.runehive.game.world.entity.mob.player.exchange.trade.TradeSession.updateOfferComponents(), com.runehive.content.tradingpost.TradingPost.updatePriceStrings(), com.runehive.game.world.items.containers.bank.BankVault.value(), and com.runehive.game.world.items.containers.bank.BankVault.withdraw().
|
static |
Formats digits for longs.
Definition at line 46 of file Utility.java.
|
static |
Formats name of enum.
Definition at line 89 of file Utility.java.
References capitalizeSentence().
Referenced by com.runehive.content.ActivityLogger.add(), com.runehive.content.clanchannel.channel.ClanChannel.addExperience(), com.runehive.content.dialogue.impl.ClanmasterDialogue.clanLevel(), com.runehive.content.skill.impl.mining.Mining.clickObject(), com.runehive.content.simulator.DropSimulator.drawList(), com.runehive.content.clanchannel.content.ClanViewer.getDetails(), com.runehive.content.ActivityLogger.open(), com.runehive.content.skill.impl.crafting.impl.Tanning.open(), com.runehive.content.donators.Donation.redeem(), com.runehive.content.activity.record.PlayerRecord.showActivities(), com.runehive.game.world.entity.mob.npc.drop.NpcDropChance.toString(), com.runehive.content.emote.EmoteHandler.unlock(), and com.runehive.content.clanchannel.content.ClanViewer.viewAchievements().
|
static |
Definition at line 645 of file Utility.java.
Referenced by com.runehive.game.world.entity.mob.player.relations.PlayerRelation.addFriend(), com.runehive.game.world.entity.mob.player.relations.PlayerRelation.addIgnore(), com.runehive.content.dialogue.DialogueFactory.appendKeywords(), com.runehive.game.world.entity.combat.CombatUtil.canAttack(), com.runehive.content.store.impl.PersonalStore.changeName(), com.runehive.content.clanchannel.channel.ClanChannelHandler.connected(), com.runehive.game.world.entity.mob.player.relations.PlayerRelation.deleteFriend(), com.runehive.game.world.entity.mob.player.relations.PlayerRelation.deleteIgnore(), com.runehive.content.activity.record.PlayerRecord.display(), com.runehive.content.skill.impl.construction.House.enter(), com.runehive.content.clanchannel.content.ClanViewer.getDetails(), com.runehive.game.world.entity.mob.player.Player.getName(), com.runehive.content.itemaction.impl.DrillDemonBox.inventory(), com.runehive.content.itemaction.impl.MimeBox.inventory(), com.runehive.content.clanchannel.content.ClanViewer.open(), com.runehive.content.tittle.TitleManager.refresh(), com.runehive.game.world.entity.mob.player.Player.register(), com.runehive.game.world.entity.mob.player.requests.RequestManager.request(), com.runehive.content.famehall.FameHandler.search(), com.runehive.content.dialogue.DialogueFactory.sendPlayerChat(), com.runehive.content.clanchannel.channel.ClanChannel.setName(), com.runehive.content.clanchannel.channel.ClanChannel.setSlogan(), com.runehive.game.world.entity.combat.strategy.npc.boss.ChaosFanatic.RainAttack.start(), com.runehive.content.activity.impl.duelarena.DuelArenaActivity.DuelPanel.update(), com.runehive.game.world.entity.mob.player.exchange.trade.TradeSession.updateMainComponents(), com.runehive.content.clanchannel.channel.ClanChannelHandler.updateMemberList(), com.runehive.game.world.entity.mob.player.exchange.duel.StakeSession.updateOfferComponents(), and com.runehive.game.world.entity.mob.player.exchange.trade.TradeSession.updateOfferComponents().
|
static |
Formats a price for longs.
Definition at line 56 of file Utility.java.
Referenced by com.runehive.content.store.impl.PersonalStore.openMenu(), com.runehive.game.world.items.containers.bank.Bank.sendValue(), com.runehive.content.ProfileViewer.string(), and com.runehive.game.world.items.containers.bank.BankVault.withdraw().
|
static |
Definition at line 682 of file Utility.java.
Referenced by com.runehive.content.gambling.impl.FlowerPoker.plant().
|
static |
A or an.
Definition at line 116 of file Utility.java.
Referenced by com.runehive.content.skill.impl.crafting.impl.Glass.blow(), com.runehive.util.parser.old.defs.EquipmentRequirement.canEquip(), com.runehive.content.skill.impl.hunter.net.Netting.canSchedule(), com.runehive.content.skill.impl.crafting.impl.Jewellery.click(), com.runehive.content.skill.impl.herblore.Herblore.clickItem(), com.runehive.content.skill.impl.construction.House.construct(), com.runehive.content.skill.impl.crafting.impl.Glass.craft(), com.runehive.content.skill.impl.crafting.impl.Jewellery.craft(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.drop(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.handleMessages(), com.runehive.content.skill.impl.fishing.Fishing.hasFishingItems(), com.runehive.content.skill.impl.farming.patches.FarmingPatch.inspect(), com.runehive.content.skill.impl.mining.MiningAction.mine(), com.runehive.content.mysterybox.MysteryBoxEvent.reward(), com.runehive.content.skill.impl.woodcutting.BirdsNest.search(), com.runehive.game.world.entity.skill.SkillManager.showLevelUpInterface(), com.runehive.content.skill.impl.crafting.impl.Spinning.spin(), com.runehive.content.skill.impl.crafting.Crafting.start(), com.runehive.content.skill.impl.fletching.Fletching.start(), com.runehive.content.skill.impl.crafting.impl.Stringing.string(), com.runehive.content.donators.Donation.updateRank(), com.runehive.game.world.entity.skill.SkillManager.updateSkill(), com.runehive.content.skill.impl.crafting.Crafting.useItem(), and com.runehive.content.skill.impl.fletching.Fletching.useItem().
|
static |
Definition at line 605 of file Utility.java.
References com.runehive.game.world.Interactable.getPosition(), com.runehive.game.world.Interactable.length(), com.runehive.game.world.position.Position.transform(), and com.runehive.game.world.Interactable.width().
Referenced by findAccessableTile(), and fixInsidePosition().
|
static |
Gets all of the classes in a directory.
Definition at line 284 of file Utility.java.
|
static |
Definition at line 891 of file Utility.java.
Referenced by com.runehive.content.dailyeffect.DailyEffect.canUse(), and com.runehive.content.dailyeffect.DailyEffect.use().
|
static |
Gets the date of server.
Definition at line 126 of file Utility.java.
Referenced by com.runehive.content.famehall.FameHandler.activate().
|
static |
Definition at line 459 of file Utility.java.
References getDelta(), com.runehive.game.world.Interactable.getPosition(), com.runehive.game.world.Interactable.length(), and com.runehive.game.world.Interactable.width().
|
static |
Definition at line 421 of file Utility.java.
References com.runehive.game.world.position.Position.create(), com.runehive.game.world.position.Position.getHeight(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.position.Position.getY(), and com.runehive.game.world.position.Position.transform().
Referenced by fixInsidePosition(), and getDelta().
Definition at line 463 of file Utility.java.
References com.runehive.game.world.position.Position.create(), com.runehive.game.world.position.Position.getX(), and com.runehive.game.world.position.Position.getY().
|
static |
Definition at line 455 of file Utility.java.
References getDistance(), com.runehive.game.world.Interactable.getPosition(), com.runehive.game.world.Interactable.length(), and com.runehive.game.world.Interactable.width().
|
static |
Definition at line 363 of file Utility.java.
References com.runehive.game.world.Interactable.getPosition(), com.runehive.game.world.Interactable.getX(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.Interactable.getY(), com.runehive.game.world.position.Position.getY(), com.runehive.game.world.Interactable.length(), com.runehive.game.world.position.Position.transform(), and com.runehive.game.world.Interactable.width().
Referenced by com.runehive.game.world.entity.combat.CombatUtil.areaAction(), com.runehive.game.world.entity.combat.CombatTarget.checkAggression(), com.runehive.game.world.entity.combat.CombatTarget.checkAggression(), com.runehive.game.world.entity.combat.CombatTarget.compare(), findBestInside(), com.runehive.game.world.entity.mob.movement.waypoint.Waypoint.findRoute(), com.runehive.game.world.region.RegionManager.forNearbyPlayer(), com.runehive.game.world.region.RegionManager.forNearbyPlayer(), getDistance(), com.runehive.game.world.position.Position.getManhattanDistance(), com.runehive.game.world.entity.combat.CombatUtil.getOldHitDelay(), com.runehive.game.world.entity.combat.CombatTarget.setTarget(), com.runehive.content.activity.impl.kraken.KrakenActivityListener.withinDistance(), com.runehive.game.world.entity.mob.movement.waypoint.CombatWaypoint.withinDistance(), and com.runehive.game.world.entity.mob.movement.waypoint.Waypoint.withinDistance().
|
static |
Definition at line 387 of file Utility.java.
References com.runehive.game.world.position.Position.getHeight(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.position.Position.getY(), and com.runehive.game.world.position.Position.transform().
|
static |
Definition at line 632 of file Utility.java.
References com.runehive.game.world.Interactable.getPosition(), com.runehive.game.world.Interactable.length(), com.runehive.game.world.position.Position.transform(), and com.runehive.game.world.Interactable.width().
|
static |
Definition at line 621 of file Utility.java.
References com.runehive.game.world.position.Position.transform().
Referenced by com.runehive.content.pet.Pets.abandon(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vetion.finishIncoming(), com.runehive.content.activity.infernomobs.JalTokJad.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.scorpia.Scorpia.hit(), com.runehive.content.activity.impl.magearena.MageArena.meteors(), com.runehive.game.world.entity.combat.strategy.npc.boss.Hydra.poisonAttack(), com.runehive.game.world.entity.mob.npc.Npc.register(), com.runehive.content.bloodmoney.BloodMoneyChest.spawn(), com.runehive.content.activity.impl.fightcaves.FightCaves.start(), com.runehive.content.activity.impl.recipefordisaster.RecipeForDisaster.start(), com.runehive.content.activity.inferno.Inferno.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Cerberus.LavaAttack.start(), and com.runehive.game.world.entity.combat.strategy.npc.boss.Vetion.Magic.start().
|
static |
Gets a percentage amount.
Definition at line 36 of file Utility.java.
Referenced by com.runehive.content.activity.impl.fightcaves.FightCavesListener.block(), com.runehive.content.activity.inferno.InfernoCavesListener.block(), com.runehive.content.WellOfGoodwill.open(), com.runehive.content.activity.impl.barrows.Barrows.update(), com.runehive.content.activity.impl.duelarena.DuelArenaActivity.DuelPanel.update(), com.runehive.content.activity.impl.fightcaves.FightCaves.update(), com.runehive.content.activity.impl.magearena.MageArena.update(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.PestControlPanel.update(), com.runehive.content.activity.impl.recipefordisaster.RecipeForDisaster.update(), com.runehive.content.activity.impl.warriorguild.WarriorGuild.update(), com.runehive.content.activity.inferno.Inferno.update(), com.runehive.game.action.impl.TutorialActivity.update(), and com.runehive.content.clanchannel.content.ClanViewer.viewAchievements().
|
static |
Gets the date of server.
Definition at line 131 of file Utility.java.
Referenced by com.runehive.content.clanchannel.channel.ClanChannel.create(), com.runehive.content.clanchannel.channel.ClanChannel.establish(), and com.runehive.content.activity.record.GameRecord.GameRecord().
|
static |
Definition at line 825 of file Utility.java.
Referenced by setStarter().
|
static |
Gets all of the sub directories of a folder.
Definition at line 316 of file Utility.java.
|
static |
Gets the current server time and formats it.
Definition at line 141 of file Utility.java.
Referenced by com.runehive.content.activity.record.PlayerRecord.display(), com.runehive.content.activity.impl.fightcaves.FightCaves.finish(), com.runehive.content.activity.impl.kraken.KrakenActivity.finish(), com.runehive.content.activity.impl.magearena.MageArena.finish(), com.runehive.content.activity.impl.recipefordisaster.RecipeForDisaster.finish(), com.runehive.content.activity.impl.VorkathActivity.finish(), com.runehive.content.activity.impl.zulrah.ZulrahActivity.finish(), com.runehive.content.activity.inferno.Inferno.finish(), getUptime(), com.runehive.content.ProfileViewer.string(), com.runehive.content.activity.impl.duelarena.DuelArenaActivity.DuelPanel.update(), com.runehive.content.activity.impl.magearena.MageArena.update(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.PestControlPanel.update(), com.runehive.content.activity.impl.recipefordisaster.RecipeForDisaster.update(), and com.runehive.content.activity.inferno.Inferno.update().
|
static |
Gets a basic time based off seconds.
Definition at line 160 of file Utility.java.
|
static |
Gets the time based off a long.
Definition at line 146 of file Utility.java.
|
static |
Gets the current uptime of server and formats it.
Definition at line 155 of file Utility.java.
References com.runehive.util.Stopwatch.elapsedTime(), getTime(), and com.runehive.RuneHive.UPTIME.
|
static |
Definition at line 903 of file Utility.java.
Referenced by com.runehive.content.wintertodt.Wintertodt.breakBrazier(), com.runehive.content.wintertodt.Wintertodt.doMagicAttack(), and com.runehive.game.world.entity.mob.player.Player.loadRegion().
|
static |
Definition at line 217 of file Utility.java.
References hash().
Referenced by com.runehive.net.packet.out.SendPlayerUpdate.appendAppearanceMask(), hash(), and nameToLong().
|
static |
Definition at line 257 of file Utility.java.
References random().
Referenced by com.runehive.game.world.entity.mob.player.PlayerAssistant.activateSkilling(), com.runehive.content.skill.impl.mining.MiningAction.handleCelestialRing(), and com.runehive.game.world.entity.combat.strategy.npc.boss.Hydra.hit().
|
static |
Definition at line 910 of file Utility.java.
Referenced by inRange(), com.runehive.game.world.entity.combat.strategy.basic.MagicStrategy< T extends Mob >.withinDistance(), com.runehive.game.world.entity.combat.strategy.basic.MeleeStrategy< T extends Mob >.withinDistance(), and com.runehive.game.world.entity.combat.strategy.basic.RangedStrategy< T extends Mob >.withinDistance().
|
static |
Definition at line 946 of file Utility.java.
References com.runehive.game.world.Interactable.getX(), com.runehive.game.world.Interactable.getY(), inRange(), and com.runehive.game.world.Interactable.width().
|
static |
Definition at line 783 of file Utility.java.
References com.runehive.game.world.Interactable.getPosition(), inside(), com.runehive.game.world.Interactable.length(), and com.runehive.game.world.Interactable.width().
Referenced by com.runehive.game.world.entity.combat.Combat< T extends Mob >.checkWithin(), com.runehive.content.activity.impl.zulrah.ZulrahActivity.cloudEffect(), com.runehive.game.world.entity.mob.movement.waypoint.Waypoint.execute(), findAccessableTile(), fixInsidePosition(), inside(), inside(), com.runehive.content.skill.impl.farming.zones.FarmingZone.isViewable(), com.runehive.game.world.region.Region.reachable(), com.runehive.game.world.pathfinding.path.impl.SimplePathFinder.traversable(), and com.runehive.content.skill.impl.farming.patches.FarmingPatch.within().
|
static |
Definition at line 787 of file Utility.java.
References com.runehive.game.world.Interactable.getPosition(), inside(), com.runehive.game.world.Interactable.length(), and com.runehive.game.world.Interactable.width().
|
static |
Definition at line 791 of file Utility.java.
References com.runehive.game.world.position.Position.equals(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.position.Position.getY(), and com.runehive.game.world.position.Position.transform().
|
static |
Definition at line 821 of file Utility.java.
References com.runehive.game.world.Interactable.length(), and com.runehive.game.world.Interactable.width().
Definition at line 343 of file Utility.java.
References com.runehive.game.world.position.Position.getChunkX(), com.runehive.game.world.position.Position.getChunkY(), com.runehive.game.world.position.Position.getX(), and com.runehive.game.world.position.Position.getY().
Referenced by com.runehive.game.world.entity.mob.Mob.move().
|
static |
Definition at line 202 of file Utility.java.
References VALID_CHARS.
Referenced by com.runehive.game.world.entity.mob.player.relations.PlayerRelation.addFriend(), com.runehive.game.world.entity.mob.player.relations.PlayerRelation.addIgnore(), com.runehive.game.world.entity.mob.player.relations.PlayerRelation.deleteFriend(), and com.runehive.game.world.entity.mob.player.relations.PlayerRelation.deleteIgnore().
|
static |
Definition at line 895 of file Utility.java.
Referenced by com.runehive.content.wintertodt.Wintertodt.mixHerb().
|
static |
Converts the first 12 characters in a string of text to a hash.
Definition at line 185 of file Utility.java.
References hash().
Referenced by com.runehive.net.session.LoginSession.evaluate(), com.runehive.game.world.entity.mob.player.Player.Player(), and com.runehive.game.world.entity.mob.player.Player.setUsername().
|
static |
Definition at line 239 of file Utility.java.
References random().
Referenced by com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.VenomSpecial.AcidTask(), com.runehive.content.Obelisks.activate(), com.runehive.content.triviabot.TriviaBot.answer(), com.runehive.content.triviabot.TriviaBot.answered(), com.runehive.content.wintertodt.Wintertodt.applyColdDamage(), com.runehive.content.skill.impl.slayer.Slayer.assign(), com.runehive.content.wintertodt.Wintertodt.attackPyromancers(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Porazdir.block(), com.runehive.content.skill.impl.firemaking.Firemaking.bonfireAction(), com.runehive.content.wintertodt.Wintertodt.breakBrazier(), com.runehive.game.world.entity.combat.attack.listener.npc.dragon.BrutalDragon.canAttack(), com.runehive.game.world.entity.combat.strategy.npc.boss.Cerberus.canAttack(), com.runehive.content.skill.impl.thieving.WallSafe.chance(), com.runehive.content.skill.impl.woodcutting.WoodcuttingAction.chop(), com.runehive.content.skill.impl.hunter.Hunter.clickItem(), com.runehive.content.skill.impl.thieving.Thieving.clickNpc(), com.runehive.content.skill.impl.thieving.Thieving.clickObject(), com.runehive.content.skill.impl.thieving.WallSafe.crack(), com.runehive.content.skill.impl.crafting.Crafting.craft(), com.runehive.content.wintertodt.Wintertodt.doMagicAttack(), com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.VenomSpecial.dragonFireTickableTask(), com.runehive.content.skill.impl.woodcutting.BirdsNest.drop(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.drop(), com.runehive.content.skill.impl.agility.obstacle.ObstacleInteraction.execute(), com.runehive.content.skill.impl.hunter.net.Netting.execute(), com.runehive.content.skill.impl.thieving.PickpocketAction.execute(), com.runehive.content.wintertodt.Wintertodt.extinguishBraziers(), com.runehive.content.activity.inferno.Inferno.finish(), com.runehive.game.world.entity.combat.attack.listener.npc.dragon.BrutalDragon.finishOutgoing(), com.runehive.content.skill.impl.fishing.FishingAction.fish(), fixInsidePosition(), com.runehive.content.skill.impl.fletching.Fletching.fletch(), com.runehive.content.gambling.impl.FiftyFive.gamble(), com.runehive.content.gambling.impl.FlowerPoker.gamble(), com.runehive.content.lms.LMSGame.gearUpPlayers(), com.runehive.content.activity.impl.barrows.BarrowsUtility.generateRewards(), com.runehive.content.clanchannel.content.ClanTask.getAmount(), com.runehive.game.world.entity.combat.strategy.npc.boss.LizardShaman.AcidAttack.getHits(), com.runehive.content.Obelisks.ObeliskData.getRandom(), com.runehive.game.world.entity.mob.Direction.getRandomDirection(), com.runehive.game.world.position.impl.SquareArea.getRandomLocation(), com.runehive.content.activity.impl.fightcaves.FightCaves.handleDeath(), com.runehive.content.activity.inferno.Inferno.handleDeath(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.handleMiscDrops(), hasOneOutOf(), com.runehive.game.world.entity.combat.attack.listener.item.AhrimListener.hit(), com.runehive.game.world.entity.combat.attack.listener.item.ToragListener.hit(), com.runehive.game.world.entity.combat.attack.listener.npc.SergeantStrongstack.hit(), com.runehive.game.world.entity.combat.strategy.npc.boss.MutantTarn.FrozenSpecial.hit(), com.runehive.content.itemaction.impl.DrillDemonBox.inventory(), com.runehive.content.itemaction.impl.MimeBox.inventory(), com.runehive.content.skill.SkillRepository.isSuccess(), com.runehive.content.skill.SkillRepository.isSuccess(), com.runehive.content.skill.SkillRepository.isSuccess(), com.runehive.game.world.items.Item.Item(), com.runehive.content.lms.lobby.LMSLobby.leaveLobby(), com.runehive.content.lms.loadouts.LMSLoadoutManager.load(), com.runehive.content.skill.impl.hunter.trap.TrapManager.lootTrap(), com.runehive.content.activity.impl.magearena.MageArena.meteors(), com.runehive.content.skill.impl.mining.MiningAction.mine(), com.runehive.content.skill.impl.herblore.Herblore.mix(), com.runehive.content.lms.LMSGame.moveToGame(), com.runehive.content.mysterybox.MysteryBoxEvent.MysteryBoxEvent(), com.runehive.util.parser.impl.NpcForceChatParser.ForcedMessage.nextMessage(), com.runehive.content.activity.impl.magearena.MageArena.onDeath(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.onDeath(), com.runehive.content.skill.impl.firemaking.FiremakingAction.onDestruct(), com.runehive.content.pet.Pets.onReward(), com.runehive.content.pet.Pets.onReward(), com.runehive.game.world.entity.combat.strategy.npc.boss.Hydra.poisonTask(), com.runehive.game.world.entity.mob.npc.NpcDeath.postDeath(), com.runehive.content.wintertodt.Wintertodt.pyromancerText(), random(), random(), com.runehive.content.skill.impl.thieving.WallSafe.rate(), com.runehive.content.skill.impl.hunter.birdhouse.Birdhouses.receiveLoot(), com.runehive.content.lms.LMSGame.reset(), com.runehive.content.lms.LMSGame.rollChest(), com.runehive.content.skill.impl.prayer.BoneSacrifice.sacrifice(), com.runehive.content.skill.impl.hunter.trap.TrapExecution.setTrapProcess(), com.runehive.content.lms.LMSGame.setupSafezone(), com.runehive.content.lms.crate.LMSCrate.spawn(), com.runehive.content.activity.impl.magearena.MageArena.start(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.PestControlNode.start(), com.runehive.content.activity.inferno.Inferno.start(), com.runehive.game.world.entity.combat.attack.listener.npc.CommanderZilyana.start(), com.runehive.game.world.entity.combat.attack.listener.npc.KrilTsutsaroth.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.Callisto.Roar.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.LizardShaman.JumpAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.LizardShaman.MinionsAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Derwen.LightingRain.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Derwen.Magic.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Justiciar.LightingRain.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Justiciar.Magic.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Justiciar.TeleGrab.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Porazdir.Magic.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo.Skotizo.LightingRain.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo.Skotizo.Magic.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.StoneGuardian.BoomAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.StoneGuardian.PrayerAttack.start(), com.runehive.content.skill.impl.cooking.Cooking.success(), com.runehive.content.skill.impl.mining.Mining.success(), com.runehive.game.task.impl.CeillingCollapseTask.tick(), and com.runehive.content.activity.randomevent.RandomEventHandler.trigger().
|
static |
Definition at line 243 of file Utility.java.
References random().
|
static |
Definition at line 275 of file Utility.java.
References RANDOM.
|
static |
Picks a random element out of any array type.
Definition at line 248 of file Utility.java.
References RANDOM.
Referenced by com.runehive.content.pet.Pets.abandon(), com.runehive.content.skill.impl.slayer.SlayerTask.assign(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Justiciar.block(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.Porazdir.block(), com.runehive.game.world.entity.combat.CombatTarget.checkAggression(), com.runehive.content.skill.impl.hunter.Hunter.clickItem(), com.runehive.content.skill.impl.thieving.Thieving.clickNpc(), com.runehive.content.skill.impl.runecrafting.Runecraft.clickObject(), com.runehive.content.skill.impl.thieving.WallSafe.crack(), com.runehive.game.world.entity.mob.player.PlayerDeath.death(), com.runehive.content.skill.impl.woodcutting.BirdsNest.drop(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.drop(), com.runehive.content.skill.impl.thieving.PickpocketAction.execute(), com.runehive.game.task.impl.MessageEvent.execute(), com.runehive.content.bot.objective.impl.RestockObjective.finish(), com.runehive.game.world.entity.combat.strategy.npc.boss.ChaosFanatic.finishOutgoing(), com.runehive.game.world.entity.combat.strategy.npc.boss.CrazyArchaeologist.finishOutgoing(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.DerwenUtility.SpawnData.generate(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.JusticarUtility.SpawnData2.generate(), com.runehive.game.world.entity.combat.strategy.npc.boss.magearena.PorazdirUtility.SpawnData.generate(), com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo.SkotizoUtility.SpawnData.generate(), com.runehive.content.activity.impl.barrows.BarrowsUtility.generateRewards(), com.runehive.content.clanchannel.content.ClanTask.getAssignment(), com.runehive.content.activity.impl.magearena.MageArena.getAvailablePosition(), com.runehive.content.activity.impl.zulrah.ZulrahActivity.getCloudPosition(), com.runehive.content.activity.impl.barrows.BarrowsUtility.getHiddenBrother(), com.runehive.content.preloads.RandomItem.getItem(), com.runehive.content.activity.impl.zulrah.ZulrahActivity.getSnakelingPosition(), com.runehive.game.world.entity.mob.npc.drop.NpcDropManager.handleMiscDrops(), com.runehive.game.world.entity.combat.attack.listener.npc.SergeantStrongstack.hit(), com.runehive.content.bot.objective.impl.CombatObjective.init(), com.runehive.content.itemaction.impl.ClanShowcaseBox.inventory(), com.runehive.content.itemaction.impl.DrillDemonBox.inventory(), com.runehive.content.itemaction.impl.MimeBox.inventory(), com.runehive.content.bot.PlayerBot.loopCombat(), com.runehive.content.bot.BotUtility.nameGenerator(), com.runehive.content.activity.impl.zulrah.ZulrahActivity.nextPhase(), com.runehive.content.DropDisplay.open(), com.runehive.content.simulator.DropSimulator.open(), com.runehive.content.skill.impl.woodcutting.BirdsNest.search(), com.runehive.content.emote.EmoteHandler.selectRandom(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.sequence(), com.runehive.game.world.entity.mob.npc.Npc.sequence(), com.runehive.content.activity.record.PlayerRecord.showActivities(), com.runehive.content.bloodmoney.BloodMoneyChest.spawn(), com.runehive.content.skill.SkillRepository.spawn(), com.runehive.content.activity.impl.pestcontrol.PestControlGame.spawnMonsters(), com.runehive.content.teleport.TeleportHandler.special(), com.runehive.game.world.entity.combat.attack.listener.npc.CommanderZilyana.start(), com.runehive.game.world.entity.combat.attack.listener.npc.GeneralGraardor.start(), com.runehive.game.world.entity.combat.attack.listener.npc.KrilTsutsaroth.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.ChaosFanatic.RainAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.LizardShaman.MinionsAttack.start(), com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo.Skotizo.Magic.start(), and com.runehive.content.activity.impl.magearena.MageArena.update().
|
static |
Picks a random element out of any array type.
Definition at line 271 of file Utility.java.
References RANDOM.
|
static |
Picks a random element out of any list type.
Definition at line 253 of file Utility.java.
References RANDOM.
|
static |
Picks a random element out of any array type.
Definition at line 266 of file Utility.java.
References RANDOM.
|
static |
Formats the player name.
Definition at line 94 of file Utility.java.
|
static |
Definition at line 851 of file Utility.java.
References getStarters(), and com.runehive.game.world.entity.mob.player.Player.lastHost.
|
static |
Definition at line 878 of file Utility.java.
References RANDOM.
Referenced by com.runehive.content.puzzle.PuzzleDisplay.randomize().
|
static |
Definition at line 71 of file Utility.java.
Referenced by com.runehive.game.world.entity.mob.player.relations.PlayerRelation.isFriendWith().
|
static |
Definition at line 699 of file Utility.java.
References com.runehive.game.world.Interactable.getPosition(), com.runehive.game.world.Interactable.length(), com.runehive.game.world.Interactable.width(), and within().
|
static |
Definition at line 731 of file Utility.java.
References com.runehive.game.world.position.Position.getHeight(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.position.Position.getY(), and com.runehive.game.world.position.Position.transform().
Definition at line 676 of file Utility.java.
References com.runehive.game.world.Interactable.create(), and within().
Referenced by com.runehive.game.world.entity.combat.attack.listener.npc.Alkahrid.block(), com.runehive.game.action.impl.DoorAction.execute(), com.runehive.game.world.entity.combat.attack.listener.npc.SergeantStrongstack.hit(), within(), within(), com.runehive.game.world.entity.combat.strategy.npc.boss.Zulrah.MeleeAttack.withinDistance(), withinDistance(), and withinDistance().
|
static |
Definition at line 470 of file Utility.java.
References within().
Referenced by com.runehive.content.activity.impl.fightcaves.FightCavesListener.block(), com.runehive.content.activity.inferno.InfernoCavesListener.block(), com.runehive.game.world.entity.combat.Combat< T extends Mob >.checkDistances(), com.runehive.content.combat.cannon.CannonManager.getNpc(), com.runehive.content.skill.impl.farming.zones.FarmingZone.isViewable(), com.runehive.game.world.entity.mob.player.requests.RequestManager.request(), com.runehive.game.world.World.sendGraphic(), com.runehive.game.world.World.sendGraphic(), com.runehive.game.world.World.sendObjectAnimation(), com.runehive.game.world.World.sendProjectile(), com.runehive.game.world.World.sendProjectile(), com.runehive.game.world.World.sendProjectile(), com.runehive.game.world.World.sendProjectile(), and com.runehive.game.world.World.sendProjectile().
|
static |
Definition at line 474 of file Utility.java.
References com.runehive.game.world.Interactable.getPosition(), com.runehive.game.world.Interactable.length(), com.runehive.game.world.Interactable.width(), and within().
|
static |
Definition at line 703 of file Utility.java.
References com.runehive.game.world.Interactable.getPosition(), com.runehive.game.world.Interactable.length(), com.runehive.game.world.Interactable.width(), and withinOctal().
Referenced by com.runehive.game.world.entity.combat.strategy.npc.boss.Vorkath.FireballAttack.hit(), and withinOctal().
|
static |
Definition at line 707 of file Utility.java.
References com.runehive.game.world.position.Position.getHeight(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.position.Position.getY(), and com.runehive.game.world.position.Position.transform().
|
static |
Definition at line 755 of file Utility.java.
References com.runehive.game.world.Interactable.getHeight(), com.runehive.game.world.Interactable.getPosition(), com.runehive.game.world.Interactable.getX(), com.runehive.game.world.position.Position.getX(), com.runehive.game.world.Interactable.getY(), com.runehive.game.world.position.Position.getY(), com.runehive.game.world.Interactable.length(), com.runehive.game.world.position.Position.transform(), and com.runehive.game.world.Interactable.width().
Referenced by com.runehive.game.world.entity.combat.CombatUtil.areaAction(), com.runehive.game.world.object.StaticGameObject.register(), and com.runehive.game.world.object.StaticGameObject.unregister().
|
staticprivate |
Random instance, used to generate pseudo-random primitive types.
Definition at line 30 of file Utility.java.
Referenced by random(), randomElement(), randomElement(), randomElement(), randomElement(), and shuffleArray().
|
staticprivate |
Array of all valid characters.
Definition at line 33 of file Utility.java.
Referenced by longToString().