1package com.osroyale.content.prestige;
3import com.osroyale.game.world.World;
4import com.osroyale.game.world.entity.mob.player.Player;
5import com.osroyale.game.world.entity.skill.Skill;
6import com.osroyale.game.world.items.Item;
7import com.osroyale.net.packet.out.SendItemOnInterface;
8import com.osroyale.net.packet.out.SendMessage;
9import com.osroyale.net.packet.out.SendScrollbar;
10import com.osroyale.net.packet.out.SendString;
11import com.osroyale.util.MessageColor;
13import java.util.Arrays;
14import java.util.HashSet;
17import static com.osroyale.game.world.items.containers.bank.VaultCurrency.COINS;
64 private final Player player;
65 private static final String COLOR =
"<col=354CE6>";
72 private int prestigePoint;
87 player.send(
new SendString(player.getName(), 52007));
89 player.send(
new SendString(
"Prestige Points: <col=76E34B>" + prestigePoint +
"</col>", 52009));
90 Arrays.stream(
PrestigeData.values).forEach(p -> player.send(
new SendString(p.name +
" " +
"(<col=" + getColorInterface(
prestige[p.skill]) +
">" +
prestige[p.skill] +
"</col>)", p.string)));
91 player.interfaceManager.open(52000);
100 player.skills.setMaxLevel(data.
skill, data.
skill == 3 ? 10 : 1);
101 player.skills.setLevel(data.
skill, data.
skill == 3 ? 10 : 1);
102 player.skills.refresh(data.
skill);
103 player.skills.setCombatLevel();
104 player.bankVault.add(COINS, 1_000_000);
106 World.
sendMessage(
"<icon=21> Prestige: <col=354CE6>" + player.getName() +
"</col> has prestiged " +
Skill.
getName(data.
skill) +
" and has a total of " + player.prestige.totalPrestige +
" prestiges!");
113 for (
int i = 0,
string = 37114; i < totalPerks; i++) {
115 player.send(
new SendString(
"<col=" + (hasPerk(perk) ?
"347043" :
"3c50b2") +
">" + perk.
name,
string++));
120 player.send(
new SendString(
"<col=000000>This is a list of all the available perks.", 37111));
121 player.send(
new SendString(
"<col=000000>Perks with green names indicate that it is active.", 37112));
124 player.send(
new SendString(
"Prestige Perks Information", 37103));
127 player.interfaceManager.open(37100);
143 player.inventory.remove(item);
177 private String getColorInterface(
int tier) {
178 return Integer.toHexString(
getColor(tier));
181 public int getPrestigePoint() {
182 return prestigePoint;
185 public void setPrestigePoint(
int prestigePoint) {
186 this.prestigePoint = prestigePoint;
Set< PrestigePerk > activePerks
void prestige(PrestigeData data)
boolean activatePerk(Item item)
int getPrestigeColor(int skill)
static void sendMessage(String... messages)
static String getName(int skill)
static final int getExperienceForLevel(int level)
static final int SKILL_COUNT