Added notifications to Rabi Race.
This commit is contained in:
parent
3a93e0a3b8
commit
ae8d212d0b
5
sessions
5
sessions
@ -1,3 +1,2 @@
|
|||||||
19,1584088712,1584089249,SigoNitori's Race,4,none,,5.00,0,5,true
|
40,1584212818,1584213383,SigoNitori's Race,4,none,,5.00,0,5,false
|
||||||
20,1584089263,1584089710,SigoNitori's Race,4,none,,5.00,0,48,false
|
41,1584213387,1584213632,SigoNitori's Race,4,none,sigonitori,5.00,0,5,false
|
||||||
21,1584089784,1584089803,SigoNitori's Race,4,none,sigonitori,5.00,0,80,true
|
|
||||||
|
BIN
sigIRCv2.jar
BIN
sigIRCv2.jar
Binary file not shown.
@ -52,6 +52,10 @@ import sig.utils.SoundUtils;
|
|||||||
import sig.utils.TextUtils;
|
import sig.utils.TextUtils;
|
||||||
|
|
||||||
public class RabiRaceModule extends Module{
|
public class RabiRaceModule extends Module{
|
||||||
|
final static int ERINA = 0;
|
||||||
|
final static int RIBBON = 1;
|
||||||
|
final static int CICINI = 2;
|
||||||
|
final static int MIRIAM = 3;
|
||||||
final static String ITEMS_DIRECTORY = sigIRC.BASEDIR+"sigIRC/rabi-ribi/items/";
|
final static String ITEMS_DIRECTORY = sigIRC.BASEDIR+"sigIRC/rabi-ribi/items/";
|
||||||
final static String AVATAR_DIRECTORY = sigIRC.BASEDIR+"sigIRC/rabi-ribi/characters/";
|
final static String AVATAR_DIRECTORY = sigIRC.BASEDIR+"sigIRC/rabi-ribi/characters/";
|
||||||
final int PROCESS_PERMISSIONS = WinNT.PROCESS_QUERY_INFORMATION | WinNT.PROCESS_VM_READ | WinNT.PROCESS_VM_WRITE;
|
final int PROCESS_PERMISSIONS = WinNT.PROCESS_QUERY_INFORMATION | WinNT.PROCESS_VM_READ | WinNT.PROCESS_VM_WRITE;
|
||||||
@ -70,6 +74,7 @@ public class RabiRaceModule extends Module{
|
|||||||
public static Session mySession;
|
public static Session mySession;
|
||||||
boolean firstCheck=false;
|
boolean firstCheck=false;
|
||||||
public List<ScrollingText> messages = new ArrayList<ScrollingText>();
|
public List<ScrollingText> messages = new ArrayList<ScrollingText>();
|
||||||
|
public List<String> messagequeue = new ArrayList<String>();
|
||||||
public static int lastScrollX = 0;
|
public static int lastScrollX = 0;
|
||||||
boolean firstUpdate=true;
|
boolean firstUpdate=true;
|
||||||
boolean mouseoverAvatar=false;
|
boolean mouseoverAvatar=false;
|
||||||
@ -231,6 +236,7 @@ public class RabiRaceModule extends Module{
|
|||||||
/*message_played=true;
|
/*message_played=true;
|
||||||
System.out.println("Perform item sync with other players.");
|
System.out.println("Perform item sync with other players.");
|
||||||
SyncItemsWithOtherPlayers();*/
|
SyncItemsWithOtherPlayers();*/
|
||||||
|
messagequeue.add(s);
|
||||||
if (mySession!=null && mySession.isCoop()) {
|
if (mySession!=null && mySession.isCoop()) {
|
||||||
syncItems=true;
|
syncItems=true;
|
||||||
}
|
}
|
||||||
@ -411,16 +417,35 @@ public class RabiRaceModule extends Module{
|
|||||||
messages.remove(i--);
|
messages.remove(i--);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (messagequeue.size()>0) {
|
||||||
|
if (NoMessageDisplayed()) {
|
||||||
|
int character=0;
|
||||||
|
character = messagequeue.get(0).contains(myProfile.displayName)?RabiRaceModule.ERINA:RabiRaceModule.RIBBON;
|
||||||
|
DisplayMessage(messagequeue.get(0).length()>255?messagequeue.remove(0).substring(0,255):messagequeue.remove(0),8,character);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (lastScrollX>0) {
|
if (lastScrollX>0) {
|
||||||
lastScrollX-=ScrollingText.SCROLLSPD;
|
lastScrollX-=ScrollingText.SCROLLSPD;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DisplayMessage(String s, int seconds, int character) {
|
||||||
|
writeIntToMemory(MemoryOffset.MESSAGE_CHARACTER.getOffset(),character);
|
||||||
|
writeStringToMemory(MemoryOffset.MESSAGE_TEXT.getOffset(),s,256);
|
||||||
|
writeIntToMemory(MemoryOffset.MESSAGE_TEXTREF.getOffset(),27);
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean NoMessageDisplayed() {
|
||||||
|
return readIntFromMemory(MemoryOffset.MESSAGE_TIMER)==0;
|
||||||
|
}
|
||||||
|
|
||||||
private void UpdateMyProfile() {
|
private void UpdateMyProfile() {
|
||||||
if (foundRabiRibi) {
|
if (foundRabiRibi) {
|
||||||
//System.out.println("Called.");
|
//System.out.println("Called.");
|
||||||
int paused = readIntFromMemory(MemoryOffset.PAUSED) + readIntFromMemory(MemoryOffset.TITLE_SCREEN);
|
int paused = readIntFromMemory(MemoryOffset.PAUSED) + Math.abs(readIntFromMemory(MemoryOffset.TITLE_SCREEN)-1);
|
||||||
//int paused = 0; //TODO FORCE UNPAUSE FOR NOW.
|
//int paused = 0; //TODO FORCE UNPAUSE FOR NOW.
|
||||||
float itempct = readFloatFromMemory(MemoryOffset.ITEM_PERCENT);
|
float itempct = readFloatFromMemory(MemoryOffset.ITEM_PERCENT);
|
||||||
myProfile.isPaused = paused>=1;
|
myProfile.isPaused = paused>=1;
|
||||||
@ -497,6 +522,16 @@ public class RabiRaceModule extends Module{
|
|||||||
//Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(rabiRibiMemOffset+offset), mem, 4, null);
|
//Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(rabiRibiMemOffset+offset), mem, 4, null);
|
||||||
//return mem.getInt(0);
|
//return mem.getInt(0);
|
||||||
}
|
}
|
||||||
|
public void writeStringToMemory(long offset,String value, int size) {
|
||||||
|
//Pointer valueptr = new Pointer();
|
||||||
|
Memory valueptr = new Memory(size);
|
||||||
|
valueptr.setString(0, value);
|
||||||
|
//new Pointer(rabiRibiMemOffset+offset).setMemory((long)0, (long)4, (byte)value);
|
||||||
|
Kernel32.INSTANCE.WriteProcessMemory(rabiribiProcess,
|
||||||
|
new Pointer(rabiRibiMemOffset+offset),valueptr,size,null);
|
||||||
|
//Kernel32.INSTANCE.ReadProcessMemory(rabiribiProcess, new Pointer(rabiRibiMemOffset+offset), mem, 4, null);
|
||||||
|
//return mem.getInt(0);
|
||||||
|
}
|
||||||
|
|
||||||
public void writeFloatToMemory(long offset,float value) {
|
public void writeFloatToMemory(long offset,float value) {
|
||||||
Memory mem = new Memory(4);
|
Memory mem = new Memory(4);
|
||||||
|
@ -144,10 +144,21 @@ public enum MemoryOffset {
|
|||||||
MAP_PERCENT(0x16E807C,0x13413E4,0x1342404+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x1366404,0x16E48FC,0), //Float
|
MAP_PERCENT(0x16E807C,0x13413E4,0x1342404+OffsetHelper.MEMORY_OFFSET_V188_TO_V1881,0x1366404,0x16E48FC,0), //Float
|
||||||
RAINBOW_EGG_COUNT(0xD65FD4,0xD65FD4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD65FD4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD65FD4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
RAINBOW_EGG_COUNT(0xD65FD4,0xD65FD4+OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V1851,0xD65FD4+OffsetHelper.MEMORY_OFFSET_V175_TO_V1881,0xD65FD4+OffsetHelper.MEMORY_OFFSET_V175_TO_V190,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199,OffsetHelper.KEY_ITEM_OFFSET_V175_TO_V199T),
|
||||||
PAUSED(0x1038D88,0xC969A0,0xC979A0,0xCBB9AC,0x1036D88,0),
|
PAUSED(0x1038D88,0xC969A0,0xC979A0,0xCBB9AC,0x1036D88,0),
|
||||||
TITLE_SCREEN(0x16893F4,0,0,0,0,0),
|
TITLE_SCREEN(0xDB64C4,0,0,0,0,0),
|
||||||
|
|
||||||
EVENT_START(0x167A700,0,0,0,0,0),
|
EVENT_START(0x167A700,0,0,0,0,0),
|
||||||
EVENT_END(0x167AB24,0,0,0,0,0),
|
EVENT_END(0x167AB24,0,0,0,0,0),
|
||||||
|
|
||||||
|
MAP_TILE_X(0x13B6D2C,0,0,0,0,0),
|
||||||
|
MAP_TILE_Y(0x16AA130,0,0,0,0,0),
|
||||||
|
MAP_AREA_NUMBER(0xD87FA4,0,0,0,0,0),
|
||||||
|
MAP_REGION_START(0x1672E64,0,0,0,0,0),
|
||||||
|
MAP_REGION_END(0x16774B3,0,0,0,0,0),
|
||||||
|
|
||||||
|
MESSAGE_TIMER(0x16EA4AC,0,0,0,0,0),
|
||||||
|
MESSAGE_CHARACTER(0x16EA47C,0,0,0,0,0),
|
||||||
|
MESSAGE_TEXT(0x17A8DE8,0,0,0,0,0), //This references the 27th location of text. Use 27 for TEXTREF value.
|
||||||
|
MESSAGE_TEXTREF(0x16EA4B0,0,0,0,0,0), //This should be 27 as this allows for MESSAGE_TEXT to be our "custom message" handler.
|
||||||
;
|
;
|
||||||
|
|
||||||
long base_offset;
|
long base_offset;
|
||||||
|
44
tmp_profile
44
tmp_profile
@ -1,37 +1,25 @@
|
|||||||
SigoNitori
|
SigoNitori
|
||||||
10
|
10
|
||||||
1584089765
|
1584213472
|
||||||
965854
|
146992
|
||||||
1101111100010000001010000000000000000000000000000000000000011111
|
|
||||||
1011000000000000010000001000000000000000000000000000000000011111
|
|
||||||
0000000000000000000000000000000000000000000000000000000000000000
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
0100000000000000000000000000000000000000000000000000000000011110
|
0000000000000000010000000000000000000000000000000000000000000000
|
||||||
0101100111111101010000000000000000000000000000000000000000011111
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
21
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
true
|
0000000000000000000000000000000000000000000000000000000000000000
|
||||||
5
|
0
|
||||||
|
false
|
||||||
1
|
1
|
||||||
25.666666
|
1
|
||||||
40.846153
|
2.9
|
||||||
1584089809
|
3.323077
|
||||||
|
1584213638
|
||||||
KEYITEMS:
|
KEYITEMS:
|
||||||
AIR_JUMP;1
|
HAMMER;1
|
||||||
SLIDING_POWDER;1
|
|
||||||
CARROT_BOMB;1
|
CARROT_BOMB;1
|
||||||
SPEED_BOOST;1
|
|
||||||
RIBBON;1
|
RIBBON;1
|
||||||
RABI_SLIPPERS;1
|
|
||||||
QUICK_BARRETTE;1
|
|
||||||
LIGHT_ORB;1
|
|
||||||
SUNNY_BEAM;1
|
|
||||||
BUNNY_STRIKE;1
|
|
||||||
BUNNY_AMULET;3
|
|
||||||
WATER_ORB;1
|
|
||||||
SUPER_CARROT;3
|
|
||||||
GOLD_CARROT;1
|
|
||||||
BADGES:
|
BADGES:
|
||||||
BADGE_TOXIC_STRIKE;2
|
BADGE_DEF_TRADE;1
|
||||||
BADGE_SURVIVAL;2
|
|
||||||
BADGE_ATK_TRADE;2
|
|
||||||
BADGE_PURE_LOVE;2
|
|
||||||
UPDATES:
|
UPDATES:
|
||||||
|
1100000000000000000000000101000000000000001000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||||
|
END
|
Loading…
x
Reference in New Issue
Block a user