Hi peeps,
The quest starts if you soe/teleport to Elven Village, next to the GK in Gludio, soe to Dark Elven Village, or next to the quest npc.
The bot player will MAIL your main character every time it can send 5k adena. Replace "BT" with your other character.
var BreakMove: Boolean;
QuestItem: TL2Item;
Item: TL2Item;
Attacker: TL2Live;
procedure teleportEvt;
begin
if user.inrange(45246, 49737, -3094, 1500) then
begin
Print('System: Unstuck/SOE to Elven Village.');
Engine.MoveTo(45274, 49299, -3064);
Engine.MoveTo(45623, 48821, -3086);
Engine.MoveTo(45880, 49945, -3086);
Engine.MoveTo(45879, 50756, -3086);
Engine.SetTarget(30222); // Alshupes.
Engine.DlgOpen;
Engine.DlgSel('Quest'); Delay(500);
Engine.DlgOpen; Delay(500);
Engine.DlgSel('Quest'); Delay(500);
Engine.DlgSel('"Yes."'); Delay(500);
Engine.DlgSel('"Yes."');
end;
if user.inrange(11187, 16827, -4656, 500) then
begin
Print('System: Dark Elven to Gludio.');
Engine.MoveTo(10270, 16985, -4611);
Engine.MoveTo(9846, 15869, -4601);
Engine.MoveTo(9644, 15591, -4601);
Engine.SetTarget(30134); // Gatekeeper: Jasmine.
Engine.DlgOpen;
Engine.DlgSel('Move to another city');
Engine.DlgSel('Town of Gludio');
end;
if user.inrange(-14447, 123970, -3120, 500) then
begin
Print('System: Gludio to Elven.');
Engine.SetTarget(30256); // Gatekeeper: Bella.
Engine.DlgOpen;
Engine.DlgSel('Teleport');
Engine.DlgSel('Elven Village');
Engine.MoveTo(46888, 51429, -3002);
Engine.MoveTo(46966, 50784, -3022);
Engine.MoveTo(46693, 50588, -3086);
Engine.SetTarget(30222); // Alshupes.
Engine.DlgOpen; Delay(500);
Engine.DlgSel('Quest'); Delay(500);
Engine.DlgSel('"Yes."'); Delay(500);
end;
end;
procedure startQuestEvt;
begin
if user.inrange(45955, 50700,- 3056, 500) then
begin
Print('System: Mailing status:');
sendMailEvt;
Print('System: Starting the quest.');
Engine.SetTarget(30222); // Alshupes.
Engine.DlgOpen; Delay(500);
Engine.DlgSel('Quest'); Delay(500);
Engine.DlgSel('"Yes."'); Delay(500);
Engine.MoveTo(46693, 50588, -3086);
Engine.MoveTo(46966, 50784, -3022);
Engine.MoveTo(46888, 51429, -3002);
Engine.SetTarget(30146); // Gatekeeper: Mint.
Engine.DlgOpen;
Engine.DlgSel('Teleport');
Engine.DlgSel('Elven Forest (Lv. 8)');
end;
end;
procedure walkingEvt;
begin
if user.inrange(21352,51102,-3688, 500) then
begin
Print('System: Arrived in Elven Forest.');
Engine.FaceControl(0, false);
Engine.MoveTo(21782, 52154, -3641);
Engine.MoveTo(22417, 54455, -3637);
Engine.MoveTo(20748, 54928, -3586);
Engine.MoveTo(18910, 54935, -3667);
Engine.MoveTo(16599, 54858, -3735);
Engine.MoveTo(14911, 55489, -3690);
Engine.MoveTo(13912, 56353, -3596);
Engine.MoveTo(12622, 57875, -3455);
end;
end;
procedure questStatusEvt;
begin
if (Engine.QuestStatus(261, 1)) then
begin
Print('System: Quest status: 1');
if user.inrange(12622, 57875, -3455, 500) then
Engine.FaceControl(0, true);
Delay(10 * 1000); // 10 seconds.
end;
if (Engine.QuestStatus(261, 2)) then
begin
Print('System: Quest status: 2.');
Engine.FaceControl(0, false);
Engine.EnterText('/unstuck');
Delay(5 * 60000 + 10 * 1000); // 5 minutes + 10 seconds.
end;
end;
procedure deathEvt;
begin
while (Engine.Status <> lsOnline) do Delay(500);
if (User.Dead) then
begin
Print('System: Dead.');
Engine.FaceControl(0, false);
Engine.GoHome;
end;
end;
procedure sendMailEvt;
begin
if inventory.user.byid(57, item) and (item.count > 6100) then
begin
Engine.SendMail('BT','e','e ',([57, 5000]));
Print('System: 5000 adena was mailed to BT.');
end;
if not inventory.user.byid(57, item) and (item.count > 6100) then
Print('System: 6100 adena is needed to mail.');
end;
begin
Print('System: Looping the script.');
while true do
begin
deathEvt;
startQuestEvt;
walkingEvt;
teleportEvt;
questStatusEvt;
if Engine.Status = lsOffline then
Delay(10 * 1000); // 10 seconds.
end;
end.