Do not teleport while fighting a boss

main
Joshua Sigona 3 years ago
parent 5526d8e906
commit b3ebaab817
  1. BIN
      bin/sig/RabiRandomTeleportation.class
  2. 35
      src/sig/RabiRandomTeleportation.java

@ -33,6 +33,8 @@ public class RabiRandomTeleportation {
long mapAreaXAddress = 0; long mapAreaXAddress = 0;
long mapAreaYAddress = 0; long mapAreaYAddress = 0;
long bunnyTeleportingAddress = 0; long bunnyTeleportingAddress = 0;
long areaAddress = 0;
long fightingBossAddress = 0;
long MIN_ALIVE_TIME=4500; long MIN_ALIVE_TIME=4500;
long MAX_ALIVE_TIME=7500; long MAX_ALIVE_TIME=7500;
@ -200,17 +202,24 @@ public class RabiRandomTeleportation {
//Room X:17, Room Y:13 //Room X:17, Room Y:13
entityArrayPtr = 0x96DA3C; entityArrayPtr = 0x96DA3C;
bunnyTeleportingAddress = 0xA73054; bunnyTeleportingAddress = 0xA73054;
fightingBossAddress = 0xA72E08;
areaAddress = 0xA600AC;
System.out.println("Erina X:"+readFloatFromPointer(0xC,entityArrayPtr)); System.out.println("Erina X:"+readFloatFromPointer(0xC,entityArrayPtr));
System.out.println("Erina Y:"+readFloatFromPointer(0xC+0x4,entityArrayPtr)); System.out.println("Erina Y:"+readFloatFromPointer(0xC+0x4,entityArrayPtr));
System.out.println("Map: "+readIntFromMemory(mapAreaXAddress)+","+readIntFromMemory(mapAreaYAddress)); System.out.println("Map: "+readIntFromMemory(mapAreaXAddress)+","+readIntFromMemory(mapAreaYAddress));
//writeFloatToMemory(entityArrayPtrOffset+0xC+0x4,5000); long entityArrayPtrOffset = readIntFromMemory(0x96DA3C)-rabiRibiMemOffset;
writeFloatToMemory(entityArrayPtrOffset+0xC,9600);
writeFloatToMemory(entityArrayPtrOffset+0xC+0x4,9240);
//updateEventValue((short)166,16,12,15,7); //updateEventValue((short)166,16,12,15,7);
//20x11 //20x11
//TeleportBunnyToRandomLocation(); //TeleportBunnyToRandomLocation();
while (true) { while (true) {
if (System.currentTimeMillis()>NEXT_TELEPORT_TIME) { System.out.println(System.currentTimeMillis()+"/"+NEXT_TELEPORT_TIME);
if (System.currentTimeMillis()>NEXT_TELEPORT_TIME&&readIntFromMemory(fightingBossAddress)!=1) {
TeleportBunnyToRandomLocation(); TeleportBunnyToRandomLocation();
LAST_TELEPORT_TIME=System.currentTimeMillis();
NEXT_TELEPORT_TIME=(long)(Math.random()*(MAX_ALIVE_TIME-MIN_ALIVE_TIME))+MIN_ALIVE_TIME+LAST_TELEPORT_TIME; NEXT_TELEPORT_TIME=(long)(Math.random()*(MAX_ALIVE_TIME-MIN_ALIVE_TIME))+MIN_ALIVE_TIME+LAST_TELEPORT_TIME;
//System.out.println(NEXT_TELEPORT_TIME);
} }
try { try {
Thread.sleep(1000); Thread.sleep(1000);
@ -228,21 +237,29 @@ public class RabiRandomTeleportation {
updateEventValue((short)(161+chosenLoc.area),readIntFromMemory(mapAreaXAddress),readIntFromMemory(mapAreaYAddress),x,y); updateEventValue((short)(161+chosenLoc.area),readIntFromMemory(mapAreaXAddress),readIntFromMemory(mapAreaYAddress),x,y);
} }
} }
int tries=0;
do { do {
try { try {
Thread.sleep(50); Thread.sleep(50);
} catch (InterruptedException e) { } catch (InterruptedException e) {
e.printStackTrace(); e.printStackTrace();
} }
} while (readIntFromMemory(bunnyTeleportingAddress)!=420); tries++;
} while (tries<200&&readIntFromMemory(areaAddress)!=chosenLoc.area);
//Thread.sleep(1000);
System.out.println(chosenLoc); try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
//1280 width per room, 800 height per room. if (tries<200) {
writeFloatToMemory(entityArrayPtrOffset+0xC,1280*chosenLoc.roomX+640); System.out.println(chosenLoc);
writeFloatToMemory(entityArrayPtrOffset+0xC+0x4,720*chosenLoc.roomY-360);
//1280 width per room, 800 height per room.
writeFloatToMemory(entityArrayPtrOffset+0xC,1280*chosenLoc.roomX+640);
writeFloatToMemory(entityArrayPtrOffset+0xC+0x4,720*chosenLoc.roomY+600);
}
} }
public static void main(String[] args) { public static void main(String[] args) {

Loading…
Cancel
Save