Compare commits

...

4 Commits

Author SHA1 Message Date
Bouletmarc d3d7e72f78 V2.6 2024-04-25 01:47:05 -04:00
Bouletmarc 2515966e3d V2.57 2024-04-25 00:29:58 -04:00
Bouletmarc cd3a0d5cf5 V2.56 2024-04-24 23:33:24 -04:00
Bouletmarc b715e08e4a V2.55 2024-04-24 22:51:45 -04:00
48 changed files with 527 additions and 401 deletions

View File

@ -458,9 +458,9 @@ namespace app
}
else
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, 15091, 5005);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] - 5, itemScreenPos["y"] - 20);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, 15091, 5005);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X - 5, itemScreenPos.Y - 20);
Form1_0.WaitDelay(10);
}
}

View File

@ -211,9 +211,9 @@ namespace app
}
}
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(100);
LastUsedTP_ID = Form1_0.ObjectsStruc_0.ObjectUnitID;
@ -291,9 +291,9 @@ namespace app
if (Form1_0.ObjectsStruc_0.GetObjects("TownPortal", true, IgnoredTPList, 999, "", (int)Enums.Area.Harrogath))
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(100);
}
@ -445,9 +445,9 @@ namespace app
}
else
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, 15091, 5005);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] - 5, itemScreenPos["y"] - 20);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, 15091, 5005);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X - 5, itemScreenPos.Y - 20);
Form1_0.WaitDelay(10);
}
}

View File

@ -5,6 +5,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static app.MapAreaStruc;
namespace app
{
@ -189,9 +190,9 @@ namespace app
Form1_0.WaitDelay(30);
}
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(100);
//Form1_0.Mover_0.FinishMoving();
}
@ -227,9 +228,9 @@ namespace app
if (Form1_0.ObjectsStruc_0.GetObjects("TownPortal", true, IgnoredTPList, 999, "", (int)Enums.Area.ThePandemoniumFortress))
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(100);
}
@ -525,9 +526,9 @@ namespace app
//use wp
if (Form1_0.ObjectsStruc_0.GetObjects("PandamoniumFortressWaypoint"))
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMousePositionWithScreenSize(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos["x"], itemScreenPos["y"] - 15);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.Mover_0.FinishMoving();
if (Form1_0.UIScan_0.WaitTilUIOpen("waypointMenu"))
{

View File

@ -93,9 +93,9 @@ namespace app
{
Form1_0.Mover_0.MoveToLocation(Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(100);
}
@ -125,9 +125,9 @@ namespace app
int tryyy = 0;
while (tryyy <= 15)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(4);
tryyy++;
}
@ -180,9 +180,9 @@ namespace app
{
if (Form1_0.ObjectsStruc_0.GetObjects("PermanentTownPortal", true, new List<uint>()))
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(100);
}
else

View File

@ -91,9 +91,9 @@ namespace app
int Tryyyy = 0;
while (Form1_0.PlayerScan_0.levelNo == 46 && Tryyyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
Tryyyy++;
}
@ -101,9 +101,9 @@ namespace app
Tryyyy = 0;
while (Form1_0.PlayerScan_0.levelNo == 46 && Tryyyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] - 70, itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X - 70, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
Tryyyy++;
}
@ -111,9 +111,9 @@ namespace app
Tryyyy = 0;
while (Form1_0.PlayerScan_0.levelNo == 46 && Tryyyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] + 70, itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X + 70, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
Tryyyy++;
}
@ -140,9 +140,9 @@ namespace app
int StartLevel = (int) Form1_0.PlayerScan_0.levelNo;
while ((int) Form1_0.PlayerScan_0.levelNo == StartLevel && Tryyyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, OrificePos.X, OrificePos.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] - 446, itemScreenPos["y"] - 268);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, OrificePos.X, OrificePos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X - 446, itemScreenPos.Y - 268);
Form1_0.PlayerScan_0.GetPositions();
Tryyyy++;
}

View File

@ -4,6 +4,7 @@ using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static app.MapAreaStruc;
namespace app
{
@ -82,9 +83,9 @@ namespace app
//take back wp
//if (Form1_0.ObjectsStruc_0.GetObjects("Act3TownWaypoint", false))
//{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, WP_X, WP_Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, WP_X, WP_Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
//Form1_0.Mover_0.FinishMoving();
if (Form1_0.UIScan_0.WaitTilUIOpen("waypointMenu"))
{
@ -122,13 +123,13 @@ namespace app
{
HasTakenAnyChest = true;
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisChestPos.X, ThisChestPos.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisChestPos.X, ThisChestPos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(10);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(10);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(10);
int tryy2 = 0;
@ -156,12 +157,12 @@ namespace app
{
if (Form1_0.Mover_0.MoveToLocation(ThisChestPos.X, ThisChestPos.Y))
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisChestPos.X, ThisChestPos.Y);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisChestPos.X, ThisChestPos.Y);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(10);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos["x"], itemScreenPos["y"] - 15);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(10);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos["x"], itemScreenPos["y"] - 15);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(10);
int tryy2 = 0;
@ -186,12 +187,12 @@ namespace app
{
if (Form1_0.Mover_0.MoveToLocation(ThisChestPos.X, ThisChestPos.Y))
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisChestPos.X, ThisChestPos.Y);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisChestPos.X, ThisChestPos.Y);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(10);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos["x"], itemScreenPos["y"] - 15);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(10);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos["x"], itemScreenPos["y"] - 15);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(10);
int tryy2 = 0;

View File

@ -134,10 +134,10 @@ namespace app
Form1_0.ItemsStruc_0.GetItems(true);
if (Form1_0.Mover_0.MoveToLocation(17601, 8070))
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, 17601, 8070);
//Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, 17601, 8070);
//Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.PlayerScan_0.GetPositions();
}

View File

@ -39,9 +39,9 @@ namespace app
if (Form1_0.ObjectsStruc_0.GetObjects("PermanentTownPortal", true, new List<uint>()))
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(100);
}
//Form1_0.Town_0.GoToWPArea(3, 8);

View File

@ -131,9 +131,9 @@ namespace app
int tryyy = 0;
while (tryyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, AltarPos.X, AltarPos.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, AltarPos.X, AltarPos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
tryyy++;
}

View File

@ -312,9 +312,9 @@ namespace app
}
else
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, 15091, 5005);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] - 5, itemScreenPos["y"] - 20);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, 15091, 5005);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X - 5, itemScreenPos.Y - 20);
Form1_0.WaitDelay(10);
}
}

View File

@ -71,9 +71,9 @@ namespace app
int tryyy = 0;
while (tryyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, InifussTree.X, InifussTree.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, InifussTree.X, InifussTree.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
tryyy++;
}

View File

@ -92,9 +92,9 @@ namespace app
int Tryyyy = 0;
while (Form1_0.PlayerScan_0.levelNo == (int)Enums.Area.CanyonOfTheMagi && Tryyyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
Tryyyy++;
}
@ -102,9 +102,9 @@ namespace app
Tryyyy = 0;
while (Form1_0.PlayerScan_0.levelNo == (int)Enums.Area.CanyonOfTheMagi && Tryyyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] - 70, itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X - 70, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
Tryyyy++;
}
@ -112,9 +112,9 @@ namespace app
Tryyyy = 0;
while (Form1_0.PlayerScan_0.levelNo == (int)Enums.Area.CanyonOfTheMagi && Tryyyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] + 70, itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X + 70, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
Tryyyy++;
}
@ -175,8 +175,8 @@ namespace app
int StartLevel = (int) Form1_0.PlayerScan_0.levelNo;
while ((int) Form1_0.PlayerScan_0.levelNo == StartLevel && Tryyyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, OrificePos.X, OrificePos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] - 446, itemScreenPos["y"] - 268);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, OrificePos.X, OrificePos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X - 446, itemScreenPos.Y - 268);
Form1_0.PlayerScan_0.GetPositions();
Tryyyy++;
}

View File

@ -140,9 +140,9 @@ namespace app
int tryyy = 0;
while (tryyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ChestPos.X, ChestPos.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ChestPos.X, ChestPos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
tryyy++;
}

View File

@ -100,9 +100,9 @@ namespace app
int tryyy = 0;
while (tryyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ChestPos.X, ChestPos.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ChestPos.X, ChestPos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
tryyy++;
}

View File

@ -140,9 +140,9 @@ namespace app
int tryyy = 0;
while (tryyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ChestPos.X, ChestPos.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ChestPos.X, ChestPos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
tryyy++;
}

View File

@ -100,9 +100,9 @@ namespace app
int tryyy = 0;
while (tryyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ChestPos.X, ChestPos.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ChestPos.X, ChestPos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
tryyy++;
}

View File

@ -111,9 +111,9 @@ namespace app
int tryyy = 0;
while (tryyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ChestPos.X, ChestPos.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ChestPos.X, ChestPos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
Form1_0.WaitDelay(2);
tryyy++;
@ -153,9 +153,9 @@ namespace app
int tryyy = 0;
while (tryyy <= 25)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ChestPos.X, ChestPos.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ChestPos.X, ChestPos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
tryyy++;
}

View File

@ -165,10 +165,10 @@ namespace app
{
if (Form1_0.Mover_0.MoveToLocation(17601, 8070))
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, 17601, 8070);
//Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, 17601, 8070);
//Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.PlayerScan_0.GetPositions();
}

View File

@ -123,9 +123,9 @@ namespace app
{
Form1_0.Mover_0.MoveToLocation(Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(100);
}
@ -153,9 +153,9 @@ namespace app
int tryyy = 0;
while (tryyy <= 15)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(4);
tryyy++;
}

View File

@ -140,9 +140,9 @@ namespace app
Position ThisFinalPosition = Form1_0.MapAreaStruc_0.GetPositionOfObject("object", "WaypointPortal", (int)DoingThisArea, new List<int>() { });
if (ThisFinalPosition.X != 0 && ThisFinalPosition.Y != 0)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
if (Form1_0.UIScan_0.WaitTilUIOpen("waypointMenu"))
{
Form1_0.Town_0.SelectTownWP();
@ -287,9 +287,9 @@ namespace app
Position ThisFinalPosition = Form1_0.MapAreaStruc_0.GetPositionOfObject("object", "WaypointPortal", (int) DoingThisArea, new List<int>() { });
if (ThisFinalPosition.X != 0 && ThisFinalPosition.Y != 0)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
if (Form1_0.UIScan_0.WaitTilUIOpen("waypointMenu"))
{
Form1_0.Town_0.SelectTownWP();

View File

@ -42,7 +42,7 @@ namespace app
public partial class Form1 : Form
{
public string BotVersion = "V2.54";
public string BotVersion = "V2.6";
public string D2_LOD_113C_Path = "";
@ -943,6 +943,8 @@ namespace app
//Battle_0.CastSkills();
//ItemsStruc_0.GetItems(true);
//if (Running) LoopTimer.Start();
//ItemsStruc_0.GetItems(false);
//InventoryStruc_0.DumpBadItemsOnGround();
//return;
if (CharConfig.RunMapHackOnly)

View File

@ -426,11 +426,11 @@ namespace app
{
for (int i = 0; i < PathFindingPoints.Count - 1; i++)
{
Dictionary<string, int> itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, PathFindingPoints[i].X, PathFindingPoints[i].Y);
Dictionary<string, int> itemScreenPosEnd = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, PathFindingPoints[i + 1].X, PathFindingPoints[i + 1].Y);
Position itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, PathFindingPoints[i].X, PathFindingPoints[i].Y);
Position itemScreenPosEnd = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, PathFindingPoints[i + 1].X, PathFindingPoints[i + 1].Y);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart["x"], itemScreenPosStart["y"]);
System.Drawing.Point EndPoint = new System.Drawing.Point(itemScreenPosEnd["x"], itemScreenPosEnd["y"]);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart.X, itemScreenPosStart.Y);
System.Drawing.Point EndPoint = new System.Drawing.Point(itemScreenPosEnd.X, itemScreenPosEnd.Y);
StartPoint = RescaleThisPoint(StartPoint);
EndPoint = RescaleThisPoint(EndPoint);
@ -446,8 +446,8 @@ namespace app
if (MoveToPoint.X != 0 && MoveToPoint.Y != 0)
{
Dictionary<string, int> itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, MoveToPoint.X, MoveToPoint.Y);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart["x"], itemScreenPosStart["y"]);
Position itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, MoveToPoint.X, MoveToPoint.Y);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart.X, itemScreenPosStart.Y);
StartPoint = RescaleThisPoint(StartPoint);
if (PathFindingPoints.Count == 0)
{
@ -459,8 +459,8 @@ namespace app
for (int i = 0; i < MobsPoints.Count; i++)
{
Dictionary<string, int> itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, MobsPoints[i].X, MobsPoints[i].Y);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart["x"], itemScreenPosStart["y"]);
Position itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, MobsPoints[i].X, MobsPoints[i].Y);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart.X, itemScreenPosStart.Y);
StartPoint = RescaleThisPoint(StartPoint);
DrawCrossAtPoint(e, StartPoint, yellowPen, false);
@ -474,8 +474,8 @@ namespace app
for (int i = 0; i < NPCPoints.Count; i++)
{
Dictionary<string, int> itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, NPCPoints[i].X, NPCPoints[i].Y);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart["x"], itemScreenPosStart["y"]);
Position itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, NPCPoints[i].X, NPCPoints[i].Y);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart.X, itemScreenPosStart.Y);
StartPoint = RescaleThisPoint(StartPoint);
DrawCrossAtPoint(e, StartPoint, purplePen, false);
@ -489,24 +489,24 @@ namespace app
for (int i = 0; i < GoodChestsPoints.Count; i++)
{
Dictionary<string, int> itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, GoodChestsPoints[i].X, GoodChestsPoints[i].Y);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart["x"], itemScreenPosStart["y"]);
Position itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, GoodChestsPoints[i].X, GoodChestsPoints[i].Y);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart.X, itemScreenPosStart.Y);
StartPoint = RescaleThisPoint(StartPoint);
DrawCrossAtPoint(e, StartPoint, greenPen, false);
}
for (int i = 0; i < WPPoints.Count; i++)
{
Dictionary<string, int> itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, WPPoints[i].X, WPPoints[i].Y);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart["x"], itemScreenPosStart["y"]);
Position itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, WPPoints[i].X, WPPoints[i].Y);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart.X, itemScreenPosStart.Y);
StartPoint = RescaleThisPoint(StartPoint);
DrawCrossAtPoint(e, StartPoint, bluePen, false);
}
for (int i = 0; i < ExitPoints.Count; i++)
{
Dictionary<string, int> itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ExitPoints[i].X, ExitPoints[i].Y);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart["x"], itemScreenPosStart["y"]);
Position itemScreenPosStart = Form1_0.GameStruc_0.World2ScreenDisplay(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ExitPoints[i].X, ExitPoints[i].Y);
System.Drawing.Point StartPoint = new System.Drawing.Point(itemScreenPosStart.X, itemScreenPosStart.Y);
StartPoint = RescaleThisPoint(StartPoint);
DrawCrossAtPoint(e, StartPoint, cyanPen, false);
}

View File

@ -385,8 +385,8 @@ namespace app
//int tryyy = 0;
//while (Form1_0.PlayerScan_0.levelNo == ThisPlayerAreaID && tryyy <= 25)
//{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X - PlayerOffsetInCollisiongrid.X, ThisFinalPosition.Y - PlayerOffsetInCollisiongrid.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X - PlayerOffsetInCollisiongrid.X, ThisFinalPosition.Y - PlayerOffsetInCollisiongrid.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.PlayerScan_0.GetPositions();
//tryyy++;
//}

View File

@ -414,7 +414,7 @@ namespace app
FirstAttackCasting();
SetSkills();
CastSkills();
if (CharConfig.RunningOnChar.ToLower().Contains("paladin"))
if (CharConfig.RunningOnChar == "PaladinHammer")
{
CastSkills();
CastSkills();
@ -423,6 +423,8 @@ namespace app
}
else
{
Form1_0.MobsStruc_0.xPosFinal = 0;
Form1_0.MobsStruc_0.yPosFinal = 0;
if (CharConfig.RunBaalScript && !Form1_0.Baal_0.ScriptDone && Form1_0.Baal_0.Wave5Detected) Form1_0.Baal_0.Wave5Cleared = true;
TriedToMoveToMobsCount = 0;
DoingBattle = false;
@ -463,7 +465,7 @@ namespace app
FirstAttackCasting();
SetSkills();
CastSkills();
if (CharConfig.RunningOnChar.ToLower().Contains("paladin"))
if (CharConfig.RunningOnChar == "PaladinHammer")
{
CastSkills();
CastSkills();
@ -472,6 +474,8 @@ namespace app
return true;
}
Form1_0.MobsStruc_0.xPosFinal = 0;
Form1_0.MobsStruc_0.yPosFinal = 0;
if (CharConfig.RunBaalScript && !Form1_0.Baal_0.ScriptDone && Form1_0.Baal_0.Wave5Detected) Form1_0.Baal_0.Wave5Cleared = true;
TriedToMoveToMobsCount = 0;
DoingBattle = false;
@ -510,7 +514,7 @@ namespace app
FirstAttackCasting();
SetSkills();
CastSkills();
if (CharConfig.RunningOnChar.ToLower().Contains("paladin"))
if (CharConfig.RunningOnChar == "PaladinHammer")
{
CastSkills();
CastSkills();
@ -519,6 +523,8 @@ namespace app
}
else
{
Form1_0.MobsStruc_0.xPosFinal = 0;
Form1_0.MobsStruc_0.yPosFinal = 0;
if (CharConfig.RunBaalScript && !Form1_0.Baal_0.ScriptDone && Form1_0.Baal_0.Wave5Detected) Form1_0.Baal_0.Wave5Cleared = true;
TriedToMoveToMobsCount = 0;
DoingBattle = false;
@ -625,14 +631,14 @@ namespace app
if (Form1_0.MobsStruc_0.xPosFinal != 0 && Form1_0.MobsStruc_0.yPosFinal != 0)
{
Form1_0.PlayerScan_0.GetPositions();
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.MobsStruc_0.xPosFinal, Form1_0.MobsStruc_0.yPosFinal);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.MobsStruc_0.xPosFinal, Form1_0.MobsStruc_0.yPosFinal);
if (!CharConfig.PlayerAttackWithRightHand)
{
Form1_0.KeyMouse_0.SendSHIFT_CLICK_ATTACK(itemScreenPos["x"], itemScreenPos["y"] - 30);
Form1_0.KeyMouse_0.SendSHIFT_CLICK_ATTACK(itemScreenPos.X, itemScreenPos.Y - 30);
}
else
{
Form1_0.KeyMouse_0.MouseCliccRightAttackMove(itemScreenPos["x"], itemScreenPos["y"] - 30);
Form1_0.KeyMouse_0.MouseCliccRightAttackMove(itemScreenPos.X, itemScreenPos.Y - 30);
}
}
else
@ -655,15 +661,15 @@ namespace app
if (Form1_0.MobsStruc_0.xPosFinal != 0 && Form1_0.MobsStruc_0.yPosFinal != 0)
{
Form1_0.PlayerScan_0.GetPositions();
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.MobsStruc_0.xPosFinal, Form1_0.MobsStruc_0.yPosFinal);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.MobsStruc_0.xPosFinal, Form1_0.MobsStruc_0.yPosFinal);
if (!CharConfig.PlayerAttackWithRightHand)
{
//Form1_0.KeyMouse_0.SendSHIFT_CLICK_ATTACK(itemScreenPos["x"], itemScreenPos["y"] - 30);
Form1_0.KeyMouse_0.SendSHIFT_CLICK_ATTACK_CAST_NO_MOVE(itemScreenPos["x"], itemScreenPos["y"] - 30);
//Form1_0.KeyMouse_0.SendSHIFT_CLICK_ATTACK(itemScreenPos.X, itemScreenPos.Y - 30);
Form1_0.KeyMouse_0.SendSHIFT_CLICK_ATTACK_CAST_NO_MOVE(itemScreenPos.X, itemScreenPos.Y - 30);
}
else
{
Form1_0.KeyMouse_0.MouseCliccRightAttackMove(itemScreenPos["x"], itemScreenPos["y"] - 30);
Form1_0.KeyMouse_0.MouseCliccRightAttackMove(itemScreenPos.X, itemScreenPos.Y - 30);
}
}
else
@ -686,7 +692,7 @@ namespace app
{
if (!FirstAttackCasted)
{
if (CharConfig.RunningOnChar.ToLower().Contains("sorc"))
if (CharConfig.RunningOnChar == "SorceressBlizzard")
{
Form1_0.KeyMouse_0.PressKey(CharConfig.KeySkillAttack); //select static

View File

@ -153,6 +153,12 @@ namespace app
//PostMessage((int)Form1_0.hWnd, WM_SYSKEYUP, (ushort)ThisK, (IntPtr)0);
}
public void PressKey3(System.Windows.Forms.Keys ThisK)
{
SendMessage((int)Form1_0.hWnd, WM_SYSKEYDOWN, (ushort)ThisK, (IntPtr)0);
SendMessage((int)Form1_0.hWnd, WM_SYSKEYUP, (ushort)ThisK, (IntPtr)0);
}
public void PressKeyHold(System.Windows.Forms.Keys ThisK)
{
SendMessage((int)Form1_0.hWnd, WM_SYSKEYDOWN, (ushort)ThisK, (IntPtr)0);

View File

@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using static app.MapAreaStruc;
namespace app
{
@ -71,19 +72,21 @@ namespace app
//fix town act5 stuck near bolder
if (Form1_0.Town_0.GetInTown() && IsPositionNearOf(5093, 5034, 2))
{
MoveToLocationAttack(5096, 5024);
MoveToLocationAttack(5098, 5022);
}
int TryMove = 0;
int TryMove2 = 0;
int LastX = Form1_0.PlayerScan_0.xPosFinal;
int LastY = Form1_0.PlayerScan_0.yPosFinal;
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisX, ThisY);
itemScreenPos = FixMouseYPosition(itemScreenPos);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisX, ThisY);
if (Form1_0.Town_0.GetInTown()) Form1_0.KeyMouse_0.PressKey(CharConfig.KeySkillfastMoveAtTown);
else Form1_0.KeyMouse_0.PressKey(CharConfig.KeySkillfastMoveOutsideTown);
if (!CharConfig.UseTeleport || (CharConfig.UseTeleport && Form1_0.Town_0.GetInTown()))
{
Form1_0.KeyMouse_0.MouseMoveTo_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Form1_0.KeyMouse_0.MouseMoveTo_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.KeyMouse_0.MouseClicHoldWithoutRelease();
Form1_0.KeyMouse_0.PressKeyHold(System.Windows.Forms.Keys.E);
}
@ -110,11 +113,11 @@ namespace app
if (!CharConfig.UseTeleport || (CharConfig.UseTeleport && Form1_0.Town_0.GetInTown()))
{
Form1_0.KeyMouse_0.MouseMoveTo_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Form1_0.KeyMouse_0.MouseMoveTo_RealPos(itemScreenPos.X, itemScreenPos.Y);
}
if (CharConfig.UseTeleport && !Form1_0.Town_0.GetInTown())
{
Form1_0.KeyMouse_0.MouseCliccRight_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Form1_0.KeyMouse_0.MouseCliccRight_RealPos(itemScreenPos.X, itemScreenPos.Y);
//#######
if (!AllowFastMove)
@ -143,7 +146,7 @@ namespace app
if (AllowPickingItem) Form1_0.ItemsStruc_0.GetItems(true); //#############
Form1_0.Potions_0.CheckIfWeUsePotion();
itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisX, ThisY);
itemScreenPos = FixMouseYPosition(itemScreenPos);
Application.DoEvents();
@ -200,8 +203,8 @@ namespace app
}
itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisX, ThisY);
itemScreenPos = FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseCliccRight_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Form1_0.KeyMouse_0.MouseCliccRight_RealPos(itemScreenPos.X, itemScreenPos.Y);
}*/
if (TryMove >= MaxMoveTry && (!CharConfig.UseTeleport || (CharConfig.UseTeleport && Form1_0.Town_0.GetInTown())))
@ -289,12 +292,12 @@ namespace app
return false;
}
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisX, ThisY);
itemScreenPos = FixMouseYPosition(itemScreenPos);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisX, ThisY);
//if (!CharConfig.UseTeleport || (CharConfig.UseTeleport && Form1_0.Town_0.GetInTown()))
//{
Form1_0.KeyMouse_0.MouseMoveTo_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Form1_0.KeyMouse_0.MouseMoveTo_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.KeyMouse_0.MouseClicHoldWithoutRelease();
Form1_0.KeyMouse_0.PressKeyHold(System.Windows.Forms.Keys.E);
//}
@ -304,8 +307,8 @@ namespace app
Form1_0.WaitDelay(5); //wait a little bit, we just casted attack
if (!CharConfig.UseTeleport || (CharConfig.UseTeleport && Form1_0.Town_0.GetInTown())) Form1_0.KeyMouse_0.MouseMoveTo_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
if (CharConfig.UseTeleport && !Form1_0.Town_0.GetInTown()) Form1_0.KeyMouse_0.MouseCliccRightAttackMove(itemScreenPos["x"], itemScreenPos["y"]);
if (!CharConfig.UseTeleport || (CharConfig.UseTeleport && Form1_0.Town_0.GetInTown())) Form1_0.KeyMouse_0.MouseMoveTo_RealPos(itemScreenPos.X, itemScreenPos.Y);
if (CharConfig.UseTeleport && !Form1_0.Town_0.GetInTown()) Form1_0.KeyMouse_0.MouseCliccRightAttackMove(itemScreenPos.X, itemScreenPos.Y);
//#######
Form1_0.PlayerScan_0.GetPositions();
@ -354,23 +357,5 @@ namespace app
Form1_0.overlayForm.ResetMoveToLocation();
return MovedCorrectly;
}
public Dictionary<string, int> FixMouseYPosition(Dictionary<string, int> itemScreenPos)
{
Dictionary<string, int> itemScreenPos2 = new Dictionary<string, int>();
itemScreenPos2["x"] = itemScreenPos["x"];
itemScreenPos2["y"] = itemScreenPos["y"];
//calculate new Y clicking offset, else it will clic on bottom menu items
if (itemScreenPos2["y"] >= (Form1_0.D2Height + Form1_0.ScreenYOffset - Form1_0.ScreenYMenu))
{
int DiffX = Form1_0.CenterX - itemScreenPos2["x"];
itemScreenPos2["x"] = (int)(itemScreenPos2["x"] + (DiffX / 6));
itemScreenPos2["y"] = (Form1_0.D2Height + Form1_0.ScreenYOffset - Form1_0.ScreenYMenu);
//Console.WriteLine("corrected pos from: " + Sx + "," + Sy + " to: " + itemScreenPos2["x"] + "," + itemScreenPos2["y"]);
}
return itemScreenPos2;
}
}
}

View File

@ -123,7 +123,7 @@ namespace app
int LastItemIdentified = 0;
while (Form1_0.InventoryStruc_0.HasUnidItemInInventory() && tries2 < 2)
{
Form1_0.SetGameStatus("TOWN-SHOP-ID");
Form1_0.SetGameStatus("TOWN-SHOP-ID ITEMS");
Form1_0.SetProcessingTime();
if (!Form1_0.Running || !Form1_0.GameStruc_0.IsInGame())
{
@ -195,11 +195,13 @@ namespace app
Form1_0.SetGameStatus("TOWN-SHOP-SELL ITEMS");
for (int i = 0; i < 40; i++)
{
if (CharConfig.InventoryDontCheckItem[i] == 1) continue;
if (Form1_0.InventoryStruc_0.InventoryHasItem[i] == 0) continue;
if (ShopForTomeOfPortal && Form1_0.InventoryStruc_0.InventoryItemNames[i] == "Wirt's Leg") continue;
if (CharConfig.InventoryDontCheckItem[i] == 0
&& Form1_0.InventoryStruc_0.InventoryHasItem[i] >= 1
&& Form1_0.InventoryStruc_0.InventoryHasStashItem[i] == 0
//Console.WriteLine("HasStashItem:" + Form1_0.InventoryStruc_0.InventoryHasStashItem[i] + ", HasUnidItem:" + Form1_0.InventoryStruc_0.InventoryHasUnidItem[i]);
if (Form1_0.InventoryStruc_0.InventoryHasStashItem[i] == 0
&& Form1_0.InventoryStruc_0.InventoryHasUnidItem[i] == 0)
{
Dictionary<string, int> itemScreenPos = Form1_0.InventoryStruc_0.ConvertIndexToXY(i);

View File

@ -157,10 +157,10 @@ namespace app
GetCorpse();
CurrentScript = 0;
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Form1_0.KeyMouse_0.PressKeyHold(System.Windows.Forms.Keys.E);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.KeyMouse_0.ReleaseKey(System.Windows.Forms.Keys.E);
Form1_0.WaitDelay(50);
//}
@ -179,10 +179,10 @@ namespace app
Form1_0.method_1("Trying to use Unkown TP ID!", Color.OrangeRed);
CurrentScript = 0;
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.PlayerScan_0.xPosFinal - 2, Form1_0.PlayerScan_0.yPosFinal);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.PlayerScan_0.xPosFinal - 2, Form1_0.PlayerScan_0.yPosFinal);
Form1_0.KeyMouse_0.PressKeyHold(System.Windows.Forms.Keys.E);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.KeyMouse_0.ReleaseKey(System.Windows.Forms.Keys.E);
Form1_0.WaitDelay(50);
@ -226,9 +226,9 @@ namespace app
Form1_0.WaitDelay(100);
//Clic corpse
FirstTown = false;
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] - 45, itemScreenPos["y"] - 5);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X - 45, itemScreenPos.Y - 5);
//Form1_0.WaitDelay(100);
//Tries++;
//}
@ -513,9 +513,9 @@ namespace app
Position ThisFinalPosition = Form1_0.MapAreaStruc_0.GetPositionOfObject("object", "WaypointPortal", (int)Enums.Area.RogueEncampment, new List<int>() { });
if (ThisFinalPosition.X != 0 && ThisFinalPosition.Y != 0)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] - 100, itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X - 100, itemScreenPos.Y - 15);
if (Form1_0.UIScan_0.WaitTilUIOpen("waypointMenu"))
{
if (SelectWPIndex == -1)
@ -540,9 +540,9 @@ namespace app
Position ThisFinalPosition = Form1_0.MapAreaStruc_0.GetPositionOfObject("object", "Act2Waypoint", (int)Enums.Area.LutGholein, new List<int>() { });
if (ThisFinalPosition.X != 0 && ThisFinalPosition.Y != 0)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] - 100, itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X - 100, itemScreenPos.Y - 15);
if (Form1_0.UIScan_0.WaitTilUIOpen("waypointMenu"))
{
if (SelectWPIndex == -1)
@ -567,9 +567,9 @@ namespace app
Position ThisFinalPosition = Form1_0.MapAreaStruc_0.GetPositionOfObject("object", "Act3TownWaypoint", (int)Enums.Area.KurastDocks, new List<int>() { });
if (ThisFinalPosition.X != 0 && ThisFinalPosition.Y != 0)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] - 100, itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X - 100, itemScreenPos.Y - 15);
if (Form1_0.UIScan_0.WaitTilUIOpen("waypointMenu"))
{
if (SelectWPIndex == -1)
@ -594,9 +594,9 @@ namespace app
Position ThisFinalPosition = Form1_0.MapAreaStruc_0.GetPositionOfObject("object", "PandamoniumFortressWaypoint", (int)Enums.Area.ThePandemoniumFortress, new List<int>() { });
if (ThisFinalPosition.X != 0 && ThisFinalPosition.Y != 0)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] - 100, itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X - 100, itemScreenPos.Y - 15);
if (Form1_0.UIScan_0.WaitTilUIOpen("waypointMenu"))
{
if (SelectWPIndex == -1)
@ -621,9 +621,9 @@ namespace app
Position ThisFinalPosition = Form1_0.MapAreaStruc_0.GetPositionOfObject("object", "ExpansionWaypoint", (int) Enums.Area.Harrogath, new List<int>() { });
if (ThisFinalPosition.X != 0 && ThisFinalPosition.Y != 0)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"] - 100, itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, ThisFinalPosition.X, ThisFinalPosition.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X - 100, itemScreenPos.Y - 15);
if (Form1_0.UIScan_0.WaitTilUIOpen("waypointMenu"))
{
if (SelectWPIndex == -1)
@ -837,9 +837,9 @@ namespace app
int tries = 0;
while(tries < 5)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"] - 15);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y - 15);
Form1_0.WaitDelay(10);
Form1_0.PlayerScan_0.GetPositions();
tries++;
@ -856,9 +856,9 @@ namespace app
//use wp
if (Form1_0.ObjectsStruc_0.GetObjects("PandamoniumFortressWaypoint"))
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMousePositionWithScreenSize(itemScreenPos);
Form1_0.MouseClicc(itemScreenPos["x"], itemScreenPos["y"] - 15);
Form1_0.MouseClicc(itemScreenPos.X, itemScreenPos.Y - 15);
}
else
{
@ -907,9 +907,9 @@ namespace app
if (MovedCorrectly)
{
//Clic store
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.NPCStruc_0.xPosFinal, Form1_0.NPCStruc_0.yPosFinal);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.NPCStruc_0.xPosFinal, Form1_0.NPCStruc_0.yPosFinal);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
if (Form1_0.UIScan_0.WaitTilUIOpen("npcInteract")) //npcShop
{
if (TownAct == 5)
@ -979,9 +979,9 @@ namespace app
if (MovedCorrectly)
{
//Clic store
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.NPCStruc_0.xPosFinal, Form1_0.NPCStruc_0.yPosFinal);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.NPCStruc_0.xPosFinal, Form1_0.NPCStruc_0.yPosFinal);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
if (Form1_0.UIScan_0.WaitTilUIOpen("npcInteract")) //npcShop
{
if (TownAct != 4)
@ -1059,9 +1059,9 @@ namespace app
if (MovedCorrectly)
{
//Clic store
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.NPCStruc_0.xPosFinal, Form1_0.NPCStruc_0.yPosFinal);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.NPCStruc_0.xPosFinal, Form1_0.NPCStruc_0.yPosFinal);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
if (Form1_0.UIScan_0.WaitTilUIOpen("npcInteract")) //npcShop
{
if (TownAct != 4)
@ -1114,12 +1114,12 @@ namespace app
if (MovedCorrectly)
{
//get stash location
Dictionary<string, int> itemScreenPos = new Dictionary<string, int>();
Position itemScreenPos = new Position { X = 0, Y = 0 };
bool HasPosForStash = false;
if (TownAct == 5)
{
itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, 5124, 5057);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
HasPosForStash = true;
}
else
@ -1128,7 +1128,7 @@ namespace app
{
Form1_0.method_1("Changed Stash pos to: " + Form1_0.ObjectsStruc_0.itemx + ", " + Form1_0.ObjectsStruc_0.itemy, Color.BlueViolet);
itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.ObjectsStruc_0.itemx, Form1_0.ObjectsStruc_0.itemy);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
HasPosForStash = true;
}
else
@ -1156,7 +1156,7 @@ namespace app
if (HasPosForStash)
{
//Clic stash
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
if (Form1_0.UIScan_0.WaitTilUIOpen("stash"))
{
if (RunScript)
@ -1224,9 +1224,9 @@ namespace app
}
//Clic cain
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.NPCStruc_0.xPosFinal, Form1_0.NPCStruc_0.yPosFinal);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.NPCStruc_0.xPosFinal, Form1_0.NPCStruc_0.yPosFinal);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
if (Form1_0.UIScan_0.WaitTilUIOpen("npcInteract"))
{
//Clic Identify items (get cain pos again) - 227 offset y
@ -1289,9 +1289,9 @@ namespace app
if (MovedCorrectly)
{
//Clic merc NPC
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.NPCStruc_0.xPosFinal, Form1_0.NPCStruc_0.yPosFinal);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.NPCStruc_0.xPosFinal, Form1_0.NPCStruc_0.yPosFinal);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
if (Form1_0.UIScan_0.WaitTilUIOpen("npcInteract"))
{
Form1_0.KeyMouse_0.PressKey(System.Windows.Forms.Keys.Down);
@ -1355,9 +1355,9 @@ namespace app
//Console.WriteLine("Corpse found method1");
Form1_0.method_1("Grab corpse #1", Color.Red);
//Clic corpse
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.NPCStruc_0.xPosFinal, Form1_0.NPCStruc_0.yPosFinal);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.NPCStruc_0.xPosFinal, Form1_0.NPCStruc_0.yPosFinal);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
}
//method #2
@ -1367,9 +1367,9 @@ namespace app
//Console.WriteLine("Corpse found method2");
Form1_0.method_1("Grab corpse #2", Color.Red);
//Clic corpse
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.PlayerScan_0.xPosFinalOtherP, Form1_0.PlayerScan_0.yPosFinalOtherP);
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, Form1_0.PlayerScan_0.xPosFinalOtherP, Form1_0.PlayerScan_0.yPosFinalOtherP);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.WaitDelay(100);
Form1_0.PlayerScan_0.GetPositions();
Tries++;

View File

@ -14,11 +14,11 @@
//#######################################
KeySkillAttack=F1
KeySkillAura=F2
KeySkillfastMoveAtTown=F9
KeySkillfastMoveAtTown=F8
KeySkillfastMoveOutsideTown=F7
KeySkillDefenseAura=F7
KeySkillDefenseAura=F6
KeySkillCastDefense=F5
KeySkillLifeAura=F4
KeySkillLifeAura=F3
PlayerAttackWithRightHand=false
@ -32,10 +32,10 @@ BeltPotTypeToHave=0,0,1,3
//#######################################
InventoryDontCheckItem=
{
0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1
0,0,0,0,1,1,1,1,1,1,
0,0,0,0,1,1,1,1,1,1,
0,0,0,0,1,1,1,1,1,1,
0,0,0,0,1,1,1,1,1,1
}
//#######################################
@ -66,5 +66,5 @@ GambleGold=true
//#######################################
//MERC SETTINGS
//#######################################
UsingMerc=false
UsingMerc=true
MercTakeHPPotUnder=40

View File

@ -979,7 +979,7 @@ Perfect Diamond
[Name] == SmallCharm && [Quality] == magic && [ManaMax] >= 17
//[Name] == SmallCharm && [Quality] == magic && [FasterHitRecovery] >= 5
[Name] == SmallCharm && [Quality] == magic && [LifeMax]+[ManaMax] >= 20
[Name] == SmallCharm && [Quality] == magic && [PoisonMindamage] >= 100
[Name] == SmallCharm && [Quality] == magic && [PoisonMinDamage] >= 100
[Name] == SmallCharm && [Quality] == magic && [FireResist] >= 5
[Name] == SmallCharm && [Quality] == magic && [LightningResist] >= 5

View File

@ -202,14 +202,16 @@ namespace app
IsItemRVPotion = false;
IsItemFullRVPotion = false;
string ThisItemName = Form1_0.ItemsStruc_0.ItemNAAME.Replace(" ", "");
foreach (var ThisDir in Form1_0.ItemsAlert_0.PickItemsPotions)
{
if (Form1_0.ItemsStruc_0.ItemNAAME.ToLower().Replace(" ", "") == Regex.Replace(ThisDir.Key.ToLower().Replace(" ", ""), @"[\d-]", string.Empty) && ThisDir.Value)
if (ThisItemName == Regex.Replace(ThisDir.Key.Replace(" ", ""), @"[\d-]", string.Empty) && ThisDir.Value)
{
if (Form1_0.ItemsStruc_0.ItemNAAME.ToLower().Contains("healing")) IsItemHPPotion = true;
if (Form1_0.ItemsStruc_0.ItemNAAME.ToLower().Contains("mana")) IsItemManaPotion = true;
if (Form1_0.ItemsStruc_0.ItemNAAME.ToLower().Contains("rejuvenation")) IsItemRVPotion = true;
if (Form1_0.ItemsStruc_0.ItemNAAME.ToLower().Contains("full rejuvenation")) IsItemFullRVPotion = true;
if (ThisItemName.Contains("Healing")) IsItemHPPotion = true;
if (ThisItemName.Contains("Mana")) IsItemManaPotion = true;
if (ThisItemName.Contains("Rejuvenation")) IsItemRVPotion = true;
if (ThisItemName.Contains("FullRejuvenation")) IsItemFullRVPotion = true;
}
}
@ -221,12 +223,12 @@ namespace app
public int GetPotType()
{
if (Form1_0.ItemsStruc_0.ItemNAAME.ToLower().Contains("healing") ||
Form1_0.ItemsStruc_0.ItemNAAME.ToLower() == "potion of life")
if (Form1_0.ItemsStruc_0.ItemNAAME.Contains("Healing") ||
Form1_0.ItemsStruc_0.ItemNAAME == "Potion of Life")
{
return 0;
}
if (Form1_0.ItemsStruc_0.ItemNAAME.ToLower().Contains("mana"))
if (Form1_0.ItemsStruc_0.ItemNAAME.Contains("Mana"))
{
return 1;
}

View File

@ -1548,22 +1548,72 @@ namespace app
DarkLord3,
Specter3,
BurningSoul3,
Unknown730,
Unknown731,
Unknown732,
Unknown733,
Unknown734,
TheCowKing,
DarkElder,
Unknown737,
Unknown738,
Unknown739,
Unknown740,
Unknown741,
Unknown742,
Unknown743,
Bishibosh,
Bonebreak,
Coldcrow,
Rakanishu,
TreeheadWoodFist,
Griswold2,
PitspawnFouldog,
TheCountess,
FlamespiketheCrawler,
Boneash,
Radament2,
CubeNPC
CubeNPC,
Fangskin,
Beetleburst,
Leatherarm,
ColdwormtheBurrower,
FireEye,
DarkElder,
AncientKaatheSoulless,
TheSummoner,
TheSmith2,
WebMagetheBurning,
WitchDoctorEndugu,
Stormtree,
SarinatheBattlemaid,
IcehawkRiftwing,
IsmailVilehand,
GelebFlamefinger,
BremmSparkfist,
ToorcIcefist,
WyandVoidfinger,
MafferDragonhand,
WingedDeath,
TheTormentor,
Taintbreeder,
RiftwraththeCannibal,
InfectorofSouls,
LordDeSeis,
GrandVizierofChaos,
TheCowKing,
Corpsefire,
TheFeatureCreep2,
Shenk2,
Talic,
Madawc,
Korlic,
AxeDweller,
BonesawBreaker,
DacFarren,
MegaflowRectifer,
EyebackUnleashed,
ThreashSocket,
Pindleskin,
SnapchipShatter,
AnodizedElite,
VinvearMolech,
SharpToothSayer,
MagmaTorquer,
BlazeRipper,
Frozenstein,
Nihlathak2,
ColenzothAnnihilator,
AchmeltheCursed,
BartuctheBloody,
VentartheUnholy,
ListertheTormentor
}
}
}

View File

@ -13,6 +13,7 @@ using System.Windows.Forms;
using static System.Collections.Specialized.BitVector32;
using static System.Windows.Forms.AxHost;
using System.Threading;
using static app.MapAreaStruc;
using static app.Enums;
namespace app
@ -457,7 +458,7 @@ namespace app
Form1_0.method_1("Game Time: " + ThisTimee.Minutes.ToString("00") + ":" + ThisTimee.Seconds.ToString("00") + ":" + ThisTimee.Milliseconds.ToString("0"), Color.DarkBlue);
}
public Dictionary<string, int> World2Screen(long playerX, long playerY, long targetx, long targety)
public Position World2Screen(long playerX, long playerY, long targetx, long targety)
{
//; scale = 27
//double scale = Form1_0.centerModeScale * Form1_0.renderScale * 100;
@ -478,13 +479,10 @@ namespace app
//int yS = (int) (Form1_0.CenterY + (y * scale * 0.5) - 10);
int yS = (int) (Form1_0.CenterY + ((y * scale * 0.5) - 30));
Dictionary<string, int> NewDict = new Dictionary<string, int>();
NewDict["x"] = xS;
NewDict["y"] = yS;
return NewDict;
return FixMouseYPosition(new Position { X = xS, Y = yS });
}
public Dictionary<string, int> World2ScreenDisplay(long playerX, long playerY, long targetx, long targety)
public Position World2ScreenDisplay(long playerX, long playerY, long targetx, long targety)
{
//; scale = 27
//double scale = Form1_0.centerModeScale * Form1_0.renderScale * 100;
@ -505,10 +503,24 @@ namespace app
//int yS = (int) (Form1_0.CenterY + (y * scale * 0.5) - 10);
int yS = (int)(Form1_0.CenterY + ((y * scale * 0.5) - 30));
Dictionary<string, int> NewDict = new Dictionary<string, int>();
NewDict["x"] = xS;
NewDict["y"] = yS;
return NewDict;
//return FixMouseYPosition(new Position { X = xS, Y = yS });
return new Position { X = xS, Y = yS };
}
public Position FixMouseYPosition(Position itemScreenPos)
{
Position itemScreenPos2 = new Position { X = itemScreenPos.X, Y = itemScreenPos.Y };
//calculate new Y clicking offset, else it will clic on bottom menu items
if (itemScreenPos2.Y >= (Form1_0.D2Height + Form1_0.ScreenYOffset - Form1_0.ScreenYMenu))
{
int DiffX = Form1_0.CenterX - itemScreenPos2.X;
itemScreenPos2.X = (int)(itemScreenPos2.X + (DiffX / 6));
itemScreenPos2.Y = (Form1_0.D2Height + Form1_0.ScreenYOffset - Form1_0.ScreenYMenu);
//Console.WriteLine("corrected pos from: " + Sx + "," + Sy + " to: " + itemScreenPos2.X + "," + itemScreenPos2.Y);
}
return itemScreenPos2;
}

View File

@ -104,6 +104,7 @@ namespace app
//if its not a key at the key location, relocate the item
if (InventoryItemNames[thisindex] != "Key")
{
//Console.WriteLine("here");
int ThisNewIndex = GetNextFreeSpaceInInventory();
if (ThisNewIndex > -1)
@ -130,6 +131,7 @@ namespace app
{
if (CharConfig.InventoryDontCheckItem[i] == 0 && InventoryHasItem[i] >= 1 && InventoryItemNames[i] == "Key")
{
//Console.WriteLine("hereIndex:" + i);
//pick key item from this slot
Dictionary<string, int> itemScreenPos = Form1_0.InventoryStruc_0.ConvertIndexToXY(i);
itemScreenPos = Form1_0.InventoryStruc_0.ConvertInventoryLocToScreenPos(itemScreenPos["x"], itemScreenPos["y"]);
@ -226,6 +228,7 @@ namespace app
//place all bad items on ground
for (int i = 0; i < 40; i++)
{
//Console.WriteLine("toID: " + InventoryHasItemToID[i] + ", tostash: " + InventoryHasStashItem[i]);
Form1_0.UIScan_0.OpenUIMenu("invMenu");
if (CharConfig.InventoryDontCheckItem[i] == 0 && InventoryHasItem[i] >= 1 && InventoryHasItemToID[i] == 0 && InventoryHasStashItem[i] == 0)
{
@ -248,6 +251,7 @@ namespace app
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos["x"], itemScreenPos["y"]);
Form1_0.WaitDelay(12);
Form1_0.ItemsStruc_0.GetItems(false);
//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);
@ -277,6 +281,15 @@ namespace app
try
{
int FullIndex = ConvertXYToIndex(Form1_0.ItemsStruc_0.itemx, Form1_0.ItemsStruc_0.itemy);
if (CharConfig.InventoryDontCheckItem[FullIndex] == 1
&& Form1_0.ItemsStruc_0.ItemNAAME != "Key"
&& Form1_0.ItemsStruc_0.ItemNAAME != "Tome of Town Portal"
&& Form1_0.ItemsStruc_0.ItemNAAME != "Tome of Identify")
{
return;
}
InventoryHasItem[FullIndex] = 1;
InventoryItemPointers[FullIndex] = Form1_0.ItemsStruc_0.ItemPointerLocation;
InventoryItemNames[FullIndex] = Form1_0.ItemsStruc_0.ItemNAAME;
@ -338,7 +351,7 @@ namespace app
{
for (int i = 0; i < 40; i++)
{
if (CharConfig.InventoryDontCheckItem[i] == 0 && InventoryHasItem[i] >= 1)
if (InventoryHasItem[i] >= 1)
{
if (InventoryItemNames[i] == ItemmN)
{

View File

@ -57,9 +57,10 @@ namespace app
public bool ShouldPickItem(bool Keeping)
{
string ItemName = Form1_0.ItemsStruc_0.ItemNAAME.Replace(" ", "");
foreach (var ThisDir in PickItemsRunesKeyGems)
{
if (Form1_0.ItemsStruc_0.ItemNAAME.ToLower().Replace(" ", "") == ThisDir.Key.ToLower().Replace(" ", "") && ThisDir.Value)
if (ItemName == ThisDir.Key.Replace(" ", "") && ThisDir.Value)
{
if (Form1_0.ItemsStruc_0.ItemNAAME.Contains("Chipped") || Form1_0.ItemsStruc_0.ItemNAAME.Contains("Flawed")
|| Form1_0.ItemsStruc_0.ItemNAAME == "Topaz"
@ -79,98 +80,109 @@ namespace app
{
return true;
}
break;
}
}
//###############
foreach (var ThisDir in PickItemsNormal_ByName)
{
if (Form1_0.ItemsStruc_0.ItemNAAME.ToLower().Replace(" ", "") == Regex.Replace(ThisDir.Key.ToLower().Replace(" ", ""), @"[\d-]", string.Empty) && ThisDir.Value)
if (ItemName == Regex.Replace(ThisDir.Key, @"[\d-]", string.Empty) && ThisDir.Value)
{
bool SameQuality = true;
bool SameFlags = 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)
if (PickItemsNormal_ByName_Flags.ContainsKey(ThisDir.Key))
{
if (!Keeping && SameQuality) return true;
uint TotalFlags = 0;
foreach (var ThisList in PickItemsNormal_ByName_Flags[ThisDir.Key])
{
TotalFlags += ThisList.Key;
}
foreach (var ThisList in PickItemsNormal_ByName_Flags[ThisDir.Key])
{
SameFlags = Form1_0.ItemsFlags_0.IsItemSameFlags(ThisList.Value, TotalFlags, Form1_0.ItemsStruc_0.flags);
}
//Console.WriteLine(Form1_0.ItemsStruc_0.ItemNAAME + ":" + SameFlags);
}
else
if (SameQuality && SameFlags)
{
bool SameFlags = true;
bool SameStats = true;
if (PickItemsNormal_ByName_Flags.ContainsKey(ThisDir.Key))
if (!Form1_0.ItemsStruc_0.identified)
{
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);
if (!Keeping) return true;
}
if (PickItemsNormal_ByName_Stats.ContainsKey(ThisDir.Key))
else
{
foreach (var ThisDir2 in PickItemsNormal_ByName_Stats[ThisDir.Key])
bool SameStats = true;
if (PickItemsNormal_ByName_Stats.ContainsKey(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;
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;
}
}
}
//Console.WriteLine("---------------------");
if (SameFlags && SameQuality && SameStats) return true;
if (SameStats) return true;
}
}
//break;
}
}
//###############
foreach (var ThisDir in PickItemsNormal_ByType)
{
if (IsItemThisType(Regex.Replace(ThisDir.Key.ToLower().Replace(" ", ""), @"[\d-]", string.Empty)) && ThisDir.Value)
if (IsItemThisType(Regex.Replace(ThisDir.Key, @"[\d-]", string.Empty)) && ThisDir.Value)
{
bool SameQuality = true;
bool SameFlags = 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)
if (PickItemsNormal_ByType_Flags.ContainsKey(ThisDir.Key))
{
if (!Keeping && SameQuality) return true;
uint TotalFlags = 0;
foreach (var ThisList in PickItemsNormal_ByType_Flags[ThisDir.Key])
{
TotalFlags += ThisList.Key;
}
foreach (var ThisList in PickItemsNormal_ByType_Flags[ThisDir.Key])
{
SameFlags = Form1_0.ItemsFlags_0.IsItemSameFlags(ThisList.Value, TotalFlags, Form1_0.ItemsStruc_0.flags);
}
//Console.WriteLine(Form1_0.ItemsStruc_0.ItemNAAME + ":" + SameFlags);
}
else
if (SameQuality && SameFlags)
{
bool SameFlags = true;
bool SameStats = true;
if (PickItemsNormal_ByType_Flags.ContainsKey(ThisDir.Key))
if (!Form1_0.ItemsStruc_0.identified)
{
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);
if (!Keeping) return true;
}
if (PickItemsNormal_ByType_Stats.ContainsKey(ThisDir.Key))
else
{
foreach (var ThisDir2 in PickItemsNormal_ByType_Stats[ThisDir.Key])
bool SameStats = true;
if (PickItemsNormal_ByType_Stats.ContainsKey(ThisDir.Key))
{
if (!Form1_0.ItemsStruc_0.IsItemHaveSameStatMultiCheck(ThisDir2.Key, ThisDir2.Value, PickItemsNormal_ByType_Operators[ThisDir.Key][ThisDir2.Key])) SameStats = false;
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;
if (SameStats) return true;
}
}
//break;
}
}
//###############

View File

@ -9,6 +9,7 @@ using System.Runtime.InteropServices;
using System.Runtime.Remoting.Metadata.W3cXsd2001;
using System.Security.Policy;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
@ -80,9 +81,10 @@ namespace app
public List<long> BadItemsOnCursorIDList = new List<long>();
public bool HasGotTheBadItemOnCursor = false;
public List<long> BadItemsOnGroundPointerList = new List<long>();
public List<long> AvoidItemsOnGroundPointerList = new List<long>();
public void SetForm1(Form1 Form1_1)
{
Form1_0 = Form1_1;
@ -401,6 +403,8 @@ namespace app
GetUnitPathData();
GetStatsAddr();
if (IsIncludedInList(AvoidItemsOnGroundPointerList, ItemPointerLocation)) continue;
//Form1_0.method_1("ItemType: " + BitConverter.ToUInt32(itemdatastruc, 0).ToString() + ", TxtFileNo: " + BitConverter.ToUInt32(itemdatastruc, 4).ToString() + ", Name: " + ItemNAAME + ", Location: " + GetItemLocation(itemdatastruc[0x0C]));
//; itemLoc - 0 in inventory, 1 equipped, 2 in belt, 3 on ground, 4 cursor, 5 dropping, 6 socketed
@ -508,11 +512,11 @@ namespace app
}
else
{
if (dwOwnerId != 0 && Form1_0.MercStruc_0.MercOwnerID == 0)
/*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);
}
//Form1_0.MercStruc_0.MercOwnerID = ItemID;
Form1_0.method_1("owner: " + dwOwnerId.ToString("X") + ", ID: " + ItemID.ToString("X") + ", name: " + ItemNAAME + " - at: " + itemx + "," + itemy + " - " + equiploc, Color.DarkGreen);
}*/
}
}
if (itemdatastruc[0x0C] == 2)
@ -554,7 +558,7 @@ namespace app
File.Create(SavePathh).Dispose();
File.WriteAllBytes(SavePathh, itemdatastruc);*/
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, itemx, itemy);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, itemx, itemy);
if (ShouldPickPos(itemScreenPos))
{
int DiffXPlayer = itemx - Form1_0.PlayerScan_0.xPosFinal;
@ -579,13 +583,12 @@ namespace app
itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, itemx, itemy);
}
}
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
//##############################################
//##############################################
//detect bad items??
if (((itemx <= 0 && itemy <= 0)
|| (itemScreenPos["x"] <= 0 && itemScreenPos["y"] <= 0))
|| (itemScreenPos.X <= 0 && itemScreenPos.Y <= 0))
&& !IsIncludedInList(BadItemsOnGroundPointerList, ItemPointerLocation))
{
Form1_0.method_1("Added bad item 'OnGround':" + ItemNAAME, Color.OrangeRed);
@ -603,9 +606,9 @@ namespace app
//####
TriesToPickItemCount++;
Form1_0.KeyMouse_0.PressKeyHold(System.Windows.Forms.Keys.E);
//Form1_0.KeyMouse_0.MouseMoveTo_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]); //clic twice??
//Form1_0.KeyMouse_0.MouseMoveTo_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y); //clic twice??
Form1_0.KeyMouse_0.ReleaseKey(System.Windows.Forms.Keys.E);
if (ItemNAAME != LastPick)
@ -617,7 +620,7 @@ namespace app
//##############################################
//detect bad items??
/*if (((itemx <= 0 && itemy <= 0)
|| (itemScreenPos["x"] <= 0 && itemScreenPos["y"] <= 0))
|| (itemScreenPos.X <= 0 && itemScreenPos.Y <= 0))
&& !IsIncludedInList(BadItemsOnGroundPointerList, ItemPointerLocation))
{
Form1_0.method_1("Added bad item 'OnGround':" + ItemNAAME, Color.OrangeRed);
@ -654,6 +657,13 @@ namespace app
return true;
}
}
else
{
if (!IsItemPickingPotion() && !IsIncludedInList(AvoidItemsOnGroundPointerList, ItemPointerLocation))
{
AvoidItemsOnGroundPointerList.Add(ItemPointerLocation);
}
}
}
}
}
@ -663,6 +673,27 @@ namespace app
return false;
}
public bool IsItemPickingPotion()
{
bool IsItemPickingPotion = false;
string ThisItemName = Form1_0.ItemsStruc_0.ItemNAAME.Replace(" ", "");
foreach (var ThisDir in Form1_0.ItemsAlert_0.PickItemsPotions)
{
if (ThisItemName == Regex.Replace(ThisDir.Key.Replace(" ", ""), @"[\d-]", string.Empty) && ThisDir.Value)
{
if (ThisItemName.Contains("Healing")) IsItemPickingPotion = true;
if (ThisItemName.Contains("Mana")) IsItemPickingPotion = true;
if (ThisItemName.Contains("Rejuvenation")) IsItemPickingPotion = true;
if (ThisItemName.Contains("FullRejuvenation")) IsItemPickingPotion = true;
if (IsItemPickingPotion) break;
}
}
return IsItemPickingPotion;
}
public bool IsIncludedInList(List<long> IgnoredIDList, long ThisID)
{
if (IgnoredIDList != null)
@ -718,7 +749,7 @@ namespace app
Form1_0.UIScan_0.readUI();
if (ItemNAAME == ThisItemName && (!Form1_0.UIScan_0.leftMenu && !Form1_0.UIScan_0.rightMenu && !Form1_0.UIScan_0.fullMenu))
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, itemx, itemy);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, itemx, itemy);
if (ShouldPickPos(itemScreenPos))
{
int DiffXPlayer = itemx - Form1_0.PlayerScan_0.xPosFinal;
@ -744,11 +775,11 @@ namespace app
}
}
//####
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
TriesToPickItemCount++;
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
if (ItemNAAME != LastPick)
{
@ -863,7 +894,7 @@ namespace app
Form1_0.UIScan_0.readUI();
if (!Form1_0.UIScan_0.leftMenu && !Form1_0.UIScan_0.rightMenu && !Form1_0.UIScan_0.fullMenu)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, itemx, itemy);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, itemx, itemy);
if (ShouldPickPos(itemScreenPos))
{
//####
@ -894,8 +925,8 @@ namespace app
itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, itemx, itemy);
}
//####
itemScreenPos = Form1_0.Mover_0.FixMouseYPosition(itemScreenPos);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos["x"], itemScreenPos["y"]);
Form1_0.KeyMouse_0.MouseClicc_RealPos(itemScreenPos.X, itemScreenPos.Y);
if (ItemNAAME != LastPick)
{
@ -925,7 +956,7 @@ namespace app
Form1_0.UIScan_0.readUI();
if (!Form1_0.UIScan_0.leftMenu && !Form1_0.UIScan_0.rightMenu && !Form1_0.UIScan_0.fullMenu)
{
Dictionary<string, int> itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, itemx, itemy);
Position itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, itemx, itemy);
if (ShouldPickPos(itemScreenPos))
{
//####
@ -948,7 +979,7 @@ namespace app
itemScreenPos = Form1_0.GameStruc_0.World2Screen(Form1_0.PlayerScan_0.xPosFinal, Form1_0.PlayerScan_0.yPosFinal, itemx, itemy);
}
//####
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos["x"], itemScreenPos["y"]);
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos.X, itemScreenPos.Y);
if (ItemNAAME != LastPick)
{
@ -964,18 +995,18 @@ namespace app
return false;
}
public bool ShouldPickPos(Dictionary<string, int> itemScreenPos)
public bool ShouldPickPos(Position itemScreenPos)
{
if (CharConfig.UseTeleport && !Form1_0.Town_0.GetInTown())
{
if (itemScreenPos["x"] > 0 && itemScreenPos["y"] > 0) return true;
if (itemScreenPos.X > 0 && itemScreenPos.Y > 0) return true;
return false;
}
else
{
if (itemScreenPos["x"] > 0 && itemScreenPos["x"] < Form1_0.ScreenX
&& itemScreenPos["y"] > 0 && itemScreenPos["y"] < (Form1_0.ScreenY - Form1_0.ScreenYMenu))
if (itemScreenPos.X > 0 && itemScreenPos.X < Form1_0.ScreenX
&& itemScreenPos.Y > 0 && itemScreenPos.Y < (Form1_0.ScreenY - Form1_0.ScreenYMenu))
{
return true;
}
@ -1358,34 +1389,34 @@ namespace app
foreach (int i in Enum.GetValues(typeof(Enums.NonClassSkill)))
{
string EnumStr = Enum.GetName(typeof(Enums.NonClassSkill), i);
if (EnumStr.ToLower() == StatNammm.ToLower()) return (ushort)i;
if (EnumStr == StatNammm) return (ushort)i;
}
foreach (int i in Enum.GetValues(typeof(Enums.AddClassSkills)))
{
string EnumStr = Enum.GetName(typeof(Enums.AddClassSkills), i);
if (EnumStr.ToLower() == StatNammm.ToLower()) return (ushort)i;
if (EnumStr == StatNammm) return (ushort)i;
}
foreach (int i in Enum.GetValues(typeof(Enums.AddSkillTab)))
{
string EnumStr = Enum.GetName(typeof(Enums.AddSkillTab), i);
if (EnumStr.ToLower() == StatNammm.ToLower()) return (ushort) i;
if (EnumStr == StatNammm) return (ushort) i;
}
foreach (int i in Enum.GetValues(typeof(Enums.SingleSkill)))
{
string EnumStr = Enum.GetName(typeof(Enums.SingleSkill), i);
if (EnumStr.ToLower() == StatNammm.ToLower()) return (ushort)i;
if (EnumStr == StatNammm) return (ushort)i;
}
foreach (int i in Enum.GetValues(typeof(Enums.Aura)))
{
string EnumStr = Enum.GetName(typeof(Enums.Aura), i);
if (EnumStr.ToLower() == StatNammm.ToLower()) return (ushort)i;
if (EnumStr == StatNammm) return (ushort)i;
}
//Normal Stats
foreach (int i in Enum.GetValues(typeof(Enums.Attribute)))
{
string EnumStr = Enum.GetName(typeof(Enums.Attribute), i);
if (EnumStr.ToLower() == StatNammm.ToLower()) return (ushort) i;
if (EnumStr == StatNammm) return (ushort) i;
}
return 0;
}
@ -1396,7 +1427,7 @@ namespace app
foreach (int i in Enum.GetValues(typeof(Enums.NonClassSkill)))
{
string EnumStr = Enum.GetName(typeof(Enums.NonClassSkill), i);
if (EnumStr.ToLower() == StatNammm.ToLower())
if (EnumStr == StatNammm)
{
return 97;
}
@ -1404,7 +1435,7 @@ namespace app
foreach (int i in Enum.GetValues(typeof(Enums.AddClassSkills)))
{
string EnumStr = Enum.GetName(typeof(Enums.AddClassSkills), i);
if (EnumStr.ToLower() == StatNammm.ToLower())
if (EnumStr == StatNammm)
{
return 83;
}
@ -1412,7 +1443,7 @@ namespace app
foreach (int i in Enum.GetValues(typeof(Enums.AddSkillTab)))
{
string EnumStr = Enum.GetName(typeof(Enums.AddSkillTab), i);
if (EnumStr.ToLower() == StatNammm.ToLower())
if (EnumStr == StatNammm)
{
return 188;
}
@ -1420,7 +1451,7 @@ namespace app
foreach (int i in Enum.GetValues(typeof(Enums.SingleSkill)))
{
string EnumStr = Enum.GetName(typeof(Enums.SingleSkill), i);
if (EnumStr.ToLower() == StatNammm.ToLower())
if (EnumStr == StatNammm)
{
return 107;
}
@ -1428,7 +1459,7 @@ namespace app
foreach (int i in Enum.GetValues(typeof(Enums.Aura)))
{
string EnumStr = Enum.GetName(typeof(Enums.Aura), i);
if (EnumStr.ToLower() == StatNammm.ToLower())
if (EnumStr == StatNammm)
{
return 151;
}
@ -1440,7 +1471,7 @@ namespace app
foreach (int i in Enum.GetValues(typeof(Enums.Attribute)))
{
string EnumStr = Enum.GetName(typeof(Enums.Attribute), i);
if (EnumStr.ToLower() == StatNammm.ToLower())
if (EnumStr == StatNammm)
{
EnumIndex = EnumIndexing;
break;

View File

@ -11,6 +11,7 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using static app.Enums;
using static app.MapAreaStruc;
using System.Text.RegularExpressions;
namespace app
{
@ -95,7 +96,7 @@ namespace app
}
if (AllMapData[i].Objects[k].Type == "npc" && ObjectType == "npc")
{
if (((EnumsMobsNPC.MonsterType)(int.Parse(AllMapData[i].Objects[k].ID))).ToString().ToLower().Contains(ObjectName.ToLower()))
if (Regex.Replace(((EnumsMobsNPC.MonsterType)(int.Parse(AllMapData[i].Objects[k].ID))).ToString(), @"[\d-]", string.Empty) == ObjectName)
{
ThisPos.X = AllMapData[i].Offset.X + AllMapData[i].Objects[k].X;
ThisPos.Y = AllMapData[i].Offset.Y + AllMapData[i].Objects[k].Y;
@ -190,8 +191,8 @@ namespace app
}
if (AllMapData[i].Objects[k].Type == "npc" && ObjectType == "npc")
{
//Console.WriteLine("NPC: " + Form1_0.NPCStruc_0.getNPC_ID(int.Parse(AllMapData[i].Objects[k].ID)));
if ((((EnumsMobsNPC.MonsterType)(int.Parse(AllMapData[i].Objects[k].ID))).ToString().ToLower().Contains(ObjectName.ToLower()) && !IgnoreName)
//Console.WriteLine("NPC: " + ((EnumsMobsNPC.MonsterType)(int.Parse(AllMapData[i].Objects[k].ID))).ToString());
if ((Regex.Replace(((EnumsMobsNPC.MonsterType)(int.Parse(AllMapData[i].Objects[k].ID))).ToString(), @"[\d-]", string.Empty) == ObjectName && !IgnoreName)
|| IgnoreName)
{
ThisPos.X = AllMapData[i].Offset.X + AllMapData[i].Objects[k].X;
@ -287,7 +288,7 @@ namespace app
else
{
if ((Form1_0.ObjectsStruc_0.getObjectName(int.Parse(AllMapData[i].Objects[k].ID)) == ObjectName && !IgnoreName)
|| IgnoreName)
|| IgnoreName)
{
ThisPos.Add(new Position { X = AllMapData[i].Offset.X + AllMapData[i].Objects[k].X, Y = AllMapData[i].Offset.Y + AllMapData[i].Objects[k].Y });
@ -300,8 +301,7 @@ namespace app
}
if (AllMapData[i].Objects[k].Type == "npc" && ObjectType == "npc")
{
//Console.WriteLine("NPC: " + Form1_0.NPCStruc_0.getNPC_ID(int.Parse(AllMapData[i].Objects[k].ID)));
if ((((EnumsMobsNPC.MonsterType)(int.Parse(AllMapData[i].Objects[k].ID))).ToString().ToLower().Contains(ObjectName.ToLower()) && !IgnoreName)
if ((Regex.Replace(((EnumsMobsNPC.MonsterType)(int.Parse(AllMapData[i].Objects[k].ID))).ToString(), @"[\d-]", string.Empty) == ObjectName && !IgnoreName)
|| IgnoreName)
{
ThisPos.Add(new Position { X = AllMapData[i].Offset.X + AllMapData[i].Objects[k].X, Y = AllMapData[i].Offset.Y + AllMapData[i].Objects[k].Y });

View File

@ -88,21 +88,21 @@ namespace app
{
//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
//uint dwOwnerId = BitConverter.ToUInt32(Mercdatastruc, 8);
//if (dwOwnerId == MercOwnerID && MercOwnerID != 0)
//{
//SetHPFromStats();
/*string SavePathh = Form1_0.ThisEndPath + "DumpMercStruc" + MercCount;
File.Create(SavePathh).Dispose();
File.WriteAllBytes(SavePathh, statBuffer);*/
File.WriteAllBytes(SavePathh, Mercdatastruc);*/
/*byte[] buffff = new byte[144];
long pStatsListExPtr = BitConverter.ToInt64(Mercdatastruc, 0x10);
Form1_0.Mem_0.ReadRawMemory(pStatsListExPtr, ref buffff, 144);
long pStatsListExPtr = BitConverter.ToInt64(Mercdatastruc, 0x88);
Form1_0.Mem_0.ReadRawMemory(pStatsListExPtr, ref buffff, 500);
pStatsListExPtr = BitConverter.ToInt64(Mercdatastruc, 0x78);
Form1_0.Mem_0.ReadRawMemory(pStatsListExPtr, ref buffff, 144);
//pStatsListExPtr = BitConverter.ToInt64(buffff, 8);
//Form1_0.Mem_0.ReadRawMemory(pStatsListExPtr, ref buffff, 500);
//uint dwOwnerId = BitConverter.ToUInt32(buffff, 0x0c);
//uint flags = BitConverter.ToUInt32(buffff, 0x18);
@ -110,7 +110,7 @@ namespace app
File.Create(SavePathh2).Dispose();
File.WriteAllBytes(SavePathh2, buffff);*/
//Console.WriteLine(txtFileNo.ToString() + ", isUnique:" + isUnique + ", ownerID:" + dwOwnerId + ", mode:" + mode + ", pos:" + xPosFinal + ", " + yPosFinal);
//Console.WriteLine(txtFileNo.ToString() + ", isUnique:" + isUnique + ", ownerID:" + dwOwnerId.ToString("X") + ", mode:" + mode + ", pos:" + xPosFinal + ", " + yPosFinal);
//Console.WriteLine(flags);
//MercCount++;

View File

@ -33,6 +33,8 @@ namespace app
public uint statCountAll = 0;
public long statPtrAll = 0;
public byte[] statBufferAll = new byte[] { };
public byte[] pPathAll = new byte[144];
public long pPathPtrAll = 0;
public uint statCount = 0;
//public uint statExCount = 0;
@ -285,15 +287,15 @@ namespace app
//pPathPtr = BitConverter.ToInt64(mobsdatastruc, 0x38);
CurrentPointerBytes = new byte[8];
Form1_0.Mem_0.ReadRawMemory(MobsPointerLocation + 0x38, ref CurrentPointerBytes, CurrentPointerBytes.Length);
pPathPtr = BitConverter.ToInt64(CurrentPointerBytes, 0);
pPathPtrAll = BitConverter.ToInt64(CurrentPointerBytes, 0);
//pPath = new byte[144];
pPath = new byte[0x08];
Form1_0.Mem_0.ReadRawMemory(pPathPtr, ref pPath, pPath.Length);
pPathAll = new byte[0x08];
Form1_0.Mem_0.ReadRawMemory(pPathPtrAll, ref pPathAll, pPathAll.Length);
ushort itemx2 = BitConverter.ToUInt16(pPath, 0x02);
ushort itemy2 = BitConverter.ToUInt16(pPath, 0x06);
ushort xPosOffset = BitConverter.ToUInt16(pPath, 0x00);
ushort yPosOffset = BitConverter.ToUInt16(pPath, 0x04);
ushort itemx2 = BitConverter.ToUInt16(pPathAll, 0x02);
ushort itemy2 = BitConverter.ToUInt16(pPathAll, 0x06);
ushort xPosOffset = BitConverter.ToUInt16(pPathAll, 0x00);
ushort yPosOffset = BitConverter.ToUInt16(pPathAll, 0x04);
int xPosOffsetPercent = (xPosOffset / 65536); //get percentage
int yPosOffsetPercent = (yPosOffset / 65536); //get percentage
xPosFinalAll = (ushort)(itemx2 + xPosOffsetPercent);

View File

@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using static app.EnumsMobsNPC;
using static System.Diagnostics.DebuggableAttribute;
@ -114,8 +115,7 @@ namespace app
GetUnitPathData();
//Console.WriteLine((int)txtFileNo + " at: " + xPosFinal + ", " + yPosFinal);
if (((EnumsMobsNPC.MonsterType)((int)txtFileNo)).ToString().ToLower().Contains(MobName.ToLower()))
if (Regex.Replace(((EnumsMobsNPC.MonsterType)((int)txtFileNo)).ToString(), @"[\d-]", string.Empty) == MobName)
{
if (xPosFinal != 0 && yPosFinal != 0)
{

View File

@ -33,6 +33,7 @@ namespace app
public long StartIndexItem = long.MaxValue;
public long StartIndexItemLast = long.MaxValue;
public int ScanUnitsNumber = 2600;
//public int ScanUnitsNumber = 2048;
public int ScanUnitsNegativeOffset = 0;

View File

@ -22,12 +22,12 @@ namespace app
public void SetSkill(string Direction, int skill)
{
if (Direction.ToLower() == "left")
if (Direction == "Left")
{
LeftSkill = skill;
LeftSkillName = getSkillName(skill);
}
if (Direction.ToLower() == "right")
if (Direction == "Right")
{
RightSkill = skill;
RightSkillName = getSkillName(skill);

View File

@ -14,11 +14,11 @@
//#######################################
KeySkillAttack=F1
KeySkillAura=F2
KeySkillfastMoveAtTown=F9
KeySkillfastMoveAtTown=F8
KeySkillfastMoveOutsideTown=F7
KeySkillDefenseAura=F7
KeySkillDefenseAura=F6
KeySkillCastDefense=F5
KeySkillLifeAura=F4
KeySkillLifeAura=F3
PlayerAttackWithRightHand=false
@ -32,10 +32,10 @@ BeltPotTypeToHave=0,0,1,3
//#######################################
InventoryDontCheckItem=
{
0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1,
0,0,0,0,0,0,0,1,1,1
0,0,0,0,1,1,1,1,1,1,
0,0,0,0,1,1,1,1,1,1,
0,0,0,0,1,1,1,1,1,1,
0,0,0,0,1,1,1,1,1,1
}
//#######################################
@ -66,5 +66,5 @@ GambleGold=true
//#######################################
//MERC SETTINGS
//#######################################
UsingMerc=false
UsingMerc=true
MercTakeHPPotUnder=40

View File

@ -979,7 +979,7 @@ Perfect Diamond
[Name] == SmallCharm && [Quality] == magic && [ManaMax] >= 17
//[Name] == SmallCharm && [Quality] == magic && [FasterHitRecovery] >= 5
[Name] == SmallCharm && [Quality] == magic && [LifeMax]+[ManaMax] >= 20
[Name] == SmallCharm && [Quality] == magic && [PoisonMindamage] >= 100
[Name] == SmallCharm && [Quality] == magic && [PoisonMinDamage] >= 100
[Name] == SmallCharm && [Quality] == magic && [FireResist] >= 5
[Name] == SmallCharm && [Quality] == magic && [LightningResist] >= 5

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.