2024-03-30 00:16:39 -07:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using static app.MapAreaStruc;
|
|
|
|
|
|
|
|
|
|
namespace app
|
|
|
|
|
{
|
|
|
|
|
public class LostCityRush
|
|
|
|
|
{
|
|
|
|
|
Form1 Form1_0;
|
|
|
|
|
|
|
|
|
|
public int CurrentStep = 0;
|
|
|
|
|
public bool ScriptDone = false;
|
|
|
|
|
public Position ChestPos = new Position { X = 0, Y = 0 };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void SetForm1(Form1 form1_1)
|
|
|
|
|
{
|
|
|
|
|
Form1_0 = form1_1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void ResetVars()
|
|
|
|
|
{
|
|
|
|
|
CurrentStep = 0;
|
|
|
|
|
ScriptDone = false;
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-05 21:50:39 -07:00
|
|
|
|
public void DetectCurrentStep()
|
|
|
|
|
{
|
|
|
|
|
if ((Enums.Area)Form1_0.PlayerScan_0.levelNo == Enums.Area.LostCity) CurrentStep = 1;
|
|
|
|
|
if ((Enums.Area)Form1_0.PlayerScan_0.levelNo == Enums.Area.ValleyOfSnakes) CurrentStep = 2;
|
|
|
|
|
if ((Enums.Area)Form1_0.PlayerScan_0.levelNo == Enums.Area.ClawViperTempleLevel1) CurrentStep = 3;
|
|
|
|
|
if ((Enums.Area)Form1_0.PlayerScan_0.levelNo == Enums.Area.ClawViperTempleLevel2) CurrentStep = 4;
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-30 00:16:39 -07:00
|
|
|
|
public void RunScript()
|
|
|
|
|
{
|
2024-04-05 21:50:39 -07:00
|
|
|
|
Form1_0.Town_0.ScriptTownAct = 2; //set to town act 5 when running this script
|
2024-03-30 00:16:39 -07:00
|
|
|
|
|
|
|
|
|
if (Form1_0.Town_0.GetInTown())
|
|
|
|
|
{
|
|
|
|
|
Form1_0.SetGameStatus("GO TO WP");
|
|
|
|
|
CurrentStep = 0;
|
|
|
|
|
|
|
|
|
|
Form1_0.Town_0.GoToWPArea(2, 5);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (CurrentStep == 0)
|
|
|
|
|
{
|
|
|
|
|
Form1_0.SetGameStatus("DOING LOST CITY (AMMY)");
|
2024-04-18 18:51:45 -07:00
|
|
|
|
//Form1_0.Battle_0.CastDefense();
|
|
|
|
|
//Form1_0.WaitDelay(15);
|
2024-03-30 00:16:39 -07:00
|
|
|
|
|
|
|
|
|
if ((Enums.Area) Form1_0.PlayerScan_0.levelNo == Enums.Area.LostCity)
|
|
|
|
|
{
|
2024-04-05 21:50:39 -07:00
|
|
|
|
Form1_0.Town_0.SpawnTP();
|
2024-04-18 18:51:45 -07:00
|
|
|
|
Form1_0.WaitDelay(15);
|
|
|
|
|
Form1_0.Battle_0.CastDefense();
|
2024-03-30 00:16:39 -07:00
|
|
|
|
CurrentStep++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
2024-04-05 21:50:39 -07:00
|
|
|
|
DetectCurrentStep();
|
|
|
|
|
if (CurrentStep == 0) Form1_0.Town_0.GoToTown();
|
2024-03-30 00:16:39 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CurrentStep == 1)
|
|
|
|
|
{
|
2024-04-14 18:51:35 -07:00
|
|
|
|
//####
|
|
|
|
|
if (Form1_0.PlayerScan_0.levelNo == (int)Enums.Area.ValleyOfSnakes)
|
|
|
|
|
{
|
|
|
|
|
CurrentStep++;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//####
|
|
|
|
|
|
2024-04-05 21:50:39 -07:00
|
|
|
|
Form1_0.PathFinding_0.MoveToNextArea(Enums.Area.ValleyOfSnakes);
|
2024-03-30 00:16:39 -07:00
|
|
|
|
CurrentStep++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (CurrentStep == 2)
|
|
|
|
|
{
|
2024-04-14 18:51:35 -07:00
|
|
|
|
//####
|
|
|
|
|
if (Form1_0.PlayerScan_0.levelNo == (int)Enums.Area.ClawViperTempleLevel1)
|
|
|
|
|
{
|
|
|
|
|
CurrentStep++;
|
|
|
|
|
return;
|
|
|
|
|
}
|
2024-03-30 00:16:39 -07:00
|
|
|
|
if (Form1_0.PlayerScan_0.levelNo != (int)Enums.Area.ValleyOfSnakes)
|
|
|
|
|
{
|
|
|
|
|
CurrentStep--;
|
|
|
|
|
return;
|
2024-04-05 21:50:39 -07:00
|
|
|
|
}
|
2024-04-14 18:51:35 -07:00
|
|
|
|
//####
|
2024-03-30 00:16:39 -07:00
|
|
|
|
|
2024-04-05 21:50:39 -07:00
|
|
|
|
Form1_0.PathFinding_0.MoveToExit(Enums.Area.ClawViperTempleLevel1);
|
2024-03-30 00:16:39 -07:00
|
|
|
|
CurrentStep++;
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-05 21:50:39 -07:00
|
|
|
|
if (CurrentStep == 3)
|
2024-03-30 00:16:39 -07:00
|
|
|
|
{
|
2024-04-14 18:51:35 -07:00
|
|
|
|
//####
|
|
|
|
|
if (Form1_0.PlayerScan_0.levelNo == (int)Enums.Area.ClawViperTempleLevel2)
|
|
|
|
|
{
|
|
|
|
|
CurrentStep++;
|
|
|
|
|
return;
|
|
|
|
|
}
|
2024-03-30 00:16:39 -07:00
|
|
|
|
if (Form1_0.PlayerScan_0.levelNo != (int)Enums.Area.ClawViperTempleLevel1)
|
|
|
|
|
{
|
|
|
|
|
CurrentStep--;
|
|
|
|
|
return;
|
|
|
|
|
}
|
2024-04-14 18:51:35 -07:00
|
|
|
|
//####
|
2024-03-30 00:16:39 -07:00
|
|
|
|
|
2024-04-05 21:50:39 -07:00
|
|
|
|
Form1_0.PathFinding_0.MoveToExit(Enums.Area.ClawViperTempleLevel2);
|
2024-03-30 00:16:39 -07:00
|
|
|
|
CurrentStep++;
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-05 21:50:39 -07:00
|
|
|
|
if (CurrentStep == 4)
|
2024-03-30 00:16:39 -07:00
|
|
|
|
{
|
2024-04-14 18:51:35 -07:00
|
|
|
|
//####
|
2024-03-30 00:16:39 -07:00
|
|
|
|
if (Form1_0.PlayerScan_0.levelNo != (int)Enums.Area.ClawViperTempleLevel2)
|
|
|
|
|
{
|
|
|
|
|
CurrentStep--;
|
|
|
|
|
return;
|
|
|
|
|
}
|
2024-04-14 18:51:35 -07:00
|
|
|
|
//####
|
2024-03-30 00:16:39 -07:00
|
|
|
|
|
2024-04-05 21:50:39 -07:00
|
|
|
|
ChestPos = Form1_0.MapAreaStruc_0.GetPositionOfObject("object", "TaintedSunAltar", (int) Enums.Area.ClawViperTempleLevel2, new List<int>());
|
2024-03-30 00:16:39 -07:00
|
|
|
|
if (ChestPos.X != 0 && ChestPos.Y != 0)
|
|
|
|
|
{
|
2024-04-05 21:50:39 -07:00
|
|
|
|
Form1_0.PathFinding_0.MoveToThisPos(ChestPos);
|
2024-03-30 00:16:39 -07:00
|
|
|
|
|
|
|
|
|
//repeat clic on chest
|
|
|
|
|
/*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);
|
|
|
|
|
Form1_0.KeyMouse_0.MouseClicc(itemScreenPos["x"], itemScreenPos["y"]);
|
|
|
|
|
Form1_0.PlayerScan_0.GetPositions();
|
|
|
|
|
tryyy++;
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Form1_0.Town_0.TPSpawned = false;
|
|
|
|
|
CurrentStep++;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Form1_0.method_1("Ammy location not detected!", Color.Red);
|
|
|
|
|
|
|
|
|
|
Form1_0.Town_0.TPSpawned = false;
|
|
|
|
|
CurrentStep++;
|
|
|
|
|
//ScriptDone = true;
|
|
|
|
|
//return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-05 21:50:39 -07:00
|
|
|
|
if (CurrentStep == 5)
|
2024-03-30 00:16:39 -07:00
|
|
|
|
{
|
2024-04-05 21:50:39 -07:00
|
|
|
|
if (!Form1_0.Town_0.TPSpawned) Form1_0.Town_0.SpawnTP();
|
2024-03-30 00:16:39 -07:00
|
|
|
|
|
|
|
|
|
CurrentStep++;
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-05 21:50:39 -07:00
|
|
|
|
if (CurrentStep == 6)
|
2024-03-30 00:16:39 -07:00
|
|
|
|
{
|
|
|
|
|
Form1_0.SetGameStatus("Ammy waiting on leecher");
|
|
|
|
|
|
|
|
|
|
Form1_0.Battle_0.DoBattleScript(25);
|
|
|
|
|
|
|
|
|
|
//get leecher infos
|
|
|
|
|
Form1_0.PlayerScan_0.GetLeechPositions();
|
|
|
|
|
|
|
|
|
|
if (Form1_0.PlayerScan_0.LeechlevelNo == (int)Enums.Area.ClawViperTempleLevel2)
|
|
|
|
|
{
|
|
|
|
|
CurrentStep++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-05 21:50:39 -07:00
|
|
|
|
if (CurrentStep == 7)
|
2024-03-30 00:16:39 -07:00
|
|
|
|
{
|
|
|
|
|
Form1_0.SetGameStatus("Ammy waiting on leecher #2");
|
|
|
|
|
|
|
|
|
|
Form1_0.Battle_0.DoBattleScript(25);
|
|
|
|
|
|
|
|
|
|
//get leecher infos
|
|
|
|
|
Form1_0.PlayerScan_0.GetLeechPositions();
|
|
|
|
|
|
|
|
|
|
if (Form1_0.PlayerScan_0.LeechlevelNo == (int)Enums.Area.LutGholein)
|
|
|
|
|
{
|
2024-04-05 21:50:39 -07:00
|
|
|
|
Form1_0.Town_0.UseLastTP = false;
|
2024-03-30 00:16:39 -07:00
|
|
|
|
ScriptDone = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|