diff --git a/sigIRCv2.jar b/sigIRCv2.jar index b2d241b..cbe3434 100644 Binary files a/sigIRCv2.jar and b/sigIRCv2.jar differ diff --git a/src/sig/modules/RabiRace/Profile.java b/src/sig/modules/RabiRace/Profile.java index 6d9fac6..7af5e2c 100644 --- a/src/sig/modules/RabiRace/Profile.java +++ b/src/sig/modules/RabiRace/Profile.java @@ -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;i9 || val<0) { //System.out.println("WARNING! Event "+(256+i)+" has a value greater than 9 or negative number! Truncating to 1 value."); diff --git a/src/sig/modules/RabiRaceModule.java b/src/sig/modules/RabiRaceModule.java index f3c903d..be13a39 100644 --- a/src/sig/modules/RabiRaceModule.java +++ b/src/sig/modules/RabiRaceModule.java @@ -92,8 +92,9 @@ public class RabiRaceModule extends Module{ public HashMap mapdata = new HashMap(); public HashMap newmapdata = new HashMap(); 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; } } diff --git a/src/sig/modules/RabiRibi/MemoryOffset.java b/src/sig/modules/RabiRibi/MemoryOffset.java index 67f0128..609ac97 100644 --- a/src/sig/modules/RabiRibi/MemoryOffset.java +++ b/src/sig/modules/RabiRibi/MemoryOffset.java @@ -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;