bbri06
2006-11-29 18:20:34
Ok recently I have started expierimenting in combining multiple scripts into one and using a form to choose which script you would like to run. I think its a pretty good idea and I will post an example as soon as i finish it. If i get enough people who like this idea and who will help then i will do it. However i need people who will help test scripts to make sure they work well and i need only autocolor scripts. If your scripts do not already have a form of there own i will make one to replace the const. Feedback please?
P.S. if the first one is a succes maybee I could make one composed of pay for scripts and then some percent of the profit will go to all the contributing scripters. Like lets say the price of there script i will get like 5% of or something and they get the rest get it?\
ok so here is an example dosnt work yet lol but it might help u get the idea. Also i hope its not bad if I used Charmz chopper in it as an example. If it is i will change it. Thanks.
P.S. if the first one is a succes maybee I could make one composed of pay for scripts and then some percent of the profit will go to all the contributing scripters. Like lets say the price of there script i will get like 5% of or something and they get the rest get it?\
ok so here is an example dosnt work yet lol but it might help u get the idea. Also i hope its not bad if I used Charmz chopper in it as an example. If it is i will change it. Thanks.
program combination;
{.Include SRL/SRL.Scar}
{.Include SRL/SRL/Skill/Woodcutting.Scar}
{.Include SRL/SRL/Misc/Trade.Scar}
{.Include SRL/SRL/Misc/PlayerForm.Scar}
{.include SRL/SRL/Extended/xMapWalk.Scar}
var
a,b:integer;
i:integer;
Var
WillowForm: TForm;
WaitLabel, LoadLabel: TLabel;
AxeImage, WillowImage : TImage;
WaitEdit, LoadEdit: TEdit;
AxeCheckBox, AntiCheckBox, PowerCheckBox: TCheckBox;
PlayManButton, StartButton: TButton;
AxeCanv, WillowCanv: TCanvas;
RuneAxe, WillowLog: Integer;
Var
mnuMenu1, mnuMenu2: TMenuItem;
mnu: TMainMenu;
WaitTime, LoadsToDo: Integer;
UseAntiBan, PowerChop, EAxe: Boolean;
comboform : TForm;
Var
Willow: Integer;
BankDot1, BankDot2, BankDot3: Integer;
TraderName: String;
LaughText: Array of string;
WhatText: Array of string;
Bank, TotalChopped, Loads: Integer;
FishSymbolColor: Integer;
NoAxe: Boolean;
alchs:string;
const
Ver= 'v1.5';
{=========================================================================]
[ ChArM's Willow Chopper ]
[ Version: 1.5 ]
[=========================================================================]
| Description: |
| A macro that chops a full load of willows in Draynor, |
| then banks it, and if chosen will powerchop. |
| Instructions: |
| 1. Set the Runescape brightness to V-bright, and your computer's |
| resolution to 32bit resolution. |
| 2. Need SCAR version 2.0.3. |
| 3. Need SRL version 3.2. |
| 4. Start script Draynor Bank, if powerchopping start by trees. |
| 5. Start with a axe in your fist inventory slot(Recomended). |
| 6. Recomended to have extra axes in your first bank slot. |
[=========================================================================]
[ Features: ]
[ AutoResponder ]
[ Forms ]
[ AntiBan ]
[ Full Randoms (UpToDate With SRL) ]
[ AutoColor Finding ]
[ Handles Trades (If powerchop is chosen, will trade the willows) ]
[ Multiple Players ]
[ Good Ent and Axe Head Finding ]
[=========================================================================}
{~//Don't Touch Below//~}
//----------------------------------------------------------------------------//
Procedure FormBitmaps;
Begin
RuneAxe := BitmapFromString(23, 28, 'z78DACDD6DB8E832010' +
'06E05702E6005CBA88EFFF483B753019B761A3A5D5B6C95C98885' +
'FE61FC45A6A9E533D5CDDE3E79F6B3DB9CE48D527F244CEE5C894' +
'5D4D9EBDD4858B0F3DE127E44D52095C8D13FD888198360966F65' +
'C30D1C2B955A29963AB4013A3AD239E9DA4D22286C279EBC6EEB9' +
'D6A342E3E1C9B3CB7A17B820FFD306C622B904A2BD04226672507' +
'0A1040B2155AD1828B1DBF5E74D1235B4D930DD080900A650C412' +
'009070868485506DBB7456DB1B24764A8DA45755650D2392968BC' +
'7FC67BF1889AE666BBB6E526B067E186C3D3EB73B89EE97CCD1D5' +
'6743EFDE96D43A39CF86FF57382B39B202CCE425A50103CD4862D' +
'09D62DE1EAFA57CD6D0957466E3F8E4BF769795F4A6F49AF30501' +
'A49B4D3290CBB8E4B1F3B637AA4A46721997E84EB9AB1B10C324B' +
'918C9BDDD68B95C3EA5DF23D94E552F4910C0B29D32B7E5620CD7' +
'4F694F9281EB7748EECAC5573925BB137265373043942F073DFDD' +
'7F3EE36C97ACAE8CEBD3E97777D3F7CA2DE6BF8054250826D');
WillowLog := BitmapFromString(32, 26, 'z78DACD97DB9283200C8' +
'65F090841BCDC22BEFF23AD2574262C868DD51EDA99FF46C02F09' +
'3998539E9798DFAEE6FEB392E60F51E9995D72D164B02E5B0711E' +
'CA60B4C36788064E76FB382782A6DCF9C3CDAE4A3377626ADEB8D' +
'DBFEAF8EB54689967C8BD6C78D969805BD8A9FCEA99E296F278F5' +
'5251F765EA595B48B68F57A95FFE9045C100143C00C3F610E1612' +
'CE689C45F4C9E646C76CFD7A616F8D8281E4F04C16D0DEE0F0067' +
'10A21799820CCDE1CE01F330B27F05C381305DACBC91B7EC98A5E' +
'F9FAB1322B38F9B5FC216D256E11ADD0D372CDE81FE75C95BF07F' +
'8C75427FC7FF4FEF775AFE7AF6AC2046B25ECF5B92890FFA9CA01' +
'98924737973556347592E90EFF2BC88B366FE71D81E5726F4BAD9' +
'3E85730546DFA6EB293C543663E09F05E20118A55ABBB573C3B30' +
'F8C53BCE5F398B87EB3D672773F286ADD7E768A50A20F0537637F' +
'CB7C9F9C0ADF8F3AE7B8C4A2F1B777F9176DC1714792DF26F7D1E' +
'EC1443F6D874AB8E9F9ED6E81CED50CFF5080D7F991376EEF9837' +
'FAB03522DDAC982ABC8F5FC2B469876EACC989FD7223DFF457D8D' +
'F353E5A1098DF7A93AB3F1EC3EC37FB4AEB289946A9AD497AB153' +
'467F26993FC4FD9A1E73F3157FCF31D319C88C67B0FDCFFB12D45' +
'3584928E7B71BF9E47A7B1A2F85F738B8E72BEEE1B56737FF4B49' +
'FFA12EFC9BF93563FA97E33AD3E53DECFF00B8C574DBA');
End;
Procedure StartSend(Sender: TObject);
Begin
WillowForm.ModalResult:= mrOk;
FreeBitmap(RuneAxe);
FreeBitmap(WillowLog);
WaitTime:= StrToInt(WaitEdit.Text);
LoadsToDo:= StrToInt(LoadEdit.Text);
If(PowerCheckBox.State = cbChecked)then
Begin
PowerChop:= True;
WriteLn('PowerChop? - Yes');
End else
Begin
PowerChop:= False;
WriteLn('PowerChop? - No');
End;
If(AxeCheckBox.State = cbChecked)then
Begin
EAxe:= True;
WriteLn('Equip Axe? - Yes');
End else
Begin
EAxe:= False;
WriteLn('Equip Axe? - No');
End;
If(AntiCheckBox.State = cbChecked)then
Begin
UseAntiBan:= True;
WriteLn('Use Antiban? - Yes');
End else
Begin
UseAntiBan:= False;
WriteLn('Use Antiban? - No');
End;
WriteLn('WaitTime? - '+IntToStr(WaitTime)+' Seconds');
WriteLn('Loads To Do? - '+IntToStr(LoadsToDo));
End;
Procedure PlayerSend(Sender: TObject);
Begin
SetupPlayers;
End;
Procedure Form;
Begin
WillowForm := CreateForm;
WillowForm.Left := 328;
WillowForm.Top := 251;
WillowForm.BorderIcons := [biSystemMenu];
WillowForm.BorderStyle := bsToolWindow;
WillowForm.Caption := 'ChArM'#39's Willow Chopper';
WillowForm.ClientHeight := 230;
WillowForm.ClientWidth := 220;
WillowForm.Color := clBtnFace;
WillowForm.Font.Color := clWindowText;
WillowForm.Font.Height := -11;
WillowForm.Font.Name := 'Comic Sans MS';
WillowForm.Font.Style := [];
WillowForm.Visible := False;
WillowForm.PixelsPerInch := 96;
WaitLabel := TLabel.Create(WillowForm);
WaitLabel.Parent := WillowForm;
WaitLabel.Left := 77;
WaitLabel.Top := 43;
WaitLabel.Width := 60;
WaitLabel.Height := 15;
WaitLabel.Caption := 'Wait Time?';
LoadLabel := TLabel.Create(WillowForm);
LoadLabel.Parent := WillowForm;
LoadLabel.Left := 74;
LoadLabel.Top := 100;
LoadLabel.Width := 68;
LoadLabel.Height := 15;
LoadLabel.Caption := 'Loads To Do?';
AxeImage := TImage.Create(WillowForm);
AxeImage.Parent := WillowForm;
AxeImage.Left := 19;
AxeImage.Top := 154;
AxeImage.Width := 23;
AxeImage.Height := 28;
WillowImage := TImage.Create(WillowForm);
WillowImage.Parent := WillowForm;
WillowImage.Left := 171;
WillowImage.Top := 158;
WillowImage.Width := 32;
WillowImage.Height := 26;
PowerCheckBox := TCheckBox.Create(WillowForm);
PowerCheckBox.Parent := WillowForm;
PowerCheckBox.Left := 18;
PowerCheckBox.Top := 15;
PowerCheckBox.Width := 79;
PowerCheckBox.Height := 17;
PowerCheckBox.Hint := 'Check if you wish to powerchop.';
PowerCheckBox.Caption := 'PowerChop?';
PowerCheckBox.ParentShowHint := False;
PowerCheckBox.ShowHint := True;
PowerCheckBox.TabOrder := 8;
WaitEdit := TEdit.Create(WillowForm);
WaitEdit.Parent := WillowForm;
WaitEdit.Left := 49;
WaitEdit.Top := 65;
WaitEdit.Width := 121;
WaitEdit.Height := 23;
WaitEdit.Hint := 'Amount of time to wait before switching trees (In Seconds).';
WaitEdit.ParentShowHint := False;
WaitEdit.ShowHint := True;
WaitEdit.TabOrder := 9;
WaitEdit.Text := '10';
LoadEdit := TEdit.Create(WillowForm);
LoadEdit.Parent := WillowForm;
LoadEdit.Left := 51;
LoadEdit.Top := 123;
LoadEdit.Width := 121;
LoadEdit.Height := 23;
LoadEdit.Hint := 'How many loads to chop before switching players.';
LoadEdit.ParentShowHint := False;
LoadEdit.ShowHint := True;
LoadEdit.TabOrder := 10;
LoadEdit.Text := '100';
AxeCheckBox := TCheckBox.Create(WillowForm);
AxeCheckBox.Parent := WillowForm;
AxeCheckBox.Left := 119;
AxeCheckBox.Top := 15;
AxeCheckBox.Width := 78;
AxeCheckBox.Height := 17;
AxeCheckBox.Hint := 'Check if you wish to equip axe, recomended that you don'#39't.';
AxeCheckBox.Caption := 'Equip Axe?';
AxeCheckBox.ParentShowHint := False;
AxeCheckBox.ShowHint := True;
AxeCheckBox.TabOrder := 11;
AntiCheckBox := TCheckBox.Create(WillowForm);
AntiCheckBox.Parent := WillowForm;
AntiCheckBox.Left := 69;
AntiCheckBox.Top := 161;
AntiCheckBox.Width := 90;
AntiCheckBox.Height := 17;
AntiCheckBox.Hint := 'Check if you want antiban enabled.';
AntiCheckBox.Caption := 'Use AntiBan?';
AntiCheckBox.ParentShowHint := False;
AntiCheckBox.ShowHint := True;
AntiCheckBox.TabOrder := 12;
PlayManButton := TButton.Create(WillowForm);
PlayManButton.Parent := WillowForm;
PlayManButton.Left := 15;
PlayManButton.Top := 195;
PlayManButton.Width := 91;
PlayManButton.Height := 25;
PlayManButton.Hint := 'Click to setup players.';
PlayManButton.Caption := 'Player Manager';
PlayManButton.ParentShowHint := False;
PlayManButton.ShowHint := True;
PlayManButton.OnClick := @PlayerSend;
PlayManButton.TabOrder := 13;
StartButton := TButton.Create(WillowForm);
StartButton.Parent := WillowForm;
StartButton.Left := 124;
StartButton.Top := 195;
StartButton.Width := 75;
StartButton.Height := 25;
StartButton.Hint := 'Click to start the script.';
StartButton.Caption := 'Start';
StartButton.ParentShowHint := False;
StartButton.ShowHint := True;
StartButton.OnClick := @StartSend;
StartButton.TabOrder := 14;
FormBitmaps;
AxeCanv := GetBitmapCanvas(RuneAxe);
CopyCanvas(AxeCanv, AxeImage.Canvas, 0, 0, 132, 30, 0, 0, 132, 30);
WillowCanv := GetBitmapCanvas(WillowLog);
CopyCanvas(WillowCanv, WillowImage.Canvas, 0, 0, 132, 30, 0, 0, 132, 30);
End;
Procedure SafeForm;
Var
v: TVariantArray;
Begin
SetArrayLength(V, 0);
ThreadSafeCall('Form', v);
End;
Procedure ShowFormMod;
Begin
WillowForm.ShowModal;
End;
Procedure SafeShowFormMod;
Var
v: TVariantArray;
Begin
SetArrayLength(V, 0);
ThreadSafeCall('ShowFormMod', v);
End;
//----------------------------------------------------------------------------//
Procedure Bitmaps;
Begin
Willow := BitmapFromString(5, 11, 'z78DA9DCE310EC0200C03C02' +
'F11E29832520AFF7F52A5864A48A00E5D3CF8A22489BC80A42C10' +
'4FCB16E2C8B4282F42DB3F1D1998B46FF4E9AD19A2A0C2A4AE33A' +
'E167148F59C7B40ABE4598DE81A486B5A7CE7AA7E657CFEEA19DB' +
'E6FAA7DE9BAE46C6');
End;
Procedure DTMs;
Begin
BankDot1 := DTMFromString('78DA636C67626008664001FFFFFF67F80FA41' + //By Fawki =P
'921ECFF8CB54035DEA86AFEFC61621081AA0101C63A4C73B0AA09' +
'C7AF06000153117B');
BankDot2 := DTMFromString('78DA63EC60626008624001FFFFFF67F80FA41' +
'921ECFF8C3540353EA86AFEFC61621081AA0101C63AA09A1022D4' +
'44E057030001B5117D');
BankDot3 := DTMFromString('78DA63EC60626008624001FFFFFF67F80FA41' +
'921ECFF8CF540359EA86AFEFC61621081AA0101C63AA09A40026A' +
'6A816A42F1AB010000781176');
End;
//----------------------------------------------------------------------------//
Procedure ExitWindow;
Var
Close: Integer;
Begin
Close := BitmapFromString(10, 11, 'z78DA3330000243033069E66' +
'4EA62628C9F3440528F4912AF0BBF38015913537313430889DF3D' +
'505D48EA3149F274E13201971A533753236367641297BD982A89D' +
'185DF04FC6A70C96211B7347131B6C42409B807872E5C260000D9' +
'5685F1');
If FindBitmapToleranceIn(Close, x, y, MSX1, MSY1, MSX2, MSY2, 10) then
Begin
MMouse(x, y, 0, 0);
Wait(100+Random(50));
GetMousePos(x, y);
Wait(100+Random(50));
Mouse(x, y, 3, 3, True);
End;
FreeBitmap(Close);
End;
//----------------------------------------------------------------------------//
Function HandleTrade:Boolean;
Var
TradeMark : LongInt;
Begin
If AcceptTrade or TradeScreen then
Begin
Result := True;
Wait(1000+Random(501));
TraderName := GetTraderName;
If(PowerChop)then
Begin
ClickAllItemsBmpTolWait('All', Willow, 10, 250+Random(100));
End
Accept;
MarkTime(TradeMark)
While (not PlayerAccepted) and (TimeFromMark(TradeMark) < 20000) do Wait(1000+Random(501));
If TimeFromMark(TradeMark) > 20000 then Decline;
Accept;
MarkTime(TradeMark)
While (TradeScreen2) and (TimeFromMark(TradeMark) < 20000) Do Wait(1000+Random(501));
If TimeFromMark(TradeMark) > 20000 then Decline;
If TimeFromMark(TradeMark) < 20000 then TypeSend('Ty '+TraderName)
Else TypeSend('What do u want '+TraderName)
Trades := Trades + 1;
ExitWindow;
End;
End;
//----------------------------------------------------------------------------//
Procedure RCExamine;
Begin
MMouse(Random(MSX2), Random(MSY2), 0, 0);
If IsUpText('opti') or IsUpText('alk Her') then
Begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Case Random(2) of
0: ChooseOption(x, y, 'Examine');
1: ChooseOption(x, y, 'Cancel');
End;
Wait(Random(50)+Random(50));
End;
End;
Procedure MoveMouseAround;
Begin
Case Random(5) of
1: SleepAndMoveMouse(1000+Random(2500));
2: SleepAndMoveMouse(750+Random(2000));
3: SleepAndMoveMouse(1500+Random(1000));
4: SleepAndMoveMouse(1000+Random(500));
5: SleepAndMoveMouse(500+Random(2000));
End;
End;
Procedure RandomMoveMouseAroundEvery(mins: Integer);
Begin
If ((TimeFromMark(Mark) / 1000) / 60 >= mins) then
Begin
MarkTime(Mark);
MoveMouseAround;
End;
End;
Procedure RandomRClickExamineEvery(mins: Integer);
Begin
If ((TimeFromMark(Mark) / 1000) / 60 >= mins) then
Begin
MarkTime(Mark);
RCExamine;
End;
End;
Procedure RandomGameTabEvery(mins : Integer);
Begin
If ((TimeFromMark(Mark) / 1000) / 60 >= mins) then
Begin
MarkTime(Mark);
GameTab(1+Random(12));
End;
End;
Procedure WoodCuttingAntiBan;
Begin
If(UseAntiBan= True)then
Begin
RandomMoveMouseAroundEvery(7 + Random(4));
RandomRClickExamineEvery(7 + Random(2));
RandomGameTabEvery(6 + Random(3));
RotateEvery(8 + Random(4));
PickUpMouseEvery(15 + Random(2));
LeaveScreenEvery(12 + Random(2));
HoverEvery(9 + Random(5), 'woodcutting');
End;
End;
//----------------------------------------------------------------------------//
Procedure SetupLaughText;
Begin
SetArrayLength(LaughText, 25);
LaughText[0] := 'lolol';
LaughText[1] := 'lol';
LaughText[2] := 'haha';
LaughText[3] := 'hihi';
LaughText[4] := 'ghehe';
LaughText[5] := 'lmao';
LaughText[6] := 'lmfao';
LaughText[7] := 'rofls';
LaughText[8] := 'fun';
LaughText[9] := 'nice';
LaughText[10]:= 'lolz';
LaughText[11]:= 'yep';
LaughText[12]:= 'hola';
LaughText[13]:= 'wow';
LaughText[14]:= 'i bet';
LaughText[15]:= 'rofl';
LaughText[16]:= 'ghehehghehighhe';
LaughText[17]:= 'cool';
LaughText[18]:= '...';
LaughText[19]:= '???';
LaughText[20]:= 'wowzers';
LaughText[21]:= 'grrr...';
LaughText[22]:= 'rowr';
LaughText[23]:= 'lolololololol';
LaughText[24]:= 'ha ha ha!!!';
End;
Procedure SetupWhatText;
Begin
SetArrayLength(WhatText, 7);
WhatText[0]:= 'what';
WhatText[1]:= 'yes';
WhatText[2]:= 'how can i help lol';
WhatText[3]:= 'what do you want';
WhatText[4]:= 'me?';
WhatText[5]:= 'Yah?';
WhatText[6]:= 'who?';
End;
Procedure AutoRespond;
Begin
OldLine := TheLine;
TheName := Lowercase(trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 0, 40, True, tr_NormalChars)));
TheLine := Lowercase(trim(GetTextAtEx(20, 415, 45, SmallChars, False, False, 0, 2, 16711680, 40, False, tr_NormalChars)));
NewLine := TheLine;
If OldLine <> NewLine then
If (pos('yo', TheName) <> 0) or (pos(Players[CurrentPlayer].Nick, TheName) <> 0) then
Begin
Exit;
End
If(InChat('Wc') or InChat('Woodcut') or InChat('Woodcutting') and InChat('lvls') or InChat('levels'))then
Begin
TypeSend(IntToStr(GetSkillLevel('woodcutting')));
End else
If(InChat('lol') or InChat('lmao')) or InChat('lmfao') or InChat('rofl')then
Begin
TypeSend(LaughText[Random(25)]);
End else
If(InChat(Players[CurrentPlayer].Name)) or (InChat(Players[CurrentPlayer].Nick))then
Begin
TypeSend(WhatText[Random(7)]);
End;
End;
//----------------------------------------------------------------------------//
Function CFindAxeHead: Boolean;
Var
Chat, AxeHeadDTM, Tries: Integer;
StartSearch: Boolean;
Begin
AxeHeadDTM := DTMFromString('78DA63CC62626078C180021C2312191E02694' +
'620FE0F048C694035CF18D000231209A473816A9E12A1E6150135' +
'A94035AF09A801B9F9090135994498930C54F392809A3CCCF0415' +
'70300FB8311DF');
GameTab(4);
Result:= True;
Chat:= CreateBitmapMaskFromText('You do not have an axe', SmallChars);
If(FindBitmapMaskTolerance(Chat, x, y, 17, 410, 495, 452, 10, 85))then
Begin
If((EquipAxe= False)and
Not(GetColor(590, 220)= Head)or
Not(GetColor(587, 219)= Head2)or
Not(GetColor(588, 218)= Head3))then
StartSearch:= True;
If(EquipAxe)then
Begin
GameTab(5);
Wait(200+Random(200));
If(not(GetColor(597, 294)= Head))or
Not(GetColor(600, 295) = Head2)or
Not(GetColor(599, 298) = Head3)then
Begin
StartSearch:= True;
Mouse(592, 297, 2, 2, True);
Wait(1000);
End;
End;
End;
If(StartSearch= True)then
Begin
Result:= False;
NoAxe:= False;
Tries:= 0;
WriteLn('Looking For Axe Head');
Repeat
If(not(LoggedIn))then Exit;
Tries:= Tries + 1;
If(FindDTM(AxeHeadDTM, x, y, 550, 200, 745, 465))or
(FindColorSpiral(x, y, Head, MSX1, MSY1, MSX2, MSY2))or
(FindColorSpiral(x, y, Head2, MSX1, MSY1, MSX2, MSY2))or
(FindObj3(x, y, 'Take', Head3, 5))then
Begin
MMouse(x, y, 0, 0);
If(IsUpText('Take'))then
Begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, True);
Flag;
Wait(1000+Random(100));
End else
Begin
If(FindColorSpiral(x, y, 241, 565, 5, 725, 155))then
Begin
Mouse(x, y, 1, 1, True);
Flag;
Wait(100+Random(100));
End
End
End
Until(Tries >= 10) or (FindDTM(AxeHeadDTM, x, y, 550, 200, 745, 465));
If(Tries >= 10)then
Begin
NoAxe:= True;
WriteLn('Couldn''t find axe, going to bank to withdraw another.');
End else
Begin
WriteLn('Axe Head Found.');
AttachHead;
Result:= True;
NoAxe:= False;
End;
End;
FreeBitmap(Chat);
FreeDTM(AxeHeadDTM);
End;
//----------------------------------------------------------------------------//
Procedure RunAway;
Begin
Case (Random(5)) of
1 : Begin TypeSend('ahh'); end
2 : Begin TypeSend('=S'); end
3 : Begin TypeSend('hah'); end
4 : Begin TypeSend('stupid randoms'); end
5 : Begin TypeSend('-.-') end
End
RunAwayDirection('N');
Wait(10000+Random(2000));
RunBack;
End;
Procedure Randoms;
Begin
HandleTrade;
CFindAxeHead;
FindNormalRandoms;
FindEnt(3432536);
FindBirdsNest;
DwarfItem;
If(FindFight)then
RunAway;
End;
Procedure FlagRand;
Begin
While (FlagDistance > 4) Do
Begin
Wait(100+Random(50));
FindTalk;
End;
End;
//----------------------------------------------------------------------------//
Procedure FindFishSymbolColor;
Begin
Repeat
FishSymbolColor:= GetSymbolColor(x, y, 'fish')
SymbolAccuracy:= SymbolAccuracy-0.1;
Until(SymbolAccuracy= 0.4) or (FishSymbolColor > 0);
If(FishSymbolColor > 0)then
Begin
WriteLn('FishSymbolColor - '+IntToStr(FishSymbolColor));
SymbolAccuracy:= 0.8;
End else
Begin
WriteLn('Could NOT find fish symbol color, its alright already at willows');
//TerminateScript;
End;
End;
//----------------------------------------------------------------------------//
Procedure BankToWillows;
Begin
MouseFindFlag(625+Random(3), 108+Random(5), -1, 1);
Wait(100+Random(50));
FlagRand;
FindFishSymbolColor;
If(FindColorSpiralTolerance(x, y, FishSymbolColor, MMX1, MMY1, MMX2, MMY2, 10))then
Begin
Mouse(x, y - 8, 7, 7, True);
Wait(100+Random(50));
FlagRand;
End;
End;
Function Ent: Boolean;
Begin
If(FindColorSpiralTolerance(x, y, 3432536, MSX1, MSY1, MSX2, MSY2, 10))then
MMouse(x, y, 0, 0);
If(IsUpText('Chop')) or (IsUpText('Willow')) or (IsUpText('Down'))then
Begin
If(FindColorSpiralTolerance(x, y, 383705, 1, 1, 180, 39, 20))or
(FindColorSpiralTolerance(x, y, 65535, 1, 1, 200, 40, 20))then
Begin
Result:= True;
EntsAvoided:=EntsAvoided + 1;
WriteLn('Ent found, waiting');
Mouse(648, 83, 1, 1, True);
Wait(5000+Random(2000));
End else
Result:= False;
Exit;
End;
End;
Procedure ChopWillows;
Begin
If(FindColorSpiralTolerance(x, y, 2914416, MSX1, MSY1, MSX2, MSY2, 5))or
(FindColorSpiralTolerance(x, y, 3829856, MSX1, MSY1, MSX2, MSY2, 7))or
(FindColorSpiralTolerance(x, y, 4890768, MSX1, MSY1, MSX2, MSY2, 10))then
Begin
MMouse(x, y, 0, 0);
Wait(100+Random(50));
If IsUpText('Chop') or IsUpText('down') and IsUpText('Willow') then
Begin
If(Ent= False)then
Begin
Case Random(2) of
0: Begin Mouse(x, y, 0, 0, False); Wait(100+Random(50)); ChooseOption(x, y, 'Chop down'); Flag; end;
1: Begin Mouse(x, y, 0, 0, True); Flag; end;
End;
MarkTime(Mark);
Repeat
Randoms;
Wait(50);
AutoRespond;
If(FindNormalRandoms)then
Begin
ChopWillows;
End;
Until(TimeFromMark(Mark) >= (WaitTime*1000));
End;
End;
End;
End;
Procedure WillowsToBank;
Begin
If(FindDTM(BankDot1, x, y, MMX1, MMY1, MMX2, MMY2))or
(FindDTM(BankDot2, x, y, MMX1, MMY1, MMX2, MMY2))or
(FindDTM(BankDot3, x, y, MMX1, MMY1, MMX2, MMY2))then
Begin
DTM3Flag(BankDot1, BankDot2, BankDot3, True);
Wait(100+Random(50));
Flag;
End else
Begin
MouseFindFlag(634+Random(3), 51+Random(2), -1, 1);
Wait(100+Random(50));
FlagRand;
DTM3Flag(BankDot1, BankDot2, BankDot3, True);
Wait(100+Random(50));
Flag;
End;
End;
//----------------------------------------------------------------------------//
Function FindBanker: Boolean;
Var
D, C: Integer;
Begin
If(BankScreen)then
Begin
Result:=True;
Exit;
End;
D:= 246;
C:= 163;
If(FindColorSpiralTolerance(D, C, 607837, 10, 10, 500, 330, 3))or
(FindColorSpiralTolerance(D, C, 3552827, 10, 10, 500, 330, 4))or
(FindColorSpiralTolerance(D, C, 2908795, 10, 10, 500, 330, 5))then
Begin
MMouse(D, C, 2, 2);
Wait(100+random(50));
If(Option2('Talk'))or
(IsUpText('Use'))or
(IsUpText('Bank'))then
Begin
Mouse(D, C, 1, 1, False);
Wait(100+random(50));
ChooseOption(x, y, 'Use-quickly');
Flag;
Wait(1000+Random(250));
End;
If(BankScreen)then
Begin
Result:=True;
Exit;
End;
End;
End;
Procedure BankWillows;
Begin
MarkTime(Mark);
Repeat
Wait(10+Random(5));
Until(FindBanker) or (TimeFromMark(Mark) >= 120000);
If(TimeFromMark(Mark) >= 120000)then
Begin
WriteLn('Could not find bank, restart script');
Logout;
End;
If(BankScreen)then
Begin
If(NoAxe= True)then
Begin
ClickAllItemsColorWait('All', 65536, 1000+Random(100));
FixBank;
Wait(Random(750)+500);
Withdraw(1, 1, 1);
Wait(Random(750)+500);
End else
Begin
If(EquipAxe=False)then
Begin
Deposit(2, 28, 2);
End else
If(EquipAxe=True)then
Begin
ClickAllItemsColorWait('All', 65536, 1000+Random(100));
Wait(Random(750)+500);
End;
End;
Repeat
ExitWindow;
Wait(1000+Random(1000));
Until(not(BankScreen));
If (NoAxe= True) and (EquipAxe= True)then
Begin
FindAxeHeadColor;
Wait(Random(1000)+250);
ClickItemColor(Head, True);
End;
Bank:=Bank + 1;
TotalChopped:=TotalChopped + 27;
Loads:=Loads + 1;
End;
End;
//----------------------------------------------------------------------------//
Procedure DropWillows;
Begin
Repeat
ClickAllItemsBmpTolWait('Drop', Willow, 10, 250+Random(100));
Until(not(FindBitmapToleranceIn(Willow, x, y, MIX1, MIY1, MIX2, MIY2,10)));
End;
//----------------------------------------------------------------------------//
Procedure ProgressReport;
Begin
ClearDebug;
WriteLn(' ');
WriteLn('<=============Progress Report============>');
WriteLn('Willow Chopper '+Ver+' By: ChArMz');
WriteLn('Worked for '+TimeRunning+' .');
WriteLn('Banked '+IntToStr(Bank)+' times.');
If(not(PowerChop))then
WriteLn('Chopped '+IntToStr(TotalChopped)+' Willows.');
If(PowerChop)then
WriteLn('Chopped/Dropped '+IntToStr(TotalChopped)+' Willows.');
WriteLn('Gained '+IntToStr(TotalChopped*(62/5))+' experience.');
WriteLn('<========================================>');
SRLRandomsReport;
Writeln(' ');
End;
//----------------------------------------------------------------------------//
Procedure Setup;
Begin
SetupSRL;
Bitmaps;
DTMs;
SetupLaughText;
SetupWhatText;
MouseSpeed:= 10;
SafeForm;
SafeShowFormMod;
EquipAxe:= EAxe;
ActivateClient;
If(not(LoggedIn))then
Begin
LoginPlayer;
End
If(LoggedIn)then
Begin
NickNameBMP:= CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
PerfectNorth;
Wait(100+Random(50));
FindAxeHeadColor;
Wait(100+Random(50));
ClearDebug;
End;
End;
//----------------------------------------------------------------------------//
Procedure PowerLoop;
Begin
Repeat
SetRun(True);
Repeat
ChopWillows;
WoodCuttingAntiBan;
Until(InvCount= 28) or (NoAxe= True);
DropWillows;
TotalChopped:=TotalChopped + 27;
Loads:=Loads + 1;
ProgressReport;
If(NoAxe= True)then
Begin
SetRun(False);
WillowsToBank;
BankWillows;
BankToWillows;
End
If (LoggedIn) and (LoadsToDo=Loads) then
Begin
NextPlayer(True);
End;
If(not(LoggedIn))then NextPlayer(False);
Until(False);
End;
procedure charmzloop;
Begin
writeln('charmz started')
Setup;
If(PowerChop)then
PowerLoop;
If(not(PowerChop))then
Repeat
SetRun(True);
BankToWillows;
Repeat
ChopWillows;
WoodCuttingAntiBan;
Until(InvCount= 28) or (NoAxe= True);
SetRun(False);
WillowsToBank;
BankWillows;
ProgressReport;
If (LoggedIn) and (LoadsToDo=Loads) then
Begin
NextPlayer(True);
End;
If(not(LoggedIn))then NextPlayer(False);
Until(False);
End;
procedure click;
begin
mouse(a,b,2,2,true)
wait(2700+random(500))
mouse(a,b,2,2,true)
i:=i+1
end;
procedure waitforposition;
begin
wait(5000)
getmousepos(a,b)
end;
procedure bankalcherloop;
begin
writeln('bank alcher started')
waitforposition;
repeat
click;
until(i=(strtoint(alchs)))
wait(300000+random(10000))
end;
procedure Mnu2Click(sender: TObject);
begin
WriteLn('You selected charmz chopper.');
startcharmzinit;
safecharmzinit
comboform.ModalResult:= mrOk;
end;
procedure Mnu1Click(sender: TObject);
begin
WriteLn('You clicked alcher.');
end;
procedure initform2;
begin
comboform := CreateForm;
comboform.Left := 250;
comboform.Top := 114;
comboform.Width := 696;
comboform.Height := 480;
comboform.Caption := 'comboform';
comboform.Color := clGreen;
comboform.Font.Color := clWindowText;
comboform.Font.Height := -11;
comboform.Font.Name := 'MS Sans Serif';
comboform.Font.Style := [];
comboform.Visible := False;
comboform.PixelsPerInch := 96;
mnu := TMainMenu.Create(comboform);
mnuMenu1 := TMenuItem.Create(comboform);
mnuMenu1.Caption := 'Auto Alcher';
mnu.Items.Add(mnuMenu1);
mnuMenu1.OnClick := @Mnu1Click;
mnuMenu2 := TMenuItem.Create(comboform);
mnuMenu2.Caption := 'Charmz Chopper';
mnu.Items.Add(mnuMenu2);
mnuMenu2.OnClick := @Mnu2Click;
end;
procedure SafeInitForm2;
var
v: TVariantArray;
begin
SetArrayLength(v, 0);
ThreadSafeCall('initform2', v);
end;
procedure ShowFormModal2;
begin
comboform.ShowModal;
end;
procedure SafeShowFormModal2;
var
t: TVariantArray;
begin
SetArrayLength(t, 0);
ThreadSafeCall('ShowFormModal2', t);
end;
procedure choose;
begin
end;
begin
safeinitform2;
safeshowformmodal2;
Freeform(comboform);
charmzloop;
end.