SpAz
2007-10-19 05:22:30
Well, I'm not good at scripting, but I would try this out sometime if I had time to….
I think it would be cool to have an Ardy Vial Buyer, seeing that RuneScape has now put an unlimited supply on the shops. The price stays at 10gp each Water-filled Vial in the shop stock. So it should be easy to script something like this. It's not far from either bank. You could start at Ardy Southeast Bank, or Ardy Northwest Bank. I seem to think the Southeast bank near the market is the closest, so that would be the quickest route to travel. 10gp each, get 27 a load. There's your math right there for money taken out of the bank, and how many vials to purchase each trip. You might be able to get 28, depending on if they allow you to swap the cash for another vial in your pack.
Could also have the calculations about how many loads to do, or how many vials to purchase until you logout. Just like Wizzups Essence Miner has included in it. If I have time and want to learn how to script. I will test my abilities with this sort of script and see how it comes out.
If you have anymore questions, feel free to ask me about anything I would think about including in the script….
This is what I have so far, ofcourse I am not a scripter and this is the only part I know about right now. Partially….
Additions to be made:
Trading Procedures to trade shop owners and buy vials.
Remove coins from bank after depositing vials in bank.
Deposit Vials in bank.
Main loop is being traded back and forth to test the procedures and functions to make sure they work correctly before it's put into its entire loop.
Maybe more, trying to think of what else to add…..
Will probably add FindDTM instead of the BMP for the shop and bank eventually. BMP isn't flawless most of the time.
I think it would be cool to have an Ardy Vial Buyer, seeing that RuneScape has now put an unlimited supply on the shops. The price stays at 10gp each Water-filled Vial in the shop stock. So it should be easy to script something like this. It's not far from either bank. You could start at Ardy Southeast Bank, or Ardy Northwest Bank. I seem to think the Southeast bank near the market is the closest, so that would be the quickest route to travel. 10gp each, get 27 a load. There's your math right there for money taken out of the bank, and how many vials to purchase each trip. You might be able to get 28, depending on if they allow you to swap the cash for another vial in your pack.
Could also have the calculations about how many loads to do, or how many vials to purchase until you logout. Just like Wizzups Essence Miner has included in it. If I have time and want to learn how to script. I will test my abilities with this sort of script and see how it comes out.
If you have anymore questions, feel free to ask me about anything I would think about including in the script….
This is what I have so far, ofcourse I am not a scripter and this is the only part I know about right now. Partially….
////////////////////////////////////////////////////////
// Ardy Vial Buyer by: SpAz //
// Thanks to Wizzups Essence Miner for partial pieces //
// Thanks to rogeruk of SRL Forums for input and help //
// Thanks to Hey321 of SRL Forums for input and help //
// Login and enter pin if you have one //
// Setup players in lines ??-??. //
// Add up to 8 players, just specify them setup. //
// Have coins in first slot. //
////////////////////////////////////////////////////////
program ArdyVialBuyer; // Program Name
{.include SRL/SRL.scar}
const
Loads = 38; //Amounts of Loads to do
CoinColor = 1684959; //GP Color (Coins)
var
VialsOfWaterBought, x, y: Integer;
Lost :Boolean;
procedure DeclarePlayers;
begin
HowManyPlayers := 6;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='rsname'; // RuneScape Name {don't use caps}
Players[0].Pass :='password'; // Password
Players[0].Nick :='nickname'; // Nick is 3-4 Letters after the first letter of your name
Players[0].Strings[0] :='****'; // Pin Number
Players[0].Active:=True; // True if using player. False if not.
Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Strings[0] :='';
Players[1].Active:=False;
Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Strings[0] :='';
Players[2].Active:=False;
Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Strings[0] :='';
Players[3].Active:=False;
Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Strings[0] :='';
Players[4].Active:=False;
Players[5].Name :='';
Players[5].Pass :='';
Players[5].Nick :='';
Players[5].Strings[0] :='';
Players[5].Active:=False;
end;
function LoadSymbolBitmaps(Name: string): Integer;
begin
case LowerCase(Name) of
'bank':
begin
SymbolBitmap := BitmapFromString2(False, 'a97DBF78DA9D906B0A05210' +
'846B79499953FB3C7FE97345A70118681994B70922F3D84218430' +
'A222D4A640EE4A92A9CC54AD5ED99876B21B634D9650FFBD9E3CE' +
'D2B2F5616B19E82C392025617EB411025600E604748A04DCFC61C' +
'11C6EA889285B4CFD74C0C757AFAD9E3FCCF7C789F7A6FF67E4FE' +
'FFFFAE727FFD366BE9ADFEFFC6EBE00D73');
result:= 3916767;
end;
'shop':
begin
SymbolBitmap := BitmapFromString(15, 5, 'z78DA95D0410EC4200' +
'840D12B2102C25290DEFF486DCA2C4C9A6666363F46E2D308020D' +
'32D83DA2AA3E6804276633B66B7AB4006E7D5F57E9406E51DD05B' +
'84D78C8435849DD5970E9EC0629AB13B692ABB5B34F279BCF6F32' +
'12A15CE3E8B9B7EE3265C52C73EFF0818A6FB2CA085D4FF317598' +
'484FA9B6C69689FB37FBFF9FEC35D3E01559765AB');
Result := 983385;
end;
end;
end;
function CountVialsOfWater(DTM: Integer): Integer; // Credit to rotflmfwao and rogeruk from SRL
var
VialOfWater, i, x, y: Integer;
TB: Tbox;
begin
GameTab(4);
result:=0;
VialOfWater:=DTMFromString('78DA63E4626060106640015DFDDB183880342' +
'310FF0702462120438A010D302291409A0948481350C30F24F808' +
'A86121420DC8CDB2F8D50000A16906A1');
for i := 1 to 28 do
begin
TB := InvBox(i);
if ExistsItem(i) then
if FindDTM(DTM, x, y, TB.x1, TB.y1, TB.x2, TB.y2) then
Inc(Result);
end;
end;
function OpenArdyBankFast: Boolean; // Credit to rogeruk from SRL (altered by SpAz)
var
x, y, i, l: Integer;
Info: TIntegerArray;
Booths, t: TPointArray;
begin
Info := [300, 190, 605521, 4];
MakeCompass('n');
FindColorsSpiralTolerance(Info[0], Info[1], Booths, Info[2], MSX1, MSY1, MSX2, MSY2, Info[3])
SetArrayLength(t, 0);
t := Booths;
SetArrayLength(Booths, 0);
Booths := ReArrangeAndShortenArray(t, 14);
l := GetArrayLength(Booths) -1;
for i := 0 to l do
begin
Wait(100);
MMouse(Booths[i].X, Booths[i].Y, 0, 0);
Wait(50);
if IsUpText('Bank booth') Then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, False);
Wait(100);
if ChooseOption('Use-quickly') then
Wait(200);
if BankScreen or PinScreen then
begin
Result := True;
if PinScreen then InPin(Players[CurrentPlayer].Strings[0]);
Wait(500);
FixBank;
Result := BankScreen;
FindColorTolerance(x, y, CoinColor, 69, 63, 465, 294, 10);
Mouse(x, y, 1, 1, False);
wait(100+random(100));
ClickOption('Withdraw X', 1);
wait(1000+random(200));
TypeSend('270'); // Amount of GP to Withdraw
Wait(200+random(500));
CloseBank;
Exit;
end else;
end;
end;
end;
procedure ToShop;
var x, y: Integer;
begin
FindRoadColor;
RadialWalk(RoadColor, 300, 320, 65, -1, 0);
Wait(1000);
repeat
RadialWalk(RoadColor, 260, 280, 65, -1, 0);
until FindSymbol(x, y, 'shop')
if (FindSymbol(x, y, 'shop')) then
begin
Mouse(x, y, 5, 5, True);
Writeln('Found the shop symbol');
end else Writeln('Could not find the shop symbol');
end;
procedure BuyVials;
begin
end;
procedure ToBank;
var x , y: Integer;
begin
FindRoadColor;
RadialWalk(RoadColor, 75, 105, 65, -1, 0);
Wait(1000);
repeat
RadialWalk(RoadColor, 115, 133, 65, -1, 0);
until FindSymbol(x, y, 'bank')
if (FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 5, 5, True);
Writeln('Found the bank symbol');
end else Writeln('Could not find the bank symbol');
end;
function FindFastRandoms: Boolean; //By WT-Fakawi.
var
i: Integer;
begin
for i := 1 to 8 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMod then
Result := True;
3: if FindMime then
Result := True;
4: if FindMaze then
Result := True;
5: if FindQuiz then
Result := True;
6: if FindDemon then
Result := True;
7: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
Logout;
Exit;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
Logout;
Exit;
end;
end;
8: RC;
end;
end;
end;
procedure CurrentPlayerReport; // Credit to Wizzup from SRL (altered for my script)
begin
WriteLn('----------------------------------------------')
WriteLn(Players[CurrentPlayer].Name+'.');
WriteLn('Bought ' + IntToStr(Players[CurrentPlayer].Integers[0]) + ' Vials of Water.');
WriteLn('----------------------------------------------')
end;
procedure ProgressReport; // Credit to Wizzup from SRL (altered for my script)
begin
WriteLn('--------- Ardy Vial Buyer - By: Spaz ---------')
if VialsOfWaterBought > 0 then WriteLn('Vials of Water Bought and Banked : '+IntToStr(VialsOfWaterBought)+'.');
Writeln('Worked for '+ TimeRunning);
WriteLn('----------------------------------------------')
CurrentPlayerReport;
SRLRandomsReport;
end;
procedure DoChats; // Credit to Wizzup from SRL (altered by SpAz)
begin
SetChat('On', 1); // Turns Public Chat On (Can be set to 'Off' or 'Friends Onlys')
SetChat('On', 1);
SetChat('Off', 2); // Turns Private Chat to Off (Can be set to 'On' or 'Friends Only')
SetChat('Off', 2);
SetChat('Off', 3); // Turns Trade Chat to Off (Can be set to 'On' or 'Friends Only')
SetChat('Off', 3);
SetChat('Off', 4); // Turns Clan Chat to Off (Can be set to 'On' or 'Friends Only')
SetChat('Off', 4);
end;
procedure SetupScript; // Credit to Wizzup and rogeruk from SRL
begin
SetupSRL;
DeclarePlayers;
ActivateClient;
Wait(100);
if(Not LoggedIn)then LoginPlayer;
Wait(500+random(250));
HighestAngle;
DoChats;
SetBar('Brightness',4); // Sets Brightness Very Bright
Makecompass('N');
end;
begin
SetupScript;
ClearDebug;
repeat
repeat
OpenArdyBankFast;
ToShop;
FindFastRandoms;
ToBank;
FindFastRandoms;
ToShop;
until(Loads = Loads);
if(Lost = True) then
begin
Writeln(Players[CurrentPlayer].Name + ' is lost, switching to next player...');
NextPlayer(False);
end;
if(Lost = False) then
begin
Writeln(Players[CurrentPlayer].Name + ' has finished their loads, switching to next player...');
If(Players[CurrentPlayer].Active = True) then NextPlayer(True);
If(Players[CurrentPlayer].Active = False) then NextPlayer(False);
end;
until(False);
end.Additions to be made:
Trading Procedures to trade shop owners and buy vials.
Remove coins from bank after depositing vials in bank.
Deposit Vials in bank.
Main loop is being traded back and forth to test the procedures and functions to make sure they work correctly before it's put into its entire loop.
Maybe more, trying to think of what else to add…..
Will probably add FindDTM instead of the BMP for the shop and bank eventually. BMP isn't flawless most of the time.