1package com.runehive.game.action.impl;
4import com.runehive.Config;
5import com.runehive.content.StarterKit;
6import com.runehive.content.achievement.AchievementHandler;
7import com.runehive.content.achievement.AchievementKey;
8import com.runehive.content.activity.Activity;
9import com.runehive.content.activity.ActivityType;
10import com.runehive.content.activity.panel.ActivityPanel;
11import com.runehive.content.dialogue.DialogueFactory;
12import com.runehive.content.event.impl.ClickButtonInteractionEvent;
13import com.runehive.content.skill.impl.magic.teleport.TeleportType;
14import com.runehive.content.skill.impl.magic.teleport.Teleportation;
15import com.runehive.content.teleport.TeleportHandler;
16import com.runehive.game.Animation;
17import com.runehive.game.Graphic;
18import com.runehive.game.world.entity.mob.Direction;
19import com.runehive.game.world.entity.mob.Mob;
20import com.runehive.game.world.entity.mob.npc.Npc;
21import com.runehive.game.world.entity.mob.player.Player;
22import com.runehive.game.world.position.Position;
23import com.runehive.net.packet.out.SendConfig;
24import com.runehive.net.packet.out.SendForceTab;
25import com.runehive.net.packet.out.SendMessage;
26import com.runehive.net.packet.out.SendSpecialAmount;
27import com.runehive.util.Utility;
29import static com.runehive.content.skill.impl.magic.teleport.TeleportationData.MODERN;
54 super(2,
player.playerAssistant.instance());
57 this.factory =
player.dialogueFactory;
63 player.runEnergy = 100;
65 player.movement.setRunningToggled(
false);
66 player.playerAssistant.setSidebar(
true);
76 private void update(String... strings) {
113 factory.sendNpcChat(306,
"Welcome to <col=D63E3E>Augury</col>, " +
player.getName(),
114 "Would you like a tutorial of our lands?");
120 update(
"This is the activity panel.",
"The activity panel replaces a lot",
"of interfaces so be sure",
121 "to get acquainted to it.");
122 factory.sendNpcChat(306,
"Wise choice my friend! Let's get started.",
123 "The first thing you need to know about is the",
"activity panel. When you are doing an activity,",
124 "like this tutorial for example; a panel will be available to you.");
125 factory.sendNpcChat(306,
"You can access this panel by clicking the red tab icon.",
126 "The activity panel is disabled by default but will",
"automatically enable when in a activity.");
132 factory.sendNpcChat(306,
"Before I show you around I want to show you",
133 "useful content for your adventures.");
143 factory.sendNpcChat(306,
"This is your quest tab. Inside contains information about",
144 "the world and yourself. On the top right corner of the",
145 "tab you will see a bunch of different buttons.");
146 factory.sendNpcChat(306,
"The blue button will show you the quest tab",
147 "The green button will provide you with various options.");
148 factory.sendNpcChat(306,
"Some of these options include - npc drop viwer,",
149 "log drop simulator, log kill logs, title manager and more!");
150 factory.sendNpcChat(306,
"Lastly, the scroll button will open a menu where you can",
151 "change game related options. For example: welcome screen,",
152 " triviabot, drop notification, and more! These options",
153 "are not to be confused with the client options.");
164 factory.sendNpcChat(306,
"This is your settings tab. Here you can change all options",
165 "that are for your client. The interface has different tabs.",
166 "You are currently in the display tab. You can change all",
" display settings here.");
175 factory.sendNpcChat(306,
"Let's move on.");
176 factory.sendNpcChat(306,
"Edgeville will be your primary home, however you",
177 "can change it later on as you progress",
"in the game.").onAction(this::next);
190 factory.sendNpcChat(306,
"Throughout your adventures you will find key halves.",
191 "When using the right halves together you will be able",
192 "to form a Crystal key. With that key you can unlock this chest.",
193 "This chest contains various high valued items.").onAction(this::next).execute();
205 factory.sendNpcChat(306,
"This is our market place. You can put any items you",
206 "would like to sell in your store. You can also",
"purchase items from other players.")
207 .onAction(this::next);
220 factory.sendNpcChat(306,
"These thieving stalls are a very good for making",
"quick money.")
221 .onAction(this::next).execute();
233 factory.sendNpcChat(306,
"Here are shops that will sell you all the supplies you may need,",
234 " aswell as gear/food/potions/misc items and more.").onAction(this::next).execute();
246 factory.sendNpcChat(306,
"These npcs can really help you out, anywhere from",
247 "mass decanting potions, changing appearances,",
"buying skillcapes and more!").onAction(this::next)
260 factory.sendNpcChat(306,
"This is the Well of goodwill,",
261 "you will be able to contribute gold for a server wide",
262 "experience bonus that will last 30 Minutes.").onAction(this::next).execute();
274 factory.sendNpcChat(306,
"This is the fun pk arena.",
275 "Here you can fight players in multi-combat and lose nothing",
"on death!").onAction(this::next)
289 factory.sendNpcChat(306,
"This is the skilling area for members with",
290 "Extreme Donator status.");
308 factory.sendNpcChat(1143,
"Hello #name.",
"I am the clan master.");
309 factory.sendNpcChat(1143,
"Clans are going to be extremely useful for your adventures.",
310 "Joining a clan can give you extra experience rewards,",
311 "experience and drop modifiers, and much more!",
"It is also a great way to make new friends!");
312 factory.sendNpcChat(1143,
"There are heavily enforced rules for being in a clan.",
313 "Check out the rules on our forums ::clanrules");
314 factory.onAction(this::next).execute();
319 player.face(Direction.SOUTH);
321 player.locking.lock();
326 factory.sendNpcChat(306,
"That's the end of the tutorial! If you have any more questions",
327 "Check out our forums for detail guides or ask a moderator.",
"Good luck #name!")
328 .onAction(this::next).execute();
347 player.playerAssistant.setSidebar(
false);
356 if (
player.needsStarter) {
364 int button =
event.getButton();
367 if (button == -15496) {
370 player.interfaceManager.open(28_500);
375 if (button == 28502) {
377 player.interfaceManager.close();
382 if (button == -15531) {
397 if (button == -7534) {
399 player.interfaceManager.close();
417 if (
player.needsStarter) {
418 player.newPlayer =
true;
The class that contains setting-related constants for the server.
static final int WRENCH_TAB
static final Position DEFAULT_POSITION
The default, i.e.
static final int QUEST_TAB
Handles the starter kits.
static void open(Player player)
Handles opening the starter kit interface.
Handles the achievements.
static void activate(Player player, AchievementKey achievement)
Activates the achievement for the individual player.
final int cooldown
The sequencing cooldown.
Activity(int cooldown, int instance)
Constructs a new SequencedMinigame object.
final void pause()
Sets the cooldown flag to PAUSE.
void add(Mob mob)
Adds a mob to the activity.
void update()
The update method.
void setInstance(int instance)
Handles the activity panel.
static void update(Player player, int amount, String title, String footer, String... strings)
Sends all the information for the activity panel.
static void clear(Player player)
Clears the activity panel.
Represents a factory class that contains important functions for building dialogues.
Handles a player teleporting.
static boolean teleport(Player player, Position position)
Handles teleporting to various locations around OS Royale.
static void open(Player player)
Opens the teleport itemcontainer.
Class that models a single animation used by an entity.
Represents a single graphic that can be used by entities.
boolean clickButton(Player player, ClickButtonInteractionEvent event)
void start()
Starts the next activity stage.
void finish()
Finishes the activity.
void onLogout(Player player)
Called when the player logs out.
Npc guide
The guide npc for the activity.
final Player player
The player doing the tutorial activity.
final DialogueFactory factory
The dialogue factory for this activity.
void cooldown(int cooldown)
Applies a cooldown.
static TutorialActivity create(Player player)
Creates the tutorial activity for the player.
int stage
The current activity stage.
TutorialActivity(Player player)
Constructs a new TutorialActivity.
void update(String... strings)
Updates the activity panel.
void onRegionChange(Player player)
Called when the player changes region.
void cleanup()
Cleans up the activity when finished.
static final int DEFAULT_INSTANCE
Represents a non-player character in the in-game world.
This class represents a character controlled by a player.
Represents a single tile on the game world.
The OutgoingPacket responsible for changing settings on a client.
The OutgoingPacket that sends a message to a Players chatbox in the client.
Handles sending the special attack amount (used for the orb).
Handles miscellaneous methods.
static double getPercentageAmount(int progress, int total)
Gets a percentage amount.
Holds all activity types that are timed.
FAVORITES
Favorite teleport.
Represents the enumerated directions an entity can walk or face.