V2.54
This commit is contained in:
parent
d9f3d05a3c
commit
1331478df6
|
@ -346,7 +346,7 @@ namespace app
|
|||
}
|
||||
|
||||
//STOP CASTING ERROR DETECTING MOBS/BAAL MOVED
|
||||
if ((DateTime.Now - TimeSinceLastWaveDone).TotalSeconds > 25)
|
||||
/*if ((DateTime.Now - TimeSinceLastWaveDone).TotalSeconds > 25)
|
||||
{
|
||||
TimeSinceLastWaveDone = DateTime.MaxValue;
|
||||
TimeSinceLastWaveSet = false;
|
||||
|
@ -366,7 +366,7 @@ namespace app
|
|||
CheckingThroneBackMode = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
//STOP CASTING
|
||||
if (Form1_0.MobsStruc_0.GetMobs("", "", true, 30, IgnoredMobs))
|
||||
|
|
|
@ -140,7 +140,7 @@ namespace app
|
|||
if (CurrentStep == 5)
|
||||
{
|
||||
//####
|
||||
if (Form1_0.PlayerScan_0.levelNo == (int)Enums.Area.TowerCellarLevel3)
|
||||
if (Form1_0.PlayerScan_0.levelNo == (int)Enums.Area.TowerCellarLevel4)
|
||||
{
|
||||
CurrentStep++;
|
||||
return;
|
||||
|
@ -159,7 +159,7 @@ namespace app
|
|||
if (CurrentStep == 6)
|
||||
{
|
||||
//####
|
||||
if (Form1_0.PlayerScan_0.levelNo == (int)Enums.Area.TowerCellarLevel4)
|
||||
if (Form1_0.PlayerScan_0.levelNo == (int)Enums.Area.TowerCellarLevel5)
|
||||
{
|
||||
CurrentStep++;
|
||||
return;
|
||||
|
|
7
Form1.cs
7
Form1.cs
|
@ -42,7 +42,7 @@ namespace app
|
|||
public partial class Form1 : Form
|
||||
{
|
||||
|
||||
public string BotVersion = "V2.53";
|
||||
public string BotVersion = "V2.54";
|
||||
|
||||
public string D2_LOD_113C_Path = "";
|
||||
|
||||
|
@ -834,6 +834,7 @@ namespace app
|
|||
ItemsStruc_0.BadItemsOnGroundPointerList = new List<long>();
|
||||
SetDeadCount = false;
|
||||
GameStruc_0.ChickenTry = 0;
|
||||
MercStruc_0.MercOwnerID = 0;
|
||||
|
||||
//##############################
|
||||
MapAreaStruc_0.ScanMapStruc();
|
||||
|
@ -942,10 +943,6 @@ namespace app
|
|||
//Battle_0.CastSkills();
|
||||
//ItemsStruc_0.GetItems(true);
|
||||
//if (Running) LoopTimer.Start();
|
||||
|
||||
//Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, 5260, 2892);
|
||||
//itemScreenPos = Mover_0.FixMouseYPosition(itemScreenPos);
|
||||
//Form1_0.KeyMouse_0.MouseMoveTo_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
|
||||
//return;
|
||||
|
||||
if (CharConfig.RunMapHackOnly)
|
||||
|
|
|
@ -401,22 +401,26 @@ namespace app
|
|||
DrawString(e, OtherInfosTxt2, drawFontBold, drawBrushWhite, 1360 - (ThisS2.Width * ScaleScreenSizeInverted), 910, true);
|
||||
|
||||
//Print Merc
|
||||
/*if (CharConfig.UsingMerc)
|
||||
if (Form1_0.DebugMenuStyle > 0)
|
||||
{
|
||||
string ThisMercTxt = "Merc not alive";
|
||||
if (Form1_0.MercStruc_0.MercAlive)
|
||||
if (CharConfig.UsingMerc)
|
||||
{
|
||||
string ThisMercTxt = "Merc not alive";
|
||||
if (Form1_0.MercStruc_0.MercAlive)
|
||||
{
|
||||
|
||||
int PercentMerc = (int)((Form1_0.MercStruc_0.MercHP * 100.0) / Form1_0.MercStruc_0.MercMaxHP);
|
||||
ThisMercTxt = "Merc:" + Form1_0.MercStruc_0.MercHP.ToString() + "/" + Form1_0.MercStruc_0.MercMaxHP.ToString() + " (" + PercentMerc + "%)";
|
||||
int PercentMerc = (int)((Form1_0.MercStruc_0.MercHP * 100.0) / Form1_0.MercStruc_0.MercMaxHP);
|
||||
ThisMercTxt = "Merc:" + Form1_0.MercStruc_0.MercHP.ToString() + "/" + Form1_0.MercStruc_0.MercMaxHP.ToString() + " (" + PercentMerc + "%)";
|
||||
}
|
||||
ThisS2 = e.Graphics.MeasureString(ThisMercTxt, drawFontBold);
|
||||
DrawString(e, ThisMercTxt, drawFontBold, drawBrushGreen, 1360 - (ThisS2.Width * ScaleScreenSizeInverted), 860, true);
|
||||
}
|
||||
ThisS2 = e.Graphics.MeasureString(ThisMercTxt, drawFontBold);
|
||||
DrawString(e, ThisMercTxt, drawFontBold, drawBrushGreen, 1360 - (ThisS2.Width * ScaleScreenSizeInverted), 860, true);
|
||||
}*/
|
||||
|
||||
//Print Units Scanned Count
|
||||
//string UnitsStr = "Units:" + Form1_0.PatternsScan_0.GetUnitsScannedCount().ToString();
|
||||
//DrawString(e, UnitsStr, drawFontBold, drawBrushGreen, 560, 885, true);
|
||||
//if (Form1_0.DebugMenuStyle > 0)
|
||||
//{
|
||||
//Print Units Scanned Count
|
||||
string UnitsStr = "Units:" + Form1_0.PatternsScan_0.GetUnitsScannedCount().ToString();
|
||||
DrawString(e, UnitsStr, drawFontBold, drawBrushGreen, 560, 885, true);
|
||||
}
|
||||
|
||||
if (CanDisplayOverlay)
|
||||
{
|
||||
|
|
|
@ -227,7 +227,7 @@ namespace app
|
|||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
Form1_0.UIScan_0.OpenUIMenu("invMenu");
|
||||
if (CharConfig.InventoryDontCheckItem[i] == 0 && InventoryHasItem[i] >= 1 && InventoryHasItemToID[i] == 0)
|
||||
if (CharConfig.InventoryDontCheckItem[i] == 0 && InventoryHasItem[i] >= 1 && InventoryHasItemToID[i] == 0 && InventoryHasStashItem[i] == 0)
|
||||
{
|
||||
//pick key item from this slot
|
||||
Dictionary<string, int> itemScreenPos = Form1_0.InventoryStruc_0.ConvertIndexToXY(i);
|
||||
|
@ -248,12 +248,9 @@ namespace app
|
|||
|
||||
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos["x"], itemScreenPos["y"]);
|
||||
Form1_0.WaitDelay(12);
|
||||
Form1_0.KeyMouse_0.MouseClicc_RealPos(Form1_0.CenterX, Form1_0.CenterY);
|
||||
//Form1_0.KeyMouse_0.MouseClicc_RealPos(Form1_0.CenterX, Form1_0.CenterY);
|
||||
Form1_0.Stash_0.PlaceItem(Form1_0.CenterX, Form1_0.CenterY);
|
||||
Form1_0.WaitDelay(10);
|
||||
|
||||
/*Form1_0.KeyMouse_0.MouseClicc(itemScreenPos["x"], itemScreenPos["y"]);
|
||||
Form1_0.WaitDelay(12);
|
||||
Form1_0.Stash_0.PlaceItem(Form1_0.CenterX, Form1_0.CenterY);*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,53 +87,44 @@ namespace app
|
|||
{
|
||||
if (Form1_0.ItemsStruc_0.ItemNAAME.ToLower().Replace(" ", "") == Regex.Replace(ThisDir.Key.ToLower().Replace(" ", ""), @"[\d-]", string.Empty) && ThisDir.Value)
|
||||
{
|
||||
bool SameQuality = true;
|
||||
if (PickItemsNormal_ByName_Quality.ContainsKey(ThisDir.Key))
|
||||
{
|
||||
if (Form1_0.ItemsStruc_0.quality != Form1_0.ItemsStruc_0.getQuality(PickItemsNormal_ByName_Quality[ThisDir.Key])) SameQuality = false;
|
||||
}
|
||||
|
||||
if (!Form1_0.ItemsStruc_0.identified)
|
||||
{
|
||||
bool SameQuality = true;
|
||||
if (PickItemsNormal_ByName_Quality.ContainsKey(ThisDir.Key))
|
||||
{
|
||||
if (Form1_0.ItemsStruc_0.quality != Form1_0.ItemsStruc_0.getQuality(PickItemsNormal_ByName_Quality[ThisDir.Key])) SameQuality = false;
|
||||
}
|
||||
|
||||
if (!Keeping && SameQuality) return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Keeping)
|
||||
bool SameFlags = true;
|
||||
bool SameStats = true;
|
||||
|
||||
if (PickItemsNormal_ByName_Flags.ContainsKey(ThisDir.Key))
|
||||
{
|
||||
bool SameFlags = true;
|
||||
bool SameQuality = true;
|
||||
bool SameStats = true;
|
||||
|
||||
if (PickItemsNormal_ByName_Flags.ContainsKey(ThisDir.Key))
|
||||
uint TotalFlags = 0;
|
||||
foreach (var ThisList in PickItemsNormal_ByName_Flags[ThisDir.Key])
|
||||
{
|
||||
uint TotalFlags = 0;
|
||||
foreach (var ThisList in PickItemsNormal_ByName_Flags[ThisDir.Key])
|
||||
{
|
||||
TotalFlags += ThisList.Key;
|
||||
}
|
||||
foreach (var ThisList in PickItemsNormal_ByName_Flags[ThisDir.Key])
|
||||
{
|
||||
SameStats = Form1_0.ItemsFlags_0.IsItemSameFlags(ThisList.Value, TotalFlags, Form1_0.ItemsStruc_0.flags);
|
||||
}
|
||||
//Console.WriteLine(Form1_0.ItemsStruc_0.ItemNAAME + ":" + SameFlags);
|
||||
TotalFlags += ThisList.Key;
|
||||
}
|
||||
if (PickItemsNormal_ByName_Quality.ContainsKey(ThisDir.Key))
|
||||
foreach (var ThisList in PickItemsNormal_ByName_Flags[ThisDir.Key])
|
||||
{
|
||||
if (Form1_0.ItemsStruc_0.quality != Form1_0.ItemsStruc_0.getQuality(PickItemsNormal_ByName_Quality[ThisDir.Key])) SameQuality = false;
|
||||
SameStats = Form1_0.ItemsFlags_0.IsItemSameFlags(ThisList.Value, TotalFlags, Form1_0.ItemsStruc_0.flags);
|
||||
}
|
||||
if (PickItemsNormal_ByName_Stats.ContainsKey(ThisDir.Key))
|
||||
{
|
||||
foreach (var ThisDir2 in PickItemsNormal_ByName_Stats[ThisDir.Key])
|
||||
{
|
||||
//Console.WriteLine(Form1_0.ItemsStruc_0.ItemNAAME + ":" + ThisDir2.Key + "=" + ThisDir2.Value);
|
||||
if (!Form1_0.ItemsStruc_0.IsItemHaveSameStatMultiCheck(ThisDir2.Key, ThisDir2.Value, PickItemsNormal_ByName_Operators[ThisDir.Key][ThisDir2.Key])) SameStats = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (SameFlags && SameQuality && SameStats) return true;
|
||||
//Console.WriteLine(Form1_0.ItemsStruc_0.ItemNAAME + ":" + SameFlags);
|
||||
}
|
||||
if (PickItemsNormal_ByName_Stats.ContainsKey(ThisDir.Key))
|
||||
{
|
||||
foreach (var ThisDir2 in PickItemsNormal_ByName_Stats[ThisDir.Key])
|
||||
{
|
||||
//Console.WriteLine(Form1_0.ItemsStruc_0.ItemNAAME + ":" + ThisDir2.Key + "=" + ThisDir2.Value);
|
||||
if (!Form1_0.ItemsStruc_0.IsItemHaveSameStatMultiCheck(ThisDir2.Key, ThisDir2.Value, PickItemsNormal_ByName_Operators[ThisDir.Key][ThisDir2.Key])) SameStats = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (SameFlags && SameQuality && SameStats) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -142,51 +133,43 @@ namespace app
|
|||
{
|
||||
if (IsItemThisType(Regex.Replace(ThisDir.Key.ToLower().Replace(" ", ""), @"[\d-]", string.Empty)) && ThisDir.Value)
|
||||
{
|
||||
bool SameQuality = true;
|
||||
if (PickItemsNormal_ByType_Quality.ContainsKey(ThisDir.Key))
|
||||
{
|
||||
if (Form1_0.ItemsStruc_0.quality != Form1_0.ItemsStruc_0.getQuality(PickItemsNormal_ByType_Quality[ThisDir.Key])) SameQuality = false;
|
||||
}
|
||||
|
||||
if (!Form1_0.ItemsStruc_0.identified)
|
||||
{
|
||||
bool SameQuality = true;
|
||||
if (PickItemsNormal_ByType_Quality.ContainsKey(ThisDir.Key))
|
||||
{
|
||||
if (Form1_0.ItemsStruc_0.quality != Form1_0.ItemsStruc_0.getQuality(PickItemsNormal_ByType_Quality[ThisDir.Key])) SameQuality = false;
|
||||
}
|
||||
|
||||
if (!Keeping && SameQuality) return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Keeping)
|
||||
bool SameFlags = true;
|
||||
bool SameStats = true;
|
||||
|
||||
if (PickItemsNormal_ByType_Flags.ContainsKey(ThisDir.Key))
|
||||
{
|
||||
bool SameFlags = true;
|
||||
bool SameQuality = true;
|
||||
bool SameStats = true;
|
||||
|
||||
if (PickItemsNormal_ByType_Flags.ContainsKey(ThisDir.Key))
|
||||
uint TotalFlags = 0;
|
||||
foreach (var ThisList in PickItemsNormal_ByType_Flags[ThisDir.Key])
|
||||
{
|
||||
uint TotalFlags = 0;
|
||||
foreach (var ThisList in PickItemsNormal_ByType_Flags[ThisDir.Key])
|
||||
{
|
||||
TotalFlags += ThisList.Key;
|
||||
}
|
||||
foreach (var ThisList in PickItemsNormal_ByType_Flags[ThisDir.Key])
|
||||
{
|
||||
SameStats = Form1_0.ItemsFlags_0.IsItemSameFlags(ThisList.Value, TotalFlags, Form1_0.ItemsStruc_0.flags);
|
||||
}
|
||||
//Console.WriteLine(Form1_0.ItemsStruc_0.ItemNAAME + ":" + SameFlags);
|
||||
TotalFlags += ThisList.Key;
|
||||
}
|
||||
if (PickItemsNormal_ByType_Quality.ContainsKey(ThisDir.Key))
|
||||
foreach (var ThisList in PickItemsNormal_ByType_Flags[ThisDir.Key])
|
||||
{
|
||||
if (Form1_0.ItemsStruc_0.quality != Form1_0.ItemsStruc_0.getQuality(PickItemsNormal_ByType_Quality[ThisDir.Key])) SameQuality = false;
|
||||
SameStats = Form1_0.ItemsFlags_0.IsItemSameFlags(ThisList.Value, TotalFlags, Form1_0.ItemsStruc_0.flags);
|
||||
}
|
||||
if (PickItemsNormal_ByType_Stats.ContainsKey(ThisDir.Key))
|
||||
{
|
||||
foreach (var ThisDir2 in PickItemsNormal_ByType_Stats[ThisDir.Key])
|
||||
{
|
||||
if (!Form1_0.ItemsStruc_0.IsItemHaveSameStatMultiCheck(ThisDir2.Key, ThisDir2.Value, PickItemsNormal_ByType_Operators[ThisDir.Key][ThisDir2.Key])) SameStats = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (SameFlags && SameQuality && SameStats) return true;
|
||||
//Console.WriteLine(Form1_0.ItemsStruc_0.ItemNAAME + ":" + SameFlags);
|
||||
}
|
||||
if (PickItemsNormal_ByType_Stats.ContainsKey(ThisDir.Key))
|
||||
{
|
||||
foreach (var ThisDir2 in PickItemsNormal_ByType_Stats[ThisDir.Key])
|
||||
{
|
||||
if (!Form1_0.ItemsStruc_0.IsItemHaveSameStatMultiCheck(ThisDir2.Key, ThisDir2.Value, PickItemsNormal_ByType_Operators[ThisDir.Key][ThisDir2.Key])) SameStats = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (SameFlags && SameQuality && SameStats) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -306,7 +289,8 @@ namespace app
|
|||
|
||||
public string GetItemTypeText()
|
||||
{
|
||||
return "[Type] == " + GetItemType();
|
||||
if (GetItemType() != "") return "[Type] == " + GetItemType();
|
||||
return "";
|
||||
}
|
||||
|
||||
public string GetItemType()
|
||||
|
|
|
@ -395,7 +395,7 @@ namespace app
|
|||
|
||||
ItemsScanned++;
|
||||
txtFileNo = BitConverter.ToUInt32(itemdatastruc, 4);
|
||||
//uint ItemID = BitConverter.ToUInt32(itemdatastruc, 8);
|
||||
uint ItemID = BitConverter.ToUInt32(itemdatastruc, 8);
|
||||
ItemNAAME = Form1_0.ItemsNames_0.getItemBaseName(txtFileNo);
|
||||
GetUnitData();
|
||||
GetUnitPathData();
|
||||
|
@ -506,6 +506,14 @@ namespace app
|
|||
AllItemsEquipped.Add("ID:" + txtFileNo + "(" + ItemNAAME + ") at:" + itemx + ", " + itemy + " - Equipped - " + Form1_0.ItemsAlert_0.GetItemTypeText() + " && " + GetQualityTextString() + " && " + GetAllFlagsFromItem() + " && " + GetAllValuesFromStats());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dwOwnerId != 0 && Form1_0.MercStruc_0.MercOwnerID == 0)
|
||||
{
|
||||
Form1_0.MercStruc_0.MercOwnerID = ItemID;
|
||||
//Form1_0.method_1("owner: " + dwOwnerId + ", ID: " + ItemID + ", name: " + ItemNAAME + " - at: " + itemx + "," + itemy + " - " + equiploc, Color.DarkGreen);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (itemdatastruc[0x0C] == 2)
|
||||
{
|
||||
|
|
|
@ -33,6 +33,8 @@ namespace app
|
|||
public int MercHP = 0;
|
||||
public int MercMaxHP = 0;
|
||||
|
||||
public uint MercOwnerID = 0; //set within ItemStrus (equipped item on merc)
|
||||
|
||||
public uint statCount = 0;
|
||||
public uint statExCount = 0;
|
||||
public long statPtr = 0;
|
||||
|
@ -80,35 +82,42 @@ namespace app
|
|||
|
||||
//if (IsMerc((int) txtFileNo))
|
||||
if (isUnique == 0 && (txtFileNo == 338) && mode != 0 && mode != 12)
|
||||
//if (isUnique == 0 && isPlayerMinion && mode == 1)
|
||||
//if (isUnique == 0 && (txtFileNo == 338) && mode == 1)
|
||||
{
|
||||
if (xPosFinal != 0 && yPosFinal != 0)
|
||||
{
|
||||
//SetHPFromStats();
|
||||
/*string SavePathh = Form1_0.ThisEndPath + "DumpMercStruc" + MercCount;
|
||||
File.Create(SavePathh).Dispose();
|
||||
File.WriteAllBytes(SavePathh, statBuffer);*/
|
||||
//Int64 pUnitDataPtr = BitConverter.ToInt64(Mercdatastruc, 0x10);
|
||||
//uint dwOwnerId = Form1_0.Mem_0.ReadUInt32Raw((IntPtr)(pUnitDataPtr + 0x0c));
|
||||
//uint dwOwnerId = BitConverter.ToUInt32(Mercdatastruc, 8); //Form1_0.Mem_0.ReadUInt32Raw((IntPtr)(pUnitDataPtr + 0x0c)); //GOOD
|
||||
|
||||
/*byte[] buffff = new byte[144];
|
||||
long pStatsListExPtr = BitConverter.ToInt64(Mercdatastruc, 0x10);
|
||||
Form1_0.Mem_0.ReadRawMemory(pStatsListExPtr, ref buffff, 144);
|
||||
//if (dwOwnerId == MercOwnerID && MercOwnerID != 0)
|
||||
//{
|
||||
//SetHPFromStats();
|
||||
/*string SavePathh = Form1_0.ThisEndPath + "DumpMercStruc" + MercCount;
|
||||
File.Create(SavePathh).Dispose();
|
||||
File.WriteAllBytes(SavePathh, statBuffer);*/
|
||||
|
||||
pStatsListExPtr = BitConverter.ToInt64(Mercdatastruc, 0x78);
|
||||
Form1_0.Mem_0.ReadRawMemory(pStatsListExPtr, ref buffff, 144);
|
||||
//uint dwOwnerId = BitConverter.ToUInt32(buffff, 0x0c);
|
||||
//uint flags = BitConverter.ToUInt32(buffff, 0x18);
|
||||
/*byte[] buffff = new byte[144];
|
||||
long pStatsListExPtr = BitConverter.ToInt64(Mercdatastruc, 0x10);
|
||||
Form1_0.Mem_0.ReadRawMemory(pStatsListExPtr, ref buffff, 144);
|
||||
|
||||
string SavePathh2 = Form1_0.ThisEndPath + "DumpMercStrucBuf" + MercCount;
|
||||
File.Create(SavePathh2).Dispose();
|
||||
File.WriteAllBytes(SavePathh2, buffff);*/
|
||||
pStatsListExPtr = BitConverter.ToInt64(Mercdatastruc, 0x78);
|
||||
Form1_0.Mem_0.ReadRawMemory(pStatsListExPtr, ref buffff, 144);
|
||||
//uint dwOwnerId = BitConverter.ToUInt32(buffff, 0x0c);
|
||||
//uint flags = BitConverter.ToUInt32(buffff, 0x18);
|
||||
|
||||
//Console.WriteLine(txtFileNo.ToString() + ", isUnique:" + isUnique + ", isPlayerMinion:" + isPlayerMinion + ", mode:" + mode + ", pos:" + xPosFinal + ", " + yPosFinal);
|
||||
//Console.WriteLine(flags);
|
||||
//MercCount++;
|
||||
string SavePathh2 = Form1_0.ThisEndPath + "DumpMercStrucBuf" + MercCount;
|
||||
File.Create(SavePathh2).Dispose();
|
||||
File.WriteAllBytes(SavePathh2, buffff);*/
|
||||
|
||||
SetHPFromStats();
|
||||
Form1_0.Grid_SetInfos("Merc", MercHP.ToString() + "/" + MercMaxHP.ToString());
|
||||
return true;
|
||||
//Console.WriteLine(txtFileNo.ToString() + ", isUnique:" + isUnique + ", ownerID:" + dwOwnerId + ", mode:" + mode + ", pos:" + xPosFinal + ", " + yPosFinal);
|
||||
//Console.WriteLine(flags);
|
||||
//MercCount++;
|
||||
|
||||
SetHPFromStats();
|
||||
Form1_0.Grid_SetInfos("Merc", MercHP.ToString() + "/" + MercMaxHP.ToString());
|
||||
return true;
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -177,10 +186,6 @@ namespace app
|
|||
statCount = Form1_0.Mem_0.ReadUInt32Raw((IntPtr)(pStatsListExPtr + 0x38));
|
||||
statExPtr = Form1_0.Mem_0.ReadInt64Raw((IntPtr)(pStatsListExPtr + 0x88));
|
||||
statExCount = Form1_0.Mem_0.ReadUInt32Raw((IntPtr)(pStatsListExPtr + 0x90));
|
||||
|
||||
//string SavePathh = Form1_0.ThisEndPath + "DumpItempStatBStruc";
|
||||
//File.Create(SavePathh).Dispose();
|
||||
//File.WriteAllBytes(SavePathh, pStatB);
|
||||
}
|
||||
|
||||
public void GetUnitPathData()
|
||||
|
@ -198,10 +203,6 @@ namespace app
|
|||
int yPosOffsetPercent = (yPosOffset / 65536); //get percentage
|
||||
xPosFinal = (ushort)(itemx + xPosOffsetPercent);
|
||||
yPosFinal = (ushort)(itemy + yPosOffsetPercent);
|
||||
|
||||
//string SavePathh = Form1_0.ThisEndPath + "DumpItempPathStruc";
|
||||
//File.Create(SavePathh).Dispose();
|
||||
//File.WriteAllBytes(SavePathh, pPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,9 @@ namespace app
|
|||
public Position LastMobPos = new Position { X = 0, Y = 0 };
|
||||
public uint LastMobtxtFileNo = 0;
|
||||
|
||||
List<EnumsStates.State> MobsStates = new List<EnumsStates.State>();
|
||||
List<EnumsStates.State> MobsStatesAll = new List<EnumsStates.State>();
|
||||
|
||||
public void SetForm1(Form1 form1_1)
|
||||
{
|
||||
Form1_0 = form1_1;
|
||||
|
@ -162,6 +165,8 @@ namespace app
|
|||
Form1_0.Mem_0.ReadRawMemory(MobsPointerLocation + 0x88, ref CurrentPointerBytes, CurrentPointerBytes.Length);
|
||||
long pStatsListExPtr = BitConverter.ToInt64(CurrentPointerBytes, 0);
|
||||
|
||||
MobsStatesAll = Form1_0.PlayerScan_0.GetStates(pStatsListExPtr);
|
||||
|
||||
bool isPlayerMinion = false;
|
||||
if (getPlayerMinion((int)txtFileNo2) != "") isPlayerMinion = true;
|
||||
else isPlayerMinion = ((Form1_0.Mem_0.ReadUInt32((IntPtr)(pStatsListExPtr + 0xAC8 + 0xc)) & 31) == 1); //is a revive
|
||||
|
@ -169,6 +174,7 @@ namespace app
|
|||
if ((Form1_0.NPCStruc_0.HideNPC((int)txtFileNo2) == 0
|
||||
&& Form1_0.NPCStruc_0.getTownNPC((int)txtFileNo2) == ""
|
||||
&& !isPlayerMinion
|
||||
&& !Form1_0.PlayerScan_0.HasState(EnumsStates.State.Revive, MobsStatesAll)
|
||||
&& !DebuggingMobs)
|
||||
|| DebuggingMobs)
|
||||
//&& IsThisMobInBound())
|
||||
|
@ -230,6 +236,8 @@ namespace app
|
|||
Form1_0.Mem_0.ReadRawMemory(MobsPointerLocation + 0x88, ref CurrentPointerBytes, CurrentPointerBytes.Length);
|
||||
long pStatsListExPtr = BitConverter.ToInt64(CurrentPointerBytes, 0);
|
||||
|
||||
MobsStatesAll = Form1_0.PlayerScan_0.GetStates(pStatsListExPtr);
|
||||
|
||||
bool isPlayerMinion = false;
|
||||
if (getPlayerMinion((int)txtFileNo2) != "") isPlayerMinion = true;
|
||||
else isPlayerMinion = ((Form1_0.Mem_0.ReadUInt32((IntPtr)(pStatsListExPtr + 0xAC8 + 0xc)) & 31) == 1); //is a revive
|
||||
|
@ -237,6 +245,7 @@ namespace app
|
|||
if ((Form1_0.NPCStruc_0.HideNPC((int)txtFileNo2) == 0
|
||||
&& Form1_0.NPCStruc_0.getTownNPC((int)txtFileNo2) == ""
|
||||
&& !isPlayerMinion
|
||||
&& !Form1_0.PlayerScan_0.HasState(EnumsStates.State.Revive, MobsStatesAll)
|
||||
&& !DebuggingMobs)
|
||||
|| DebuggingMobs)
|
||||
//&& IsThisMobInBound())
|
||||
|
@ -363,6 +372,8 @@ namespace app
|
|||
Form1_0.Mem_0.ReadRawMemory(MobsPointerLocation + 0x88, ref CurrentPointerBytes, CurrentPointerBytes.Length);
|
||||
long pStatsListExPtr = BitConverter.ToInt64(CurrentPointerBytes, 0);
|
||||
|
||||
MobsStates = Form1_0.PlayerScan_0.GetStates(pStatsListExPtr);
|
||||
|
||||
bool isPlayerMinion = false;
|
||||
if (getPlayerMinion((int)txtFileNo) != "") isPlayerMinion = true;
|
||||
else isPlayerMinion = ((Form1_0.Mem_0.ReadUInt32((IntPtr)(pStatsListExPtr + 0xAC8 + 0xc)) & 31) == 1); //is a revive
|
||||
|
@ -371,7 +382,8 @@ namespace app
|
|||
|
||||
if (Form1_0.NPCStruc_0.HideNPC((int) txtFileNo) == 0
|
||||
&& Form1_0.NPCStruc_0.getTownNPC((int)txtFileNo) == ""
|
||||
&& !isPlayerMinion)
|
||||
&& !isPlayerMinion
|
||||
&& !Form1_0.PlayerScan_0.HasState(EnumsStates.State.Revive, MobsStates))
|
||||
//&& !ShouldBeIgnored(txtFileNo))
|
||||
{
|
||||
GetUnitPathData();
|
||||
|
|
|
@ -30,13 +30,12 @@ namespace app
|
|||
public int[] DontCheckUnitIndexes = new int[] { 0, 0, 0, 0, 1, 1, 0, 0 };
|
||||
public int[] DontCheckIndexes = new int[0];
|
||||
|
||||
public long StartIndexItem = long.MaxValue;
|
||||
public long StartIndexItemLast = long.MaxValue;
|
||||
//public int ScanUnitsNumber = 3000;
|
||||
public int ScanUnitsNumber = 2600;
|
||||
//public int ScanUnitsNumber = 2200;
|
||||
//public int ScanUnitsNumber = 6000;
|
||||
public int ScanUnitsNegativeOffset = 0;
|
||||
|
||||
|
||||
public void SetForm1(Form1 form1_1)
|
||||
{
|
||||
Form1_0 = form1_1;
|
||||
|
@ -329,13 +328,13 @@ namespace app
|
|||
//{
|
||||
// return;
|
||||
//}
|
||||
}
|
||||
}*/
|
||||
|
||||
public int GetUnitsScannedCount()
|
||||
{
|
||||
int UnitsScannedCount = 0;
|
||||
//long CheckThisI = StartIndexItem;
|
||||
long CheckThisI -= (0x48 + 0x170) * ScanUnitsNegativeOffset; //offseting in negative here
|
||||
long CheckThisI = StartIndexItem;
|
||||
CheckThisI -= (0x48 + 0x170) * ScanUnitsNegativeOffset; //offseting in negative here
|
||||
UnitBuffer = new byte[9];
|
||||
|
||||
//string SavePathh = Form1_0.ThisEndPath + "DumpHexUnits";
|
||||
|
@ -372,7 +371,7 @@ namespace app
|
|||
}
|
||||
|
||||
return UnitsScannedCount;
|
||||
}*/
|
||||
}
|
||||
|
||||
public void scanForUnitsPointer(string SearchUnitsType)
|
||||
{
|
||||
|
@ -445,50 +444,35 @@ namespace app
|
|||
if (SearchUnitsType == "objects") AllObjectsPointers = new List<long>();
|
||||
if (SearchUnitsType == "NPC") AllNPCPointers = new List<long>();
|
||||
|
||||
long StartIndexItem = long.MaxValue;
|
||||
long StartIndexPlayer = long.MaxValue;
|
||||
long StartIndexMobs = long.MaxValue;
|
||||
long StartIndexNPC = long.MaxValue;
|
||||
StartIndexItem = long.MaxValue;
|
||||
|
||||
//set start index for searching
|
||||
if (SearchUnitsType == "item")
|
||||
{
|
||||
for (int i = 0; i < AllPossibleItemsPointers.Count; i++)
|
||||
{
|
||||
if (AllPossibleItemsPointers[i] < StartIndexItem)
|
||||
{
|
||||
StartIndexItem = AllPossibleItemsPointers[i];
|
||||
}
|
||||
if (AllPossibleItemsPointers[i] < StartIndexItem) StartIndexItem = AllPossibleItemsPointers[i];
|
||||
}
|
||||
}
|
||||
if (SearchUnitsType == "player")
|
||||
{
|
||||
for (int i = 0; i < AllPossiblePlayerPointers.Count; i++)
|
||||
{
|
||||
if (AllPossiblePlayerPointers[i] < StartIndexPlayer)
|
||||
{
|
||||
StartIndexPlayer = AllPossiblePlayerPointers[i];
|
||||
}
|
||||
if (AllPossiblePlayerPointers[i] < StartIndexItem) StartIndexItem = AllPossiblePlayerPointers[i];
|
||||
}
|
||||
}
|
||||
if (SearchUnitsType == "objects")
|
||||
{
|
||||
for (int i = 0; i < AllPossibleObjectsPointers.Count; i++)
|
||||
{
|
||||
if (AllPossibleObjectsPointers[i] < StartIndexMobs)
|
||||
{
|
||||
StartIndexMobs = AllPossibleObjectsPointers[i];
|
||||
}
|
||||
if (AllPossibleObjectsPointers[i] < StartIndexItem) StartIndexItem = AllPossibleObjectsPointers[i];
|
||||
}
|
||||
}
|
||||
if (SearchUnitsType == "NPC")
|
||||
{
|
||||
for (int i = 0; i < AllPossibleNPCPointers.Count; i++)
|
||||
{
|
||||
if (AllPossibleNPCPointers[i] < StartIndexNPC)
|
||||
{
|
||||
StartIndexNPC = AllPossibleNPCPointers[i];
|
||||
}
|
||||
if (AllPossibleNPCPointers[i] < StartIndexItem) StartIndexItem = AllPossibleNPCPointers[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -505,7 +489,7 @@ namespace app
|
|||
if (DiffVal < 0xFFFFF) //here
|
||||
{
|
||||
ScanUnitsNumber += UnitNumberDiff;
|
||||
Form1_0.method_1("Item start diff: 0x" + (DiffVal).ToString("X") + ", scann for: " + ScanUnitsNumber + " +" + UnitNumberDiff, Color.DarkOrchid);
|
||||
Form1_0.method_1("Units start diff: 0x" + (DiffVal).ToString("X") + ", scann for: " + ScanUnitsNumber + " +" + UnitNumberDiff, Color.DarkOrchid);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -519,30 +503,13 @@ namespace app
|
|||
|
||||
//search
|
||||
long CheckThisI = StartIndexItem;
|
||||
long CheckThisP = StartIndexPlayer;
|
||||
long CheckThisM = StartIndexMobs;
|
||||
long CheckThisN = StartIndexNPC;
|
||||
UnitBuffer = new byte[9];
|
||||
|
||||
CheckThisI -= (0x48 + 0x170) * ScanUnitsNegativeOffset; //offseting in negative here
|
||||
for (int i = 0; i < ScanUnitsNumber; i++)
|
||||
//for (int i = 0; i < 2048; i++)
|
||||
//for (int i = 0; i < 2500; i++)
|
||||
{
|
||||
if ((i % 2) == 1)
|
||||
{
|
||||
CheckThisI += 0x48;
|
||||
CheckThisP += 0x48;
|
||||
CheckThisM += 0x48;
|
||||
CheckThisN += 0x48;
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckThisI += 0x170;
|
||||
CheckThisP += 0x170;
|
||||
CheckThisM += 0x170;
|
||||
CheckThisN += 0x170;
|
||||
}
|
||||
if ((i % 2) == 1) CheckThisI += 0x48;
|
||||
else CheckThisI += 0x170;
|
||||
|
||||
if (SearchUnitsType == "item")
|
||||
{
|
||||
|
@ -554,22 +521,22 @@ namespace app
|
|||
if (SearchUnitsType == "player")
|
||||
{
|
||||
ThisCheckbytes = new byte[] { (byte)UnitType.Player, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00 };
|
||||
Form1_0.Mem_0.ReadRawMemory(CheckThisP, ref UnitBuffer, UnitBuffer.Length);
|
||||
unitPatternScan(CheckThisP, "player");
|
||||
Form1_0.Mem_0.ReadRawMemory(CheckThisI, ref UnitBuffer, UnitBuffer.Length);
|
||||
unitPatternScan(CheckThisI, "player");
|
||||
}
|
||||
|
||||
if (SearchUnitsType == "objects")
|
||||
{
|
||||
ThisCheckbytes = new byte[] { (byte)UnitType.GameObject, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00 };
|
||||
Form1_0.Mem_0.ReadRawMemory(CheckThisM, ref UnitBuffer, UnitBuffer.Length);
|
||||
unitPatternScan(CheckThisM, "objects");
|
||||
Form1_0.Mem_0.ReadRawMemory(CheckThisI, ref UnitBuffer, UnitBuffer.Length);
|
||||
unitPatternScan(CheckThisI, "objects");
|
||||
}
|
||||
|
||||
if (SearchUnitsType == "NPC")
|
||||
{
|
||||
ThisCheckbytes = new byte[] { (byte)UnitType.NPC, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00 };
|
||||
Form1_0.Mem_0.ReadRawMemory(CheckThisN, ref UnitBuffer, UnitBuffer.Length);
|
||||
unitPatternScan(CheckThisN, "NPC");
|
||||
Form1_0.Mem_0.ReadRawMemory(CheckThisI, ref UnitBuffer, UnitBuffer.Length);
|
||||
unitPatternScan(CheckThisI, "NPC");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -578,31 +545,19 @@ namespace app
|
|||
{
|
||||
if (SearchUnitsType == "item")
|
||||
{
|
||||
for (int i = 0; i < AllPossibleItemsPointers.Count; i++)
|
||||
{
|
||||
AddPointerToList(AllPossibleItemsPointers[i], "item");
|
||||
}
|
||||
for (int i = 0; i < AllPossibleItemsPointers.Count; i++) AddPointerToList(AllPossibleItemsPointers[i], "item");
|
||||
}
|
||||
if (SearchUnitsType == "player")
|
||||
{
|
||||
for (int i = 0; i < AllPlayersPointers.Count; i++)
|
||||
{
|
||||
AddPointerToList(AllPlayersPointers[i], "player");
|
||||
}
|
||||
for (int i = 0; i < AllPossiblePlayerPointers.Count; i++) AddPointerToList(AllPossiblePlayerPointers[i], "player");
|
||||
}
|
||||
if (SearchUnitsType == "objects")
|
||||
{
|
||||
for (int i = 0; i < AllObjectsPointers.Count; i++)
|
||||
{
|
||||
AddPointerToList(AllObjectsPointers[i], "objects");
|
||||
}
|
||||
for (int i = 0; i < AllPossibleObjectsPointers.Count; i++) AddPointerToList(AllPossibleObjectsPointers[i], "objects");
|
||||
}
|
||||
if (SearchUnitsType == "NPC")
|
||||
{
|
||||
for (int i = 0; i < AllNPCPointers.Count; i++)
|
||||
{
|
||||
AddPointerToList(AllNPCPointers[i], "NPC");
|
||||
}
|
||||
for (int i = 0; i < AllPossibleNPCPointers.Count; i++) AddPointerToList(AllPossibleNPCPointers[i], "NPC");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -150,7 +150,7 @@ namespace app
|
|||
statCount = Form1_0.Mem_0.ReadInt32Raw((IntPtr)(pStatsListEx + 0x38));
|
||||
|
||||
PlayerStates = GetStates(pStatsListEx);
|
||||
HasBattleOrderState = HasState(EnumsStates.State.Battleorders);
|
||||
HasBattleOrderState = HasState(EnumsStates.State.Battleorders, PlayerStates);
|
||||
|
||||
byte[] buffer = new byte[statCount * 8];
|
||||
Form1_0.Mem_0.ReadRawMemory(statPtr + 0x2, ref buffer, (int) (statCount * 8));
|
||||
|
@ -808,9 +808,9 @@ namespace app
|
|||
ManaPercentFromEquippedItems += AddedManaPercent;
|
||||
}
|
||||
|
||||
public bool HasState(EnumsStates.State state)
|
||||
public bool HasState(EnumsStates.State state, List<EnumsStates.State> ThisStatesList)
|
||||
{
|
||||
foreach (EnumsStates.State st in PlayerStates)
|
||||
foreach (EnumsStates.State st in ThisStatesList)
|
||||
{
|
||||
if (st == state)
|
||||
{
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue