RuneHive-Game
Loading...
Searching...
No Matches
InformationWriter.java
Go to the documentation of this file.
1package com.runehive.content.writer.impl;
2
3import com.runehive.content.WellOfGoodwill;
4import com.runehive.content.bloodmoney.BloodMoneyChest;
5import com.runehive.content.writer.InterfaceWriter;
6import com.runehive.game.world.World;
7import com.runehive.game.world.entity.combat.strategy.npc.boss.skotizo.SkotizoUtility;
8import com.runehive.game.world.entity.mob.player.Player;
9import com.runehive.game.world.entity.mob.player.PlayerRight;
10import com.runehive.net.packet.out.SendScrollbar;
11import com.runehive.util.Utility;
12
13/**
14 * Class handles writing on the quest tab itemcontainer.
15 *
16 * @author Daniel
17 */
18public class InformationWriter extends InterfaceWriter {
19
21 super(player);
22 }
23
24 private String[] text = {
25 " <col=FF7000>Game Information:",
26 " -Players online: <col=FFB83F>" + World.getPlayerCount(),
27 " -Staff online: <col=FFB83F>" + World.getStaffCount(),
28 " -Uptime: <col=FFB83F>" + Utility.getUptime(),
29 " <col=FF7000>Events:",
30 " -Skotizo: <col=FFB83F>" + SkotizoUtility.getInformation(),
31 " -Blood Chest: <col=FFB83F>" + BloodMoneyChest.getInformation(),
32 " -Well of Goodwill: <col=FFB83F>" + WellOfGoodwill.getInformation(),
33 " <col=FF7000>Player Information:",
34 " -Rank: <col=FFB83F>" + PlayerRight.getCrown(player) + " " + player.right.getName(),
35 " -Play time: <col=FFB83F>" + Utility.getTime(player.playTime),
36 " -Networth: <col=FFB83F>" + Utility.formatPrice(player.playerAssistant.networth()) + " " + (Utility.formatPrice(player.playerAssistant.networth()).endsWith("!") ? "" : "GP"),
37 " <col=FF7000>Player Statistics:",
38 " -Kills: <col=FFB83F>" + player.kill,
39 " -Deaths: <col=FFB83F> " + player.death,
40 " -KDR: <col=FFB83F>" + player.playerAssistant.kdr(),
41 " -Killstreak: <col=FFB83F>" + player.killstreak.streak,
42 " -Donator Credits: <col=FFB83F>" + Utility.formatDigits(player.donation.getCredits()),
43 " -Vote Points: <col=FFB83F>" + Utility.formatDigits(player.votePoints),
44 " -Skilling Points: <col=FFB83F>" + Utility.formatDigits(player.skillingPoints),
45 " -Trivia Answered: <col=FFB83F>" + Utility.formatDigits(player.answeredTrivias),
46 " <col=FF7000>Slayer Information:",
47 " -Slayer Points: <col=FFB83F>" + Utility.formatDigits(player.slayer.getPoints()),
48 " -Slayer Task: <col=FFB83F>" + (player.slayer.getTask() == null ? "None" : player.slayer.getTask().getName()),
49 " -Task Remaining: <col=FFB83F>" + Utility.formatDigits(player.slayer.getAmount()),
50
51
52
53
54 };
55
56 private int[][] font = {
57 {29451, 3},
58 {29455, 3},
59 {29459, 3},
60 {29463, 3},
61 {29472, 3}
62
63
64 };
65
66 @Override
67 protected int startingIndex() {
68 return 29451;
69 }
70
71 @Override
72 public void scroll() {
73 player.send(new SendScrollbar(29450, 475));
74 }
75
76 @Override
77 protected String[] text() {
78 return text;
79 }
80
81 @Override
82 protected int[][] color() {
83 return null;
84 }
85
86 @Override
87 protected int[][] font() {
88 return font;
89 }
90
91}
Handles contribution towards the well of goodwill.
static String getInformation()
The information displayed on information tab.
static String getInformation()
The information displayed on information tab.
Represents the game world.
Definition World.java:46
static int getPlayerCount()
Gets the amount of valid players online.
Definition World.java:490
This class represents a character controlled by a player.
Definition Player.java:125
Handles miscellaneous methods.
Definition Utility.java:27
static String formatDigits(final int amount)
Formats digits for integers.
Definition Utility.java:41
static String getTime()
Gets the current server time and formats it.
Definition Utility.java:141
static String formatPrice(final long amount)
Formats a price for longs.
Definition Utility.java:56
static String getUptime()
Gets the current uptime of server and formats it.
Definition Utility.java:155
static String getCrown(Player player)
Gets the crown display.