TM check, SUDDEN DEATH check
This commit is contained in:
parent
66cd5ed90f
commit
2e0bb1c93e
55
rabiribi_splitter/Form1.Designer.cs
generated
55
rabiribi_splitter/Form1.Designer.cs
generated
@ -48,6 +48,8 @@
|
|||||||
this.cbSideCh = new System.Windows.Forms.CheckBox();
|
this.cbSideCh = new System.Windows.Forms.CheckBox();
|
||||||
this.debugLog = new System.Windows.Forms.TextBox();
|
this.debugLog = new System.Windows.Forms.TextBox();
|
||||||
this.debugArea = new System.Windows.Forms.CheckBox();
|
this.debugArea = new System.Windows.Forms.CheckBox();
|
||||||
|
this.cbASG = new System.Windows.Forms.CheckBox();
|
||||||
|
this.cbTM = new System.Windows.Forms.CheckBox();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.portNum)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.portNum)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
@ -131,7 +133,7 @@
|
|||||||
//
|
//
|
||||||
this.musicLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.musicLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.musicLabel.AutoSize = true;
|
this.musicLabel.AutoSize = true;
|
||||||
this.musicLabel.Location = new System.Drawing.Point(13, 195);
|
this.musicLabel.Location = new System.Drawing.Point(13, 209);
|
||||||
this.musicLabel.Name = "musicLabel";
|
this.musicLabel.Name = "musicLabel";
|
||||||
this.musicLabel.Size = new System.Drawing.Size(41, 12);
|
this.musicLabel.Size = new System.Drawing.Size(41, 12);
|
||||||
this.musicLabel.TabIndex = 14;
|
this.musicLabel.TabIndex = 14;
|
||||||
@ -142,7 +144,7 @@
|
|||||||
this.cbBoss.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.cbBoss.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.cbBoss.AutoSize = true;
|
this.cbBoss.AutoSize = true;
|
||||||
this.cbBoss.Enabled = false;
|
this.cbBoss.Enabled = false;
|
||||||
this.cbBoss.Location = new System.Drawing.Point(15, 210);
|
this.cbBoss.Location = new System.Drawing.Point(15, 224);
|
||||||
this.cbBoss.Name = "cbBoss";
|
this.cbBoss.Name = "cbBoss";
|
||||||
this.cbBoss.Size = new System.Drawing.Size(84, 16);
|
this.cbBoss.Size = new System.Drawing.Size(84, 16);
|
||||||
this.cbBoss.TabIndex = 15;
|
this.cbBoss.TabIndex = 15;
|
||||||
@ -168,15 +170,15 @@
|
|||||||
this.cbBoss1.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.cbBoss1.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.cbBoss1.Location = new System.Drawing.Point(15, 119);
|
this.cbBoss1.Location = new System.Drawing.Point(15, 119);
|
||||||
this.cbBoss1.Name = "cbBoss1";
|
this.cbBoss1.Name = "cbBoss1";
|
||||||
this.cbBoss1.Size = new System.Drawing.Size(318, 16);
|
this.cbBoss1.Size = new System.Drawing.Size(162, 16);
|
||||||
this.cbBoss1.TabIndex = 17;
|
this.cbBoss1.TabIndex = 17;
|
||||||
this.cbBoss1.Text = "Split when Miru/Nixie despawn, ignore their music";
|
this.cbBoss1.Text = "Split when Miru despawn";
|
||||||
this.cbBoss1.UseVisualStyleBackColor = true;
|
this.cbBoss1.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// cbBoss3
|
// cbBoss3
|
||||||
//
|
//
|
||||||
this.cbBoss3.AutoSize = true;
|
this.cbBoss3.AutoSize = true;
|
||||||
this.cbBoss3.Location = new System.Drawing.Point(15, 141);
|
this.cbBoss3.Location = new System.Drawing.Point(402, 141);
|
||||||
this.cbBoss3.Name = "cbBoss3";
|
this.cbBoss3.Name = "cbBoss3";
|
||||||
this.cbBoss3.Size = new System.Drawing.Size(276, 16);
|
this.cbBoss3.Size = new System.Drawing.Size(276, 16);
|
||||||
this.cbBoss3.TabIndex = 19;
|
this.cbBoss3.TabIndex = 19;
|
||||||
@ -187,7 +189,7 @@
|
|||||||
//
|
//
|
||||||
this.linkLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.linkLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.linkLabel1.AutoSize = true;
|
this.linkLabel1.AutoSize = true;
|
||||||
this.linkLabel1.Location = new System.Drawing.Point(300, 214);
|
this.linkLabel1.Location = new System.Drawing.Point(259, 228);
|
||||||
this.linkLabel1.Name = "linkLabel1";
|
this.linkLabel1.Name = "linkLabel1";
|
||||||
this.linkLabel1.Size = new System.Drawing.Size(41, 12);
|
this.linkLabel1.Size = new System.Drawing.Size(41, 12);
|
||||||
this.linkLabel1.TabIndex = 20;
|
this.linkLabel1.TabIndex = 20;
|
||||||
@ -216,18 +218,18 @@
|
|||||||
//
|
//
|
||||||
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.label4.AutoSize = true;
|
this.label4.AutoSize = true;
|
||||||
this.label4.Location = new System.Drawing.Point(252, 214);
|
this.label4.Location = new System.Drawing.Point(224, 228);
|
||||||
this.label4.Name = "label4";
|
this.label4.Name = "label4";
|
||||||
this.label4.Size = new System.Drawing.Size(41, 12);
|
this.label4.Size = new System.Drawing.Size(29, 12);
|
||||||
this.label4.TabIndex = 24;
|
this.label4.TabIndex = 24;
|
||||||
this.label4.Text = "v0.0.4";
|
this.label4.Text = "v0.1";
|
||||||
//
|
//
|
||||||
// cbSideCh
|
// cbSideCh
|
||||||
//
|
//
|
||||||
this.cbSideCh.AutoSize = true;
|
this.cbSideCh.AutoSize = true;
|
||||||
this.cbSideCh.Checked = true;
|
this.cbSideCh.Checked = true;
|
||||||
this.cbSideCh.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.cbSideCh.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.cbSideCh.Location = new System.Drawing.Point(15, 163);
|
this.cbSideCh.Location = new System.Drawing.Point(15, 141);
|
||||||
this.cbSideCh.Name = "cbSideCh";
|
this.cbSideCh.Name = "cbSideCh";
|
||||||
this.cbSideCh.Size = new System.Drawing.Size(138, 16);
|
this.cbSideCh.Size = new System.Drawing.Size(138, 16);
|
||||||
this.cbSideCh.TabIndex = 25;
|
this.cbSideCh.TabIndex = 25;
|
||||||
@ -240,9 +242,10 @@
|
|||||||
| System.Windows.Forms.AnchorStyles.Left)
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.debugLog.Location = new System.Drawing.Point(402, 163);
|
this.debugLog.Location = new System.Drawing.Point(402, 163);
|
||||||
|
this.debugLog.MinimumSize = new System.Drawing.Size(10, 10);
|
||||||
this.debugLog.Multiline = true;
|
this.debugLog.Multiline = true;
|
||||||
this.debugLog.Name = "debugLog";
|
this.debugLog.Name = "debugLog";
|
||||||
this.debugLog.Size = new System.Drawing.Size(0, 43);
|
this.debugLog.Size = new System.Drawing.Size(10, 58);
|
||||||
this.debugLog.TabIndex = 26;
|
this.debugLog.TabIndex = 26;
|
||||||
//
|
//
|
||||||
// debugArea
|
// debugArea
|
||||||
@ -255,11 +258,37 @@
|
|||||||
this.debugArea.Text = "debugArea";
|
this.debugArea.Text = "debugArea";
|
||||||
this.debugArea.UseVisualStyleBackColor = true;
|
this.debugArea.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
|
// cbASG
|
||||||
|
//
|
||||||
|
this.cbASG.AutoSize = true;
|
||||||
|
this.cbASG.Checked = true;
|
||||||
|
this.cbASG.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
|
this.cbASG.Location = new System.Drawing.Point(15, 163);
|
||||||
|
this.cbASG.Name = "cbASG";
|
||||||
|
this.cbASG.Size = new System.Drawing.Size(180, 16);
|
||||||
|
this.cbASG.TabIndex = 28;
|
||||||
|
this.cbASG.Text = "Ignore next \"SUDDEN DEATH\"";
|
||||||
|
this.cbASG.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
|
// cbTM
|
||||||
|
//
|
||||||
|
this.cbTM.AutoSize = true;
|
||||||
|
this.cbTM.Checked = true;
|
||||||
|
this.cbTM.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
|
this.cbTM.Location = new System.Drawing.Point(15, 185);
|
||||||
|
this.cbTM.Name = "cbTM";
|
||||||
|
this.cbTM.Size = new System.Drawing.Size(276, 16);
|
||||||
|
this.cbTM.TabIndex = 29;
|
||||||
|
this.cbTM.Text = "Split when town member +2 or Nixie despawn";
|
||||||
|
this.cbTM.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
// Form1
|
// Form1
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(353, 238);
|
this.ClientSize = new System.Drawing.Size(312, 252);
|
||||||
|
this.Controls.Add(this.cbTM);
|
||||||
|
this.Controls.Add(this.cbASG);
|
||||||
this.Controls.Add(this.debugArea);
|
this.Controls.Add(this.debugArea);
|
||||||
this.Controls.Add(this.debugLog);
|
this.Controls.Add(this.debugLog);
|
||||||
this.Controls.Add(this.cbSideCh);
|
this.Controls.Add(this.cbSideCh);
|
||||||
@ -308,6 +337,8 @@
|
|||||||
private System.Windows.Forms.CheckBox cbSideCh;
|
private System.Windows.Forms.CheckBox cbSideCh;
|
||||||
private System.Windows.Forms.TextBox debugLog;
|
private System.Windows.Forms.TextBox debugLog;
|
||||||
private System.Windows.Forms.CheckBox debugArea;
|
private System.Windows.Forms.CheckBox debugArea;
|
||||||
|
private System.Windows.Forms.CheckBox cbASG;
|
||||||
|
private System.Windows.Forms.CheckBox cbTM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,8 @@ namespace rabiribi_splitter
|
|||||||
private int veridx;
|
private int veridx;
|
||||||
private List<int> lastbosslist = new List<int>();
|
private List<int> lastbosslist = new List<int>();
|
||||||
private int lastnoah3hp = -1;
|
private int lastnoah3hp = -1;
|
||||||
|
private int lastmapid;
|
||||||
|
private int lastTM;
|
||||||
|
|
||||||
void DebugLog(string log)
|
void DebugLog(string log)
|
||||||
{
|
{
|
||||||
@ -38,12 +40,12 @@ namespace rabiribi_splitter
|
|||||||
{
|
{
|
||||||
this.Invoke(new Action(() =>
|
this.Invoke(new Action(() =>
|
||||||
{
|
{
|
||||||
this.debugLog.AppendText(log + "\n");
|
this.debugLog.AppendText(log + "\r\n");
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.debugLog.AppendText(log + "\n");
|
this.debugLog.AppendText(log + "\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public Form1()
|
public Form1()
|
||||||
@ -132,7 +134,7 @@ namespace rabiribi_splitter
|
|||||||
if (newmoney - lastmoney == 17500)
|
if (newmoney - lastmoney == 17500)
|
||||||
{
|
{
|
||||||
sendsplit();
|
sendsplit();
|
||||||
|
DebugLog("get 17500 en, split");
|
||||||
}
|
}
|
||||||
lastmoney = newmoney;
|
lastmoney = newmoney;
|
||||||
}
|
}
|
||||||
@ -140,8 +142,18 @@ namespace rabiribi_splitter
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
int mapid = MemoryHelper.GetMemoryValue<int>(process, StaticData.MapAddress[veridx]);
|
int mapid = MemoryHelper.GetMemoryValue<int>(process, StaticData.MapAddress[veridx]);
|
||||||
|
if (lastmapid != mapid)
|
||||||
|
{
|
||||||
|
DebugLog("newmap: "+mapid+":"+StaticData.MapNames[mapid]);
|
||||||
|
lastmapid = mapid;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region checkTM
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Music
|
#region Music
|
||||||
|
|
||||||
@ -151,7 +163,7 @@ namespace rabiribi_splitter
|
|||||||
{
|
{
|
||||||
if (lastmusicid != musicid)
|
if (lastmusicid != musicid)
|
||||||
{
|
{
|
||||||
DebugLog("new music:"+musicid);
|
DebugLog("new music:"+musicid+":"+StaticData.MusicNames[musicid]);
|
||||||
this.Invoke(new Action(() => this.musicLabel.Text = StaticData.MusicNames[musicid]));
|
this.Invoke(new Action(() => this.musicLabel.Text = StaticData.MusicNames[musicid]));
|
||||||
|
|
||||||
var bossmusicflag = StaticData.BossMusics.Contains(musicid);
|
var bossmusicflag = StaticData.BossMusics.Contains(musicid);
|
||||||
@ -163,7 +175,7 @@ namespace rabiribi_splitter
|
|||||||
if (cbBossStart.Checked || cbBossEnd.Checked)
|
if (cbBossStart.Checked || cbBossEnd.Checked)
|
||||||
{
|
{
|
||||||
sendsplit();
|
sendsplit();
|
||||||
DebugLog("splilt 1");
|
DebugLog("new boss music, split");
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Invoke(new Action(() => cbBoss.Checked = bossbattle));
|
this.Invoke(new Action(() => cbBoss.Checked = bossbattle));
|
||||||
@ -176,8 +188,15 @@ namespace rabiribi_splitter
|
|||||||
if (mapid == 5 && cbSideCh.Checked)
|
if (mapid == 5 && cbSideCh.Checked)
|
||||||
{
|
{
|
||||||
bossbattle = false;
|
bossbattle = false;
|
||||||
|
DebugLog("boss music in town, ignore");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
else if (cbASG.Checked && musicid==54)
|
||||||
|
{
|
||||||
|
bossbattle = false;
|
||||||
|
DebugLog("Alius music, ignore once");
|
||||||
|
this.Invoke(new Action(() => cbASG.Checked = false));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (bossmusicflag)
|
if (bossmusicflag)
|
||||||
@ -188,7 +207,7 @@ namespace rabiribi_splitter
|
|||||||
if (cbBossStart.Checked)
|
if (cbBossStart.Checked)
|
||||||
{
|
{
|
||||||
sendsplit();
|
sendsplit();
|
||||||
DebugLog("splilt 2");
|
DebugLog("music start, split");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -201,7 +220,7 @@ namespace rabiribi_splitter
|
|||||||
if (cbBossEnd.Checked)
|
if (cbBossEnd.Checked)
|
||||||
{
|
{
|
||||||
sendsplit();
|
sendsplit();
|
||||||
DebugLog("splilt 3");
|
DebugLog("music end, split");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -251,12 +270,12 @@ namespace rabiribi_splitter
|
|||||||
foreach (var boss in lastbosslist)
|
foreach (var boss in lastbosslist)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (boss == 1024 || boss == 1043)
|
if (boss == 1043)
|
||||||
{
|
{
|
||||||
if (!bosses.Contains(boss)) //despawn
|
if (!bosses.Contains(boss)) //despawn
|
||||||
{
|
{
|
||||||
sendsplit();
|
sendsplit();
|
||||||
DebugLog("split:4");
|
DebugLog("miru despawn, split");
|
||||||
bossbattle = false;
|
bossbattle = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -269,10 +288,40 @@ namespace rabiribi_splitter
|
|||||||
if (bosses.Contains(1053) && Noah3HP < lastnoah3hp && Noah3HP == 1)
|
if (bosses.Contains(1053) && Noah3HP < lastnoah3hp && Noah3HP == 1)
|
||||||
{
|
{
|
||||||
sendsplit();
|
sendsplit();
|
||||||
DebugLog("split:5");
|
DebugLog("noah3 hp 1, split");
|
||||||
bossbattle = false;
|
bossbattle = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (cbTM.Checked)
|
||||||
|
{
|
||||||
|
bool f = true;
|
||||||
|
foreach (var boss in lastbosslist)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (boss == 1024)
|
||||||
|
{
|
||||||
|
if (!bosses.Contains(boss)) //despawn
|
||||||
|
{
|
||||||
|
sendsplit();
|
||||||
|
DebugLog("nixie despawn, split");
|
||||||
|
bossbattle = false;
|
||||||
|
f = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int newTM = MemoryHelper.GetMemoryValue<int>(process, StaticData.TownMemberAddr[veridx]);
|
||||||
|
if (newTM - lastTM == 2 && f)
|
||||||
|
{
|
||||||
|
bossbattle = false;
|
||||||
|
sendsplit();
|
||||||
|
DebugLog("TM+2, split");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
lastTM = newTM;
|
||||||
|
}
|
||||||
lastbosslist = bosses;
|
lastbosslist = bosses;
|
||||||
lastnoah3hp = Noah3HP;
|
lastnoah3hp = Noah3HP;
|
||||||
|
|
||||||
|
@ -163,6 +163,7 @@ namespace rabiribi_splitter
|
|||||||
0xA69D98
|
0xA69D98
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public static int[] TownMemberAddr = {0xD38934, 0xD5C0F4};
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user