using System;
public System.Threading;
public static bool isAutoDTDN;
public static int getMapBamBoo = 27;
public static void AutoDTDN()
{
while (isAutoDTDN)
{
try
{
if (TileMap.mapID != getMapBamBoo)
{
XmapController.StartRunToMapId(getMapBamBoo);
}
else
{
Function.GotoNpc(25);//Không cần thiết
Thread.Sleep(500);
Service.gI().openMenu(25);
Thread.Sleep(250);
Service.gI().confirmMenu(25, 0);
}
}
catch (Exception)
{
}
}
Thread.Sleep(500);
if (TileMap.mapID == 53)
{
isAutoDTDN = false;
Note("Đã vào");
}
}
//Dùng lệnh bật tắt
//Chat:
if(text.Equals("dtdn"))
{
isAutoDTDN = !isAutoDTDN;
new Thread(AutoDTDN).Start();
}
//Thêm điều kiện dừng
public static string cant_go_this_area = "Bạn chưa thể đến khu vực này";
public static string five_new_members = "Bang hội phải có từ 5 thành viên mới được tham gia";
public static string passersby = "Chỉ tiếp các bang hội, miễn tiếp khách vãng lai";
public static string more_than_two_days = "Gia nhập bang hội trên 2 ngày mới được tham gia";
//Liên kết ở Class ChatPopup/onChatPopupMultiLine
public void Info(string text)
{
if (isAutoDTDN)
{
if (text.Equals(cant_go_this_area) || text.Equals(five_new_members) || text.Equals(InfoText.passersby) || text.Equals(more_than_two_days) || text.Equals(an_error_occurred))
{
isAutoDTDN = false;
Note(STOP);
}
}
}
Nhận xét
Đăng nhận xét