PDA

View Full Version : Dung Resource Map/Wil Chop&Burn



EtherFreak
12-15-2010, 07:57 PM
I am thinkin of making a dung resorce maple & willow cutter, and burner. It would chop down the tree, and burn it, and repeat. I might also consider adding banking in al kahard. Would you want and or use this script?

doublex8
12-15-2010, 08:25 PM
Hmm appears I am the first to vote.

Yes I would definatly use this for whichever be it chop n' burn or bank. If you need help, I am going to commit most of my winter break to learning how to script so I would love to help anyway I can.

EDIT: Didn't see that last option. I would definatly not use it if it didn't have any anti random

blulightning
12-15-2010, 09:06 PM
DEFINITELY needs anti random. No one will use it otherwise.

Shuttleu
12-15-2010, 09:59 PM
think of it this way
whether people will use it or not, its good to make it for the learning or experience

the only way to truly learn is to make something and use what you have learnt and expand from that

~shut

EtherFreak
12-17-2010, 11:10 PM
So, i have a beta together. the cutting is working well, and the burner seems to be working without any issues. the walking from the bank is working ok, but the walking to the bank is giving me grief.

you can start out in the cutting resource, or al kaharid bank, and click run. Axe MUST be equipped, and if you want to burn, you need a tinderbox in inv slot 1.

please leave feedback to the issues encountered, details are preferred.



program Daemapwil;
//{.Include SRL\SRL\Misc\SMART.SCAR}
{.include SRL/SRL.scar}

Const

// ----------------SETUP-----------------------------
// start out in Al Kharid Bank
// maple color 2572922, willow color 3169612
TreeColor=2572922 ; //color picker for tree
shipmaster= 4872837 ;//color unique to the shipmaster
Dung=2438909 ;//color of dungon entrance
treeuptext='ple' ; //'low' or 'ple'
loadcount= 10 ; //total loads to complete
threelet='' ;//2-4th letters of name. I.E. Johntrucker='ohn'
borb=0 ; // bank=0 burn=1
// ---------------END SETUP----------------------------------------

var
x, y, leng: integer;
count,mwtime: integer;
icount, ecount:integer;
kill: integer;
TPA:TPointArray;
ATPA:T2DPointArray;
I: Integer;
counter: Integer;


procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
// ----------------SETUP-----------------------------
Name := '';
Pass := '';
Nick := '';
Active := True;

end;
end;
// ---------------END SETUP----------------------------------------

Procedure findshipmaster;
begin
findcolortolerance(x,y,shipmaster,MSX1,MSY1,MSX2,M SY2,4);
mmouse(x,y,5,5);
wait(200);
getmousepos(x,y);
if ( WaitUpTextMulti(['Fre', 'nik'], 200) ) then
begin
mouse(x,y,1,1,false);
wait(200);
FindText(x, y, 'Sail', UpChars, msx1, msy1, msx2, msy2);
wait(200);
mouse((18+x),(y+2),16,2,true);
wait(6000+random(2000));
end else
begin
kill:=kill+1;
writeln('could not find shipmaster');
if kill<9 then
begin
writeln('trying again');
findshipmaster;
end;
kill:=0;
exit;
end;
wait(3000);
end;

procedure opendung;
begin
findcolortolerance(x,y,Dung,MSX1,MSY1,MSX2,MSY2,12 );
mmouse(x,y,5,5);
wait(200);
getmousepos(x,y);
if ( WaitUpTextMulti(['Ent', 'Mys','ent'], 200) ) then
mouse(x,y,1,1,true) else
begin
writeln('could not find dungen');
kill:=kill+1;
if kill<9 then
begin
writeln('trying again');
opendung;
end;
kill:=0;
exit;
end;
wait(4000+random(1000));
end;

procedure findtreetpa;
begin
mousespeed:=(7+random(3));
FindColorsTolerance(TPA, TreeColor, MSX1, MSY1, MSX2, MSY2,6);
ATPA := TPAToATPAEx(TPA, 40, 40);
end;

procedure gettreexy;
begin
if ( Length(ATPA)=0 ) then
exit;
SortATPAFrom(ATPA, Point(MSCX, MSCY));
MiddleTPAEx(ATPA[i], x, y);
end;


procedure clicktree;
begin
MMouse(x, y, 20, 20);
MMouse(x, y, 8, 8);
wait(random(300)+300);
getmousepos(x,y);
begin
if ( WaitUpTextMulti([Treeuptext], 200) ) then
begin
writeln('Clicking tree');
Mouse(x,y,1,1,true);
end else
exit;
end;
end;


procedure initrun;
begin
wait(200);
Smart_Members := True;
Smart_Server := 77;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
counter:=0;
icount:=0
kill:=0;
count:=0;
wait(5000);
SetAngle(true);
SymbolAccuracy := 0.5;
end;

procedure findtreetpachop;
begin
mousespeed:=(7+random(3));
FindColorsTolerance(TPA, TreeColor, 180,100,300,220,6);
ATPA := TPAToATPAEx(TPA, 40, 40);
end;

procedure activechop;
begin
wait(5000);
if IsChatBoxTextBetween('swing',clblack,7,8) then
begin
writeln('Chopping down a tree');
findtreetpachop;
leng:=length(ATPA);
repeat //checking to see if a log was cut
wait(1000);
if random(60)=10 then
begin
writeln('checkin woodcutting stat');
HoverSkill('woodcutting',false);
wait(2000+random(4000));
GameTab(tab_Inv);
end;

if IsChatBoxTextAnyLine (threelet,clBlue) then
begin
writeln('Someone said your name, logging out to be safe');
logout;
end;

findtreetpachop;
if ( Length(ATPA)>leng ) then
begin
leng:=length(ATPA);
writeln('Tree grew back')
end;
if invfull then
exit;
if length(ATPA)=0 then
exit;
until ( Length(ATPA)<leng )
writeln('Tree fell down');
wait(random(10000));
end;
end;

Procedure cutting;
begin
repeat
findtreetpa;
gettreexy;
clicktree;
findtreetpachop;
activechop;

until invfull
end;

Procedure invburn;
begin
if treeuptext='low' then
LinearWalkTolerance(5264467,1,60,0,0,18);
LinearWalkTolerance(10063496,350,60,0,0,18);
opendung;
wait(2000);
radialwalktolerance(5131856,200,230,20,0,0,16);
counter:=2;
repeat
invmouse(1,1);
wait(800+random(200));
invmouse(counter,1);
counter:=1+counter;
wait(1100+random(500));
invmouse(counter,1);
wait(900+random(1000));
invmouse(1,1);
wait(900+random(500));
counter:=1+counter;
until counter=28
invmouse(1,1);
wait(800+random(200));
invmouse(28,1);
wait(1100+random(500));
radialwalktolerance(5131856,89,92,70,0,0,16);
radialwalktolerance(5131856,85,90,70,0,0,16);
opendung;
wait(1000);
radialwalktolerance(662574,150,180,30,0,0,16);
if treeuptext='low' then // for willow tree location
radialwalktolerance(1730613,150,180,35,0,0,16);
end;

Procedure traveltobank;
begin
if treeuptext='low' then
LinearWalkTolerance(5264467,1,60,0,0,18);
LinearWalkTolerance(10063496,1,60,0,0,18);
opendung;
radialwalktolerance(5723993,360,10,74,0,2,18);
wait(20000);
radialwalktolerance(5723993,80,100,40,0,0,6);
radialwalktolerance(60909,50,100,40,0,0,6);
wait(2000);
findshipmaster;
wait(2000);
radialwalktolerance(6917299,80,100,40,0,0,18);
openbankfast('akb');
wait(500);
depositall;
wait(500);
end;

Procedure travelfrombank;
begin
radialwalktolerance(2714496,270,290,73,2,0,18);
wait(10000);
findshipmaster;
radialwalktolerance(5723993,175,185,74,0,-2,16);
wait(20000);
radialwalktolerance(5131856,170,180,40,0,0,16);
opendung;
wait(1000);
radialwalktolerance(662574,150,180,35,0,0,16);
if treeuptext='low' then // for willow tree location
radialwalktolerance(1730613,150,180,35,0,0,16);
end;

begin //main loop
initrun;
if findsymbol(x,y,'bank') then
travelfrombank;
repeat
count:=count+1;
cutting;
if borb=0 then
begin
traveltobank;
travelfrombank;
end else
invburn;
until count=loadcount
end.

KingKong
12-19-2010, 04:03 AM
Is this by any chance using members ways of going to dungeoneering? As for the walking to bank goes, why not use teleport from the ring of kinship to be tele'd to the banker without too much effort?

EtherFreak
12-19-2010, 08:05 AM
presently it does not use members stuff. i do not use the ring of kinship, for i feel al kaharid is a better bank. the smart in the above script is set to memb right now. as this is a work in progress, i am not suggesting you run it unless you understand the code some.

KingKong
12-19-2010, 08:17 AM
So far it looks alright(maybe you should read scar scripting standards?), ill test when i get the chance

Troll
12-19-2010, 10:23 AM
No woodcutting so no use from me :(

doublex8
12-20-2010, 10:40 PM
Is this by any chance using members ways of going to dungeoneering? As for the walking to bank goes, why not use teleport from the ring of kinship to be tele'd to the banker without too much effort?

I think it is actually quicker going to and from AK bank. I used to use the ring to tele when I WC legit here and some dude was tellin me how AK bank was faster and I didn't believe him until I tried.

KingKong
12-21-2010, 09:56 AM
I think they both take roughly the same time.

doublex8
12-21-2010, 01:45 PM
yea its pretty close, which is easier to script?

TomTuff
12-21-2010, 06:24 PM
Personally, I hate woodcutting (WC Level 57 on my main) and wouldn't use this.

BUT, I would do it anyways for the experience if i were you!

doublex8
12-21-2010, 06:33 PM
Personally, I hate woodcutting (WC Level 57 on my main) and wouldn't use this.

BUT, I would do it anyways for the experience if i were you!

I hate woodcutting too. Thats why I bot it :p

KingKong
12-21-2010, 10:27 PM
yea its pretty close, which is easier to script?

I think banking at akb is easier, because i don't think there is a banking function for the npc at daemonheim.(haven't tried it myself, so i don't really know)


Personally, I hate woodcutting (WC Level 57 on my main) and wouldn't use this.

BUT, I would do it anyways for the experience if i were you!

I hate it too :frusty:, and thats why i bot it too :P

alerdm
02-29-2012, 11:10 PM
it is any chance to update script ?? It doesnt work :(