SRL Archive - Other Scripts

Farmville XP Farming 10g/Xp


goider

2009-10-29 12:59:26

So you have a full farm planted, and your sitting on 300k$… no need for useless decorations, trade it all for XP!

This simple script was concocted this morning before school and simply uses CoOrds that have worked for me. Moderately easy setup as I have forgotten how/didn't care to use constants in this script. The first version of this script I made didn't even use procedures so… *Blegh*

Setup is simple, make sure Farmville is set to NON-Fullscreen, use your dibber to get the (x, y) of where you want your plot to be-keep in mind where you have to click in order for that space to plow-I just made a large empty square of grass for ease of use. Then sub those coords into the first procedure named Plot.


program XP_Farmer;

//Hit "S" to stop

procedure Plot;
begin
Wait(500);
MoveMouse(91, 337); //Swap out this set of (x, y); for your plot location
Wait(400);
ClickMouse(91, 337, True); //Swap out this set of (x, y); for your plot location
Wait(700);
end;

procedure Plow;
begin
Wait(500);
MoveMouse(682, 509);
Wait(400);
ClickMouse(682, 509, True);
end;

procedure MarketClick;
begin
Wait(500);
MoveMouse(686, 565);
Wait(400);
ClickMouse(686, 565, True);
Wait(2000);
end;

procedure Soybean;
begin
Wait(500);
MoveMouse(173, 546);
Wait(1500);
ClickMouse(173, 546, True);
Wait(1500);
end;

procedure Shovel;
begin
MoveMouse(733, 498);
Wait(200);
ClickMouse(733, 498, True);
Wait(1500);
end;

procedure Accept;
begin
MoveMouse(293, 390);
Wait(200);
ClickMouse(293, 390, True);
Wait(1500);
end;

begin
Repeat
Plow
Plot
MarketClick
Soybean
Plot
Shovel
Plot
Accept
Until (IsKeyDown('s'))
end.

If someone wants to sub in my "fill in your stuff inside the procedure" for some constants and even add color finding for reliability (didn't even try because of repeat colors, better luck with DTMs or whatnot).

And if you couldn't tell I have lost any skill I had, but it is a a working script.

[-jesus-]

2009-10-29 16:09:30

From: goider

And if you couldn't tell I have lost any skill I had, but it is a a working script.


It's OK, I've forgotten everything also…

goider

2009-10-29 18:32:19

I think this could be a fun expiriment in "see what i remember-ology"going to make an effort to put in some color checking for failsafes because i kept having it bring up the "huy these seeds for Haiti" thing and getting stuck. a report would be cool too, OR i could just do it in AutoIt and give you guys the .exe and source… blegh

caused

2009-10-29 21:17:45

It's good to see the farmville botting going strong : D

BTW.: I have a better script that does the same. But it solves "randoms" and does not just wait preset times, but waits, till everything is ready.

you need your farmville like this for my script:

Don't mind all that uncommented and messy stuff xD… I'm too lazy to remove it right now!!


program New;
var
rice,i,cotton,okbutton,pumpkin,cherry,coinsDTM,wasteland,plottedfield,xw,xh,x,y : Integer;

procedure getfarmvilledimensions;
begin



end;

function ismarketscreen:boolean;
begin
result := FindColor(x,y,6017518,283,32,479,85);
end;

function buy(tab:string;subtab:string;WhatToBuy:String):boolean;
begin
result := false;
If not ismarketscreen then
begin
WriteLN('Market Screen not found');
exit;
end;

case lowercase(tab) of
'seeds' :
begin
ClickMouse(100,230,True);
wait(500);
case lowercase(subtab) of
'all': ClickMouse(165,260,True);
'fruits': ClickMouse(264,260,True);
'vegetables': ClickMouse(165,260,True);
'grains': ClickMouse(165,260,True);
'flowers': ClickMouse(165,260,True);
else
begin
WriteLn('Invalid SubOption');
Result := False;
exit;
end;
end;
end;
end;

Result := True;
end;


procedure zoom(ZoomIn:Boolean; HowOften:Integer);
var
zoominx, zoomout,i : integer;
begin
zoominx := DTMFromString('78DA639CC7C4C0600FC448E0FFFFFF0C20114' +
'608FB3FE35220CF0C554D998F26986684F2196700E5DD09A8990E' +
'9437475533A3321E55CD32A0BC2BA67B90D500002F2A11AD');
zoomout := DTMFromString('78DA63DCC9C4C0600FC448E0FFFFFF0C20114' +
'608FB3FE30120CF1C554D998F26986684F2190F01E5DD51D5D404' +
'EAA2AAD90494772560CE464CBBBE7DF984A2060056F4119D');
If ZoomIn then
begin
for i:=0 to HowOften do
begin
If FindDtm(zoominx,x,y,0,0,xw,xh) then
ClickMouse(x,y,True)
else
WriteLn('Could Not Find ZoomIn Icon');
end;
end else
begin
for i:=0 to HowOften do
begin
If FindDtm(zoomout,x,y,0,0,xw,xh) then
ClickMouse(x,y,True)
else
WriteLn('Could Not Find ZoomIn Icon');
end;
end;
FreeDTM(zoominx);
FreeDTM(zoomout);
end;

Function SetGraphics(Quality:string):Boolean;
var
hq,lq,x,y : integer;
begin
result := true;

okbutton := DTMFromString('78DA638C676460D809C448E0ED97FB0CAC401' +
'A24FA1F08186B81ACF5A86AA6EC7104D33051467722D458035947' +
'08A82926AC0600EF79128A');

hq := BitmapFromString(17, 13, 'beNrz0SzzQaAZlfF3L536jwrO7F' +
'nfnuSCrAyC6sPNgFL/cYNNs9rR1D+9e/0/IQA0E039ty+f3r18glX' +
'xleN7kHVBuEBdE/ICIeJAvSv7K4H+Qla5sCUHKA5xIUQ90K7dy6ZA' +
'FAAVw90MCQ2gYiAbaCbc/ZAAgWtB9iaaIFAlhAuxBWIjmi0Q38Ftg' +
'XCx+gWoHeh4eByh+QUeYkATsAY1UCWyXvLihbzYJy2NAQDSkOdC');

lq := BitmapFromString(14, 13, 'beNrz0SzzgaJkW0UbOQENfnZk5K' +
'omkuOiCldT6KEOFEFTg4xCDKUgysylePEogxsOUaYrzGkkzo1VjYO' +
'SEJwNVJzuqAxhA7VEmsoA3QxXADQtzlIOKA5UBnSAv54ERByoBu5+' +
'iAeBaoBsoFEQr8FVwpVhCkLMBPoO00yIy+FmYroTqAvoMHjYIrsTy' +
'AVqxxpWQAVwLcSHJ/FxRGy8AwCyl1Nm');

Case lowercase(Quality) of
'low' :
begin
If FindBitmap(hq,x,y) then
clickmouse(x,y,true)
else
result := false;
end;
'high' :
begin
If FindBitmap(lq,x,y) then
clickmouse(x,y,true)
else
result := false;
end;
end;

FreeBitmap(lq);
FreeBitmap(hq);

end;

Function HandleRandoms:Boolean;
var
x,y : integer;
begin


If FindColor(x,y,3819203,0,195,xw,xh) then
begin
WriteLn('Some Window Random.. Killing');
ClickMouse(x,y,True);
end;


If FindDtm(okbutton,x,y,0,0,xw,xh) then
begin
WriteLn('Ok Button Random');
ClickMouse(x,y,True)
exit;
end;
//facebook window
If FindColor(x,y,14203047,5,5,xw,xh) then
begin
WriteLN('Facebook Window Random');
ClickMouse(x,y,true);
result:=true;
exit;
end;



If FindDtm(coinsDTM,x,y,0,0,xw,xh) then
begin
WriteLn('BuyCoins Random Detected');
If FindColor(x,y,3819203,0,0,xw,xh) then
ClickMouse(x,y,True)
else
WriteLn('Could not solve Random');
end;

result:=false;
end;

begin
GetClientDimensions(xw,xh);
pumpkin := DTMFromString('78DA63FCC7CCC0A0C1C4800CD6F9308369462' +
'89FF13F90AF84AAE6603C3BAA1A66160606755435715D61A86A40' +
'76E9A0AA71B4914555F303A84615554D4E982A8A1A00CB4E09C0');


cherry := DTMFromString('78DA63F467666078CAC8800C761B488169982' +
'82348CD7D5435E65912A86A42816A1EA1AAE993604355E382A9C6' +
'C44700558D1F50CD0B54353EC5BA286A00DA7909FA');




cotton := DTMFromString('78DA63B466666078CAC8800C3C8C8CC0344C9' +
'411A4E621AA9AB400075435F64035CF50D584AB73A0AAB104AA79' +
'81A6C65401558D19A639B3BABA50D400009F270A3F');


rice := DTMFromString('78DA638C67646038C18002F46D8519B880345' +
'086E13F10302603590751D5589568826946281FAC06CD1CBB7071' +
'5435D140D61954359A5162A86A2280AC63A86A0CA2E451D40000C' +
'5C00D15');


wasteland := DTMFromString('78DA637CC3C8C060C2C4800CAA5384C034239' +
'4CFF815534D6A201FAA9A5740962EAA9ADC487E54350F812C4354' +
'3549FEBC98E658A2AA490F41B50B00CDF509C0');

plottedfield := DTMFromString('78DA635CC6C8C0F08B0105A468B1816946289' +
'F712990F505554D9E2E3BAA9AF940D64F54352DD602A86A960059' +
'FF51D5CC8CD54755B31ED33D5342D451D400008FC80C66');

coinsDTM := DTMFromString('78DA634C626460E004622470F7C515300D136' +
'5AC06B25850D584CE9880AA2610C86226A02600C8E24355F3FFEF' +
'535435A540162F7E730066DF0C24');

SetGraphics('low');
// zoom(false,4);

// buy('seeds','all','test');
{exp bot}
repeat
handlerandoms;

repeat
ClickMouse(687,505,True); //plowt
wait(100);
ClickMouse(348,258,True); //plow
wait(1100);
handlerandoms;
until FindColor(x,y,1063812,0,0,xw,xh);

Wait(1500);
repeat
handlerandoms;
ClickMouse(683,562,True); //market
wait(1200);
until ismarketscreen;
Wait(1500);

repeat
ClickMouse(173,546,True); //soy
wait(2500);
until not ismarketscreen;

ClickMouse(387,421,True); //plant
Wait(1500);

If FindColor(x,y,998027,0,0,xw,xh) then
repeat
ClickMouse(734,501,True); //del
wait(500);

ClickMouse(387,421,True);//del
wait(1500);
until findcolor(x,y,4308116,0,0,xw,xh);

ClickMouse(x,y,True); //del
Wait(1500);

handlerandoms;
until false;

//hay script
{ HandleRandoms;
repeat
repeat
HandleRandoms;
ClickMouse(714,667,True);
wait(1000);
until ismarketscreen;
//Select Decorations
repeat
HandleRandoms;
ClickMouse(468,231,True);
wait(1000);
ClickMouse(456,258,True);
wait(1000);
ClickMouse(205,464,True);
wait(2000);
until not ismarketscreen;

ClickMouse(395,493,True);
wait(100);
HandleRandoms;
ClickMouse(428,493,True);
wait(100);
HandleRandoms;
ClickMouse(407,500,True);
wait(100);
HandleRandoms;
ClickMouse(374,489,True);
wait(100);
HandleRandoms;
//Select Multitool

ClickMouse(668,616,True);
wait(100);
HandleRandoms;

for i:=0 to 4 do
begin
x:= 397;
y:= 477;
If FindColorSpiral(x,y,7270,0,0,xw,xh) then
begin
ClickMouse(x,y,True);
wait(50);
ClickMouse(x+5,y+30,true);
wait(2000);
ClickMouse(334,504,True);
wait(1000);
end;
HandleRandoms;
end;

until(false); }
{
repeat
if FindColor(x,y,470382,33,83,xw,xh) then
ClickMouse(x,y,True);

//HandleRandoms;
wait(15);
until(false);
}
end.

goider

2009-10-29 22:17:38

lol, i think i may try yours out, would work way better then mine… im not complaining though, easy levels are easy levels when trying to catch up to someone.