RuneHive-Game
Loading...
Searching...
No Matches
com.runehive.content.bot.BotUtility Class Reference

Holds all the constants used by bot. More...

Collaboration diagram for com.runehive.content.bot.BotUtility:

Static Public Member Functions

static void logLoot (Item item)

Static Public Attributes

static final Appearance APPEARANCE = new Appearance(Gender.MALE, Utility.random(0, 8), Utility.random(10, 17), Utility.random(18, 25), Utility.random(26, 31), Utility.random(33, 34), Utility.random(36, 40), Utility.random(42, 43), 7, 8, 9, 5, 0)
 The default bot appearance.
static Map< Integer, MutableNumberBOOT_LOOT = new HashMap<>()
static final String[] BOT_NAMES
 List of all available bot names.
static final String[] FIGHT_END_MESSAGES
 Array of all the possible fight end message.
static final String[] FIGHT_START_MESSAGES
 Array of all the possible fight start message.
static final String[] GEAR_UP_MESSAGES
 Array of all the possible fight start message.
static final String[] KILLED_MESSAGES
 Array of all the possible fight start message.

Static Package Functions

static String nameGenerator ()
 Generates a random bot named based on the available names.

Static Package Attributes

static final String[] DEATH_MESSAGES
 Array of all the possible death message.
static final PlayerTitle TITLE = PlayerTitle.create("[BOT]", 0xC74C1C)
 The default bot title.

Static Private Member Functions

static List< String > getAvailableBotNames ()
 Generates a list of all available names.

Detailed Description

Holds all the constants used by bot.

Author
Daniel

Definition at line 19 of file BotUtility.java.

Member Function Documentation

◆ getAvailableBotNames()

List< String > com.runehive.content.bot.BotUtility.getAvailableBotNames ( )
staticprivate

Generates a list of all available names.

Definition at line 104 of file BotUtility.java.

104 {
105 List<String> names = new ArrayList<>(BOT_NAMES.length);
106 names.addAll(Arrays.asList(BOT_NAMES));
107 for (Player bot : World.getPlayers()) {
108 if (!bot.isBot) {
109 continue;
110 }
111 for (String nameList : BOT_NAMES) {
112 if (bot.getName().equalsIgnoreCase(nameList)) {
113 names.remove(nameList);
114 }
115 }
116 }
117 return names;
118 }

References BOT_NAMES, and com.runehive.game.world.World.getPlayers().

Referenced by nameGenerator().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ logLoot()

void com.runehive.content.bot.BotUtility.logLoot ( Item item)
static

Definition at line 23 of file BotUtility.java.

23 {
24 MutableNumber amount = BOOT_LOOT.getOrDefault(item.getId(), new MutableNumber());
25 amount.incrementAndGet(item.getAmount());
26 BOOT_LOOT.put(item.getId(), amount);
27 }

References BOOT_LOOT, com.runehive.game.world.items.Item.getAmount(), com.runehive.game.world.items.Item.getId(), and com.runehive.util.MutableNumber.incrementAndGet().

Referenced by com.runehive.game.world.entity.mob.player.PlayerDeath.calculateDropItems().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nameGenerator()

String com.runehive.content.bot.BotUtility.nameGenerator ( )
staticpackage

Generates a random bot named based on the available names.

Definition at line 99 of file BotUtility.java.

99 {
100 return Utility.randomElement(getAvailableBotNames());
101 }

References getAvailableBotNames(), and com.runehive.util.Utility.randomElement().

Referenced by com.runehive.content.bot.PlayerBot.PlayerBot().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ APPEARANCE

final Appearance com.runehive.content.bot.BotUtility.APPEARANCE = new Appearance(Gender.MALE, Utility.random(0, 8), Utility.random(10, 17), Utility.random(18, 25), Utility.random(26, 31), Utility.random(33, 34), Utility.random(36, 40), Utility.random(42, 43), 7, 8, 9, 5, 0)
static

The default bot appearance.

Definition at line 55 of file BotUtility.java.

Referenced by com.runehive.content.bot.PlayerBot.PlayerBot().

◆ BOOT_LOOT

Map<Integer, MutableNumber> com.runehive.content.bot.BotUtility.BOOT_LOOT = new HashMap<>()
static

◆ BOT_NAMES

final String [] com.runehive.content.bot.BotUtility.BOT_NAMES
static
Initial value:
= {
"Bang Bot",
"DJ Headshot",
"Kill Me",
"Not A Bot",
"Botting Betty",
"Wall E",
"S O P H I E",
"C H R O M P S",
"The Shredder",
"Humans DIE",
"Beep Boop",
"System Fail",
"Win32",
"Microbot",
"I Am Program",
"Bed Bath Bot",
"Corrupted Bot",
"Rouge Bot"
}

List of all available bot names.

Definition at line 30 of file BotUtility.java.

30 {
31 "Bang Bot",
32 "DJ Headshot",
33 "Kill Me",
34 "Not A Bot",
35 "Botting Betty",
36 "Wall E",
37 "S O P H I E",
38 "C H R O M P S",
39 "The Shredder",
40 "Humans DIE",
41 "Beep Boop",
42 "System Fail",
43 "Win32",
44 "Microbot",
45 "I Am Program",
46 "Bed Bath Bot",
47 "Corrupted Bot",
48 "Rouge Bot"
49 };

Referenced by com.runehive.net.session.LoginSession.evaluate(), and getAvailableBotNames().

◆ DEATH_MESSAGES

final String [] com.runehive.content.bot.BotUtility.DEATH_MESSAGES
staticpackage
Initial value:
= {
"Good game!",
"Gf",
"Gg",
"Gx",
"Ugh.. Developers needs to make me stronger!"
}

Array of all the possible death message.

Definition at line 90 of file BotUtility.java.

90 {
91 "Good game!",
92 "Gf",
93 "Gg",
94 "Gx",
95 "Ugh.. Developers needs to make me stronger!"
96 };

Referenced by com.runehive.content.bot.PlayerBot.loopCombat().

◆ FIGHT_END_MESSAGES

final String [] com.runehive.content.bot.BotUtility.FIGHT_END_MESSAGES
static
Initial value:
= {
"Out gf",
"I'm out",
""
}

Array of all the possible fight end message.

Definition at line 72 of file BotUtility.java.

72 {
73 "Out gf",
74 "I'm out",
75 ""
76 };

◆ FIGHT_START_MESSAGES

final String [] com.runehive.content.bot.BotUtility.FIGHT_START_MESSAGES
static
Initial value:
= {
"Good luck",
"Gl",
"Let's see what you got"
}

Array of all the possible fight start message.

Definition at line 65 of file BotUtility.java.

65 {
66 "Good luck",
67 "Gl",
68 "Let's see what you got"
69 };

Referenced by com.runehive.content.bot.objective.impl.CombatObjective.init().

◆ GEAR_UP_MESSAGES

final String [] com.runehive.content.bot.BotUtility.GEAR_UP_MESSAGES
static
Initial value:
= {
"Time to kick ass and take names!",
"I am the eco cleaner and cleanse I shall!",
"Time to make my daddy, Daniel proud!"
}

Array of all the possible fight start message.

Definition at line 58 of file BotUtility.java.

58 {
59 "Time to kick ass and take names!",
60 "I am the eco cleaner and cleanse I shall!",
61 "Time to make my daddy, Daniel proud!"
62 };

Referenced by com.runehive.content.bot.objective.impl.RestockObjective.finish().

◆ KILLED_MESSAGES

final String [] com.runehive.content.bot.BotUtility.KILLED_MESSAGES
static
Initial value:
= {
"Too ez",
"Ty 4 loot bruh",
"Good fight",
"Sit",
"Cya",
"Cya in edge",
"Later dink"
}

Array of all the possible fight start message.

Definition at line 79 of file BotUtility.java.

79 {
80 "Too ez",
81 "Ty 4 loot bruh",
82 "Good fight",
83 "Sit",
84 "Cya",
85 "Cya in edge",
86 "Later dink"
87 };

◆ TITLE

final PlayerTitle com.runehive.content.bot.BotUtility.TITLE = PlayerTitle.create("[BOT]", 0xC74C1C)
staticpackage

The default bot title.

Definition at line 52 of file BotUtility.java.

Referenced by com.runehive.content.bot.PlayerBot.PlayerBot().


The documentation for this class was generated from the following file: