- Рег
- 30 Сен 2017
- Сообщения
- 5
- Реакции
- 0
Пытался нарукожопить квест на нубл, в итоге дошел до 4 стадии 1й части. Почему-то 4ю стадию не хочет выполнять а бежит делать 1ю.
Может сможет кто подсказать в чем дело? Квест нужно взять персом и потом запускать скрипт.
function MoveToObj(Obj : TL2Spawn; Dist : Integer) : Boolean;
begin
Result := True;
if Engine.GetUser.DistTo(Obj) > abs(dist) then
Result := Engine.MoveTo(Obj, -Dist);
end;
function NpcDlg(ID : cardinal) : boolean;
const
Dist = 150;
begin
Engine.CancelTarget;
if Engine.SetTarget(ID) then
MoveToObj(Engine.GetUser.target, dist);
Result := Engine.DlgOpen;
if Result then
Engine.Delay(1000);
end;
function CheckItemCount (const itemID: Integer; const quest: Boolean = False) : Integer;
var tempItem: TL2Item;
begin
if quest then Inventory.Quest.ByID(itemID, tempItem)
else Inventory.User.ByID(itemID, tempItem);
Result := tempItem.Count;
end;
begin
while true do begin
if Engine.QuestStatus(241,1) then begin
delay (5000);
Engine.FaceControl(0,false);
delay (10000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('13');
delay (500);
Engine.BypassToServer('15a Player'); // баф
delay (500);
Engine.MoveTo(147464, 26056, -2000);
Engine.MoveTo(147176, 25816, -2000);
Engine.MoveTo(146792, 25784, -2000);
NpcDlg(30848); //npc элиза(ТП)
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(1);
delay(1000);
Engine.DlgSel(3);
delay(15000);
Engine.MoveTo(83240, 148216, -3392);
Engine.MoveTo(82952, 148424, -3456);
Engine.MoveTo(81768, 149592, -3456);
Engine.MoveTo(81400, 149704, -3448);
NpcDlg(30753); //npc габриэль
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(1);
delay(1000);
Engine.DlgSel(1);
delay(1000);
Engine.DlgSel(1);
delay(5000);
if Engine.QuestStatus(241,2) then begin
delay (5000);
Engine.FaceControl(0,false);
delay (10000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('117');
delay (500);
Engine.BypassToServer('19');
delay (500);
Engine.BypassToServer('1e'); // тп к гилмору(драгон валлей)
delay (15000);
NpcDlg(30754); //npc гилмор
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(2);
delay(1000);
Engine.DlgSel(1);
delay(1000);
Engine.DlgSel(1);
delay(10000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('117');
delay (500);
Engine.BypassToServer('112');
delay (500);
Engine.BypassToServer('1e'); // тп к пасеке
delay (15000);
Engine.MoveTo(34504, 187624, -2960);
Engine.MoveTo(34504, 187240, -3008);
Engine.MoveTo(33528, 186648, -3248);
Engine.MoveTo(32600, 186536, -3232);
Engine.MoveTo(29336, 186136, -3648);
Engine.MoveTo(29272, 186120, -3648);
Engine.MoveTo(25976, 186280, -3408);
Engine.MoveTo(25176, 186184, -3280);
Engine.MoveTo(23992, 186328, -3488);
Engine.MoveTo(22952, 186328, -3392);
Engine.MoveTo(21816, 186472, -3328);
Engine.MoveTo(21416, 186456, -3264);
Engine.MoveTo(20936, 186472, -3240);
Engine.MoveTo(20376, 186168, -3336);
Engine.MoveTo(19784, 185672, -3360);
Engine.MoveTo(19768, 185448, -3336);
Engine.MoveTo(20088, 185240, -3336);
Engine.MoveTo(20424, 185016, -3336);
Engine.MoveTo(20808, 184760, -3336);
Engine.MoveTo(20920, 184680, -3336);
engine.loadconfig('academ');//профиль
engine.ClearZone;
engine.loadzone('baraham');//зона, если есть
delay(1000);
while CheckItemCount(7587, True) < 1 do begin
delay(3000);
Engine.FaceControl(0,true);
end;
delay(5000);
end;
delay(500);
end;
if Engine.QuestStatus(241,3) then begin
delay (5000);
Engine.FaceControl(0,false);
delay (10000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('18');
delay (500);
Engine.BypassToServer('18'); // тп к алиену аден
delay (15000);
Engine.MoveTo(147544, 26728, -2192);
Engine.MoveTo(147720, 26376, -2128);
NpcDlg(31739); //npc аллиен
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(1);
delay(1000);
Engine.DlgSel(1);
delay(15000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('1d');
delay (500);
Engine.BypassToServer('1a'); // тп в хейн гросери
delay (15000);
NpcDlg(31739); //npc кантрабион
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(2);
delay(1000);
Engine.DlgSel(1);
delay(15000);
Engine.DlgSel(1);
delay(15000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('13');
delay (500);
Engine.BypassToServer('15b Player');
delay (500);
Engine.BypassToServer('159'); // бафф мага
delay (5000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('117');
delay (500);
Engine.BypassToServer('19');
delay (500);
Engine.BypassToServer('1e'); // тп в ДВ
delay (5000);
if (not user.InRange(75976, 109304, -2608, 3000, 400))
then begin
Engine.MoveTo(72888, 118216, -3688);
Engine.MoveTo(72088, 116040, -3696);
Engine.MoveTo(71480, 114120, -3712);
Engine.MoveTo(71320, 112296, -3696);
Engine.MoveTo(71272, 110312, -3712);
Engine.MoveTo(71176, 108696, -3712);
Engine.MoveTo(71112, 106680, -3712);
Engine.MoveTo(71176, 104952, -3664);
Engine.MoveTo(71448, 102952, -3696);
Engine.MoveTo(72024, 101448, -3688);
Engine.MoveTo(72472, 99912, -3600);
Engine.MoveTo(74040, 100168, -3144);
Engine.MoveTo(75320, 101752, -3072);
Engine.MoveTo(76280, 102808, -3088);
Engine.MoveTo(76360, 103720, -3072);
Engine.MoveTo(75816, 105640, -2848);
Engine.MoveTo(75768, 107144, -2768);
Engine.MoveTo(75896, 108312, -2640);
Engine.MoveTo(75976, 109304, -2608);
engine.loadconfig('succub');//профиль - настроить под перса, поставить свой
engine.ClearZone;
engine.loadzone('succub');//зона
delay(1000);
while CheckItemCount(7597, True) < 10 do begin
delay(3000);
Engine.FaceControl(0,true);
if User.Dead then begin
Engine.FaceControl(0,false);
Engine.gohome;
break;
end;
end;
delay(500);
end;
delay(500);
end;
while CheckItemCount(7597, True) = 10 do begin
Engine.FaceControl(0,false);
delay (5000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('1d');
delay (500);
Engine.BypassToServer('1a'); // тп в хейн гросери
delay (15000);
NpcDlg(31739); //npc кантрабион
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(2);
delay(1000);
Engine.DlgSel(1);
delay(15000);
Engine.DlgSel(1);
delay(1000);
end;
delay(500);
end;
if Engine.QuestStatus(241,4) then begin
delay (5000);
Engine.FaceControl(0,false);
delay (10000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('13');
delay (500);
Engine.BypassToServer('15b Player');
delay (500);
Engine.BypassToServer('159'); // бафф мага
delay (5000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('18');
delay (500);
Engine.BypassToServer('18'); // тп к алиену аден
delay (15000);
Engine.MoveTo(147544, 26728, -2192);
Engine.MoveTo(147720, 26376, -2128);
NpcDlg(31739); //npc аллиен
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(1);
delay(1000);
Engine.DlgSel(1);
delay(15000);
delay(500);
end;
end.
Может сможет кто подсказать в чем дело? Квест нужно взять персом и потом запускать скрипт.
function MoveToObj(Obj : TL2Spawn; Dist : Integer) : Boolean;
begin
Result := True;
if Engine.GetUser.DistTo(Obj) > abs(dist) then
Result := Engine.MoveTo(Obj, -Dist);
end;
function NpcDlg(ID : cardinal) : boolean;
const
Dist = 150;
begin
Engine.CancelTarget;
if Engine.SetTarget(ID) then
MoveToObj(Engine.GetUser.target, dist);
Result := Engine.DlgOpen;
if Result then
Engine.Delay(1000);
end;
function CheckItemCount (const itemID: Integer; const quest: Boolean = False) : Integer;
var tempItem: TL2Item;
begin
if quest then Inventory.Quest.ByID(itemID, tempItem)
else Inventory.User.ByID(itemID, tempItem);
Result := tempItem.Count;
end;
begin
while true do begin
if Engine.QuestStatus(241,1) then begin
delay (5000);
Engine.FaceControl(0,false);
delay (10000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('13');
delay (500);
Engine.BypassToServer('15a Player'); // баф
delay (500);
Engine.MoveTo(147464, 26056, -2000);
Engine.MoveTo(147176, 25816, -2000);
Engine.MoveTo(146792, 25784, -2000);
NpcDlg(30848); //npc элиза(ТП)
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(1);
delay(1000);
Engine.DlgSel(3);
delay(15000);
Engine.MoveTo(83240, 148216, -3392);
Engine.MoveTo(82952, 148424, -3456);
Engine.MoveTo(81768, 149592, -3456);
Engine.MoveTo(81400, 149704, -3448);
NpcDlg(30753); //npc габриэль
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(1);
delay(1000);
Engine.DlgSel(1);
delay(1000);
Engine.DlgSel(1);
delay(5000);
if Engine.QuestStatus(241,2) then begin
delay (5000);
Engine.FaceControl(0,false);
delay (10000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('117');
delay (500);
Engine.BypassToServer('19');
delay (500);
Engine.BypassToServer('1e'); // тп к гилмору(драгон валлей)
delay (15000);
NpcDlg(30754); //npc гилмор
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(2);
delay(1000);
Engine.DlgSel(1);
delay(1000);
Engine.DlgSel(1);
delay(10000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('117');
delay (500);
Engine.BypassToServer('112');
delay (500);
Engine.BypassToServer('1e'); // тп к пасеке
delay (15000);
Engine.MoveTo(34504, 187624, -2960);
Engine.MoveTo(34504, 187240, -3008);
Engine.MoveTo(33528, 186648, -3248);
Engine.MoveTo(32600, 186536, -3232);
Engine.MoveTo(29336, 186136, -3648);
Engine.MoveTo(29272, 186120, -3648);
Engine.MoveTo(25976, 186280, -3408);
Engine.MoveTo(25176, 186184, -3280);
Engine.MoveTo(23992, 186328, -3488);
Engine.MoveTo(22952, 186328, -3392);
Engine.MoveTo(21816, 186472, -3328);
Engine.MoveTo(21416, 186456, -3264);
Engine.MoveTo(20936, 186472, -3240);
Engine.MoveTo(20376, 186168, -3336);
Engine.MoveTo(19784, 185672, -3360);
Engine.MoveTo(19768, 185448, -3336);
Engine.MoveTo(20088, 185240, -3336);
Engine.MoveTo(20424, 185016, -3336);
Engine.MoveTo(20808, 184760, -3336);
Engine.MoveTo(20920, 184680, -3336);
engine.loadconfig('academ');//профиль
engine.ClearZone;
engine.loadzone('baraham');//зона, если есть
delay(1000);
while CheckItemCount(7587, True) < 1 do begin
delay(3000);
Engine.FaceControl(0,true);
end;
delay(5000);
end;
delay(500);
end;
if Engine.QuestStatus(241,3) then begin
delay (5000);
Engine.FaceControl(0,false);
delay (10000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('18');
delay (500);
Engine.BypassToServer('18'); // тп к алиену аден
delay (15000);
Engine.MoveTo(147544, 26728, -2192);
Engine.MoveTo(147720, 26376, -2128);
NpcDlg(31739); //npc аллиен
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(1);
delay(1000);
Engine.DlgSel(1);
delay(15000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('1d');
delay (500);
Engine.BypassToServer('1a'); // тп в хейн гросери
delay (15000);
NpcDlg(31739); //npc кантрабион
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(2);
delay(1000);
Engine.DlgSel(1);
delay(15000);
Engine.DlgSel(1);
delay(15000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('13');
delay (500);
Engine.BypassToServer('15b Player');
delay (500);
Engine.BypassToServer('159'); // бафф мага
delay (5000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('117');
delay (500);
Engine.BypassToServer('19');
delay (500);
Engine.BypassToServer('1e'); // тп в ДВ
delay (5000);
if (not user.InRange(75976, 109304, -2608, 3000, 400))
then begin
Engine.MoveTo(72888, 118216, -3688);
Engine.MoveTo(72088, 116040, -3696);
Engine.MoveTo(71480, 114120, -3712);
Engine.MoveTo(71320, 112296, -3696);
Engine.MoveTo(71272, 110312, -3712);
Engine.MoveTo(71176, 108696, -3712);
Engine.MoveTo(71112, 106680, -3712);
Engine.MoveTo(71176, 104952, -3664);
Engine.MoveTo(71448, 102952, -3696);
Engine.MoveTo(72024, 101448, -3688);
Engine.MoveTo(72472, 99912, -3600);
Engine.MoveTo(74040, 100168, -3144);
Engine.MoveTo(75320, 101752, -3072);
Engine.MoveTo(76280, 102808, -3088);
Engine.MoveTo(76360, 103720, -3072);
Engine.MoveTo(75816, 105640, -2848);
Engine.MoveTo(75768, 107144, -2768);
Engine.MoveTo(75896, 108312, -2640);
Engine.MoveTo(75976, 109304, -2608);
engine.loadconfig('succub');//профиль - настроить под перса, поставить свой
engine.ClearZone;
engine.loadzone('succub');//зона
delay(1000);
while CheckItemCount(7597, True) < 10 do begin
delay(3000);
Engine.FaceControl(0,true);
if User.Dead then begin
Engine.FaceControl(0,false);
Engine.gohome;
break;
end;
end;
delay(500);
end;
delay(500);
end;
while CheckItemCount(7597, True) = 10 do begin
Engine.FaceControl(0,false);
delay (5000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('1d');
delay (500);
Engine.BypassToServer('1a'); // тп в хейн гросери
delay (15000);
NpcDlg(31739); //npc кантрабион
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(2);
delay(1000);
Engine.DlgSel(1);
delay(15000);
Engine.DlgSel(1);
delay(1000);
end;
delay(500);
end;
if Engine.QuestStatus(241,4) then begin
delay (5000);
Engine.FaceControl(0,false);
delay (10000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('13');
delay (500);
Engine.BypassToServer('15b Player');
delay (500);
Engine.BypassToServer('159'); // бафф мага
delay (5000);
Engine.BypassToServer('_bbshome');
delay (500);
Engine.BypassToServer('16');
delay (500);
Engine.BypassToServer('18');
delay (500);
Engine.BypassToServer('18'); // тп к алиену аден
delay (15000);
Engine.MoveTo(147544, 26728, -2192);
Engine.MoveTo(147720, 26376, -2128);
NpcDlg(31739); //npc аллиен
Engine.DlgOpen();
delay(1000);
Engine.DlgSel(1);
delay(1000);
Engine.DlgSel(1);
delay(15000);
delay(500);
end;
end.