Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void onLogin() {
- GameFrameBuilder builder = new GameFrameBuilder(sessionContext.getChannel().alloc());
- viewport.initialize(builder, sessionContext.getWorld());
- sendRegionUpdate(position, builder);
- sendExternalIP(credentials.getLastKnownIpAddress());
- sendVarpReset();
- sendCameraReset();
- // Login Screen.
- sendSetWidgetText(WidgetId.LOGIN_CLICK_TO_PLAY_GROUP_ID, 56, "Welcome to RuneScape");
- sendSetWidgetText(WidgetId.LOGIN_CLICK_TO_PLAY_GROUP_ID, 57, "You last logged in <col=ff0000>earlier today</col>.");
- sendSetWidgetText(WidgetId.LOGIN_CLICK_TO_PLAY_GROUP_ID, 61, "Never tell anyone your password,<br>even if they claim to work for Jagex!");
- sendSetWidgetText(WidgetId.LOGIN_CLICK_TO_PLAY_GROUP_ID, 70, "You do not have a Bank PIN.<br>Please visit a bank if you would like one.");
- // Login Screen: Message of the Week Panel.
- sendSetWidgetText(WidgetId.LOGIN_CLICK_TO_PLAY_GROUP_ID, 2, "Message of the week");
- sendSetWidgetText(WidgetId.LOGIN_CLICK_TO_PLAY_GROUP_ID, 3, "Join our Official <col=7289DA>Discord</col> server to chat live with like-minded Developers, <col=6a97a5>Rune-Status.net</col>.");
- sendCS2Script(233, 24772660, 30685, 0, 120, 94, 110, 0, 1800, -1);
- sendCS2Script(233, 24772661, 16356, 0, 190, 0, 122, 0, 3000, -1);
- sendCS2Script(1080, "https://Rune-Status.net/discord/");
- // Login Screen: Messages Panel.
- // TODO: Implement this.
- int unreadMessages = 100;
- sendVarp(262, unreadMessages); //Messages;
- // Login Screen: Membership Panel.
- // TODO: Implement this.
- int membershipRemaining = 30;
- sendVarp(263, membershipRemaining);
- boolean wasMember = true;
- if (wasMember) {
- sendCS2Script(828, 1);
- } else {
- sendCS2Script(828, 0);
- }
- // Game Frame.
- sendSetRootWidget(WidgetId.GAMEFRAME_GROUP_ID);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 1, WidgetId.CHATBOX_GROUP_ID, true);
- // 2 - 7 = Nothing.
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 8, WidgetId.COMBAT_GROUP_ID, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 9, WidgetId.STATS_GROUP_ID, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 10, WidgetId.QUEST_GROUP_ID, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 11, WidgetId.INVENTORY_GROUP_ID, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 12, WidgetId.EQUIPMENT_GROUP_ID, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 13, WidgetId.PRAYER_GROUP_ID, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 14, WidgetId.MAGIC_GROUP_ID, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 15, WidgetId.CLAN_CHAT_GROUP_ID, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 16, WidgetId.FRIENDS_LIST_GROUP_ID, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 17, WidgetId.IGNORE_LIST_GROUP_ID, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 18, WidgetId.LOGOUT_PANEL_ID, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 19, WidgetId.SETTINGS_PANEL_GROUP_ID, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 20, WidgetId.EMOTES_GROUP_ID, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 21, WidgetId.MUSIC_PANEL_ID, true);
- // 22 = Nothing.
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 23, WidgetId.PRIVATE_CHAT, true);
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 24, WidgetId.MINIMAP_GROUP_ID, true);
- // 25, 26 = Nothing.
- sendOpenWidgetSub(WidgetId.GAMEFRAME_GROUP_ID, 27, WidgetId.LOGIN_CLICK_TO_PLAY_GROUP_ID, false);
- // 28 = Nothing.
- // Emote Panel.
- sendVarp(313, -1); // Unlock Emotes.
- sendVarp(802, -1); // Unlock Emotes: Stronghold of Security.
- sendWidgetSetClickMask(WidgetId.EMOTES_GROUP_ID, 1, 0, 47, 2); // Emote List.
- // Settings Panel.
- // TODO: Implement these.
- sendVarp(166, 4); // Display: Screen Brightness.
- sendVarp(168, 0); // Audio: Music Volume.
- sendVarp(169, 0); // Audio: Sound Effect Volume.
- sendVarp(170, 0); // Controls: Mouse Buttons.
- sendVarp(171, 0); // Chat: Chat Effects.
- sendVarp(287, 1); // Chat: Split Private Chat.
- sendVarp(872, 0); // Audio: Area Sound Effect Volume.
- sendVarp(1074, 1); // Chat: Profanity Filter.
- sendVarp(173, 1); // Run.
- // TODO: Figure out what each of these do.
- sendWidgetSetClickMask(WidgetId.SETTINGS_PANEL_GROUP_ID, 85, 1, 4, 2);
- sendWidgetSetClickMask(WidgetId.SETTINGS_PANEL_GROUP_ID, 86, 1, 4, 2);
- // Quest Panel.
- sendVarp(101, 0); // Quest Points.
- sendWidgetSetClickMask(WidgetId.QUEST_GROUP_ID, 7, 0, 19, 2); // Free List.
- sendWidgetSetClickMask(WidgetId.QUEST_GROUP_ID, 8, 0, 116, 2); // Members List.
- sendWidgetSetClickMask(WidgetId.QUEST_GROUP_ID, 9, 0, 11, 2); // Miniquest List.
- // Music Panel.
- // TODO: Implement this.
- sendMusic(1);
- sendVarp(19, 1); // Loop switch.
- sendVarp(18, 1); // Auto/Manual Switch.
- sendVarp(20, -1); // First 32 Tracks unlocked,
- sendVarp(21, -1); // +32 Tracks,
- sendVarp(22, -1); // +32 Tracks,
- sendVarp(23, -1); // +32 Tracks,
- sendVarp(24, -1); // +32 Tracks,
- sendVarp(25, -1); // +32 Tracks,
- sendVarp(298, -1); // +32 Tracks,
- sendVarp(311, -1); // +32 Tracks,
- sendVarp(346, -1); // +32 Tracks,
- sendVarp(414, -1); // +32 Tracks,
- sendVarp(464, -1); // +32 Tracks,
- sendVarp(598, -1); // +32 Tracks,
- sendVarp(662, -1); // +32 Tracks,
- sendVarp(721, -1); // +32 Tracks,
- sendVarp(906, -1); // +32 Tracks,
- sendVarp(1009, -1); // +32 Tracks,
- sendVarp(1338, -1); // +32 Tracks,
- sendVarp(1681, -1); // +20 Tracks.
- sendSetWidgetText(WidgetId.MUSIC_PANEL_ID, 5, "AUTO"); // FIXME: This is wrong?
- sendWidgetSetClickMask(WidgetId.MUSIC_PANEL_ID, 1, 0, 556, 6); // Track List.
- // Combat Panel.
- sendVarp(43, 1); // Attack Style Selection.
- sendVarp(300, 1000); // Special Attack Amount.
- sendVarp(843, 0); // Weapon Style Group.
- sendSetWidgetText(WidgetId.COMBAT_GROUP_ID, 1, "Unarmed");
- sendSetWidgetText(WidgetId.COMBAT_GROUP_ID, 2, "Combat Lvl: " + 3);
- // Chatbox Panel: Check Display Name.
- sendVarp(1054, 0); // Clan Tab Setting.
- // TODO: Implement this.
- boolean hasSetDisplayName = true;
- if (hasSetDisplayName) {
- sendCS2Script(1105, 1);
- } else {
- sendCS2Script(1105, 0);
- }
- // Minimap Panel.
- sendRunEnergy(100);
- // Stats Panel.
- sendSkill(3, 10, 1154);
- for (int i = 0; i < 25; i++) {
- if (i != 3) {
- sendSkill(i, 1, 0);
- }
- }
- sendMessage("Welcome to VirtueOS #168!");
- addBlock(SynchronizationBlock.createAppearanceBlock(this));
- addBlock(SynchronizationBlock.createMovementTypeBlock(walkingQueue.runningQueue(), isTeleporting()));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement