SRL Archive - First Scripts

New SRL Function


Blender

2008-10-19 09:38:26

Just for fun, I made an SRL function that drops specified logs in your inventory like Willows, Plain Logs, and Oaks.

To use it, add it to a script, or just make a custom include file.
When you see the three options in the script, use True or False to specify whether you want to drop that type of log.

Have fun!

Comments are appreciated!

procedure DropLogsInInventory(NormalLogs, OakLogs, WillowLogs: Boolean);
var a, Willows, Oaks, Normals: Integer;
begin
for a:= 1 to 28 do
begin
MMouseItem(a);
Sleep(Random(100));

if ((LowerCase(GetUpText) = LowerCase('Use Willow logs / 2 more options')) and WillowLogs = True) then
begin
DropItem(a);
WriteLn('Dropping a Willow Log...');
Willows := Willows + 1;
end;

if ((LowerCase(GetUpText) = LowerCase('Use Oak logs / 2 more options')) and OakLogs = True) then
begin
DropItem(a);
WriteLn('Dropping an Oak Log...');
Oaks := Oaks + 1;
end;

if ((LowerCase(GetUpText) = LowerCase('Use Logs / 2 more options')) and NormalLogs = True) then
begin
DropItem(a);
WriteLn('Dropping a Normal Log...');
Normals := Normals + 1;
end;
end;

Writeln('|---------------------|');
Writeln('| Log Dropping Proggy |');
Writeln('|---------------------|');
Writeln('| Willow Logs: ' + IntToStr(Willows) + ' |');
Writeln('| Normal Logs: ' + IntToStr(Normals) + ' |');
Writeln('| Oak Logs: ' + IntToStr(Oaks) + ' |');
Writeln('|---------------------|');
end;

Shuttleu

2008-10-19 09:40:23

too simple for a srl function

but good try though

~shut

Blender

2008-10-19 09:47:07

Can you give me any ideas?
I really want to script something, but I don't know what…

NiiX

2008-10-19 09:47:29

From: Shuttleu
too simple for a srl function

but good try though

~shut


*Whip sound*

Yeah its good but its same code over and over..

Blender

2008-10-19 09:48:57

Can anyone give me an idea for a function or something to make?

Nava2

2008-10-19 09:56:12

Try upgrading that to a case, also, you don't need so much uptext! :)

Nice start though!

Claymore

2008-10-19 12:11:31



function DropLogs(CaseLogs: string): Boolean;
begin
case Lowercase(CaseLogs) of
'oaks': ....
'yews':
'willows':
'magics?':
end;
end;

Read tutorials on CASES.

BTW, i put Magic logs and a '?' on there ;p

in2it

2008-11-01 23:19:18

nice script for your first man

Aser

2008-11-16 22:20:53

If you are looking for something to script look in one of the request sections.

megachips

2008-11-20 03:27:19

Good try ^_^ i quite like it

Sandstorm

2008-11-20 07:57:15

Not bad, but there's already a DropAll; and DropAllExcept; out there :/.

NiCbaZ

2008-11-20 14:51:39

procedure DropLogsInInventory(logs : String);
var
a, Willows: Integer;
Oaks, Normals: Integer; '

begin
for a:= 1 to 28 do
begin
MMouseItem(a);
Sleep(Random(100));
case logs of
'willow': Result:= GetUpText('Use Willow logs / 2 more options');
'oak' : Result:= GetUpText('Use Oak logs / 2 more options');
'normal': Result:= GetUpText('Use logs / 2 more options');
end;
if Result Then
begin
DropItem(a)
WriteLn('Droped Log '+ IntToStr(I));
end;
end;
end;



:)

Griff

2008-11-26 22:59:58

lol @ NicbaZ… and I like th eway you did th eprocedure, but I think its too simple for a SRL function.

Sandstorm

2008-11-27 00:20:24

Have you seen the MarkTime procedure? Or the TimeFromMark? Both One-liners. Probably more then those as well.