Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program new;
- var
- socket : Integer;
- instanceJoinBitmap : Integer;
- skirmishBitmap : Integer;
- siegeOfGondamonBitmap : Integer;
- createBitmap : Integer;
- travelNowBitmap : Integer;
- continueQuestBitmap : Integer;
- endQuestBitmap : Integer;
- procedure FindAndClickBitmap(bitmap, tolerance : Integer);
- var
- x, y: Integer;
- ox, oy: Integer;
- w, h: Integer;
- begin
- while (FindBitmap(bitmap, x, y) = false) or ((x = 0) and (y = 0)) do
- begin
- Writeln('Searching for bitmap: ' + inttostr(tolerance));
- Sleep(1000);
- dec(tolerance);
- if tolerance < 0 then
- begin
- break;
- end
- end;
- GetBitmapSize(bitmap,w,h);
- if (x > 0) and (y > 0) then
- begin
- GetMousePos(ox,oy);
- x := x + (w/2);
- y := y + (h/2);
- Writeln('Bitmap found.. Clicking Bitmap: ' + inttostr(w) + '/' + inttostr(h) + ' (' + inttostr(x) + ', ' + inttostr(y) +')');
- MoveMouse(x,y);
- HoldMouse(x,y,mouse_Left);
- Wait(200);
- ReleaseMouse(x,y,mouse_left);
- MoveMouse(ox, oy);
- end
- end;
- procedure GondamonBegin;
- begin
- ActivateClient();
- FindAndClickBitmap(instanceJoinBitmap,100);
- Wait(1000);
- FindAndClickBitmap(skirmishBitmap,2);
- Wait(1000);
- FindAndClickBitmap(siegeOfGondamonBitmap,2);
- Wait(1000);
- FindAndClickBitmap(createBitmap,2);
- Wait(1000);
- FindAndClickBitmap(travelNowBitmap,2);
- Wait(1000);
- FindAndClickBitmap(continueQuestBitmap,100);
- end;
- procedure GondamonEnd;
- var
- x, y: Integer;
- begin
- FindAndClickBitmap(endQuestBitmap,3600);
- end;
- begin
- instanceJoinBitmap := LoadBitmap(ScriptPath + 'FINDCLICKINSTANCEJOIN.bmp');
- skirmishBitmap := LoadBitmap(ScriptPath + 'FINDCLICKSKIRMISH.bmp');
- siegeOfGondamonBitmap := LoadBitmap(ScriptPath +'FINDCLICKSIEGEOFGONDAMON.bmp');
- createBitmap := LoadBitmap(ScriptPath +'FINDCLICKCREATE.bmp');
- travelNowBitmap := LoadBitmap(ScriptPath + 'FINDCLICKTRAVELNOW.bmp');
- continueQuestBitmap := LoadBitmap(ScriptPath + 'FINDCLICKCONTINUEQUEST.bmp');
- endQuestBitmap := LoadBitmap(ScriptPath +'FINDCLICKTRAVELNOWEND.bmp');
- while true do
- begin
- Wait(5000);
- GondamonBegin();
- Wait(5000)
- GondamonEnd();
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement