Compare commits

..

11 Commits
master ... dev

  1. 24
      .classpath
  2. 9
      .gitignore
  3. 4
      .settings/org.eclipse.core.resources.prefs
  4. 100
      .settings/org.eclipse.jdt.core.prefs
  5. BIN
      Boss Sprites/Cirno.png
  6. BIN
      Boss Sprites/DevilMachine.png
  7. BIN
      Boss Sprites/ENEMYDiamondMasahirorin.png
  8. BIN
      Boss Sprites/Masked_Maid_Girl.png
  9. BIN
      Boss Sprites/Starman_Junior.png
  10. BIN
      Boss Sprites/TME_-100.png
  11. BIN
      Boss Sprites/TME_-10000.png
  12. BIN
      Boss Sprites/TME_-101.png
  13. BIN
      Boss Sprites/TME_-84.png
  14. BIN
      Boss Sprites/TME_103.png
  15. BIN
      Boss Sprites/TME_104.png
  16. BIN
      Boss Sprites/TME_108.png
  17. BIN
      Boss Sprites/TME_120.png
  18. BIN
      Boss Sprites/TME_122.png
  19. BIN
      Boss Sprites/TME_136.png
  20. BIN
      Boss Sprites/TME_137.png
  21. BIN
      Boss Sprites/TME_138.png
  22. BIN
      Boss Sprites/TME_15.png
  23. BIN
      Boss Sprites/TME_200.png
  24. BIN
      Boss Sprites/TME_202.png
  25. BIN
      Boss Sprites/TME_203.png
  26. BIN
      Boss Sprites/TME_23.png
  27. BIN
      Boss Sprites/TME_24.png
  28. BIN
      Boss Sprites/TME_33.png
  29. BIN
      Boss Sprites/TME_38.png
  30. BIN
      Boss Sprites/TME_43.png
  31. BIN
      Boss Sprites/TME_44.png
  32. BIN
      Boss Sprites/TME_48.png
  33. BIN
      Boss Sprites/TME_53.png
  34. BIN
      Boss Sprites/TME_55.png
  35. BIN
      Boss Sprites/TME_63.png
  36. BIN
      Boss Sprites/TME_68.png
  37. BIN
      Boss Sprites/TME_73.png
  38. BIN
      Boss Sprites/TME_74.png
  39. BIN
      Boss Sprites/TME_83.png
  40. BIN
      Boss Sprites/TME_900000.png
  41. BIN
      Boss Sprites/TME_999997.png
  42. BIN
      Boss Sprites/TME_999999.png
  43. BIN
      Boss Sprites/Youmu_Never_Loses.png
  44. BIN
      Unifont.ttf
  45. BIN
      lib/basicplayer3.0.jar
  46. BIN
      lib/commons-logging-api.jar
  47. BIN
      lib/jl1.0.jar
  48. BIN
      lib/jogg-0.0.7.jar
  49. BIN
      lib/jorbis-0.0.15.jar
  50. BIN
      lib/jspeex0.9.7.jar
  51. BIN
      lib/mp3spi1.9.4.jar
  52. BIN
      lib/resource/CP_Font.ttf
  53. BIN
      lib/resource/deselected_button.png
  54. BIN
      lib/resource/selected_button.png
  55. BIN
      lib/resource/sigIRCicon.png
  56. 1
      lib/resource/text/introText.html
  57. 12
      lib/resource/text/setupProgramSettings.html
  58. 1
      lib/resource/text/setupTwitchName.html
  59. 1
      lib/resource/text/setupoauthToken.html
  60. BIN
      lib/tritonus_share.jar
  61. BIN
      lib/vorbisspi1.0.2.jar
  62. 76
      sigIRCv2.conf.backup
  63. BIN
      sigIRCv2.jar
  64. 2
      src/sig/BackgroundColorButton.java
  65. 8
      src/sig/Emoticon.java
  66. 20
      src/sig/FileManager.java
  67. 53
      src/sig/ListenerPanel.java
  68. 290
      src/sig/Module.java
  69. 10
      src/sig/ModuleLinker.java
  70. 208
      src/sig/ModuleSelector.java
  71. 50
      src/sig/ModuleSelectorButton.java
  72. 213
      src/sig/MyPanel.java
  73. 31
      src/sig/ScrollingText.java
  74. 7
      src/sig/SubEmoticon.java
  75. 2
      src/sig/TextRow.java
  76. 6
      src/sig/TwitchEmote.java
  77. 16
      src/sig/UpdateEvent.java
  78. 43
      src/sig/modules/Bandori/SongPart.java
  79. 482
      src/sig/modules/BandoriModule.java
  80. 61
      src/sig/modules/ChatLog/ChatLogMessage.java
  81. 9
      src/sig/modules/ChatLog/ChatLogTwitchEmote.java
  82. 94
      src/sig/modules/ChatLogModule.java
  83. 2
      src/sig/modules/Controller/ClickableButton.java
  84. 4
      src/sig/modules/Controller/ControlConfigurationWindow.java
  85. 219
      src/sig/modules/ControllerModule.java
  86. 303
      src/sig/modules/DDRStepModule.java
  87. 10
      src/sig/modules/MapPoint.java
  88. 2
      src/sig/modules/RabiRace/AvatarSelectionWindow.java
  89. 16
      src/sig/modules/RabiRace/ClickableButton.java
  90. 81
      src/sig/modules/RabiRace/ColorLocation.java
  91. 8
      src/sig/modules/RabiRace/JoinButton.java
  92. 26
      src/sig/modules/RabiRace/MarkMapButton.java
  93. 2
      src/sig/modules/RabiRace/MemoryData.java
  94. 536
      src/sig/modules/RabiRace/Profile.java
  95. 53
      src/sig/modules/RabiRace/Session.java
  96. 49
      src/sig/modules/RabiRace/SessionCreateWindow.java
  97. 10
      src/sig/modules/RabiRace/SessionListWindow.java
  98. 558
      src/sig/modules/RabiRaceModule.java
  99. 278
      src/sig/modules/RabiRibi/MemoryOffset.java
  100. 35
      src/sig/modules/RabiRibiModule.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -2,8 +2,9 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="lib"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<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="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"/>
@ -14,5 +15,26 @@
<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="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/basicplayer3.0.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/commons-io-2.5.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/commons-logging-api.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/jl1.0.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/jna-4.5.0.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/jna-platform-4.5.0.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/jogg-0.0.7.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/jorbis-0.0.15.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/jspeex0.9.7.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-glfw.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-glfw-natives-linux.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-glfw-natives-macos.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-glfw-natives-windows.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-natives-linux.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-natives-macos.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/lwjgl-natives-windows.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/mp3spi1.9.4.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/tritonus_share.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/twitch-api-wrapper-0.3-jar-with-dependencies.jar"/>
<classpathentry kind="lib" path="C:/Users/Joshua Sigona/git/sigIRCv2/lib/vorbisspi1.0.2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

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 +0,0 @@
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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

@ -0,0 +1 @@
<img src="../sigIRCicon.png" style="float:left;padding-right:5px;vertical-align:text-bottom;"><font size="5"><b>sigIRC</b> allows you to present dynamic content to viewers on stream and provides various features that may be helpful to you as a streamer. Click <i>Next</i> to begin the setup process.</font>

@ -0,0 +1,12 @@
<font size="5">Now it's time to configure basic features of <b>sigIRC</b>. sigIRC provides the following modules:
<br>
<ul>
<li><b>Scrolling Chat</b> - Displays scrolling chat messages across the screen as users of your channel talk.</li>
<li><b>Chat Log</b> - Displays a box that contains the latest chat messages from your channel for that day.</li>
<li><b>Controller</b> - Displays a controller on screen and allows you to configure the buttons and display so viewers can see your button inputs.</li>
<li><b>Twitch</b> - Displays a bar that shows your channel's stream uptime, number of followers, channel view, and current viewers. Also announces new followers of your stream.</li>
<li><b>Rabi-Race</b> - For the game <b>Rabi-Ribi</b>. A tracker that allows players of the game to connect to each other in game rooms and see each others' progress as they race. Supports randomizer Egg Hunts and Item Hunts.</li>
<li><b>Touhou Mother</b> - For the game <b>Touhou Mother</b>. A tracker that displays boss health whenever you get into a boss encounter, the amount of time the boss fight takes, and how much damage your party members deal.</li>
</ul>
<br><br>
Each module will open up in a separate window that you can place and resize on your screen as you see fit.</font>

@ -0,0 +1 @@
<font size="5"><b>sigIRC</b> uses your Twitch account in order to retrieve and send data. Please input your Twitch username below and hit <i>Next</i> to continue. You will be asked for authentication details on the next screen.</font>

@ -0,0 +1 @@
<font size="5">Below you will see a button to <i><a href="https://twitchapps.com/tmi/">https://twitchapps.com/tmi/</a></i> which will allow you to retrieve an <b>oauth Token</b>. Connect to Twitch and generate an <b>oauth token</b>, then copy and paste the token into the box below to grant this program the ability to use Twitch services.</font>

Binary file not shown.

Binary file not shown.

@ -1,76 +0,0 @@
#
#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

Binary file not shown.

@ -35,7 +35,7 @@ public class BackgroundColorButton {
public void draw(Graphics g) {
if (buttonEnabled) {
g.drawImage(buttonimg, x, y, sigIRC.panel);
g.drawImage(buttonimg, x, y, null);
}
}

@ -31,8 +31,8 @@ public class Emoticon {
System.out.println("Saved to "+file.getName()+".");
emotename = emoteName;
}
spacefiller = GetSpaceLength(sigIRC.panel.programFont);
spacefillersmall = GetSpaceLength(sigIRC.panel.userFont);
spacefiller = GetSpaceLength(sigIRC.programFont);
spacefillersmall = GetSpaceLength(sigIRC.userFont);
//System.out.println("Space size for "+emotename+" is "+spacefiller.length());
} catch (IOException e) {
e.printStackTrace();
@ -49,8 +49,8 @@ public class Emoticon {
image = ImageIO.read(file);
emotename = emoteName;
}
spacefiller = GetSpaceLength(sigIRC.panel.programFont);
spacefillersmall = GetSpaceLength(sigIRC.panel.userFont);
spacefiller = GetSpaceLength(sigIRC.programFont);
spacefillersmall = GetSpaceLength(sigIRC.userFont);
//System.out.println("Space size for "+emotename+" is "+spacefiller.length());
} catch (IOException e) {
e.printStackTrace();

@ -9,18 +9,18 @@ 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) {
this.fileloc=location;
/*if (fileloc.contains(" ")) {
if (fileloc.contains(" ")) {
System.out.println("!!!!!!!!!!!!!!!!!!");
System.out.println("!!!!!WARNING!!!!!!");
System.out.println("There is a space in the global file location "+fileloc+". This is going to cause huge errors!");
System.out.println("!!!!!!!!!!!!!!!!!!");
DebugUtils.showStackTrace();
}*/
}
this.folder=false;
}
@ -33,29 +33,39 @@ public class FileManager {
return fileloc;
}
public void verifyAndFetchFileFromServer() {
public boolean verifyAndFetchFileFromServer() {
if (fileloc.contains("_FAKE_")) {
return false;
}
File file = new File(sigIRC.BASEDIR+fileloc);
if (folder) {
if (!file.exists()) {
System.out.println("Could not find "+file.getAbsolutePath()+", creating Folder "+file.getName()+".");
if (file.mkdirs()) {
System.out.println(" >> Successfully created "+file.getAbsolutePath()+".");
return true;
}
} else {
return true;
}
} else {
if (!file.exists()) {
System.out.println("Could not find "+file.getAbsolutePath()+", retrieving file online from "+serverURL+file.getName()+".");
try {
org.apache.commons.io.FileUtils.copyURLToFile(new URL(serverURL.replaceAll(" ", "%20")+fileloc.replaceAll(" ", "%20")),file);
org.apache.commons.io.FileUtils.copyURLToFile(new URL(serverURL+fileloc),file);
if (file.exists()) {
System.out.println(" >> Successfully downloaded "+file.getAbsolutePath()+".");
return true;
}
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
} else {
return true;
}
}
return false;
}
}

@ -0,0 +1,53 @@
package sig;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseWheelEvent;
import java.awt.event.MouseWheelListener;
import javax.swing.JPanel;
public class ListenerPanel extends JPanel implements MouseListener, MouseWheelListener{
Module mod;
public ListenerPanel(Module mod) {
this.addMouseListener(this);
this.addMouseWheelListener(this);
this.mod=mod;
}
@Override
public void mouseWheelMoved(MouseWheelEvent e) {
this.mod.mouseWheelMoved(e);
}
@Override
public void mouseClicked(MouseEvent e) {
this.mod.mouseClicked(e);
}
@Override
public void mouseEntered(MouseEvent e) {
this.mod.mouseEntered(e);
}
@Override
public void mouseExited(MouseEvent e) {
this.mod.mouseExited(e);
}
@Override
public void mousePressed(MouseEvent e) {
this.mod.mousePressed(e);
}
@Override
public void mouseReleased(MouseEvent e) {
this.mod.mouseReleased(e);
}
}

@ -1,72 +1,124 @@
package sig;
import java.awt.Color;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.util.Vector;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import sig.utils.DrawUtils;
import sig.utils.TextUtils;
import sig.windows.ProgramWindow;
public class Module {
public Rectangle2D position;
public class Module extends JFrame implements ComponentListener, WindowListener, KeyListener{
public ListenerPanel panel;
public Rectangle position;
protected boolean enabled;
protected String name;
public static BufferedImage IMG_DRAGBAR;
public static BufferedImage MSG_SEPARATOR;
public static boolean inDragZone=false;
final public static int WINDOW_EXTRA_BORDER = 32; //Number of pixels that the border takes up (Reduces the size of the window)
final protected int titleHeight;
Point dragOffset;
boolean dragging=false;
public static boolean DRAGGING=false;
public Graphics myGraphics;
long lasttime = System.currentTimeMillis();
float avgfps = sigIRC.framerate;
int counter = 0;
int avgcount = 10;
int[] sum = new int[10];
int windowUpdateCounter = 30;
public Module(Rectangle bounds, String moduleName) {
public Module(Rectangle2D bounds, String moduleName) {
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
this.addComponentListener(this);
this.addWindowListener(this);
this.addKeyListener(this);
this.position = bounds;
System.out.println(position);
this.name = moduleName;
this.enabled=true;
this.setTitle(moduleName);
panel = new ListenerPanel(this){
public void paintComponent(Graphics g) {
super.paintComponent(g);
draw(g);
}
};
this.setLocation((int)position.getX(), (int)position.getY());
this.titleHeight = (int)TextUtils.calculateStringBoundsFont(this.name, sigIRC.userFont).getHeight();
this.setSize(new Dimension((int)position.getWidth(), (int)position.getHeight()));
this.titleHeight = (int)TextUtils.calculateStringBoundsFont(this.name, sigIRC.panel.userFont).getHeight();
panel.setSize(this.getSize());
//System.out.println("Module "+moduleName+": "+position);
this.add(panel);
//this.pack();
repaint();
this.setVisible(true);
ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1);
scheduler.scheduleWithFixedDelay(()->{
run();
panel.repaint();
},(long)((1d/(sigIRC.framerate+1))*1000),(long)((1d/(sigIRC.framerate+1))*1000),TimeUnit.MILLISECONDS);
}
public Module(Rectangle2D bounds, String moduleName, boolean enabled) {
public Module(Rectangle bounds, String moduleName, boolean enabled) {
this(bounds, moduleName);
this.enabled=enabled;
}
protected void mouseModuleMousePress(MouseEvent ev) {
int mouseX = ev.getX();
int mouseY = ev.getY();
//System.out.println(mouseX + "," + mouseY);
enableWindowDrag(mouseX,mouseY);
mousePressed(ev);
public void updateFPSCounter() {
float val = 1000f/(System.currentTimeMillis()-lasttime);
sum[counter++ % sum.length] = (int)val;
avgfps = (float)sum(sum)/sum.length;
this.setTitle(name+" - "+(int)Math.round(avgfps)+" FPS");
lasttime=System.currentTimeMillis();
}
private void enableWindowDrag(int mouseX, int mouseY) {
if (sigIRC.showWindowControls && !dragging && inDragBounds(mouseX,mouseY) && !DRAGGING) {
//Enable dragging.
dragOffset = new Point((int)position.getX() - mouseX,(int)position.getY()-mouseY);
dragging=DRAGGING=true;
private int sum(int[] array) {
int val = 0;
for (int i=0;i<array.length;i++) {
val+=array[i];
}
}
public boolean inDragBounds(int x, int y) {
return x>=position.getX() && x<=position.getX()+position.getWidth() &&
y>=(int)position.getY()-Module.IMG_DRAGBAR.getHeight() &&
y<=(int)position.getY();
}
public void mousePressed(MouseEvent ev) {
return val;
}
public void ApplyConfigWindowProperties() {
@ -75,63 +127,10 @@ public class Module {
public void SaveConfig() {
}
public void mouseReleased(MouseEvent ev) {
if (dragging) {
dragging=DRAGGING=false;
ApplyConfigWindowProperties();
sigIRC.config.saveProperties();
}
}
protected void moduleRun() {
dragWindow();
modifyCursor();
run();
}
private void modifyCursor() {
if (!sigIRC.overlayMode) {
int cursortype = sigIRC.panel.getCursor().getType();
if (inDragZone &&
cursortype!=Cursor.MOVE_CURSOR) {
sigIRC.panel.setCursor(new Cursor(Cursor.MOVE_CURSOR));
} else
if (!inDragZone && cursortype!=Cursor.DEFAULT_CURSOR) {
sigIRC.panel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}
}
}
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 (sigIRC.panel.getCursor().getType()==Cursor.MOVE_CURSOR) {
sigIRC.panel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
}*/
}
public Rectangle2D getPosition() {
return position;
@ -141,47 +140,124 @@ public class Module {
}
public void draw(Graphics g) {
drawModuleHeader(g);
/*SwingUtilities.invokeLater(new Runnable() {
public void run() {
sigIRC.panel.repaint(getDrawBounds().getBounds());
}
});*/
}
private void drawModuleHeader(Graphics g) {
if (sigIRC.showWindowControls) {
g.drawImage(Module.IMG_DRAGBAR,
(int)position.getX()+2,
(int)position.getY()-Module.IMG_DRAGBAR.getHeight(),
(int)position.getWidth()-4,
Module.IMG_DRAGBAR.getHeight(),
sigIRC.panel);
DrawUtils.drawTextFont(g, sigIRC.panel.smallFont, (int)position.getX(), (int)position.getY()-titleHeight/2+4, Color.BLACK, this.name);
//g.fillRect((int)position.getX(), (int)position.getY(), (int)position.getWidth(), (int)position.getHeight());
}
//g.fillRect(0, 0, (int)position.getWidth(), (int)position.getHeight());
//DrawUtils.drawText(g, 0, 16, Color.WHITE, "Test");
updateFPSCounter();
}
private Rectangle2D getDrawBounds() {
Rectangle2D drawBounds = new Rectangle((int)position.getX()-2,(int)position.getY()-titleHeight+3-1,(int)position.getWidth()+2,(int)position.getHeight()+titleHeight+1);
return drawBounds;
public void windowClosed(WindowEvent ev) {
}
public void ModuleDragEvent(int oldX, int oldY, int newX, int newY) {
@Override
public void windowActivated(WindowEvent e) {
// TODO Auto-generated method stub
}
@Override
public void windowClosing(WindowEvent e) {
// TODO Auto-generated method stub
}
@Override
public void windowDeactivated(WindowEvent e) {
// TODO Auto-generated method stub
}
@Override
public void windowDeiconified(WindowEvent e) {
// TODO Auto-generated method stub
}
@Override
public void windowIconified(WindowEvent e) {
// TODO Auto-generated method stub
}
public void mouseWheel(MouseWheelEvent ev) {
@Override
public void windowOpened(WindowEvent e) {
// TODO Auto-generated method stub
}
public void keypressed(KeyEvent ev) {
@Override
public void componentHidden(ComponentEvent e) {
// TODO Auto-generated method stub
}
public void keyreleased(KeyEvent ev) {
@Override
public void componentMoved(ComponentEvent e) {
if (this.isVisible()) {
UpdatePosition(e);
}
}
private void UpdatePosition(ComponentEvent e) {
position = new Rectangle((int)e.getComponent().getLocationOnScreen().getX(),(int)e.getComponent().getLocationOnScreen().getY(),e.getComponent().getWidth(),e.getComponent().getHeight());
//System.out.println(position);
ApplyConfigWindowProperties();
sigIRC.configNeedsUpdating = System.currentTimeMillis();
}
@Override
public void componentResized(ComponentEvent e) {
if (this.isVisible()) {
UpdatePosition(e);
}
}
@Override
public void componentShown(ComponentEvent e) {
// TODO Auto-generated method stub
}
public void windowClosed(WindowEvent ev) {
public void keyPressed(KeyEvent e) {
// TODO Auto-generated method stub
}
public void keyReleased(KeyEvent e) {
// TODO Auto-generated method stub
}
public void keyTyped(KeyEvent e) {
// TODO Auto-generated method stub
}
public void mouseWheelMoved(MouseWheelEvent arg0) {
// TODO Auto-generated method stub
}
public void mouseClicked(MouseEvent e) {
// TODO Auto-generated method stub
}
public void mouseEntered(MouseEvent e) {
// TODO Auto-generated method stub
}
}
public void mouseExited(MouseEvent e) {
// TODO Auto-generated method stub
}
public void mousePressed(MouseEvent e) {
// TODO Auto-generated method stub
}
public void mouseReleased(MouseEvent e) {
}
}

@ -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);
}
}
}
}

@ -3,8 +3,6 @@ package sig;
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,69 +23,31 @@ 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;
import javax.swing.JPopupMenu;
import sig.modules.BandoriModule;
import sig.modules.ChatLogModule;
import sig.modules.ScrollingChatModule;
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>();
public static Font programFont = new Font(sigIRC.messageFont,Font.BOLD,32);
public static Font userFont = new Font(sigIRC.usernameFont,Font.BOLD,16);
public static Font smallFont = new Font(sigIRC.touhoumotherConsoleFont,0,12);
final public static Font rabiRibiMoneyDisplayFont = new Font("CP Font",0,16);
final public static Font rabiRibiTinyDisplayFont = new Font("CP Font",0,12);
public int lastMouseX = 0;
public int lastMouseY = 0;
public MyPanel() {
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();
}
public class MyPanel extends JPanel{
public MyPanel() {
//setBorder(BorderFactory.createLineBorder(Color.black));
addMouseListener(this);
addMouseWheelListener(this);
addComponentListener(this);
addKeyListener(this);
setFocusable(true);
}
public Dimension getPreferredSize() {
/*public Dimension getPreferredSize() {
return new Dimension(1280,480);
}
}*/
public void paintComponent(Graphics g) {
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.window!=null && sigIRC.window.getMousePosition(true)!=null && sigIRC.overlayMode) {
lastMouseX = (int)sigIRC.window.getMousePosition(true).getX();
lastMouseY = (int)sigIRC.window.getMousePosition(true).getY();
@ -97,12 +57,7 @@ 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 +66,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) {
@ -138,11 +88,7 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
} else {
break;
}
}
if (!sigIRC.overlayMode) {
sigIRC.button.draw(g);
sigIRC.modulebutton.draw(g);
}
}*/
}
public void addMessage(String message) {
@ -150,145 +96,26 @@ public class MyPanel extends JPanel implements MouseListener, ActionListener, Mo
}
public void addMessage(String message, boolean playSound) {
ScrollingText text = new ScrollingText(message,this.getWidth(),(int)(Math.random()*128),playSound);
ScrollingText text = new ScrollingText(message,ScrollingChatModule.module.getWidth(),(int)(Math.random()*128),playSound);
TextRow row = TextRow.PickRandomTextRow(text.getUsername());
sigIRC.textobj.add(text);
row.updateRow(text);
if (sigIRC.bandorimodule_enabled) {
BandoriModule.checkForStamp(text.getUsername(), text.getMessage());
}
//ChatLogMessage.importMessages(message);
}
@Override
public void mouseClicked(MouseEvent ev) {
}
@Override
public void mousePressed(MouseEvent ev) {
for (Module m : sigIRC.modules) {
m.mouseModuleMousePress(ev);
}
sigIRC.button.onClickEvent(ev);
sigIRC.modulebutton.onClickEvent(ev);
}
@Override
public void mouseReleased(MouseEvent ev) {
for (Module m : sigIRC.modules) {
m.mouseReleased(ev);
}
}
@Override
public void mouseEntered(MouseEvent ev) {
}
@Override
public void mouseExited(MouseEvent ev) {
}
@Override
public void actionPerformed(ActionEvent ev) {
}
@Override
public void mouseWheelMoved(MouseWheelEvent ev) {
for (Module m : sigIRC.modules) {
m.mouseWheel(ev);
}
}
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent ev) {
for (Module m : sigIRC.modules) {
m.keypressed(ev);
}
}
@Override
public void keyReleased(KeyEvent ev) {
for (Module m : sigIRC.modules) {
m.keyreleased(ev);
}
}
@Override
public void componentResized(ComponentEvent ev) {
UpdateComponent(ev.getComponent());
}
@Override
public void componentMoved(ComponentEvent ev) {
UpdateComponent(ev.getComponent());
}
public static void UpdateComponent(Component com) {
sigIRC.windowX = (int)sigIRC.window.getLocationOnScreen().getX();
sigIRC.windowY = (int)sigIRC.window.getLocationOnScreen().getY();
sigIRC.windowWidth = sigIRC.window.getWidth();
sigIRC.windowHeight = sigIRC.window.getHeight();
sigIRC.config.setInteger("windowX", sigIRC.windowX);
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.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();
}
@Override
public void componentShown(ComponentEvent ev) {
}
@Override
public void componentHidden(ComponentEvent ev) {
}
@Override
public void windowActivated(WindowEvent ev) {
}
@Override
public void windowClosed(WindowEvent ev) {
}
@Override
public void windowClosing(WindowEvent ev) {
for (Module m : sigIRC.modules) {
m.windowClosed(ev);
}
sigIRC.config.saveProperties();
if (sigIRC.autoUpdateProgram) {
try {
FileUtils.copyFile(new File(sigIRC.PROGRAM_UPDATE_FILE), new File(sigIRC.BASEDIR+"sigIRCv2.jar"));
} catch (IOException e) {
e.printStackTrace();
}
if (sigIRC.window!=null && sigIRC.window.getLocationOnScreen()!=null) {
sigIRC.windowX = (int)sigIRC.window.getLocationOnScreen().getX();
sigIRC.windowY = (int)sigIRC.window.getLocationOnScreen().getY();
sigIRC.windowWidth = sigIRC.window.getWidth();
sigIRC.windowHeight = sigIRC.window.getHeight();
sigIRC.config.setInteger("windowX", sigIRC.windowX);
sigIRC.config.setInteger("windowY", sigIRC.windowY);
sigIRC.config.setInteger("windowWidth", sigIRC.windowWidth);
sigIRC.config.setInteger("windowHeight", sigIRC.windowHeight);
//com.repaint();
//sigIRC.panel.repaint();
sigIRC.config.saveProperties();
}
}
@Override
public void windowDeactivated(WindowEvent ev) {
}
@Override
public void windowDeiconified(WindowEvent ev) {
}
@Override
public void windowIconified(WindowEvent ev) {
}
@Override
public void windowOpened(WindowEvent ev) {
}
}

@ -20,6 +20,7 @@ import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.UnsupportedAudioFileException;
import javax.swing.SwingUtilities;
import sig.modules.ScrollingChatModule;
import sig.utils.DrawUtils;
import sig.utils.FileUtils;
import sig.utils.SoundUtils;
@ -88,9 +89,9 @@ public class ScrollingText {
this.shadowSize=2;
this.stringWidth = (int)TextUtils.calculateStringBoundsFont(this.message,MyPanel.programFont).getWidth();
this.stringHeight = (int)TextUtils.calculateStringBoundsFont(this.message,MyPanel.programFont).getHeight();
this.userstringWidth = (int)TextUtils.calculateStringBoundsFont(this.username,MyPanel.userFont).getWidth();
this.stringWidth = (int)TextUtils.calculateStringBoundsFont(this.message,sigIRC.programFont).getWidth();
this.stringHeight = (int)TextUtils.calculateStringBoundsFont(this.message,sigIRC.programFont).getHeight();
this.userstringWidth = (int)TextUtils.calculateStringBoundsFont(this.username,sigIRC.userFont).getWidth();
}
public ScrollingText(String msg, double x, double y, boolean playSound) {
@ -172,15 +173,15 @@ public class ScrollingText {
}
public void draw(Graphics g) {
if (isAlive && WithinBounds(x,y,Math.max(TextUtils.calculateStringBoundsFont(username, MyPanel.userFont).getWidth(), TextUtils.calculateStringBoundsFont(message, MyPanel.programFont).getWidth()),Math.max(TextUtils.calculateStringBoundsFont(username, MyPanel.userFont).getHeight(), TextUtils.calculateStringBoundsFont(message, MyPanel.programFont).getHeight()))) {
if (isAlive && WithinBounds(x,y,Math.max(TextUtils.calculateStringBoundsFont(username, sigIRC.userFont).getWidth(), TextUtils.calculateStringBoundsFont(message, sigIRC.programFont).getWidth()),Math.max(TextUtils.calculateStringBoundsFont(username, sigIRC.userFont).getHeight(), TextUtils.calculateStringBoundsFont(message, sigIRC.programFont).getHeight()))) {
//DrawUtils.drawTextFont(g, MyPanel.userFont, x+8, y+stringHeight-20, Color.GREEN, username);
DrawUtils.drawOutlineText(g, MyPanel.userFont, x+8, y+stringHeight-20, 2, userColor, Color.BLACK, username);
DrawUtils.drawOutlineText(g, MyPanel.programFont, x, y+stringHeight+5, 1, 3, Color.WHITE, Color.BLACK, message);
DrawUtils.drawOutlineText(g, sigIRC.userFont, x+8, y+stringHeight-20, 2, userColor, Color.BLACK, username);
DrawUtils.drawOutlineText(g, sigIRC.programFont, x, y+stringHeight, 2, Color.WHITE, Color.BLACK, message);
}
}
private boolean WithinBounds(double x, double y, double w, double h) {
if (x<sigIRC.panel.getWidth() && x+w>0 && y<sigIRC.panel.getHeight() && y+h>0) {
if (x<ScrollingChatModule.module.getWidth() && x+w>0 && y<ScrollingChatModule.module.getHeight() && y+h>0) {
return true;
}
return false;
@ -188,28 +189,28 @@ public class ScrollingText {
public int FindLeftMostCornerInDisplay() {
if (x-shadowSize>0) {
return Math.min((int)x-shadowSize, sigIRC.panel.getWidth());
return Math.min((int)x-shadowSize, ScrollingChatModule.module.getWidth());
} else {
return 0;
}
}
public int FindTopMostCornerInDisplay() {
if (y-shadowSize>0) {
return Math.min((int)y-shadowSize, sigIRC.panel.getHeight());
return Math.min((int)y-shadowSize, ScrollingChatModule.module.getHeight());
} else {
return 0;
}
}
public int FindRightMostCornerInDisplay() {
if (x+stringWidth+(int)sigIRC.BASESCROLLSPD+1+shadowSize+1>0) {
return Math.min(Math.max(stringWidth,userstringWidth+8)+(int)sigIRC.BASESCROLLSPD+1+shadowSize+1, sigIRC.panel.getWidth()-(int)x);
return Math.min(Math.max(stringWidth,userstringWidth+8)+(int)sigIRC.BASESCROLLSPD+1+shadowSize+1, ScrollingChatModule.module.getWidth()-(int)x);
} else {
return 0;
}
}
public int FindBottomMostCornerInDisplay() {
if (y+stringHeight+shadowSize>0) {
return Math.min(stringHeight+shadowSize+4, sigIRC.panel.getHeight()-(int)y);
return Math.min(stringHeight+shadowSize+4, ScrollingChatModule.module.getHeight()-(int)y);
} else {
return 0;
}
@ -267,8 +268,8 @@ public class ScrollingText {
break;
}
}
textMaxWidth = (int)TextUtils.calculateStringBoundsFont(basemsg, sigIRC.panel.programFont).getWidth();
textMaxHeight = Math.max(textMaxHeight,(int)TextUtils.calculateStringBoundsFont(basemsg, sigIRC.panel.programFont).getHeight());
textMaxWidth = (int)TextUtils.calculateStringBoundsFont(basemsg, sigIRC.programFont).getWidth();
textMaxHeight = Math.max(textMaxHeight,(int)TextUtils.calculateStringBoundsFont(basemsg, sigIRC.programFont).getHeight());
return basemsg;
}
@ -282,9 +283,9 @@ public class ScrollingText {
private void GenerateEmoticon(int pos, String basemsg, Emoticon e) {
String cutstring = basemsg.substring(0, pos);
double width = TextUtils.calculateStringBoundsFont(cutstring, sigIRC.panel.programFont).getWidth();
double width = TextUtils.calculateStringBoundsFont(cutstring, sigIRC.programFont).getWidth();
//System.out.println("Width of '"+cutstring+"' is "+width);
sigIRC.createEmoticon(e, this, (int)(width), 8);
sigIRC.createEmoticon(e, this, (int)(width), 0);
textMaxHeight = Math.max(textMaxHeight, e.getImage().getHeight());
//textMaxWidth = (int)(width + e.getImage().getWidth()+1);
}

@ -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;

@ -42,7 +42,7 @@ public class TextRow {
}
private int DetermineScrollSpd() {
return maxX/Math.max(600,sigIRC.windowWidth)+(sigIRC.chatScrollSpd*2);
return maxX/Math.max(600,sigIRC.windowWidth)+(sigIRC.chatScrollSpd);
}
public static TextRow PickRandomTextRow(String username) {

@ -3,6 +3,8 @@ import java.awt.Graphics;
import javax.swing.SwingUtilities;
import sig.modules.ScrollingChatModule;
public class TwitchEmote {
Emoticon emote;
int x=0; //X Offset
@ -38,7 +40,7 @@ public class TwitchEmote {
public void draw(Graphics g) {
if (WithinBounds((int)(text.getX()+x), (int)(text.getY()+y), emote.getImage().getWidth(), emote.getImage().getHeight())) {
g.drawImage(emote.getImage(), (int)(text.getX()+x), (int)(text.getY()+y), sigIRC.panel);
g.drawImage(emote.getImage(), (int)(text.getX()+x), (int)(text.getY()+y), null);
}
}
@ -47,7 +49,7 @@ public class TwitchEmote {
}
private boolean WithinBounds(double x, double y, double w, double h) {
if (x<sigIRC.panel.getWidth() && x+w>0 && y<sigIRC.panel.getHeight() && y+h>0) {
if (x<ScrollingChatModule.module.getWidth() && x+w>0 && y<ScrollingChatModule.module.getHeight() && y+h>0) {
return true;
}
return false;

@ -32,14 +32,13 @@ public class UpdateEvent implements ActionListener{
}
private void UpdateSubEmoticons() {
//System.out.println("Subchannels: "+sigIRC.subchannelCount+", "+sigIRC.subchannelIds.size());
if (!sigIRC.downloadedSubEmotes &&
!sigIRC.disableChatMessages &&
sigIRC.disableChatMessages &&
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 +47,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 +76,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() {

@ -1,43 +0,0 @@
package sig.modules.Bandori;
import java.util.Random;
public class SongPart {
String name;
int trials;
int successes;
public SongPart(String partname) {
this.name = partname;
this.trials = this.successes = 0;
}
public void setTitle(String title) {
this.name = title;
}
public void setSuccesses(Integer successes) {
this.successes = successes;
}
public void setTrials(Integer trials) {
this.trials = trials;
}
public String getTitle() {
return this.name;
}
public Integer getSuccesses() {
return this.successes;
}
public Integer getTotal() {
return this.trials;
}
public void AddtoTrials(boolean success) {
if (success) {
this.successes++;
}
this.trials++;
}
}

@ -1,482 +0,0 @@
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;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Random;
import javax.imageio.ImageIO;
import javax.swing.JOptionPane;
import javafx.geometry.Point2D;
import sig.FileManager;
import sig.Module;
import sig.sigIRC;
import sig.modules.Bandori.SongPart;
import sig.utils.DrawUtils;
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 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>();
String songtitle = "";
List<SongPart> parts = new ArrayList<SongPart>();
boolean holdControl = false, holdAlt = false;
JOptionPane pane = new JOptionPane();
public BandoriModule(Rectangle2D bounds, String moduleName) {
this(bounds,moduleName,true);
}
public BandoriModule(Rectangle2D bounds, String moduleName, boolean enabled) {
super(bounds, moduleName, enabled);
Initialize();
}
void Initialize() {
BandoriModule.bandori_module = this;
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();
}
image_map.put("kasumi_gogo", new ImageScheme(stamp_collection1,0));
image_map.put("tae_letsplay", new ImageScheme(stamp_collection1,1));
image_map.put("rimi_choco", new ImageScheme(stamp_collection1,2));
image_map.put("saya_bread", new ImageScheme(stamp_collection1,3));
image_map.put("arisa_doki", new ImageScheme(stamp_collection1,4));
image_map.put("ran_same", new ImageScheme(stamp_collection1,5));
image_map.put("moca_youdidit", new ImageScheme(stamp_collection1,6));
image_map.put("himari_heyheyhoh", new ImageScheme(stamp_collection1,7));
image_map.put("tomoe_letsdothis", new ImageScheme(stamp_collection1,8));
image_map.put("tsugumi_wecandoit", new ImageScheme(stamp_collection1,9));
image_map.put("kokoro_happylucky", new ImageScheme(stamp_collection1,10));
image_map.put("kaoru_fleeting", new ImageScheme(stamp_collection1,11));
image_map.put("hagumi_smileyay", new ImageScheme(stamp_collection1,12));
image_map.put("kanon_fuee", new ImageScheme(stamp_collection1,13));
image_map.put("misaki_ready", new ImageScheme(stamp_collection1,14));
image_map.put("aya_fever", new ImageScheme(stamp_collection1,15));
image_map.put("hina_fullcombo", new ImageScheme(stamp_collection1,16));
image_map.put("chisato_planned", new ImageScheme(stamp_collection1,17));
image_map.put("maya_huhehe", new ImageScheme(stamp_collection1,18));
image_map.put("eve_bushido", new ImageScheme(stamp_collection1,19));
image_map.put("yukina_notbad", new ImageScheme(stamp_collection1,20));
image_map.put("sayo_goodwork", new ImageScheme(stamp_collection1,21));
image_map.put("lisa_nextonelastone", new ImageScheme(stamp_collection1,22));
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));
image_map.put("kaoru_suchalovelyevening", new ImageScheme(stamp_collection2,6));
image_map.put("rimi_congrats", new ImageScheme(stamp_collection2,7));
image_map.put("ran_somethingbigiscoming", new ImageScheme(stamp_collection2,8));
image_map.put("tsugumi_comeon", new ImageScheme(stamp_collection2,9));
image_map.put("tae_fufusocute", new ImageScheme(stamp_collection2,10));
image_map.put("eve_marchintobattle", new ImageScheme(stamp_collection2,11));
image_map.put("saya_illtry", new ImageScheme(stamp_collection2,12));
image_map.put("lisa_imsohappy", new ImageScheme(stamp_collection2,13));
image_map.put("sayo_ohwell", new ImageScheme(stamp_collection2,14));
image_map.put("ako_areyouokay", new ImageScheme(stamp_collection2,15));
image_map.put("chisato_thisissomuchfun", new ImageScheme(stamp_collection2,16));
image_map.put("rinko_theresnoway", new ImageScheme(stamp_collection2,17));
image_map.put("tae_thisisgreat", new ImageScheme(stamp_collection2,18));
image_map.put("moca_thisisgettinginteresting", new ImageScheme(stamp_collection2,19));
image_map.put("kaoru_takemyhand", new ImageScheme(stamp_collection2,20));
image_map.put("kokoro_letsmaketheworldsmile", new ImageScheme(stamp_collection2,21));
image_map.put("hina_nowwereboppin", new ImageScheme(stamp_collection2,22));
image_map.put("kokoro_what_a_great_idea", new ImageScheme(stamp_collection2,23));
image_map.put("sayo_im_sorry", new ImageScheme(stamp_collection2,24));
image_map.put("hagumi_hooray", new ImageScheme(stamp_collection2,25));
image_map.put("tsugumi_amazing", new ImageScheme(stamp_collection2,26));
image_map.put("eve_thefruits", new ImageScheme(stamp_collection2,27));
image_map.put("lisa_imnotready", new ImageScheme(stamp_collection2,28));
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("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"));
/*for (String s : image_map.keySet()) {
ImageScheme scheme = image_map.get(s);
try {
BufferedImage img = crop(scheme.base,scheme.stamp_index%6*270+4, scheme.stamp_index/6*223+3, 258, 214);
ImageIO.write(img, "png", new File(sigIRC.BASEDIR + "sigIRC/stamps/"+s+".png"));
} catch (IOException e) {
e.printStackTrace();
}
}*/
for (int i=0;i<4;i++) {
parts.add(new SongPart("Song Part "+i));
}
}
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();
// Coordinates of the image's middle
int xc = (width - targetWidth) / 2;
int yc = (height - targetHeight) / 2;
// Crop
BufferedImage croppedImage = img.getSubimage(x, y, targetWidth, targetHeight);
/*BufferedImage croppedImage = img.getSubimage(
xc,
yc,
targetWidth, // widht
targetHeight // height
);*/
return croppedImage;
}
public void run() {
for (int i=0;i<active_stamps.size();i++) {
Stamp s = active_stamps.get(i);
if (!s.run()) {
active_stamps.remove(i--);
}
}
}
public static void checkForStamp(String user,String message) {
boolean foundmatch = false;
message = message.toLowerCase().replaceAll("[ ]", "");
if (message.length()>480) {
return;
}
for (String key : image_map.keySet()) {
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.contains(message_search)) {
foundmatch = true;
CreateStamp(key);
System.out.println("Stamp "+key+" created by user "+user+" MESSAGE:"+message+".");
break;
}
} else {
if (filteredmessage.contains(message_search)) {
foundmatch=true;
CreateStamp(key);
System.out.println("Stamp "+key+" created by user "+user+" MESSAGE:"+message+".");
break;
}
}
}
if (foundmatch) {
break;
}
}
}
public static void CreateStamp(String stamp_name) {
final int STAMP_DURATION = 180;
String soundName = sigIRC.BASEDIR+"sigIRC/sounds/stamp_sound.wav";
FileManager manager = new FileManager("sigIRC/sounds/stamp_sound.wav");
manager.verifyAndFetchFileFromServer();
SoundUtils.playSound(soundName);
active_stamps.add(new Stamp(image_map.get(stamp_name),STAMP_DURATION));
}
public void ApplyConfigWindowProperties() {
sigIRC.bandorimodule_X=(int)position.getX();
sigIRC.bandorimodule_Y=(int)position.getY();
sigIRC.config.setInteger("BANDORI_module_X", sigIRC.bandorimodule_X);
sigIRC.config.setInteger("BANDORI_module_Y", sigIRC.bandorimodule_Y);
}
public void windowClosed(WindowEvent ev) {
}
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)+"%");
}
}
public void keypressed(KeyEvent ev) {
super.keypressed(ev);
switch (ev.getKeyCode()) {
case KeyEvent.VK_CONTROL:{
holdControl=true;
System.out.println("Pressed Control");
}break;
case KeyEvent.VK_ALT:{
holdAlt=true;
System.out.println("Pressed Alt");
}break;
case KeyEvent.VK_HOME:{
String input = pane.showInputDialog(sigIRC.window, "Song Title:", songtitle);
this.songtitle = input;
}break;
case KeyEvent.VK_1:{
if (holdControl) {
SetupPart(0);
} else {
AddtoAllParts(0);
}
}break;
case KeyEvent.VK_2:{
if (holdControl) {
SetupPart(1);
} else {
AddtoAllParts(1);
}
}break;
case KeyEvent.VK_3:{
if (holdControl) {
SetupPart(2);
} else {
AddtoAllParts(2);
}
}break;
case KeyEvent.VK_4:{
if (holdControl) {
SetupPart(3);
} else {
AddtoAllParts(3);
}
}break;
}
}
private void AddtoAllParts(int partnumb) {
for (int i=0;i<=partnumb;i++) {
parts.get(i).AddtoTrials(holdAlt);
}
}
private void SetupPart(int partnumb) {
String input = pane.showInputDialog(sigIRC.window,"Name Part 1:",parts.get(partnumb).getTitle());
String input2 = pane.showInputDialog(sigIRC.window,"Provide Success/Total Count (X/Y Format)",parts.get(partnumb).getSuccesses()+"/"+parts.get(partnumb).getTotal());
if (input.length()>0) {
parts.get(partnumb).setTitle(input);
parts.get(partnumb).setSuccesses(Integer.parseInt(input2.split("/")[0]));
parts.get(partnumb).setTrials(Integer.parseInt(input2.split("/")[1]));
}
holdControl=holdAlt=false;
}
public void keyreleased(KeyEvent ev) {
super.keyreleased(ev);
switch (ev.getKeyCode()) {
case KeyEvent.VK_CONTROL:{
holdControl=false;
System.out.println("Released Control");
}break;
case KeyEvent.VK_ALT:{
holdAlt=false;
System.out.println("Released Alt");
}break;
}
}
}
class Stamp{
ImageScheme scheme;
int timer;
int randX = (int)(Math.random()*(BandoriModule.bandori_module.position.getWidth()-130));
Stamp(ImageScheme scheme,int start_timer) {
this.scheme = scheme;
this.timer = start_timer;
}
public boolean run() {
return --timer>0;
}
}
class ImageScheme{
BufferedImage base;
int stamp_index; //0-23.
ImageScheme(BufferedImage base,int index) {
this.base=base;
this.stamp_index=index;
}
}
class SingleImageScheme extends ImageScheme{
SingleImageScheme(BufferedImage base) {
super(base, 0);
}
}

@ -4,6 +4,7 @@ import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Random;
@ -25,7 +26,7 @@ public class ChatLogMessage {
String username;
List<String> displayMessage = new ArrayList<String>();
final static public int MESSAGE_SPACING = 24;
final static public int BORDER_SPACING = 8;
final static public int BORDER_SPACING = 16;
final static public Color SHADOW_COL = new Color(35,35,35,255);
int usernameWidth = 0;
boolean active=true;
@ -34,25 +35,32 @@ public class ChatLogMessage {
this.refModule = ChatLogModule.chatlogmodule;
this.rawMessage = rawMessage;
this.position = new Point(0,(int)refModule.getPosition().getHeight()-MESSAGE_SPACING);
//System.out.println("1");
WrapText();
//System.out.println("2");
for (ChatLogMessage clm : this.refModule.messageHistory) {
clm.position.setLocation(
clm.position.getX(),
clm.position.getY()-messageDisplaySize.getY());
//System.out.println(clm.rawMessage+": "+clm.position);
}
//System.out.println("3");
this.position.setLocation(this.position.getX(), this.position.getY()-messageDisplaySize.getY()+ChatLogModule.chatlogmodule.scrolllog_yoffset);
//System.out.println(displayMessage);
this.username = DetectUsername(displayMessage);
//System.out.println("4");
if (this.username!=null) {
displayMessage.set(0,GetMessage(displayMessage.get(0)+" "));
usernameWidth = (int)TextUtils.calculateStringBoundsFont(this.username, sigIRC.panel.userFont).getWidth();
usernameWidth = (int)TextUtils.calculateStringBoundsFont(this.username, sigIRC.userFont).getWidth();
}
for (int i=0;i<displayMessage.size();i++) {
//System.out.println("displayMessage["+i+"] before: "+displayMessage.get(i));
displayMessage.set(i, ReplaceMessageWithEmoticons(" "+displayMessage.get(i)+" ",(i==0)?usernameWidth:0,i*MESSAGE_SPACING));
String msg = ReplaceMessageWithEmoticons(" "+displayMessage.get(i)+" ",(i==0)?usernameWidth:0,i*MESSAGE_SPACING);
displayMessage.set(i, msg);
//System.out.println("displayMessage["+i+"] after: "+displayMessage.get(i));
}
//System.out.println("5 "+displayMessage.size());
//System.out.println("6");
}
private String ReplaceMessageWithEmoticons(String basemsg, int xpos, int ypos) {
@ -99,7 +107,7 @@ public class ChatLogMessage {
private void GenerateEmoticon(int textpos, int xpos, int ypos, String basemsg, Emoticon e) {
String cutstring = basemsg.substring(0, textpos);
double width = TextUtils.calculateStringBoundsFont(cutstring, sigIRC.panel.userFont).getWidth();
double width = TextUtils.calculateStringBoundsFont(cutstring, sigIRC.userFont).getWidth();
//System.out.println("Width of '"+cutstring+"' is "+width);
//System.out.println("Offsetting emote by "+xpos+"+"+width);
sigIRC.createEmoticon(e, this, (int)(xpos+width), ypos+16);
@ -156,11 +164,11 @@ public class ChatLogMessage {
private void WrapText() {
String rawmessage = rawMessage;
int textWidth = (int)TextUtils.calculateStringBoundsFont(rawmessage, sigIRC.panel.userFont).getWidth();
int textWidth = (int)TextUtils.calculateStringBoundsFont(rawmessage, sigIRC.userFont).getWidth();
int maxWidth = (int)refModule.getPosition().getWidth()-BORDER_SPACING;
do {
rawmessage = BreakTextAtNextSection(rawmessage+" ",maxWidth);
textWidth = (int)TextUtils.calculateStringBoundsFont(rawmessage, sigIRC.panel.userFont).getWidth();
textWidth = (int)TextUtils.calculateStringBoundsFont(rawmessage, sigIRC.userFont).getWidth();
} while (textWidth>maxWidth);
if (rawmessage.length()>0) {
displayMessage.add(rawmessage);
@ -170,13 +178,13 @@ public class ChatLogMessage {
}
private String BreakTextAtNextSection(String msg, int maxWidth) {
int marker = 1;
int textWidth = (int)TextUtils.calculateStringBoundsFont(msg.substring(0, marker), sigIRC.panel.userFont).getWidth();
int marker = msg.indexOf(' ');
int textWidth = (int)TextUtils.calculateStringBoundsFont(msg.substring(0, marker), sigIRC.userFont).getWidth();
while (textWidth<maxWidth) {
if (marker<msg.length()) {
int tempmarker = msg.indexOf(' ', marker);
if (tempmarker!=-1) {
textWidth = (int)TextUtils.calculateStringBoundsFont(msg.substring(0, tempmarker), sigIRC.panel.userFont).getWidth();
textWidth = (int)TextUtils.calculateStringBoundsFont(msg.substring(0, tempmarker), sigIRC.userFont).getWidth();
if (textWidth<maxWidth) {
marker = tempmarker+1;
}
@ -198,10 +206,10 @@ public class ChatLogMessage {
/*SwingUtilities.invokeLater(new Runnable() {
public void run() {
sigIRC.panel.repaint(
(int)Math.max(refModule.getPosition().getX()+position.getX(),0),
(int)Math.max(refModule.getPosition().getY()+position.getY(),0),
(int)Math.min(sigIRC.panel.getWidth()-(refModule.getPosition().getX()+position.getX()+messageDisplaySize.getX()),messageDisplaySize.getX()),
(int)Math.min(sigIRC.panel.getHeight()-(refModule.getPosition().getY()+position.getY()+messageDisplaySize.getY()),messageDisplaySize.getY()));
(int)Math.max(position.getX(),0),
(int)Math.max(position.getY(),0),
(int)Math.min(sigIRC.panel.getWidth()-(position.getX()+messageDisplaySize.getX()),messageDisplaySize.getX()),
(int)Math.min(sigIRC.panel.getHeight()-(position.getY()+messageDisplaySize.getY()),messageDisplaySize.getY()));
}
});*/
//System.out.println(refModule.getPosition()+","+position);
@ -213,25 +221,36 @@ public class ChatLogMessage {
for (int i=0;i<displayMessage.size();i++) {
//System.out.println(displayMessage.get(i));
if (username!=null && i==0) {
DrawUtils.drawOutlineText(g, sigIRC.panel.userFont, refModule.getPosition().getX()+position.getX(), refModule.getPosition().getY()+position.getY()+(i*MESSAGE_SPACING)+32, 2, GetUserNameColor(this.username), SHADOW_COL, this.username);
DrawUtils.drawTextFont(g, sigIRC.panel.userFont, refModule.getPosition().getX()+position.getX()+usernameWidth+2, refModule.getPosition().getY()+position.getY()+(i*MESSAGE_SPACING)+32, Color.BLACK, displayMessage.get(i));
DrawUtils.drawOutlineText(g, sigIRC.userFont, position.getX(), position.getY()+(i*MESSAGE_SPACING)+32-Module.WINDOW_EXTRA_BORDER, 2, GetUserNameColor(this.username), SHADOW_COL, this.username);
DrawUtils.drawTextFont(g, sigIRC.userFont, position.getX()+usernameWidth+2, position.getY()+(i*MESSAGE_SPACING)+32-Module.WINDOW_EXTRA_BORDER, Color.BLACK, displayMessage.get(i));
} else {
DrawUtils.drawTextFont(g, sigIRC.panel.userFont, refModule.getPosition().getX()+position.getX(), refModule.getPosition().getY()+position.getY()+(i*MESSAGE_SPACING)+32, Color.BLACK, displayMessage.get(i));
DrawUtils.drawTextFont(g, sigIRC.userFont, position.getX(), position.getY()+(i*MESSAGE_SPACING)+32-Module.WINDOW_EXTRA_BORDER, Color.BLACK, displayMessage.get(i));
}
}
g.drawImage(Module.MSG_SEPARATOR, (int)(refModule.getPosition().getX()+position.getX()+8), (int)(refModule.getPosition().getY()+position.getY()+messageDisplaySize.getY()+12), (int)(messageDisplaySize.getX()-8), 1, sigIRC.panel);
//g.drawLine((int)(refModule.getPosition().getX()+position.getX()+8), (int)(refModule.getPosition().getY()+position.getY()+messageDisplaySize.getY()+32), (int)(refModule.getPosition().getX()+position.getX()+messageDisplaySize.getX()-8), (int)(refModule.getPosition().getY()+position.getY()+messageDisplaySize.getY()+32));
g.drawImage(Module.MSG_SEPARATOR, (int)(position.getX()+8), (int)(position.getY()+messageDisplaySize.getY()+8-Module.WINDOW_EXTRA_BORDER), (int)(messageDisplaySize.getX()-8), 1, null);
//g.drawLine((int)(position.getX()+8), (int)(position.getY()+messageDisplaySize.getY()+32), (int)(position.getX()+messageDisplaySize.getX()-8), (int)(position.getY()+messageDisplaySize.getY()+32));
}
for (int i=0;i<sigIRC.chatlogtwitchemoticons.size();i++) {
if (sigIRC.chatlogtwitchemoticons.get(i).textRefIsVisible()) {
ChatLogTwitchEmote emote = sigIRC.chatlogtwitchemoticons.get(i);
//System.out.println("Twitch emote is "+emote.emote.getEmoteName()+" "+emote.x+","+emote.y);
sigIRC.chatlogtwitchemoticons.get(i).draw(g);
}
}
}
public static void importMessages(String...logContents) {
if (sigIRC.chatlogmodule_enabled) {
//System.out.println("Adding chat message "+Arrays.toString(logContents));
for (String s : logContents) {
//System.out.println(" For "+s+":");
if (s!=null) {
if (ChatLogModule.chatlogmodule.messageHistory.size()>=ChatLogModule.messageHistoryCount) {
//System.out.println(" Removed.");
ChatLogModule.chatlogmodule.messageHistory.remove(0).cleanup();
}
ChatLogModule.chatlogmodule.messageHistory.add(new ChatLogMessage(s));
//System.out.println(" Adding "+s+".");
ChatLogModule.chatlogmodule.messageQueue.add(s);
}
}
}
@ -242,8 +261,8 @@ public class ChatLogMessage {
}
public boolean isVisible() {
return (refModule.getPosition().getY()+position.getY()+MESSAGE_SPACING)>refModule.getPosition().getY() &&
(refModule.getPosition().getY()+position.getY()+messageDisplaySize.getY())<refModule.getPosition().getY()+refModule.getPosition().getHeight()-16;
return (position.getY()+MESSAGE_SPACING-Module.WINDOW_EXTRA_BORDER)>0 &&
(position.getY()+messageDisplaySize.getY())<refModule.getPosition().getHeight()-16;
}
/*

@ -5,6 +5,7 @@ import java.awt.Graphics;
import javax.swing.SwingUtilities;
import sig.Emoticon;
import sig.Module;
import sig.ScrollingText;
import sig.sigIRC;
@ -42,13 +43,15 @@ public class ChatLogTwitchEmote {
}
public void draw(Graphics g) {
if (WithinBounds((int)(text.position.getX()+x), (int)(text.position.getY()+y), emote.getImage().getWidth(), emote.getImage().getHeight())) {
g.drawImage(emote.getImage(), (int)(text.refModule.getPosition().getX()+text.position.getX()+x), (int)(text.refModule.getPosition().getY()+text.position.getY()+y), sigIRC.panel);
if (WithinBounds((int)(text.position.getX()+x), (int)(text.position.getY()+y-Module.WINDOW_EXTRA_BORDER), emote.getImage().getWidth(), emote.getImage().getHeight())) {
//g.drawString("Emote", (int)(text.position.getX()+x), (int)(text.position.getY()+y));
//System.out.println("Emote Pos: "+(int)(text.position.getX()+x)+","+(int)(text.position.getY()+y));
g.drawImage(emote.getImage(), (int)(text.position.getX()+x), (int)(text.position.getY()+y-Module.WINDOW_EXTRA_BORDER), null);
}
}
private boolean WithinBounds(double x, double y, double w, double h) {
if (x<sigIRC.panel.getWidth() && x+w>0 && y<sigIRC.panel.getHeight() && y+h>0) {
if (x<text.refModule.panel.getWidth() && x+w>0 && y<text.refModule.panel.getHeight() && y+h>0) {
return true;
}
return false;

@ -3,6 +3,7 @@ package sig.modules;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.event.ComponentEvent;
import java.awt.event.KeyEvent;
import java.awt.event.MouseWheelEvent;
import java.awt.geom.Rectangle2D;
@ -30,8 +31,13 @@ public class ChatLogModule extends Module{
public static ChatLogModule chatlogmodule;
public int scrolllog_yoffset = 0;
public Color backgroundColor;
long positionsNeedUpdating = 0; //Set it to System.currentTimeMillis() to request a configuration save.
Rectangle prevpos = (Rectangle)position.clone();
int justOpened=2;
public List<String> messageQueue = new ArrayList<String>();
public ChatLogModule(Rectangle2D bounds, String moduleName) {
public ChatLogModule(Rectangle bounds, String moduleName) {
super(bounds, moduleName);
//Initialize();
chatlogmodule = this;
@ -48,39 +54,19 @@ public class ChatLogModule extends Module{
if (logContents.length>messageHistoryCount) {
logContents = Arrays.copyOfRange(logContents, logContents.length-messageHistoryCount-1, logContents.length);
}
messageHistory.clear();
ChatLogMessage.importMessages(logContents);
}
}
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();
for (int i=0;i<messageQueue.size();i++) {
messageHistory.add(new ChatLogMessage(messageQueue.remove(0)));
i--;
}
if (delay>0 && sigIRC.subEmotesCompleted) {
delay--;
} else
if (!initialized)
{
Initialize();
initialized=true;
}
for (int i=0; i<messageHistory.size();i++) {
ChatLogMessage clm = messageHistory.get(i);
@ -92,20 +78,39 @@ public class ChatLogModule extends Module{
}
}
}
if (positionsNeedUpdating==0 && (prevpos.getWidth()!=position.getWidth() || prevpos.getHeight()!=position.getHeight())) {
positionsNeedUpdating=System.currentTimeMillis();
}
if (positionsNeedUpdating!=0 && System.currentTimeMillis()-positionsNeedUpdating>1000) {
positionsNeedUpdating=0;
int diff = (int)(position.getHeight()-prevpos.getHeight());
prevpos = (Rectangle)position.clone();
/*for (ChatLogMessage clm : messageHistory) {
clm.position.y+=diff;
}*/
messageHistory.clear();
sigIRC.chatlogtwitchemoticons.clear();
Initialize();
moveAllMessages(-scrolllog_yoffset);
scrolllog_yoffset=0;
//repaint();
}
}
public void draw(Graphics g) {
super.draw(g);
g.setColor(backgroundColor);
g.fill3DRect((int)position.getX(), (int)position.getY(), (int)position.getWidth(), (int)position.getHeight(), true);
g.fill3DRect(0, 0, (int)position.getWidth(), (int)position.getHeight(), true);
g.setColor(Color.BLACK);
for (int i=0; i<messageHistory.size();i++) {
ChatLogMessage clm = messageHistory.get(i);
if (clm!=null) {
try {
clm.draw(g);
} catch (ConcurrentModificationException e) {
e.printStackTrace();
if (messageHistory!=null) {
for (int i=0; i<messageHistory.size();i++) {
ChatLogMessage clm = messageHistory.get(i);
if (clm!=null) {
try {
clm.draw(g);
} catch (ConcurrentModificationException e) {
e.printStackTrace();
}
}
}
}
@ -114,13 +119,18 @@ public class ChatLogModule extends Module{
public void ApplyConfigWindowProperties() {
sigIRC.chatlogmodule_X=(int)position.getX();
sigIRC.chatlogmodule_Y=(int)position.getY();
sigIRC.chatlogmodule_width=(int)position.getWidth();
sigIRC.chatlogmodule_height=(int)position.getHeight();
sigIRC.config.setInteger("CHATLOG_module_X", sigIRC.chatlogmodule_X);
sigIRC.config.setInteger("CHATLOG_module_Y", sigIRC.chatlogmodule_Y);
sigIRC.config.setInteger("CHATLOG_module_width", sigIRC.chatlogmodule_width);
sigIRC.config.setInteger("CHATLOG_module_height", sigIRC.chatlogmodule_height);
sigIRC.config.saveProperties();
}
public void mouseWheel(MouseWheelEvent ev) {
public void mouseWheelMoved(MouseWheelEvent ev) {
if (mouseInBounds(ev.getX(),ev.getY())) {
int scrollMult = 8;
int scrollMult = 12;
int scrollAmt = -ev.getWheelRotation()*scrollMult;
if (scrollAmt>0) {
if (HighestMessageIsVisible()) {
@ -162,14 +172,14 @@ public class ChatLogModule extends Module{
}
private boolean mouseInBounds(int mouseX, int mouseY) {
return mouseX>=position.getX() &&
mouseX<=position.getX()+position.getWidth() &&
mouseY>=position.getX() &&
mouseY<=position.getX()+position.getHeight();
return mouseX>=0 &&
mouseX<=0+position.getWidth() &&
mouseY>=0 &&
mouseY<=0+position.getHeight();
}
public void keypressed(KeyEvent ev) {
public void keyPressed(KeyEvent ev) {
int key = ev.getKeyCode();
int scroll = 0;
if (key==KeyEvent.VK_PAGE_UP) {
@ -179,7 +189,7 @@ public class ChatLogModule extends Module{
scroll=-8;
}
if (key==KeyEvent.VK_HOME) {
scroll=Math.abs(GetHighestMessagePosition());
scroll=Math.abs(GetHighestMessagePosition()-Module.WINDOW_EXTRA_BORDER);
}
if (key==KeyEvent.VK_END) {
moveAllMessages(-scrolllog_yoffset);

@ -52,7 +52,7 @@ public class ClickableButton {
g.setColor(Color.BLACK);
g.fillRect((int)module.getPosition().getX()+x+1,
(int)module.getPosition().getY()+y+1, width-1, height-1);
DrawUtils.drawTextFont(g, sigIRC.panel.userFont, module.getPosition().getX()+x-TextUtils.calculateStringBoundsFont(label, sigIRC.panel.userFont).getWidth()/2+width/2, module.getPosition().getY()+y+height-1, Color.WHITE, label);
DrawUtils.drawTextFont(g, sigIRC.userFont, module.getPosition().getX()+x-TextUtils.calculateStringBoundsFont(label, sigIRC.userFont).getWidth()/2+width/2, module.getPosition().getY()+y+height-1, Color.WHITE, label);
g.setColor(color_identity);
}
}

@ -269,7 +269,7 @@ public class ControlConfigurationWindow extends JFrame implements WindowListener
public void paintComponent(Graphics g) {
super.paintComponent(g);
try {
g.drawImage(ImageIO.read(new File(ControllerModule.CONTROLLERPATH+"4-way_axis.png")), 0, 0, this);
g.drawImage(ImageIO.read(new File(ControllerModule.CONTROLLERPATH+"4-way_axis.png")), 0, 0, null);
} catch (IOException e) {
e.printStackTrace();
}
@ -279,7 +279,7 @@ public class ControlConfigurationWindow extends JFrame implements WindowListener
public void paintComponent(Graphics g) {
super.paintComponent(g);
try {
g.drawImage(ImageIO.read(new File(ControllerModule.CONTROLLERPATH+"2-way_axis.png")), 0, 0, this);
g.drawImage(ImageIO.read(new File(ControllerModule.CONTROLLERPATH+"2-way_axis.png")), 0, 0, null);
} catch (IOException e) {
e.printStackTrace();
}

@ -74,11 +74,9 @@ public class ControllerModule extends Module{
final static int RESIZE_BORDER = 5;
final static double MINIMUM_ELEMENT_SIZE=8;
boolean proportionalResize=false;
public static ControllerModule controller_module;
public ControllerModule(Rectangle2D bounds, String moduleName) {
super(bounds, moduleName);
ControllerModule.controller_module = this;
if (!GLFW.glfwInit()) {
System.out.println("Failed to initialize GLFW!");
} else {
@ -103,31 +101,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 +380,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 &&
!inDragZone) {
sigIRC.panel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));
if (cursortype!=Cursor.E_RESIZE_CURSOR) {
sigIRC.panel.setCursor(new Cursor(Cursor.E_RESIZE_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;
}break;
case 3:{
int cursortype = sigIRC.panel.getCursor().getType();
if (cursortype!=Cursor.NE_RESIZE_CURSOR) {
sigIRC.panel.setCursor(new Cursor(Cursor.NE_RESIZE_CURSOR));
}
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;
}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));
}
}
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) {
@ -622,7 +595,7 @@ public class ControllerModule extends Module{
}
}*/
}
g.drawImage(controller_img, (int)(position.getX()), (int)(position.getY()), sigIRC.panel);
g.drawImage(controller_img, (int)(position.getX()), (int)(position.getY()), null);
for (ClickableButton cb : click_buttons) {
cb.draw(g);
}
@ -680,7 +653,7 @@ public class ControllerModule extends Module{
g.setColor(color_identity);
}
}
g.drawImage(controller_overlay_img, (int)(position.getX()), (int)(position.getY()), sigIRC.panel);
g.drawImage(controller_overlay_img, (int)(position.getX()), (int)(position.getY()), null);
for (Axis a : axes) {
a.drawIndicator(g);

@ -1,303 +0,0 @@
package sig.modules;
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;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.imageio.ImageIO;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.UnsupportedAudioFileException;
import javax.swing.JFileChooser;
import javax.swing.JOptionPane;
import sig.Module;
import sig.sigIRC;
import sig.modules.Controller.Controller;
public class DDRStepModule extends Module{
public static DDRStepModule step_module;
ControllerModule controller;
Controller cont;
AudioInputStream songStream,metronomeStream;
Clip audioClip,metronomeClick;
int bpm=180;
int lastsystemtime = 0;
int lastnotetime = 0;
int offset = 0;
int framecounter = 0;
Image arrow_img1,arrow_img2;
byte[] lastbuttonstate = new byte[]{0,0,0,0,0,0};
boolean[] lastpressedstate = new boolean[]{false,false,false,false,false,false};
List<Note> notelist = new ArrayList<Note>();
boolean notepressed=false;
int notespd = 256;
public DDRStepModule(Rectangle2D bounds, String moduleName) {
this(bounds,moduleName,true);
}
public DDRStepModule(Rectangle2D bounds, String moduleName, boolean enabled) {
super(bounds, moduleName, enabled);
Initialize();
}
void Initialize() {
DDRStepModule.step_module = this;
if (sigIRC.controllermodule_enabled) {
try {
metronomeStream = AudioSystem.getAudioInputStream(new File(sigIRC.BASEDIR+"sigIRC/sounds/tick.wav"));
try {
metronomeClick = AudioSystem.getClip();
metronomeClick.open(metronomeStream);
} catch (LineUnavailableException e) {
e.printStackTrace();
}
} catch (UnsupportedAudioFileException e1) {
e1.printStackTrace();
} catch (IOException e1) {
e1.printStackTrace();
}
controller = ControllerModule.controller_module;
cont = controller.getControllers().get(0);
try {
arrow_img1 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/ddr_notes1.png"));
arrow_img2 = ImageIO.read(new File(sigIRC.BASEDIR+"sigIRC/ddr_notes2.png"));
} catch (IOException e) {
e.printStackTrace();
}
} else {
System.out.println("Cannot initialize DDRStepModule due to Controller Module being disabled!");
this.enabled = false;
}
}
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();
if (cont!=null) {
//System.out.println(cont.outputButtons());
/* Start = 1
Select = 0
Up = 5
Right = 2
Left = 4
Down = 3
*/
//System.out.println((System.currentTimeMillis()-(1000/(bpm/60d)))+"/"+lastsystemtime);
if (audioClip!=null &&
audioClip.isRunning() && lastsystemtime<audioClip.getFramePosition()-(44100/(bpm/60d))) {
//System.out.print("Tick. ");
lastsystemtime += (44100/(bpm/60d));
//metronomeClick.loop(Clip.LOOP_CONTINUOUSLY);
metronomeClick.stop();
metronomeClick.setFramePosition(0);
metronomeClick.start();
} //METRONOME CODE.
if (audioClip!=null &&
audioClip.isRunning() && lastnotetime<audioClip.getFramePosition()-(44100/((bpm*2)/60d))) {
//System.out.print("Tick. ");
lastnotetime += (44100/((bpm*2)/60d));
for (int i=0;i<6;i++) {
lastpressedstate[i]=false;
}
}
if (audioClip!=null && audioClip.isRunning()) {
framecounter++;
System.out.println(audioClip.getFramePosition());
//UP
//44100Hz = 1 second
}
byte[] buttons = cont.getButtons();
HandleButton(BUTTONDIR.UP,buttons);
HandleButton(BUTTONDIR.DOWN,buttons);
HandleButton(BUTTONDIR.LEFT,buttons);
HandleButton(BUTTONDIR.RIGHT,buttons);
}
}
void HandleButton(BUTTONDIR button, byte[] buttons) {
if (lastbuttonstate[button.getButton()]==0 && buttons[button.getButton()]==1) {
System.out.println(button+" Pressed"/* at "+audioClip.getFramePosition()*/);
lastbuttonstate[button.getButton()] = buttons[button.getButton()];
if (!lastpressedstate[button.button]) {
lastpressedstate[button.button]=true;
notelist.add(new Note(lastnotetime,button.getNote()));
}
} else
if (lastbuttonstate[button.getButton()]==1 && buttons[button.getButton()]==0) {
System.out.println(button+" Released"/* at "+audioClip.getFramePosition()*/);
lastbuttonstate[button.getButton()] = buttons[button.getButton()];
}
}
class Note{
int framePosition;
//(44100/(bpm/60d)) = Quarter Note Snapping
//(44100/((bpm*2)/60d)) = Eighth Note Snapping
NOTEPROPERTIES direction;
Note(int framePosition, NOTEPROPERTIES direction) {
this.framePosition = framePosition;
this.direction = direction;
}
}
enum NOTEPROPERTIES{
UP(0,2),
DOWN(-64,1),
LEFT(-128,0),
RIGHT(64,3);
int xoffset,subimage;
NOTEPROPERTIES(int xoffset,int subimage) {
this.xoffset = xoffset;
this.subimage = subimage;
}
int getXOffset() {
return xoffset;
}
int getSubimage() {
return subimage;
}
}
enum BUTTONDIR{
UP(5,NOTEPROPERTIES.UP),
DOWN(3,NOTEPROPERTIES.DOWN),
LEFT(4,NOTEPROPERTIES.LEFT),
RIGHT(2,NOTEPROPERTIES.RIGHT);
int button;
NOTEPROPERTIES note;
BUTTONDIR(int button, NOTEPROPERTIES note) {
this.button = button;
this.note = note;
}
int getButton() {
return button;
}
NOTEPROPERTIES getNote() {
return note;
}
}
public void draw(Graphics g) {
super.draw(g);
Point initialP = new Point((int)this.position.getCenterX()-arrow_img1.getWidth(sigIRC.window)/2,(int)this.position.getY()+(int)this.position.getHeight());
g.drawImage(arrow_img1, (int)this.position.getCenterX()-arrow_img1.getWidth(sigIRC.window)/2, (int)this.position.getY()+(int)this.position.getHeight(), sigIRC.window);
if (audioClip!=null && audioClip.isRunning()) {
for (int i=notelist.size()-1;i>0;i--) {
Note n = notelist.get(i);
if ((int)(notespd*((audioClip.getFramePosition()-n.framePosition)/44100d))>this.position.getHeight()) {
break;
}
g.setColor(Color.RED);
g.drawImage(arrow_img2, initialP.x+128+n.direction.xoffset, initialP.y-(int)(notespd*((audioClip.getFramePosition()-n.framePosition)/44100d)), initialP.x+64+128+n.direction.xoffset, initialP.y+64-(int)(notespd*((audioClip.getFramePosition()-n.framePosition)/44100d)), n.direction.subimage*64, 0, n.direction.subimage*64+64, 64, new Color(0,0,0,0), sigIRC.window);
}
}
}
public void keypressed(KeyEvent ev) {
super.keypressed(ev);
if (ev.getKeyCode() == ev.VK_OPEN_BRACKET) {
JFileChooser song_choice = new JFileChooser();
int val = song_choice.showOpenDialog(sigIRC.window);
if (val == JFileChooser.APPROVE_OPTION) {
System.out.println("Opening file "+song_choice.getSelectedFile().getAbsolutePath());
}
JOptionPane bpm_pane = new JOptionPane();
String input = bpm_pane.showInputDialog(sigIRC.window,"Input Song BPM:","180");
if (input!=null && input.length()>0) {
bpm = Integer.parseInt(input);
System.out.println("BPM set to "+bpm);
try {
songStream = AudioSystem.getAudioInputStream(new File(song_choice.getSelectedFile().getAbsolutePath()));
try {
if (audioClip!=null && audioClip.isOpen()) {
audioClip.close();
}
audioClip = AudioSystem.getClip();
audioClip.open(songStream);
} catch (LineUnavailableException e) {
e.printStackTrace();
}
} catch (UnsupportedAudioFileException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
bpm_pane.showMessageDialog(sigIRC.window,"Press the RIGHT BRACKET button to begin playing.");
} else
if (ev.getKeyCode() == ev.VK_1) {
if (audioClip.isOpen() && !audioClip.isRunning()) {
audioClip.start();
framecounter = audioClip.getFramePosition();
System.out.println("Audio Clip Started.");
lastsystemtime = audioClip.getFramePosition();
lastnotetime = audioClip.getFramePosition();
}
} else
if (ev.getKeyCode() == ev.VK_2) {
if (audioClip.isOpen() && audioClip.isRunning()) {
audioClip.stop();
audioClip.setFramePosition(offset);
System.out.println("Audio Clip Stopped.");
}
} else
if (ev.getKeyCode() == ev.VK_3) {
if (audioClip.isOpen() && audioClip.isRunning()) {
offset = audioClip.getFramePosition();
//audioClip.setMicrosecondPosition(offset);
System.out.println("Set new Offset to "+offset);
}
} else
if (ev.getKeyCode() == ev.VK_4) {
if (audioClip.isOpen() && !audioClip.isRunning()) {
framecounter = 0;
audioClip.setFramePosition(0);
System.out.println("Reset offset to 0.");
}
}
}
}

@ -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;
}
}

@ -83,7 +83,7 @@ class ImagePanel extends JPanel implements MouseListener{
g.setColor(new Color(0,0,64));
g.fillRect(0, 0, 50, 50);
}
g.drawImage(img, 0, 0, this);
g.drawImage(img, 0, 0, null);
if (selected) {
g.setColor(Color.YELLOW);
for (int i=0;i<2;i++) {

@ -13,7 +13,7 @@ import sig.utils.DrawUtils;
import sig.utils.TextUtils;
public class ClickableButton {
protected int x,y,width,height;
public int x,y,width,height;
protected String label;
protected RabiRaceModule module;
@ -37,19 +37,19 @@ public class ClickableButton {
}
public boolean mouseInsideBounds(MouseEvent ev) {
return ev.getX()>=module.getPosition().getX()+x && ev.getX()<=module.getPosition().getX()+x+width &&
ev.getY()>=module.getPosition().getY()+y && ev.getY()<=module.getPosition().getY()+y+height;
return ev.getX()>=0+x && ev.getX()<=0+x+width &&
ev.getY()>=0+y && ev.getY()<=0+y+height;
}
public void draw(Graphics g) {
Color color_identity = g.getColor();
g.setColor(Color.WHITE);
g.drawRect((int)module.getPosition().getX()+x,
(int)module.getPosition().getY()+y, width, height);
g.drawRect((int)0+x,
(int)0+y, width, height);
g.setColor(Color.BLACK);
g.fillRect((int)module.getPosition().getX()+x+1,
(int)module.getPosition().getY()+y+1, width-1, height-1);
DrawUtils.drawTextFont(g, sigIRC.panel.userFont, module.getPosition().getX()+x-TextUtils.calculateStringBoundsFont(label, sigIRC.panel.userFont).getWidth()/2+width/2, module.getPosition().getY()+y+height-1, Color.WHITE, label);
g.fillRect((int)0+x+1,
(int)0+y+1, width-1, height-1);
DrawUtils.drawTextFont(g, sigIRC.userFont, 0+x-TextUtils.calculateStringBoundsFont(label, sigIRC.userFont).getWidth()/2+width/2, 0+y+height-1, Color.WHITE, label);
g.setColor(color_identity);
}
}

@ -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,11 +21,15 @@ 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;
if (
RabiRaceModule.module.myProfile!=null) {
RabiRaceModule.module.myProfile.image_display_update_required = true;
RabiRaceModule.module.myProfile.stat_update_required = true;
}
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {

@ -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();
}
}
}

@ -103,4 +103,4 @@ public enum MemoryData {
public String getDisplayName() {
return (key_item)?name:name+" Badge";
}
}
}

@ -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>();
@ -54,15 +49,16 @@ public class Profile {
RabiRaceModule parent;
public long lastWebUpdate = System.currentTimeMillis();
DecimalFormat df = new DecimalFormat("0.0");
Profile oldProfile;
public Profile oldProfile;
public boolean isArchive = false;
final static Color TEAL = new Color(0,128,128);
public Image statUpdateCacheImage;
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 int avatarval = 0;
public static Image rainbowEggImage;
public static Image darkRainbowEggImage;
public Profile(RabiRaceModule module) {
this(module,true);
@ -86,39 +82,75 @@ 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;
oldProfile.difficulty = difficulty;
oldProfile.loop = loop;
oldProfile.itempct = itempct;
oldProfile.mappct = mappct;
}
public int compareAllChangedStatValues() {
int count=0;
if (oldProfile.playtime/60!=playtime/60 ||
oldProfile.avatarval!=avatar.value ||
oldProfile.isPaused!=isPaused ||
oldProfile.difficulty!=difficulty ||
oldProfile.loop!=loop ||
oldProfile.itempct!=itempct ||
oldProfile.mappct!=mappct) {
//System.out.println("Something has changed.");
count++;
} else {
/*System.out.println("All values are the same... "+oldProfile.playtime+","+playtime+"|"
+oldProfile.avatarval+","+avatar.value+"|"+oldProfile.isPaused+","+isPaused+"|"
+oldProfile.difficulty+","+difficulty+"|"+oldProfile.loop+","+loop+"|"
+oldProfile.itempct+","+itempct+"|"+oldProfile.mappct+","+mappct+"|");*/
}
return count;
}
public int compareAllChangedValues() {
int count=0;
if (oldProfile.healthUps!=healthUps) {
count++;
//System.out.println("Health ups changed. "+(healthUps-oldProfile.healthUps));
}
if (oldProfile.attackUps!=attackUps) {
count++;
//System.out.println("Attack ups changed. "+(attackUps-oldProfile.attackUps));
}
if (oldProfile.manaUps!=manaUps) {
count++;
//System.out.println("Mana ups changed. "+(manaUps-oldProfile.manaUps));
}
if (oldProfile.regenUps!=regenUps) {
count++;
//System.out.println("Regen ups changed. "+(regenUps-oldProfile.regenUps));
}
if (oldProfile.packUps!=packUps) {
count++;
//System.out.println("Pack ups changed. "+(packUps-oldProfile.packUps));
}
if (oldProfile.rainbowEggs!=rainbowEggs) {
if (oldProfile.rainbowEggCount!=rainbowEggCount) {
//System.out.println("Rainbow Egg Count changed. "+(rainbowEggCount-oldProfile.rainbowEggCount));
count++;
}
for (MemoryData md : key_items.keySet()) {
if ((!oldProfile.key_items.containsKey(md) &&
key_items.containsKey(md)) || (
key_items.containsKey(md)) || ((
oldProfile.key_items.containsKey(md) &&
key_items.containsKey(md)) &&
oldProfile.key_items.get(md)!=key_items.get(md)
oldProfile.key_items.get(md).compareTo(key_items.get(md))!=0)
) {
/*if (!oldProfile.key_items.containsKey(md) &&
key_items.containsKey(md)) {
System.out.println("Key item difference: "+(md));
} else {
System.out.println("Key item value difference: "+md+":"+(oldProfile.key_items.get(md)+"->"+key_items.get(md)));
}*/
count++;
}
}
@ -127,84 +159,20 @@ public class Profile {
badges.containsKey(md)) || (
oldProfile.badges.containsKey(md) &&
badges.containsKey(md)) &&
oldProfile.badges.get(md)!=badges.get(md)
oldProfile.badges.get(md).compareTo(badges.get(md))!=0
) {
/*if (!oldProfile.badges.containsKey(md) &&
badges.containsKey(md)) {
System.out.println("Badge difference: "+(md));
} else {
System.out.println("Badge value difference: "+md+":"+(oldProfile.badges.get(md)+"->"+badges.get(md)));
}*/
count++;
}
}
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 +180,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 +232,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 +259,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 +278,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 +324,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 +335,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 +359,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 +370,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);
@ -530,29 +384,28 @@ public class Profile {
g2.setColor(Color.BLACK);
//g2.fillRect(1, 1, 32, 32);
g2.drawImage(avatar.getAvatarImage(), 1, 1, sigIRC.panel);
g2.drawImage(avatar.getAvatarImage(), 1, 1, null);
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.rabiRibiMoneyDisplayFont, 54, 26, 1, g2.getColor(), Color.BLACK, displayName);
DrawUtils.drawCenteredOutlineText(g2, sigIRC.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.rabiRibiMoneyDisplayFont, (int)(tmp.getWidth() - TextUtils.calculateStringBoundsFont(text, sigIRC.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.rabiRibiTinyDisplayFont, (int)(tmp.getWidth()*0.6), 50, 2, Color.WHITE, Color.BLACK, text);
if (statUpdateCacheImage!=null) {
statUpdateCacheImage.flush();
}
g2.dispose();
statUpdateCacheImage = tmp.getScaledInstance(w, -1, Image.SCALE_AREA_AVERAGING);
//stat_update_required = false;
stat_update_required = false;
System.out.println("Updated stat text for user "+username+".");
}
return statUpdateCacheImage;
@ -595,6 +448,110 @@ public class Profile {
}
return diffstring;
}
public Image getRainbowEggPanel(int w, Session session) {
BufferedImage tmp = new BufferedImage(400,175,BufferedImage.TYPE_INT_ARGB);
Graphics2D g2 = tmp.createGraphics();
if (Profile.darkRainbowEggImage==null) {
Profile.darkRainbowEggImage = DrawUtils.getBlendedImage(g2, RabiRaceModule.image_map.get("easter_egg.png"), new Color(0,0,0,192), RabiRaceModule.window);
Profile.rainbowEggImage = DrawUtils.getBlendedImage(g2, RabiRaceModule.image_map.get("easter_egg.png"), RabiRaceModule.rainbowcycler.getCycleColor(), RabiRaceModule.window);
} else {
Profile.rainbowEggImage.flush();
Profile.rainbowEggImage = DrawUtils.getBlendedImage(g2, RabiRaceModule.image_map.get("easter_egg.png"), RabiRaceModule.rainbowcycler.getCycleColor(), RabiRaceModule.window);
//System.out.println("Rainbow egg color is "+RabiRaceModule.rainbowcycler.getCycleColor());
}
//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));
final int border=20;
final int width=(int)(tmp.getWidth()-border*2);
int spacing=width/5;
int shiftyval = 0;
double iconsize = 1;
final int icon_size = 24;
int rainbowEggLimit = 0;
int gamemode = -1;
if (RabiRaceModule.mySession!=null) {
gamemode = RabiRaceModule.mySession.gamemode;
}
if (gamemode!=-1) {
switch (gamemode) {
case 0:{ //Egg Hunt.
if (session.eggCount>0) {
spacing = width/session.eggCount;
rainbowEggLimit = session.eggCount;
} else {
spacing = width/5;
rainbowEggLimit = session.eggCount;
}
//Image img = RabiRaceModule.image_map.get("easter_egg.png");
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(parent.panel)/4),(int)(36),col,parent.panel);
Image img;
if (rainbowEggCount>i) {
img = Profile.rainbowEggImage;
} else {
img = Profile.darkRainbowEggImage;
}
g2.drawImage(img, (int)(border+i*spacing-img.getWidth(parent.panel)/4),(int)(36), null);
}
}break;
}
} else {
shiftyval = -RabiRaceModule.image_map.get("easter_egg.png").getWidth(parent.panel)/2;
iconsize = 1;
}
/*
{
Image img = RabiRaceModule.image_map.get("easter_egg.png");
Color col = RabiRaceModule.rainbowcycler.getCycleColor();
DrawUtils.drawImage(g2, img, (int)(border+((1.5)*spacing)-img.getWidth(sigIRC.panel)/4),(int)(36),col,sigIRC.panel);
DrawUtils.drawCenteredOutlineText(g2, sigIRC.panel.programFont, (int)(border+((3)*spacing)-img.getWidth(sigIRC.panel)/4),(int)12+img.getHeight(sigIRC.panel), 1, Color.WHITE, Color.BLUE,"x"+rainbowEggCount);
}
*/
int size = key_items.size();
int count = 0;
try {
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,
};
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] = 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);
int counting=0;
for (Image img : imgs) {
if (counting++==5) {
g2.drawImage(rainbowEggImage, (int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56)+shiftyval,(int)icon_size,(int)icon_size,null);
//DrawUtils.drawImageScaled(g2, img,(int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56)+shiftyval, (int)icon_size, (int)icon_size, RabiRaceModule.rainbowcycler.getCycleColor(), parent.panel);
}
//DrawUtils.drawCenteredOutlineText(g2, sigIRC.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++]));
i++;
}
} catch (ConcurrentModificationException e) {
}
g2.dispose();
//g.drawImage(tmp, (int)parent.position.getX(), (int)parent.position.getY(), 120, 64, sigIRC.panel);
//image_display_update_required=false;
//System.out.println("Updated Image Display for user "+username+".");
return tmp.getScaledInstance(w, -1, Image.SCALE_AREA_AVERAGING);
}
public Image getStatPanel(int w, Session session) {
@ -618,26 +575,26 @@ 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;
//shiftyval+=RabiRaceModule.image_map.get("easter_egg.png").getHeight(parent.panel);
} 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);
//Image img = RabiRaceModule.image_map.get("easter_egg.png");
/*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(parent.panel)/4),(int)(36),col,parent.panel);
Image img;
if (rainbowEggCount>i) {
img = Profile.rainbowEggImage;
} else {
img = Profile.darkRainbowEggImage;
}
}
g2.drawImage(img, (int)(border+i*spacing-img.getWidth(parent.panel)/4),(int)(36), parent.panel);
}*/
}break;
case 1:{ //Item Hunt.
spacing = width/session.itemHuntData.length;
@ -648,16 +605,16 @@ public class Profile {
(badges.containsKey(item) &&
badges.get(item)>=1)) {
//DrawUtils.drawImage(g2, item.getImage(), (int)(border+i*spacing-item.getImage().getWidth(sigIRC.panel)/4),(int)(36),col,sigIRC.panel);
g2.drawImage(item.getImage(), (int)(border+i*spacing),(int)(36+16), icon_size*2, icon_size*2, sigIRC.panel);
g2.drawImage(item.getImage(), (int)(border+i*spacing),(int)(36+16), icon_size*2, icon_size*2, null);
} else {
DrawUtils.drawImageScaled(g2, item.getImage(), (int)(border+i*spacing),(int)(36+16),icon_size*2, icon_size*2,new Color(0,0,0,192),sigIRC.panel);
DrawUtils.drawImageScaled(g2, item.getImage(), (int)(border+i*spacing),(int)(36+16),icon_size*2, icon_size*2,new Color(0,0,0,192),null);
}
}
spacing=width/5;
}break;
}
} else {
shiftyval = -RabiRaceModule.image_map.get("easter_egg.png").getWidth(sigIRC.panel)/2;
shiftyval = -RabiRaceModule.image_map.get("easter_egg.png").getWidth(parent.panel)/2;
iconsize = 1;
}
/*
@ -675,15 +632,15 @@ public class Profile {
if (key_items.get(data)<0) {
Image img = data.getImage().getScaledInstance(icon_size, icon_size, Image.SCALE_DEFAULT);
if (size*icon_size<width) {
DrawUtils.drawImageScaled(g2, img, (int)(+border+((count++)*icon_size)), (int)(+96+8)+shiftyval, (int)icon_size*iconsize, (int)icon_size*iconsize, new Color(0,0,0,128), sigIRC.panel);
DrawUtils.drawImageScaled(g2, img, (int)(+border+((count++)*icon_size)), (int)(+96+8)+shiftyval, (int)icon_size*iconsize, (int)icon_size*iconsize, new Color(0,0,0,128), null);
} else {
DrawUtils.drawImageScaled(g2, img, (int)(+border+((width/size)*(count++))), (int)(+96+8)+shiftyval, (int)icon_size*iconsize, (int)icon_size*iconsize, new Color(0,0,0,128), sigIRC.panel);
DrawUtils.drawImageScaled(g2, img, (int)(+border+((width/size)*(count++))), (int)(+96+8)+shiftyval, (int)icon_size*iconsize, (int)icon_size*iconsize, new Color(0,0,0,128), null);
}
} else {
if (size*icon_size<width) {
g2.drawImage(data.getImage(), (int)(+border+((count++)*icon_size)), (int)(+96+8)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), sigIRC.panel);
g2.drawImage(data.getImage(), (int)(+border+((count++)*icon_size)), (int)(+96+8)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), null);
} else {
g2.drawImage(data.getImage(), (int)(+border+((width/size)*(count++))), (int)(+96+8)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), sigIRC.panel);
g2.drawImage(data.getImage(), (int)(+border+((width/size)*(count++))), (int)(+96+8)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), null);
}
}
}
@ -691,14 +648,14 @@ public class Profile {
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)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), sigIRC.panel);
g2.drawImage(data.getImage(), (int)(+border+((count++)*icon_size)), (int)(+96+32)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), null);
if (badges.get(data)==2) {
DrawUtils.drawOutlineText(g2, sigIRC.panel.smallFont, (int)(+border+((count-1)*icon_size))+4, (int)(+96+32)+icon_size+shiftyval, 1, Color.WHITE, TEAL, "E");
DrawUtils.drawOutlineText(g2, sigIRC.smallFont, (int)(+border+((count-1)*icon_size))+4, (int)(+96+32)+icon_size+shiftyval, 1, Color.WHITE, TEAL, "E");
}
} else {
g2.drawImage(data.getImage(), (int)(+border+((width/size)*(count++))), (int)(+96+32)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), sigIRC.panel);
g2.drawImage(data.getImage(), (int)(+border+((width/size)*(count++))), (int)(+96+32)+shiftyval, (int)(icon_size*iconsize), (int)(icon_size*iconsize), null);
if (badges.get(data)==2) {
DrawUtils.drawOutlineText(g2, sigIRC.panel.smallFont, (int)(+border+((width/size)*(count-1)))+4, (int)(+96+32)+icon_size+shiftyval, 1, Color.WHITE, TEAL, "E");
DrawUtils.drawOutlineText(g2, sigIRC.smallFont, (int)(+border+((width/size)*(count-1)))+4, (int)(+96+32)+icon_size+shiftyval, 1, Color.WHITE, TEAL, "E");
}
}
}
@ -709,37 +666,38 @@ 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);
int counting=0;
for (Image img : imgs) {
if (counting++==5) {
DrawUtils.drawImageScaled(g2, img,(int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56)+shiftyval, (int)icon_size, (int)icon_size, RabiRaceModule.rainbowcycler.getCycleColor(), sigIRC.panel);
} else {
g2.drawImage(img,(int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56)+shiftyval, (int)icon_size, (int)icon_size, sigIRC.panel);
if (counting++!=5) {
//Rainbow egg is drawn separately.
g2.drawImage(img,(int)(+border+((i)*(spacing))-icon_size/2),(int)(+96+56)+shiftyval, (int)icon_size, (int)icon_size, null);
}
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.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) {
}
if (imageDisplayUpdateImage!=null) {
imageDisplayUpdateImage.flush();
}
imageDisplayUpdateImage = tmp.getScaledInstance(w, -1, Image.SCALE_AREA_AVERAGING);
//g.drawImage(tmp, (int)parent.position.getX(), (int)parent.position.getY(), 120, 64, sigIRC.panel);
//image_display_update_required=false;
//System.out.println("Updated Image Display.");
image_display_update_required=false;
//System.out.println("Updated Image Display for user "+username+".");
}
return imageDisplayUpdateImage;
@ -806,8 +764,10 @@ public class Profile {
for (Profile p : players) {
Image panel = p.getStatPanel(w,session);
Image panel2 = p.getStatText(w,session);
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);
Image panel3 = p.getRainbowEggPanel(w,session);
g.drawImage(panel,(int)(x+xx*panel.getWidth(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(y+yy*panel.getHeight(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(panel.getWidth(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(panel.getHeight(RabiRaceModule.module.panel)/((rows+cols)/2d)),null);
g.drawImage(panel2,(int)(x+xx*panel2.getWidth(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(y+yy*panel2.getHeight(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(panel2.getWidth(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(panel2.getHeight(RabiRaceModule.module.panel)/((rows+cols)/2d)),null);
g.drawImage(panel3,(int)(x+xx*panel3.getWidth(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(y+yy*panel3.getHeight(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(panel3.getWidth(RabiRaceModule.module.panel)/((rows+cols)/2d)),(int)(panel3.getHeight(RabiRaceModule.module.panel)/((rows+cols)/2d)),null);
if (xx+1<cols) {
xx++;
} else {

@ -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;
@ -495,7 +474,7 @@ public class SessionCreateWindow extends JFrame{
setBackground(list.getBackground());
setForeground(list.getForeground());
}
setFont(sigIRC.panel.rabiRibiMoneyDisplayFont);
setFont(sigIRC.rabiRibiMoneyDisplayFont);
setIconTextGap(4);
return this;
}

@ -148,9 +148,13 @@ 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 (RabiRaceModule.module.myProfile!=null) {
RabiRaceModule.module.myProfile.image_display_update_required = true;
RabiRaceModule.module.myProfile.stat_update_required = true;
}
if (data.length==1) {
int errorCode = Integer.parseInt(data[0]);
switch (errorCode) {
@ -208,8 +212,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.
}

@ -4,8 +4,8 @@ import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.event.ComponentEvent;
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 +38,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,67 +49,40 @@ 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;
import sig.windows.ProgramWindow;
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>();
public RabiRaceModule(Rectangle2D bounds, String moduleName) {
public RabiRaceModule(Rectangle bounds, String moduleName) {
super(bounds, moduleName);
//Initialize();
Initialize();
@ -125,31 +97,42 @@ 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);
/*
for (MemoryData data : MemoryData.values()) {
//Attempt to fetch from server.
new FileManager("sigIRC/rabi-ribi/items/"+data.img_path).verifyAndFetchFileFromServer();
@ -163,7 +146,7 @@ public class RabiRaceModule extends Module{
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();
*/
AddImagesToImageMap(dir,ITEMS_DIRECTORY);
dir = new File(AVATAR_DIRECTORY);
AddImagesToImageMap(dir,AVATAR_DIRECTORY);
@ -178,84 +161,14 @@ 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();
}
//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);
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;
join_button = new JoinButton(new Rectangle(2,(int)(position.getHeight()-Module.WINDOW_EXTRA_BORDER-36),120,18),"Join Session (0)",this);
create_button = new CreateButton(new Rectangle(122,(int)(position.getHeight()-Module.WINDOW_EXTRA_BORDER-36),120,18),"Create Session",this);
}
private void AddImagesToImageMap(File dir, String DIRECTORY) {
@ -281,206 +194,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 +223,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 +233,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 +283,11 @@ public class RabiRaceModule extends Module{
}
public void run() {
frames++;
super.run();
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));*/
//Profile.rainbowEggImage.flush();
//Profile.rainbowEggImage = DrawUtils.getBlendedImage(RabiRaceModule.module.panel.getGraphics().create(), RabiRaceModule.image_map.get("easter_egg.png"), RabiRaceModule.rainbowcycler.getCycleColor(), RabiRaceModule.window);
if (window!=null) {
window.run();
}
@ -588,85 +296,35 @@ 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 void componentResized(ComponentEvent e) {
super.componentResized(e);
if (myProfile!=null) {
myProfile.image_display_update_required=true;
myProfile.stat_update_required=true;
}
if (join_button!=null && create_button!=null) {
join_button.y=(int)(position.getHeight()-Module.WINDOW_EXTRA_BORDER-36);
create_button.y=(int)(position.getHeight()-Module.WINDOW_EXTRA_BORDER-36);
}
}
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.oldProfile.isPaused = myProfile.isPaused;
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 +332,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();
@ -684,10 +342,17 @@ public class RabiRaceModule extends Module{
if (myProfile.compareAllChangedValues()>0) {
myProfile.image_display_update_required=true;
}
myProfile.stat_update_required=true;
if (myProfile.compareAllChangedStatValues()>0) {
myProfile.stat_update_required=true;
}
myProfile.oldProfile.avatarval = myProfile.avatar.value;
firstUpdate=false;
} else
if (myProfile.compareAllChangedStatValues()>0) {
myProfile.archiveAllValues();
myProfile.oldProfile.avatarval = myProfile.avatar.value;
myProfile.stat_update_required=true;
}
myProfile.playtime = readIntFromMemory(MemoryOffset.PLAYTIME);
if (mySession!=null) {
for (Profile p : mySession.getPlayers()) {
if (!p.username.equalsIgnoreCase(myProfile.username)) {
@ -703,8 +368,13 @@ public class RabiRaceModule extends Module{
public void ApplyConfigWindowProperties() {
sigIRC.rabiracemodule_X=(int)position.getX();
sigIRC.rabiracemodule_Y=(int)position.getY();
sigIRC.rabiracemodule_width=(int)position.getWidth();
sigIRC.rabiracemodule_height=(int)position.getHeight();
sigIRC.config.setInteger("RABIRACE_module_X", sigIRC.rabiracemodule_X);
sigIRC.config.setInteger("RABIRACE_module_Y", sigIRC.rabiracemodule_Y);
sigIRC.config.setInteger("RABIRACE_module_width", sigIRC.rabiracemodule_width);
sigIRC.config.setInteger("RABIRACE_module_height", sigIRC.rabiracemodule_height);
sigIRC.config.saveProperties();
}
/*public int readIntFromErinaData(MemoryOffset val) {
@ -727,36 +397,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,42 +455,44 @@ 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) {
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.");
DrawUtils.drawTextFont(g, sigIRC.userFont, 0, 0+26, Color.BLACK, "Rabi-Ribi not found! Please start it.");
} else {
//myProfile.draw(g);
Image panel = myProfile.getStatPanel((int)position.getWidth(),mySession);
if (sigIRC.panel.lastMouseX>=position.getX() &&
sigIRC.panel.lastMouseX<=position.getX()+(int)((position.getWidth()/400)*50) &&
sigIRC.panel.lastMouseY>=position.getY() &&
sigIRC.panel.lastMouseY<=position.getY()+(int)(((position.getWidth()/400)*50))) {
Image panel = myProfile.getStatPanel((int)position.getWidth()-24,mySession);
//System.out.println(ProgramWindow.frame.lastMouseX+","+ProgramWindow.frame.lastMouseY+";"+position.getX()+","+position.getY());
if (ProgramWindow.frame.lastMouseX>=position.getX() &&
ProgramWindow.frame.lastMouseX<=position.getX()+(int)((position.getWidth()/400)*50) &&
ProgramWindow.frame.lastMouseY>=position.getY()+Module.WINDOW_EXTRA_BORDER &&
ProgramWindow.frame.lastMouseY<=position.getY()+Module.WINDOW_EXTRA_BORDER+(int)(((position.getWidth()/400)*50))) {
mouseoverAvatar=true;
Color ident = g.getColor();
g.setColor(new Color(196,196,196,128));
g.fillRect((int)(position.getX()+1), (int)(position.getY()+1), (int)((position.getWidth()/400)*50), (int)((position.getWidth()/400)*50));
g.fillRect((int)(0+1), (int)(0+1), (int)((position.getWidth()/400)*50), (int)((position.getWidth()/400)*50));
g.setColor(ident);
//System.out.println("Mouse over avatar.");
} else {
mouseoverAvatar=false;
}
g.drawImage(panel, (int)position.getX(), (int)position.getY(), sigIRC.panel);
g.drawImage(myProfile.getStatText((int)position.getWidth(),mySession), (int)position.getX(), (int)position.getY(), sigIRC.panel);
g.drawImage(panel, (int)0, (int)0, null);
g.drawImage(myProfile.getStatText((int)position.getWidth()-24,mySession), (int)0, (int)0, null);
g.drawImage(myProfile.getRainbowEggPanel((int)position.getWidth()-24,mySession), (int)0, (int)0, null);
//Profile.DrawMultiPanel(g, (int)(position.getX()), (int)(position.getY())+panel.getHeight(sigIRC.panel), (int)position.getWidth(), testing);
//Profile.DrawMultiPanel(g, (int)(0), (int)(0)+panel.getHeight(sigIRC.panel), (int)position.getWidth(), testing);
if (mySession!=null) {
List<Profile> sessionPlayers = new ArrayList<Profile>();
for (Profile p : mySession.getPlayers()) {
@ -859,7 +501,7 @@ public class RabiRaceModule extends Module{
//System.out.println("Found unique player "+p);
}
}
Profile.DrawMultiPanel(g, (int)(position.getX()), (int)(position.getY())+panel.getHeight(sigIRC.panel), (int)position.getWidth(), mySession);
Profile.DrawMultiPanel(g, (int)(0), (int)(0)+panel.getHeight(module.panel), (int)position.getWidth()-24, mySession);
}
if (firstCheck) {
@ -868,15 +510,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.fillRect((int)(position.getX()), (int)(position.getY()+position.getHeight()-28-20), (int)(position.getWidth()), 20);
g.setColor(Color.BLACK);
g.fillRect((int)(0), (int)(0+position.getHeight()-28-20), (int)(position.getWidth()), 20);
for (int i=0;i<messages.size();i++) {
messages.get(i).draw(g);
}*/
}
}
}
@ -891,7 +529,7 @@ public class RabiRaceModule extends Module{
this.msg = message;
this.x = x;
this.y = y;
this.bounds = TextUtils.calculateStringBoundsFont(message, sigIRC.panel.rabiRibiTinyDisplayFont);
this.bounds = TextUtils.calculateStringBoundsFont(message, sigIRC.rabiRibiTinyDisplayFont);
RabiRaceModule.lastScrollX += bounds.getWidth() + 96;
}
@ -905,18 +543,8 @@ public class RabiRaceModule extends Module{
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);
DrawUtils.drawOutlineText(g, sigIRC.rabiRibiTinyDisplayFont, 0+x, 0+y-6, 2, Color.WHITE, Color.GRAY, msg);
}
}
}
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,132 @@ 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),
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),
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),
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_V185_TO_V1881),
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,0x13423F8+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190),
MAP_PERCENT(0,0x13413E4,0x1342404+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x13423F4+OffsetHelper.MEMORY_OFFSET_V1881_TO_V190),
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;
this.latest_offset = offset_v188;
}
public long getOffset() {
return base_offset+latest_offset;
return latest_offset;
}
public long getOriginalOffset() {
return base_offset;
public long getOffsetV175() {
return offset;
}
public long getOffsetV185() {
@ -220,6 +188,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;
@ -63,7 +62,7 @@ public class RabiRibiModule extends Module{
if (moneyearned>0 && moneytime>playtime) {
setTarget(overlay.getScreenPosition(readFloatFromErinaData(MemoryOffset.ERINA_XPOS), readFloatFromErinaData(MemoryOffset.ERINA_YPOS)));
//System.out.println(x+","+y);
DrawUtils.drawCenteredOutlineText(g, sigIRC.panel.rabiRibiMoneyDisplayFont, (int)x, (int)y-96, 2, Color.ORANGE, Color.BLACK, "+"+moneyearned+"EN");
DrawUtils.drawCenteredOutlineText(g, sigIRC.rabiRibiMoneyDisplayFont, (int)x, (int)y-96, 2, Color.ORANGE, Color.BLACK, "+"+moneyearned+"EN");
}
}
};
@ -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();
@ -255,9 +234,9 @@ public class RabiRibiModule extends Module{
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, position.getX(), position.getY()+(i+=24), 3, Color.BLACK, Color.WHITE, "HP: "+readIntFromErinaData(MemoryOffset.ERINA_HP)+"/"+readIntFromErinaData(MemoryOffset.ERINA_MAXHP));
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, position.getX(), position.getY()+(i+=24), 3, Color.BLACK, Color.WHITE, "POS ("+(int)readFloatFromErinaData(MemoryOffset.ERINA_XPOS)/1280+","+(int)readFloatFromErinaData(MemoryOffset.ERINA_YPOS)/720+")");
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, position.getX(), position.getY()+(i+=24), 3, Color.BLACK, Color.WHITE, "MAP: "+readIntFromMemory(MemoryOffset.MAPID));*/
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, position.getX(), position.getY()+(i+=24), 3, Color.BLACK, Color.WHITE, "POS ("+(readFloatFromErinaData(MemoryOffset.ERINA_XPOS))+","+(readFloatFromErinaData(MemoryOffset.ERINA_YPOS))+")");
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, position.getX(), position.getY()+(i+=24), 3, Color.BLACK, Color.WHITE, "MONEY: ("+(readIntFromMemory(MemoryOffset.MONEY))+")");
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, position.getX(), position.getY()+(i+=24), 3, Color.BLACK, Color.WHITE, "CAMERA ("+(readIntFromMemory(MemoryOffset.CAMERA_XPOS))+","+(readIntFromMemory(MemoryOffset.CAMERA_YPOS))+")");
DrawUtils.drawOutlineText(g, sigIRC.programFont, position.getX(), position.getY()+(i+=24), 3, Color.BLACK, Color.WHITE, "POS ("+(readFloatFromErinaData(MemoryOffset.ERINA_XPOS))+","+(readFloatFromErinaData(MemoryOffset.ERINA_YPOS))+")");
DrawUtils.drawOutlineText(g, sigIRC.programFont, position.getX(), position.getY()+(i+=24), 3, Color.BLACK, Color.WHITE, "MONEY: ("+(readIntFromMemory(MemoryOffset.MONEY))+")");
DrawUtils.drawOutlineText(g, sigIRC.programFont, position.getX(), position.getY()+(i+=24), 3, Color.BLACK, Color.WHITE, "CAMERA ("+(readIntFromMemory(MemoryOffset.CAMERA_XPOS))+","+(readIntFromMemory(MemoryOffset.CAMERA_YPOS))+")");
//DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, position.getX(), position.getY()+(i+=24), 3, Color.BLACK, Color.WHITE, "SCREENPOS ("+overlay.getScreenPosition(readFloatFromErinaData(MemoryOffset.ERINA_XPOS), readFloatFromErinaData(MemoryOffset.ERINA_YPOS))+")");
overlay.draw(g);
/*DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, position.getX(), position.getY()+(i+=24), 3, Color.BLACK, Color.WHITE,
@ -276,8 +255,8 @@ public class RabiRibiModule extends Module{
for (Integer numb : entities.keySet()) {
Entity ent = entities.get(numb);
if (ent.getLastHitTime()>readIntFromMemory(MemoryOffset.PLAYTIME)-180) {
for (String s : TextUtils.WrapText("Entity "+ent.getID()+": "+ent.getHealth()+"/"+ent.getMaxHealth()+" HP "+((ent.getHealth()/(float)ent.getMaxHealth())*100)+"%".replaceAll(",", ", "), sigIRC.panel.programFont, position.getWidth()-20)) {
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, position.getX()+20, position.getY()+(i+=24), 3, Color.BLACK, Color.WHITE,
for (String s : TextUtils.WrapText("Entity "+ent.getID()+": "+ent.getHealth()+"/"+ent.getMaxHealth()+" HP "+((ent.getHealth()/(float)ent.getMaxHealth())*100)+"%".replaceAll(",", ", "), sigIRC.programFont, position.getWidth()-20)) {
DrawUtils.drawOutlineText(g, sigIRC.programFont, position.getX()+20, position.getY()+(i+=24), 3, Color.BLACK, Color.WHITE,
s);
}
}
@ -291,7 +270,7 @@ public class RabiRibiModule extends Module{
int playtime = readIntFromMemory(MemoryOffset.PLAYTIME);
if (statustext.length()>0 && statustime>playtime-300) {
DrawUtils.drawOutlineText(g, sigIRC.panel.programFont, position.getX(), position.getY()+(i+=48), 3, Color.GREEN, Color.LIGHT_GRAY, statustext);
DrawUtils.drawOutlineText(g, sigIRC.programFont, position.getX(), position.getY()+(i+=48), 3, Color.GREEN, Color.LIGHT_GRAY, statustext);
}
en_counter.draw(g);

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save