Account for events that need to be completed (boss fights)

master
sigonasr2 5 years ago
parent c95db007fb
commit 9f89675334
  1. BIN
      sigIRCv2.jar
  2. 14
      src/sig/modules/RabiRace/Profile.java
  3. 2
      src/sig/modules/RabiRaceModule.java
  4. 1
      src/sig/modules/RabiRibi/MemoryOffset.java

Binary file not shown.

@ -297,11 +297,17 @@ public class Profile {
badges.remove(md);
}
}
String[] previousEventStruct = eventStruct.split("_");
StringBuilder events = new StringBuilder();
for (int i=0;i<EVENT_COUNT;i++) {
if (NonRestrictedValue(i) || parent.readIntFromMemory(MemoryOffset.AUTOSAVE.getOffset())==1) {
int val = parent.readIntFromMemory(MemoryOffset.EVENT_START.getOffset()+i*4);
events.append(val);
events.append("_");
} else {
events.append(previousEventStruct[i]);
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));
@ -312,6 +318,14 @@ public class Profile {
eventStruct = events.toString();
}
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");

@ -94,6 +94,8 @@ public class RabiRaceModule extends Module{
public static ScheduledExecutorService scheduler,scheduler2;
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 SessionListData session_listing = new SessionListData();
ClickableButton join_button,create_button,markmap_button;

@ -165,6 +165,7 @@ public enum MemoryOffset {
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.
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.
;
long base_offset;

Loading…
Cancel
Save