Changed Sync requirements for specific events.
This commit is contained in:
parent
fb83cfd850
commit
748c549b6f
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -299,14 +299,40 @@ public class Profile {
|
||||
}
|
||||
String[] previousEventStruct = eventStruct.split("_");
|
||||
StringBuilder events = new StringBuilder();
|
||||
|
||||
|
||||
|
||||
if (parent.readIntFromMemory(MemoryOffset.PLAYERHEALTH)<=0) {
|
||||
RabiRaceModule.syncEvents=false;
|
||||
}
|
||||
|
||||
if (!RabiRaceModule.syncEvents && parent.readIntFromMemory(MemoryOffset.PLAYERHEALTH)>0 &&
|
||||
parent.readIntFromMemory(MemoryOffset.DARKNESS)==0 && !RabiRaceModule.darknessHasReachedzero) {
|
||||
RabiRaceModule.syncEvents=true;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
for (int i=0;i<EVENT_COUNT;i++) {
|
||||
if (NonRestrictedValue(i) || parent.readIntFromMemory(MemoryOffset.AUTOSAVE.getOffset())==1) {
|
||||
if (NonRestrictedValue(i)) {
|
||||
int val = parent.readIntFromMemory(MemoryOffset.EVENT_START.getOffset()+i*4);
|
||||
events.append(val);
|
||||
events.append("_");
|
||||
} else {
|
||||
events.append(previousEventStruct[i]);
|
||||
events.append("_");
|
||||
if (RabiRaceModule.syncEvents) {
|
||||
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.");
|
||||
|
||||
@ -92,8 +92,9 @@ public class RabiRaceModule extends Module{
|
||||
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 = false; //darkness needs to go down to 0, then go back up.
|
||||
int frames=0;
|
||||
public static boolean regularupdatePerformed=false;
|
||||
|
||||
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};
|
||||
|
||||
@ -189,14 +190,12 @@ public class RabiRaceModule extends Module{
|
||||
private void RunRabiRaceUpdater() {
|
||||
if (foundRabiRibi) {
|
||||
UpdateMyProfile();
|
||||
regularupdatePerformed=true;
|
||||
}
|
||||
}
|
||||
|
||||
private void RunRabiRace() {
|
||||
CheckRabiRibiClient();
|
||||
if (foundRabiRibi &&
|
||||
regularupdatePerformed) {
|
||||
if (foundRabiRibi) {
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Start update cycle...", "debug.log");
|
||||
myProfile.uploadProfile();
|
||||
getSessionList();
|
||||
@ -207,7 +206,6 @@ public class RabiRaceModule extends Module{
|
||||
RequestData("tmp.data","key=keepalivesession&session="+mySession.getID());
|
||||
FileUtils.logToFile("["+System.currentTimeMillis()+"]Requested data"+"key=keepalivesession&session="+mySession.getID(), "debug.log");
|
||||
}
|
||||
regularupdatePerformed=false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -166,6 +166,9 @@ public enum MemoryOffset {
|
||||
|
||||
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),
|
||||
;
|
||||
|
||||
long base_offset;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user