SRL Archive - OSR Help

Help with Banking


Sirenia

2012-03-08 17:21:26

So guys ive tried out the art of scripting and I got a result that atleast compiles and with some DTM's, BitMaps and AutoColor included. Im working on a NatureRunecrafter, its more or less a rewrite of RyGuys Astral crafter (Creds to him!!). I got summoning working, drinks summ pot when low summ points, summons new graahk when needed, repairing pouches since I borrow some stuff from RyGuy :) My problem is however that I dont know how to make it withdraw a new Ring of Dueling, lets take a look on the code I got so far!
procedure TeleportToCw;
begin
MouseEquippedItem('ring', 3);
if WaitUpTextMulti(['Ring','Rin','ing'], 1500) then
begin
if IsUpText('1') then
WriteLn('Its our last charge!');
end;
ChooseOption('astle');
Wait(750 + random(200));
end;
That one for tele to Castle Wars :)
procedure HandleBank;
begin
if BankScreen then
begin
DepositNats;
CheckSumPoints;
RepairPouches;
FillPouches;
end;
end;
And this one goes for handling the bank, could it be possible to make the TeleToCw procedure into a function and it will return true if it sees that its only one charge left? Any help would be very awesome since this is more or less my first script :)

This script wont be used for leeching nats dry, Im pretty sure that my code wouldnt be stable/efficient enough to handle that anyway.

Sirenia

2012-03-09 08:01:24

Bump!

Ashaman88

2012-03-09 09:06:44

This is a pretty complex script and a lot of things can go wrong.

That being said, the one that I made for personal use I just had it look for black chat message "ust" for when the ring crumbles and that queued me to withdrawal a new one, if you wanted to do it with 1 charge left, just look for "1"

Sirenia

2012-03-09 09:15:18

procedure TeleportToCw;
begin
MouseEquippedItem('ring', 3);
if WaitUpTextMulti(['Ring','Rin','ing'], 1500) then
begin
if IsUpText('1') then
WriteLn('Its our last charge!');
end;
ChooseOption('astle');
Wait(750 + random(200));
end;
Could be
function TeleportToCw: boolean;
begin
MouseEquippedItem('ring', 3);
if WaitUpTextMulti(['Ring','Rin','ing'], 1500) then
begin
if IsUpText('1') then
WriteLn('Its our last charge!');
Result := True;
end;
ChooseOption('astle');
Wait(750 + random(200));
end;
And
procedure HandleBank;
begin
if BankScreen then
begin
DepositNats;
CheckSumPoints;
if ((TeleportToCw) = True) then
Begin
{Find DTM for ring and equip?}
end;
RepairPouches;
FillPouches;
end;
end;

Sirenia

2012-03-09 12:36:42

I still need help so ill thow in another bump!

Invalid

2012-03-23 19:28:49

How do you plan on getting to the chest once you are at castle wars?

Gucci

2012-03-25 13:09:31

From: Invalid
How do you plan on getting to the chest once you are at castle wars?


For walking to chest:

procedure TeleportToCw;
begin
MouseEquippedItem('ring', 3);
if WaitUpTextMulti(['Ring','Rin','ing'], 1500) then
begin
if IsUpText('1') then
WriteLn('Its our last charge!');
end;
ChooseOption('astle');
Wait(750 + random(200));
SPS_WalkToPos(SPS Point Here);
end;

And for withdrawing:

function NeedNewRing: Boolean; // Function to find if new ring is needed
begin
if FindBlackChatMessage('crumbled to dust') then
begin
Result := True
end else
Result := False
end;

procedure EquipRing; // This will equip the ring of dueling if found in inventory
begin
if FindDTM(Ring, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(x, y, 1, 1);
if IsUpText('ing') then
begin
Mouse(x, y, 0, 0, True);
end;
end;
end;

procedure HandleBank;
begin
if BankScreen then
begin
DepositNats;
CheckSumPoints;
if ((NeedNewRing) = True) then
Begin
WithDraw(0, 0, 1); // Will withdraw one unit of the first item in that bank slot
end;
RepairPouches;
FillPouches;
EquipRing;
end;
end;