Compare commits
2 Commits
master
...
r3cp3ct-Ja
Author | SHA1 | Date | |
---|---|---|---|
|
e943508ed8 | ||
|
69f9f2449c |
@ -4,6 +4,7 @@
|
||||
<classpathentry kind="src" path="lib"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="lib" path="lib/commons-io-2.5.jar"/>
|
||||
<classpathentry kind="lib" path="lib/twitch-api-wrapper-0.3-jar-with-dependencies.jar"/>
|
||||
<classpathentry kind="lib" path="lib/lwjgl-glfw.jar"/>
|
||||
<classpathentry kind="lib" path="lib/lwjgl-glfw-natives-linux.jar"/>
|
||||
<classpathentry kind="lib" path="lib/lwjgl-glfw-natives-macos.jar"/>
|
||||
|
9
.gitignore
vendored
9
.gitignore
vendored
@ -15,12 +15,3 @@
|
||||
/jinput-raw_64.dll
|
||||
/jinput-wintab.dll
|
||||
/memoryDump.txt
|
||||
/sessions
|
||||
/tmp_profile
|
||||
/debug.log
|
||||
/follows
|
||||
/map_icons.png
|
||||
/mapdata
|
||||
/temp_connect
|
||||
/tmp_mapdata
|
||||
/tmp2
|
||||
|
@ -1,4 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/sig/modules/RabiRace/SessionCreateWindow.java=UTF-8
|
||||
encoding//src/sig/modules/RabiRace/SessionListWindow.java=UTF-8
|
||||
encoding//src/sig/modules/RabiRibi/MemoryOffset.java=UTF-8
|
||||
|
@ -1,13 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
|
||||
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary=
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
|
||||
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary=
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
|
||||
org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
|
||||
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
@ -15,97 +6,6 @@ org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.APILeak=warning
|
||||
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deadCode=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
|
||||
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
|
||||
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
|
||||
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
|
||||
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
|
||||
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
|
||||
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
|
||||
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
|
||||
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning
|
||||
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
|
||||
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
|
||||
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
|
||||
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
|
||||
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
|
||||
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
|
||||
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
|
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -9,7 +9,7 @@ import sig.utils.DebugUtils;
|
||||
|
||||
public class FileManager {
|
||||
String fileloc;
|
||||
final String serverURL = "http://45.33.13.215:8080/sigIRCv2/";
|
||||
final String serverURL = "http://45.33.13.215/sigIRCv2/";
|
||||
boolean folder=false;
|
||||
|
||||
public FileManager(String location) {
|
||||
|
@ -53,7 +53,7 @@ public class Module {
|
||||
}
|
||||
|
||||
private void enableWindowDrag(int mouseX, int mouseY) {
|
||||
if (sigIRC.showWindowControls && !dragging && inDragBounds(mouseX,mouseY) && !DRAGGING) {
|
||||
if (!sigIRC.overlayMode && !dragging && inDragBounds(mouseX,mouseY) && !DRAGGING) {
|
||||
//Enable dragging.
|
||||
dragOffset = new Point((int)position.getX() - mouseX,(int)position.getY()-mouseY);
|
||||
dragging=DRAGGING=true;
|
||||
@ -102,32 +102,23 @@ public class Module {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void loadModule() {
|
||||
|
||||
}
|
||||
public static void unloadModule() {
|
||||
|
||||
}
|
||||
|
||||
private void dragWindow() {
|
||||
if (sigIRC.showWindowControls) {
|
||||
if (dragging) {
|
||||
//sigIRC.panel.repaint(getDrawBounds().getBounds());
|
||||
int mouseX = sigIRC.panel.lastMouseX+(int)dragOffset.getX();
|
||||
int mouseY = sigIRC.panel.lastMouseY+(int)dragOffset.getY();
|
||||
int oldX = (int)position.getX();
|
||||
int oldY = (int)position.getY();
|
||||
position = new Rectangle((int)Math.min(Math.max(0,mouseX),sigIRC.window.getWidth()-position.getWidth()), (int)Math.min(Math.max(titleHeight,mouseY),sigIRC.window.getHeight()-position.getHeight()-titleHeight*2),(int)position.getWidth(),(int)position.getHeight());
|
||||
//System.out.println(sigIRC.panel.lastMouseX+","+sigIRC.panel.lastMouseY);
|
||||
ModuleDragEvent(oldX,oldY,mouseX,mouseY);
|
||||
}
|
||||
if (inDragBounds(sigIRC.panel.lastMouseX,sigIRC.panel.lastMouseY)) {
|
||||
inDragZone=true;
|
||||
//System.out.println("In Drag Zone for Module "+name);
|
||||
//sigIRC.panel.setCursor(new Cursor(Cursor.MOVE_CURSOR));
|
||||
}
|
||||
}/*else
|
||||
if (dragging) {
|
||||
//sigIRC.panel.repaint(getDrawBounds().getBounds());
|
||||
int mouseX = sigIRC.panel.lastMouseX+(int)dragOffset.getX();
|
||||
int mouseY = sigIRC.panel.lastMouseY+(int)dragOffset.getY();
|
||||
int oldX = (int)position.getX();
|
||||
int oldY = (int)position.getY();
|
||||
position = new Rectangle((int)Math.min(Math.max(0,mouseX),sigIRC.window.getWidth()-position.getWidth()), (int)Math.min(Math.max(titleHeight,mouseY),sigIRC.window.getHeight()-position.getHeight()-titleHeight*2),(int)position.getWidth(),(int)position.getHeight());
|
||||
//System.out.println(sigIRC.panel.lastMouseX+","+sigIRC.panel.lastMouseY);
|
||||
ModuleDragEvent(oldX,oldY,mouseX,mouseY);
|
||||
}
|
||||
if (inDragBounds(sigIRC.panel.lastMouseX,sigIRC.panel.lastMouseY)) {
|
||||
inDragZone=true;
|
||||
//System.out.println("In Drag Zone for Module "+name);
|
||||
//sigIRC.panel.setCursor(new Cursor(Cursor.MOVE_CURSOR));
|
||||
} /*else
|
||||
if (sigIRC.panel.getCursor().getType()==Cursor.MOVE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
|
||||
}*/
|
||||
@ -150,7 +141,7 @@ public class Module {
|
||||
}
|
||||
|
||||
private void drawModuleHeader(Graphics g) {
|
||||
if (sigIRC.showWindowControls) {
|
||||
if (!sigIRC.overlayMode) {
|
||||
g.drawImage(Module.IMG_DRAGBAR,
|
||||
(int)position.getX()+2,
|
||||
(int)position.getY()-Module.IMG_DRAGBAR.getHeight(),
|
||||
|
@ -1,10 +0,0 @@
|
||||
package sig;
|
||||
|
||||
public class ModuleLinker {
|
||||
public String name = "";
|
||||
public Module mod;
|
||||
public ModuleLinker(String name,Module mod) {
|
||||
this.name = name;
|
||||
this.mod = mod;
|
||||
}
|
||||
}
|
@ -1,208 +0,0 @@
|
||||
package sig;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.event.WindowListener;
|
||||
|
||||
import javax.swing.BoxLayout;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JColorChooser;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import sig.modules.BandoriModule;
|
||||
import sig.modules.ChatLogModule;
|
||||
import sig.modules.ControllerModule;
|
||||
import sig.modules.DDRStepModule;
|
||||
import sig.modules.RabiRaceModule;
|
||||
import sig.modules.RabiRibiModule;
|
||||
import sig.modules.TouhouMotherModule;
|
||||
import sig.modules.TwitchModule;
|
||||
|
||||
public class ModuleSelector extends JFrame implements WindowListener{
|
||||
public static JCheckBox bandoriBox = new JCheckBox("Bandori",sigIRC.bandorimodule_enabled);
|
||||
public static JCheckBox ddrstepBox = new JCheckBox("DDR Step",sigIRC.ddrstepmodule_enabled);
|
||||
public static JCheckBox rabiraceBox = new JCheckBox("Rabi Race",sigIRC.rabiracemodule_enabled);
|
||||
public static JCheckBox rabiribiBox = new JCheckBox("Rabi Ribi (Broken)",sigIRC.rabiribimodule_enabled);
|
||||
public static JCheckBox controllerBox = new JCheckBox("Controller",sigIRC.controllermodule_enabled);
|
||||
public static JCheckBox chatlogBox = new JCheckBox("Chat Log",sigIRC.chatlogmodule_enabled);
|
||||
public static JCheckBox twitchBox = new JCheckBox("Twitch",sigIRC.twitchmodule_enabled);
|
||||
public static JCheckBox touhoumotherBox = new JCheckBox("Touhou Mother",sigIRC.touhoumothermodule_enabled);
|
||||
public ModuleSelector() {
|
||||
JPanel panel = new JPanel();
|
||||
bandoriBox.setActionCommand("bandori");
|
||||
bandoriBox.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent ev) {
|
||||
if (ev.getActionCommand().equalsIgnoreCase("bandori")) {
|
||||
if (ModuleSelector.bandoriBox.isSelected()) {
|
||||
BandoriModule.loadModule();
|
||||
} else {
|
||||
BandoriModule.unloadModule();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
bandoriBox.setVisible(true);
|
||||
ddrstepBox.setActionCommand("ddrstep");
|
||||
ddrstepBox.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent ev) {
|
||||
if (ev.getActionCommand().equalsIgnoreCase("ddrstep")) {
|
||||
if (ModuleSelector.ddrstepBox.isSelected()) {
|
||||
DDRStepModule.loadModule();
|
||||
} else {
|
||||
DDRStepModule.unloadModule();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
ddrstepBox.setVisible(true);
|
||||
rabiraceBox.setActionCommand("rabirace");
|
||||
rabiraceBox.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent ev) {
|
||||
if (ev.getActionCommand().equalsIgnoreCase("rabirace")) {
|
||||
if (ModuleSelector.rabiraceBox.isSelected()) {
|
||||
RabiRaceModule.loadModule();
|
||||
} else {
|
||||
RabiRaceModule.unloadModule();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
rabiraceBox.setVisible(true);
|
||||
rabiribiBox.setActionCommand("rabiribi");
|
||||
rabiribiBox.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent ev) {
|
||||
if (ev.getActionCommand().equalsIgnoreCase("rabiribi")) {
|
||||
if (ModuleSelector.rabiribiBox.isSelected()) {
|
||||
RabiRibiModule.loadModule();
|
||||
} else {
|
||||
RabiRibiModule.unloadModule();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
rabiribiBox.setVisible(true);
|
||||
controllerBox.setActionCommand("controller");
|
||||
controllerBox.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent ev) {
|
||||
if (ev.getActionCommand().equalsIgnoreCase("controller")) {
|
||||
if (ModuleSelector.controllerBox.isSelected()) {
|
||||
ControllerModule.loadModule();
|
||||
} else {
|
||||
ControllerModule.unloadModule();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
controllerBox.setVisible(true);
|
||||
chatlogBox.setActionCommand("chatlog");
|
||||
chatlogBox.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent ev) {
|
||||
if (ev.getActionCommand().equalsIgnoreCase("chatlog")) {
|
||||
if (ModuleSelector.chatlogBox.isSelected()) {
|
||||
ChatLogModule.loadModule();
|
||||
} else {
|
||||
ChatLogModule.unloadModule();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
chatlogBox.setVisible(true);
|
||||
twitchBox.setActionCommand("twitch");
|
||||
twitchBox.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent ev) {
|
||||
if (ev.getActionCommand().equalsIgnoreCase("twitch")) {
|
||||
if (ModuleSelector.twitchBox.isSelected()) {
|
||||
TwitchModule.loadModule();
|
||||
} else {
|
||||
TwitchModule.unloadModule();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
twitchBox.setVisible(true);
|
||||
touhoumotherBox.setActionCommand("touhoumother");
|
||||
touhoumotherBox.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent ev) {
|
||||
if (ev.getActionCommand().equalsIgnoreCase("touhoumother")) {
|
||||
if (ModuleSelector.touhoumotherBox.isSelected()) {
|
||||
TouhouMotherModule.loadModule();
|
||||
} else {
|
||||
TouhouMotherModule.unloadModule();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
touhoumotherBox.setVisible(true);
|
||||
|
||||
panel.setVisible(true);
|
||||
panel.add(twitchBox);
|
||||
panel.add(chatlogBox);
|
||||
panel.add(controllerBox);
|
||||
panel.add(rabiraceBox);
|
||||
panel.add(bandoriBox);
|
||||
panel.add(touhoumotherBox);
|
||||
panel.add(ddrstepBox);
|
||||
panel.add(rabiribiBox);
|
||||
|
||||
panel.setLayout(new BoxLayout(panel,BoxLayout.PAGE_AXIS));
|
||||
|
||||
this.add(panel);
|
||||
this.pack();
|
||||
//this.setVisible(true);
|
||||
this.repaint();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void windowOpened(WindowEvent e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void windowClosing(WindowEvent e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void windowClosed(WindowEvent e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void windowIconified(WindowEvent e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void windowDeiconified(WindowEvent e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void windowActivated(WindowEvent e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void windowDeactivated(WindowEvent e) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
package sig;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseWheelEvent;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
|
||||
import sig.sigIRC;
|
||||
import sig.modules.TouhouMotherModule;
|
||||
import sig.utils.DrawUtils;
|
||||
import sig.utils.FileUtils;
|
||||
import sig.utils.TextUtils;
|
||||
|
||||
public class ModuleSelectorButton {
|
||||
BufferedImage buttonimg;
|
||||
int x=0;
|
||||
int y=0;
|
||||
boolean buttonEnabled = true;
|
||||
|
||||
public ModuleSelectorButton(File filename, int x, int y) {
|
||||
this.x=x;
|
||||
this.y=y;
|
||||
try {
|
||||
buttonimg = ImageIO.read(filename);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public void draw(Graphics g) {
|
||||
if (buttonEnabled) {
|
||||
g.drawImage(buttonimg, x, y, sigIRC.panel);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClickEvent(MouseEvent ev) {
|
||||
if (buttonEnabled && !sigIRC.overlayMode) {
|
||||
if (ev.getX()>=x && ev.getX()<=x+buttonimg.getWidth() &&
|
||||
ev.getY()>=y && ev.getY()<=y+buttonimg.getHeight()) {
|
||||
sigIRC.moduleSelectorWindow.setVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -4,7 +4,6 @@ import java.awt.Color;
|
||||
import java.awt.Component;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.FontFormatException;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.awt.MouseInfo;
|
||||
@ -25,11 +24,7 @@ import java.awt.event.WindowEvent;
|
||||
import java.awt.event.WindowListener;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
import javax.sound.sampled.AudioSystem;
|
||||
import javax.sound.sampled.LineUnavailableException;
|
||||
import javax.sound.sampled.Mixer;
|
||||
import javax.swing.JColorChooser;
|
||||
import javax.swing.JMenuItem;
|
||||
import javax.swing.JPanel;
|
||||
@ -38,9 +33,7 @@ import javax.swing.JPopupMenu;
|
||||
import sig.modules.BandoriModule;
|
||||
import sig.modules.ChatLogModule;
|
||||
import sig.modules.ChatLog.ChatLogMessage;
|
||||
import sig.utils.DrawUtils;
|
||||
import sig.utils.FileUtils;
|
||||
import sig.utils.TextUtils;
|
||||
|
||||
public class MyPanel extends JPanel implements MouseListener, ActionListener, MouseWheelListener, KeyListener, ComponentListener, WindowListener{
|
||||
//List<String> messages = new ArrayList<String>();
|
||||
@ -56,13 +49,6 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
||||
programFont = programFont.deriveFont(sigIRC.messageFontSize);
|
||||
userFont = userFont.deriveFont(sigIRC.usernameFontSize);
|
||||
smallFont = smallFont.deriveFont(sigIRC.touhoumotherConsoleFontSize);
|
||||
GraphicsEnvironment ge =
|
||||
GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
try {
|
||||
ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, new File(sigIRC.BASEDIR+"sigIRC/CP_Font.ttf")));
|
||||
} catch (FontFormatException | IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
//setBorder(BorderFactory.createLineBorder(Color.black));
|
||||
addMouseListener(this);
|
||||
addMouseWheelListener(this);
|
||||
@ -79,14 +65,10 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
||||
super.paintComponent(g);
|
||||
// Draw Text
|
||||
//int counter=18;
|
||||
try {
|
||||
if (sigIRC.panel!=null && MouseInfo.getPointerInfo()!=null) {
|
||||
lastMouseX = (int)(MouseInfo.getPointerInfo().getLocation().getX()-sigIRC.panel.getLocationOnScreen().getX());
|
||||
lastMouseY = (int)(MouseInfo.getPointerInfo().getLocation().getY()-sigIRC.panel.getLocationOnScreen().getY());
|
||||
//System.out.println("("+lastMouseX+","+lastMouseY+")");
|
||||
}
|
||||
} catch (NullPointerException e) {
|
||||
//Do Nothing I guess.
|
||||
if (sigIRC.panel!=null) {
|
||||
lastMouseX = (int)(MouseInfo.getPointerInfo().getLocation().getX()-sigIRC.panel.getLocationOnScreen().getX());
|
||||
lastMouseY = (int)(MouseInfo.getPointerInfo().getLocation().getY()-sigIRC.panel.getLocationOnScreen().getY());
|
||||
//System.out.println("("+lastMouseX+","+lastMouseY+")");
|
||||
}
|
||||
/*if (sigIRC.window!=null && sigIRC.window.getMousePosition(true)!=null && sigIRC.overlayMode) {
|
||||
lastMouseX = (int)sigIRC.window.getMousePosition(true).getX();
|
||||
@ -97,12 +79,6 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
||||
lastMouseY = -1;
|
||||
}*/
|
||||
//
|
||||
//AudioSystem.getMixerInfo()[0].
|
||||
/*for (Mixer.Info i : AudioSystem.getMixerInfo()) {
|
||||
System.out.println(i+": "+AudioSystem.getMixer(i).isOpen());
|
||||
}*/
|
||||
//System.out.println(Audio.getMasterOutputVolume());
|
||||
|
||||
for (Module m : sigIRC.modules) {
|
||||
m.draw(g);
|
||||
}
|
||||
@ -111,11 +87,6 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
||||
sigIRC.chatlogtwitchemoticons.get(i).draw(g);
|
||||
}
|
||||
}
|
||||
if (sigIRC.newUpdateIsAvailable) {
|
||||
DrawUtils.drawOutlineText(g, MyPanel.programFont, sigIRC.panel.getWidth()
|
||||
- TextUtils.calculateStringBoundsFont("NEW UPDATE AVAILABLE!!",MyPanel.programFont).getWidth(), sigIRC.panel.getHeight()
|
||||
- TextUtils.calculateStringBoundsFont("NEW UPDATE AVAILABLE!!",MyPanel.programFont).getHeight(), 2, Color.RED, Color.WHITE, "NEW UPDATE AVAILABLE!!");
|
||||
}
|
||||
for (int i=0;i<sigIRC.textobj.size();i++) {
|
||||
if (sigIRC.textobj.get(i).isActive()) {
|
||||
if (sigIRC.overlayMode) {
|
||||
@ -141,7 +112,6 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
||||
}
|
||||
if (!sigIRC.overlayMode) {
|
||||
sigIRC.button.draw(g);
|
||||
sigIRC.modulebutton.draw(g);
|
||||
}
|
||||
}
|
||||
|
||||
@ -170,7 +140,6 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
||||
m.mouseModuleMousePress(ev);
|
||||
}
|
||||
sigIRC.button.onClickEvent(ev);
|
||||
sigIRC.modulebutton.onClickEvent(ev);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -236,10 +205,8 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
|
||||
sigIRC.config.setInteger("windowY", sigIRC.windowY);
|
||||
sigIRC.config.setInteger("windowWidth", sigIRC.windowWidth);
|
||||
sigIRC.config.setInteger("windowHeight", sigIRC.windowHeight);
|
||||
sigIRC.button.x = sigIRC.panel.getX()+sigIRC.panel.getWidth()-192;
|
||||
sigIRC.button.x = sigIRC.panel.getX()+sigIRC.panel.getWidth()-96;
|
||||
sigIRC.button.y = 64+sigIRC.rowobj.size()*sigIRC.rowSpacing;
|
||||
sigIRC.modulebutton.x = sigIRC.panel.getX()+sigIRC.panel.getWidth()-96;
|
||||
sigIRC.modulebutton.y = 64+sigIRC.rowobj.size()*sigIRC.rowSpacing;
|
||||
//com.repaint();
|
||||
//sigIRC.panel.repaint();
|
||||
sigIRC.config.saveProperties();
|
||||
|
@ -2,6 +2,13 @@ package sig;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
import com.mb3364.twitch.api.handlers.ChannelResponseHandler;
|
||||
import com.mb3364.twitch.api.handlers.ChannelSubscriptionResponseHandler;
|
||||
import com.mb3364.twitch.api.handlers.UserSubscriptionResponseHandler;
|
||||
import com.mb3364.twitch.api.models.Channel;
|
||||
import com.mb3364.twitch.api.models.ChannelSubscription;
|
||||
import com.mb3364.twitch.api.models.UserSubscription;
|
||||
|
||||
public class SubEmoticon extends Emoticon{
|
||||
String channelName = "";
|
||||
static boolean userCanUseEmoticon=false;
|
||||
|
@ -38,8 +38,8 @@ public class UpdateEvent implements ActionListener{
|
||||
sigIRC.subchannelCount==sigIRC.subchannelIds.size()) {
|
||||
Thread downloadThread = new Thread(){
|
||||
public void run() {
|
||||
//JSONObject data = GetSubEmoteJson();
|
||||
sigIRC.downloadSubEmotes();
|
||||
JSONObject data = GetSubEmoteJson();
|
||||
sigIRC.downloadSubEmotes(data);
|
||||
sigIRC.subEmotesCompleted=true;
|
||||
}
|
||||
};
|
||||
@ -48,8 +48,8 @@ public class UpdateEvent implements ActionListener{
|
||||
}
|
||||
}
|
||||
|
||||
private boolean GetSubEmotesNeedChecking() {
|
||||
/*JSONObject subemotes = null;
|
||||
private JSONObject GetSubEmoteJson() {
|
||||
JSONObject subemotes = null;
|
||||
try {
|
||||
File filer = new File(sigIRC.SUBEMOTELISTFILE);
|
||||
if (!filer.exists()) {
|
||||
@ -77,11 +77,10 @@ public class UpdateEvent implements ActionListener{
|
||||
}
|
||||
} catch (JSONException | IOException e) {
|
||||
e.printStackTrace();
|
||||
}*/
|
||||
boolean needsUpdate = sigIRC.lastSubEmoteUpdate != Calendar.getInstance().get(Calendar.DAY_OF_YEAR);
|
||||
}
|
||||
sigIRC.lastSubEmoteUpdate = Calendar.getInstance().get(Calendar.DAY_OF_YEAR);
|
||||
sigIRC.config.setInteger("lastSubEmote_APIUpdate", sigIRC.lastSubEmoteUpdate);
|
||||
return needsUpdate;
|
||||
return subemotes;
|
||||
}
|
||||
|
||||
private void UpdateWindowPosition() {
|
||||
|
@ -2,7 +2,6 @@ package sig.modules;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
@ -29,8 +28,7 @@ import sig.utils.SoundUtils;
|
||||
|
||||
public class BandoriModule extends Module{
|
||||
public static BandoriModule bandori_module;
|
||||
public BufferedImage stamp_collection1,stamp_collection2,stamp_collection3
|
||||
,stamp_collection4,stamp_collection5,stamp_collection6,stamp_collection7,stamp_collection8,stamp_collection9,stamp_collection10,stamp_collection11;
|
||||
public BufferedImage stamp_collection1,stamp_collection2;
|
||||
public static HashMap<String,ImageScheme> image_map = new HashMap<String,ImageScheme>();
|
||||
public static HashMap<String,List<String>> stamp_map = new HashMap<String,List<String>>();
|
||||
static List<Stamp> active_stamps = new ArrayList<Stamp>();
|
||||
@ -54,15 +52,6 @@ public class BandoriModule extends Module{
|
||||
try {
|
||||
stamp_collection1 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/stamps1.png"));
|
||||
stamp_collection2 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/stamps2_2.png"));
|
||||
stamp_collection3 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/stamp_018003.png"));
|
||||
stamp_collection4 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/stamp_003003.png"));
|
||||
stamp_collection5 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/stamp_007003.png"));
|
||||
stamp_collection6 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/stamp_011005.png"));
|
||||
stamp_collection7 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/stamp_013003.png"));
|
||||
stamp_collection8 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/stamp_016002.png"));
|
||||
stamp_collection9 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/stamp_017004.png"));
|
||||
stamp_collection10 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/stamp_021004.png"));
|
||||
stamp_collection11 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/stamp_006004.png"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -92,7 +81,6 @@ public class BandoriModule extends Module{
|
||||
image_map.put("ako_onemoretime", new ImageScheme(stamp_collection1,23));
|
||||
image_map.put("rinko_jam", new ImageScheme(stamp_collection2,0));
|
||||
image_map.put("marina_yeahyeah", new ImageScheme(stamp_collection2,1)); //Skip 2.
|
||||
image_map.put("cookie_cookie", new ImageScheme(stamp_collection2,2)); //Skip 2.
|
||||
image_map.put("kokoro_moremore", new ImageScheme(stamp_collection2,3));
|
||||
image_map.put("arisa_huh", new ImageScheme(stamp_collection2,4));
|
||||
image_map.put("yukina_followmylead", new ImageScheme(stamp_collection2,5));
|
||||
@ -122,101 +110,98 @@ public class BandoriModule extends Module{
|
||||
image_map.put("arisa_okayhereigo", new ImageScheme(stamp_collection2,29));
|
||||
image_map.put("tomoe_giveityourall", new ImageScheme(stamp_collection2,30));
|
||||
image_map.put("kanon_keepgoing", new ImageScheme(stamp_collection2,31));
|
||||
image_map.put("kokoro_letshavefun", new ImageScheme(stamp_collection2,32));
|
||||
image_map.put("kasumi_letshaveagreatshow", new ImageScheme(stamp_collection2,33));
|
||||
image_map.put("ako_illshowyousomethingcool", new ImageScheme(stamp_collection2,34));
|
||||
image_map.put("yukina_mindifipetyou", new ImageScheme(stamp_collection2,35));
|
||||
image_map.put("maya_whoa", new ImageScheme(stamp_collection2,36));
|
||||
image_map.put("hina_interesting", new ImageScheme(stamp_collection2,37));
|
||||
image_map.put("kaoru_imherewithyou", new ImageScheme(stamp_collection2,38));
|
||||
image_map.put("ran_itonlygetsbetter", new ImageScheme(stamp_collection2,39));
|
||||
image_map.put("himari_onthescene", new ImageScheme(stamp_collection2,40));
|
||||
image_map.put("rinko_wasthatgood", new ImageScheme(stamp_collection2,41));
|
||||
image_map.put("chisato_greaterthangreat", new SingleImageScheme(stamp_collection3));
|
||||
image_map.put("rimi_imsureitllbefine", new SingleImageScheme(stamp_collection4));
|
||||
image_map.put("moca_letsgetstarted", new SingleImageScheme(stamp_collection5));
|
||||
image_map.put("kokoro_justlikethat", new SingleImageScheme(stamp_collection6));
|
||||
image_map.put("hagumi_roar", new SingleImageScheme(stamp_collection7));
|
||||
image_map.put("aya_somuchpressure", new SingleImageScheme(stamp_collection8));
|
||||
image_map.put("hina_ivebeenwaiting", new SingleImageScheme(stamp_collection9));
|
||||
image_map.put("yukina_nexttime", new SingleImageScheme(stamp_collection10));
|
||||
image_map.put("ran_showtime", new SingleImageScheme(stamp_collection11));
|
||||
|
||||
stamp_map.put("kasumi_gogo",Arrays.asList("gogo"));
|
||||
stamp_map.put("cookie_cookie",Arrays.asList("0.o","o.0",":3","fat","michellecookie"));
|
||||
stamp_map.put("tae_letsplay",Arrays.asList("playtogether","wanttoplay","multilive","letsplay"));
|
||||
stamp_map.put("rimi_choco",Arrays.asList("choco","cornet"));
|
||||
stamp_map.put("saya_bread",Arrays.asList("bread"));
|
||||
stamp_map.put("arisa_doki",Arrays.asList("doki","chomama","baka"));
|
||||
stamp_map.put("ran_same",Arrays.asList("sameasalways","alwayssame","alwaysthesame","itsum"));
|
||||
stamp_map.put("moca_youdidit",Arrays.asList("youdidit","congratulations","buns","mocatastic"));
|
||||
stamp_map.put("himari_heyheyhoh",Arrays.asList("heyo","heyhey","hihi","hiyo","aao"));
|
||||
stamp_map.put("tomoe_letsdothis",Arrays.asList("letsdothis","letsdoit"));
|
||||
stamp_map.put("tsugumi_wecandoit",Arrays.asList("wegotthis","wegotit","wecan"));
|
||||
stamp_map.put("kokoro_happylucky",Arrays.asList("happy!","lucky"));
|
||||
stamp_map.put("kaoru_fleeting",Arrays.asList("fleeting"));
|
||||
stamp_map.put("aya_fever",Arrays.asList("fever","ayay"));
|
||||
stamp_map.put("hagumi_smileyay",Arrays.asList("smileyay","yay!"));
|
||||
stamp_map.put("kanon_fuee",Arrays.asList("fuu","fue","waa","reee"));
|
||||
stamp_map.put("misaki_ready",Arrays.asList("ready"));
|
||||
stamp_map.put("hina_fullcombo",Arrays.asList("fc","fcd","fullcombo","nomiss","allperfect","notasinglemiss","thefc","anfc","fullperfect","easyfc","ezfc"));
|
||||
stamp_map.put("chisato_planned",Arrays.asList("justasplanned","allplanned","calculated","thatcoming"));
|
||||
stamp_map.put("maya_huhehe",Arrays.asList("hehe","huehe","huehue","shuwashuwa"));
|
||||
stamp_map.put("eve_bushido",Arrays.asList("bushido"));
|
||||
stamp_map.put("yukina_notbad",Arrays.asList("notbad","veryclose"));
|
||||
stamp_map.put("sayo_goodwork",Arrays.asList("goodwork","goodjob","nicejob","welldone","greatwork","greatjob"));
|
||||
stamp_map.put("lisa_nextonelastone",Arrays.asList("lastone","mylast"));
|
||||
stamp_map.put("ako_onemoretime",Arrays.asList("onemore","goagain","keepplaying","dontstop","runit"));
|
||||
stamp_map.put("rinko_jam",Arrays.asList("lovethissong","jam"/*,"happybirthday"*/));
|
||||
stamp_map.put("marina_yeahyeah",Arrays.asList("yeahyeah","letsgo"));
|
||||
stamp_map.put("kokoro_moremore",Arrays.asList("moremore","iwantmore"));
|
||||
stamp_map.put("arisa_huh",Arrays.asList("huh?","hh?","yy?","aat?","aa?","tt?","nani","nand"));
|
||||
stamp_map.put("yukina_followmylead",Arrays.asList("followmylead","takethelead","guideyou","fullydevoted"));
|
||||
stamp_map.put("rimi_choco",Arrays.asList("choco","cornet","ちょこ","ころね","チョコ","コロネ"));
|
||||
stamp_map.put("saya_bread",Arrays.asList("bread","pan","ぱん","パン"));
|
||||
stamp_map.put("arisa_doki",Arrays.asList("doki","chomama","baka","ばか","バカ","馬鹿","どき","ドキ"));
|
||||
stamp_map.put("ran_same",Arrays.asList("sameasalways","alwayssame","alwaysthesame","itsumodoori","いつも"));
|
||||
stamp_map.put("moca_youdidit",Arrays.asList("youdidit","congratulations","buns","mocatastic","やった","yatta","しゃーしたー"));
|
||||
stamp_map.put("himari_heyheyhoh",Arrays.asList("heyo","heyhey","hihi","hiyo","えい","おー"));
|
||||
stamp_map.put("tomoe_letsdothis",Arrays.asList("letsdothis","letsdoit","やるよ","yarimasyou","やりましょう","yaruyo"));
|
||||
stamp_map.put("tsugumi_wecandoit",Arrays.asList("wegotthis","wegotit","wecan","ganbare","がんばれ"));
|
||||
stamp_map.put("kokoro_happylucky",Arrays.asList("happy!","lucky","ハッピー","ラッキー","こころん"));
|
||||
stamp_map.put("kaoru_fleeting",Arrays.asList("fleeting","はかない","hakanai","儚い"));
|
||||
stamp_map.put("aya_fever",Arrays.asList("fever","ayay","あやや","ru","る","ナイス","フィーバー","jinglebells"));
|
||||
stamp_map.put("hagumi_smileyay",Arrays.asList("smileyay","yay!","スマイル","イエーイ"));
|
||||
stamp_map.put("kanon_fuee",Arrays.asList("fuu","fue","waa","reee","ふええ","わああ"));
|
||||
stamp_map.put("misaki_ready",Arrays.asList("amready","beenready","ready!","redii","準備完了"));
|
||||
stamp_map.put("hina_fullcombo",Arrays.asList("fcd","fullcombo","nomiss","allperfect","notasinglemiss","thefc","anfc","fullperfect","easyfc","ezfc","フルコンボよゆーでしょ","efsii"));
|
||||
stamp_map.put("chisato_planned",Arrays.asList("justasplanned","allplanned","calculated","thatcoming","keikakudoori","計画通り","けいかく","accordingtokeikaku"));
|
||||
stamp_map.put("maya_huhehe",Arrays.asList("hehe","huehe","huehue","shuwashuwa","フヘへ","しゅわしゅわ"));
|
||||
stamp_map.put("eve_bushido",Arrays.asList("bushido","ブシドー","ぶしど"));
|
||||
stamp_map.put("yukina_notbad",Arrays.asList("notbad","veryclose","やるわね","おしい","おしかった","悪くはない"));
|
||||
stamp_map.put("sayo_goodwork",Arrays.asList("goodwork","goodjob","nicejob","welldone","greatwork","greatjob","よくやった","お疲れ様でした","おつかれ","otsukare"));
|
||||
stamp_map.put("lisa_nextonelastone",Arrays.asList("lastone","mylast","さいご","次はさいご","次はラストねん"));
|
||||
stamp_map.put("ako_onemoretime",Arrays.asList("onemore","goagain","keepplaying","dontstop","runit","もういっかい","mouikkai","もう一回"));
|
||||
stamp_map.put("rinko_jam",Arrays.asList("lovethissong","jam"/*,"happybirthday"*/),"この歌好き");
|
||||
stamp_map.put("marina_yeahyeah",Arrays.asList("yeahyeah","letsgo","運営"));
|
||||
stamp_map.put("kokoro_moremore",Arrays.asList("moremore","iwantmore","もっと","motto","もっと欲しい"));
|
||||
stamp_map.put("arisa_huh",Arrays.asList("huh?","hh?","yy?","aat?","aa?","tt?","nani","nand","なに","何","はあ","wat"));
|
||||
stamp_map.put("yukina_followmylead",Arrays.asList("followmylead","takethelead","guideyou","fullydevoted","私についてきて"));
|
||||
stamp_map.put("kaoru_suchalovelyevening",Arrays.asList("goodevening","lovelyevening","beautifulnight","grandnight","wonderfulevening"));
|
||||
stamp_map.put("rimi_congrats",Arrays.asList("grats"));
|
||||
stamp_map.put("ran_somethingbigiscoming",Arrays.asList("somethingbig","iscoming","thatishowiroll","truecolor"));
|
||||
stamp_map.put("tsugumi_comeon",Arrays.asList("comeon","dontbeafraid","dontbeshy"));
|
||||
stamp_map.put("tae_fufusocute",Arrays.asList("socute","kawaii","fufu","adorable","cute"));
|
||||
stamp_map.put("eve_marchintobattle",Arrays.asList("marchintobattle","chargeintobattle"));
|
||||
stamp_map.put("saya_illtry",Arrays.asList("illtry","itachance","itatry","atleastonce"));
|
||||
stamp_map.put("lisa_imsohappy",Arrays.asList("ecstatic","sohappy","toohappy"));
|
||||
stamp_map.put("sayo_ohwell",Arrays.asList("ohwell","ahwell","youtried"));
|
||||
stamp_map.put("ako_areyouokay",Arrays.asList("youok","beok","daijo"));
|
||||
stamp_map.put("chisato_thisissomuchfun",Arrays.asList("muchfun","veryfun","reallyfun","extremelyfun","offun"));
|
||||
stamp_map.put("rinko_theresnoway",Arrays.asList("noway"));
|
||||
stamp_map.put("tae_thisisgreat",Arrays.asList("thisisgreat","thisisawesome","thisiswonderful"));
|
||||
stamp_map.put("moca_thisisgettinginteresting",Arrays.asList("gettinginteresting","thingsaregetting","thisisgetting"));
|
||||
stamp_map.put("kaoru_takemyhand",Arrays.asList("takemyhand","allowmeto","demonstrate","romeo"));
|
||||
stamp_map.put("kokoro_letsmaketheworldsmile",Arrays.asList("hhw","happyworld","hellohappy","worldsmile"));
|
||||
stamp_map.put("hina_nowwereboppin",Arrays.asList("bop","nowwere","zap"));
|
||||
stamp_map.put("kokoro_what_a_great_idea",Arrays.asList("greatidea","goodidea","greatthinking","goodthinking"));
|
||||
stamp_map.put("sayo_im_sorry",Arrays.asList("sorry","gomen","apologize","somethingwrong","forgive"));
|
||||
stamp_map.put("hagumi_hooray",Arrays.asList("hooray","hiphip","whoo","yahoo"));
|
||||
stamp_map.put("tsugumi_amazing",Arrays.asList("amazing","wow","sugoi","wooo","cool!","tsugurific"));
|
||||
stamp_map.put("eve_thefruits",Arrays.asList("fruits","labor","hardwork","effort"));
|
||||
stamp_map.put("lisa_imnotready",Arrays.asList("notready","notprep","stopit","holdon","onemin","onemom","noread","wontberead","notrdy","nottime","notime","waitam","waitforme"));
|
||||
stamp_map.put("arisa_okayhereigo",Arrays.asList("hereigo","okayilltry","alrightilltry","domybest","trymybest","alrighty","itashot","myturn","domybest"));
|
||||
stamp_map.put("tomoe_giveityourall",Arrays.asList("giveiteverything","allyougot","everythingyougot","tryyourbest","giveityourall","youreverything","yourall"));
|
||||
stamp_map.put("kanon_keepgoing",Arrays.asList("keepgoing","dontstop","youcandoit","makeit","gaja","petan","pettan","pengu"));
|
||||
stamp_map.put("kokoro_letshavefun",Arrays.asList("havefun","timeforfun"));
|
||||
stamp_map.put("kasumi_letshaveagreatshow",Arrays.asList("greatshow"));
|
||||
stamp_map.put("ako_illshowyousomethingcool",Arrays.asList("cool","havefun","timeforfun"));
|
||||
stamp_map.put("yukina_mindifipetyou",Arrays.asList("petyou"));
|
||||
stamp_map.put("maya_whoa",Arrays.asList("waaa","whoa")); //It's Showtime~!
|
||||
stamp_map.put("hina_interesting",Arrays.asList("rururu","interesting","ding"));
|
||||
stamp_map.put("kaoru_imherewithyou",Arrays.asList("herewithyou","hereforyou"));
|
||||
stamp_map.put("ran_itonlygetsbetter",Arrays.asList("getsbetter","onlygets"));
|
||||
stamp_map.put("rinko_wasthatgood",Arrays.asList("wasthatgood","wasitgood"));
|
||||
stamp_map.put("himari_onthescene",Arrays.asList("thescene"));
|
||||
stamp_map.put("chisato_greaterthangreat",Arrays.asList("greater"));
|
||||
stamp_map.put("rimi_imsureitllbefine",Arrays.asList("isfine","itwillbefine","itllbefine","itsfine","thatsokay","bealright"));
|
||||
stamp_map.put("moca_letsgetstarted",Arrays.asList("started"));
|
||||
stamp_map.put("kokoro_justlikethat",Arrays.asList("likethat"));
|
||||
stamp_map.put("hagumi_roar",Arrays.asList("roar","rawr","meow"));
|
||||
stamp_map.put("aya_somuchpressure",Arrays.asList("pressure","tough","thisalright","itsalright"));
|
||||
stamp_map.put("hina_ivebeenwaiting",Arrays.asList("waiting"));
|
||||
stamp_map.put("yukina_nexttime",Arrays.asList("nexttime"));
|
||||
stamp_map.put("ran_showtime",Arrays.asList("showtime"));
|
||||
stamp_map.put("rimi_congrats",Arrays.asList("grats","omedetou","gratz","おめでとう"));
|
||||
stamp_map.put("ran_somethingbigiscoming",Arrays.asList("somethingbig","iscoming","thatishowiroll","truecolor","Hajimaru","Hajimeru","何かが始まる"));
|
||||
stamp_map.put("tsugumi_comeon",Arrays.asList("comeon","dontbeafraid","dontbeshy","やろうよっ","やるよ","yarouyo","yaruyo"));
|
||||
stamp_map.put("tae_fufusocute",Arrays.asList("socute","kawaii","fufu","adorable","cute","ふふ","可愛い","かわいい"));
|
||||
stamp_map.put("eve_marchintobattle",Arrays.asList("marchintobattle","chargeintobattle","イクサへ"));
|
||||
stamp_map.put("saya_illtry",Arrays.asList("illtry","itachance","itatry","atleastonce","私やってみます"));
|
||||
stamp_map.put("lisa_imsohappy",Arrays.asList("ecstatic","sohappy","toohappy","うれしい","嬉しい","ureshii"));
|
||||
stamp_map.put("sayo_ohwell",Arrays.asList("ohwell","ahwell","youtried","shikatanai","仕方ないわね"));
|
||||
stamp_map.put("ako_areyouokay",Arrays.asList("youok","beok","daijoubu","大丈夫"));
|
||||
stamp_map.put("chisato_thisissomuchfun",Arrays.asList("muchfun","veryfun","reallyfun","extremelyfun","offun","楽しいわね","tanoshii"));
|
||||
stamp_map.put("rinko_theresnoway",Arrays.asList("noway","絶対ムリ","無理よ"));
|
||||
stamp_map.put("tae_thisisgreat",Arrays.asList("thisisgreat","thisisawesome","thisiswonderful","最高だね","saikou"));
|
||||
stamp_map.put("moca_thisisgettinginteresting",Arrays.asList("gettinginteresting","thingsaregetting","thisisgetting","面白くなってきた"));
|
||||
stamp_map.put("kaoru_takemyhand",Arrays.asList("takemyhand","allowmeto","demonstrate","romeo","手をとって"));
|
||||
stamp_map.put("kokoro_letsmaketheworldsmile",Arrays.asList("hhw","happyworld","hellohappy","worldsmile","世界を笑顔に"));
|
||||
stamp_map.put("hina_nowwereboppin",Arrays.asList("bop","nowwere","zap","run","るん","るんってきた"));
|
||||
stamp_map.put("kokoro_what_a_great_idea",Arrays.asList("greatidea","goodidea","greatthinking","goodthinking","素敵なアイディアね"));
|
||||
stamp_map.put("sayo_im_sorry",Arrays.asList("sorry","gomen","apologize","somethingwrong","forgive","ごめんなさい","gomennasai"));
|
||||
stamp_map.put("hagumi_hooray",Arrays.asList("hooray","hiphip","whoo","yahoo","バンザイ","banzai"));
|
||||
stamp_map.put("tsugumi_amazing",Arrays.asList("amazing","wow","sugoi","wooo","cool!","tsugurific","すごいですっ","すごい"));
|
||||
stamp_map.put("eve_thefruits",Arrays.asList("fruits","labor","hardwork","effort","トックンの成果"));
|
||||
stamp_map.put("lisa_imnotready",Arrays.asList("notready","notprep","stopit","holdon","onemin","onemom","noread","wontberead","notrdy","nottime","notime","waitam","waitforme","心の準備が"));
|
||||
stamp_map.put("arisa_okayhereigo",Arrays.asList("hereigo","okayilltry","alrightilltry","domybest","trymybest","alrighty","itashot","myturn","domybest","yoshi","よし行くぞ"));
|
||||
stamp_map.put("tomoe_giveityourall",Arrays.asList("giveiteverything","allyougot","everythingyougot","tryyourbest","giveityourall","youreverything","yourall","全力で行くぜ"));
|
||||
stamp_map.put("kanon_keepgoing",Arrays.asList("keepgoing","dontstop","youcandoit","makeit","gaja","petan","pettan","pengu","susumou","nagaja","進もう","間に合って"));
|
||||
stamp_map.put("kasumi_letshaveagreatshow",Arrays.asList("greatshow","letsparty","最高の演奏しよう","theperfectshow"));
|
||||
stamp_map.put("rimi_imsureitwillbefine",Arrays.asList("befine","willbefine","imsure","imsureitsok","imsureitsfine","絶対うまくいくよね","doublerainbow"));
|
||||
stamp_map.put("kasumi_vroom",Arrays.asList("vroom","broom","vrum","startthecar","gofast","ばびゅーん"));
|
||||
stamp_map.put("arisa_somethinglikethis",Arrays.asList("likethis","somethinglikethis","こんな感じか"));
|
||||
stamp_map.put("tae_singwithme",Arrays.asList("withme","playwithme","singwithme","一緒に歌おうよ","issyoniutaouyo"));
|
||||
stamp_map.put("tae_hamburger",Arrays.asList("hamburger","getfood","wantfood","hungry","ハンバーグ"));
|
||||
stamp_map.put("kasumi_ithasbegun",Arrays.asList("hasstarted","hasbegun","hajimatta","始まったね"));
|
||||
stamp_map.put("ran_itonlygetsbetter",Arrays.asList("getsbetter","fromhereon","まだまだこれから","mada","korekara","getsevenbetter"));
|
||||
stamp_map.put("himari_onthescene",Arrays.asList("reportingforduty","onthescene","hasappeared","ishere","参上"));
|
||||
stamp_map.put("moca_letsgetstarted",Arrays.asList("started","letsgo","letsbegin","itbegins","letsgo","はじまり"));
|
||||
stamp_map.put("ran_showtime",Arrays.asList("showtime","ショータイム","windwalker","ww"));
|
||||
stamp_map.put("tomoe_ofcourse",Arrays.asList("ofcourse","mochiron","もちろん","ofc"));
|
||||
stamp_map.put("moca_followme",Arrays.asList("followme","ついていくよ","comewithme"));
|
||||
stamp_map.put("tsugumi_letsdothis",Arrays.asList("lesgo","letsdothis","dothis","そうしよう"));
|
||||
stamp_map.put("kokoro_letshavefun",Arrays.asList("letshavefun","havefun","楽しみましょう"));
|
||||
stamp_map.put("kaoru_imherewithyou",Arrays.asList("imhere","herewithyou","imwithyou","私がついているよ"));
|
||||
stamp_map.put("hagumi_roar",Arrays.asList("roar","gao","ガオ","がお"));
|
||||
stamp_map.put("kokoro_justlikethat",Arrays.asList("その調子よ","justlikethat","exactlylikethat"));
|
||||
stamp_map.put("hagumi_sorry",Arrays.asList("sumimasen","すみません"));
|
||||
stamp_map.put("kanon_amazing",Arrays.asList("すごいね","cool","thatssick","sugoine","kanonsugoi"));
|
||||
stamp_map.put("hagumi_letsdothiswithoursmiliestsmiles",Arrays.asList("gowithasmile","花マル笑顔で行こう","withasmile"));
|
||||
stamp_map.put("kokoro_whatanicesong",Arrays.asList("いい曲ね","nicesong","greatsong","songisadorable"));
|
||||
stamp_map.put("maya_whoa",Arrays.asList("whoa","woa","awawa","あわわ","woah"));
|
||||
stamp_map.put("hina_interesting",Arrays.asList("interesting","面白い","おもしろい","omoshiroi"));
|
||||
stamp_map.put("aya_somuchpressure",Arrays.asList("pressure","feelpressure",">.<","圧を感じる"));
|
||||
stamp_map.put("hina_ivebeenwaiting",Arrays.asList("待ってました","beenwaiting","welcome","welcomeback","wb","matteta"));
|
||||
stamp_map.put("chisato_greaterthangreat",Arrays.asList("greater","saikouijyou","betterthan"));
|
||||
stamp_map.put("aya_itsamiracle",Arrays.asList("miracle","miracles","kiseki","奇跡は起こるよ"));
|
||||
stamp_map.put("maya_thanksforwaiting",Arrays.asList("お待たせしました","forwaiting","waiting","imback"));
|
||||
stamp_map.put("ako_somethingcool",Arrays.asList("watchthis","thisiscool","showyou","kakkoii","カッコいいの見せるよ"));
|
||||
stamp_map.put("yukina_mindifipetyou",Arrays.asList("pet","neko","cat","uwu","撫でてもいいかしら","nade","mindifi"));
|
||||
stamp_map.put("rinko_wasthatgood",Arrays.asList("wasitgood","wasthatgood","howwasthat","いけたかな","thatok?"));
|
||||
stamp_map.put("yukina_nexttime",Arrays.asList("次こそは","nexttime","alwaysanext","dontworry"));
|
||||
stamp_map.put("arisa_waitasec",Arrays.asList("chottomatte","chotto","matte","chomatte","chomate","brb","wait","1sec","sec","ちょっと待ってね"));
|
||||
stamp_map.put("ako_perfect",Arrays.asList("perfection","kanpeki","perfect","カンペキ","完璧"));
|
||||
|
||||
|
||||
/*for (String s : image_map.keySet()) {
|
||||
ImageScheme scheme = image_map.get(s);
|
||||
@ -232,26 +217,6 @@ public class BandoriModule extends Module{
|
||||
}
|
||||
}
|
||||
|
||||
public static void loadModule() {
|
||||
sigIRC.modules.add(new BandoriModule(
|
||||
new Rectangle(sigIRC.bandorimodule_X,sigIRC.bandorimodule_Y,sigIRC.bandorimodule_width,sigIRC.bandorimodule_height),
|
||||
"Bandori"
|
||||
));
|
||||
sigIRC.bandorimodule_enabled=true;
|
||||
sigIRC.config.setBoolean("Module_bandori_Enabled", sigIRC.bandorimodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
public static void unloadModule() {
|
||||
for (int i=0;i<sigIRC.modules.size();i++) {
|
||||
if (sigIRC.modules.get(i) instanceof BandoriModule) {
|
||||
sigIRC.modules.remove(sigIRC.modules.get(i));
|
||||
}
|
||||
}
|
||||
sigIRC.bandorimodule_enabled=false;
|
||||
sigIRC.config.setBoolean("Module_bandori_Enabled", sigIRC.bandorimodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
|
||||
public BufferedImage crop(BufferedImage img, int x, int y, int targetWidth, int targetHeight) throws IOException {
|
||||
int height = img.getHeight();
|
||||
int width = img.getWidth();
|
||||
@ -290,18 +255,8 @@ public class BandoriModule extends Module{
|
||||
for (String message_search : stamp_map.get(key)) {
|
||||
String filteredmessage = message;
|
||||
filteredmessage = filteredmessage.replaceAll("[^A-Za-z0-9]","");
|
||||
|
||||
if (filteredmessage.contains("gettinginteresting") &&
|
||||
message_search.equalsIgnoreCase("interesting")) {
|
||||
break;
|
||||
}
|
||||
if (filteredmessage.contains("notready") &&
|
||||
message_search.equalsIgnoreCase("ready")) {
|
||||
break;
|
||||
}
|
||||
//System.out.println(filteredmessage);
|
||||
if (message_search.contains("?") || message_search.contains("!")
|
||||
|| message_search.contains(".") || message_search.contains(":")) {
|
||||
if (message_search.contains("?") || message_search.contains("!")) {
|
||||
if (message.contains(message_search)) {
|
||||
foundmatch = true;
|
||||
CreateStamp(key);
|
||||
@ -345,32 +300,25 @@ public class BandoriModule extends Module{
|
||||
|
||||
public void draw(Graphics g) {
|
||||
super.draw(g);
|
||||
if (sigIRC.panel!=null) {
|
||||
for (Stamp s : active_stamps) {
|
||||
//Stamp is 130x107 pixels
|
||||
if (s.scheme instanceof SingleImageScheme) {
|
||||
g.drawImage(s.scheme.base,(int)(s.randX+position.getX()),(int)position.getY()+24, (int)(s.randX+130+position.getX()), (int)position.getY()+24+107,0,0,
|
||||
s.scheme.base.getWidth(),s.scheme.base.getHeight(),sigIRC.panel);
|
||||
} else {
|
||||
g.drawImage(s.scheme.base, (int)(s.randX+position.getX()), (int)position.getY()+24, (int)(s.randX+130+position.getX()), (int)position.getY()+24+107,
|
||||
s.scheme.stamp_index%6*270+4, s.scheme.stamp_index/6*223+3, s.scheme.stamp_index%6*270+260+4, s.scheme.stamp_index/6*223+214+3, sigIRC.panel);
|
||||
}
|
||||
}
|
||||
Point2D basepos = new Point2D(this.getPosition().getX(),this.getPosition().getHeight()+this.getPosition().getY()+24);
|
||||
double successChance = 1;
|
||||
DecimalFormat df = new DecimalFormat("0");
|
||||
DecimalFormat df2 = new DecimalFormat("0.0");
|
||||
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, basepos.getX(), basepos.getY()-24, 2, Color.WHITE, Color.BLACK, songtitle);
|
||||
for (int i=0;i<parts.size();i++) {
|
||||
SongPart s = parts.get(i);
|
||||
if (s.getTotal()!=0) {
|
||||
double successRate = (double)s.getSuccesses()/s.getTotal();
|
||||
successChance *= successRate;
|
||||
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, basepos.getX(), basepos.getY()+i*24, 2, Color.WHITE, Color.BLACK, s.getTitle()+" - "+s.getSuccesses()+"/"+s.getTotal()+" ("+df.format(successRate*100)+"%)");
|
||||
}
|
||||
}
|
||||
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, basepos.getX(), basepos.getY()+parts.size()*24+8, 2, Color.WHITE, Color.BLACK, "Expected Attempts: "+(df.format(1d/successChance))+" Success Chance: "+df2.format((successChance)*100)+"%");
|
||||
for (Stamp s : active_stamps) {
|
||||
//Stamp is 130x107 pixels
|
||||
g.drawImage(s.scheme.base, (int)(s.randX+position.getX()), (int)position.getY()+24, (int)(s.randX+130+position.getX()), (int)position.getY()+24+107,
|
||||
s.scheme.stamp_index%6*270+4, s.scheme.stamp_index/6*223+3, s.scheme.stamp_index%6*270+260+4, s.scheme.stamp_index/6*223+214+3, sigIRC.panel);
|
||||
}
|
||||
Point2D basepos = new Point2D(this.getPosition().getX(),this.getPosition().getHeight()+this.getPosition().getY()+24);
|
||||
double successChance = 1;
|
||||
DecimalFormat df = new DecimalFormat("0");
|
||||
DecimalFormat df2 = new DecimalFormat("0.0");
|
||||
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, basepos.getX(), basepos.getY()-24, 2, Color.WHITE, Color.BLACK, songtitle);
|
||||
for (int i=0;i<parts.size();i++) {
|
||||
SongPart s = parts.get(i);
|
||||
if (s.getTotal()!=0) {
|
||||
double successRate = (double)s.getSuccesses()/s.getTotal();
|
||||
successChance *= successRate;
|
||||
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, basepos.getX(), basepos.getY()+i*24, 2, Color.WHITE, Color.BLACK, s.getTitle()+" - "+s.getSuccesses()+"/"+s.getTotal()+" ("+df.format(successRate*100)+"%)");
|
||||
}
|
||||
}
|
||||
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, basepos.getX(), basepos.getY()+parts.size()*24+8, 2, Color.WHITE, Color.BLACK, "Expected Attempts: "+(df.format(1d/successChance))+" Success Chance: "+df2.format((successChance)*100)+"%");
|
||||
}
|
||||
|
||||
public void keypressed(KeyEvent ev) {
|
||||
@ -472,11 +420,3 @@ class ImageScheme{
|
||||
this.stamp_index=index;
|
||||
}
|
||||
}
|
||||
|
||||
class SingleImageScheme extends ImageScheme{
|
||||
|
||||
SingleImageScheme(BufferedImage base) {
|
||||
super(base, 0);
|
||||
}
|
||||
|
||||
}
|
@ -2,7 +2,6 @@ package sig.modules;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.event.MouseWheelEvent;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
@ -52,26 +51,6 @@ public class ChatLogModule extends Module{
|
||||
}
|
||||
}
|
||||
|
||||
public static void loadModule() {
|
||||
sigIRC.modules.add(new ChatLogModule(
|
||||
new Rectangle(sigIRC.chatlogmodule_X,sigIRC.chatlogmodule_Y,sigIRC.chatlogmodule_width,sigIRC.chatlogmodule_height),
|
||||
"Chat Log"
|
||||
));
|
||||
sigIRC.chatlogmodule_enabled=true;
|
||||
sigIRC.config.setBoolean("Module_chatlog_Enabled", sigIRC.chatlogmodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
public static void unloadModule() {
|
||||
for (int i=0;i<sigIRC.modules.size();i++) {
|
||||
if (sigIRC.modules.get(i) instanceof ChatLogModule) {
|
||||
sigIRC.modules.remove(sigIRC.modules.get(i));
|
||||
}
|
||||
}
|
||||
sigIRC.chatlogmodule_enabled=false;
|
||||
sigIRC.config.setBoolean("Module_chatlog_Enabled", sigIRC.chatlogmodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
|
||||
public void run() {
|
||||
super.run();
|
||||
if (delay>0 && sigIRC.subEmotesCompleted) {
|
||||
|
@ -103,31 +103,8 @@ public class ControllerModule extends Module{
|
||||
}
|
||||
//buttons.add(new Button(0.1,0.05,0.1,0.05,controllers.get(0),Identifier.Button._3,Color.RED,this));
|
||||
LoadButtonAndAxisData();
|
||||
|
||||
if (sigIRC.showWindowControls) {
|
||||
click_buttons.add(new AddClickableButton(new Rectangle(
|
||||
0,(int)position.getHeight()-21,96,20),"Add Button",this));
|
||||
}
|
||||
}
|
||||
|
||||
public static void loadModule() {
|
||||
sigIRC.modules.add(new ControllerModule(
|
||||
new Rectangle(sigIRC.controllermodule_X,sigIRC.controllermodule_Y,sigIRC.controllermodule_width,sigIRC.controllermodule_height),
|
||||
"Controller"
|
||||
));
|
||||
sigIRC.controllermodule_enabled=true;
|
||||
sigIRC.config.setBoolean("Module_controller_Enabled", sigIRC.controllermodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
public static void unloadModule() {
|
||||
for (int i=0;i<sigIRC.modules.size();i++) {
|
||||
if (sigIRC.modules.get(i) instanceof ControllerModule) {
|
||||
sigIRC.modules.remove(sigIRC.modules.get(i));
|
||||
}
|
||||
}
|
||||
sigIRC.controllermodule_enabled=false;
|
||||
sigIRC.config.setBoolean("Module_controller_Enabled", sigIRC.controllermodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
click_buttons.add(new AddClickableButton(new Rectangle(
|
||||
0,(int)position.getHeight()-21,96,20),"Add Button",this));
|
||||
}
|
||||
|
||||
public List<Controller> getControllers() {
|
||||
@ -405,108 +382,106 @@ public class ControllerModule extends Module{
|
||||
|
||||
public void run() {
|
||||
Point mouse_position = new Point((int)(sigIRC.panel.lastMouseX-getPosition().getX()),(int)(sigIRC.panel.lastMouseY-getPosition().getY()));
|
||||
if (sigIRC.showWindowControls) {
|
||||
if (resizing) {
|
||||
PerformResize(mouse_position);
|
||||
setConstraints();
|
||||
if (resizing) {
|
||||
PerformResize(mouse_position);
|
||||
setConstraints();
|
||||
}
|
||||
if (dragging) {
|
||||
selectedElement.setBounds(new Rectangle2D.Double((mouse_position.getX()+xoffset)/controller_img.getWidth(sigIRC.panel),
|
||||
(mouse_position.getY()+yoffset)/controller_img.getHeight(sigIRC.panel),
|
||||
selectedElement.getBounds().getWidth(),
|
||||
selectedElement.getBounds().getHeight()));
|
||||
setConstraints();
|
||||
}
|
||||
if (!inDragZone && selectedElement==null) {
|
||||
if (findMouseoverElement(mouse_position)!=null) {
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.HAND_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.HAND_CURSOR));
|
||||
}
|
||||
} else {
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.DEFAULT_CURSOR &&
|
||||
!inDragZone) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
|
||||
}
|
||||
}
|
||||
if (dragging) {
|
||||
selectedElement.setBounds(new Rectangle2D.Double((mouse_position.getX()+xoffset)/controller_img.getWidth(sigIRC.panel),
|
||||
(mouse_position.getY()+yoffset)/controller_img.getHeight(sigIRC.panel),
|
||||
selectedElement.getBounds().getWidth(),
|
||||
selectedElement.getBounds().getHeight()));
|
||||
setConstraints();
|
||||
}
|
||||
if (selectedElement!=null && extendBoundaries(selectedElement.getPixelBounds(controller_img),3).contains(mouse_position)) {
|
||||
if (!resizing) {
|
||||
resizing_direction=0;
|
||||
if (mouse_position.getY()-selectedElement.getPixelBounds(controller_img).getY()<=RESIZE_BORDER &&
|
||||
mouse_position.getY()-selectedElement.getPixelBounds(controller_img).getY()>=-RESIZE_BORDER) {
|
||||
resizing_direction+=1;
|
||||
} else
|
||||
if (mouse_position.getY()-(selectedElement.getPixelBounds(controller_img).getY()+selectedElement.getPixelBounds(controller_img).getHeight())<=RESIZE_BORDER &&
|
||||
mouse_position.getY()-(selectedElement.getPixelBounds(controller_img).getY()+selectedElement.getPixelBounds(controller_img).getHeight())>=-RESIZE_BORDER) {
|
||||
resizing_direction+=4;
|
||||
}
|
||||
if (mouse_position.getX()-selectedElement.getPixelBounds(controller_img).getX()<=RESIZE_BORDER &&
|
||||
mouse_position.getX()-selectedElement.getPixelBounds(controller_img).getX()>=-RESIZE_BORDER) {
|
||||
resizing_direction+=8;
|
||||
} else
|
||||
if (mouse_position.getX()-(selectedElement.getPixelBounds(controller_img).getX()+selectedElement.getPixelBounds(controller_img).getWidth())<=RESIZE_BORDER &&
|
||||
mouse_position.getX()-(selectedElement.getPixelBounds(controller_img).getX()+selectedElement.getPixelBounds(controller_img).getWidth())>=-RESIZE_BORDER) {
|
||||
resizing_direction+=2;
|
||||
}
|
||||
}
|
||||
if (!inDragZone && selectedElement==null) {
|
||||
if (findMouseoverElement(mouse_position)!=null) {
|
||||
switch (resizing_direction) {
|
||||
case 1:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.HAND_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.HAND_CURSOR));
|
||||
if (cursortype!=Cursor.N_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.N_RESIZE_CURSOR));
|
||||
}
|
||||
} else {
|
||||
}break;
|
||||
case 2:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.DEFAULT_CURSOR &&
|
||||
if (cursortype!=Cursor.E_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.E_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
case 3:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.NE_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.NE_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
case 6:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.SE_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.SE_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
case 4:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.S_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.S_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
case 12:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.SW_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.SW_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
case 8:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.W_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.W_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
case 9:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.NW_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.NW_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
default:
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.DEFAULT_CURSOR &&
|
||||
!inDragZone) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (selectedElement!=null && extendBoundaries(selectedElement.getPixelBounds(controller_img),3).contains(mouse_position)) {
|
||||
if (!resizing) {
|
||||
resizing_direction=0;
|
||||
if (mouse_position.getY()-selectedElement.getPixelBounds(controller_img).getY()<=RESIZE_BORDER &&
|
||||
mouse_position.getY()-selectedElement.getPixelBounds(controller_img).getY()>=-RESIZE_BORDER) {
|
||||
resizing_direction+=1;
|
||||
} else
|
||||
if (mouse_position.getY()-(selectedElement.getPixelBounds(controller_img).getY()+selectedElement.getPixelBounds(controller_img).getHeight())<=RESIZE_BORDER &&
|
||||
mouse_position.getY()-(selectedElement.getPixelBounds(controller_img).getY()+selectedElement.getPixelBounds(controller_img).getHeight())>=-RESIZE_BORDER) {
|
||||
resizing_direction+=4;
|
||||
}
|
||||
if (mouse_position.getX()-selectedElement.getPixelBounds(controller_img).getX()<=RESIZE_BORDER &&
|
||||
mouse_position.getX()-selectedElement.getPixelBounds(controller_img).getX()>=-RESIZE_BORDER) {
|
||||
resizing_direction+=8;
|
||||
} else
|
||||
if (mouse_position.getX()-(selectedElement.getPixelBounds(controller_img).getX()+selectedElement.getPixelBounds(controller_img).getWidth())<=RESIZE_BORDER &&
|
||||
mouse_position.getX()-(selectedElement.getPixelBounds(controller_img).getX()+selectedElement.getPixelBounds(controller_img).getWidth())>=-RESIZE_BORDER) {
|
||||
resizing_direction+=2;
|
||||
}
|
||||
}
|
||||
switch (resizing_direction) {
|
||||
case 1:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.N_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.N_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
case 2:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.E_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.E_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
case 3:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.NE_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.NE_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
case 6:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.SE_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.SE_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
case 4:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.S_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.S_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
case 12:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.SW_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.SW_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
case 8:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.W_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.W_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
case 9:{
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.NW_RESIZE_CURSOR) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.NW_RESIZE_CURSOR));
|
||||
}
|
||||
}break;
|
||||
default:
|
||||
int cursortype = sigIRC.panel.getCursor().getType();
|
||||
if (cursortype!=Cursor.DEFAULT_CURSOR &&
|
||||
!inDragZone) {
|
||||
sigIRC.panel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Controller c : controllers) {
|
||||
|
@ -4,7 +4,6 @@ import java.awt.Color;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Image;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.io.File;
|
||||
@ -83,26 +82,6 @@ public class DDRStepModule extends Module{
|
||||
}
|
||||
}
|
||||
|
||||
public static void loadModule() {
|
||||
sigIRC.modules.add(new DDRStepModule(
|
||||
new Rectangle(sigIRC.ddrstepmodule_X,sigIRC.ddrstepmodule_Y,sigIRC.ddrstepmodule_width,sigIRC.ddrstepmodule_height),
|
||||
"DDR Step"
|
||||
));
|
||||
sigIRC.ddrstepmodule_enabled=true;
|
||||
sigIRC.config.setBoolean("Module_ddrstep_Enabled", sigIRC.ddrstepmodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
public static void unloadModule() {
|
||||
for (int i=0;i<sigIRC.modules.size();i++) {
|
||||
if (sigIRC.modules.get(i) instanceof DDRStepModule) {
|
||||
sigIRC.modules.remove(sigIRC.modules.get(i));
|
||||
}
|
||||
}
|
||||
sigIRC.ddrstepmodule_enabled=false;
|
||||
sigIRC.config.setBoolean("Module_ddrstep_Enabled", sigIRC.ddrstepmodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
|
||||
public void run() {
|
||||
super.run();
|
||||
|
||||
|
@ -1,10 +0,0 @@
|
||||
package sig.modules;
|
||||
|
||||
public class MapPoint {
|
||||
int timer;
|
||||
String player;
|
||||
public MapPoint(int timer, String player) {
|
||||
this.timer=timer;
|
||||
this.player=player;
|
||||
}
|
||||
}
|
@ -1,81 +0,0 @@
|
||||
package sig.modules.RabiRace;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
public enum ColorLocation {
|
||||
UNKNOWN(0,"Unknown",52,52,52),
|
||||
STARTING_FOREST(1,"Starting Forest",110,181,103),
|
||||
SPECTRAL_CAVE(2,"Spectral Cave",97,103,162),
|
||||
FORGOTTEN_CAVE(3,"Forgotten Cave",135,110,75),
|
||||
NATURAL_AQUARIUM(4,"Natural Aquarium",128,169,115),
|
||||
DLC2BOSSARENA(5,"Boss Arena",255,255,255),
|
||||
FORGOTTENCAVEII(6,"Forgotten Cave II",146,108,109),
|
||||
UPPERFOREST(7,"Upper Forest",0,128,84),
|
||||
BLANK(8,"???",52,52,52),
|
||||
RABIRABIBEACH(9,"Rabi Rabi Beach",98,135,193),
|
||||
GOLDENPYRAMID(10,"Golden Pyramid",198,161,75),
|
||||
RABIRABIRAVINE(11,"Rabi Rabi Ravine",110,181,103),
|
||||
RABIRABITOWN(12,"Rabi Rabi Town",217,145,126),
|
||||
RABIRABIPARK(13,"Rabi Rabi Park",181,110,103),
|
||||
UPRPRCBASE(14,"UPRPRC Base",110,110,181),
|
||||
SKYISLANDTOWN(15,"Sky Island Town",142,105,150),
|
||||
AZURESNOWLAND(16,"Azure Snowland",142,105,235),
|
||||
SYSTEMINTERIORI(17,"System Interior I",104,156,207),
|
||||
EVERNIGHTPEAK(18,"Evernight Peak",75,97,210),
|
||||
EXOTICLAB(19,"Exotic Laboratory",175,103,134),
|
||||
GOLDENRIVERBANK(20,"Golden Riverbank",206,156,105),
|
||||
FLOATINGGRAVEYARD(21,"Floating Graveyard",180,59,54),
|
||||
SYSTEMINTERIORII(22,"System Interior II",212,77,86),
|
||||
AURORAPALACE(23,"Aurora Palace",34,169,209),
|
||||
FLOATINGLIBRARY(24,"Floating Library",118,198,166),
|
||||
NATURALAQUARIUM(25,"Natural Aquarium",128,169,115),
|
||||
SKYHIGHBRIDGE(26,"Sky-High Bridge",106,195,182),
|
||||
WARPDESTINATION(27,"Warp Destination",138,178,88),
|
||||
VOLCANICCAVERNS(28,"Volcanic Caverns",186,45,42),
|
||||
PLURKWOOD(29,"Plurkwood",195,98,45),
|
||||
HALLOFMEMORIES(30,"Hall of Memories",64,99,164),
|
||||
ICYSUMMIT(31,"Icy Summit",45,104,146),
|
||||
HALLOFMEMORIESII(32,"Hall of Memories II",220,143,64),
|
||||
HALLOWEENAREA(34,"Halloween Area",121,55,53),
|
||||
HOSPITAL(50,"Hospital",97,97,136),
|
||||
RABIRABIRAVINEII(55,"Rabi Rabi Ravine II",42,184,120),
|
||||
NOAH3BOSSARENA(81,"Noah 3 Boss Arena",52,52,52),
|
||||
NOAH1BOSSARENA(83,"Noah 1 Boss Arena",52,52,52),
|
||||
RUMIBOSSARENA(87,"Rumi Boss Arena",203,125,122),
|
||||
HALLOFMEMORIES21(95,"Hall of Memories II",255,255,0),
|
||||
HALLOFMEMORIES22(96,"Hall of Memories II",255,255,0),
|
||||
HALLOFMEMORIES23(97,"Hall of Memories II",255,255,0),
|
||||
HALLOFMEMORIES24(98,"Hall of Memories II",255,255,0),
|
||||
|
||||
;
|
||||
|
||||
int color;
|
||||
String name;
|
||||
Color colorval;
|
||||
|
||||
ColorLocation(int val, String name, int r, int g, int b) {
|
||||
|
||||
color = val;
|
||||
this.name=name;
|
||||
this.colorval = new Color(r,g,b);
|
||||
|
||||
}
|
||||
|
||||
public static Color getColor(int id) {
|
||||
for (ColorLocation cl : ColorLocation.values()) {
|
||||
if (cl.color == id) {
|
||||
return cl.colorval;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String getLocationName(int id) {
|
||||
for (ColorLocation cl : ColorLocation.values()) {
|
||||
if (cl.color == id) {
|
||||
return cl.name;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
@ -21,10 +21,9 @@ public class JoinButton extends ClickableButton{
|
||||
if (RabiRaceModule.mySession==null) {
|
||||
RabiRaceModule.module.window.setVisible(true);
|
||||
} else {
|
||||
//RabiRaceModule.module.LeaveSession();
|
||||
File file = new File(sigIRC.BASEDIR+"sigIRC/tmp.data");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=leavesession&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+RabiRaceModule.module.myProfile.username+"&session="+RabiRaceModule.mySession.id),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=leavesession&name="+RabiRaceModule.module.myProfile.username+"&session="+RabiRaceModule.mySession.id),file);
|
||||
RabiRaceModule.mySession=null;
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -1,26 +0,0 @@
|
||||
package sig.modules.RabiRace;
|
||||
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
|
||||
import sig.Module;
|
||||
import sig.sigIRC;
|
||||
import sig.modules.RabiRaceModule;
|
||||
|
||||
public class MarkMapButton extends ClickableButton{
|
||||
|
||||
public MarkMapButton(Rectangle position, String button_label, RabiRaceModule module) {
|
||||
super(position,button_label,module);
|
||||
}
|
||||
|
||||
public void onClickEvent(MouseEvent ev) {
|
||||
if (RabiRaceModule.module.mySession!=null) {
|
||||
//System.out.println("Mark Map.");
|
||||
RabiRaceModule.module.MarkCurrentPosition();
|
||||
}
|
||||
}
|
||||
}
|
@ -5,7 +5,6 @@ import java.awt.Graphics;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.Image;
|
||||
import java.awt.Point;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -24,28 +23,24 @@ import java.util.Random;
|
||||
import sig.ScrollingText;
|
||||
import sig.sigIRC;
|
||||
import sig.modules.RabiRaceModule;
|
||||
import sig.modules.RabiRibi.MemoryOffset;
|
||||
import sig.utils.DrawUtils;
|
||||
import sig.utils.FileUtils;
|
||||
import sig.utils.TextUtils;
|
||||
|
||||
public class Profile {
|
||||
public static final int EVENT_COUNT = 265;
|
||||
public String username = sigIRC.nickname.toLowerCase();
|
||||
public String displayName = sigIRC.nickname;
|
||||
public Avatar avatar;
|
||||
public int playtime = 0;
|
||||
public String healthUps = "0000000000000000000000000000000000000000000000000000000000000000";
|
||||
public String attackUps = "0000000000000000000000000000000000000000000000000000000000000000";
|
||||
public String manaUps = "0000000000000000000000000000000000000000000000000000000000000000";
|
||||
public String regenUps = "0000000000000000000000000000000000000000000000000000000000000000";
|
||||
public String packUps = "0000000000000000000000000000000000000000000000000000000000000000";
|
||||
public String eventStruct = "0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_0_";
|
||||
public int rainbowEggs = 0;
|
||||
public int healthUps = 0;
|
||||
public int attackUps = 0;
|
||||
public int manaUps = 0;
|
||||
public int regenUps = 0;
|
||||
public int packUps = 0;
|
||||
public int rainbowEggCount = 0;
|
||||
public boolean isPaused = false;
|
||||
public int difficulty = 0;
|
||||
public int loop = 0;
|
||||
public int map = 0; //Map color.
|
||||
public float itempct = 0;
|
||||
public float mappct = 0;
|
||||
public LinkedHashMap<MemoryData,Integer> key_items = new LinkedHashMap<MemoryData,Integer>();
|
||||
@ -61,8 +56,6 @@ public class Profile {
|
||||
public Image imageDisplayUpdateImage;
|
||||
public boolean stat_update_required = true;
|
||||
public boolean image_display_update_required = true;
|
||||
public int timeKey = -1;
|
||||
public boolean syncing = false;
|
||||
|
||||
public Profile(RabiRaceModule module) {
|
||||
this(module,true);
|
||||
@ -86,7 +79,7 @@ public class Profile {
|
||||
oldProfile.manaUps = manaUps;
|
||||
oldProfile.regenUps = regenUps;
|
||||
oldProfile.packUps = packUps;
|
||||
oldProfile.rainbowEggs = rainbowEggs;
|
||||
oldProfile.rainbowEggCount = rainbowEggCount;
|
||||
oldProfile.key_items = (LinkedHashMap<MemoryData, Integer>)key_items.clone();
|
||||
oldProfile.badges = (LinkedHashMap<MemoryData, Integer>)badges.clone();
|
||||
oldProfile.playtime = playtime;
|
||||
@ -109,7 +102,7 @@ public class Profile {
|
||||
if (oldProfile.packUps!=packUps) {
|
||||
count++;
|
||||
}
|
||||
if (oldProfile.rainbowEggs!=rainbowEggs) {
|
||||
if (oldProfile.rainbowEggCount!=rainbowEggCount) {
|
||||
count++;
|
||||
}
|
||||
for (MemoryData md : key_items.keySet()) {
|
||||
@ -135,76 +128,6 @@ public class Profile {
|
||||
return count;
|
||||
}
|
||||
|
||||
public static int GetHealthUpCount(Profile p) {
|
||||
int numb = 0;
|
||||
for (int i=0;i<p.healthUps.length();i++) {
|
||||
if (p.healthUps.charAt(i)=='1') {
|
||||
numb++;
|
||||
}
|
||||
}
|
||||
return numb;
|
||||
}
|
||||
|
||||
public static int GetManaUpCount(Profile p) {
|
||||
int numb = 0;
|
||||
for (int i=0;i<p.manaUps.length();i++) {
|
||||
if (p.manaUps.charAt(i)=='1') {
|
||||
numb++;
|
||||
}
|
||||
}
|
||||
return numb;
|
||||
}
|
||||
|
||||
public static int GetRegenUpCount(Profile p) {
|
||||
int numb = 0;
|
||||
for (int i=0;i<p.regenUps.length();i++) {
|
||||
if (p.regenUps.charAt(i)=='1') {
|
||||
numb++;
|
||||
}
|
||||
}
|
||||
return numb;
|
||||
}
|
||||
|
||||
public static int GetPackUpCount(Profile p) {
|
||||
int numb = 0;
|
||||
for (int i=0;i<p.packUps.length();i++) {
|
||||
if (p.packUps.charAt(i)=='1') {
|
||||
numb++;
|
||||
}
|
||||
}
|
||||
return numb;
|
||||
}
|
||||
|
||||
public static int GetAttackUpCount(Profile p) {
|
||||
int numb = 0;
|
||||
for (int i=0;i<p.attackUps.length();i++) {
|
||||
if (p.attackUps.charAt(i)=='1') {
|
||||
numb++;
|
||||
}
|
||||
}
|
||||
return numb;
|
||||
}
|
||||
|
||||
public static int GetRainbowEggCount(Profile p) {
|
||||
return p.rainbowEggs;
|
||||
}
|
||||
|
||||
public void MarkCurrentPosition() {
|
||||
int id = RabiRaceModule.module.readIntFromMemory(MemoryOffset.MAP_TILE_Y)+18*RabiRaceModule.module.readIntFromMemory(MemoryOffset.MAP_TILE_X)+RabiRaceModule.module.readIntFromMemory(MemoryOffset.MAP_AREA_NUMBER)*450;
|
||||
if (RabiRaceModule.module.readIntFromMemory(MemoryOffset.MAP_REGION_START.getOffset()+id*4)>1 &&
|
||||
RabiRaceModule.module.readIntFromMemory(MemoryOffset.MAP_REGION_START.getOffset()+id*4)!=3 &&
|
||||
RabiRaceModule.module.readIntFromMemory(MemoryOffset.MAP_REGION_START.getOffset()+id*4)!=7
|
||||
&& !RabiRaceModule.module.mapdata.containsKey(id)) {
|
||||
RabiRaceModule.module.AddMapPoint(RabiRaceModule.module.readIntFromMemory(MemoryOffset.MAP_AREA_NUMBER),
|
||||
RabiRaceModule.module.readIntFromMemory(MemoryOffset.MAP_TILE_X),
|
||||
RabiRaceModule.module.readIntFromMemory(MemoryOffset.MAP_TILE_Y),
|
||||
16,false);
|
||||
}
|
||||
/*for (int i=0;i<17;i++) {
|
||||
AddMapPoint(0,i,0,i);
|
||||
}*/
|
||||
}
|
||||
|
||||
public void compareAndAnnounceAllChangedValues() {
|
||||
//System.out.println(oldProfile.key_items.get(MemoryData.HAMMER)+","+key_items.get(MemoryData.HAMMER));
|
||||
int changedValueCount = compareAllChangedValues();
|
||||
@ -212,52 +135,45 @@ public class Profile {
|
||||
return;
|
||||
}
|
||||
String announcement = "";
|
||||
if (GetHealthUpCount(oldProfile)==GetHealthUpCount(this)-1) {
|
||||
announcement = "has obtained a Health Up! ("+GetHealthUpCount(this)+" total)";
|
||||
MarkCurrentPosition();
|
||||
if (oldProfile.healthUps==healthUps-1) {
|
||||
announcement = "has obtained a Health Up! ("+healthUps+" total)";
|
||||
}
|
||||
if (GetAttackUpCount(oldProfile)==GetAttackUpCount(this)-1) {
|
||||
announcement = "has obtained an Attack Up! ("+GetAttackUpCount(this)+" total)";
|
||||
MarkCurrentPosition();
|
||||
if (oldProfile.attackUps==attackUps-1) {
|
||||
announcement = "has obtained an Attack Up! ("+attackUps+" total)";
|
||||
}
|
||||
if (GetManaUpCount(oldProfile)==GetManaUpCount(this)-1) {
|
||||
announcement = "has obtained a Mana Up! ("+GetManaUpCount(this)+" total)";
|
||||
MarkCurrentPosition();
|
||||
if (oldProfile.manaUps==manaUps-1) {
|
||||
announcement = "has obtained a Mana Up! ("+manaUps+" total)";
|
||||
}
|
||||
if (GetRegenUpCount(oldProfile)==GetRegenUpCount(this)-1) {
|
||||
announcement = "has obtained a Regen Up! ("+GetRegenUpCount(this)+" total)";
|
||||
MarkCurrentPosition();
|
||||
if (oldProfile.regenUps==regenUps-1) {
|
||||
announcement = "has obtained a Regen Up! ("+regenUps+" total)";
|
||||
}
|
||||
if (GetPackUpCount(oldProfile)==GetPackUpCount(this)-1) {
|
||||
announcement = "has obtained a Pack Up! ("+GetPackUpCount(this)+" total)";
|
||||
MarkCurrentPosition();
|
||||
if (oldProfile.packUps==packUps-1) {
|
||||
announcement = "has obtained a Pack Up! ("+packUps+" total)";
|
||||
}
|
||||
if (GetRainbowEggCount(oldProfile)==GetRainbowEggCount(this)-1) {
|
||||
if (oldProfile.rainbowEggCount==rainbowEggCount-1) {
|
||||
if (RabiRaceModule.mySession!=null &&
|
||||
RabiRaceModule.mySession.gamemode==0 &&
|
||||
RabiRaceModule.mySession.rainbowEggGoal>0) {
|
||||
if (RabiRaceModule.mySession.rainbowEggGoal-GetRainbowEggCount(this)==0) {
|
||||
announcement = "has obtained "+RabiRaceModule.mySession.rainbowEggGoal+" Rainbow Eggs! (NAME) has completed the race!";
|
||||
} else if (RabiRaceModule.mySession.rainbowEggGoal-GetRainbowEggCount(this)>0)
|
||||
RabiRaceModule.mySession.eggCount>0) {
|
||||
if (RabiRaceModule.mySession.eggCount-rainbowEggCount==0) {
|
||||
announcement = "has obtained "+RabiRaceModule.mySession.eggCount+" Rainbow Eggs! (NAME) has completed the race!";
|
||||
} else if (RabiRaceModule.mySession.eggCount-rainbowEggCount>0)
|
||||
{
|
||||
announcement = "has obtained a Rainbow Egg! ("+Math.max(RabiRaceModule.mySession.rainbowEggGoal-GetRainbowEggCount(this), 0)+" to go!)";
|
||||
announcement = "has obtained a Rainbow Egg! ("+Math.max(RabiRaceModule.mySession.eggCount-rainbowEggCount, 0)+" to go!)";
|
||||
}
|
||||
} else {
|
||||
announcement = "has obtained a Rainbow Egg! ("+rainbowEggs+" total)";
|
||||
announcement = "has obtained a Rainbow Egg! ("+rainbowEggCount+" total)";
|
||||
}
|
||||
}
|
||||
for (MemoryData md : key_items.keySet()) {
|
||||
if (!oldProfile.key_items.containsKey(md) &&
|
||||
key_items.containsKey(md)) {
|
||||
announcement = "has obtained "+md.name+"!";
|
||||
MarkCurrentPosition();
|
||||
}
|
||||
}
|
||||
for (MemoryData md : badges.keySet()) {
|
||||
if (!oldProfile.badges.containsKey(md) &&
|
||||
badges.containsKey(md)) {
|
||||
announcement = "has obtained the "+md.name+" badge!";
|
||||
MarkCurrentPosition();
|
||||
}
|
||||
}
|
||||
if (announcement.length()>0 && changedValueCount!=0) {
|
||||
@ -271,7 +187,7 @@ public class Profile {
|
||||
|
||||
File file = new File(sigIRC.BASEDIR+"sigIRC/tmp.data");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=addupdate&session="+RabiRaceModule.mySession.id+"&message="+string),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=addupdate&session="+RabiRaceModule.mySession.id+"&message="+string),file);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
@ -298,104 +214,18 @@ public class Profile {
|
||||
badges.remove(md);
|
||||
}
|
||||
}
|
||||
String[] previousEventStruct = eventStruct.split("_");
|
||||
StringBuilder events = new StringBuilder();
|
||||
|
||||
|
||||
if (parent.readIntFromMemory(MemoryOffset.PLAYERHEALTH)<=0) {
|
||||
RabiRaceModule.syncEvents=false;
|
||||
RabiRaceModule.hasDied=true;
|
||||
}
|
||||
|
||||
if (!RabiRaceModule.syncEvents && RabiRaceModule.hasDied && parent.readIntFromMemory(MemoryOffset.PLAYERHEALTH)>0) {
|
||||
RabiRaceModule.syncEvents=true;
|
||||
RabiRaceModule.hasDied=false;
|
||||
}
|
||||
/*
|
||||
if (parent.readIntFromMemory(MemoryOffset.DARKNESS)>0 && RabiRaceModule.syncEvents) {
|
||||
RabiRaceModule.syncEvents=false;
|
||||
}
|
||||
if (!RabiRaceModule.syncEvents && !RabiRaceModule.darknessHasReachedzero &&
|
||||
parent.readIntFromMemory(MemoryOffset.DARKNESS)==0) {
|
||||
RabiRaceModule.darknessHasReachedzero=true;
|
||||
}
|
||||
if (!RabiRaceModule.syncEvents && RabiRaceModule.darknessHasReachedzero &&
|
||||
parent.readIntFromMemory(MemoryOffset.DARKNESS)>0) {
|
||||
RabiRaceModule.syncEvents=true;
|
||||
RabiRaceModule.darknessHasReachedzero=false;
|
||||
}*/
|
||||
|
||||
RabiRaceModule.syncEvents = !InBossBattleSong();
|
||||
|
||||
/*if (parent.readIntFromMemory(MemoryOffset.DARKNESS)>0 && RabiRaceModule.darknessHasReachedzero) {
|
||||
RabiRaceModule.syncEvents=!RabiRaceModule.syncEvents;
|
||||
RabiRaceModule.darknessHasReachedzero=false;
|
||||
}
|
||||
if (parent.readIntFromMemory(MemoryOffset.DARKNESS)==0) {
|
||||
RabiRaceModule.darknessHasReachedzero=true;
|
||||
}*/
|
||||
for (int i=0;i<EVENT_COUNT;i++) {
|
||||
if (NonRestrictedValue(i)) {
|
||||
int val = parent.readIntFromMemory(MemoryOffset.EVENT_START.getOffset()+i*4);
|
||||
events.append(val);
|
||||
events.append("_");
|
||||
} else {
|
||||
if (RabiRaceModule.syncEvents) {
|
||||
events.append(parent.readIntFromMemory(MemoryOffset.EVENT_START.getOffset()+i*4));
|
||||
events.append("_");
|
||||
} else {
|
||||
events.append(0);
|
||||
events.append("_");
|
||||
}
|
||||
}
|
||||
/*if (val>9 || val<0) {
|
||||
//System.out.println("WARNING! Event "+(256+i)+" has a value greater than 9 or negative number! Truncating to 1 value.");
|
||||
events.append(Integer.toString(val).charAt(0));
|
||||
} else {
|
||||
events.append(val);
|
||||
}*/
|
||||
}
|
||||
if (RabiRaceModule.syncEvents &&
|
||||
RabiRaceModule.lastEventString.equalsIgnoreCase(events.toString())) {
|
||||
eventStruct = events.toString();
|
||||
} else {
|
||||
RabiRaceModule.lastEventString = events.toString();
|
||||
}
|
||||
|
||||
syncing = RabiRaceModule.syncEvents;
|
||||
}
|
||||
|
||||
private boolean InBossBattleSong() {
|
||||
for (int i=0;i<RabiRaceModule.BOSSSONGS.length;i++) {
|
||||
if (parent.readIntFromMemory(MemoryOffset.MAP_AREA_COLOR)==RabiRaceModule.BOSSSONGS[i]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
private boolean NonRestrictedValue(int i) {
|
||||
for (int j=0;j<RabiRaceModule.RESTRICTED_EVENTS.length;j++) {
|
||||
if (i==RabiRaceModule.RESTRICTED_EVENTS[j]-256) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public void uploadProfile() {
|
||||
if (sigIRC.authenticated) {
|
||||
File file = new File(sigIRC.BASEDIR+"tmp2");
|
||||
File file = new File(sigIRC.BASEDIR+"tmp");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=playerdata&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+sigIRC.nickname.toLowerCase()+"&data="+getDataString()),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=playerdata&name="+sigIRC.nickname.toLowerCase()+"&data="+getDataString()),file);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Upload profile. "+"http://45.33.13.215:8080/rabirace/send.php?key=playerdata&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+sigIRC.nickname.toLowerCase()+"&data="+getDataString(), "debug.log");
|
||||
|
||||
//System.out.println(getDataString());
|
||||
//String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"tmp");
|
||||
//System.out.println(Arrays.toString(data));
|
||||
}
|
||||
}
|
||||
|
||||
@ -403,37 +233,31 @@ public class Profile {
|
||||
if (sigIRC.authenticated) {
|
||||
File file = new File(sigIRC.BASEDIR+"tmp_profile");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=retrievedata&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&retrievename="+username.toLowerCase()+"&name="+sigIRC.nickname.toLowerCase()),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=retrievedata&name="+username.toLowerCase()),file);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Download profile w/settings: "+"http://45.33.13.215:8080/rabirace/send.php?key=retrievedata&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&retrievename="+username.toLowerCase()+"&name="+sigIRC.nickname.toLowerCase(), "debug2.log");
|
||||
String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"tmp_profile");
|
||||
//System.out.println(Arrays.toString(data));
|
||||
if (data.length>=23) {
|
||||
if (data.length>=18) {
|
||||
int i=0;
|
||||
displayName = data[i++];
|
||||
try {
|
||||
avatar = Avatar.getAvatarFromID(Integer.parseInt(data[i++]));
|
||||
//System.out.println("Updated Avatar for Player "+displayName+" with Avatar "+avatar.displayName);
|
||||
timeKey = Integer.parseInt(data[i++]);
|
||||
playtime = Integer.parseInt(data[i++]);
|
||||
healthUps = data[i++];
|
||||
manaUps = data[i++];
|
||||
regenUps = data[i++];
|
||||
packUps = data[i++];
|
||||
attackUps = data[i++];
|
||||
rainbowEggs = Integer.parseInt(data[i++]);
|
||||
healthUps = Integer.parseInt(data[i++]);
|
||||
manaUps = Integer.parseInt(data[i++]);
|
||||
regenUps = Integer.parseInt(data[i++]);
|
||||
packUps = Integer.parseInt(data[i++]);
|
||||
attackUps = Integer.parseInt(data[i++]);
|
||||
rainbowEggCount = Integer.parseInt(data[i++]);
|
||||
isPaused = Boolean.parseBoolean(data[i++]);
|
||||
difficulty = Integer.parseInt(data[i++]);
|
||||
loop = Integer.parseInt(data[i++]);
|
||||
itempct = Float.parseFloat(data[i++]);
|
||||
mappct = Float.parseFloat(data[i++]);
|
||||
} catch (NumberFormatException e) {
|
||||
return false;
|
||||
}
|
||||
i+=2;
|
||||
String nextval = data[i++];
|
||||
if (!nextval.equalsIgnoreCase("BADGES:")) {
|
||||
@ -455,16 +279,7 @@ public class Profile {
|
||||
}
|
||||
while (!nextval.equalsIgnoreCase("UPDATES:"));
|
||||
}
|
||||
nextval = data[i++];
|
||||
|
||||
eventStruct = nextval;
|
||||
nextval = data[i++];
|
||||
map = Integer.parseInt(nextval);
|
||||
nextval = data[i++];
|
||||
//System.out.println(nextval);
|
||||
syncing = Boolean.parseBoolean(nextval);
|
||||
lastWebUpdate = System.currentTimeMillis();
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Sync completed syccessfully.", "debug.log");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -475,14 +290,13 @@ public class Profile {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
appendData(sigIRC.nickname,sb);
|
||||
appendData(avatar.value,sb);
|
||||
appendData(RabiRaceModule.CLIENT_SERVER_READTIME,sb);
|
||||
appendData(playtime,sb);
|
||||
appendData(healthUps,sb);
|
||||
appendData(manaUps,sb);
|
||||
appendData(regenUps,sb);
|
||||
appendData(packUps,sb);
|
||||
appendData(attackUps,sb);
|
||||
appendData(rainbowEggs,sb);
|
||||
appendData(rainbowEggCount,sb);
|
||||
appendData(isPaused,sb);
|
||||
appendData(difficulty,sb);
|
||||
appendData(loop,sb);
|
||||
@ -500,10 +314,6 @@ public class Profile {
|
||||
appendData(data.name()+";"+val,sb);
|
||||
}
|
||||
appendData("UPDATES:",sb);
|
||||
appendData(eventStruct,sb);
|
||||
appendData(map,sb);
|
||||
appendData(syncing,sb);
|
||||
appendData("END",sb);
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@ -515,7 +325,6 @@ public class Profile {
|
||||
}
|
||||
|
||||
public static Avatar GetSeededAvatar(String username) {
|
||||
//System.out.println(RabiRaceModule.mySession.getPlayers());
|
||||
Random r = new Random();
|
||||
r.setSeed(username.toLowerCase().hashCode());
|
||||
int randomnumb = r.nextInt(28);
|
||||
@ -532,24 +341,18 @@ public class Profile {
|
||||
//g2.fillRect(1, 1, 32, 32);
|
||||
g2.drawImage(avatar.getAvatarImage(), 1, 1, sigIRC.panel);
|
||||
g2.setColor(ScrollingText.GetUserNameColor(displayName));
|
||||
DrawUtils.drawOutlineText(g2, sigIRC.panel.rabiRibiMoneyDisplayFont, 54, 26, 0, 1, g2.getColor(), Color.BLACK, displayName);
|
||||
DrawUtils.drawCenteredOutlineText(g2, sigIRC.panel.rabiRibiTinyDisplayFont, (int)(tmp.getWidth()*0.2), 50, 0, 1, GetDifficultyColor(), Color.BLACK, GetDifficultyName());
|
||||
DrawUtils.drawOutlineText(g2, sigIRC.panel.rabiRibiMoneyDisplayFont, 54, 26, 1, g2.getColor(), Color.BLACK, displayName);
|
||||
DrawUtils.drawCenteredOutlineText(g2, sigIRC.panel.rabiRibiTinyDisplayFont, (int)(tmp.getWidth()*0.2), 50, 1, GetDifficultyColor(), Color.BLACK, GetDifficultyName());
|
||||
String text = TextUtils.convertSecondsToTimeFormat(playtime/60);
|
||||
if (!syncing) {
|
||||
g2.setColor(new Color(196,24,24));
|
||||
} else
|
||||
if (isPaused) {
|
||||
g2.setColor(new Color(128,96,0));
|
||||
} else {
|
||||
g2.setColor(Color.BLACK);
|
||||
}
|
||||
DrawUtils.drawOutlineText(g2, sigIRC.panel.rabiRibiMoneyDisplayFont, (int)(tmp.getWidth() - TextUtils.calculateStringBoundsFont(text, sigIRC.panel.rabiRibiMoneyDisplayFont).getWidth()) - 2, 16, 0, 1, g2.getColor(), Color.GRAY, text);
|
||||
DrawUtils.drawOutlineText(g2, sigIRC.panel.rabiRibiMoneyDisplayFont, (int)(tmp.getWidth() - TextUtils.calculateStringBoundsFont(text, sigIRC.panel.rabiRibiMoneyDisplayFont).getWidth()) - 2, 16, 1, g2.getColor(), Color.GRAY, text);
|
||||
text = "Map "+df.format(mappct)+"% Item "+df.format(itempct)+"%";
|
||||
//DrawUtils.drawOutlineText(g2, sigIRC.panel.rabiRibiMoneyDisplayFont, (int)(parent.position.getWidth() - TextUtils.calculateStringBoundsFont(text, sigIRC.panel.rabiRibiMoneyDisplayFont).getWidth()) - 2, 16, 1, g2.getColor(), Color.GRAY, text);
|
||||
DrawUtils.drawCenteredOutlineText(g2, sigIRC.panel.rabiRibiTinyDisplayFont, (int)(tmp.getWidth()*0.6), 50, 0, 2, Color.WHITE, Color.BLACK, text);
|
||||
text = ColorLocation.getLocationName(map);
|
||||
Rectangle2D siz = TextUtils.calculateStringBoundsFont(text, sigIRC.panel.rabiRibiTinyDisplayFont);
|
||||
DrawUtils.drawOutlineText(g2, sigIRC.panel.rabiRibiTinyDisplayFont, (int)(tmp.getWidth()-siz.getWidth()-6), 30, 0, 2, ColorLocation.getColor(map), Color.BLACK, text);
|
||||
DrawUtils.drawCenteredOutlineText(g2, sigIRC.panel.rabiRibiTinyDisplayFont, (int)(tmp.getWidth()*0.6), 50, 2, Color.WHITE, Color.BLACK, text);
|
||||
|
||||
statUpdateCacheImage = tmp.getScaledInstance(w, -1, Image.SCALE_AREA_AVERAGING);
|
||||
//stat_update_required = false;
|
||||
@ -618,25 +421,17 @@ public class Profile {
|
||||
if (gamemode!=-1) {
|
||||
switch (gamemode) {
|
||||
case 0:{ //Egg Hunt.
|
||||
if (session.rainbowEggGoal>0) {
|
||||
spacing = width/session.rainbowEggGoal;
|
||||
rainbowEggLimit = session.rainbowEggGoal;
|
||||
if (session.eggCount>0) {
|
||||
spacing = width/session.eggCount;
|
||||
rainbowEggLimit = session.eggCount;
|
||||
} else {
|
||||
spacing = width/5;
|
||||
rainbowEggLimit = session.rainbowEggGoal;
|
||||
rainbowEggLimit = session.eggCount;
|
||||
}
|
||||
Image img = RabiRaceModule.image_map.get("easter_egg.png");
|
||||
if (rainbowEggLimit>10) {
|
||||
Color col = RabiRaceModule.rainbowcycler.getCycleColor();
|
||||
Rectangle2D siz = TextUtils.calculateStringBoundsFont("x "+GetRainbowEggCount(this)+" / "+session.rainbowEggGoal, sigIRC.panel.rabiRibiMoneyDisplayFont);
|
||||
DrawUtils.drawImage(g2, img, (int)(border+spacing*3-siz.getX()),(int)(36),col,sigIRC.panel);
|
||||
DrawUtils.drawOutlineText(g2, sigIRC.panel.rabiRibiMoneyDisplayFont, (border+spacing*3+img.getWidth(sigIRC.panel)*1.25), (36+img.getHeight(sigIRC.panel)/2),
|
||||
1,Color.WHITE,Color.BLACK,"x "+GetRainbowEggCount(this)+" / "+session.rainbowEggGoal);
|
||||
} else {
|
||||
for (int i=0;i<session.rainbowEggGoal;i++) {
|
||||
Color col = (GetRainbowEggCount(this)>i)?RabiRaceModule.rainbowcycler.getCycleColor():new Color(0,0,0,192);
|
||||
DrawUtils.drawImage(g2, img, (int)(border+i*spacing-img.getWidth(sigIRC.panel)/4),(int)(36),col,sigIRC.panel);
|
||||
}
|
||||
for (int i=0;i<session.eggCount;i++) {
|
||||
Color col = (rainbowEggCount>i)?RabiRaceModule.rainbowcycler.getCycleColor():new Color(0,0,0,192);
|
||||
DrawUtils.drawImage(g2, img, (int)(border+i*spacing-img.getWidth(sigIRC.panel)/4),(int)(36),col,sigIRC.panel);
|
||||
}
|
||||
}break;
|
||||
case 1:{ //Item Hunt.
|
||||
@ -709,18 +504,17 @@ public class Profile {
|
||||
RabiRaceModule.image_map.get("pack_up.png"),
|
||||
RabiRaceModule.image_map.get("attack_up.png")};
|
||||
int[] amts = new int[]{
|
||||
GetHealthUpCount(this),
|
||||
GetManaUpCount(this),
|
||||
GetRegenUpCount(this),
|
||||
GetPackUpCount(this),
|
||||
GetAttackUpCount(this),
|
||||
healthUps,
|
||||
manaUps,
|
||||
regenUps,
|
||||
packUps,
|
||||
attackUps,
|
||||
};
|
||||
spacing=width/6;
|
||||
if (GetRainbowEggCount(this)>rainbowEggLimit) {
|
||||
if (rainbowEggCount>rainbowEggLimit) {
|
||||
imgs = Arrays.copyOf(imgs, imgs.length+1);
|
||||
imgs[imgs.length-1] = RabiRaceModule.image_map.get("easter_egg.png");
|
||||
amts = Arrays.copyOf(amts, amts.length+1);
|
||||
amts[amts.length-1] = GetRainbowEggCount(this);
|
||||
amts[amts.length-1] = rainbowEggCount;
|
||||
spacing = width/6;
|
||||
}
|
||||
//g2.drawImage(RabiRaceModule.image_map.get("bunny_strike.png"),(int)(+border+(i++)*(spacing)-img2.getWidth(sigIRC.panel)/4),(int)(+96+56), (int)icon_size, (int)icon_size, sigIRC.panel);
|
||||
@ -731,7 +525,7 @@ public class Profile {
|
||||
} else {
|
||||
g2.drawImage(img,(int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56)+shiftyval, (int)icon_size, (int)icon_size, sigIRC.panel);
|
||||
}
|
||||
DrawUtils.drawCenteredOutlineText(g2, sigIRC.panel.rabiRibiMoneyDisplayFont, (int)((+border+((i)*(spacing))-icon_size/2)+(spacing/2)+4), (int)(+96+56+icon_size)+shiftyval, 0, 1, Color.WHITE, Color.BLUE, Integer.toString(amts[i++]));
|
||||
DrawUtils.drawCenteredOutlineText(g2, sigIRC.panel.programFont, (int)((+border+((i)*(spacing))-icon_size/2)+(spacing/2)+4), (int)(+96+56+icon_size+12)+shiftyval, 1, Color.WHITE, Color.BLUE, Integer.toString(amts[i++]));
|
||||
}
|
||||
} catch (ConcurrentModificationException e) {
|
||||
|
||||
|
@ -5,9 +5,7 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import sig.sigIRC;
|
||||
import sig.modules.RabiRaceModule;
|
||||
import sig.utils.FileUtils;
|
||||
import sig.utils.ReflectUtils;
|
||||
|
||||
public class Session {
|
||||
@ -17,10 +15,9 @@ public class Session {
|
||||
int maxPlayers = 0;
|
||||
String password = "";
|
||||
float difficulty = -1;
|
||||
boolean coop = false;
|
||||
int gamemode = 0; //0 = Egg Mode, 1 = Item Hunt Mode
|
||||
String[] itemHuntData;
|
||||
int rainbowEggGoal = 0;
|
||||
int eggCount = 0;
|
||||
int id = 0;
|
||||
List<Profile> players = new ArrayList<Profile>();
|
||||
|
||||
@ -43,20 +40,29 @@ public class Session {
|
||||
if (playerlist.length>1) {
|
||||
for (String s : playerlist) {
|
||||
Profile p = new Profile(RabiRaceModule.module,true);
|
||||
p.displayName=p.username=s;
|
||||
p.username=s;
|
||||
p.avatar = Profile.GetSeededAvatar(p.username);
|
||||
//System.out.println("Player "+p.username);
|
||||
DownloadAndAddPlayer(p);
|
||||
if (p.downloadProfile()) {
|
||||
if (RabiRaceModule.mySession==null && p.username.equalsIgnoreCase(RabiRaceModule.module.myProfile.username)) {
|
||||
RabiRaceModule.mySession = this;
|
||||
}
|
||||
//System.out.println("Adding Player "+p);
|
||||
players.add(p);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Profile p = new Profile(RabiRaceModule.module,true);
|
||||
p.displayName=p.username=val;
|
||||
p.username=val;
|
||||
p.avatar = Profile.GetSeededAvatar(p.username);
|
||||
//System.out.println("Player "+p.username);
|
||||
DownloadAndAddPlayer(p);
|
||||
}
|
||||
if (RabiRaceModule.syncItems) {
|
||||
RabiRaceModule.module.SyncItemsWithOtherPlayers();
|
||||
if (p.downloadProfile()) {
|
||||
if (RabiRaceModule.mySession==null && p.username.equalsIgnoreCase(RabiRaceModule.module.myProfile.username)) {
|
||||
RabiRaceModule.mySession = this;
|
||||
}
|
||||
//System.out.println("Adding Player "+p);
|
||||
players.add(p);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (split.length>=8) {
|
||||
@ -66,32 +72,15 @@ public class Session {
|
||||
gamemode = Integer.parseInt(split[i++]);
|
||||
switch (gamemode) {
|
||||
case 0:{
|
||||
rainbowEggGoal = Integer.parseInt(split[i++]);
|
||||
eggCount = Integer.parseInt(split[i++]);
|
||||
}break;
|
||||
case 1:{
|
||||
itemHuntData = split[i++].split(";");
|
||||
}break;
|
||||
}
|
||||
}
|
||||
if (split.length>=11) {
|
||||
coop = Boolean.parseBoolean(split[i++]);
|
||||
}
|
||||
}
|
||||
|
||||
private void DownloadAndAddPlayer(Profile p) {
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Download profile for "+p.username+".", "debug2.log");
|
||||
if (p.downloadProfile()) {
|
||||
if (RabiRaceModule.mySession==null && p.username.equalsIgnoreCase(RabiRaceModule.module.myProfile.username)) {
|
||||
RabiRaceModule.mySession = this;
|
||||
//RetrieveClientAvatar(p);
|
||||
}
|
||||
//System.out.println("Adding Player "+p);
|
||||
players.add(p);
|
||||
} else {
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Failed to download profile for player "+p.username+"!", "debug2.log");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public int getID() {
|
||||
return id;
|
||||
}
|
||||
@ -100,10 +89,6 @@ public class Session {
|
||||
return players;
|
||||
}
|
||||
|
||||
public boolean isCoop() {
|
||||
return coop;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(this.getClass().getName()+"(");
|
||||
|
@ -11,14 +11,12 @@ import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.Box;
|
||||
import javax.swing.BoxLayout;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JComboBox;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
@ -56,13 +54,12 @@ public class SessionCreateWindow extends JFrame{
|
||||
JPanel namepanel = new JPanel();
|
||||
JPanel playerpanel = new JPanel();
|
||||
JPanel passwordpanel = new JPanel();
|
||||
JPanel cooppanel = new JPanel();
|
||||
JPanel difficultypanel = new JPanel();
|
||||
JPanel modepanel = new JPanel();
|
||||
JPanel eggpropertiespanel = new JPanel();
|
||||
|
||||
JPanel[] panel_list = new JPanel[]{
|
||||
namepanel,playerpanel,passwordpanel,cooppanel,difficultypanel,modepanel,eggpropertiespanel,itempropertiespanel
|
||||
namepanel,playerpanel,passwordpanel,difficultypanel,modepanel,eggpropertiespanel,itempropertiespanel
|
||||
};
|
||||
|
||||
for (JPanel panel : panel_list) {
|
||||
@ -92,18 +89,8 @@ public class SessionCreateWindow extends JFrame{
|
||||
|
||||
playerpanel.add(passwordLabel);
|
||||
playerpanel.add(pass);
|
||||
|
||||
JLabel cooplabel = new JLabel("MultiBun (Coop) ");
|
||||
JCheckBox coop = new JCheckBox();
|
||||
coop.setPreferredSize(new Dimension(60,24));
|
||||
coop.setSelected(false);
|
||||
|
||||
cooppanel.add(Box.createHorizontalStrut(60));
|
||||
cooppanel.add(cooplabel);
|
||||
cooppanel.add(coop);
|
||||
cooppanel.add(Box.createHorizontalStrut(60));
|
||||
|
||||
JLabel difficultyLabel = new JLabel("Race Difficulty: ");
|
||||
JLabel difficultyLabel = new JLabel("Race Difficulty (0.00~10.00): ");
|
||||
difficulty.setPreferredSize(new Dimension(60,24));
|
||||
difficulty.setText("5.00");
|
||||
|
||||
@ -199,8 +186,8 @@ public class SessionCreateWindow extends JFrame{
|
||||
JOptionPane.showMessageDialog(RabiRaceModule.createwindow, "Your egg count is invalid!", "Error!", JOptionPane.WARNING_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (((String)gametype.getSelectedItem()).equalsIgnoreCase("Egg Mode") && (Integer.parseInt(eggcount.getText())>80 || Integer.parseInt(eggcount.getText())<2)) {
|
||||
JOptionPane.showMessageDialog(RabiRaceModule.createwindow, "Your egg count needs to be between 2-80!", "Error!", JOptionPane.WARNING_MESSAGE);
|
||||
if (((String)gametype.getSelectedItem()).equalsIgnoreCase("Egg Mode") && (Integer.parseInt(eggcount.getText())>48 || Integer.parseInt(eggcount.getText())<2)) {
|
||||
JOptionPane.showMessageDialog(RabiRaceModule.createwindow, "Your egg count needs to be between 2-48!", "Error!", JOptionPane.WARNING_MESSAGE);
|
||||
return;
|
||||
}
|
||||
if (!TextUtils.isNumeric(difficulty.getText()) && difficulty.getText().length()>0) {
|
||||
@ -219,14 +206,13 @@ public class SessionCreateWindow extends JFrame{
|
||||
sessionText = sessionText.replaceAll(" ", "%20");
|
||||
File file = new File(sigIRC.BASEDIR+"sigIRC/tmp.data");
|
||||
try {
|
||||
//System.out.println("Write to "+"http://45.33.13.215:8080/rabirace/send.php?key=sessioncreate&name="+sessionText+"&players="+maxplayers.getText()+"&password="+((hashpass.length()>0)?hashpass:"none")+"&difficulty="+((difficulty.getText().length()>0)?difficulty.getText():"-1")+"&mode="+GetModeIndex()+"&extradata="+GetModeData());
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=sessioncreate&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+RabiRaceModule.module.myProfile.username+"&roomname="+sessionText+"&players="+maxplayers.getText()+"&password="+((hashpass.length()>0)?hashpass:"none")+"&difficulty="+((difficulty.getText().length()>0)?difficulty.getText():"-1")+"&mode="+GetModeIndex()+"&extradata="+GetModeData()+"&coop="+GetCoopValue()),file);
|
||||
//org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=sessioncreate&name="+session_name.getText()+"&players="+maxplayers.getText()+"&password="+((hashpass.length()>0)?hashpass:"none")),file);
|
||||
//System.out.println("Write to "+"http://45.33.13.215/rabirace/send.php?key=sessioncreate&name="+sessionText+"&players="+maxplayers.getText()+"&password="+((hashpass.length()>0)?hashpass:"none")+"&difficulty="+((difficulty.getText().length()>0)?difficulty.getText():"-1")+"&mode="+GetModeIndex()+"&extradata="+GetModeData());
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=sessioncreate&name="+sessionText+"&players="+maxplayers.getText()+"&password="+((hashpass.length()>0)?hashpass:"none")+"&difficulty="+((difficulty.getText().length()>0)?difficulty.getText():"-1")+"&mode="+GetModeIndex()+"&extradata="+GetModeData()),file);
|
||||
//org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=sessioncreate&name="+session_name.getText()+"&players="+maxplayers.getText()+"&password="+((hashpass.length()>0)?hashpass:"none")),file);
|
||||
String[] contents = FileUtils.readFromFile(sigIRC.BASEDIR+"sigIRC/tmp.data");
|
||||
int sessionID=-1;
|
||||
if (contents.length>=2) {
|
||||
sessionID=Integer.parseInt(contents[0]);
|
||||
System.out.println(Arrays.toString(contents));
|
||||
}
|
||||
if (sessionID!=-1) {
|
||||
RabiRaceModule.module.getSessionList();
|
||||
@ -243,10 +229,6 @@ public class SessionCreateWindow extends JFrame{
|
||||
}
|
||||
}
|
||||
|
||||
private Boolean GetCoopValue() {
|
||||
return coop.isSelected();
|
||||
}
|
||||
|
||||
private String GetModeIndex() {
|
||||
switch (((String)gametype.getSelectedItem())) {
|
||||
case "Egg Mode":{
|
||||
@ -294,16 +276,13 @@ public class SessionCreateWindow extends JFrame{
|
||||
container.setLayout(new BoxLayout(container,BoxLayout.PAGE_AXIS));
|
||||
|
||||
container.add(Box.createRigidArea(new Dimension(24,24)));
|
||||
/*(container.add(namepanel);
|
||||
container.add(namepanel);
|
||||
container.add(playerpanel);
|
||||
container.add(passwordpanel);
|
||||
container.add(difficultypanel);
|
||||
container.add(modepanel);
|
||||
container.add(eggpropertiespanel);
|
||||
container.add(itempropertiespanel);*/
|
||||
for (JPanel panel : panel_list) {
|
||||
container.add(panel);
|
||||
}
|
||||
container.add(itempropertiespanel);
|
||||
for (int i=0;i<10;i++) {
|
||||
ItemDisplayBox<MemoryData> box = new ItemDisplayBox<MemoryData>(this);
|
||||
box.myPanel.setVisible(false);
|
||||
@ -314,9 +293,9 @@ public class SessionCreateWindow extends JFrame{
|
||||
container.add(Box.createRigidArea(new Dimension(24,24)));
|
||||
|
||||
this.add(container);
|
||||
this.setSize(400, 280);
|
||||
this.setMinimumSize(new Dimension(400, 280));
|
||||
this.setMaximumSize(new Dimension(400, 280));
|
||||
this.setSize(400, 240);
|
||||
this.setMinimumSize(new Dimension(400, 240));
|
||||
this.setMaximumSize(new Dimension(400, 240));
|
||||
this.setResizable(false);
|
||||
}
|
||||
|
||||
@ -388,7 +367,7 @@ public class SessionCreateWindow extends JFrame{
|
||||
return true;
|
||||
}
|
||||
int val = Integer.parseInt(getText());
|
||||
if (val>80 || val<2) {
|
||||
if (val>48 || val<2) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -148,7 +148,7 @@ public class SessionListWindow extends JFrame{
|
||||
hashedPass="none";
|
||||
}
|
||||
File file = new File(sigIRC.BASEDIR+"sigIRC/tmp_session.data");
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=joinsession&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+RabiRaceModule.module.myProfile.username+"&session="+session.id+"&password="+hashedPass),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=joinsession&name="+RabiRaceModule.module.myProfile.username+"&session="+session.id+"&password="+hashedPass),file);
|
||||
String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"sigIRC/tmp_session.data");
|
||||
|
||||
if (data.length==1) {
|
||||
@ -208,8 +208,6 @@ public class SessionListWindow extends JFrame{
|
||||
}
|
||||
count++;
|
||||
}
|
||||
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Updated sessions listing.", "debug.log");
|
||||
//System.out.println("Selected is "+selected);
|
||||
//Try to find ID in list.
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ import java.awt.Graphics;
|
||||
import java.awt.Image;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.awt.event.MouseWheelEvent;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
@ -38,7 +37,6 @@ import sig.modules.RabiRace.ClickableButton;
|
||||
import sig.modules.RabiRace.ColorCycler;
|
||||
import sig.modules.RabiRace.CreateButton;
|
||||
import sig.modules.RabiRace.JoinButton;
|
||||
import sig.modules.RabiRace.MarkMapButton;
|
||||
import sig.modules.RabiRace.MemoryData;
|
||||
import sig.modules.RabiRace.Profile;
|
||||
import sig.modules.RabiRace.Session;
|
||||
@ -50,62 +48,34 @@ import sig.modules.RabiRibi.MemoryType;
|
||||
import sig.modules.utils.PsapiTools;
|
||||
import sig.utils.DrawUtils;
|
||||
import sig.utils.FileUtils;
|
||||
import sig.utils.SoundUtils;
|
||||
import sig.utils.TextUtils;
|
||||
|
||||
public class RabiRaceModule extends Module{
|
||||
final static int ERINA = 0;
|
||||
final static int RIBBON = 1;
|
||||
final static int CICINI = 2;
|
||||
final static int MIRIAM = 3;
|
||||
public final static int DEBUGMODE = 0;
|
||||
final static String ITEMS_DIRECTORY = sigIRC.BASEDIR+"sigIRC/rabi-ribi/items/";
|
||||
final static String AVATAR_DIRECTORY = sigIRC.BASEDIR+"sigIRC/rabi-ribi/characters/";
|
||||
final int PROCESS_PERMISSIONS = WinNT.PROCESS_QUERY_INFORMATION | WinNT.PROCESS_VM_READ | WinNT.PROCESS_VM_WRITE;
|
||||
final int PROCESS_PERMISSIONS = WinNT.PROCESS_QUERY_INFORMATION | WinNT.PROCESS_VM_READ;
|
||||
boolean foundRabiRibi = false;
|
||||
final static int WAITFRAMEMAX = 120;
|
||||
int waitframes = WAITFRAMEMAX;
|
||||
int rabiRibiPID = -1;
|
||||
long rabiRibiMemOffset = 0;
|
||||
public HANDLE rabiribiProcess = null;
|
||||
public static HashMap<String,Image> image_map = new HashMap<String,Image>();
|
||||
public static Image UNKNOWN_ITEM;
|
||||
public static ColorCycler rainbowcycler = new ColorCycler(new Color(255,0,0,96),16);
|
||||
public static RabiRaceModule module;
|
||||
public Profile myProfile = new Profile(this,false);
|
||||
public static RabiRaceModule module;
|
||||
public static SessionListWindow window;
|
||||
public static SessionCreateWindow createwindow;
|
||||
public static AvatarSelectionWindow avatarwindow;
|
||||
public static Session mySession;
|
||||
boolean firstCheck=false;
|
||||
public List<ScrollingText> messages = new ArrayList<ScrollingText>();
|
||||
public List<String> messagequeue = new ArrayList<String>();
|
||||
public static int lastScrollX = 0;
|
||||
boolean firstUpdate=true;
|
||||
boolean mouseoverAvatar=false;
|
||||
public static boolean avatarRetrieved=false;
|
||||
public static int CLIENT_SERVER_READTIME = -1;
|
||||
public static boolean syncItems = false;
|
||||
public static int selectedMapIcon = 13;
|
||||
public static int lastreadmapdata = 0;
|
||||
public boolean viewingupdatedMapIcons=false;
|
||||
public HashMap<Integer,Integer> mapdata = new HashMap<Integer,Integer>();
|
||||
public HashMap<Integer,Integer> newmapdata = new HashMap<Integer,Integer>();
|
||||
public static ScheduledExecutorService scheduler,scheduler2;
|
||||
public static boolean syncEvents = true;
|
||||
//public static boolean darknessHasReachedzero = true; //darkness needs to go down to 0, then go back up.
|
||||
public static boolean hasDied = false;
|
||||
public static String lastEventString = "";
|
||||
int frames=0;
|
||||
|
||||
public static final int[] RESTRICTED_EVENTS = new int[] {256,257,260,262,264,265,266,267,268,269,271,272,278,279,284,289,290,295,296,307,315,316,322,323,324,331,333,344,345,371,377,379,385,386,387,399,412,427,428,451,452,464,465,484,516,517,518,519};
|
||||
public static final int[] BOSSSONGS = new int[] {8,27,33,34,36,37,38,39,42,43,44,47,48,51,52,54,56,59,60,61,63,64};
|
||||
|
||||
public SessionListData session_listing = new SessionListData();
|
||||
|
||||
ClickableButton join_button,create_button,markmap_button;
|
||||
|
||||
public Image mapiconimg;
|
||||
ClickableButton join_button,create_button;
|
||||
|
||||
public static List<MemoryData> key_items_list = new ArrayList<MemoryData>();
|
||||
public static List<MemoryData> badges_list = new ArrayList<MemoryData>();
|
||||
@ -125,27 +95,37 @@ public class RabiRaceModule extends Module{
|
||||
}
|
||||
|
||||
private void Initialize() {
|
||||
|
||||
File f = new File("debug.log");
|
||||
f.delete();
|
||||
f = new File("debug2.log");
|
||||
f.delete();
|
||||
|
||||
CheckRabiRibiClient();
|
||||
|
||||
VerifyClientIsValid(); //If the client is not allowed to send data, we need to know that.
|
||||
|
||||
scheduler = Executors.newScheduledThreadPool(1);
|
||||
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
|
||||
scheduler.scheduleWithFixedDelay(()->{
|
||||
RunRabiRace();
|
||||
}, 1500, 1500, TimeUnit.MILLISECONDS);
|
||||
CheckRabiRibiClient();
|
||||
if (foundRabiRibi) {
|
||||
myProfile.uploadProfile();
|
||||
getSessionList();
|
||||
getMessageUpdates();
|
||||
//trimeadProfile.downloadProfile();
|
||||
firstCheck=true;
|
||||
if (mySession!=null) {
|
||||
File file = new File(sigIRC.BASEDIR+"sigIRC/tmp.data");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=keepalivesession&session="+mySession.getID()),file);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 5000, 5000, TimeUnit.MILLISECONDS);
|
||||
|
||||
myProfile.downloadProfile(); //Synchronize our profile at the beginning.
|
||||
//System.out.println(myProfile.avatar.displayName);
|
||||
|
||||
scheduler2 = Executors.newScheduledThreadPool(1);
|
||||
ScheduledExecutorService scheduler2 = Executors.newScheduledThreadPool(1);
|
||||
scheduler2.scheduleWithFixedDelay(()->{
|
||||
RunRabiRaceUpdater();
|
||||
if (foundRabiRibi) {
|
||||
UpdateMyProfile();
|
||||
}
|
||||
}, 250, 250, TimeUnit.MILLISECONDS);
|
||||
|
||||
File dir = new File(ITEMS_DIRECTORY);
|
||||
@ -178,7 +158,6 @@ public class RabiRaceModule extends Module{
|
||||
|
||||
try {
|
||||
UNKNOWN_ITEM = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/rabi-ribi/unknown.png"));
|
||||
mapiconimg = ImageIO.read(new File(sigIRC.BASEDIR+"map_icons.png"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@ -187,75 +166,6 @@ public class RabiRaceModule extends Module{
|
||||
|
||||
join_button = new JoinButton(new Rectangle(2,(int)(position.getHeight()-18),120,18),"Join Session (0)",this);
|
||||
create_button = new CreateButton(new Rectangle(122,(int)(position.getHeight()-18),120,18),"Create Session",this);
|
||||
markmap_button = new MarkMapButton(new Rectangle(2,(int)(position.getHeight()-42),120,18),"Mark Map",this);
|
||||
}
|
||||
|
||||
public static void loadModule() {
|
||||
sigIRC.modules.add(new RabiRaceModule(
|
||||
new Rectangle(sigIRC.rabiracemodule_X,sigIRC.rabiracemodule_Y,sigIRC.rabiracemodule_width,sigIRC.rabiracemodule_height),
|
||||
"Rabi Race"
|
||||
));
|
||||
sigIRC.rabiracemodule_enabled=true;
|
||||
sigIRC.config.setBoolean("Module_rabirace_Enabled", sigIRC.rabiracemodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
public static void unloadModule() {
|
||||
for (int i=0;i<sigIRC.modules.size();i++) {
|
||||
if (sigIRC.modules.get(i) instanceof RabiRaceModule) {
|
||||
sigIRC.modules.remove(sigIRC.modules.get(i));
|
||||
}
|
||||
}
|
||||
sigIRC.rabiracemodule_enabled=false;
|
||||
sigIRC.config.setBoolean("Module_rabirace_Enabled", sigIRC.rabiracemodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
|
||||
private void RunRabiRaceUpdater() {
|
||||
if (foundRabiRibi) {
|
||||
UpdateMyProfile();
|
||||
}
|
||||
}
|
||||
|
||||
private void RunRabiRace() {
|
||||
CheckRabiRibiClient();
|
||||
if (foundRabiRibi) {
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Start update cycle...", "debug.log");
|
||||
myProfile.uploadProfile();
|
||||
getSessionList();
|
||||
getMessageUpdates();
|
||||
//trimeadProfile.downloadProfile();
|
||||
firstCheck=true;
|
||||
if (mySession!=null) {
|
||||
RequestData("tmp.data","key=keepalivesession&session="+mySession.getID());
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Requested data"+"key=keepalivesession&session="+mySession.getID(), "debug.log");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void VerifyClientIsValid() {
|
||||
String[] data = RequestAndStoreData("tmptimer.dat","key=timestamp");
|
||||
int time = -1;
|
||||
if (data.length>0) {
|
||||
time = Integer.parseInt(data[0]);
|
||||
}
|
||||
CLIENT_SERVER_READTIME = time;
|
||||
}
|
||||
|
||||
private void RequestData(String filename,String requestString) {
|
||||
File file = new File(sigIRC.BASEDIR+"sigIRC/"+filename);
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?"+requestString),file);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
String[] RequestAndStoreData(String filename,String requestString) {
|
||||
RequestData(filename,requestString);
|
||||
String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"sigIRC/"+filename);
|
||||
return data;
|
||||
}
|
||||
|
||||
private void AddImagesToImageMap(File dir, String DIRECTORY) {
|
||||
@ -281,206 +191,24 @@ public class RabiRaceModule extends Module{
|
||||
private void getMessageUpdates() {
|
||||
File file = new File(sigIRC.BASEDIR+"sigIRC/messages");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=getupdates&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+myProfile.username),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=getupdates&name="+myProfile.username),file);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"sigIRC/messages");
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Message updates."+"http://45.33.13.215:8080/rabirace/send.php?key=getupdates&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&name="+myProfile.username+" Data: "+Arrays.deepToString(data), "debug.log");
|
||||
//boolean message_played=false;
|
||||
for (String s : data) {
|
||||
if (s.length()>0) {
|
||||
messages.add(new ScrollingText(s,(int)(lastScrollX+position.getWidth()+24),(int)(position.getHeight()-28)));
|
||||
/*message_played=true;
|
||||
System.out.println("Perform item sync with other players.");
|
||||
SyncItemsWithOtherPlayers();*/
|
||||
messagequeue.add(s);
|
||||
if (mySession!=null && mySession.isCoop()) {
|
||||
syncItems=true;
|
||||
}
|
||||
FileUtils.logToFile("Add "+s+" to message queue.", "debug.log");
|
||||
}
|
||||
}
|
||||
if (mySession!=null) {
|
||||
File file2 = new File(sigIRC.BASEDIR+"mapdata");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/maps/"+mySession.getID()),file2);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
int MapUpdatesRequired=0;
|
||||
String byWhom = "";
|
||||
String[] mapdata = FileUtils.readFromFile(sigIRC.BASEDIR+"mapdata");
|
||||
for (int i=lastreadmapdata+1;i<mapdata.length;i++) {
|
||||
String[] s = mapdata[i].split(";");
|
||||
if (s.length>=2) {
|
||||
if (!s[0].equalsIgnoreCase(myProfile.username)) {
|
||||
if (!this.newmapdata.containsKey(Integer.parseInt(s[1]))) {
|
||||
MapUpdatesRequired++;
|
||||
byWhom = s[0];
|
||||
this.newmapdata.put(Integer.parseInt(s[1]),Integer.parseInt(s[2]));
|
||||
}
|
||||
}
|
||||
this.mapdata.put(Integer.parseInt(s[1]),Integer.parseInt(s[2]));
|
||||
int id = Integer.parseInt(s[1]);
|
||||
AddMapPoint((int)Math.floor(id/450),(int)Math.floor(id%450/18),id%450%18,Integer.parseInt(s[2]),false);
|
||||
lastreadmapdata=Math.max(i,lastreadmapdata);
|
||||
}
|
||||
}
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]MapUpdates:"+MapUpdatesRequired+" - "+byWhom, "debug.log");
|
||||
|
||||
if (MapUpdatesRequired>0) {
|
||||
if (MapUpdatesRequired==1) {
|
||||
messagequeue.add(byWhom+" has added a new marker to the map!");
|
||||
} else {
|
||||
messagequeue.add(MapUpdatesRequired+" new markers have been added to the map!");
|
||||
}
|
||||
}
|
||||
}
|
||||
/*if (message_played && mySession.isCoop()) {
|
||||
SoundUtils.playSound(sigIRC.BASEDIR+"sigIRC/collect_item.wav");
|
||||
}*/
|
||||
}
|
||||
|
||||
public void AddMapPoint(int area, int x, int y, int color, boolean update) {
|
||||
int id = y+18*x+area*450;
|
||||
writeIntToMemory(MemoryOffset.MAP_REGION_START.getOffset()+
|
||||
id*4,color);
|
||||
|
||||
|
||||
if (mySession!=null && mySession.isCoop() && update) {
|
||||
mapdata.put(id,color);
|
||||
File file2 = new File(sigIRC.BASEDIR+"tmp_mapdata");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?session="+mySession.getID()+"&key=addmappoint&timekey="+RabiRaceModule.CLIENT_SERVER_READTIME+"&mappoint="+myProfile.username+";"+id+";"+color),file2);
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SyncItemsWithOtherPlayers() {
|
||||
boolean soundPlayed=false;
|
||||
if (mySession!=null && mySession.isCoop()) {
|
||||
for (Profile p : mySession.getPlayers()) {
|
||||
if (p!=myProfile && !p.isPaused && !myProfile.isPaused && p.username!=myProfile.username) {
|
||||
boolean updateRequired=false;
|
||||
for (MemoryData m : p.key_items.keySet()) {
|
||||
if (p.key_items.get(m)!=0 && (!myProfile.key_items.containsKey(m) || myProfile.key_items.get(m)==0)) {
|
||||
System.out.println("You do not have a "+m.name+". Syncing from "+p.displayName+".");
|
||||
if (!(readIntFromMemory(MemoryOffset.BOSS_FIGHT.getOffset())==1 && m==MemoryData.RIBBON)) {
|
||||
writeIntToMemory(m.mem.getOffset(),Math.abs(p.key_items.get(m)));
|
||||
updateRequired=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (MemoryData m : p.badges.keySet()) {
|
||||
if (p.badges.get(m)!=0 && (!myProfile.badges.containsKey(m) || myProfile.badges.get(m)==0)) {
|
||||
System.out.println("You do not have a "+m.name+". Syncing from "+p.displayName+".");
|
||||
writeIntToMemory(m.mem.getOffset(),Math.abs(p.badges.get(m)));
|
||||
updateRequired=true;
|
||||
}
|
||||
}
|
||||
if (Profile.GetHealthUpCount(p)>Profile.GetHealthUpCount(myProfile)) {
|
||||
System.out.println("You do not have the correct amount of health ups. Syncing to ("+p.healthUps+") from "+p.displayName+".");
|
||||
UpdateRange_WithoutParsing(MemoryOffset.HEALTHUP_START,MemoryOffset.HEALTHUP_END,p.healthUps);
|
||||
updateRequired=true;
|
||||
}
|
||||
if (Profile.GetManaUpCount(p)>Profile.GetManaUpCount(myProfile)) {
|
||||
System.out.println("You do not have the correct amount of mana ups. Syncing to ("+p.manaUps+") from "+p.displayName+".");
|
||||
UpdateRange_WithoutParsing(MemoryOffset.MANAUP_START,MemoryOffset.MANAUP_END,p.manaUps);
|
||||
updateRequired=true;
|
||||
}
|
||||
if (Profile.GetRegenUpCount(p)>Profile.GetRegenUpCount(myProfile)) {
|
||||
System.out.println("You do not have the correct amount of regen ups. Syncing to ("+p.regenUps+") from "+p.displayName+".");
|
||||
UpdateRange_WithoutParsing(MemoryOffset.REGENUP_START,MemoryOffset.REGENUP_END,p.regenUps);
|
||||
updateRequired=true;
|
||||
}
|
||||
if (Profile.GetPackUpCount(p)>Profile.GetPackUpCount(myProfile)) {
|
||||
System.out.println("You do not have the correct amount of pack ups. Syncing to ("+p.packUps+") from "+p.displayName+".");
|
||||
UpdateRange_WithoutParsing(MemoryOffset.PACKUP_START,MemoryOffset.PACKUP_END,p.packUps);
|
||||
updateRequired=true;
|
||||
}
|
||||
if (Profile.GetAttackUpCount(p)>Profile.GetAttackUpCount(myProfile)) {
|
||||
System.out.println("You do not have the correct amount of attack ups. Syncing to ("+p.attackUps+") from "+p.displayName+".");
|
||||
UpdateRange_WithoutParsing(MemoryOffset.ATTACKUP_START,MemoryOffset.ATTACKUP_END,p.attackUps);
|
||||
updateRequired=true;
|
||||
}
|
||||
if (!p.eventStruct.equalsIgnoreCase(myProfile.eventStruct)) {
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Events are not synced with "+p.displayName, "debug.log");
|
||||
StringBuilder finalevents = new StringBuilder();
|
||||
String[] events = p.eventStruct.split("_");
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]"+p.displayName+"'s events: "+Arrays.toString(events), "debug.log");
|
||||
String[] myevents = myProfile.eventStruct.split("_");
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]"+myProfile.displayName+"'s events: "+Arrays.toString(myevents), "debug.log");
|
||||
for (int i=0;i<Profile.EVENT_COUNT;i++) {
|
||||
if (i!=1 && i!=90 && i!=190 && i!=177) { //Ignore syncing ribbon event, irisu library event, and forgotten cave 2 event.
|
||||
finalevents.append((events[i].compareTo(Integer.toString(readIntFromMemory(MemoryOffset.EVENT_START.getOffset()+i*4)))>0)?events[i]:readIntFromMemory(MemoryOffset.EVENT_START.getOffset()+i*4));
|
||||
/*if (events[i].compareTo(Integer.toString(readIntFromMemory(MemoryOffset.EVENT_START.getOffset()+i*4)))>0) {
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Updated event "+i+" to value "+events[i], "debug.log");
|
||||
}*/
|
||||
//finalevents.append((Integer.compare(myProfile.eventStruct.charAt(i),p.eventStruct.charAt(i))<0)?p.eventStruct.charAt(i):myProfile.eventStruct.charAt(i));
|
||||
} else {
|
||||
finalevents.append(readIntFromMemory(MemoryOffset.EVENT_START.getOffset()+i*4));
|
||||
}
|
||||
finalevents.append("_");
|
||||
}
|
||||
UpdateRange(MemoryOffset.EVENT_START,MemoryOffset.EVENT_END,finalevents.toString());
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]ll event ranges updated.", "debug.log");
|
||||
}
|
||||
|
||||
if (updateRequired && mySession.isCoop()) {
|
||||
if (!soundPlayed) {
|
||||
SoundUtils.playSound(sigIRC.BASEDIR+"sigIRC/collect_item.wav");
|
||||
soundPlayed=true;
|
||||
}
|
||||
updateRequired=false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateRange_WithoutParsing(MemoryOffset start, MemoryOffset end, String i) {
|
||||
/*int f=63;
|
||||
while (i>0 && f>0) {
|
||||
if (readIntFromMemory(start.getOffset())==0) {
|
||||
writeIntToMemory(start.getOffset()+(f*4),1);
|
||||
i--;
|
||||
}
|
||||
f--;
|
||||
}*/
|
||||
for (int l=0;l<i.length();l++) {
|
||||
writeIntToMemory(start.getOffset()+(l*4),Integer.parseInt(Character.toString(i.charAt(l))));
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateRange(MemoryOffset start, MemoryOffset end, String i) {
|
||||
/*int f=63;
|
||||
while (i>0 && f>0) {
|
||||
if (readIntFromMemory(start.getOffset())==0) {
|
||||
writeIntToMemory(start.getOffset()+(f*4),1);
|
||||
i--;
|
||||
}
|
||||
f--;
|
||||
}*/
|
||||
String[] split = i.split("_");
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Parsed events: "+Arrays.deepToString(split)+".", "debug.log");
|
||||
for (int l=0;l<split.length;l++) {
|
||||
writeIntToMemory(start.getOffset()+(l*4),Integer.parseInt(split[l]));
|
||||
}
|
||||
}
|
||||
|
||||
public void getSessionList() {
|
||||
File file = new File(sigIRC.BASEDIR+"sessions");
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215:8080/rabirace/send.php?key=getsessions"),file);
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL("http://45.33.13.215/rabirace/send.php?key=getsessions"),file);
|
||||
String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"sessions");
|
||||
//System.out.println("Data is "+Arrays.toString(data));
|
||||
session_listing.UpdateData(data);
|
||||
@ -492,7 +220,6 @@ public class RabiRaceModule extends Module{
|
||||
} else {
|
||||
join_button.setButtonLabel("Leave Session");
|
||||
}
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Retrieve session list."+"http://45.33.13.215:8080/rabirace/send.php?key=getsessions", "debug.log");
|
||||
window.UpdateSessionList();
|
||||
}
|
||||
|
||||
@ -503,19 +230,11 @@ public class RabiRaceModule extends Module{
|
||||
if (firstCheck && mySession==null && create_button.mouseInsideBounds(ev)) {
|
||||
create_button.onClickEvent(ev);
|
||||
}
|
||||
if (firstCheck && markmap_button.mouseInsideBounds(ev)) {
|
||||
markmap_button.onClickEvent(ev);
|
||||
}
|
||||
if (mouseoverAvatar) {
|
||||
avatarwindow.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void mouseWheel(MouseWheelEvent ev) {
|
||||
selectedMapIcon+=Math.signum(ev.getWheelRotation());
|
||||
selectedMapIcon=(selectedMapIcon<0)?15:selectedMapIcon%16;
|
||||
}
|
||||
|
||||
private void CheckRabiRibiClient() {
|
||||
List<Integer> pids;
|
||||
try {
|
||||
@ -561,25 +280,8 @@ public class RabiRaceModule extends Module{
|
||||
}
|
||||
|
||||
public void run() {
|
||||
frames++;
|
||||
if (foundRabiRibi) {
|
||||
if (scheduler.isTerminated() || scheduler.isShutdown()) {
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]For some reason scheduler was terminated! Trying to restart...", "debug2.log");
|
||||
scheduler.scheduleWithFixedDelay(()->{
|
||||
RunRabiRace();
|
||||
}, 1500, 1500, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
if (scheduler2.isTerminated() || scheduler2.isShutdown()) {
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]For some reason scheduler2 was terminated! Trying to restart...", "debug2.log");
|
||||
scheduler2.scheduleWithFixedDelay(()->{
|
||||
RunRabiRaceUpdater();
|
||||
}, 250, 250, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
rainbowcycler.run();
|
||||
/*System.out.println("Value: ("+Integer.toHexString((int)(rabiRibiMemOffset+0x1679EF0))+"): "+readIntFromMemory(0x1679EF0));
|
||||
System.out.println("Write...");
|
||||
writeIntToMemory(0x1679EF0,0);
|
||||
System.out.println("Value: ("+Integer.toHexString((int)(rabiRibiMemOffset+0x1679EF0))+"): "+readIntFromMemory(0x1679EF0));*/
|
||||
if (window!=null) {
|
||||
window.run();
|
||||
}
|
||||
@ -588,85 +290,22 @@ public class RabiRaceModule extends Module{
|
||||
messages.remove(i--);
|
||||
}
|
||||
}
|
||||
if (messagequeue.size()>0) {
|
||||
|
||||
if (NoMessageDisplayed()) {
|
||||
int character=0;
|
||||
character = messagequeue.get(0).contains("to the map!")?RabiRaceModule.MIRIAM:messagequeue.get(0).contains("Rainbow Egg")?RabiRaceModule.CICINI:messagequeue.get(0).contains(myProfile.displayName)?RabiRaceModule.ERINA:RabiRaceModule.RIBBON;
|
||||
DisplayMessage(messagequeue.get(0).length()>255?messagequeue.remove(0).substring(0,255):messagequeue.remove(0),8,character);
|
||||
}
|
||||
}
|
||||
|
||||
if (lastScrollX>0) {
|
||||
lastScrollX-=ScrollingText.SCROLLSPD;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void DisplayMessage(String s, int seconds, int character) {
|
||||
writeIntToMemory(MemoryOffset.MESSAGE_CHARACTER.getOffset(),character);
|
||||
writeStringToMemory(MemoryOffset.MESSAGE_TEXT.getOffset(),s,256);
|
||||
writeIntToMemory(MemoryOffset.MESSAGE_TEXTREF.getOffset(),27);
|
||||
}
|
||||
|
||||
private boolean NoMessageDisplayed() {
|
||||
return readIntFromMemory(MemoryOffset.MESSAGE_TIMER)==0;
|
||||
}
|
||||
|
||||
public boolean OnTitleScreen() {
|
||||
/*return readIntFromMemory(MemoryOffset.INTERFACE_GRAPHICS_CONTROLLER)==809054496 ||
|
||||
readIntFromMemory(MemoryOffset.INTERFACE_GRAPHICS_CONTROLLER)==1593843744 ||
|
||||
readIntFromMemory(MemoryOffset.INTERFACE_GRAPHICS_CONTROLLER)==842018353 ||
|
||||
readIntFromMemory(MemoryOffset.INTERFACE_GRAPHICS_CONTROLLER)==706755104;*/
|
||||
return readIntFromMemory(MemoryOffset.TITLE_SCREEN)==0;
|
||||
}
|
||||
|
||||
private void UpdateMyProfile() {
|
||||
if (foundRabiRibi) {
|
||||
//System.out.println("Called.");
|
||||
int paused = readIntFromMemory(MemoryOffset.PAUSED) + (OnTitleScreen()?1:0);
|
||||
//int paused = 0; //TODO FORCE UNPAUSE FOR NOW.
|
||||
int paused = readIntFromMemory(MemoryOffset.PAUSED);
|
||||
float itempct = readFloatFromMemory(MemoryOffset.ITEM_PERCENT);
|
||||
myProfile.isPaused = paused>=1;
|
||||
|
||||
if (mySession!=null && mySession.isCoop()) {
|
||||
|
||||
if (OnTitleScreen()) {
|
||||
if (waitframes--<=0) {
|
||||
mapdata.clear();
|
||||
newmapdata.clear();
|
||||
lastreadmapdata=0;
|
||||
}
|
||||
} else {
|
||||
waitframes = WAITFRAMEMAX;
|
||||
}
|
||||
|
||||
if (newmapdata.size()>0 && readIntFromMemory(MemoryOffset.PAUSED)>0) {
|
||||
viewingupdatedMapIcons=true;
|
||||
for (Integer i : newmapdata.keySet()) {
|
||||
int icon = mapdata.get(i);
|
||||
if ((frames%40)>=20) {
|
||||
AddMapPoint((int)Math.floor(i/450),(int)Math.floor(i%450/18),i%450%18,6,false);
|
||||
} else {
|
||||
AddMapPoint((int)Math.floor(i/450),(int)Math.floor(i%450/18),i%450%18,icon,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (viewingupdatedMapIcons && readIntFromMemory(MemoryOffset.PAUSED)==0) {
|
||||
viewingupdatedMapIcons=false;
|
||||
for (Integer i : newmapdata.keySet()) {
|
||||
int icon = mapdata.get(i);
|
||||
AddMapPoint((int)Math.floor(i/450),(int)Math.floor(i%450/18),i%450%18,icon,false);
|
||||
}
|
||||
newmapdata.clear();
|
||||
}
|
||||
}
|
||||
|
||||
myProfile.isPaused = paused==1;
|
||||
//System.out.println(itempct+","+paused);
|
||||
if (paused==0 && itempct>=0) {
|
||||
myProfile.archiveAllValues();
|
||||
myProfile.rainbowEggs = readIntFromMemory(MemoryOffset.RAINBOW_EGG_COUNT);
|
||||
myProfile.rainbowEggCount = readIntFromMemory(MemoryOffset.RAINBOW_EGG_COUNT);
|
||||
myProfile.attackUps = readItemCountFromMemory(MemoryOffset.ATTACKUP_START,MemoryOffset.ATTACKUP_END);
|
||||
myProfile.healthUps = readItemCountFromMemory(MemoryOffset.HEALTHUP_START,MemoryOffset.HEALTHUP_END);
|
||||
myProfile.manaUps = readItemCountFromMemory(MemoryOffset.MANAUP_START,MemoryOffset.MANAUP_END);
|
||||
@ -674,9 +313,9 @@ public class RabiRaceModule extends Module{
|
||||
myProfile.packUps = readItemCountFromMemory(MemoryOffset.PACKUP_START,MemoryOffset.PACKUP_END);
|
||||
myProfile.itempct = itempct;
|
||||
myProfile.mappct = readFloatFromMemory(MemoryOffset.MAP_PERCENT);
|
||||
myProfile.playtime = readIntFromMemory(MemoryOffset.PLAYTIME);
|
||||
myProfile.difficulty = readIntFromMemory(MemoryOffset.GAME_DIFFICULTY);
|
||||
myProfile.loop = readIntFromMemory(MemoryOffset.GAME_LOOP);
|
||||
myProfile.map = readIntFromMemory(MemoryOffset.MAP_AREA_COLOR);
|
||||
myProfile.updateClientValues();
|
||||
if (mySession!=null && !firstUpdate) {
|
||||
myProfile.compareAndAnnounceAllChangedValues();
|
||||
@ -687,7 +326,6 @@ public class RabiRaceModule extends Module{
|
||||
myProfile.stat_update_required=true;
|
||||
firstUpdate=false;
|
||||
}
|
||||
myProfile.playtime = readIntFromMemory(MemoryOffset.PLAYTIME);
|
||||
if (mySession!=null) {
|
||||
for (Profile p : mySession.getPlayers()) {
|
||||
if (!p.username.equalsIgnoreCase(myProfile.username)) {
|
||||
@ -727,36 +365,6 @@ public class RabiRaceModule extends Module{
|
||||
return mem.getFloat(0);
|
||||
}
|
||||
|
||||
public void writeIntToMemory(long offset,int value) {
|
||||
//Pointer valueptr = new Pointer();
|
||||
Memory valueptr = new Memory(8);
|
||||
valueptr.setInt(0, value);
|
||||
//new Pointer(rabiRibiMemOffset+offset).setMemory((long)0, (long)4, (byte)value);
|
||||
Kernel32.INSTANCE.WriteProcessMemory(rabiribiProcess,
|
||||
new Pointer(rabiRibiMemOffset+offset),valueptr,4,null);
|
||||
//Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(rabiRibiMemOffset+offset), mem, 4, null);
|
||||
//return mem.getInt(0);
|
||||
}
|
||||
public void writeStringToMemory(long offset,String value, int size) {
|
||||
//Pointer valueptr = new Pointer();
|
||||
Memory valueptr = new Memory(size);
|
||||
valueptr.setString(0, value);
|
||||
//new Pointer(rabiRibiMemOffset+offset).setMemory((long)0, (long)4, (byte)value);
|
||||
Kernel32.INSTANCE.WriteProcessMemory(rabiribiProcess,
|
||||
new Pointer(rabiRibiMemOffset+offset),valueptr,size,null);
|
||||
//Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(rabiRibiMemOffset+offset), mem, 4, null);
|
||||
//return mem.getInt(0);
|
||||
}
|
||||
|
||||
public void writeFloatToMemory(long offset,float value) {
|
||||
Memory mem = new Memory(4);
|
||||
//Pointer valueptr = new Pointer();
|
||||
new Pointer(rabiRibiMemOffset+offset).setMemory((long)0, (long)4, (byte)value);
|
||||
//Kernel32.INSTANCE.WriteProcessMemory(rabiribiProcess, , value,4,null);
|
||||
//Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(rabiRibiMemOffset+offset), mem, 4, null);
|
||||
//return mem.getInt(0);
|
||||
}
|
||||
|
||||
public float readFloatFromMemoryOffset(MemoryOffset val, long pointer) {
|
||||
Memory mem = new Memory(4);
|
||||
Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(pointer+val.getOffset()), mem, 4, null);
|
||||
@ -815,13 +423,15 @@ public class RabiRaceModule extends Module{
|
||||
}
|
||||
}
|
||||
|
||||
String readItemCountFromMemory(MemoryOffset start_range,
|
||||
int readItemCountFromMemory(MemoryOffset start_range,
|
||||
MemoryOffset end_range) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (long i=start_range.getOffset();i<=end_range.getOffset();i+=4) {
|
||||
sb.append(readIntFromMemory(i));
|
||||
int count=0;
|
||||
for (long i=start_range.getOffset();i<=end_range.getOffset();i++) {
|
||||
if (readIntFromMemory(i)==1) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
return count;
|
||||
}
|
||||
|
||||
public void draw(Graphics g) {
|
||||
@ -868,15 +478,11 @@ public class RabiRaceModule extends Module{
|
||||
create_button.draw(g);
|
||||
}
|
||||
}
|
||||
if (mySession!=null) {
|
||||
markmap_button.draw(g);
|
||||
g.drawImage(mapiconimg, (int)(position.getX()+128), (int)(position.getY()+position.getHeight()-48), (int)(position.getX()+128+29), (int)(position.getY()+position.getHeight()-48)+29, selectedMapIcon*29, 0, selectedMapIcon*29+29, 29, sigIRC.panel);
|
||||
}
|
||||
/*g.setColor(Color.BLACK);
|
||||
g.setColor(Color.BLACK);
|
||||
g.fillRect((int)(position.getX()), (int)(position.getY()+position.getHeight()-28-20), (int)(position.getWidth()), 20);
|
||||
for (int i=0;i<messages.size();i++) {
|
||||
messages.get(i).draw(g);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -909,14 +515,4 @@ public class RabiRaceModule extends Module{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void MarkCurrentPosition() {
|
||||
AddMapPoint(readIntFromMemory(MemoryOffset.MAP_AREA_NUMBER),
|
||||
readIntFromMemory(MemoryOffset.MAP_TILE_X),
|
||||
readIntFromMemory(MemoryOffset.MAP_TILE_Y),
|
||||
selectedMapIcon+1,true);
|
||||
/*for (int i=0;i<17;i++) {
|
||||
AddMapPoint(0,i,0,i);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,19 @@
|
||||
package sig.modules.RabiRibi;
|
||||
|
||||
public enum MemoryOffset {
|
||||
MONEY(0x167C10C,0x12DA99C+OffsetHelper.KEY_ITEM_OFFSET_V185_TO_V1851,0x12DA9AC+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12FE9B4,0x167908C,0),
|
||||
PLAYTIME(0x167C7B0,0x12D97A8+OffsetHelper.KEY_ITEM_OFFSET_V185_TO_V1851,0x12DB050+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12DB040+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190,0x1679734,0), //In frames (Rabi-Ribi runs at 60FPS). Uses Total Playtime.
|
||||
MONEY(0xD654CC,0x12DA99C+OffsetHelper.KEY_ITEM_OFFSET_V185_TO_V1851,0x12DA9AC+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12FE9B4),
|
||||
PLAYTIME(0xD642D8,0x12D97A8+OffsetHelper.KEY_ITEM_OFFSET_V185_TO_V1851,0x12DB050+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12DB040+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190), //In frames (Rabi-Ribi runs at 60FPS).
|
||||
//UNKNOWN1(0xD65BDC), //???? Originally assumed to be "Health Ups".
|
||||
HEALTHUP_START(0xD6342C,0xD6342C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6342C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6342C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
HEALTHUP_END(0xD63528,0xD63528+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63528+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63528+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
ATTACKUP_START(0xD6352C,0xD6352C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6352C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6352C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
ATTACKUP_END(0xD63628,0xD63628+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63628+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63628+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
MANAUP_START(0xD6362C,0xD6362C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6362C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6362C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
MANAUP_END(0xD63728,0xD63728+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63728+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63728+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
REGENUP_START(0xD6372C,0xD6372C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6372C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6372C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
REGENUP_END(0xD63828,0xD63828+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63828+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63828+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
PACKUP_START(0xD6382C,0xD6382C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6382C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6382C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
PACKUP_END(0xD63928,0xD63928+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63928+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63928+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
/*ENTITY_ARRAY(0x0096DA3C), //Erina Data Pointer.
|
||||
ERINA_HP(0x4D8),
|
||||
ERINA_MAXHP(0x4E8),
|
||||
@ -28,174 +38,134 @@ public enum MemoryOffset {
|
||||
|
||||
|
||||
|
||||
GAME_DIFFICULTY(0x167AF78,0xD64338+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0x12D9818+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12D9808+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190,0x1677EF8,0), //0=Casual, 5=BEX. See DifficultyStruct.java for more.
|
||||
GAME_LOOP(0x1683C9C,0xD6D05C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0x12E253C+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12E252C+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190,0x1680C1C,0),
|
||||
GAME_DIFFICULTY(0xD64338,0xD64338+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0x12D9818+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12D9808+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190),
|
||||
GAME_LOOP(0xD6D05C,0xD6D05C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0x12E253C+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12E252C+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190),
|
||||
|
||||
HAMMER(0xD632B0,0xD632B0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632B0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632B0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
AIR_JUMP(0xD632B4,0xD632B4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632B4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632B4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
SLIDING_POWDER(0xD632B8,0xD632B8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632B8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632B8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
CARROT_BOMB(0xD632BC,0xD632BC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632BC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632BC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
HOURGLASS(0xD632C0,0xD632C0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632C0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632C0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
SPEED_BOOST(0xD632C4,0xD632C4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632C4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632C4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
AUTO_EARRINGS(0xD632C8,0xD632C8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632C8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632C8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
RIBBON(0xD632CC,0xD632CC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632CC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632CC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
SOUL_HEART(0xD632D0,0xD632D0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632D0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632D0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
RABI_SLIPPERS(0xD632D4,0xD632D4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632D4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632D4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BUNNY_WHIRL(0xD632D8,0xD632D8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632D8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632D8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
QUICK_BARETTE(0xD632DC,0xD632DC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632DC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632DC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BOOK_OF_CARROT(0xD632E0,0xD632E0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632E0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632E0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
CHAOS_ROD(0xD632E4,0xD632E4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632E4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632E4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
HAMMER_WAVE(0xD632E8,0xD632E8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632E8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632E8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
HAMMER_ROLL(0xD632EC,0xD632EC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632EC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632EC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
LIGHT_ORB(0xD632F0,0xD632F0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632F0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632F0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
WATER_ORB(0xD632F4,0xD632F4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632F4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632F4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
FIRE_ORB(0xD632F8,0xD632F8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632F8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632F8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
NATURE_ORB(0xD632FC,0xD632FC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632FC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632FC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
P_HAIRPIN(0xD63300,0x12D87D0+OffsetHelper.KEY_ITEM_OFFSET_V185_TO_V1851,0x12D87D0+OffsetHelper.MEMORY_OFFSET_V185_TO_V1881,0x12D87D0+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
SUNNY_BEAM(0xD63304,0xD63304+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63304+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63304+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
PLUS_NECKLACE(0xD63308,0xD63308+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63308+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63308+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
CYBER_FLOWER(0xD6330C,0xD6330C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6330C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6330C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
HEALING_STAFF(0xD63310,0xD63310+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63310+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63310+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
MAX_BRACELET(0xD63314,0xD63314+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63314+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63314+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
EXPLODE_SHOT(0xD63318,0xD63318+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63318+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63318+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
AIR_DASH(0xD6331C,0xD6331C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6331C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6331C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BUNNY_STRIKE(0xD63320,0xD63320+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63320+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63320+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
STRANGE_BOX(0xD63324,0xD63324+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63324+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63324+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
WALL_JUMP(0xD63328,0xD63328+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63328+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63328+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
SPIKE_BARRIER(0xD6332C,0xD6332C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6332C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6332C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BUNNY_AMULET(0xD63330,0xD63330+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63330+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63330+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
CHARGE_RING(0xD63334,0xD63334+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63334+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63334+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
CARROT_SHOOTER(0xD63338,0xD63338+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63338+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63338+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
SUPER_CARROT(0xD6333C,0xD6333C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6333C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6333C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
RUMI_DONUT(0xD63340,0xD63340+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63340+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63340+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
RUMI_CAKE(0xD63344,0xD63344+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63344+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63344+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
GOLD_CARROT(0xD63348,0xD63348+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63348+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63348+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
COCOA_BOMB(0xD6334C,0xD6334C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6334C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6334C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM1(0xD63350,0xD63350+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63350+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63350+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
TROPHY(0xD63354,0xD63354+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63354+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63354+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
EXCLAMATION_POINT(0xD63358,0xD63358+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63358+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63358+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM2(0xD6335C,0xD6335C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6335C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6335C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM3(0xD63360,0xD63360+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63360+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63360+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM4(0xD63364,0xD63364+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63364+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63364+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
RAINBOW_MAGIC(0xD63368,0xD63368+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63368+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63368+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM5(0xD6336C,0xD6336C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6336C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6336C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM6(0xD63370,0xD63370+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63370+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63370+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM7(0xD63374,0xD63374+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63374+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63374+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM8(0xD63378,0xD63378+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63378+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63378+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM9(0xD6337C,0xD6337C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6337C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6337C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM10(0xD63380,0xD63380+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63380+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63380+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM11(0xD63384,0xD63384+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63384+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63384+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM12(0xD63388,0xD63388+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63388+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63388+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM13(0xD6338C,0xD6338C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6338C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6338C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
UNKNOWN_ITEM14(0xD63390,0xD63390+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63390+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63390+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
HAMMER(0xD632B0,0xD632B0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632B0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632B0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
AIR_JUMP(0xD632B4,0xD632B4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632B4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632B4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
SLIDING_POWDER(0xD632B8,0xD632B8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632B8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632B8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
CARROT_BOMB(0xD632BC,0xD632BC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632BC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632BC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
HOURGLASS(0xD632C0,0xD632C0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632C0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632C0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
SPEED_BOOST(0xD632C4,0xD632C4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632C4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632C4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
AUTO_EARRINGS(0xD632C8,0xD632C8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632C8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632C8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
RIBBON(0xD632CC,0xD632CC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632CC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632CC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
SOUL_HEART(0xD632D0,0xD632D0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632D0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632D0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
RABI_SLIPPERS(0xD632D4,0xD632D4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632D4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632D4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BUNNY_WHIRL(0xD632D8,0xD632D8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632D8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632D8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
QUICK_BARETTE(0xD632DC,0xD632DC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632DC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632DC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BOOK_OF_CARROT(0xD632E0,0xD632E0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632E0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632E0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
CHAOS_ROD(0xD632E4,0xD632E4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632E4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632E4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
HAMMER_WAVE(0xD632E8,0xD632E8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632E8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632E8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
HAMMER_ROLL(0xD632EC,0xD632EC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632EC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632EC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
LIGHT_ORB(0xD632F0,0xD632F0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632F0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632F0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
WATER_ORB(0xD632F4,0xD632F4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632F4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632F4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
FIRE_ORB(0xD632F8,0xD632F8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632F8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632F8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
NATURE_ORB(0xD632FC,0xD632FC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD632FC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD632FC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
P_HAIRPIN(0xD63300,0x12D87D0+OffsetHelper.KEY_ITEM_OFFSET_V185_TO_V1851,0x12D87D0+OffsetHelper.MEMORY_OFFSET_V185_TO_V1881,0x12D87D0+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190),
|
||||
SUNNY_BEAM(0xD63304,0xD63304+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63304+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63304+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
PLUS_NECKLACE(0xD63308,0xD63308+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63308+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63308+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
CYBER_FLOWER(0xD6330C,0xD6330C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6330C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6330C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
HEALING_STAFF(0xD63310,0xD63310+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63310+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63310+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
MAX_BRACELET(0xD63314,0xD63314+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63314+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63314+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
EXPLODE_SHOT(0xD63318,0xD63318+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63318+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63318+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
AIR_DASH(0xD6331C,0xD6331C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6331C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6331C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BUNNY_STRIKE(0xD63320,0xD63320+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63320+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63320+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
STRANGE_BOX(0xD63324,0xD63324+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63324+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63324+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
WALL_JUMP(0xD63328,0xD63328+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63328+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63328+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
SPIKE_BARRIER(0xD6332C,0xD6332C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6332C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6332C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BUNNY_AMULET(0xD63330,0xD63330+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63330+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63330+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
CHARGE_RING(0xD63334,0xD63334+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63334+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63334+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
CARROT_SHOOTER(0xD63338,0xD63338+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63338+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63338+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
SUPER_CARROT(0xD6333C,0xD6333C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6333C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6333C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
RUMI_DONUT(0xD63340,0xD63340+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63340+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63340+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
RUMI_CAKE(0xD63344,0xD63344+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63344+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63344+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
GOLD_CARROT(0xD63348,0xD63348+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63348+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63348+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
COCOA_BOMB(0xD6334C,0xD6334C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6334C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6334C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM1(0xD63350,0xD63350+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63350+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63350+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
TROPHY(0xD63354,0xD63354+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63354+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63354+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
EXCLAMATION_POINT(0xD63358,0xD63358+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63358+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63358+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM2(0xD6335C,0xD6335C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6335C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6335C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM3(0xD63360,0xD63360+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63360+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63360+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM4(0xD63364,0xD63364+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63364+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63364+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
RAINBOW_MAGIC(0xD63368,0xD63368+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63368+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63368+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM5(0xD6336C,0xD6336C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6336C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6336C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM6(0xD63370,0xD63370+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63370+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63370+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM7(0xD63374,0xD63374+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63374+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63374+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM8(0xD63378,0xD63378+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63378+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63378+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM9(0xD6337C,0xD6337C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6337C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6337C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM10(0xD63380,0xD63380+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63380+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63380+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM11(0xD63384,0xD63384+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63384+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63384+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM12(0xD63388,0xD63388+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63388+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63388+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM13(0xD6338C,0xD6338C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6338C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6338C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
UNKNOWN_ITEM14(0xD63390,0xD63390+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63390+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63390+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
/*DLC_ITEM1(0xD63394,0xD63394+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851),
|
||||
DLC_ITEM2(0xD63398,0xD63398+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851),*/
|
||||
BUNNY_CLOVER(0xD6339C,0xD6339C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0x12D887C+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12D886C+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
FAIRYS_FLUTE(0x1679FE4,0x12D8874+OffsetHelper.KEY_ITEM_OFFSET_V185_TO_V1851,0x12D8884+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12D8874+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190,0x1676F64,0),
|
||||
BUNNY_MEMORIES(0x1679FE8,0x12D7878,0x12D8888+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12D8888-0x10+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190,0x1676F68,0),
|
||||
WIND_BLESSING(0x1679FE0,0x12D7870,0x12D8880+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12D8880-0x10+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190,0x1676F60,0),
|
||||
DLC_ITEM4(0xD633A0,0xD633A0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633A0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633A0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_HEALTH_PLUS(0xD633AC,0xD633AC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633AC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633AC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_HEALTH_SURGE(0xD633B0,0xD633B0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633B0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633B0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_MANA_PLUS(0xD633B4,0xD633B4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633B4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633B4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_MANA_SURGE(0xD633B8,0xD633B8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633B8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633B8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_CRISIS_BOOST(0xD633BC,0xD633BC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633BC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633BC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_ATK_GROW(0xD633C0,0xD633C0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633C0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633C0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_DEF_GROW(0xD633C4,0xD633C4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633C4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633C4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_ATK_TRADE(0xD633C8,0xD633C8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633C8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633C8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_DEF_TRADE(0xD633CC,0xD633CC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633CC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633CC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_ARM_STRENGTH(0xD633D0,0xD633D0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633D0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633D0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_CARROT_BOOST(0xD633D4,0xD633D4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633D4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633D4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_WEAKEN(0xD633D8,0xD633D8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633D8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633D8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_SELF_DEFENSE(0xD633DC,0xD633DC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633DC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633DC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_ARMORED(0xD633E0,0xD633E0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633E0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633E0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_LUCKY_SEVEN(0xD633E4,0xD633E4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633E4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633E4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_HEX_CANCEL(0xD633E8,0xD633E8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633E8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633E8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_PURE_LOVE(0xD633EC,0xD633EC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633EC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633EC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_TOXIC_STRIKE(0xD633F0,0xD633F0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633F0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633F0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_FRAME_CANCEL(0xD633F4,0xD633F4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633F4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633F4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_HEALTH_WAGER(0xD633F8,0xD633F8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633F8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633F8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_MANA_WAGER(0xD633FC,0xD633FC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633FC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633FC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_STAMINA_PLUS(0xD63400,0xD63400+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63400+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63400+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_BLESSED(0xD63404,0xD63404+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63404+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63404+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_HITBOX_DOWN(0xD63408,0xD63408+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63408+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63408+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_CASHBACK(0xD6340C,0xD6340C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6340C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6340C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_SURVIVAL(0xD63410,0xD63410+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63410+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63410+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_TOP_FORM(0xD63414,0xD63414+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63414+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63414+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_TOUGH_SKIN(0xD63418,0xD63418+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63418+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63418+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_ERINA_BADGE(0xD6341C,0xD6341C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6341C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6341C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_RIBBON_BADGE(0xD63420,0xD63420+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63420+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63420+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_AUTO_TRIGGER(0xD63424,0xD63424+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63424+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63424+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BADGE_LILITHS_GIFT(0xD63428,0xD63428+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63428+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63428+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
|
||||
HEALTHUP_START(0xD6342C,0xD6342C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6342C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6342C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
HEALTHUP_END(0xD63528,0xD63528+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63528+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63528+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
ATTACKUP_START(0xD6352C,0xD6352C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6352C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6352C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
ATTACKUP_END(0xD63628,0xD63628+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63628+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63628+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
MANAUP_START(0xD6362C,0xD6362C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6362C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6362C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
MANAUP_END(0xD63728,0xD63728+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63728+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63728+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
REGENUP_START(0xD6372C,0xD6372C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6372C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6372C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
REGENUP_END(0xD63828,0xD63828+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63828+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63828+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
PACKUP_START(0xD6382C,0xD6382C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6382C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6382C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
PACKUP_END(0xD63928,0xD63928+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63928+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63928+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
BUNNY_CLOVER(0xD6339C,0xD6339C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0x12D887C+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12D886C+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190),
|
||||
FAIRYS_FLUTE(0,0x12D8874+OffsetHelper.KEY_ITEM_OFFSET_V185_TO_V1851,0x12D8884+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12D8874+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190),
|
||||
BUNNY_MEMORIES(0,0x12D7878,0x12D8888+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12D8888-0x10+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190),
|
||||
WIND_BLESSING(0,0x12D7870,0x12D8880+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x12D8880-0x10+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190),
|
||||
DLC_ITEM4(0xD633A0,0xD633A0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633A0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633A0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_HEALTH_PLUS(0xD633AC,0xD633AC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633AC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633AC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_HEALTH_SURGE(0xD633B0,0xD633B0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633B0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633B0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_MANA_PLUS(0xD633B4,0xD633B4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633B4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633B4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_MANA_SURGE(0xD633B8,0xD633B8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633B8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633B8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_CRISIS_BOOST(0xD633BC,0xD633BC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633BC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633BC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_ATK_GROW(0xD633C0,0xD633C0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633C0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633C0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_DEF_GROW(0xD633C4,0xD633C4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633C4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633C4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_ATK_TRADE(0xD633C8,0xD633C8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633C8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633C8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_DEF_TRADE(0xD633CC,0xD633CC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633CC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633CC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_ARM_STRENGTH(0xD633D0,0xD633D0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633D0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633D0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_CARROT_BOOST(0xD633D4,0xD633D4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633D4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633D4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_WEAKEN(0xD633D8,0xD633D8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633D8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633D8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_SELF_DEFENSE(0xD633DC,0xD633DC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633DC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633DC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_ARMORED(0xD633E0,0xD633E0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633E0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633E0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_LUCKY_SEVEN(0xD633E4,0xD633E4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633E4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633E4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_HEX_CANCEL(0xD633E8,0xD633E8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633E8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633E8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_PURE_LOVE(0xD633EC,0xD633EC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633EC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633EC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_TOXIC_STRIKE(0xD633F0,0xD633F0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633F0+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633F0+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_FRAME_CANCEL(0xD633F4,0xD633F4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633F4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633F4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_HEALTH_WAGER(0xD633F8,0xD633F8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633F8+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633F8+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_MANA_WAGER(0xD633FC,0xD633FC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD633FC+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD633FC+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_STAMINA_PLUS(0xD63400,0xD63400+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63400+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63400+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_BLESSED(0xD63404,0xD63404+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63404+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63404+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_HITBOX_DOWN(0xD63408,0xD63408+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63408+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63408+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_CASHBACK(0xD6340C,0xD6340C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6340C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6340C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_SURVIVAL(0xD63410,0xD63410+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63410+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63410+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_TOP_FORM(0xD63414,0xD63414+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63414+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63414+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_TOUGH_SKIN(0xD63418,0xD63418+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63418+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63418+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_ERINA_BADGE(0xD6341C,0xD6341C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD6341C+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD6341C+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_RIBBON_BADGE(0xD63420,0xD63420+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63420+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63420+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_AUTO_TRIGGER(0xD63424,0xD63424+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63424+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63424+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
BADGE_LILITHS_GIFT(0xD63428,0xD63428+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD63428+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD63428+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
//13413E8
|
||||
|
||||
ITEM_PERCENT(0x16E8080,0x13413E8,0x1342408+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x1366408,0x16E4900,0), //Float
|
||||
MAP_PERCENT(0x16E807C,0x13413E4,0x1342404+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x1366404,0x16E48FC,0), //Float
|
||||
RAINBOW_EGG_COUNT(0xD65FD4,0xD65FD4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD65FD4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD65FD4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||
PAUSED(0x1038D88,0xC969A0,0xC979A0,0xCBB9AC,0x1036D88,0),
|
||||
TITLE_SCREEN(0x16E7EFC,0,0,0,0,0), //0 = Title Screen, 255 = Anywhere else
|
||||
|
||||
//INTERFACE_GRAPHICS_CONTROLLER(0x16B4B8C,0,0,0,0,0), //A location in memory that stores a lot of interface-related items. USeful for determining title screen.
|
||||
|
||||
EVENT_START(0x167A700,0,0,0,0,0),
|
||||
EVENT_END(0x167AB24,0,0,0,0,0),
|
||||
|
||||
MAP_TILE_X(0x13B6D2C,0,0,0,0,0),
|
||||
MAP_TILE_Y(0x16AA130,0,0,0,0,0),
|
||||
MAP_AREA_NUMBER(0xD87FA4,0,0,0,0,0),
|
||||
MAP_REGION_START(0x1672E64,0,0,0,0,0),
|
||||
MAP_REGION_END(0x16774B3,0,0,0,0,0),
|
||||
|
||||
MESSAGE_TIMER(0x16EA4AC,0,0,0,0,0),
|
||||
MESSAGE_CHARACTER(0x16EA47C,0,0,0,0,0),
|
||||
MESSAGE_TEXT(0x17A8DE8,0,0,0,0,0), //This references the 27th location of text. Use 27 for TEXTREF value.
|
||||
MESSAGE_TEXTREF(0x16EA4B0,0,0,0,0,0), //This should be 27 as this allows for MESSAGE_TEXT to be our "custom message" handler.
|
||||
|
||||
MAP_AREA_COLOR(0x84C888,0,0,0,0,0), //See https://github.com/wcko87/rabiribi-map-editing/blob/master/docs/room_colors.md for colors.
|
||||
//Also changes based on music
|
||||
|
||||
BOSS_FIGHT(0x16E7D9C,0,0,0,0,0), //Should be 1 when in a boss fight.
|
||||
AUTOSAVE(0xD34A70,0,0,0,0,0), //1 if autosaving is occurring.
|
||||
|
||||
DARKNESS(0x172C2E8,0,0,0,0,0),
|
||||
PLAYERHEALTH(0x16E90E0,0,0,0,0,0),
|
||||
ITEM_PERCENT(0,0x13413E8,0x1342408+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x1366408),
|
||||
MAP_PERCENT(0,0x13413E4,0x1342404+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x1366404),
|
||||
RAINBOW_EGG_COUNT(0xD65FD4,0xD65FD4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD65FD4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD65FD4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190),
|
||||
PAUSED(0,0xC969A0,0xC979A0,0xCBB9AC),
|
||||
;
|
||||
|
||||
long base_offset;
|
||||
long offset;
|
||||
long offset_v185;
|
||||
long offset_v188;
|
||||
long offset_v190;
|
||||
long offset_v199;
|
||||
long offset_v199t;
|
||||
long latest_offset;
|
||||
|
||||
MemoryOffset(long offset,long offset_v185,long offset_v188,long offset_v190,long offset_v199,long offset_v199t) {
|
||||
this.base_offset=offset;
|
||||
MemoryOffset(long offset,long offset_v185,long offset_v188,long offset_v190) {
|
||||
this.offset=offset;
|
||||
this.offset_v185=offset_v185;
|
||||
this.offset_v188=offset_v188;
|
||||
this.offset_v190=offset_v190;
|
||||
this.offset_v199=offset_v199;
|
||||
this.offset_v199t=offset_v199t;
|
||||
|
||||
//TODO CHANGE THIS IF PUBLIC VERSION CHANGES!
|
||||
this.latest_offset = offset_v199t;
|
||||
}
|
||||
public long getOffset() {
|
||||
return base_offset+latest_offset;
|
||||
this.latest_offset = offset_v190;
|
||||
}
|
||||
|
||||
public long getOriginalOffset() {
|
||||
return base_offset;
|
||||
public long getOffset() {
|
||||
return latest_offset;
|
||||
}
|
||||
|
||||
public long getOffsetV175() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
public long getOffsetV185() {
|
||||
@ -220,6 +190,4 @@ class OffsetHelper{
|
||||
final static long MEMORY_OFFSET_V175_TO_V1881 = KEY_ITEM_OFFSET_V175_TO_V188+MEMORY_OFFSET_V188_TO_V1881;
|
||||
final static long MEMORY_OFFSET_V1881_TO_V190 = 0x24018;
|
||||
final static long MEMORY_OFFSET_V175_TO_V190 = MEMORY_OFFSET_V175_TO_V1881+MEMORY_OFFSET_V1881_TO_V190;
|
||||
final static long KEY_ITEM_OFFSET_V175_TO_V199 = 0x913BC0;
|
||||
final static long KEY_ITEM_OFFSET_V175_TO_V199T = 0x916C40;
|
||||
}
|
@ -3,7 +3,6 @@ package sig.modules;
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics;
|
||||
import java.awt.Point;
|
||||
import java.awt.Rectangle;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.awt.geom.Point2D;
|
||||
import java.awt.geom.Rectangle2D;
|
||||
@ -130,26 +129,6 @@ public class RabiRibiModule extends Module{
|
||||
}, 1000, 1000, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
public static void loadModule() {
|
||||
sigIRC.modules.add(new RabiRibiModule(
|
||||
new Rectangle(sigIRC.rabiribimodule_X,sigIRC.rabiribimodule_Y,sigIRC.rabiribimodule_width,sigIRC.rabiribimodule_height),
|
||||
"Rabi Ribi"
|
||||
));
|
||||
sigIRC.rabiribimodule_enabled=true;
|
||||
sigIRC.config.setBoolean("Module_rabiribi_Enabled", sigIRC.rabiribimodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
public static void unloadModule() {
|
||||
for (int i=0;i<sigIRC.modules.size();i++) {
|
||||
if (sigIRC.modules.get(i) instanceof RabiRibiModule) {
|
||||
sigIRC.modules.remove(sigIRC.modules.get(i));
|
||||
}
|
||||
}
|
||||
sigIRC.rabiribimodule_enabled=false;
|
||||
sigIRC.config.setBoolean("Module_rabiribi_Enabled", sigIRC.rabiribimodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
|
||||
public void ApplyConfigWindowProperties() {
|
||||
sigIRC.rabiribimodule_X=(int)position.getX();
|
||||
sigIRC.rabiribimodule_Y=(int)position.getY();
|
||||
|
@ -113,26 +113,6 @@ public class TouhouMotherModule extends Module implements ActionListener{
|
||||
CheckTouhouMotherClient();
|
||||
}, 5000, 5000, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
public static void loadModule() {
|
||||
sigIRC.modules.add(new TouhouMotherModule(
|
||||
new Rectangle(sigIRC.touhoumothermodule_X,sigIRC.touhoumothermodule_Y,sigIRC.touhoumothermodule_width,sigIRC.touhoumothermodule_height),
|
||||
"Touhou Mother"
|
||||
));
|
||||
sigIRC.touhoumothermodule_enabled=true;
|
||||
sigIRC.config.setBoolean("Module_touhoumother_Enabled", sigIRC.touhoumothermodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
public static void unloadModule() {
|
||||
for (int i=0;i<sigIRC.modules.size();i++) {
|
||||
if (sigIRC.modules.get(i) instanceof TouhouMotherModule) {
|
||||
sigIRC.modules.remove(sigIRC.modules.get(i));
|
||||
}
|
||||
}
|
||||
sigIRC.touhoumothermodule_enabled=false;
|
||||
sigIRC.config.setBoolean("Module_touhoumother_Enabled", sigIRC.touhoumothermodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
|
||||
private void CheckTouhouMotherClient() {
|
||||
List<Integer> pids;
|
||||
|
@ -1,43 +1,45 @@
|
||||
package sig.modules.Twitch;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.DateFormat;
|
||||
|
||||
import com.mb3364.twitch.api.models.User;
|
||||
|
||||
import sig.modules.TwitchModule;
|
||||
import sig.utils.FileUtils;
|
||||
|
||||
public class Announcement {
|
||||
Follower userData;
|
||||
User userData;
|
||||
long twitchID;
|
||||
public Announcement(long twitchID) {
|
||||
String userFilePath = TwitchModule.USERDIR+twitchID;
|
||||
File userFile = new File(userFilePath);
|
||||
if (userFile.exists()) {
|
||||
int i=0;
|
||||
String[] contents = FileUtils.readFromFile(userFilePath);
|
||||
userData = new Follower(twitchID,
|
||||
contents[1],
|
||||
contents[0],
|
||||
contents[2],
|
||||
contents[3],
|
||||
contents[4],
|
||||
contents[5],
|
||||
contents[6]);
|
||||
userData = new User();
|
||||
int i=1;
|
||||
userData.setId(twitchID);
|
||||
userData.setBio(contents[i++]);
|
||||
userData.setDisplayName(contents[i++]);
|
||||
userData.setLogo(contents[i++]);
|
||||
userData.setName(contents[i++]);
|
||||
userData.setType(contents[i++]);
|
||||
} else {
|
||||
System.out.println("WARNING! Could not find user with ID "+twitchID+"!");
|
||||
}
|
||||
this.twitchID=twitchID;
|
||||
}
|
||||
|
||||
public Announcement(Follower data) {
|
||||
public Announcement(User data) {
|
||||
this.userData=data;
|
||||
this.twitchID=data.id;
|
||||
this.twitchID=data.getId();
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return userData.toString();
|
||||
}
|
||||
|
||||
public Follower getUser() {
|
||||
public User getUser() {
|
||||
return userData;
|
||||
}
|
||||
}
|
||||
|
@ -1,47 +0,0 @@
|
||||
package sig.modules.Twitch;
|
||||
|
||||
public class Follower {
|
||||
public long id;
|
||||
public String bio;
|
||||
public String created_at;
|
||||
public String display_name;
|
||||
public String logo_url;
|
||||
public String name;
|
||||
public String type;
|
||||
public String updated_at;
|
||||
Follower(Long id,
|
||||
String bio,
|
||||
String created_at,
|
||||
String display_name,
|
||||
String logo_url,
|
||||
String name,
|
||||
String type,
|
||||
String updated_at) {
|
||||
this.id=id;
|
||||
this.bio = bio;
|
||||
this.created_at = created_at;
|
||||
this.display_name = display_name;
|
||||
this.logo_url = logo_url;
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.updated_at = updated_at;
|
||||
}
|
||||
public Follower(String id,
|
||||
String bio,
|
||||
String created_at,
|
||||
String display_name,
|
||||
String logo_url,
|
||||
String name,
|
||||
String type,
|
||||
String updated_at) {
|
||||
this(Long.parseLong(id),
|
||||
bio,
|
||||
created_at,
|
||||
display_name,
|
||||
logo_url,
|
||||
name,
|
||||
type,
|
||||
updated_at
|
||||
);
|
||||
}
|
||||
}
|
@ -12,8 +12,6 @@ import java.io.IOException;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.text.DateFormat;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
@ -23,15 +21,17 @@ import java.util.List;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.SwingUtilities;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import com.mb3364.twitch.api.handlers.ChannelFollowsResponseHandler;
|
||||
import com.mb3364.twitch.api.handlers.StreamResponseHandler;
|
||||
import com.mb3364.twitch.api.handlers.UserResponseHandler;
|
||||
import com.mb3364.twitch.api.models.ChannelFollow;
|
||||
import com.mb3364.twitch.api.models.Stream;
|
||||
import com.mb3364.twitch.api.models.User;
|
||||
|
||||
import sig.Module;
|
||||
import sig.sigIRC;
|
||||
import sig.modules.Twitch.Announcement;
|
||||
import sig.modules.Twitch.FancyNumber;
|
||||
import sig.modules.Twitch.Follower;
|
||||
import sig.utils.DrawUtils;
|
||||
import sig.utils.FileUtils;
|
||||
import sig.utils.SoundUtils;
|
||||
@ -51,19 +51,17 @@ public class TwitchModule extends Module{
|
||||
int lastFollowerCheck=300;
|
||||
final static int FOLLOWERANNOUNCEMENTTIME = 300;
|
||||
int lastFollowerAnnouncement=0;
|
||||
//User announcedFollowerUser;
|
||||
User announcedFollowerUser;
|
||||
String[] followersounds = new String[]{"Glaceon_cry.wav"};
|
||||
FancyNumber viewers_numb;
|
||||
FancyNumber followers_numb;
|
||||
FancyNumber views_numb;
|
||||
ZonedDateTime uptime;
|
||||
Date uptime = Calendar.getInstance().getTime();
|
||||
String currentlyPlaying=" ";
|
||||
final public static int ARROWTIMER = 3000;
|
||||
public static BufferedImage UPARROWIMAGE;
|
||||
public static BufferedImage DOWNARROWIMAGE;
|
||||
public static BufferedImage UPTIMEIMAGE;
|
||||
public static long myTwitchChannelID = 0;
|
||||
public int previous_xoffset = 0;
|
||||
|
||||
public TwitchModule(Rectangle2D bounds, String moduleName) {
|
||||
this(bounds,moduleName,true);
|
||||
@ -83,11 +81,6 @@ public class TwitchModule extends Module{
|
||||
if (firstTime) {
|
||||
CreateFollowerQueueLog();
|
||||
}
|
||||
ClearFollowerAnnouncerQueue();
|
||||
|
||||
|
||||
//myTwitchChannelID = getMyChannelID();
|
||||
|
||||
/*manager.streams().get("theduckishot", new StreamResponseHandler() {
|
||||
|
||||
@Override
|
||||
@ -135,26 +128,6 @@ public class TwitchModule extends Module{
|
||||
});*/
|
||||
}
|
||||
|
||||
public static void loadModule() {
|
||||
sigIRC.modules.add(new TwitchModule(
|
||||
new Rectangle(sigIRC.twitchmodule_X,sigIRC.twitchmodule_Y,sigIRC.twitchmodule_width,sigIRC.twitchmodule_height),
|
||||
"Twitch"
|
||||
));
|
||||
sigIRC.twitchmodule_enabled=true;
|
||||
sigIRC.config.setBoolean("Module_twitch_Enabled", sigIRC.twitchmodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
public static void unloadModule() {
|
||||
for (int i=0;i<sigIRC.modules.size();i++) {
|
||||
if (sigIRC.modules.get(i) instanceof TwitchModule) {
|
||||
sigIRC.modules.remove(sigIRC.modules.get(i));
|
||||
}
|
||||
}
|
||||
sigIRC.twitchmodule_enabled=false;
|
||||
sigIRC.config.setBoolean("Module_twitch_Enabled", sigIRC.twitchmodule_enabled);
|
||||
sigIRC.config.saveProperties();
|
||||
}
|
||||
|
||||
private void InitializeFollowerSounds() {
|
||||
File follower_sounds_dir = new File(SOUNDSDIR);
|
||||
String[] files = filterFiles(follower_sounds_dir.list());
|
||||
@ -184,65 +157,15 @@ public class TwitchModule extends Module{
|
||||
public void run() {
|
||||
if (lastFollowerCheck--<=0) {
|
||||
lastFollowerCheck = FOLLOWERCHECKTIMER;
|
||||
//getFollowers(false);
|
||||
try {
|
||||
GetFollowerAndStreamData();
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
getFollowers(false);
|
||||
popFollowerFromQueue();
|
||||
try {
|
||||
//System.out.println("Checking Followers...");
|
||||
JSONObject FollowerData = GetFollowerAndStreamData();
|
||||
followers_numb.updateValue(FollowerData.getInt("total"));
|
||||
//views_numb.updateValue(FollowerData.get);
|
||||
} catch (JSONException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// isStreamOnline(true);
|
||||
isStreamOnline(true);
|
||||
}
|
||||
if (lastFollowerAnnouncement>0) {
|
||||
lastFollowerAnnouncement--;
|
||||
}
|
||||
//System.out.println(lastFollowerCheck);
|
||||
}
|
||||
|
||||
|
||||
public JSONObject GetFollowerAndStreamData() throws IOException {
|
||||
FileUtils.downloadFileFromUrl("https://api.twitch.tv/helix/streams?user_id="+sigIRC.channel_id, "stream_info",true);
|
||||
JSONObject streamInfo = FileUtils.readJsonFromFile("stream_info");
|
||||
JSONArray streamData = streamInfo.getJSONArray("data");
|
||||
streamOnline = streamData.length()!=0;
|
||||
if (streamOnline) {
|
||||
JSONObject stream = streamData.getJSONObject(0);
|
||||
DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter
|
||||
.ofPattern("uuuu-MM-dd'T'HH:mm:ssz");
|
||||
uptime = ZonedDateTime.parse(stream.getString("started_at"),DATE_TIME_FORMATTER);
|
||||
viewers_numb.updateValue(stream.getInt("viewer_count"));
|
||||
//System.out.println(stream.getString("game_id"));
|
||||
if (stream.getString("game_id").length()>0 && !stream.getString("game_id").equalsIgnoreCase("null")) {
|
||||
int gameID = Integer.parseInt(stream.getString("game_id"));
|
||||
FileUtils.downloadFileFromUrl("https://api.twitch.tv/helix/games?id="+gameID, "game_info",true);
|
||||
JSONObject gameData = FileUtils.readJsonFromFile("game_info");
|
||||
currentlyPlaying = gameData.getJSONArray("data").getJSONObject(0).getString("name");
|
||||
} else {
|
||||
currentlyPlaying = "";
|
||||
}
|
||||
}
|
||||
FileUtils.downloadFileFromUrl("https://api.twitch.tv/helix/users/follows?to_id="+sigIRC.channel_id, "temp_followers",true);
|
||||
JSONObject FollowerData = FileUtils.readJsonFromFile("temp_followers");
|
||||
JSONArray data = FollowerData.getJSONArray("data");
|
||||
FileUtils.downloadFileFromUrl("https://api.twitch.tv/helix/users?id="+sigIRC.channel_id, "channel_info",true);
|
||||
JSONObject channelData = FileUtils.readJsonFromFile("channel_info").getJSONArray("data").getJSONObject(0);
|
||||
views_numb.updateValue(channelData.getInt("view_count"));
|
||||
for (int i=0;i<data.length();i++) {
|
||||
JSONObject user = data.getJSONObject(i);
|
||||
addFollower(user.getString("from_name"),user.getLong("from_id"),streamOnline,false);
|
||||
}
|
||||
return FollowerData;
|
||||
}
|
||||
|
||||
public void ApplyConfigWindowProperties() {
|
||||
sigIRC.twitchmodule_X=(int)position.getX();
|
||||
@ -253,22 +176,20 @@ public class TwitchModule extends Module{
|
||||
|
||||
private void popFollowerFromQueue() {
|
||||
if (sigIRC.testMode) {
|
||||
Follower user = new Follower("0","I am an awesome test subject.",
|
||||
new Date().toString(),
|
||||
"Test User"+((int)Math.random()*100000),
|
||||
"http://45.33.13.215:8080/sigIRCv2/sigIRC/sigIRCicon.png",
|
||||
"Test User",
|
||||
"",
|
||||
new Date().toString());
|
||||
User user = new User();
|
||||
user.setDisplayName("Test User"+((int)Math.random()*100000));
|
||||
user.setBio("I am an awesome test subject.");
|
||||
user.setName(user.getDisplayName());
|
||||
user.setLogo("http://45.33.13.215/sigIRCv2/sigIRC/sigIRCicon.png");
|
||||
DisplayFollowerAnnouncement(user,true);
|
||||
} else
|
||||
if (follower_queue.size()>0) {
|
||||
if (streamOnline) {
|
||||
if (isStreamOnline()) {
|
||||
//We have a follower to announce!
|
||||
Announcement a = follower_queue.remove(0);
|
||||
Follower user = a.getUser();
|
||||
if (user.display_name.length()>0 &&
|
||||
!user.display_name.contains("?")) {
|
||||
User user = a.getUser();
|
||||
if (user.getDisplayName().length()>0 &&
|
||||
!user.getDisplayName().contains("?")) {
|
||||
DisplayFollowerAnnouncement(user,true);
|
||||
} else {
|
||||
DisplayFollowerAnnouncement(user,false);
|
||||
@ -286,25 +207,22 @@ public class TwitchModule extends Module{
|
||||
|
||||
private void StoreRemainingFollowers() {
|
||||
for (Announcement a : follower_queue) {
|
||||
FileUtils.logToFile(Long.toString(a.getUser().id), FOLLOWERQUEUEFILE);
|
||||
FileUtils.logToFile(Long.toString(a.getUser().getId()), FOLLOWERQUEUEFILE);
|
||||
}
|
||||
follower_queue.clear();
|
||||
}
|
||||
|
||||
|
||||
public static Follower announcedFollowerUser;
|
||||
|
||||
private void DisplayFollowerAnnouncement(Follower user, boolean useNickname) {
|
||||
private void DisplayFollowerAnnouncement(User user, boolean useNickname) {
|
||||
lastFollowerAnnouncement = FOLLOWERANNOUNCEMENTTIME;
|
||||
if (!useNickname) {
|
||||
user.display_name=user.name;
|
||||
user.setDisplayName(user.getName());
|
||||
}
|
||||
announcedFollowerUser = user;
|
||||
String followerAnnouncement = user.display_name+" is now following the stream!";
|
||||
String userlogo = USERDIR+user.id+"_logo";
|
||||
if (user.logo_url!=null && !user.logo_url.equalsIgnoreCase("null")) {
|
||||
String followerAnnouncement = user.getDisplayName()+" is now following the stream!";
|
||||
String userlogo = USERDIR+user.getId()+"_logo";
|
||||
if (user.getLogo()!=null && !user.getLogo().equalsIgnoreCase("null")) {
|
||||
try {
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL(user.logo_url),new File(userlogo));
|
||||
org.apache.commons.io.FileUtils.copyURLToFile(new URL(user.getLogo()),new File(userlogo));
|
||||
File logo = new File(userlogo);
|
||||
if (logo.exists()) {
|
||||
followerUserLogo = ImageIO.read(logo);
|
||||
@ -348,7 +266,31 @@ public class TwitchModule extends Module{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void getFollowers(boolean firstTime) {
|
||||
sigIRC.manager.channels().getFollows(TextUtils.getActualChannelName(), new ChannelFollowsResponseHandler() {
|
||||
@Override
|
||||
public void onSuccess(int total, java.util.List<ChannelFollow> follows) {
|
||||
//System.out.println("Successfully found followers for channel "+sigIRC.channel+". Total: "+total);
|
||||
//console = "Last Follower: "+follows.get(0).getUser().getDisplayName();
|
||||
for (ChannelFollow f : follows) {
|
||||
addFollower(f,isStreamOnline(),firstTime);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable arg0) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(int arg0, String arg1, String arg2) {
|
||||
System.out.println(arg0+","+arg1+","+arg2);
|
||||
}
|
||||
}
|
||||
);
|
||||
if (isStreamOnline()) {/*System.out.println("Stream is Online...Clearing Follower Queue.");*/ClearFollowerAnnouncerQueue();}
|
||||
}
|
||||
|
||||
private void ClearFollowerAnnouncerQueue() {
|
||||
String[] contents = FileUtils.readFromFile(FOLLOWERQUEUEFILE);
|
||||
//System.out.println("Contents: "+Arrays.toString(contents));
|
||||
@ -357,59 +299,107 @@ public class TwitchModule extends Module{
|
||||
if (s.length()>0) {
|
||||
int twitchID = Integer.parseInt(s);
|
||||
AddFollowerToQueue(twitchID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void addFollower(String username, long id, boolean streamOnline, boolean silent) {
|
||||
String filename = USERDIR + Long.toString(id);
|
||||
File userProfile = new File(filename);
|
||||
if (!userProfile.exists()) {
|
||||
CreateUserProfile(username, id, filename, userProfile);
|
||||
if (!silent) { //If we got in here, this isn't the initial follower setup, so we are good to go with announcing these followers.
|
||||
if (!streamOnline) {
|
||||
//Save their ID to a queue.
|
||||
FileUtils.logToFile(Long.toString(id), FOLLOWERQUEUEFILE);
|
||||
} else {
|
||||
//Announce it now.
|
||||
//System.out.println("Stream is online...");
|
||||
AnnounceFollower(username,id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
private boolean isStreamOnline() {
|
||||
return isStreamOnline(false);
|
||||
}
|
||||
|
||||
private void CreateUserProfile(String username, long id, String filename, File userProfile) {
|
||||
private boolean isStreamOnline(boolean update) {
|
||||
if (update) {
|
||||
sigIRC.manager.streams().get(TextUtils.getActualChannelName(), new StreamResponseHandler() {
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable arg0) {
|
||||
TwitchModule.streamOnline=false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(int arg0, String arg1, String arg2) {
|
||||
System.out.println(arg0+","+arg1+","+arg2);
|
||||
TwitchModule.streamOnline=false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSuccess(Stream arg0) {
|
||||
//System.out.println("Stream data is available! "+arg0);
|
||||
if (arg0==null) {
|
||||
TwitchModule.streamOnline=false;
|
||||
} else {
|
||||
TwitchModule.streamOnline=true;
|
||||
UpdateAllStreamStatistics(arg0);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateAllStreamStatistics(Stream data) {
|
||||
if (data!=null) {
|
||||
if (data.getGame()!=null && data.getGame().length()>0) {
|
||||
currentlyPlaying = data.getGame();
|
||||
}
|
||||
if (data.getCreatedAt()!=null) {
|
||||
uptime = data.getCreatedAt();
|
||||
}
|
||||
viewers_numb.updateValue(data.getViewers());
|
||||
views_numb.updateValue((int)data.getChannel().getViews());
|
||||
followers_numb.updateValue(data.getChannel().getFollowers());
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
return TwitchModule.streamOnline;
|
||||
} else {
|
||||
return TwitchModule.streamOnline;
|
||||
}
|
||||
//TwitchModule.streamOnline=true;
|
||||
//return true;
|
||||
}
|
||||
|
||||
protected void addFollower(ChannelFollow f, boolean streamOnline, boolean silent) {
|
||||
String filename = USERDIR+f.getUser().getId();
|
||||
File userProfile = new File(filename);
|
||||
if (!userProfile.exists()) {
|
||||
if (!silent) { //If we got in here, this isn't the initial follower setup, so we are good to go with announcing these followers.
|
||||
if (!streamOnline) {
|
||||
//Save their ID to a queue.
|
||||
FileUtils.logToFile(Long.toString(f.getUser().getId()), FOLLOWERQUEUEFILE);
|
||||
} else {
|
||||
//Announce it now.
|
||||
//System.out.println("Stream is online...");
|
||||
AnnounceFollower(f);
|
||||
}
|
||||
}
|
||||
CreateUserProfile(f, filename, userProfile);
|
||||
}
|
||||
}
|
||||
|
||||
private void CreateUserProfile(ChannelFollow f, String filename, File userProfile) {
|
||||
try {
|
||||
FileUtils.downloadFileFromUrl("https://api.twitch.tv/helix/users?id="+id, "user_info",true);
|
||||
System.out.println("File data: "+Arrays.toString(FileUtils.readFromFile("user_info")));
|
||||
JSONObject userdata = FileUtils.readJsonFromFile("user_info").getJSONArray("data").getJSONObject(0);
|
||||
userProfile.createNewFile();
|
||||
System.out.println("Profile Image URL: "+userdata.getString("profile_image_url"));
|
||||
FileUtils.logToFile(new Date().toString(), filename);
|
||||
FileUtils.logToFile(userdata.getString("description"), filename);
|
||||
FileUtils.logToFile(username, filename);
|
||||
FileUtils.logToFile(userdata.getString("profile_image_url"), filename);
|
||||
FileUtils.logToFile(userdata.getString("login"), filename);
|
||||
FileUtils.logToFile(userdata.getString("type"), filename);
|
||||
FileUtils.logToFile(new Date().toString(), filename);
|
||||
FileUtils.logToFile(DateFormat.getDateInstance().format(f.getCreatedAt()), filename);
|
||||
FileUtils.logToFile(f.getUser().getBio(), filename);
|
||||
FileUtils.logToFile(f.getUser().getDisplayName(), filename);
|
||||
FileUtils.logToFile(f.getUser().getLogo(), filename);
|
||||
FileUtils.logToFile(f.getUser().getName(), filename);
|
||||
FileUtils.logToFile(f.getUser().getType(), filename);
|
||||
FileUtils.logToFile(DateFormat.getDateInstance().format(f.getUser().getUpdatedAt()), filename);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void AnnounceFollower(String name,long id) {
|
||||
System.out.println("Thanks for following "+name+"!");
|
||||
AddFollowerToQueue(id);
|
||||
private void AnnounceFollower(ChannelFollow f) {
|
||||
//System.out.println("Thanks for following "+f.getUser().getDisplayName()+"!");
|
||||
AddFollowerToQueue(f.getUser());
|
||||
}
|
||||
|
||||
private void AddFollowerToQueue(long id) {
|
||||
private void AddFollowerToQueue(int id) {
|
||||
follower_queue.add(new Announcement(id));
|
||||
}
|
||||
|
||||
// private void AddFollowerToQueue(User user) {
|
||||
// follower_queue.add(new Announcement(user));
|
||||
// }
|
||||
private void AddFollowerToQueue(User user) {
|
||||
follower_queue.add(new Announcement(user));
|
||||
}
|
||||
|
||||
private boolean CreateUserFolder() {
|
||||
File userDir = new File(USERDIR);
|
||||
@ -443,7 +433,6 @@ public class TwitchModule extends Module{
|
||||
g.fillPolygon(new int[]{(int)position.getX(),(int)(position.getX()+position.getWidth()),(int)(position.getX()+position.getWidth()),(int)position.getX()},
|
||||
new int[]{yoffset-4,yoffset-4,yoffset+16,yoffset+16},
|
||||
4);
|
||||
previous_xoffset = xoffset;
|
||||
if (currentlyPlaying!=null && currentlyPlaying.length()>0) {
|
||||
DrawUtils.drawOutlineText(g, sigIRC.panel.userFont, xoffset, yoffset+TextUtils.calculateStringBoundsFont(currentlyPlaying, sigIRC.panel.userFont).getHeight()/2+3, 2, g.getColor(), new Color(195,195,195), currentlyPlaying);xoffset+=TextUtils.calculateStringBoundsFont(currentlyPlaying, sigIRC.panel.userFont).getWidth()+16;
|
||||
}
|
||||
@ -457,7 +446,7 @@ public class TwitchModule extends Module{
|
||||
int xoffset = 0;
|
||||
int yoffset = 0;
|
||||
g.drawImage(UPTIMEIMAGE, x+xoffset, y+yoffset-2, sigIRC.panel);xoffset+=UPTIMEIMAGE.getWidth()+4;
|
||||
String timediff = TimeUtils.GetTimeDifferenceFromCurrentDate(Date.from(uptime.toInstant()));
|
||||
String timediff = TimeUtils.GetTimeDifferenceFromCurrentDate(uptime);
|
||||
if (timediff.length()>0) {
|
||||
DrawUtils.drawTextFont(g, sigIRC.panel.userFont, x+xoffset, y+yoffset+TextUtils.calculateStringBoundsFont(timediff, sigIRC.panel.userFont).getHeight()/2+3,new Color(184,181,192),timediff);xoffset+=TextUtils.calculateStringBoundsFont(timediff, sigIRC.panel.userFont).getWidth()+12;
|
||||
}
|
||||
@ -489,24 +478,23 @@ public class TwitchModule extends Module{
|
||||
//g.drawImage(follower_img, (int)bounds.getX(), (int)bounds.getY(), , , sigIRC.panel)
|
||||
g.drawImage(follower_img, (int)position.getX(), (int)position.getY()+canvasYOffset, (int)position.getX()+follower_img.getWidth()+canvasXOffset, (int)position.getY()+follower_img.getHeight(),
|
||||
-xAlteration, 0, follower_img.getWidth(), follower_img.getHeight()-yAlteration, sigIRC.panel);
|
||||
Rectangle2D usernameTextsize = TextUtils.calculateStringBoundsFont(announcedFollowerUser.display_name, sigIRC.panel.programFont);
|
||||
Rectangle2D usernameTextsize = TextUtils.calculateStringBoundsFont(announcedFollowerUser.getDisplayName(), sigIRC.panel.programFont);
|
||||
int textY = (int)position.getY()+sigIRC.twitchmodule_followerText_Y+yAlteration;
|
||||
int textX = (int)position.getX()+sigIRC.twitchmodule_followerText_centerX+xAlteration;
|
||||
if (textY<position.getY()+position.getHeight() && textX+usernameTextsize.getWidth()>position.getX()) {
|
||||
//DrawUtils.drawCenteredText(g, sigIRC.panel.programFont, (int)position.getX()+sigIRC.twitchmodule_followerText_centerX+xAlteration, (int)position.getY()+sigIRC.twitchmodule_followerText_Y+yAlteration, Color.BLACK, announcedFollowerUser.display_name);
|
||||
DrawUtils.drawCenteredOutlineText(g, sigIRC.panel.programFont, (int)position.getX()+sigIRC.twitchmodule_followerText_centerX+xAlteration, (int)position.getY()+sigIRC.twitchmodule_followerText_Y+yAlteration, sigIRC.twitchmodule_newfollowerNameShadowSize, TextUtils.convertStringToColor(sigIRC.twitchmodule_newfollowerNameTextColor), TextUtils.convertStringToColor(sigIRC.twitchmodule_newfollowerNameShadowColor), announcedFollowerUser.display_name);
|
||||
DrawUtils.drawCenteredText(g, sigIRC.panel.programFont, (int)position.getX()+sigIRC.twitchmodule_followerText_centerX+xAlteration, (int)position.getY()+sigIRC.twitchmodule_followerText_Y+yAlteration, Color.BLACK, announcedFollowerUser.getDisplayName());
|
||||
}
|
||||
if (announcedFollowerUser.bio!=null && !announcedFollowerUser.bio.equalsIgnoreCase("null")) {
|
||||
if (announcedFollowerUser.getBio()!=null && !announcedFollowerUser.getBio().equalsIgnoreCase("null")) {
|
||||
if (followerUserLogo!=null) {
|
||||
final int image_size = sigIRC.twitchmodule_newfollowerImgLogoSize;
|
||||
int img_startx = (int)(position.getX()+position.getWidth()-ticksPassed*3-(image_size+4));
|
||||
int img_starty = (int)(position.getY()+follower_img.getHeight()+2-image_size/2);
|
||||
g.setColor(Color.BLACK);
|
||||
g.drawRect(img_startx, img_starty, image_size, image_size);
|
||||
//g.setColor(Color.BLACK);
|
||||
//g.drawRect(img_startx, img_starty, image_size, image_size);
|
||||
g.drawImage(followerUserLogo, img_startx, img_starty, img_startx+image_size, img_starty+image_size, 0, 0, followerUserLogo.getWidth(), followerUserLogo.getHeight(), TextUtils.convertStringToColor(sigIRC.twitchmodule_newfollowerImgBackgroundColor), sigIRC.panel);
|
||||
}
|
||||
if (announcedFollowerUser.bio!=null && announcedFollowerUser.bio.length()>0) {
|
||||
DrawUtils.drawOutlineText(g, sigIRC.panel.userFont, position.getX()+position.getWidth()-ticksPassed*3, position.getY()+follower_img.getHeight()+2+8, 2, TextUtils.convertStringToColor(sigIRC.twitchmodule_newfollowerTextColor), TextUtils.convertStringToColor(sigIRC.twitchmodule_newfollowerShadowTextColor), announcedFollowerUser.bio);
|
||||
if (announcedFollowerUser.getBio()!=null && announcedFollowerUser.getBio().length()>0) {
|
||||
DrawUtils.drawOutlineText(g, sigIRC.panel.userFont, position.getX()+position.getWidth()-ticksPassed*3, position.getY()+follower_img.getHeight()+2+8, 2, TextUtils.convertStringToColor(sigIRC.twitchmodule_newfollowerTextColor), TextUtils.convertStringToColor(sigIRC.twitchmodule_newfollowerShadowTextColor), announcedFollowerUser.getBio());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,12 @@ import javax.swing.Timer;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import com.mb3364.twitch.api.Twitch;
|
||||
import com.mb3364.twitch.api.handlers.ChannelResponseHandler;
|
||||
import com.mb3364.twitch.api.handlers.StreamResponseHandler;
|
||||
import com.mb3364.twitch.api.models.Channel;
|
||||
import com.mb3364.twitch.api.models.Stream;
|
||||
import com.sun.jna.Memory;
|
||||
import com.sun.jna.Native;
|
||||
import com.sun.jna.Pointer;
|
||||
@ -26,7 +32,6 @@ import sig.modules.TouhouMotherModule;
|
||||
import sig.modules.TwitchModule;
|
||||
import sig.modules.ChatLog.ChatLogMessage;
|
||||
import sig.modules.ChatLog.ChatLogTwitchEmote;
|
||||
import sig.modules.Controller.ControlConfigurationWindow;
|
||||
import sig.modules.utils.MyKernel32;
|
||||
import sig.modules.utils.PsapiTools;
|
||||
import sig.utils.FileUtils;
|
||||
@ -53,14 +58,12 @@ import java.io.OutputStreamWriter;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.Socket;
|
||||
import java.net.SocketException;
|
||||
import java.net.URL;
|
||||
import java.net.UnknownHostException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.swing.JFrame;
|
||||
@ -95,10 +98,9 @@ public class sigIRC{
|
||||
static int dingThreshold;
|
||||
static Color backgroundcol;
|
||||
public static BackgroundColorButton button;
|
||||
public static ModuleSelectorButton modulebutton;
|
||||
public static JFrame window;
|
||||
static boolean overlayMode=false;
|
||||
public static boolean showWindowControls=false;
|
||||
static boolean showWindowControls=false;
|
||||
static int windowX=0;
|
||||
static int windowY=0;
|
||||
static int windowWidth=0;
|
||||
@ -112,8 +114,8 @@ public class sigIRC{
|
||||
static Integer messageFontSize = 24;
|
||||
static Integer usernameFontSize = 16;
|
||||
static Integer touhoumotherConsoleFontSize = 12;
|
||||
public static boolean touhoumothermodule_enabled=false;
|
||||
public static boolean twitchmodule_enabled=true;
|
||||
static boolean touhoumothermodule_enabled=false;
|
||||
static boolean twitchmodule_enabled=true;
|
||||
public static boolean chatlogmodule_enabled=true;
|
||||
static boolean downloadsComplete=false;
|
||||
static boolean hardwareAcceleration=true;
|
||||
@ -163,9 +165,6 @@ public class sigIRC{
|
||||
public static String twitchmodule_newfollowerImgBackgroundColor="90,90,90";
|
||||
public static String twitchmodule_newfollowerShadowTextColor="26,90,150";
|
||||
public static String twitchmodule_newfollowerTextColor="255,255,255";
|
||||
public static String twitchmodule_newfollowerNameTextColor="0,0,0";
|
||||
public static String twitchmodule_newfollowerNameShadowColor="255,255,180";
|
||||
public static int twitchmodule_newfollowerNameShadowSize=2;
|
||||
public static String chatlogmodule_backgroundColor="195,195,195,255";
|
||||
public static int twitchmodule_newfollowerImgLogoSize=32;
|
||||
public static boolean testMode=false;
|
||||
@ -175,14 +174,8 @@ public class sigIRC{
|
||||
public static int lastSubEmoteUpdate = -1;
|
||||
public static boolean autoUpdateProgram = true;
|
||||
public static Image programIcon;
|
||||
//final public static int MAX_CONNECTION_RETRIES = 100;
|
||||
public static String CLIENTID = "";
|
||||
final public static int MAX_CONNECTION_RETRIES = 100;
|
||||
public static int retryCounter = 0;
|
||||
public static boolean newUpdateIsAvailable = false;
|
||||
public static long lastRetryTime = 0l;
|
||||
public static long lastRetryMessage = 0l;
|
||||
public static int retryCount = 0;
|
||||
public static List<ModuleLinker> moduleList;
|
||||
|
||||
public static int subchannelCount = 0;
|
||||
public static HashMap<Long,String> subchannelIds = new HashMap<Long,String>();
|
||||
@ -194,40 +187,14 @@ public class sigIRC{
|
||||
static int lastWindowX = 0;
|
||||
static int lastWindowY = 0;
|
||||
public static String longString = "10988989d";
|
||||
public static ModuleSelector moduleSelectorWindow;
|
||||
public static String oauth;
|
||||
public static Twitch manager = new Twitch();
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
String[] filedata = FileUtils.readFromFile(BASEDIR+"sigIRC/oauthToken.txt");
|
||||
|
||||
oauth = filedata[0];
|
||||
//filedata = FileUtils.readFromFile("user_data");
|
||||
|
||||
JSONObject data;
|
||||
try {
|
||||
FileUtils.downloadFileFromUrl("https://id.twitch.tv/oauth2/validate", "user_data");
|
||||
data = FileUtils.readJsonFromFile("user_data");
|
||||
sigIRC.CLIENTID = data.getString("client_id");
|
||||
} catch (JSONException | IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
config = InitializeConfigurationFile();
|
||||
|
||||
server = config.getProperty("server");
|
||||
nickname = config.getProperty("nickname");
|
||||
channel = config.getProperty("channel");
|
||||
|
||||
|
||||
try {
|
||||
channel_id = sigIRC.GetChannelID(channel.replace("#", ""));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
overlayMode = config.getBoolean("overlayMode", false);
|
||||
showWindowControls = config.getBoolean("showWindowControls", true);
|
||||
windowX = config.getInteger("windowX", 0);
|
||||
@ -254,7 +221,7 @@ public class sigIRC{
|
||||
twitchmodule_follower_img = config.getProperty("TWITCH_module_follower_img","sigIRC/glaceon_follower.png");
|
||||
twitchmodule_follower_img_animation = config.getBoolean("TWITCH_module_follower_img_animation",true);
|
||||
twitchmodule_followerText_centerX = config.getInteger("TWITCH_module_followerText_centerX",292);
|
||||
twitchmodule_followerText_Y = config.getInteger("TWITCH_module_followerText_Y",84);
|
||||
twitchmodule_followerText_Y = config.getInteger("TWITCH_module_followerText_Y",42);
|
||||
twitchmodule_newfollowerImgLogoSize = config.getInteger("TWITCH_module_newFollowerImgLogoSize",32);
|
||||
twitchmodule_newfollowerImgBackgroundColor = config.getProperty("TWITCH_module_newFollowerImgBackgroundColor","90,90,90");
|
||||
twitchmodule_newfollowerShadowTextColor = config.getProperty("TWITCH_module_newFollowerShadowTextColor","26,90,150");
|
||||
@ -300,10 +267,7 @@ public class sigIRC{
|
||||
autoUpdateProgram = config.getBoolean("Automatically_Update_Program", true);
|
||||
disableChatMessages = config.getBoolean("Disable_Chat_Messages", false);
|
||||
lastSubEmoteUpdate = config.getInteger("lastSubEmote_APIUpdate",Calendar.getInstance().get(Calendar.DAY_OF_YEAR));
|
||||
twitchmodule_newfollowerNameTextColor = config.getProperty("TWITCH_module_newfollowerNameTextColor","0,0,0");
|
||||
twitchmodule_newfollowerNameShadowColor = config.getProperty("TWITCH_module_newfollowerNameShadowColor","255,255,180");
|
||||
twitchmodule_newfollowerNameShadowSize = config.getInteger("TWITCH_module_newfollowerNameShadowSize",2);
|
||||
//manager.setClientId("o4c2x0l3e82scgar4hpxg6m5dfjbem");
|
||||
manager.setClientId("o4c2x0l3e82scgar4hpxg6m5dfjbem");
|
||||
//System.out.println(manager.auth().hasAccessToken());
|
||||
|
||||
DownloadAllRequiredDependencies();
|
||||
@ -313,6 +277,10 @@ public class sigIRC{
|
||||
e.printStackTrace();
|
||||
}*/
|
||||
|
||||
String[] filedata = FileUtils.readFromFile(BASEDIR+"sigIRC/oauthToken.txt");
|
||||
|
||||
final String oauth = filedata[0];
|
||||
|
||||
Initialize();
|
||||
|
||||
WriteBreakToLogFile();
|
||||
@ -359,7 +327,6 @@ public class sigIRC{
|
||||
manager = new FileManager("sigIRC/Emotes/",true); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/subscribers.txt"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/logs/",true); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/sub_emotes/",true); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/sounds/",true); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/rabi-ribi/",true); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/rabi-ribi/unknown.png"); manager.verifyAndFetchFileFromServer();
|
||||
@ -387,15 +354,12 @@ public class sigIRC{
|
||||
manager = new FileManager("sigIRC/controller/controller_overlay.png"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/controller/controller_template.png"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/CP_Font.ttf"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/collect_item.wav"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("kill.png"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("memory"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("swap.png"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("update.png"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("backcolor.png"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("modules.png"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("drag_bar.png"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("map_icons.png"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/stamps1.png"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/stamps2_2.png"); manager.verifyAndFetchFileFromServer();
|
||||
manager = new FileManager("sigIRC/stamp_what_a_great_idea.png"); manager.verifyAndFetchFileFromServer();
|
||||
@ -425,10 +389,10 @@ public class sigIRC{
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
newUpdateIsAvailable = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void InitializeModules() {
|
||||
try {
|
||||
Module.IMG_DRAGBAR = ImageIO.read(new File(sigIRC.BASEDIR+"drag_bar.png"));
|
||||
@ -473,7 +437,10 @@ public class sigIRC{
|
||||
));
|
||||
}
|
||||
if (bandorimodule_enabled) {
|
||||
BandoriModule.loadModule();
|
||||
modules.add(new BandoriModule(
|
||||
new Rectangle(bandorimodule_X,bandorimodule_Y,bandorimodule_width,bandorimodule_height),
|
||||
"Bandori"
|
||||
));
|
||||
}
|
||||
if (ddrstepmodule_enabled) {
|
||||
modules.add(new DDRStepModule(
|
||||
@ -481,7 +448,6 @@ public class sigIRC{
|
||||
"DDR Step"
|
||||
));
|
||||
}
|
||||
moduleSelectorWindow = new ModuleSelector();
|
||||
}
|
||||
|
||||
private static void InitializeCustomSounds() {
|
||||
@ -510,30 +476,17 @@ public class sigIRC{
|
||||
writer.flush();
|
||||
runIRCLoop(channel, writer, reader);
|
||||
}
|
||||
} catch (UnknownHostException | SocketException e) {
|
||||
//e.printStackTrace();
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
new java.util.Timer().schedule(new TimerTask() {
|
||||
public void run() {
|
||||
InitializeIRCConnection(server,nickname,channel,oauth);
|
||||
if (retryCount>1) {
|
||||
sigIRC.panel.addMessage("SYSTEM: Lost connection. Trying to reconnect...");
|
||||
System.out.println("SYSTEM: Lost connection. Trying to reconnect...");
|
||||
}
|
||||
if (retryCount==0) {
|
||||
retryCount=1;
|
||||
} else {
|
||||
if (System.currentTimeMillis()-60000>lastRetryTime) {
|
||||
retryCount=0;
|
||||
} else {
|
||||
retryCount++;
|
||||
}
|
||||
}
|
||||
lastRetryTime = System.currentTimeMillis();
|
||||
}
|
||||
},10000);
|
||||
if (retryCounter<MAX_CONNECTION_RETRIES) {
|
||||
InitializeIRCConnection(server,nickname,channel,oauth);
|
||||
} else {
|
||||
sigIRC.panel.addMessage("Connection timed out. Please restart and try again.");
|
||||
System.out.println("Connection timed out. Please restart and try again.");
|
||||
}
|
||||
}
|
||||
|
||||
public static void WriteBreakToLogFile() {
|
||||
@ -543,28 +496,8 @@ public class sigIRC{
|
||||
FileUtils.logToFile("\n---------------------------\n", BASEDIR+"logs/log_"+(cal.get(Calendar.MONTH)+1)+"_"+cal.get(Calendar.DAY_OF_MONTH)+"_"+cal.get(Calendar.YEAR)+".txt");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void getSubChannels(String s) {
|
||||
try {
|
||||
Long id = GetChannelID(s);
|
||||
subchannelIds.put(id, s);
|
||||
//System.out.println("Got ID "+id+" for channel "+s);
|
||||
} catch (JSONException | IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
//TwitchModule.streamOnline=true;
|
||||
}
|
||||
|
||||
public static Long GetChannelID(String username) throws IOException {
|
||||
FileUtils.downloadFileFromUrl("https://api.twitch.tv/kraken/users?login="+username, "temp_connect");
|
||||
JSONObject j = FileUtils.readJsonFromFile("temp_connect");
|
||||
JSONArray a = j.getJSONArray("users");
|
||||
Long id = Long.parseLong(a.getJSONObject(0).getString("_id"));
|
||||
return id;
|
||||
}
|
||||
|
||||
/*private static void getSubChannels(String channelName) {
|
||||
private static void getSubChannels(String channelName) {
|
||||
manager.channels().get(channelName, new ChannelResponseHandler() {
|
||||
@Override
|
||||
public void onFailure(Throwable arg0) {
|
||||
@ -583,29 +516,23 @@ public class sigIRC{
|
||||
});
|
||||
//TwitchModule.streamOnline=true;
|
||||
//return true;
|
||||
}*/
|
||||
}
|
||||
|
||||
public static void downloadSubEmotes() {
|
||||
public static void downloadSubEmotes(JSONObject data) {
|
||||
for (Long l : subchannelIds.keySet()) {
|
||||
JSONObject channel;
|
||||
try {
|
||||
channel = FileUtils.readJsonFromUrl("https://api.twitchemotes.com/api/v4/channels/"+l);
|
||||
//String channel = subchannelIds.get(l);
|
||||
JSONArray arr = channel.getJSONArray("emotes");
|
||||
//System.out.println("Channel: "+channel);
|
||||
for (int i=0;i<arr.length();i++) {
|
||||
JSONObject emote = arr.getJSONObject(i);
|
||||
int id = emote.getInt("id");
|
||||
String name = emote.getString("code");
|
||||
System.out.println("Emote "+(i+1)+" has id "+id+" and code "+name+".");
|
||||
try {
|
||||
emoticon_queue.add(new SubEmoticon(name, new URL(TWITCHEMOTEURL+id+"/1.0"), subchannelIds.get(l)));
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
JSONObject channel = data.getJSONObject(Long.toString(l));
|
||||
JSONArray arr = channel.getJSONArray("emotes");
|
||||
//System.out.println("Channel: "+channel);
|
||||
for (int i=0;i<arr.length();i++) {
|
||||
JSONObject emote = arr.getJSONObject(i);
|
||||
int id = emote.getInt("id");
|
||||
String name = emote.getString("code");
|
||||
//System.out.println("Emote "+(i+1)+" has id "+id+" and code "+name+".");
|
||||
try {
|
||||
emoticon_queue.add(new SubEmoticon(name, new URL(TWITCHEMOTEURL+id+"/1.0"), subchannelIds.get(l)));
|
||||
} catch (MalformedURLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch (JSONException | IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
//TwitchModule.streamOnline=true;
|
||||
@ -614,17 +541,14 @@ public class sigIRC{
|
||||
|
||||
private static void performTwitchEmoteUpdate() {
|
||||
try {
|
||||
JSONObject twitchemotes = FileUtils.readJsonFromUrl("https://api.twitchemotes.com/api/v4/channels/0"); //Channel 0 is global emotes.
|
||||
JSONObject twitchemotes = FileUtils.readJsonFromUrl("https://twitchemotes.com/api_cache/v3/global.json");
|
||||
System.out.println("Twitch emote Json read.");
|
||||
JSONArray emotes = twitchemotes.getJSONArray("emotes");
|
||||
for (int i=0;i<emotes.length();i++) {
|
||||
JSONObject emote = emotes.getJSONObject(i);
|
||||
for (String emotes : twitchemotes.keySet()) {
|
||||
JSONObject emote = twitchemotes.getJSONObject(emotes);
|
||||
int id = emote.getInt("id");
|
||||
if (id>14) {
|
||||
String name = emote.getString("code");
|
||||
emoticons.add(new Emoticon(name, new URL(TWITCHEMOTEURL+id+"/1.0")));
|
||||
System.out.println("Emote "+id+" with name "+name);
|
||||
}
|
||||
String name = emote.getString("code");
|
||||
emoticons.add(new Emoticon(name, new URL(TWITCHEMOTEURL+id+"/1.0")));
|
||||
System.out.println("Emote "+id+" with name "+name);
|
||||
}
|
||||
//System.out.println("Subscriber object: "+subemotes);
|
||||
String[] channel_names = FileUtils.readFromFile(sigIRC.BASEDIR+"sigIRC/subscribers.txt");
|
||||
@ -634,7 +558,6 @@ public class sigIRC{
|
||||
if (s.length()>0) {
|
||||
s=s.trim();
|
||||
//System.out.println("Got sub emote info for "+s);
|
||||
//TODO Rewrite.
|
||||
getSubChannels(s);
|
||||
}
|
||||
}
|
||||
@ -765,7 +688,6 @@ public class sigIRC{
|
||||
f.setIconImage(programIcon);
|
||||
|
||||
button = new BackgroundColorButton(new File(sigIRC.BASEDIR+"backcolor.png"),panel.getX()+panel.getWidth()-96,64+rowobj.size()*rowSpacing);
|
||||
modulebutton = new ModuleSelectorButton(new File(sigIRC.BASEDIR+"modules.png"),panel.getX()+panel.getWidth()-96,64+rowobj.size()*rowSpacing);
|
||||
if (sigIRC.overlayMode) {
|
||||
f.setBackground(new Color(0,0,0,0));
|
||||
f.setAlwaysOnTop(true);
|
||||
|
@ -30,9 +30,6 @@ public class DrawUtils {
|
||||
if (message.length()>0) {
|
||||
AttributedString as = new AttributedString(message);
|
||||
as.addAttribute(TextAttribute.FONT, font);
|
||||
as.addAttribute(TextAttribute.KERNING,TextAttribute.KERNING_ON);
|
||||
as.addAttribute(TextAttribute.WIDTH,TextAttribute.WIDTH_EXTENDED);
|
||||
as.addAttribute(TextAttribute.TRACKING,0.5);
|
||||
g.setColor(shadow_color);
|
||||
Graphics2D g2 = (Graphics2D) g;
|
||||
FontRenderContext frc = g2.getFontMetrics(font).getFontRenderContext();
|
||||
@ -58,12 +55,9 @@ public class DrawUtils {
|
||||
g2.drawString(as.getIterator(),(int)(x+xoffset),(int)(y+yoffset));
|
||||
}
|
||||
}
|
||||
public static void drawCenteredOutlineText(Graphics g, Font font, double x, double y, int font_size, int outline_size, Color text_color, Color shadow_color, String message) {
|
||||
Rectangle2D textBounds = TextUtils.calculateStringBoundsFont(message, font);
|
||||
drawOutlineText(g,font,x,y,-textBounds.getWidth()/2,-textBounds.getHeight()/2,font_size,outline_size,text_color,shadow_color,message);
|
||||
}
|
||||
public static void drawCenteredOutlineText(Graphics g, Font font, double x, double y, int outline_size, Color text_color, Color shadow_color, String message) {
|
||||
drawCenteredOutlineText(g,font,x,y,1,outline_size,text_color,shadow_color,message);
|
||||
Rectangle2D textBounds = TextUtils.calculateStringBoundsFont(message, font);
|
||||
drawOutlineText(g,font,x,y,-textBounds.getWidth()/2,-textBounds.getHeight()/2,1,outline_size,text_color,shadow_color,message);
|
||||
}
|
||||
public static void drawText(Graphics g, double x, double y, Color color, String message) {
|
||||
if (message.length()>0) {
|
||||
|
@ -8,19 +8,11 @@ import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.Reader;
|
||||
import java.io.Writer;
|
||||
import java.net.ConnectException;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.channels.Channels;
|
||||
import java.nio.channels.FileChannel;
|
||||
import java.nio.channels.ReadableByteChannel;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -30,7 +22,6 @@ import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import sig.sigIRC;
|
||||
import sig.modules.RabiRaceModule;
|
||||
import sig.modules.ChatLog.ChatLogMessage;
|
||||
|
||||
public class FileUtils {
|
||||
@ -246,14 +237,9 @@ public class FileUtils {
|
||||
}
|
||||
|
||||
public static void logToFile(String message, String filename) {
|
||||
if ((!filename.equalsIgnoreCase("debug.log") &&
|
||||
!filename.equalsIgnoreCase("debug2.log")) || (filename.equalsIgnoreCase("debug.log") && RabiRaceModule.DEBUGMODE==1)
|
||||
||
|
||||
(filename.equalsIgnoreCase("debug2.log") && RabiRaceModule.DEBUGMODE==2)
|
||||
) {
|
||||
logToFile(message,filename,false);
|
||||
}
|
||||
logToFile(message,filename,false);
|
||||
}
|
||||
|
||||
public static void logToFile(String message, String filename, boolean outputToChatLog) {
|
||||
File file = new File(filename);
|
||||
try {
|
||||
@ -261,9 +247,9 @@ public class FileUtils {
|
||||
if (!file.exists()) {
|
||||
file.createNewFile();
|
||||
}
|
||||
OutputStream out = new FileOutputStream(file,true);
|
||||
Writer writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);
|
||||
PrintWriter pw = new PrintWriter(writer);
|
||||
|
||||
FileWriter fw = new FileWriter(file, true);
|
||||
PrintWriter pw = new PrintWriter(fw);
|
||||
|
||||
pw.println(message);
|
||||
pw.flush();
|
||||
@ -316,36 +302,4 @@ public class FileUtils {
|
||||
file.delete();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void downloadFileFromUrl(String url, String file,boolean bearer) throws IOException, JSONException {
|
||||
File filer = new File(file);
|
||||
filer.createNewFile();
|
||||
|
||||
URL website = new URL(url);
|
||||
HttpURLConnection connection = (HttpURLConnection) website.openConnection();
|
||||
/*for (String s : connection.getHeaderFields().keySet()) {
|
||||
System.out.println(s+": "+connection.getHeaderFields().get(s));
|
||||
}*/
|
||||
connection.setRequestMethod("GET");
|
||||
//connection.setRequestProperty("Content-Type", "application/json");
|
||||
connection.setRequestProperty("Accept", "application/vnd.twitchtv.v5+json");
|
||||
connection.setRequestProperty("Authorization", ((bearer)?"Bearer":"OAuth") + " "+sigIRC.oauth.replace("oauth:", ""));
|
||||
if (sigIRC.CLIENTID.length()!=0) {
|
||||
connection.setRequestProperty("Client-ID", sigIRC.CLIENTID);
|
||||
//System.out.println("Using "+ sigIRC.oauth+"/"+sigIRC.CLIENTID);
|
||||
}
|
||||
try {
|
||||
ReadableByteChannel rbc = Channels.newChannel(connection.getInputStream());
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
|
||||
fos.close();
|
||||
} catch (ConnectException e) {
|
||||
System.out.println("Failed to connect, moving on...");
|
||||
}
|
||||
}
|
||||
|
||||
public static void downloadFileFromUrl(String url, String file) throws IOException, JSONException {
|
||||
downloadFileFromUrl(url,file,false); //Uses OAUTH instead of Bearer
|
||||
}
|
||||
}
|
||||
|
18
tmp_profile
Normal file
18
tmp_profile
Normal file
@ -0,0 +1,18 @@
|
||||
SigoNitori
|
||||
25
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
false
|
||||
0
|
||||
0
|
||||
5.361208E-36
|
||||
4.8674998E-36
|
||||
1536205835
|
||||
KEYITEMS:
|
||||
BADGES:
|
||||
UPDATES:
|
Loading…
x
Reference in New Issue
Block a user