SRL Archive - Help and Support

Second Script


weaselforce

2006-04-02 20:14:21

kk probably the last time i'll have to do this, but its review time again! o yay!. But seriously, i greatly appreciate any input and it helps me alot. I tried to get the standards down this time, but i realised i wrote most of it without the standards so i had to go back through.


{ Weaselforce's ubtastic BowStringer |
| |
| Only my second script, i'm not teh 1337 yet |
| |
| Big thanks to SRL community for getting me |
|excited in scar scripting and for all their help |
{_________________________________________________}

// Based Heavily on "pdStringer" by philodespotos. much <3

// DIRECTIONS:
// Fill in the amount to do, sit back, and relax
// Only my second script, i'd greatly appreciate any
// suggestions or revisions.

//changelog : Version Beta
//made the script, tested it, made it work

// Current Version: Beta

program WeaselStringer;

{.include SRL/SRL.scar}

Const
AmountToDo = 2; //amount of bows to make

var
amount,amountleft,amountdone:integer;


Procedure BankingWithdraw;
begin
if(not(BankScreen))then
OpenBank;
DepositAll;
Fixbank;
if (amountleft >=14)then
begin
amount := 14
Withdraw(1,1,14);
Withdraw(2,1,0);
CloseWindow;
Wait(random(350)+150);
DragItem(1,28);
end
else
begin
Amount := AmountLeft
Withdraw(2,1,1)
Withdraw(1,1,1)
Withdraw(1,1,amount-1)
Withdraw(2,1,amount-1)
Closewindow;
Wait(random(350)+100);
DragItem(1,28)
DragItem(2,27)
end;
end;

Procedure Stringin;
var Strung:integer;
begin
Strung := 0
repeat
UseItem(27);
UseItem(28);
Strung := strung + 1
UseItem(28);
UseItem(27);
Strung := Strung + 1
until(Strung = Amount)
amountleft := -14
amountdone := +14
end;

procedure BankingDeposit;
begin
OpenBank;
Wait(200+random(50));
Deposit(1,2,0)
CloseWindow;
end;

procedure RandomEvents;
begin
FindMiscRandoms;
FindNormalRandoms;
end;

begin
SetupSRL;
BenMouse := False
amountleft := amounttodo
RandomEvents;
repeat
amount := 0
BankingWithdraw;
ChatsOff;
Stringin;
RandomEvents;
BankingDeposit;
until(AmountDone>=AmountToDo)
BankingDeposit;
SetChat('on',1)
TypeSend('Im Teh awesome! done stringin!'+chr(13));
writeln('finished Stringin all the bows')
writeln('Loggin out')
logout;
end.

solemn wishes

2006-04-03 03:47:35

looks quite nice, ill say before anyone else picks it up that the standard's arnt what other people call standards (know from experience). the only thing i will say is make it a lil neater and get rid of


Strung := 0

its not needed.

XxKanexX

2006-04-03 04:30:37

I implimented my standards just to make it a bit more understandable. I hope you don't mind :)

Good script and thanx for posting it.
Edit: I made it a bit more neater at the start to. And more legible. :) Enjoy!

[FONT="Courier New"]
{-------------------------------------------------]
| Weaselforce's ubtastic BowStringer |
| |
| Only my second script, i'm not teh 1337 yet |
| |
| Big thanks to SRL community for getting me |
|excited in scar scripting and for all their help |
[_________________________________________________]
| |
| Based Heavily on "pdStringer" by philodespotos. |
| MUCH <3 |
| |
| DIRECTIONS: |
|Fill in the amount to do, sit back, and relax |
|Only my second script, i'd greatly appreciate any|
| suggestions or revisions. |
| |
| changelog : Version Beta |
| made the script, tested it, made it work |
| |
| Current Version: Beta |
[_________________________________________________}



program WeaselStringer;

{.include SRL/SRL.scar}

//-----------------------------------------------------//

Const
AmountToDo = 2; // Amount of bows to make.

//-----------------------------------------------------//



var
amount,amountleft,amountdone:integer;


Procedure BankingWithdraw;
begin
if(not(BankScreen))then
OpenBank;
DepositAll;
Fixbank;
if (amountleft >=14)then
begin
amount := 14
Withdraw(1,1,14);
Withdraw(2,1,0);
CloseWindow;
Wait(random(350)+150);
DragItem(1,28);
end else
begin
Amount := AmountLeft
Withdraw(2,1,1)
Withdraw(1,1,1)
Withdraw(1,1,amount-1)
Withdraw(2,1,amount-1)
Closewindow;
Wait(random(350)+100);
DragItem(1,28)
DragItem(2,27)
end;
end;

Procedure Stringin;
var Strung: integer;
begin
repeat
UseItem(27);
UseItem(28);
Strung := strung + 1
UseItem(28);
UseItem(27);
Strung := Strung + 1
until(Strung = Amount)
amountleft := -14
amountdone := +14
end;

procedure BankingDeposit;
begin
OpenBank;
Wait(200+random(50));
Deposit(1,2,0)
CloseWindow;
end;

procedure RandomEvents;
begin
FindMiscRandoms;
FindNormalRandoms;
end;

begin
SetupSRL;
BenMouse := False
amountleft := amounttodo
RandomEvents;
repeat
amount := 0
BankingWithdraw;
ChatsOff;
Stringin;
RandomEvents;
BankingDeposit;
until(AmountDone>=AmountToDo)
BankingDeposit;
SetChat('on',1)
TypeSend('Im Teh awesome! done stringin!'+chr(13));
writeln('finished Stringin all the bows')
writeln('Loggin out')
logout;
end.[/FONT]

:)

weaselforce

2006-04-03 10:04:11

lol no, greatly appreciated, like i said