From b3ebaab81751e4095f7e68ead22fbd013ebfe35c Mon Sep 17 00:00:00 2001 From: Joshua Sigona Date: Thu, 21 Oct 2021 18:24:28 +0900 Subject: [PATCH] Do not teleport while fighting a boss --- bin/sig/RabiRandomTeleportation.class | Bin 9554 -> 10011 bytes src/sig/RabiRandomTeleportation.java | 35 +++++++++++++++++++------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/bin/sig/RabiRandomTeleportation.class b/bin/sig/RabiRandomTeleportation.class index 5b3b16450d8321fddba9bc4cb6c75f3299d2a575..a032d99904cb0962d329590b4c6012e4527de154 100644 GIT binary patch literal 10011 zcmbta34B~t)jwzQX5P%?wap40+S+JY(zI#XRD&c1nxqLG$VL*|q-=djUXp1iGs9%k zrid(3WRXqEQV@Zn5EPZgW||T#2-;Rbiz|!ZhRPyth@ybR|GDqYB$Eby{JyWtd-vUY z?z!il^FPbI$q(Lpcpnjcod2zpi)r3qsIRQm>TA{xF#2}OFj385fOKWp&U0d5ZEp@Gp!M3(w zb5k1=V`NrsG%}blBZ+lpc*x2k(w2iu9IM7dU7?nEwA&g4m&Fa;(SfqTp-9=Lh*=g3 zn~C0Ne4uP=D6+D=Y<(!w)PD5Z>ZUafbyZB+GP_k~2iGv=roI}jf#%-cK?_pysZ6um zV)0PIT2bB86IV;*4aH(syus>Cv__)?)$zEw4OCVn5lU=RUoD9^OB+ZdsLy^d~ls-d|zVz&D6I0V)`Msh;jMqd52h+W?8-q>fR5t|I z)t%EGY^;Nfjny3)9eEAaZSCi@*EQ6&G`FImsPdZXIu7g13P-zP#|CA{p+qQL)({#@ zK!?7zP+!DM48<*`qG`jc8Uz>((Qbu=s*^yTU)yhWZ&p}=-fP1lsEsMBc=0+Wtv1?Y z`RQ0H*6BE=0+}pJ4VJYGnz2xOG#VZ>Xfc(*a(z}JsNm3zb>|i@Rx3>>t`cTT4JxH& zu!j{H8gO7@0VsKxG;KH8w4BOyS^-UEju^BOU?(qN5H}N1SoesG*+HkjDw`_klR6y_ z_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=Mpj^j;?yw#n<-5oOWFgCOaC$D(QNERc(5o*9G^a&vTEz<1oa1Q&FR^e^ndlORX z8K}rMqZ&I4CU6<9C9cLV4eqAD>R25Ji3#c#7z-DPwmzYG2jDyPME@|}l6 zl9hZn%V`ThxfD>7Nc#%^H-vY(_@CtFsfeqGaaRB&Jjl1d;P)&ja6WY4FR}uTHb}GY w2SyfKU&2NJB1q)e215P-c0tN=K18Cy1ug#)-wytWe}%W)Gpy%d^T(9+zaJD6WB>pF diff --git a/src/sig/RabiRandomTeleportation.java b/src/sig/RabiRandomTeleportation.java index f67302f..38e364d 100644 --- a/src/sig/RabiRandomTeleportation.java +++ b/src/sig/RabiRandomTeleportation.java @@ -33,6 +33,8 @@ public class RabiRandomTeleportation { long mapAreaXAddress = 0; long mapAreaYAddress = 0; long bunnyTeleportingAddress = 0; + long areaAddress = 0; + long fightingBossAddress = 0; long MIN_ALIVE_TIME=4500; long MAX_ALIVE_TIME=7500; @@ -200,17 +202,24 @@ public class RabiRandomTeleportation { //Room X:17, Room Y:13 entityArrayPtr = 0x96DA3C; bunnyTeleportingAddress = 0xA73054; + fightingBossAddress = 0xA72E08; + areaAddress = 0xA600AC; System.out.println("Erina X:"+readFloatFromPointer(0xC,entityArrayPtr)); System.out.println("Erina Y:"+readFloatFromPointer(0xC+0x4,entityArrayPtr)); 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); //20x11 //TeleportBunnyToRandomLocation(); 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(); + LAST_TELEPORT_TIME=System.currentTimeMillis(); 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 { Thread.sleep(1000); @@ -228,21 +237,29 @@ public class RabiRandomTeleportation { updateEventValue((short)(161+chosenLoc.area),readIntFromMemory(mapAreaXAddress),readIntFromMemory(mapAreaYAddress),x,y); } } + int tries=0; do { try { Thread.sleep(50); } catch (InterruptedException e) { e.printStackTrace(); } - } while (readIntFromMemory(bunnyTeleportingAddress)!=420); - - //Thread.sleep(1000); + tries++; + } while (tries<200&&readIntFromMemory(areaAddress)!=chosenLoc.area); - System.out.println(chosenLoc); + try { + Thread.sleep(500); + } catch (InterruptedException e) { + e.printStackTrace(); + } - //1280 width per room, 800 height per room. - writeFloatToMemory(entityArrayPtrOffset+0xC,1280*chosenLoc.roomX+640); - writeFloatToMemory(entityArrayPtrOffset+0xC+0x4,720*chosenLoc.roomY-360); + if (tries<200) { + System.out.println(chosenLoc); + + //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) {