RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
Settings.java
1package com.osroyale.game.world.entity.mob.player;
2
3import com.osroyale.content.clanchannel.content.ClanMemberComporator;
4import com.osroyale.net.packet.out.SendConfig;
5import com.osroyale.net.packet.out.SendScreenMode;
6import com.osroyale.net.packet.out.SendZoom;
7
44
45public class Settings {
47 public boolean lockExperience = false;
49 public boolean triviaBot = true;
51 public boolean dropNotification = true;
53 public boolean untradeableNotification = true;
55 public boolean welcomeScreen = true;
57 public boolean prestigeColors = true;
59 public boolean yell = true;
61 public int brightness = 3;
63 public int zoom = -1;
65 public boolean autoRetaliate = true;
67 public boolean mouse = false;
69 public boolean chatEffects = true;
71 public boolean acceptAid = false;
73 public boolean privateChat = true;
75 public boolean profanityFilter = false;
77 public boolean cameraMovement = true;
79 public boolean ESC_CLOSE = false;
80 public int clientWidth = 765;
81 public int clientHeight = 503;
82 public boolean screenshotKill = true;
83
85 public Player player;
86
89
92 this.player = player;
93 }
94
96 public void login() {
97 setZoom(zoom, false);
98 player.send(new SendConfig(172, autoRetaliate ? 1 : 0));
99 player.send(new SendConfig(166, brightness));
100 player.send(new SendConfig(152, player.movement.isRunningToggled() ? 1 : 0));
101 player.send(new SendConfig(981, acceptAid ? 1 : 0));
102 player.send(new SendConfig(171, chatEffects ? 1 : 0));
103 player.send(new SendConfig(287, privateChat ? 1 : 0));
104 player.send(new SendConfig(203, profanityFilter ? 1 : 0));
105 player.send(new SendConfig(170, mouse ? 1 : 0));
106 player.send(new SendConfig(207, cameraMovement ? 1 : 0));
107 player.send(new SendConfig(980, 0));
108 player.send(new SendConfig(594, ESC_CLOSE ? 1 : 0));
109 player.send(new SendConfig(394, clanMemberComporator.ordinal()));
110 }
111
113 public void setZoom(int zoom, boolean save) {
114 int value = 0;
115 int config = zoom > 4 ? 4 : (zoom == -1 ? 1 : zoom);
116 switch (zoom) {
117 case -1: value = 600; break;
118 case 1: value = 200; break;
119 case 2: value = 400; break;
120 case 3: value = 800; break;
121 case 4: value = 1000; break;
122 }
123 if (this.zoom != zoom)
124 this.zoom = zoom;
125 if (!save) {
126 player.send(new SendZoom(value));
127 player.send(new SendConfig(176, config + 1));
128 }
129 }
130
132 public void setBrightness(int brightness) {
133 if (brightness > 4) {
134 brightness = 4;
135 } else if (brightness < 0) {
136 brightness = 0;
137 }
138 this.brightness = (byte) brightness;
139 }
140}