This is the first time I've ever attempted writing a script..
So warning, there are bugs. No where near as buggy as it was before, please post any bugs.
What it does:
Cuts Yew trees in Seer's Village, banks, and repeats.
Things that need to be done:
--
Script currently just runs to the western yew trees, when they are not there the script does not have anything to chop down and in turn just waits for the trees to respawn. I'm not 100% positive how to implement walking to separate trees when they're gone, and will look into it tomorrow.
--Bank Pin Support
--Failsafes -- Failsafed chopping trees, walking + banking needs it.
Known Problem(s):
Clicks the tree more then one time when trying to cut it down.
Only chops western trees.
Current Version: 1.0
Update Log:
1/17/11: Script Released
1/18/11: Fixed walking to and from bank.
1/19/11: Walking completely redone with ObjectDTMs
1/23/11: Fix'd the script, no longer in beta. Version 1.0 released.
In order to use the script, please download:
ObjDTMs (Must already have Simba etc. installed.)
Just copy/paste the entire script into your Simba client.
Donations are appreciated!
Code:
program Seers_Yews;
{$DEFINE SMART}
{$DEFINE PAINT}
{$i srl/srl/misc/smart.simba}
{$i SRL/srl.simba}
{$i SRL\SRL\Misc\PaintSmart.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
{var
x,y: Integer;
Walk,WalkYew,Walk2,Walk3:Array[0..120] of Integer;
aFound:Extended;}
//const
// Bank_CT = 'clt'
var
AngleHigh: integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
Name := ''; //Username
Pass := ''; //Password
Pin := ''; //Pin
BoxRewards := ['XP','xp','lamp']; //Reward
LampSkill := 'Woodcutting'; //What to use Gene Lamp on
Active := True;
end;
end;
procedure Antiban;
begin
if(not(LoggedIn))then
Exit;
case Random(500) of
0:
begin
HoverSkill('Woodcutting', false);
wait(1000+Random(200));
end;
10: PickUpMouse;
20: BoredHuman;
30: RandomMovement;
40:
begin
MakeCompass('S');
wait(125+random(100));
MakeCompass('N');
wait(75+random(100));
MakeCompass('N');
FindNormalRandoms;
end;
50: MakeCompass('Random');
end;
end;
//procedure WalkToNewTree;
procedure ChopTree;
var x,y,colorz: integer;
begin
if(InvFull) then
Exit;
repeat
FindNormalRandoms;
AntiBan;
MakeCompass('N');
SetAngle(AngleHigh);
if FindObjCustom(x,y,['ew','hop','own'],[2182722,5474683,1654580],5) then
begin
Writeln('Found Yew Tree chopping now..');
Wait(550+random(500));
Mouse(x,y,4,4,true);
ChooseOption('hop');
repeat
wait(250+random(250));
until not IsUpTextMultiCustom(['hop','ew']) or (InvCount=28);
end else Writeln('Cannot find Yew Tree.. Walking to new tree..');
begin
ObjDTM_Walk('117:83:5:1:7:74:67:0:7:116:52:1:7:123:119:1:7:53:128:1:7:74:87',0,100,80,true);
Wait(500+random(275));
end;
if FindObjCustom(x,y,['ew','hop','own'],[2182722,5474683,1654580],5) then
begin
Writeln('Found Yew Tree chopping now..');
Wait(550+random(500));
Mouse(x,y,4,4,true);
ChooseOption('hop');
repeat
wait(250+random(250));
until not IsUpTextMultiCustom(['hop','ew']) or (InvCount=28);
end else Writeln('Cannot find Yew Tree.. Walking to new tree..');
begin
ObjDTM_Walk('38:77:4:1:7:36:62:1:7:116:62:1:7:121:126:5:7:38:118',0,100,80,true);
end;
begin
if IsUpTextMultiCustom(['ead,ak,agic,aple']) then
ObjDTM_Walk('128:133:5:1:7:55:66:1:7:102:56:0:7:98:80:1:7:120:119:1:7:28:113',0,100,80,true);
end;
Antiban;
until(InvFull);
end;
procedure WalkToYew; //Thanks for the help in IRC (Euphemism, [J]ustin)
begin
if(InvEmpty) then
Writeln('Inventory is empty, walking to Yews.');
begin
if ObjDTM_WalkPath(['73:113:4:10:7:66:70:0:7:83:87:8:7:90:120:5:7:30:100','64:139:5:5:7:40:67:0:7:95:56:1:7:126:71:1:7:82:127:8:7:65:114','57:119:5:0:7:47:88:8:7:69:62:0:7:134:83:1:7:98:126:3:7:29:103', '36:81:5:0:7:71:52:8:7:97:66:1:7:78:118:5:7:33:119:1:7:30:68'],0,100,80,false,true) then
Writeln('Arriving at Yews.');
begin
wait(250 + random(250));
MakeCompass('n');
end;
end;
end;
procedure WalkToBank;
begin
if(InvFull) then
Writeln('Inventory is full, walking to bank..');
begin
if ObjDTM_WalkPath(['97:61:6:1:7:37:63:0:7:79:47:8:7:106:61:1:7:87:115:5:7:61:115:3:7:39:96', '106:28:4:1:7:104:100:1:7:23:88:0:7:66:51:1:7:112:58', '84:36:4:1:7:82:95:0:7:44:108:1:7:58:55:1:7:110:58', '88:63:5:1:7:34:36:1:7:109:46:1:7:106:105:1:7:55:103:5:7:41:75'],0,100,80,false,true) then
Writeln('Arriving at Camelot bank.');
begin
wait(250+random(250));
Antiban;
MakeCompass('N');
end;
end
end;
{ procedure Bank
begin
if(Invfull)then
//begin
repeat
Writeln('Inventory full, banking.')
OpenBank('clt',True,True)
Wait(250+random(100));
if PinScreen then
InPin(Players[CurrentPlayer].Pin);
Until(BankScreen);
//if(PinScreen)then InPin(Players[CurrentPlayer].Pin);
//if(bankscreen)then
//if BankScreen
Depositall;
CloseBank;
end;
//end;}
procedure Banking;
begin
if(InvFull) then
begin
SetAngle(AngleHigh);
repeat
WriteLn('Inventory full, banking.');
OpenBankNPC;
if(PinScreen)then
InPin(Players[CurrentPlayer].Pin );
if(BankScreen) then
DepositAll;
CloseBank;
until(InvEmpty);
end;
end;
begin
Smart_Server := 12;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
ActivateClient;
ObjDTM_Setup;
ClearDebug;
DeclarePlayers;
if not(LoggedIn) then
LogInPlayer;
repeat
WalkToYew;;
ChopTree;
WalkToBank;
Banking;
until(false);
//repeat
//NextPlayer(True);
//until(AllPlayersInactive);
end.