Compare commits
No commits in common. 'beta' and 'master' have entirely different histories.
@ -0,0 +1,18 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<classpath> |
||||
<classpathentry kind="src" path="src"/> |
||||
<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/lwjgl-glfw.jar"/> |
||||
<classpathentry kind="lib" path="lib/lwjgl-glfw-natives-linux.jar"/> |
||||
<classpathentry kind="lib" path="lib/lwjgl-glfw-natives-macos.jar"/> |
||||
<classpathentry kind="lib" path="lib/lwjgl-glfw-natives-windows.jar"/> |
||||
<classpathentry kind="lib" path="lib/lwjgl.jar"/> |
||||
<classpathentry kind="lib" path="lib/lwjgl-natives-linux.jar"/> |
||||
<classpathentry kind="lib" path="lib/lwjgl-natives-macos.jar"/> |
||||
<classpathentry kind="lib" path="lib/lwjgl-natives-windows.jar"/> |
||||
<classpathentry kind="lib" path="lib/jna-4.5.0.jar"/> |
||||
<classpathentry kind="lib" path="lib/jna-platform-4.5.0.jar"/> |
||||
<classpathentry kind="output" path="bin"/> |
||||
</classpath> |
@ -0,0 +1,4 @@ |
||||
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 |
@ -0,0 +1,111 @@ |
||||
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 |
||||
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 |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 6.1 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 1.7 KiB |
@ -0,0 +1,76 @@ |
||||
# |
||||
#Properties file for sigIRCv2 |
||||
#Thu Sep 13 20:34:27 CDT 2018 |
||||
Auto_Update_Program=1 |
||||
Automatically_Update_Program=false |
||||
BANDORI_module_X=76 |
||||
BANDORI_module_Y=307 |
||||
BANDORI_module_height=120 |
||||
BANDORI_module_width=640 |
||||
CHATLOG_module_BackgroundColor=195,195,195,255 |
||||
CHATLOG_module_MessageHistory=50 |
||||
CHATLOG_module_X=1042 |
||||
CHATLOG_module_Y=388 |
||||
CHATLOG_module_height=518 |
||||
CHATLOG_module_width=516 |
||||
CONTROLLER_module_X=46 |
||||
CONTROLLER_module_Y=272 |
||||
CONTROLLER_module_height=312 |
||||
CONTROLLER_module_width=320 |
||||
Disable_Chat_Messages=false |
||||
Max_FPS=30 |
||||
Module_bandori_Enabled=false |
||||
Module_chatlog_Enabled=false |
||||
Module_controller_Enabled=false |
||||
Module_rabirace_Enabled=false |
||||
Module_rabiribi_Enabled=false |
||||
Module_touhoumother_Enabled=false |
||||
Module_twitch_Enabled=false |
||||
RABIRACE_module_X=492 |
||||
RABIRACE_module_Y=226 |
||||
RABIRACE_module_height=561 |
||||
RABIRACE_module_width=481 |
||||
RABIRIBI_module_X=0 |
||||
RABIRIBI_module_Y=0 |
||||
RABIRIBI_module_height=1050 |
||||
RABIRIBI_module_width=1680 |
||||
SCROLLINGCHAT_module_X=1016 |
||||
SCROLLINGCHAT_module_Y=223 |
||||
SCROLLINGCHAT_module_height=132 |
||||
SCROLLINGCHAT_module_width=456 |
||||
TOUHOUMOTHER_module_X=0 |
||||
TOUHOUMOTHER_module_Y=312 |
||||
TOUHOUMOTHER_module_height=312 |
||||
TOUHOUMOTHER_module_width=320 |
||||
TWITCH_module_X=507 |
||||
TWITCH_module_Y=366 |
||||
TWITCH_module_followerText_Y=42 |
||||
TWITCH_module_followerText_centerX=292 |
||||
TWITCH_module_follower_img=sigIRC/glaceon_follower.png |
||||
TWITCH_module_follower_img_animation=true |
||||
TWITCH_module_height=200 |
||||
TWITCH_module_newFollowerImgBackgroundColor=90,90,90 |
||||
TWITCH_module_newFollowerImgLogoSize=32 |
||||
TWITCH_module_newFollowerShadowTextColor=26,90,150 |
||||
TWITCH_module_newFollowerTextColor=255,255,255 |
||||
TWITCH_module_width=500 |
||||
Testing_Mode=false |
||||
backgroundColor=-10066177 |
||||
channel=\#SigoNitori |
||||
chatRows=3 |
||||
chatScrollSpd=4 |
||||
dingThreshold=6 |
||||
hardware_acceleration=true |
||||
lastSubEmote_APIUpdate=331 |
||||
messageFont=Gill Sans Ultra Bold Condensed |
||||
nickname=SigoNitori |
||||
overlayMode=false |
||||
rowSpacing=64 |
||||
server=irc.chat.twitch.tv |
||||
showWindowControls=true |
||||
touhoumotherConsoleFont=Agency FB Bold |
||||
usernameFont=Segoe UI Semibold |
||||
windowHeight=632 |
||||
windowWidth=1212 |
||||
windowX=442 |
||||
windowY=205 |
@ -1,19 +0,0 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<classpath> |
||||
<classpathentry kind="src" path="src"/> |
||||
<classpathentry kind="src" path="lib"/> |
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> |
||||
<classpathentry kind="lib" path="C:/Users/sigon/git/sigIRCv2/sigIRCv2/lib/commons-io-2.5.jar"/> |
||||
<classpathentry kind="lib" path="C:/Users/sigon/git/sigIRCv2/sigIRCv2/lib/jna-4.5.0.jar"/> |
||||
<classpathentry kind="lib" path="C:/Users/sigon/git/sigIRCv2/sigIRCv2/lib/jna-platform-4.5.0.jar"/> |
||||
<classpathentry kind="lib" path="C:/Users/sigon/git/sigIRCv2/sigIRCv2/lib/lwjgl.jar"/> |
||||
<classpathentry kind="lib" path="C:/Users/sigon/git/sigIRCv2/sigIRCv2/lib/lwjgl-glfw.jar"/> |
||||
<classpathentry kind="lib" path="C:/Users/sigon/git/sigIRCv2/sigIRCv2/lib/lwjgl-glfw-natives-linux.jar"/> |
||||
<classpathentry kind="lib" path="C:/Users/sigon/git/sigIRCv2/sigIRCv2/lib/lwjgl-glfw-natives-macos.jar"/> |
||||
<classpathentry kind="lib" path="C:/Users/sigon/git/sigIRCv2/sigIRCv2/lib/lwjgl-glfw-natives-windows.jar"/> |
||||
<classpathentry kind="lib" path="C:/Users/sigon/git/sigIRCv2/sigIRCv2/lib/lwjgl-natives-linux.jar"/> |
||||
<classpathentry kind="lib" path="C:/Users/sigon/git/sigIRCv2/sigIRCv2/lib/lwjgl-natives-macos.jar"/> |
||||
<classpathentry kind="lib" path="C:/Users/sigon/git/sigIRCv2/sigIRCv2/lib/lwjgl-natives-windows.jar"/> |
||||
<classpathentry kind="lib" path="C:/Users/sigon/git/sigIRCv2/sigIRCv2/lib/twitch-api-wrapper-0.3-jar-with-dependencies.jar"/> |
||||
<classpathentry kind="output" path="bin"/> |
||||
</classpath> |
@ -1,11 +0,0 @@ |
||||
eclipse.preferences.version=1 |
||||
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 |
||||
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.assertIdentifier=error |
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error |
||||
org.eclipse.jdt.core.compiler.source=1.8 |
@ -1,65 +0,0 @@ |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\oauthToken.txt, retrieving file online from http://45.33.13.215/sigIRCv2/oauthToken.txt. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\subscribers.txt, retrieving file online from http://45.33.13.215/sigIRCv2/subscribers.txt. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\follower_sounds\Glaceon_cry.wav, retrieving file online from http://45.33.13.215/sigIRCv2/Glaceon_cry.wav. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\follower_sounds\README.txt, retrieving file online from http://45.33.13.215/sigIRCv2/README.txt. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\record, retrieving file online from http://45.33.13.215/sigIRCv2/record. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\glaceon_follower.png, retrieving file online from http://45.33.13.215/sigIRCv2/glaceon_follower.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\sigIRCicon.png, retrieving file online from http://45.33.13.215/sigIRCv2/sigIRCicon.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\icon_down_arrow.png, retrieving file online from http://45.33.13.215/sigIRCv2/icon_down_arrow.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\icon_follower_count.png, retrieving file online from http://45.33.13.215/sigIRCv2/icon_follower_count.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\icon_up_arrow.png, retrieving file online from http://45.33.13.215/sigIRCv2/icon_up_arrow.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\icon_uptime.png, retrieving file online from http://45.33.13.215/sigIRCv2/icon_uptime.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\icon_viewers_count.png, retrieving file online from http://45.33.13.215/sigIRCv2/icon_viewers_count.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\icon_views_count.png, retrieving file online from http://45.33.13.215/sigIRCv2/icon_views_count.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\message_separator.png, retrieving file online from http://45.33.13.215/sigIRCv2/message_separator.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\controller\2-way_axis.png, retrieving file online from http://45.33.13.215/sigIRCv2/2-way_axis.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\controller\4-way_axis.png, retrieving file online from http://45.33.13.215/sigIRCv2/4-way_axis.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\controller\controller_overlay.png, retrieving file online from http://45.33.13.215/sigIRCv2/controller_overlay.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\controller\controller_template.png, retrieving file online from http://45.33.13.215/sigIRCv2/controller_template.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\sigIRC\CP_Font.ttf, retrieving file online from http://45.33.13.215/sigIRCv2/CP_Font.ttf. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\kill.png, retrieving file online from http://45.33.13.215/sigIRCv2/kill.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\memory, retrieving file online from http://45.33.13.215/sigIRCv2/memory. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\swap.png, retrieving file online from http://45.33.13.215/sigIRCv2/swap.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\update.png, retrieving file online from http://45.33.13.215/sigIRCv2/update.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\backcolor.png, retrieving file online from http://45.33.13.215/sigIRCv2/backcolor.png. |
||||
Could not find C:\Users\sigon\Downloads\sigIRCv2-master\sigIRCv2\.\drag_bar.png, retrieving file online from http://45.33.13.215/sigIRCv2/drag_bar.png. |
||||
File size is 10277104 |
||||
File size on Github is -1 |
||||
File size on Github varies from currently running program... Downloading new program. |
||||
Downloaded Dependencies. |
||||
!!!!!!!!!!!!!!!!!! |
||||
!!!!!WARNING!!!!!! |
||||
There is a space in the global file location sigIRC/sounds/Howler Monkeys Howling (Very Funny)-Pia8ku7jUNg.wav. This is going to cause huge errors! |
||||
!!!!!!!!!!!!!!!!!! |
||||
Trace:Mini stack tracer: |
||||
sig.utils.DebugUtils: **DebugUtils.java** getStackTrace():10 |
||||
sig.utils.DebugUtils: **DebugUtils.java** showStackTrace():6 |
||||
sig.FileManager: **FileManager.java** <init>():22 |
||||
sig.CustomSound: **CustomSound.java** <init>():24 |
||||
sig.sigIRC: **sigIRC.java** InitializeCustomSounds():406 |
||||
sig.sigIRC: **sigIRC.java** main():259 |
||||
!!!!!!!!!!!!!!!!!! |
||||
!!!!!WARNING!!!!!! |
||||
There is a space in the global file location sigIRC/sounds/Kuroyukihime Burst Link !-tv6wMw7KU9o.wav. This is going to cause huge errors! |
||||
!!!!!!!!!!!!!!!!!! |
||||
Trace:Mini stack tracer: |
||||
sig.utils.DebugUtils: **DebugUtils.java** getStackTrace():10 |
||||
sig.utils.DebugUtils: **DebugUtils.java** showStackTrace():6 |
||||
sig.FileManager: **FileManager.java** <init>():22 |
||||
sig.CustomSound: **CustomSound.java** <init>():24 |
||||
sig.sigIRC: **sigIRC.java** InitializeCustomSounds():407 |
||||
sig.sigIRC: **sigIRC.java** main():259 |
||||
!!!!!!!!!!!!!!!!!! |
||||
!!!!!WARNING!!!!!! |
||||
There is a space in the global file location sigIRC/sounds/Samus Appears - Metroid Prime [OST]-G8frLXCHtqM.wav. This is going to cause huge errors! |
||||
!!!!!!!!!!!!!!!!!! |
||||
Trace:Mini stack tracer: |
||||
sig.utils.DebugUtils: **DebugUtils.java** getStackTrace():10 |
||||
sig.utils.DebugUtils: **DebugUtils.java** showStackTrace():6 |
||||
sig.FileManager: **FileManager.java** <init>():22 |
||||
sig.CustomSound: **CustomSound.java** <init>():24 |
||||
sig.sigIRC: **sigIRC.java** InitializeCustomSounds():408 |
||||
sig.sigIRC: **sigIRC.java** main():259 |
||||
Local copy of Sub emotes not found. Downloading in background... |
||||
Properties successfully saved. |
||||
Properties successfully saved. |
@ -1,457 +0,0 @@ |
||||
package sig.modules.RabiRace; |
||||
|
||||
import java.awt.Color; |
||||
import java.awt.Graphics; |
||||
import java.awt.Graphics2D; |
||||
import java.awt.Image; |
||||
import java.awt.Point; |
||||
import java.awt.image.BufferedImage; |
||||
import java.io.File; |
||||
import java.io.IOException; |
||||
import java.lang.reflect.Field; |
||||
import java.net.MalformedURLException; |
||||
import java.net.URL; |
||||
import java.text.DecimalFormat; |
||||
import java.util.ArrayList; |
||||
import java.util.Arrays; |
||||
import java.util.ConcurrentModificationException; |
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
|
||||
import sig.ScrollingText; |
||||
import sig.sigIRC; |
||||
import sig.modules.RabiRaceModule; |
||||
import sig.utils.DrawUtils; |
||||
import sig.utils.FileUtils; |
||||
import sig.utils.TextUtils; |
||||
|
||||
public class Profile { |
||||
public String username = sigIRC.nickname.toLowerCase(); |
||||
public String displayName = sigIRC.nickname; |
||||
public int avatar = 0; |
||||
public int playtime = 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 float itempct = 0; |
||||
public float mappct = 0; |
||||
public HashMap<MemoryData,Integer> key_items = new HashMap<MemoryData,Integer>(); |
||||
public HashMap<MemoryData,Integer> badges = new HashMap<MemoryData,Integer>(); |
||||
public List<String> updates = new ArrayList<String>(); |
||||
RabiRaceModule parent; |
||||
public long lastWebUpdate = System.currentTimeMillis(); |
||||
DecimalFormat df = new DecimalFormat("0.0"); |
||||
Profile oldProfile; |
||||
public boolean isArchive = false; |
||||
|
||||
public Profile(RabiRaceModule module) { |
||||
this(module,true); |
||||
} |
||||
public Profile(RabiRaceModule module, boolean archive) { |
||||
this.isArchive = archive; |
||||
if (!isArchive) { |
||||
oldProfile = new Profile(module,true); |
||||
} |
||||
this.parent = module; |
||||
} |
||||
|
||||
public void archiveAllValues() { |
||||
oldProfile.healthUps = healthUps; |
||||
oldProfile.attackUps = attackUps; |
||||
oldProfile.manaUps = manaUps; |
||||
oldProfile.regenUps = regenUps; |
||||
oldProfile.packUps = packUps; |
||||
oldProfile.rainbowEggCount = rainbowEggCount; |
||||
oldProfile.key_items = (HashMap<MemoryData, Integer>)key_items.clone(); |
||||
oldProfile.badges = (HashMap<MemoryData, Integer>)badges.clone(); |
||||
} |
||||
|
||||
public void compareAndAnnounceAllChangedValues() { |
||||
//System.out.println(oldProfile.key_items.get(MemoryData.HAMMER)+","+key_items.get(MemoryData.HAMMER));
|
||||
String announcement = ""; |
||||
int count=0; |
||||
if (oldProfile.healthUps==healthUps-1) { |
||||
announcement = "has obtained a Health Up! ("+healthUps+" total)"; |
||||
count++; |
||||
} |
||||
if (oldProfile.attackUps==attackUps-1) { |
||||
announcement = "has obtained an Attack Up! ("+attackUps+" total)"; |
||||
count++; |
||||
} |
||||
if (oldProfile.manaUps==manaUps-1) { |
||||
announcement = "has obtained a Mana Up! ("+manaUps+" total)"; |
||||
count++; |
||||
} |
||||
if (oldProfile.regenUps==regenUps-1) { |
||||
announcement = "has obtained a Regen Up! ("+regenUps+" total)"; |
||||
count++; |
||||
} |
||||
if (oldProfile.packUps==packUps-1) { |
||||
announcement = "has obtained a Pack Up! ("+packUps+" total)"; |
||||
count++; |
||||
} |
||||
if (oldProfile.rainbowEggCount==rainbowEggCount-1) { |
||||
if (5-rainbowEggCount==0) { |
||||
announcement = "has obtained 5 Rainbow Eggs! (NAME) has completed the race!"; |
||||
count++; |
||||
} else if (5-rainbowEggCount>0) |
||||
{ |
||||
announcement = "has obtained a Rainbow Egg! ("+Math.max(5-rainbowEggCount, 0)+" to go!)"; |
||||
count++; |
||||
} |
||||
} |
||||
for (MemoryData md : key_items.keySet()) { |
||||
if (!oldProfile.key_items.containsKey(md) && |
||||
key_items.containsKey(md)) { |
||||
announcement = "has obtained "+md.name+"!"; |
||||
count++; |
||||
} |
||||
} |
||||
for (MemoryData md : badges.keySet()) { |
||||
if (!oldProfile.badges.containsKey(md) && |
||||
badges.containsKey(md)) { |
||||
announcement = "has obtained the "+md.name+" badge!"; |
||||
count++; |
||||
} |
||||
} |
||||
if (count==1) { |
||||
SendAnnouncement(announcement); |
||||
} |
||||
} |
||||
|
||||
private void SendAnnouncement(String string) { |
||||
string = displayName+" "+string.replaceAll("(NAME)", displayName); |
||||
string = string.replaceAll(" ", "%20"); |
||||
|
||||
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=addupdate&session="+RabiRaceModule.mySession.id+"&message="+string),file); |
||||
} catch (MalformedURLException e) { |
||||
e.printStackTrace(); |
||||
} catch (IOException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
} |
||||
public void updateClientValues() { |
||||
for (MemoryData md : RabiRaceModule.key_items_list) { |
||||
//System.out.println("Checking "+md.getDisplayName());
|
||||
int val = parent.readIntFromMemory(md.mem); |
||||
if (val!=0) { |
||||
key_items.put(md, val); |
||||
//System.out.println("Obtained "+md.getDisplayName());
|
||||
} else { |
||||
key_items.remove(md); |
||||
} |
||||
} |
||||
for (MemoryData md : RabiRaceModule.badges_list) { |
||||
int val = parent.readIntFromMemory(md.mem); |
||||
if (val!=0) { |
||||
badges.put(md, val); |
||||
//System.out.println("Obtained "+md.getDisplayName());
|
||||
} else { |
||||
badges.remove(md); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public void uploadProfile() { |
||||
if (sigIRC.authenticated) { |
||||
File file = new File(sigIRC.BASEDIR+"tmp"); |
||||
try { |
||||
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(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public void downloadProfile() { |
||||
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/rabirace/send.php?key=retrievedata&name="+username.toLowerCase()),file); |
||||
} catch (MalformedURLException e) { |
||||
e.printStackTrace(); |
||||
} catch (IOException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
String[] data = FileUtils.readFromFile(sigIRC.BASEDIR+"tmp_profile"); |
||||
//System.out.println(Arrays.toString(data));
|
||||
if (data.length>=18) { |
||||
int i=0; |
||||
displayName = data[i++]; |
||||
avatar = Integer.parseInt(data[i++]); |
||||
playtime = 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++]); |
||||
i+=2; |
||||
String nextval = data[i++]; |
||||
if (!nextval.equalsIgnoreCase("BADGES:")) { |
||||
do { |
||||
String[] parse = nextval.split(";"); |
||||
key_items.put(MemoryData.valueOf(parse[0]), Integer.parseInt(parse[1])); |
||||
//System.out.println("Added "+Arrays.toString(parse));
|
||||
nextval = data[i++]; |
||||
} |
||||
while (!nextval.equalsIgnoreCase("BADGES:")); |
||||
} |
||||
nextval = data[i++]; |
||||
if (!nextval.equalsIgnoreCase("UPDATES:")) { |
||||
do { |
||||
String[] parse = nextval.split(";"); |
||||
badges.put(MemoryData.valueOf(parse[0]), Integer.parseInt(parse[1])); |
||||
//System.out.println("Added "+Arrays.toString(parse));
|
||||
nextval = data[i++]; |
||||
} |
||||
while (!nextval.equalsIgnoreCase("UPDATES:")); |
||||
} |
||||
lastWebUpdate = System.currentTimeMillis(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
private String getDataString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
appendData(sigIRC.nickname,sb); |
||||
appendData(avatar,sb); |
||||
appendData(playtime,sb); |
||||
appendData(healthUps,sb); |
||||
appendData(manaUps,sb); |
||||
appendData(regenUps,sb); |
||||
appendData(packUps,sb); |
||||
appendData(attackUps,sb); |
||||
appendData(rainbowEggCount,sb); |
||||
appendData(isPaused,sb); |
||||
appendData(difficulty,sb); |
||||
appendData(loop,sb); |
||||
appendData(itempct,sb); |
||||
appendData(mappct,sb); |
||||
appendData(0,sb); |
||||
appendData("KEYITEMS:",sb); |
||||
for (MemoryData data : key_items.keySet()) { |
||||
Integer val = key_items.get(data); |
||||
appendData(data.name()+";"+val,sb); |
||||
} |
||||
appendData("BADGES:",sb); |
||||
for (MemoryData data : badges.keySet()) { |
||||
Integer val = badges.get(data); |
||||
appendData(data.name()+";"+val,sb); |
||||
} |
||||
appendData("UPDATES:",sb); |
||||
return sb.toString(); |
||||
} |
||||
|
||||
private void appendData(Object data, StringBuilder str) { |
||||
if (str.length()!=0) { |
||||
str.append(","); |
||||
} |
||||
str.append(data); |
||||
} |
||||
|
||||
public Image getStatText(int w) { |
||||
BufferedImage tmp = new BufferedImage(400,175,BufferedImage.TYPE_INT_ARGB); |
||||
Graphics2D g2 = tmp.createGraphics(); |
||||
|
||||
g2.setColor(Color.BLACK); |
||||
g2.fillRect(1, 1, 32, 32); |
||||
g2.setColor(ScrollingText.GetUserNameColor(displayName)); |
||||
DrawUtils.drawOutlineText(g2, sigIRC.panel.rabiRibiMoneyDisplayFont, 36, 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 (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, 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, 2, Color.WHITE, Color.BLACK, text); |
||||
|
||||
return tmp.getScaledInstance(w, -1, Image.SCALE_AREA_AVERAGING); |
||||
} |
||||
|
||||
private Color GetDifficultyColor() { |
||||
Color[] color_list = new Color[]{ |
||||
new Color(99, 159, 255), |
||||
new Color(119, 98, 255), |
||||
new Color(60, 201, 112), |
||||
new Color(200, 209, 100), |
||||
new Color(209, 159, 12), |
||||
new Color(209, 54, 11), |
||||
new Color(68, 24, 12), |
||||
}; |
||||
Color colorval = Color.BLACK; |
||||
if (difficulty<color_list.length) { |
||||
colorval = color_list[difficulty]; |
||||
} else { |
||||
colorval = color_list[color_list.length-1]; |
||||
} |
||||
return colorval; |
||||
} |
||||
|
||||
private String GetDifficultyName() { |
||||
String[] difficulty_list = new String[]{ |
||||
"Casual", |
||||
"Novice", |
||||
"Normal", |
||||
"Hard", |
||||
"Hell", |
||||
"BEX", |
||||
"???", |
||||
}; |
||||
String diffstring = ""; |
||||
if (difficulty<difficulty_list.length) { |
||||
diffstring = difficulty_list[difficulty]+((loop>0)?" Loop "+loop:""); |
||||
} else { |
||||
diffstring = difficulty_list[difficulty_list.length-1]+((loop>0)?" Loop "+loop:""); |
||||
} |
||||
return diffstring; |
||||
} |
||||
|
||||
public Image getStatPanel(int w) { |
||||
//DrawUtils.drawTextFont(g, sigIRC.panel.userFont, parent.position.getX(), parent.position.getY()+26, Color.BLACK, "Values: "+readIntFromMemory(MemoryOffset.DLC_ITEM1)+","+readIntFromMemory(MemoryOffset.DLC_ITEM2)+","+readIntFromMemory(MemoryOffset.DLC_ITEM3)+","+readIntFromMemory(MemoryOffset.DLC_ITEM4));
|
||||
BufferedImage tmp = new BufferedImage(400,175,BufferedImage.TYPE_INT_ARGB); |
||||
Graphics2D g2 = tmp.createGraphics(); |
||||
final int border=20; |
||||
final int width=(int)(tmp.getWidth()-border*2); |
||||
final int spacing=width/5; |
||||
for (int i=0;i<5;i++) { |
||||
Image img = RabiRaceModule.image_map.get("easter_egg.png"); |
||||
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); |
||||
} |
||||
int size = key_items.size(); |
||||
final int icon_size = 24; |
||||
int count = 0; |
||||
try { |
||||
for (MemoryData data : key_items.keySet()) { |
||||
if (key_items.get(data)<0) { |
||||
Image img = data.getImage().getScaledInstance(icon_size, icon_size, Image.SCALE_DEFAULT); |
||||
if (size*icon_size<width) { |
||||
DrawUtils.drawImage(g2, img, (int)(+border+((count++)*icon_size)), (int)(+96+8), new Color(0,0,0,128), sigIRC.panel); |
||||
} else { |
||||
DrawUtils.drawImage(g2, img, (int)(+border+((width/size)*(count++))), (int)(+96+8), new Color(0,0,0,128), sigIRC.panel); |
||||
} |
||||
} else { |
||||
if (size*icon_size<width) { |
||||
g2.drawImage(data.getImage(), (int)(+border+((count++)*icon_size)), (int)(+96+8), (int)icon_size, (int)icon_size, sigIRC.panel); |
||||
} else { |
||||
g2.drawImage(data.getImage(), (int)(+border+((width/size)*(count++))), (int)(+96+8), (int)icon_size, (int)icon_size, sigIRC.panel); |
||||
} |
||||
} |
||||
} |
||||
count=0; |
||||
size = badges.size(); |
||||
for (MemoryData data : badges.keySet()) { |
||||
if (size*icon_size<width) { |
||||
g2.drawImage(data.getImage(), (int)(+border+((count++)*icon_size)), (int)(+96+32), (int)icon_size, (int)icon_size, sigIRC.panel); |
||||
} else { |
||||
g2.drawImage(data.getImage(), (int)(+border+((width/size)*(count++))), (int)(+96+32), (int)icon_size, (int)icon_size, sigIRC.panel); |
||||
} |
||||
} |
||||
int i=0; |
||||
Image[] imgs = new Image[]{RabiRaceModule.image_map.get("health_up.png"), |
||||
RabiRaceModule.image_map.get("mana_up.png"), |
||||
RabiRaceModule.image_map.get("regen_up.png"), |
||||
RabiRaceModule.image_map.get("pack_up.png"), |
||||
RabiRaceModule.image_map.get("attack_up.png")}; |
||||
int[] amts = new int[]{ |
||||
healthUps, |
||||
manaUps, |
||||
regenUps, |
||||
packUps, |
||||
attackUps, |
||||
}; |
||||
//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);
|
||||
for (Image img : imgs) { |
||||
g2.drawImage(img,(int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56), (int)icon_size, (int)icon_size, sigIRC.panel); |
||||
DrawUtils.drawCenteredOutlineText(g2, sigIRC.panel.programFont, (int)((+border+((i)*(spacing))-icon_size/2)+(spacing/2)+4), (int)(+96+56+icon_size+12), 1, Color.WHITE, Color.BLUE, Integer.toString(amts[i++])); |
||||
} |
||||
} catch (ConcurrentModificationException e) { |
||||
|
||||
} |
||||
return tmp.getScaledInstance(w, -1, Image.SCALE_AREA_AVERAGING); |
||||
//g.drawImage(tmp, (int)parent.position.getX(), (int)parent.position.getY(), 120, 64, sigIRC.panel);
|
||||
} |
||||
|
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(this.getClass().getName()+"("); |
||||
boolean first=false; |
||||
for (Field f : this.getClass().getDeclaredFields()) { |
||||
if (!first) { |
||||
try { |
||||
sb.append(f.getName()+"="+f.get(this)); |
||||
first=true; |
||||
} catch (IllegalArgumentException e) { |
||||
e.printStackTrace(); |
||||
} catch (IllegalAccessException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
} else { |
||||
try { |
||||
sb.append(","+f.getName()+"="+f.get(this)); |
||||
} catch (IllegalArgumentException e) { |
||||
e.printStackTrace(); |
||||
} catch (IllegalAccessException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
} |
||||
} |
||||
sb.append(")"); |
||||
return sb.toString(); |
||||
} |
||||
|
||||
public static Point calculateMultiPanelView(int elements) { |
||||
int x = 1; |
||||
int y = 1; |
||||
while (x*y<elements) { |
||||
if (x==y) { |
||||
y++; |
||||
} else { |
||||
x++; |
||||
} |
||||
} |
||||
//System.out.println(x+","+y);
|
||||
return new Point(x,y); |
||||
} |
||||
|
||||
public static void DrawMultiPanel(Graphics g, int x, int y, int w, List<Profile> players) { |
||||
int cols = calculateMultiPanelView(players.size()).x; |
||||
int rows = calculateMultiPanelView(players.size()).y; |
||||
|
||||
int xx = 0; |
||||
int yy = 0; |
||||
|
||||
for (Profile p : players) { |
||||
Image panel = p.getStatPanel(w); |
||||
Image panel2 = p.getStatText(w); |
||||
g.drawImage(panel,(int)(x+xx*panel.getWidth(sigIRC.panel)/((rows+cols)/2d)),(int)(y+yy*panel.getHeight(sigIRC.panel)/((rows+cols)/2d)),(int)(panel.getWidth(sigIRC.panel)/((rows+cols)/2d)),(int)(panel.getHeight(sigIRC.panel)/((rows+cols)/2d)),sigIRC.panel); |
||||
g.drawImage(panel2,(int)(x+xx*panel2.getWidth(sigIRC.panel)/((rows+cols)/2d)),(int)(y+yy*panel2.getHeight(sigIRC.panel)/((rows+cols)/2d)),(int)(panel2.getWidth(sigIRC.panel)/((rows+cols)/2d)),(int)(panel2.getHeight(sigIRC.panel)/((rows+cols)/2d)),sigIRC.panel); |
||||
if (xx+1<cols) { |
||||
xx++; |
||||
} else { |
||||
yy++; |
||||
xx=0; |
||||
} |
||||
} |
||||
} |
||||
} |
@ -1,226 +0,0 @@ |
||||
package sig.modules.RabiRace; |
||||
|
||||
import java.awt.Color; |
||||
import java.awt.Dimension; |
||||
import java.awt.event.ActionEvent; |
||||
import java.awt.event.ActionListener; |
||||
import java.io.File; |
||||
import java.io.IOException; |
||||
import java.net.MalformedURLException; |
||||
import java.net.URL; |
||||
|
||||
import javax.swing.Box; |
||||
import javax.swing.BoxLayout; |
||||
import javax.swing.JButton; |
||||
import javax.swing.JFrame; |
||||
import javax.swing.JLabel; |
||||
import javax.swing.JOptionPane; |
||||
import javax.swing.JPanel; |
||||
import javax.swing.JPasswordField; |
||||
import javax.swing.JTextField; |
||||
import javax.swing.event.DocumentEvent; |
||||
import javax.swing.event.DocumentListener; |
||||
|
||||
import sig.sigIRC; |
||||
import sig.modules.RabiRaceModule; |
||||
import sig.utils.FileUtils; |
||||
import sig.utils.TextUtils; |
||||
|
||||
public class SessionCreateWindow extends JFrame{ |
||||
JPanel container = new JPanel(); |
||||
LengthValidationField session_name = new LengthValidationField(16); |
||||
NumberValidationField maxplayers = new NumberValidationField(); |
||||
JPasswordField pass = new JPasswordField(); |
||||
JButton create = new JButton("Create"); |
||||
|
||||
public SessionCreateWindow() { |
||||
this.setTitle("Create Rabi-Race Session"); |
||||
this.setIconImage(sigIRC.programIcon); |
||||
this.setVisible(false); |
||||
JPanel namepanel = new JPanel(); |
||||
JPanel playerpanel = new JPanel(); |
||||
JPanel passwordpanel = new JPanel(); |
||||
|
||||
JPanel[] panel_list = new JPanel[]{ |
||||
namepanel,playerpanel,passwordpanel |
||||
}; |
||||
|
||||
for (JPanel panel : panel_list) { |
||||
panel.setLayout(new BoxLayout(panel,BoxLayout.LINE_AXIS)); |
||||
panel.setSize(400, 24); |
||||
panel.setMinimumSize(new Dimension(400, 24)); |
||||
panel.add(Box.createRigidArea(new Dimension(24,24))); |
||||
} |
||||
|
||||
JLabel nameLabel = new JLabel("Session Name: "); |
||||
String label = RabiRaceModule.module.myProfile.displayName+"'s Race"; |
||||
if (label.length()>16) { |
||||
label = "My Rabi-Race!"; |
||||
} |
||||
session_name.setText(label); |
||||
|
||||
namepanel.add(nameLabel); |
||||
namepanel.add(session_name); |
||||
|
||||
JLabel playerLabel = new JLabel("Max Players: "); |
||||
maxplayers.setText("4"); |
||||
|
||||
playerpanel.add(playerLabel); |
||||
playerpanel.add(maxplayers); |
||||
|
||||
JLabel passwordLabel = new JLabel("🔑 Password (Optional): "); |
||||
|
||||
playerpanel.add(passwordLabel); |
||||
playerpanel.add(pass); |
||||
|
||||
for (JPanel panel : panel_list) { |
||||
panel.add(Box.createRigidArea(new Dimension(24,24))); |
||||
} |
||||
|
||||
create.setSize(164,24); |
||||
create.setMinimumSize(new Dimension(164,24)); |
||||
create.addActionListener(new ActionListener(){ |
||||
@Override |
||||
public void actionPerformed(ActionEvent ev) { |
||||
if (session_name.getText().length()>session_name.length) { |
||||
JOptionPane.showMessageDialog(RabiRaceModule.createwindow, "Your session name is too long!", "Error!", JOptionPane.WARNING_MESSAGE); |
||||
return; |
||||
} |
||||
if (session_name.getText().length()<=2) { |
||||
JOptionPane.showMessageDialog(RabiRaceModule.createwindow, "Your session name is too short!", "Error!", JOptionPane.WARNING_MESSAGE); |
||||
return; |
||||
} |
||||
if (!TextUtils.isAlphanumeric(session_name.getText())) { |
||||
JOptionPane.showMessageDialog(RabiRaceModule.createwindow, "Your session name has invalid characters! Only A-Z,0-9,!,-,.,? and spaces allowed!", "Error!", JOptionPane.WARNING_MESSAGE); |
||||
return; |
||||
} |
||||
if (!TextUtils.isInteger(maxplayers.getText(), 10)) { |
||||
JOptionPane.showMessageDialog(RabiRaceModule.createwindow, "Your max player count is invalid!", "Error!", JOptionPane.WARNING_MESSAGE); |
||||
return; |
||||
} |
||||
if (Integer.parseInt(maxplayers.getText())>48 || Integer.parseInt(maxplayers.getText())<2) { |
||||
JOptionPane.showMessageDialog(RabiRaceModule.createwindow, "Your max player count needs to be between 2-48!", "Error!", JOptionPane.WARNING_MESSAGE); |
||||
return; |
||||
} |
||||
String hashpass = ""; |
||||
if (String.copyValueOf(pass.getPassword()).length()>0) { |
||||
hashpass = SessionListWindow.GetHashedPassword(String.copyValueOf(pass.getPassword())); |
||||
} |
||||
session_name.setText(session_name.getText().replaceAll(" ", "%20")); |
||||
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=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]); |
||||
} |
||||
if (sessionID!=-1) { |
||||
RabiRaceModule.module.getSessionList(); |
||||
//RabiRaceModule.module.session_listing.data.put(sessionID, new Session());
|
||||
Session session = RabiRaceModule.module.session_listing.data.get(sessionID); |
||||
SessionListWindow.ConnectToSession(session, hashpass); |
||||
setVisible(false); |
||||
} |
||||
//SessionListWindow.ConnectToSession(session, hashedPass);
|
||||
} catch (MalformedURLException e) { |
||||
e.printStackTrace(); |
||||
} catch (IOException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
} |
||||
}); |
||||
|
||||
//create.add(Box.createRigidArea(new Dimension(24,24)));
|
||||
|
||||
container.setLayout(new BoxLayout(container,BoxLayout.PAGE_AXIS)); |
||||
|
||||
container.add(Box.createRigidArea(new Dimension(24,24))); |
||||
container.add(namepanel); |
||||
container.add(playerpanel); |
||||
container.add(passwordpanel); |
||||
container.add(create); |
||||
container.add(Box.createRigidArea(new Dimension(24,24))); |
||||
|
||||
this.add(container); |
||||
this.setSize(400, 192); |
||||
this.setMinimumSize(new Dimension(400, 192)); |
||||
this.setMaximumSize(new Dimension(400, 192)); |
||||
this.setResizable(false); |
||||
} |
||||
|
||||
class LengthValidationField extends JTextField implements DocumentListener{ |
||||
int length = 10; |
||||
|
||||
public LengthValidationField(int maxLength) { |
||||
this.length = maxLength; |
||||
getDocument().addDocumentListener(this); |
||||
} |
||||
|
||||
@Override |
||||
public void changedUpdate(DocumentEvent arg0) { |
||||
} |
||||
|
||||
@Override |
||||
public void insertUpdate(DocumentEvent arg0) { |
||||
ValidateForm(); |
||||
} |
||||
|
||||
protected void ValidateForm() { |
||||
if (fieldIsInvalid()) { |
||||
setBackground(Color.RED); |
||||
} else { |
||||
setBackground(Color.WHITE); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public void removeUpdate(DocumentEvent arg0) { |
||||
ValidateForm(); |
||||
} |
||||
|
||||
protected boolean fieldIsInvalid() { |
||||
return getText().length()>length || getText().length()<=2 || !TextUtils.isAlphanumeric(getText()); |
||||
} |
||||
} |
||||
|
||||
class NumberValidationField extends JTextField implements DocumentListener{ |
||||
|
||||
public NumberValidationField() { |
||||
getDocument().addDocumentListener(this); |
||||
} |
||||
|
||||
@Override |
||||
public void changedUpdate(DocumentEvent arg0) { |
||||
} |
||||
|
||||
@Override |
||||
public void insertUpdate(DocumentEvent arg0) { |
||||
ValidateForm(); |
||||
} |
||||
|
||||
protected void ValidateForm() { |
||||
if (fieldIsInvalid()) { |
||||
setBackground(Color.RED); |
||||
} else { |
||||
setBackground(Color.WHITE); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public void removeUpdate(DocumentEvent arg0) { |
||||
ValidateForm(); |
||||
} |
||||
|
||||
protected boolean fieldIsInvalid() { |
||||
if (!TextUtils.isInteger(getText(), 10)) { |
||||
return true; |
||||
} |
||||
int val = Integer.parseInt(getText()); |
||||
if (val>48 || val<2) { |
||||
return true; |
||||
} |
||||
return false; |
||||
} |
||||
} |
||||
} |
@ -1,459 +0,0 @@ |
||||
package sig.modules; |
||||
|
||||
import java.awt.Color; |
||||
import java.awt.Graphics; |
||||
import java.awt.Image; |
||||
import java.awt.Rectangle; |
||||
import java.awt.event.MouseEvent; |
||||
import java.awt.geom.Rectangle2D; |
||||
import java.awt.image.BufferedImage; |
||||
import java.io.File; |
||||
import java.io.IOException; |
||||
import java.net.MalformedURLException; |
||||
import java.net.URL; |
||||
import java.util.ArrayList; |
||||
import java.util.Arrays; |
||||
import java.util.ConcurrentModificationException; |
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
import java.util.concurrent.Executors; |
||||
import java.util.concurrent.ScheduledExecutorService; |
||||
import java.util.concurrent.TimeUnit; |
||||
|
||||
import javax.imageio.ImageIO; |
||||
|
||||
import com.sun.jna.Memory; |
||||
import com.sun.jna.Pointer; |
||||
import com.sun.jna.platform.win32.Kernel32; |
||||
import com.sun.jna.platform.win32.WinNT; |
||||
import com.sun.jna.platform.win32.WinNT.HANDLE; |
||||
|
||||
import sig.FileManager; |
||||
import sig.Module; |
||||
import sig.sigIRC; |
||||
import sig.modules.RabiRace.ClickableButton; |
||||
import sig.modules.RabiRace.ColorCycler; |
||||
import sig.modules.RabiRace.CreateButton; |
||||
import sig.modules.RabiRace.JoinButton; |
||||
import sig.modules.RabiRace.MemoryData; |
||||
import sig.modules.RabiRace.Profile; |
||||
import sig.modules.RabiRace.Session; |
||||
import sig.modules.RabiRace.SessionCreateWindow; |
||||
import sig.modules.RabiRace.SessionListData; |
||||
import sig.modules.RabiRace.SessionListWindow; |
||||
import sig.modules.RabiRibi.MemoryOffset; |
||||
import sig.modules.RabiRibi.MemoryType; |
||||
import sig.modules.utils.PsapiTools; |
||||
import sig.utils.DrawUtils; |
||||
import sig.utils.FileUtils; |
||||
import sig.utils.TextUtils; |
||||
|
||||
public class RabiRaceModule extends Module{ |
||||
final static String ITEMS_DIRECTORY = sigIRC.BASEDIR+"sigIRC/rabi-ribi/items/"; |
||||
final int PROCESS_PERMISSIONS = WinNT.PROCESS_QUERY_INFORMATION | WinNT.PROCESS_VM_READ; |
||||
boolean foundRabiRibi = false; |
||||
int rabiRibiPID = -1; |
||||
long rabiRibiMemOffset = 0; |
||||
public HANDLE rabiribiProcess = null; |
||||
public static HashMap<String,Image> image_map = new HashMap<String,Image>(); |
||||
public static ColorCycler rainbowcycler = new ColorCycler(new Color(255,0,0,96),8); |
||||
public Profile myProfile = new Profile(this,false); |
||||
public static RabiRaceModule module; |
||||
public static SessionListWindow window; |
||||
public static SessionCreateWindow createwindow; |
||||
public static Session mySession; |
||||
boolean firstCheck=false; |
||||
public List<ScrollingText> messages = new ArrayList<ScrollingText>(); |
||||
public static int lastScrollX = 0; |
||||
boolean firstUpdate=true; |
||||
|
||||
public SessionListData session_listing = new SessionListData(); |
||||
|
||||
ClickableButton join_button,create_button; |
||||
|
||||
public static List<MemoryData> key_items_list = new ArrayList<MemoryData>(); |
||||
public static List<MemoryData> badges_list = new ArrayList<MemoryData>(); |
||||
|
||||
public RabiRaceModule(Rectangle2D bounds, String moduleName) { |
||||
super(bounds, moduleName); |
||||
//Initialize();
|
||||
Initialize(); |
||||
module = this; |
||||
window = new SessionListWindow(); |
||||
window.setVisible(false); |
||||
createwindow = new SessionCreateWindow(); |
||||
createwindow.setVisible(false); |
||||
//System.out.println("Money value is: "+readIntFromMemory(MemoryOffset.MONEY));
|
||||
} |
||||
|
||||
private void Initialize() { |
||||
CheckRabiRibiClient(); |
||||
|
||||
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); |
||||
scheduler.scheduleWithFixedDelay(()->{ |
||||
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); |
||||
ScheduledExecutorService scheduler2 = Executors.newScheduledThreadPool(1); |
||||
scheduler2.scheduleWithFixedDelay(()->{ |
||||
if (foundRabiRibi) { |
||||
UpdateMyProfile(); |
||||
} |
||||
}, 250, 250, TimeUnit.MILLISECONDS); |
||||
|
||||
File dir = new File(ITEMS_DIRECTORY); |
||||
|
||||
for (MemoryData data : MemoryData.values()) { |
||||
//Attempt to fetch from server.
|
||||
new FileManager("sigIRC/rabi-ribi/items/"+data.img_path).verifyAndFetchFileFromServer(); |
||||
} |
||||
new FileManager("sigIRC/rabi-ribi/items/easter_egg.png").verifyAndFetchFileFromServer(); |
||||
new FileManager("sigIRC/rabi-ribi/items/health_up.png").verifyAndFetchFileFromServer(); |
||||
new FileManager("sigIRC/rabi-ribi/items/mana_up.png").verifyAndFetchFileFromServer(); |
||||
new FileManager("sigIRC/rabi-ribi/items/regen_up.png").verifyAndFetchFileFromServer(); |
||||
new FileManager("sigIRC/rabi-ribi/items/pack_up.png").verifyAndFetchFileFromServer(); |
||||
new FileManager("sigIRC/rabi-ribi/items/attack_up.png").verifyAndFetchFileFromServer(); |
||||
|
||||
String[] images = dir.list(); |
||||
List<String> filtered_images = new ArrayList<String>(); |
||||
for (String file : images) { |
||||
File f = new File(ITEMS_DIRECTORY+file); |
||||
if (!f.isDirectory()) { |
||||
filtered_images.add(file); |
||||
} |
||||
} |
||||
images = filtered_images.toArray(new String[filtered_images.size()]); |
||||
for (String image : images) { |
||||
//System.out.println("Loaded "+image);
|
||||
image_map.put(image, sigIRC.readImage(ITEMS_DIRECTORY+image)); |
||||
} |
||||
|
||||
for (MemoryData md : MemoryData.values()) { |
||||
if (md.key_item) { |
||||
key_items_list.add(md); |
||||
} else { |
||||
badges_list.add(md); |
||||
} |
||||
} |
||||
|
||||
//trimeadProfile.username = "trimead";
|
||||
|
||||
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); |
||||
} |
||||
|
||||
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/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"); |
||||
for (String s : data) { |
||||
if (s.length()>0) { |
||||
messages.add(new ScrollingText(s,(int)(lastScrollX+position.getWidth()+24),(int)(position.getHeight()-28))); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public void getSessionList() { |
||||
File file = new File(sigIRC.BASEDIR+"sessions"); |
||||
try { |
||||
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); |
||||
} catch (IOException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
if (mySession==null) { |
||||
join_button.setButtonLabel("Join Session ("+session_listing.getSessions().size()+")"); |
||||
} else { |
||||
join_button.setButtonLabel("Leave Session"); |
||||
} |
||||
window.UpdateSessionList(); |
||||
} |
||||
|
||||
public void mousePressed(MouseEvent ev) { |
||||
if (firstCheck && join_button.mouseInsideBounds(ev)) { |
||||
join_button.onClickEvent(ev); |
||||
} |
||||
if (firstCheck && mySession==null && create_button.mouseInsideBounds(ev)) { |
||||
create_button.onClickEvent(ev); |
||||
} |
||||
} |
||||
|
||||
private void CheckRabiRibiClient() { |
||||
List<Integer> pids; |
||||
try { |
||||
pids = PsapiTools.getInstance().enumProcesses(); |
||||
boolean found=false; |
||||
for (Integer pid : pids) { |
||||
HANDLE process = Kernel32.INSTANCE.OpenProcess(PROCESS_PERMISSIONS, true, pid); |
||||
List<sig.modules.utils.Module> hModules; |
||||
try { |
||||
hModules = PsapiTools.getInstance().EnumProcessModules(process); |
||||
for(sig.modules.utils.Module m: hModules){ |
||||
//System.out.println(m.getFileName()+":"+m.getEntryPoint());
|
||||
if (m.getFileName().contains("rabiribi")) { |
||||
found=true; |
||||
if (!foundRabiRibi) { |
||||
rabiRibiMemOffset = Pointer.nativeValue(m.getLpBaseOfDll().getPointer()); |
||||
System.out.println("Found an instance of Rabi-Ribi at 0x"+Long.toHexString(rabiRibiMemOffset)+" | File:"+m.getFileName()+","+m.getBaseName()); |
||||
rabiRibiPID=pid; |
||||
foundRabiRibi=true; |
||||
rabiribiProcess=process; |
||||
break; |
||||
} |
||||
break; |
||||
} |
||||
} |
||||
if (found) { |
||||
break; |
||||
} |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
} |
||||
if (process!=null) { |
||||
Kernel32.INSTANCE.CloseHandle(process); |
||||
} |
||||
} |
||||
if (!found && foundRabiRibi) { |
||||
foundRabiRibi=false; |
||||
System.out.println("Rabi-Ribi process lost."); |
||||
} |
||||
} catch (Exception e) { |
||||
e.printStackTrace(); |
||||
} |
||||
} |
||||
|
||||
public void run() { |
||||
if (foundRabiRibi) { |
||||
rainbowcycler.run(); |
||||
if (window!=null) { |
||||
window.run(); |
||||
} |
||||
for (int i=0;i<messages.size();i++) { |
||||
if (!messages.get(i).run()) { |
||||
messages.remove(i--); |
||||
} |
||||
} |
||||
if (lastScrollX>0) { |
||||
lastScrollX-=ScrollingText.SCROLLSPD; |
||||
} |
||||
} |
||||
} |
||||
|
||||
private void UpdateMyProfile() { |
||||
if (foundRabiRibi) { |
||||
//System.out.println("Called.");
|
||||
int paused = readIntFromMemory(MemoryOffset.PAUSED); |
||||
float itempct = readFloatFromMemory(MemoryOffset.ITEM_PERCENT); |
||||
myProfile.isPaused = paused==1; |
||||
//System.out.println(itempct+","+paused);
|
||||
if (paused==0 && itempct>=0) { |
||||
if (mySession!=null) { |
||||
myProfile.archiveAllValues(); |
||||
} |
||||
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); |
||||
myProfile.regenUps = readItemCountFromMemory(MemoryOffset.REGENUP_START,MemoryOffset.REGENUP_END); |
||||
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.updateClientValues(); |
||||
if (mySession!=null && !firstUpdate) { |
||||
myProfile.compareAndAnnounceAllChangedValues(); |
||||
} |
||||
firstUpdate=false; |
||||
} |
||||
} |
||||
} |
||||
|
||||
public void ApplyConfigWindowProperties() { |
||||
sigIRC.rabiracemodule_X=(int)position.getX(); |
||||
sigIRC.rabiracemodule_Y=(int)position.getY(); |
||||
sigIRC.config.setInteger("RABIRACE_module_X", sigIRC.rabiracemodule_X); |
||||
sigIRC.config.setInteger("RABIRACE_module_Y", sigIRC.rabiracemodule_Y); |
||||
} |
||||
|
||||
/*public int readIntFromErinaData(MemoryOffset val) { |
||||
return readIntFromPointer(val,MemoryOffset.ENTITY_ARRAY); |
||||
} |
||||
|
||||
public float readFloatFromErinaData(MemoryOffset val) { |
||||
return readFloatFromPointer(val,MemoryOffset.ENTITY_ARRAY); |
||||
}*/ |
||||
|
||||
public int readIntFromMemory(long offset) { |
||||
Memory mem = new Memory(4); |
||||
Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(rabiRibiMemOffset+offset), mem, 4, null); |
||||
return mem.getInt(0); |
||||
} |
||||
|
||||
public float readFloatFromMemory(long offset) { |
||||
Memory mem = new Memory(4); |
||||
Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(rabiRibiMemOffset+offset), mem, 4, null); |
||||
return mem.getFloat(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); |
||||
return mem.getFloat(0); |
||||
} |
||||
|
||||
public int readIntFromMemoryOffset(MemoryOffset val, long pointer) { |
||||
Memory mem = new Memory(4); |
||||
Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(pointer+val.getOffset()), mem, 4, null); |
||||
return mem.getInt(0); |
||||
} |
||||
|
||||
public float readDirectFloatFromMemoryLocation(long pointer) { |
||||
Memory mem = new Memory(4); |
||||
Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(pointer), mem, 4, null); |
||||
return mem.getFloat(0); |
||||
} |
||||
|
||||
public int readDirectIntFromMemoryLocation(long pointer) { |
||||
Memory mem = new Memory(4); |
||||
Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(pointer), mem, 4, null); |
||||
return mem.getInt(0); |
||||
} |
||||
|
||||
public int readIntFromPointer(MemoryOffset val, MemoryOffset pointer) { |
||||
Memory mem = new Memory(4); |
||||
Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(readIntFromMemory(pointer.getOffset())+val.getOffset()), mem, 4, null); |
||||
return mem.getInt(0); |
||||
} |
||||
|
||||
public float readFloatFromPointer(MemoryOffset val, MemoryOffset pointer) { |
||||
Memory mem = new Memory(4); |
||||
Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(readIntFromMemory(pointer.getOffset())+val.getOffset()), mem, 4, null); |
||||
return mem.getFloat(0); |
||||
} |
||||
|
||||
public int readIntFromMemory(MemoryOffset val) { |
||||
return (int)readFromMemory(val,MemoryType.INTEGER); |
||||
} |
||||
|
||||
public float readFloatFromMemory(MemoryOffset val) { |
||||
return (float)readFromMemory(val,MemoryType.FLOAT); |
||||
} |
||||
|
||||
Object readFromMemory(MemoryOffset val, MemoryType type) { |
||||
Memory mem = new Memory(type.getSize()); |
||||
Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(rabiRibiMemOffset+val.getOffset()), mem, type.getSize(), null); |
||||
switch (type) { |
||||
case FLOAT: |
||||
return mem.getFloat(0); |
||||
case INTEGER: |
||||
return mem.getInt(0); |
||||
default: |
||||
System.out.println("WARNING! Type "+type+" does not have a defined value."); |
||||
return -1; |
||||
} |
||||
} |
||||
|
||||
int readItemCountFromMemory(MemoryOffset start_range, |
||||
MemoryOffset end_range) { |
||||
int count=0; |
||||
for (long i=start_range.getOffset();i<=end_range.getOffset();i++) { |
||||
if (readIntFromMemory(i)==1) { |
||||
count++; |
||||
} |
||||
} |
||||
return count; |
||||
} |
||||
|
||||
public void draw(Graphics g) { |
||||
super.draw(g); |
||||
|
||||
if (!foundRabiRibi) { |
||||
DrawUtils.drawTextFont(g, sigIRC.panel.userFont, position.getX(), position.getY()+26, Color.BLACK, "Rabi-Ribi not found! Please start it."); |
||||
} else { |
||||
//myProfile.draw(g);
|
||||
Image panel = myProfile.getStatPanel((int)position.getWidth()); |
||||
g.drawImage(panel, (int)position.getX(), (int)position.getY(), sigIRC.panel); |
||||
g.drawImage(myProfile.getStatText((int)position.getWidth()), (int)position.getX(), (int)position.getY(), sigIRC.panel); |
||||
|
||||
//Profile.DrawMultiPanel(g, (int)(position.getX()), (int)(position.getY())+panel.getHeight(sigIRC.panel), (int)position.getWidth(), testing);
|
||||
if (mySession!=null) { |
||||
List<Profile> sessionPlayers = new ArrayList<Profile>(); |
||||
for (Profile p : mySession.getPlayers()) { |
||||
if (!p.username.equalsIgnoreCase(myProfile.username)) { |
||||
sessionPlayers.add(p); |
||||
//System.out.println("Found unique player "+p);
|
||||
} |
||||
} |
||||
Profile.DrawMultiPanel(g, (int)(position.getX()), (int)(position.getY())+panel.getHeight(sigIRC.panel), (int)position.getWidth(), sessionPlayers); |
||||
} |
||||
|
||||
if (firstCheck) { |
||||
join_button.draw(g); |
||||
if (mySession==null) { |
||||
create_button.draw(g); |
||||
} |
||||
} |
||||
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); |
||||
} |
||||
} |
||||
} |
||||
|
||||
class ScrollingText{ |
||||
String msg; |
||||
int x; |
||||
int y; |
||||
Rectangle2D bounds; |
||||
final static int SCROLLSPD = 4; |
||||
|
||||
public ScrollingText(String message, int x, int y) { |
||||
this.msg = message; |
||||
this.x = x; |
||||
this.y = y; |
||||
this.bounds = TextUtils.calculateStringBoundsFont(message, sigIRC.panel.rabiRibiTinyDisplayFont); |
||||
RabiRaceModule.lastScrollX += bounds.getWidth() + 96; |
||||
} |
||||
|
||||
public boolean run() { |
||||
x-=SCROLLSPD; |
||||
if (x+bounds.getWidth()<0) { |
||||
return false; |
||||
} |
||||
return true; |
||||
} |
||||
|
||||
public void draw(Graphics g) { |
||||
if (x<position.getWidth()) { |
||||
DrawUtils.drawOutlineText(g, sigIRC.panel.rabiRibiTinyDisplayFont, position.getX()+x, position.getY()+y-6, 2, Color.WHITE, Color.GRAY, msg); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -1,178 +0,0 @@ |
||||
package sig.modules.RabiRibi; |
||||
|
||||
public enum MemoryOffset { |
||||
MONEY(0xD654CC,0x12DA99C+OffsetHelper.KEY_ITEM_OFFSET_V185_TO_V1851), |
||||
PLAYTIME(0xD642D8,0x12D97A8+OffsetHelper.KEY_ITEM_OFFSET_V185_TO_V1851), //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), |
||||
HEALTHUP_END(0xD63528,0xD63528+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
ATTACKUP_START(0xD6352C,0xD6352C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
ATTACKUP_END(0xD63628,0xD63628+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
MANAUP_START(0xD6362C,0xD6362C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
MANAUP_END(0xD63728,0xD63728+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
REGENUP_START(0xD6372C,0xD6372C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
REGENUP_END(0xD63828,0xD63828+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
PACKUP_START(0xD6382C,0xD6382C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
PACKUP_END(0xD63928,0xD63928+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
ENTITY_ARRAY(0x0096DA3C,0x012E3B08), //Erina Data Pointer.
|
||||
ERINA_HP(0x4D8,0X4D8), |
||||
ERINA_MAXHP(0x4E8,0x4E8), |
||||
ERINA_XPOS(0xC,0xC), |
||||
ERINA_YPOS(0x10,0x10), |
||||
ERINA_XSPEED(0x470,0x470), //Relative to Entity Array.
|
||||
ERINA_YSPEED(0x474,0x474), //Relative to Entity Array.
|
||||
MAPID(0xA600AC,0x9FF3BC), |
||||
CAMERA_XPOS(0x991AF4,0x12EED24), |
||||
CAMERA_XPOSVIEW(0,0xC969A4), |
||||
CAMERA_YPOS(0xABD0A4,0x12FB7E4), |
||||
CAMERA_YPOSVIEW(0,0xCA8AB4), |
||||
//ENTITY_SIZE(0x704),
|
||||
ENTITY_ID(0x4F4,0x4F8), |
||||
ENTITY_HP(0x4D8,0x4D8), |
||||
ENTITY_MAXHP(0x4E8,0x4E8), |
||||
ENTITY_ISACTIVE(0x674,0x674), |
||||
ENTITY_ANIMATION(0x678,0x678), |
||||
ENTITY_XPOS(0xC,0xC), |
||||
ENTITY_YPOS(0x10,0x10), |
||||
ENTITY_COLOR(0x1C,0x1C), |
||||
//TRANSITION_COUNTER(0xA7661C),*/
|
||||
WARP_TRANSITION_COUNTER(0,0x582CE0+OffsetHelper.KEY_ITEM_OFFSET_V185_TO_V1851), //Detects pausing
|
||||
|
||||
|
||||
|
||||
GAME_DIFFICULTY(0xD64338,0xD64338+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
GAME_LOOP(0xD6D05C,0xD6D05C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
|
||||
HAMMER(0xD632B0,0xD632B0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
AIR_JUMP(0xD632B4,0xD632B4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
SLIDING_POWDER(0xD632B8,0xD632B8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
CARROT_BOMB(0xD632BC,0xD632BC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
HOURGLASS(0xD632C0,0xD632C0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
SPEED_BOOST(0xD632C4,0xD632C4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
AUTO_EARRINGS(0xD632C8,0xD632C8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
RIBBON(0xD632CC,0xD632CC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
SOUL_HEART(0xD632D0,0xD632D0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
RABI_SLIPPERS(0xD632D4,0xD632D4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BUNNY_WHIRL(0xD632D8,0xD632D8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
QUICK_BARETTE(0xD632DC,0xD632DC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BOOK_OF_CARROT(0xD632E0,0xD632E0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
CHAOS_ROD(0xD632E4,0xD632E4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
HAMMER_WAVE(0xD632E8,0xD632E8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
HAMMER_ROLL(0xD632EC,0xD632EC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
LIGHT_ORB(0xD632F0,0xD632F0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
WATER_ORB(0xD632F4,0xD632F4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
FIRE_ORB(0xD632F8,0xD632F8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
NATURE_ORB(0xD632FC,0xD632FC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
P_HAIRPIN(0xD63300,0x12D87D0+OffsetHelper.KEY_ITEM_OFFSET_V185_TO_V1851), |
||||
SUNNY_BEAM(0xD63304,0xD63304+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
PLUS_NECKLACE(0xD63308,0xD63308+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
CYBER_FLOWER(0xD6330C,0xD6330C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
HEALING_STAFF(0xD63310,0xD63310+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
MAX_BRACELET(0xD63314,0xD63314+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
EXPLODE_SHOT(0xD63318,0xD63318+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
AIR_DASH(0xD6331C,0xD6331C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BUNNY_STRIKE(0xD63320,0xD63320+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
STRANGE_BOX(0xD63324,0xD63324+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
WALL_JUMP(0xD63328,0xD63328+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
SPIKE_BARRIER(0xD6332C,0xD6332C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BUNNY_AMULET(0xD63330,0xD63330+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
CHARGE_RING(0xD63334,0xD63334+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
CARROT_SHOOTER(0xD63338,0xD63338+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
SUPER_CARROT(0xD6333C,0xD6333C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
RUMI_DONUT(0xD63340,0xD63340+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
RUMI_CAKE(0xD63344,0xD63344+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
GOLD_CARROT(0xD63348,0xD63348+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
COCOA_BOMB(0xD6334C,0xD6334C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM1(0xD63350,0xD63350+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
TROPHY(0xD63354,0xD63354+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
EXCLAMATION_POINT(0xD63358,0xD63358+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM2(0xD6335C,0xD6335C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM3(0xD63360,0xD63360+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM4(0xD63364,0xD63364+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
RAINBOW_MAGIC(0xD63368,0xD63368+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM5(0xD6336C,0xD6336C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM6(0xD63370,0xD63370+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM7(0xD63374,0xD63374+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM8(0xD63378,0xD63378+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM9(0xD6337C,0xD6337C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM10(0xD63380,0xD63380+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM11(0xD63384,0xD63384+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM12(0xD63388,0xD63388+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM13(0xD6338C,0xD6338C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
UNKNOWN_ITEM14(0xD63390,0xD63390+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
/*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), |
||||
FAIRYS_FLUTE(0,0x12D8874+OffsetHelper.KEY_ITEM_OFFSET_V185_TO_V1851), |
||||
BUNNY_MEMORIES(0,0x12D7878), |
||||
WIND_BLESSING(0,0x12D7870), |
||||
DLC_ITEM4(0xD633A0,0xD633A0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_HEALTH_PLUS(0xD633AC,0xD633AC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_HEALTH_SURGE(0xD633B0,0xD633B0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_MANA_PLUS(0xD633B4,0xD633B4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_MANA_SURGE(0xD633B8,0xD633B8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_CRISIS_BOOST(0xD633BC,0xD633BC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_ATK_GROW(0xD633C0,0xD633C0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_DEF_GROW(0xD633C4,0xD633C4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_ATK_TRADE(0xD633C8,0xD633C8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_DEF_TRADE(0xD633CC,0xD633CC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_ARM_STRENGTH(0xD633D0,0xD633D0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_CARROT_BOOST(0xD633D4,0xD633D4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_WEAKEN(0xD633D8,0xD633D8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_SELF_DEFENSE(0xD633DC,0xD633DC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_ARMORED(0xD633E0,0xD633E0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_LUCKY_SEVEN(0xD633E4,0xD633E4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_HEX_CANCEL(0xD633E8,0xD633E8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_PURE_LOVE(0xD633EC,0xD633EC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_TOXIC_STRIKE(0xD633F0,0xD633F0+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_FRAME_CANCEL(0xD633F4,0xD633F4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_HEALTH_WAGER(0xD633F8,0xD633F8+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_MANA_WAGER(0xD633FC,0xD633FC+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_STAMINA_PLUS(0xD63400,0xD63400+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_BLESSED(0xD63404,0xD63404+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_HITBOX_DOWN(0xD63408,0xD63408+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_CASHBACK(0xD6340C,0xD6340C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_SURVIVAL(0xD63410,0xD63410+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_TOP_FORM(0xD63414,0xD63414+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_TOUGH_SKIN(0xD63418,0xD63418+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_ERINA_BADGE(0xD6341C,0xD6341C+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_RIBBON_BADGE(0xD63420,0xD63420+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_AUTO_TRIGGER(0xD63424,0xD63424+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
BADGE_LILITHS_GIFT(0xD63428,0xD63428+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
//13413E8
|
||||
ITEM_PERCENT(0,0x13413E8), |
||||
MAP_PERCENT(0,0x13413E4), |
||||
RAINBOW_EGG_COUNT(0xD65FD4,0xD65FD4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851), |
||||
PAUSED(0,0xC969A0), |
||||
; |
||||
|
||||
long offset; |
||||
long offset_v185; |
||||
long latest_offset; |
||||
|
||||
MemoryOffset(long offset,long offset_v185) { |
||||
this.offset=offset; |
||||
this.offset_v185=offset_v185; |
||||
|
||||
//TODO CHANGE THIS IF PUBLIC VERSION CHANGES!
|
||||
this.latest_offset = offset_v185; |
||||
} |
||||
|
||||
public long getOffset() { |
||||
return latest_offset; |
||||
} |
||||
|
||||
public long getOffsetV175() { |
||||
return offset; |
||||
} |
||||
|
||||
public long getOffsetV185() { |
||||
return offset_v185; |
||||
} |
||||
} |
||||
|
||||
class OffsetHelper{ |
||||
final static long KEY_ITEM_OFFSET_V175_TO_V185 = 0x5754D0; |
||||
final static long KEY_ITEM_OFFSET_V175_TO_V1851 = 0x5744D0; |
||||
final static long KEY_ITEM_OFFSET_V185_TO_V1851 = -0x1000; |
||||
} |
@ -0,0 +1,10 @@ |
||||
package sig; |
||||
|
||||
public class ModuleLinker { |
||||
public String name = ""; |
||||
public Module mod; |
||||
public ModuleLinker(String name,Module mod) { |
||||
this.name = name; |
||||
this.mod = mod; |
||||
} |
||||
} |
@ -0,0 +1,208 @@ |
||||
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
|
||||
|
||||
} |
||||
} |
@ -0,0 +1,50 @@ |
||||
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); |
||||
} |
||||
} |
||||
} |
||||
} |