SCAR Code:
program RuneBuyer;
{.include SRL/SRL.scar}
var
Form1 : TForm;
RadioButton1 : TRadioButton;
RadioButton2 : TRadioButton;
RadioButton3 : TRadioButton;
RadioButton4 : TRadioButton;
RadioButton5 : TRadioButton;
RadioButton6 : TRadioButton;
RadioButton7 : TRadioButton;
Button1 : TButton;
WhatToBuy:Integer;
death:Integer;
chaos:Integer;
fire:Integer;
water:Integer;
air:Integer;
earth:Integer;
mind:Integer;
body:Integer;
Bought:Integer;
procedure ClickButton(sender: TObject);
begin
form1.Caption:= form1.Caption + '.';
form1.ModalResult:= mrOk;
end;
procedure MakeForm;
begin
Form1 := CreateForm;
Form1.Left := 192;
Form1.Top := 114;
Form1.Width := 205;
Form1.Height := 209;
Form1.Caption := 'Buy runes';
Form1.Color := clBtnFace;
Form1.Font.Color := clWindowText;
Form1.Font.Height := -11;
Form1.Font.Name := 'Tahoma';
Form1.Font.Style := [];
Form1.PixelsPerInch := 96;
RadioButton1 := TRadioButton.Create(Form1);
RadioButton1.Parent := Form1;
RadioButton1.Left := 0;
RadioButton1.Top := 80;
RadioButton1.Width := 81;
RadioButton1.Height := 17;
RadioButton1.Caption := 'Buy waters';
RadioButton1.TabOrder := 0;
RadioButton2 := TRadioButton.Create(Form1);
RadioButton2.Parent := Form1;
RadioButton2.Left := 0;
RadioButton2.Top := 56;
RadioButton2.Width := 73;
RadioButton2.Height := 17;
RadioButton2.Caption := 'Buy earth';
RadioButton2.TabOrder := 1;
RadioButton3 := TRadioButton.Create(Form1);
RadioButton3.Parent := Form1;
RadioButton3.Left := 0;
RadioButton3.Top := 32;
RadioButton3.Width := 57;
RadioButton3.Height := 17;
RadioButton3.Caption := 'Buy airs';
RadioButton3.TabOrder := 2;
RadioButton4 := TRadioButton.Create(Form1);
RadioButton4.Parent := Form1;
RadioButton4.Left := 0;
RadioButton4.Top := 8;
RadioButton4.Width := 65;
RadioButton4.Height := 17;
RadioButton4.Caption := 'Buy fires';
RadioButton4.Checked := True;
RadioButton4.TabOrder := 3;
RadioButton4.TabStop := True;
RadioButton5 := TRadioButton.Create(Form1);
RadioButton5.Parent := Form1;
RadioButton5.Left := 0;
RadioButton5.Top := 152;
RadioButton5.Width := 73;
RadioButton5.Height := 17;
RadioButton5.Caption := 'Buy chaos';
RadioButton5.TabOrder := 4;
RadioButton6 := TRadioButton.Create(Form1);
RadioButton6.Parent := Form1;
RadioButton6.Left := 0;
RadioButton6.Top := 128;
RadioButton6.Width := 73;
RadioButton6.Height := 17;
RadioButton6.Caption := 'Buy bodys';
RadioButton6.TabOrder := 5;
RadioButton7 := TRadioButton.Create(Form1);
RadioButton7.Parent := Form1;
RadioButton7.Left := 0;
RadioButton7.Top := 104;
RadioButton7.Width := 73;
RadioButton7.Height := 17;
RadioButton7.Caption := 'Buy death';
RadioButton7.TabOrder := 6;
Button1:= TButton.Create(Form1);
Button1.Parent := Form1;
Button1.Left := 80;
Button1.Top := 136;
Button1.Width := 113;
Button1.Height := 33;
Button1.Caption := 'Start';
Button1.TabOrder := 7;
button1.ONCLICK := @clickbutton
end;
procedure SafeShowWF;
var
tva: TVariantArray;
begin
setarraylength(tva, 0);
ThreadSafeCall('MakeForm', tva);
end;
procedure ShowFormModal;
begin
Form1.ShowModal
end;
procedure SafeShowFormModal;
var
tva: TVariantArray;
begin
setarraylength(tva, 0);
ThreadSafeCall('ShowFormModal', tva);
end;
procedure Form;
begin
SafeShowWF;
SafeShowFormModal;
end;
procedure loadbitmaps;
begin
chaos := BitmapFromString(10, 10, 'z78DABD91410E80300804BF5' +
'41264F15885FEFF49D6EAA189C1E04548E6B4B31CB05685561B74' +
'F6D237A04D494B582CBC14BD1835CCC9FFDD0C332E319D3398772' +
'3EBEBF5CC8FDE1B9E1955785F459196E9BC2DC686AA02C37E0023' +
'E789B3');
death := BitmapFromString(10, 10, 'z78DA8D8F510AC4201043AF5' +
'4AD7692CFB18EF73FD25AA70B966ECB1A78204C42A2911BB3AE04' +
'453716AAD3922D5D13B5B0B19D340D5D0B13937AC2E0DD7549002' +
'B77555AD7CED0658C8C4FF72185E30D9E09A31B0143BD5FBE7B9D' +
'5C71D85FBD4F444346FEE7F287B72020BC2FBDF4CCDDA14E6C526' +
'507C4C4FA6F91E6BC7BBD212304E24B91A4C83761F0B161C5DA35' +
'25200A8527E71C6F32F719EBE6840F038187CD');
fire := BitmapFromString(10, 10, 'z78DAE58E510EC4200844AF54' +
'B594994FDAEAFD8F5457D944D3762FB0217924C0BC404341E1C15' +
'0ABD1B618C26A0B577E19B9512C1154A7909F8E03BB13C8387B96' +
'A33333324ECE666384429950839D9E7D71FAB6397122D52A10C8B' +
'8F59BEE14ECB0693ED86058B4DCB36FCEE9069A353FCCDB57BFB3' +
'FFC30B8D147FFF');
water := BitmapFromString(10, 10, 'z78DA8D906D0AC3201005AF1' +
'4E3C7BEF7538DDEFF485D762D58A4A57930606026127606DDE0AD' +
'33D68B89A9DE2CCC2105D652234159CC24510B1B2B818167B1626' +
'2D26BC6E57A6D6B7A87112A32A3A152D0D116ADE6EE4773BBA1BE' +
'CD3AA39E04ABE6D6728FA6D7F47B41E77C1075D6D9DD55D86F684' +
'491473A2043869E2E99CED33DEF86244DDE05E3697D2BE016FD61' +
'8BD6F9EDEE05BD6BD64DD1C70BFFB84EE912755BE17FF70561E88' +
'405');
air := BitmapFromString(10, 10, 'z78DA7D8F510E80200C43AF842' +
'2B6FB0494FB1FC9C5F10199C8927ED0AE79636362929D20EEE30E' +
'3AAF4A626116B0B28CFFA36A62D3B91819BD2B91429A2E1B32039' +
'AE9F4FF5271C13625D5C2BDA2B286E5EE890BF583E7F7AE9E3C50' +
'903DC9D830BAEA257412EE108827F96F98DA1AF4AD1A3EF2199B4' +
'E45C4749191789EBE4584B3D9AEBFC5183C89E90371F4888D');
earth := BitmapFromString(10, 10, 'z78DABD90410AC3300C04BF9' +
'4A4EECEFA68C7F1FF9F5413A7E0928BA1A512CC490CDAB539389C' +
'BC509DBD7A550E5ECA0C1DC8A4F9FB5FB17DFC6C5B69E38D48BC7' +
'8FE6351D8DD73DDD2B1F368DB0D77CF68183DA781C4CADB307A26' +
'0C9845F5FF5D7DC52A049BA2224159E9A254B4F7441F9D0CADBE0' +
'0EB8E864E');
mind := BitmapFromString(10, 10, 'z78DA95913B12C3200C44AF04' +
'06BCAB92EFFD8F146228C4C8458266B6D0E7B18836082F025696A' +
'5F18EC951AB54F133BA5C331ECD4EA2440E2626DBFF42203B9BE4' +
'393116CDF62C9A5C0421E13B7210120BB376C84C87B174671A038' +
'3A659C2AEDE68A8243AFACE147A7ACBD9B38FAB5D8D28C89AB075' +
'F9519C97D90B0239089AA3DE629D60609E7F095A17C1728E1BD55' +
'6A76D778F5FFED7EEE403AA0A8232');
body := BitmapFromString(10, 10, 'z78DA75D0618EC5200804E02B' +
'89ADCF999FD0E2FD8FB43E7113CC66319998A25F69A58B3FA37C4' +
'B54E974350E8E9DAEA2624D676BCC2A51626ECD5AEC6509FAA151' +
'157CF9EC5C5A7425BDC5D48A95FC5C2F827D672389D0F299C8988' +
'40F652E6765D5C29BF7CECA0F5B38871FA66BD52AB77C2B65D622' +
'F7ADD0B219E71B0C7A0880E3A562606CEDCF84B3D7D058D1D18FB' +
'B4BDBD9F1C0B696CCD993B95E5C732DE7102ECCC3FF395094FE2B' +
'24E710D654E1E4FF0674EFBE3339712B7F511662861F539B8584');
end;
procedure ClickBMPS;
begin
wait(300+random(32))
movemousesmooth(x,y)
wait(32+random(16))
clickmouse(x,y,false)
Case Random(4) of
0: ChooseOption(x,y,'uy 10');
1: ChooseOption(x,y,'uy 5');
2: ChooseOption(x,y,'uy 10');
3: ChooseOption(x,y,'uy 10');
end;
procedure NoGP;
begin
Mouse(485,33,3,3,true);
LogOut;
writeln('out of money logged out');
end;
procedure NoRunes;
begin
writeln('shop ran out of stock logging out');
Mouse(485,33,3,3,true);
LogOut;
end;
procedure BuyAirRunes;
begin
if(FindBitmap(Air,x,y))then
ClickBMPS;
Bought:= Bought + 1;
end;
procedure BuychaosRunes;
begin
if(FindBitmap(chaos,x,y))then
ClickBMPS;
Bought:= Bought + 1;
end;
procedure BuyDeathRunes;
begin
if(FindBitmap(death,x,y))then
ClickBMPS;
Bought:= Bought + 1;
end;
procedure BuyFireRunes;
begin
if(FindBitmap(fire,x,y))then
ClickBMPS;
Bought:= Bought + 1;
end;
procedure BuyWaterRunes;
begin
if(FindBitmap(water,x,y))then
ClickBMPS;
Bought:= Bought + 1;
end;
procedure BuyEarthRunes;
begin
if(FindBitmap(earth,x,y))then
ClickBMPS;
Bought:= Bought + 1;
end;
procedure BuyMindRunes;
begin
if(FindBitmap(mind,x,y))then
ClickBMPS;
Bought:= Bought + 1;
end;
procedure BuyBodyRunes;
begin
if(FindBitmap(body,x,y))then
ClickBMPS;
Bought:= Bought + 1;
end;
procedure BuyingWater;
begin
if(RadioButton1.checked)then
WhatToBuy:= Water
end;
procedure BuyingEarth;
begin
if(RadioButton2.checked)then
WhatToBuy:= Earth
end;
Procedure buyingAir;
begin
if(RadioButton3.checked)then
WhatToBuy:= Air
end;
procedure BuyingFire;
begin
if(RadioButton4.checked)then
WhatToBuy:= Fire
end;
procedure Buyingchaos;
begin
if(RadioButton5.checked)then
WhatToBuy:= chaos
end;
procedure BuyingBody;
begin
if(RadioButton6.checked)then
WhatToBuy:= Body
end;
Procedure BuyingDeath;
begin
if(RadioButton7.checked)then
WhatToBuy:= Death
end;
Procedure Buyingwhat;
begin
BuyingWater;
BuyingEarth;
BuyingAir;
BuyingFire;
BuyingWater;
Buyingchaos;
Buyingbody;
BuyingDeath;
end;
procedure BuyThem;
begin
if(WhatToBuy = Mind)then
BuyMindRunes;
if(WhatToBuy = Fire)then
BuyFireRunes;
if(WhatToBuy = Water)then
BuyWaterRunes;
if(WhatToBuy = Earth)then
BuyEarthRunes;
if(WhatToBuy = Air)then
BuyAirRunes;
if(WhatToBuy = Body)then
BuyBodyRunes;
if(WhatToBuy = Death)then
BuyDeathRunes;
if(WhatToBuy = chaos)then
BuychaosRunes;
end;
procedure proggy;
begin
writeln('==================')
writeln('Madness rune buyer')
writeln('==================')
writeln('==worker for:'+ScriptTime2(2)+'==')
writeln('==bought'+IntToStr(bought)+IntToStr(WhatToBuy)+'runes==')
writeln('==================')
writeln('Madness rune buyer')
writeln('==================')
end;
begin
setupsrl;
loadbitmaps;
cleardebug;
Form;
Buyingwhat;
repeat
Buythem;
if(InChat('enough coin')) then NoGP;
if(InChat('shop has ran out of stock'))Then NoRunes;
proggy;
until(False)
end.