|
RuneHive-Game
|
The player bot entity. More...
Public Member Functions | |
| void | endFight () |
| void | loop (int ticks, Runnable action) |
| void | pause (int ticks) |
| PlayerBot () | |
| PlayerBot (String name) | |
| void | postDeath () |
| void | pot (Mob opponent, ItemClickEvent event, PotionData potion) |
| void | register () |
Registers an entity to the World. | |
| void | retaliate (Player defender) |
| void | schedule (int ticks, Runnable action) |
| void | sequence () |
| void | stopLoop () |
| void | unregister () |
Unregisters an entity from the World. | |
| Public Member Functions inherited from com.runehive.game.world.entity.mob.player.Player | |
| void | addToRegion (Region region) |
| Adds this entity to the specified region. | |
| void | appendDeath () |
| Handles the mob death. | |
| void | chat (ChatMessage chatMessage) |
| boolean | equals (Object obj) |
| void | forClan (Consumer< ClanChannel > action) |
| Optional< AntifireDetails > | getAntifireDetails () |
| Appearance | getAppearance () |
| Optional< ChatMessage > | getChatMessage () |
| CollectionLog | getCollectionLog () |
| Combat< Player > | getCombat () |
| The combat of the mob. | |
| CombatSpecial | getCombatSpecial () |
| Events | getEvents () |
| GambleManager | getGambling () |
| long | getLastModification () |
| int | getMemberId () |
| String | getName () |
| Gets the name of this entity. | |
| String | getPassword () |
| final MutableNumber | getPoisonImmunity () |
| int | getSceneBaseChunkX () |
| int | getSceneBaseChunkY () |
| Optional< GameSession > | getSession () |
| MutableNumber | getSpecialPercentage () |
| CombatStrategy< Player > | getStrategy () |
| The combat strategy of the mob. | |
| EntityType | getType () |
Gets the EntityType. | |
| String | getUsername () |
| final MutableNumber | getVenomImmunity () |
| WeaponInterface | getWeapon () |
| int | hashCode () |
| boolean | isAutocast () |
| boolean | isAutoRetaliate () |
| State of the mob's auto retaliate. | |
| boolean | isGambleLocked () |
| boolean | isSingleCast () |
| boolean | isSpecialActivated () |
| boolean | isTeleblocked () |
| boolean | isValid () |
| Validates this npc based on its current region and registered state. | |
| void | loadRegion () |
| final void | logout () |
| final void | logout (boolean force) |
| void | message (boolean filtered, String... messages) |
| void | message (String message) |
| void | message (String... messages) |
| void | onStep () |
| void | pickup (Item item, Position position) |
| Player (String username) | |
| Player (String username, Position position) | |
| void | removeFromRegion (Region region) |
| Removes this entity from the specified region. | |
| void | send (OutgoingPacket encoder) |
| void | setAntifireDetail (AntifireDetails antifireDetails) |
| void | setAutocast (CombatSpell autocast) |
| void | setCollectionLog (CollectionLog collectionLog) |
| void | setCombatSpecial (CombatSpecial special) |
| void | setGambleLock (boolean gambleLocked) |
| void | setLastModification (long lastModification) |
| void | setMemberId (int memberId) |
| void | setPassword (String password) |
| void | setSceneBaseChunks (int chunkX, int chunkY) |
| void | setSession (GameSession session) |
| void | setSingleCast (CombatSpell singleCast) |
| void | setSpecialActivated (boolean activated) |
| void | setUsername (String username) |
| void | setWeapon (WeaponInterface weapon) |
| void | teleblock (int time) |
| int | toSceneLocalX (int worldX) |
| int | toSceneLocalX (Position pos) |
| int | toSceneLocalY (int worldY) |
| int | toSceneLocalY (Position pos) |
| String | toString () |
| Public Member Functions inherited from com.runehive.game.world.entity.mob.Mob | |
| void | animate (Animation animation) |
| Plays an animation. | |
| void | animate (Animation animation, final boolean override) |
| Plays an animation. | |
| void | animate (int animation) |
| void | animate (int animation, boolean override) |
| void | appendBonus (int index, int amount) |
| void | attack (Mob target) |
| void | clearTeleportTarget () |
| Resets the teleport target. | |
| void | damage (Hit... hits) |
| Hit | decrementHealth (Hit hit) |
| void | face (Direction direction) |
| Sets the client update flag to face a certain direction. | |
| void | face (GameObject object) |
| Sets the client update flag to face a certain direction. | |
| void | face (Mob mob) |
| void | face (Position position) |
| Sets the client update flag to face a certain direction. | |
| void | follow (Mob target) |
| void | forceMove (int animation, int x, int y) |
| void | forceMove (int delay, int animation, int startSpeed, int endSpeed, Position offset, Direction direction) |
| void | forceMove (int delay, int delay2, int animation, int animationDelay, int startSpeed, int endSpeed, Position offset, Direction direction) |
| Creates a force movement action for an entity. | |
| void | forceMove (int delay, int delay2, int animation, int startSpeed, int endSpeed, Position offset, Direction direction) |
| Optional< Animation > | getAnimation () |
| int | getBonus (int index) |
| int[] | getBonuses () |
| int | getCurrentHealth () |
| ForceMovement | getForceMovement () |
| Optional< Graphic > | getGraphic () |
| int | getId () |
| int | getListIndex () |
| int | getMaximumHealth () |
| final Npc | getNpc () |
| final Player | getPlayer () |
| final MutableNumber | getPoisonDamage () |
| PoisonType | getPoisonType () |
| int | getPriorityIndex () |
| int | getTransformId () |
| MutableNumber | getVenomDamage () |
| void | graphic (Graphic graphic) |
| Plays a graphic. | |
| void | graphic (Graphic graphic, boolean override) |
| Plays a graphic. | |
| void | graphic (int graphic) |
| boolean | hasPriorityIndex (Mob other) |
| void | heal (int amount) |
| boolean | inActivity () |
| boolean | inActivity (ActivityType type) |
| void | interact (Mob mob) |
| Sets the mob interacting with another mob. | |
| boolean | isDead () |
| boolean | isFixingInside () |
| final boolean | isNpc () |
| Check if an entity is an npc. | |
| final boolean | isNpc (BooleanInterface< Npc > condition) |
| Check if an entity is an npc. | |
| final boolean | isPlayer () |
| Check if an entity is a player. | |
| final boolean | isPlayer (Function< Player, Boolean > condition) |
| Check if an entity is a player. | |
| final boolean | isPoisoned () |
| boolean | isUpdateRequired () |
| Checks if mob requires an update. | |
| final boolean | isVenomed () |
| Mob (Position position) | |
Constructs a new Mob. | |
| Mob (Position position, boolean visible) | |
| void | move (Position position) |
| Moves the mob to a set position. | |
| void | poison (PoisonType type) |
Applies poison with an intensity of type to the entity. | |
| final void | reset () |
| Resets the mob after an update. | |
| void | resetAnimation () |
| void | resetFace () |
| Resets the mob's face location. | |
| void | resetGraphic () |
| final void | resetWaypoint () |
| Resets the waypoint. | |
| void | runTo (Position destination) |
| void | setActivity (Activity activity) |
| void | setBonus (int equipSlot, int bonus) |
| void | setBonuses (int[] bonuses) |
| void | setDead (boolean dead) |
| void | setFixingInside (boolean fixingInside) |
| void | setForceMovement (ForceMovement forceMovement) |
| void | setListIndex (int listIndex) |
| void | speak (String forceChat) |
| Sets the mob's forced chat. | |
| void | takeStep () |
| void | transform (int transformId) |
| void | transform (int transformId, boolean reload) |
| Transforms the mob. | |
| void | unpoison () |
| void | unvenom () |
| void | venom () |
| Applies venom to the entity. | |
| void | walk (Position destination, boolean ignoreClip) |
| void | walk (Position position) |
| void | walkExactlyTo (Position position) |
| void | walkExactlyTo (Position position, Runnable onDestination) |
| void | walkTo (Interactable target, boolean clearAction, Runnable onDestination) |
| void | walkTo (Interactable target, Runnable onDestination) |
| void | walkTo (Position position) |
| void | walkTo (Position position, Runnable onDestination) |
| void | writeDamage (Hit hit) |
| void | writeFakeDamage (Hit hit) |
| Public Member Functions inherited from com.runehive.game.world.entity.Entity | |
| Entity (Position position) | |
| Entity (Position position, boolean visible) | |
| Position | getCenterPosition () |
| int | getHeight () |
| int | getIndex () |
| Position | getPosition () |
| Region | getRegion () |
| int | getX () |
| int | getY () |
| boolean | is (EntityType type) |
| final boolean | isCustomObject () |
| Check if an entity is an object. | |
| final boolean | isRegistered () |
| final boolean | isStaticObject () |
| Check if an entity is an object. | |
| boolean | isVisible () |
| int | length () |
| void | setIndex (int index) |
| void | setLength (int length) |
| void | setPosition (Position position) |
| void | setVisible (boolean visible) |
| void | setWidth (int width) |
| void | setX (int x) |
| void | setY (int y) |
| void | setZ (int z) |
| int | width () |
Static Public Attributes | |
| static final AtomicInteger | BOT_COUNT = new AtomicInteger(0) |
| Static Public Attributes inherited from com.runehive.game.world.entity.Entity | |
| static final int | DEFAULT_INSTANCE = 0 |
Private Member Functions | |
| void | loopCombat () |
Private Attributes | |
| Runnable | action |
| boolean | loop |
| int | ticks |
Additional Inherited Members | |
| Static Public Member Functions inherited from com.runehive.game.world.entity.mob.Mob | |
| static boolean | pathfinderProjectiles (Mob source) |
| Static Public Member Functions inherited from com.runehive.game.world.Interactable | |
| static Interactable | create (Position position) |
Creates a new instance of an Interactable. | |
| static Interactable | create (Position position, int width, int length) |
Creates a new instance of an Interactable. | |
| Protected Member Functions inherited from com.runehive.game.world.entity.mob.Mob | |
| void | setWaypoint (Waypoint waypoint) |
| Protected Member Functions inherited from com.runehive.game.world.entity.Entity | |
| Entity | destroy () |
| Destroys this entity. | |
| void | setRegistered (boolean registered) |
| Protected Attributes inherited from com.runehive.game.world.entity.mob.Mob | |
| Waypoint | cachedWaypoint |
| Package Functions inherited from com.runehive.game.world.entity.mob.player.Player | |
| CombatSpell | getAutocastSpell () |
| CombatSpell | getSingleCastSpell () |
The player bot entity.
Definition at line 29 of file PlayerBot.java.
| com.runehive.content.bot.PlayerBot.PlayerBot | ( | ) |
Definition at line 42 of file PlayerBot.java.
References com.runehive.content.bot.BotUtility.nameGenerator().
| com.runehive.content.bot.PlayerBot.PlayerBot | ( | String | name | ) |
Definition at line 46 of file PlayerBot.java.
References com.runehive.content.bot.BotUtility.APPEARANCE, com.runehive.game.world.entity.mob.player.Player.appearance, com.runehive.game.world.entity.mob.player.Player.clanTag, com.runehive.game.world.entity.mob.player.Player.clanTagColor, com.runehive.game.world.entity.mob.player.Player.headIcon, com.runehive.game.world.entity.mob.player.Player.isBot, com.runehive.content.skill.impl.magic.Spellbook.LUNAR, com.runehive.game.world.entity.mob.Mob.mobAnimation, com.runehive.game.world.entity.mob.Mob.movement, com.runehive.game.world.entity.mob.player.Player.newPlayer, com.runehive.game.world.entity.mob.player.Player.playerAssistant, com.runehive.game.world.entity.mob.player.Player.playerTitle, com.runehive.game.world.entity.mob.Mob.positionChange, com.runehive.game.world.entity.mob.Mob.prayer, com.runehive.game.world.entity.mob.Mob.regionChange, com.runehive.game.world.entity.combat.strategy.player.special.CombatSpecial.restore(), com.runehive.game.world.entity.Entity.setVisible(), com.runehive.game.world.entity.mob.Mob.skills, com.runehive.game.world.entity.mob.player.Player.spellbook, and com.runehive.content.bot.BotUtility.TITLE.
| void com.runehive.content.bot.PlayerBot.endFight | ( | ) |
Definition at line 229 of file PlayerBot.java.
References botClass, com.runehive.game.world.entity.mob.Mob.damageImmunity, com.runehive.Config.DEFAULT_POSITION, com.runehive.game.world.entity.mob.player.Player.getCombat(), com.runehive.game.world.entity.mob.Mob.getCurrentHealth(), com.runehive.game.world.entity.mob.Mob.isDead(), com.runehive.content.skill.impl.magic.teleport.TeleportationData.MODERN, opponent, com.runehive.content.skill.impl.magic.teleport.Teleportation.teleport(), com.runehive.game.world.entity.mob.Mob.unpoison(), com.runehive.game.world.entity.mob.Mob.unvenom(), and com.runehive.content.bot.objective.BotObjective.WALK_TO_BANK.
Referenced by loopCombat(), and retaliate().
| void com.runehive.content.bot.PlayerBot.loop | ( | int | ticks, |
| Runnable | action ) |
Definition at line 120 of file PlayerBot.java.
|
private |
Definition at line 190 of file PlayerBot.java.
References botClass, consumableDelay, com.runehive.content.bot.BotUtility.DEATH_MESSAGES, endFight(), foodRemaining, com.runehive.game.world.entity.mob.player.Player.getCombat(), com.runehive.game.world.entity.mob.Mob.getCurrentHealth(), com.runehive.game.world.entity.mob.Mob.isDead(), opponent, com.runehive.game.world.entity.skill.Skill.PRAYER, com.runehive.util.Utility.randomElement(), schedule(), com.runehive.game.world.entity.mob.Mob.skills, com.runehive.game.world.entity.mob.Mob.speak(), and com.runehive.content.bot.objective.BotObjective.WALK_TO_BANK.
Referenced by sequence().
| void com.runehive.content.bot.PlayerBot.pause | ( | int | ticks | ) |
Definition at line 126 of file PlayerBot.java.
References ticks.
| void com.runehive.content.bot.PlayerBot.postDeath | ( | ) |
Definition at line 154 of file PlayerBot.java.
References com.runehive.Config.DEFAULT_POSITION, com.runehive.game.world.entity.mob.player.Player.equipment, com.runehive.game.world.entity.mob.player.Player.getCombat(), com.runehive.game.world.entity.mob.Mob.move(), com.runehive.game.world.entity.mob.Mob.movement, com.runehive.game.world.entity.mob.player.Player.playerAssistant, com.runehive.game.world.entity.combat.strategy.player.special.CombatSpecial.restore(), schedule(), com.runehive.game.world.entity.mob.player.Player.setSpecialActivated(), com.runehive.game.world.entity.mob.Mob.skills, com.runehive.game.world.entity.mob.player.Player.teleblockTimer, and com.runehive.content.bot.objective.BotObjective.WALK_TO_BANK.
| void com.runehive.content.bot.PlayerBot.pot | ( | Mob | opponent, |
| ItemClickEvent | event, | ||
| PotionData | potion ) |
Definition at line 134 of file PlayerBot.java.
References com.runehive.game.world.entity.mob.Mob.animate(), com.runehive.content.consume.PotionData.canDrink(), com.runehive.game.world.entity.mob.player.Player.getCombat(), com.runehive.game.world.items.Item.getId(), com.runehive.content.consume.PotionData.getReplacementItem(), com.runehive.game.world.entity.mob.player.Player.inventory, com.runehive.game.UpdatePriority.LOW, com.runehive.content.consume.PotionData.onEffect(), opponent, and com.runehive.game.world.entity.mob.player.Player.potionDelay.
| void com.runehive.content.bot.PlayerBot.register | ( | ) |
Registers an entity to the World.
Reimplemented from com.runehive.game.world.entity.mob.player.Player.
Definition at line 71 of file PlayerBot.java.
References BOT_COUNT, com.runehive.game.world.World.getPlayers(), com.runehive.game.world.entity.Entity.getPosition(), com.runehive.game.world.entity.Entity.isRegistered(), com.runehive.game.world.entity.Entity.setPosition(), and com.runehive.game.world.entity.Entity.setRegistered().
Referenced by com.runehive.game.task.impl.BotStartupEvent.tick().
| void com.runehive.content.bot.PlayerBot.retaliate | ( | Player | defender | ) |
Definition at line 167 of file PlayerBot.java.
References com.runehive.content.bot.objective.BotObjective.COMBAT, endFight(), com.runehive.game.world.entity.mob.player.Player.getCombat(), opponent, and com.runehive.game.world.entity.mob.player.Player.Player().
| void com.runehive.content.bot.PlayerBot.schedule | ( | int | ticks, |
| Runnable | action ) |
Definition at line 114 of file PlayerBot.java.
References action, loop, and ticks.
Referenced by loopCombat(), and postDeath().
| void com.runehive.content.bot.PlayerBot.sequence | ( | ) |
Reimplemented from com.runehive.game.world.entity.mob.player.Player.
Definition at line 95 of file PlayerBot.java.
References action, loop, loopCombat(), opponent, and ticks.
| void com.runehive.content.bot.PlayerBot.stopLoop | ( | ) |
| void com.runehive.content.bot.PlayerBot.unregister | ( | ) |
Unregisters an entity from the World.
Reimplemented from com.runehive.game.world.entity.mob.player.Player.
Definition at line 80 of file PlayerBot.java.
References BOT_COUNT, com.runehive.game.world.World.cancelTask(), com.runehive.game.world.entity.Entity.destroy(), com.runehive.game.world.World.getPlayers(), com.runehive.game.world.entity.Entity.isRegistered(), and com.runehive.game.world.entity.mob.player.Player.Player().
|
private |
Definition at line 33 of file PlayerBot.java.
Referenced by loop(), schedule(), and sequence().
|
static |
Definition at line 30 of file PlayerBot.java.
Referenced by com.runehive.game.world.World.getBotCount(), register(), and unregister().
| BotClass com.runehive.content.bot.PlayerBot.botClass |
Definition at line 37 of file PlayerBot.java.
Referenced by endFight(), and loopCombat().
| int com.runehive.content.bot.PlayerBot.consumableDelay |
Definition at line 40 of file PlayerBot.java.
Referenced by loopCombat().
| int com.runehive.content.bot.PlayerBot.foodRemaining |
Definition at line 35 of file PlayerBot.java.
Referenced by loopCombat().
|
private |
Definition at line 34 of file PlayerBot.java.
Referenced by loop(), schedule(), sequence(), and stopLoop().
| Player com.runehive.content.bot.PlayerBot.opponent |
Definition at line 38 of file PlayerBot.java.
Referenced by endFight(), loopCombat(), pot(), retaliate(), and sequence().
| int com.runehive.content.bot.PlayerBot.statBoostersRemaining |
Definition at line 36 of file PlayerBot.java.
|
private |
Definition at line 32 of file PlayerBot.java.
Referenced by loop(), pause(), schedule(), and sequence().