RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
BotUtility.java
1package com.osroyale.content.bot;
2
3import com.osroyale.content.tittle.PlayerTitle;
4import com.osroyale.game.world.World;
5import com.osroyale.game.world.entity.mob.player.Player;
6import com.osroyale.game.world.entity.mob.player.appearance.Appearance;
7import com.osroyale.game.world.entity.mob.player.appearance.Gender;
8import com.osroyale.game.world.items.Item;
9import com.osroyale.util.MutableNumber;
10import com.osroyale.util.Utility;
11
12import java.util.*;
13
51
52public class BotUtility {
53
54 public static Map<Integer, MutableNumber> BOOT_LOOT = new HashMap<>();
55
56 public static void logLoot(Item item) {
57 MutableNumber amount = BOOT_LOOT.getOrDefault(item.getId(), new MutableNumber());
58 amount.incrementAndGet(item.getAmount());
59 BOOT_LOOT.put(item.getId(), amount);
60 }
61
63 public static final String[] BOT_NAMES = {
64 "Bang Bot",
65 "DJ Headshot",
66 "Kill Me",
67 "Not A Bot",
68 "Botting Betty",
69 "Wall E",
70 "S O P H I E",
71 "C H R O M P S",
72 "The Shredder",
73 "Humans DIE",
74 "Beep Boop",
75 "System Fail",
76 "Win32",
77 "Microbot",
78 "I Am Program",
79 "Bed Bath Bot",
80 "Corrupted Bot",
81 "Rouge Bot"
82 };
83
85 static final PlayerTitle TITLE = PlayerTitle.create("[BOT]", 0xC74C1C);
86
88 public 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);
89
91 public static final String[] GEAR_UP_MESSAGES = {
92 "Time to kick ass and take names!",
93 "I am the eco cleaner and cleanse I shall!",
94 "Time to make my daddy, Daniel proud!"
95 };
96
98 public static final String[] FIGHT_START_MESSAGES = {
99 "Good luck",
100 "Gl",
101 "Let's see what you got"
102 };
103
105 public static final String[] FIGHT_END_MESSAGES = {
106 "Out gf",
107 "I'm out",
108 ""
109 };
110
112 public static final String[] KILLED_MESSAGES = {
113 "Too ez",
114 "Ty 4 loot bruh",
115 "Good fight",
116 "Sit",
117 "Cya",
118 "Cya in edge",
119 "Later dink"
120 };
121
123 static final String[] DEATH_MESSAGES = {
124 "Good game!",
125 "Gf",
126 "Gg",
127 "Gx",
128 "Ugh.. Developers needs to make me stronger!"
129 };
130
132 static String nameGenerator() {
133 return Utility.randomElement(getAvailableBotNames());
134 }
135
137 private static List<String> getAvailableBotNames() {
138 List<String> names = new ArrayList<>(BOT_NAMES.length);
139 names.addAll(Arrays.asList(BOT_NAMES));
140 for (Player bot : World.getPlayers()) {
141 if (!bot.isBot) {
142 continue;
143 }
144 for (String nameList : BOT_NAMES) {
145 if (bot.getName().equalsIgnoreCase(nameList)) {
146 names.remove(nameList);
147 }
148 }
149 }
150 return names;
151 }
152
154// static BotClass classGenerator() {
155// return Utility.randomElement(BotClass.values());
156// }
157}
static final String[] FIGHT_END_MESSAGES
static final String[] FIGHT_START_MESSAGES
static final String[] BOT_NAMES
static final String[] KILLED_MESSAGES
static final String[] GEAR_UP_MESSAGES
static final Appearance APPEARANCE
static PlayerTitle create(String title, int color)
static< T > T randomElement(Collection< T > collection)
Definition Utility.java:285