RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
InformationWriter.java
1package com.osroyale.content.writer.impl;
2
3import com.osroyale.content.WellOfGoodwill;
4import com.osroyale.content.bloodmoney.BloodMoneyChest;
5import com.osroyale.content.writer.InterfaceWriter;
6import com.osroyale.game.world.World;
7import com.osroyale.game.world.entity.combat.strategy.npc.boss.skotizo.SkotizoUtility;
8import com.osroyale.game.world.entity.mob.player.Player;
9import com.osroyale.game.world.entity.mob.player.PlayerRight;
10import com.osroyale.net.packet.out.SendScrollbar;
11import com.osroyale.util.Utility;
12
39
40public class InformationWriter extends InterfaceWriter {
41
42 public InformationWriter(Player player) {
43 super(player);
44 }
45
46 private String[] text = {
47 " <col=FF7000>Game Information:",
48 " -Players online: <col=FFB83F>" + World.getPlayerCount(),
49 " -Staff online: <col=FFB83F>" + World.getStaffCount(),
50 " -Uptime: <col=FFB83F>" + Utility.getUptime(),
51 " <col=FF7000>Events:",
52 " -Skotizo: <col=FFB83F>" + SkotizoUtility.getInformation(),
53 " -Blood Chest: <col=FFB83F>" + BloodMoneyChest.getInformation(),
54 " -Well of Goodwill: <col=FFB83F>" + WellOfGoodwill.getInformation(),
55 " <col=FF7000>Player Information:",
56 " -Rank: <col=FFB83F>" + PlayerRight.getCrown(player) + " " + player.right.getName(),
57 " -Play time: <col=FFB83F>" + Utility.getTime(player.playTime),
58 " -Networth: <col=FFB83F>" + Utility.formatPrice(player.playerAssistant.networth()) + " " + (Utility.formatPrice(player.playerAssistant.networth()).endsWith("!") ? "" : "GP"),
59 " <col=FF7000>Player Statistics:",
60 " -Kills: <col=FFB83F>" + player.kill,
61 " -Deaths: <col=FFB83F> " + player.death,
62 " -KDR: <col=FFB83F>" + player.playerAssistant.kdr(),
63 " -Killstreak: <col=FFB83F>" + player.killstreak.streak,
64 " -Donator Credits: <col=FFB83F>" + Utility.formatDigits(player.donation.getCredits()),
65 " -Vote Points: <col=FFB83F>" + Utility.formatDigits(player.votePoints),
66 " -Skilling Points: <col=FFB83F>" + Utility.formatDigits(player.skillingPoints),
67 " -Trivia Answered: <col=FFB83F>" + Utility.formatDigits(player.answeredTrivias),
68 " <col=FF7000>Slayer Information:",
69 " -Slayer Points: <col=FFB83F>" + Utility.formatDigits(player.slayer.getPoints()),
70 " -Slayer Task: <col=FFB83F>" + (player.slayer.getTask() == null ? "None" : player.slayer.getTask().getName()),
71 " -Task Remaining: <col=FFB83F>" + Utility.formatDigits(player.slayer.getAmount()),
72
73
74
75
76 };
77
78 private int[][] font = {
79 {29451, 3},
80 {29455, 3},
81 {29459, 3},
82 {29463, 3},
83 {29472, 3}
84
85
86 };
87
88 @Override
89 protected int startingIndex() {
90 return 29451;
91 }
92
93 @Override
94 public void scroll() {
95 player.send(new SendScrollbar(29450, 475));
96 }
97
98 @Override
99 protected String[] text() {
100 return text;
101 }
102
103 @Override
104 protected int[][] color() {
105 return null;
106 }
107
108 @Override
109 protected int[][] font() {
110 return font;
111 }
112
113}
static String getUptime()
Definition Utility.java:192
static String formatDigits(final int amount)
Definition Utility.java:78
static String getTime()
Definition Utility.java:178
static String formatPrice(final long amount)
Definition Utility.java:93