SRL Archive - SRL Archives

a try at farming.scar :P


Awkwardsaw

2009-06-30 07:11:12

i noticed that there arent ANY farming scripts, nor farming includes, plus i was bored and needed a refresher from taking a break :)

hopefully i could get some people to make farming scripts lol

Added:
Function LoadToolDTM(tool: string): integer;
Function GetToolDTM(tool: string): integer;
Function FindTool(tool: string; cx1, cy1, cx2, cy2: integer; click: boolean ): boolean;
procedure StoreTool(tool: string);
procedure StoreCompost(Compost: string; Number: integer; All: Boolean);


so, without further ado

{*******************************************************************************
Function LoadToolDTM(tool: string): integer;
By: akwardsaw
Description: It loads the tool dtms. Only use is for GetToolDTM
*******************************************************************************}
Function LoadToolDTM(tool: string): integer;
var
Spadedtm, Diberdtm, Rakedtm, Curedtm, Compostdtm: integer;
Sackdtm, Secaturesdtm, Basketdtm, Troweldtm: integer;
begin
case tool of
'Spade': Spadedtm := DTMFromString('78DA63B465626078C28006189148206D0954F' +
'398801A63A09AB704D45800D57C20A0C61EA8E61901355E403557' +
'F1AB0100476C06E8');
'Dibber': Diberdtm := DTMFromString('78DA634C62626078C68006189148209D03547' +
'387809A54A09A1704D4C403D5BC23A0A610A8E6117E3500AADB06' +
'97');
'Rake': Rakedtm := DTMFromString('78DA63EC67626078C5800618914820DD4D849' +
'A0EA09A9704D44CA28E1A000742076F');
'Cure': Curedtm := DTMFromString('78DA63DCCFC4C07099010D30229140FA3050C' +
'D43026A8E01D5BC25A0662F50CD07026AB600D5BC24A0662750CD' +
'2DFC6A00C07E09E5');
'Compost': Compostdtm := DTMFromString('78DA634C656260F8C58006189148209D49849' +
'A62A01A4E46FC6AB2806A8409A84902AAE125A02697B07B00EBAF' +
'05B3');
'Sack': Sackdtm := DTMFromString('78DA633466626060676440058C482490B606A' +
'A1126A0C60FA88685801A6FA09A7F0CF8D57800D57CC7AF060000' +
'D5037F');
'Secatures': Secaturesdtm := DTMFromString('78DA634C64626058CDC8800A189148201D035' +
'4B39608359B08A8C902AA394C404D1150CD01026ACA806AF6E257' +
'03002E0406DA');
'Basket': Basketdtm := DTMFromString('78DA639CC2C4C0F08B010D302291407A3A50C' +
'D3F026A2602D53033E257338109898743CD0C22CC990A5423C248' +
'D8CD3FF0BB190041A40742');
'Trowel': Troweldtm := DTMFromString('78DA6394656460086640038C4824905626428' +
'D2690E54D408D3E90E54E408D2A90154E408D1A90154A408D3490' +
'158B5F0D00D0A4035C');
end;
result:= 0;
end;

{*******************************************************************************
Function GetToolDTM(tool: string): integer;
By: akwardsaw
Description: It's result is the Tool's dtm
*******************************************************************************}
Function GetToolDTM(tool: string): integer;
begin
case tool of
'Spade': result:= LoadToolDTM('Spade');
'Dibber': result:= LoadToolDTM('Dibber');
'Rake': result:= LoadToolDTM('Rake');
'Cure': result:= LoadToolDTM('Cure');
'Compost': result:= LoadToolDTM('Compost');
'Sack': result:= LoadToolDTM('Sack');
'Secatures': result:= LoadToolDTM('Secatures');
'Basket': result:= LoadToolDTM('Basket');
'Trowel': result:= LoadToolDTM('Trowel');
end;
end;

{*******************************************************************************
Function FindTool(tool: string; cx1, cy1, cx2, cy2: integer; click: boolean ): boolean;
By: akwardsaw
Description: It returns true or false if the tool is found. If so it either clicks
left, or right, depending in what you put in for Click. True is Left
and im sure as hell theres a way to shorten this procedure :P
*******************************************************************************}
Function FindTool(tool: string; cx1, cy1, cx2, cy2: integer; click: boolean ): boolean;
var
x, y, D: integer;
TSA: TStringArray;
begin
TSA := ['Dibber','Rake','Cure','Compost' +
'Sack','Secatures','Basket','Trowel']
d := GetToolDTM(Tool);
if FindDTM(d, x, y, cx1, cy1, cx2, cy2) then
begin
mmouse(x, y, 4, 4);
wait(100+random(100));
if IsuptextMultiCustom([TSA]) then
begin
getmousepos(x, y);
result := True;
mouse(x, y, 0, 0, click);
end;
end;
FreeDTM(D);
end;

{*******************************************************************************
procedure StoreTool(tool: string);
By: akwardsaw
Description: It stores the tool. Only if You are at the storing screen, and if it
is in your inventory. it works with every thing other than Compost
*******************************************************************************}
procedure StoreTool(tool: string);
var x, y: integer;
begin
case tool of
'Spade': if FindColor(x, y, 6608765, 575, 264, 614, 281)then FindTool(tool, mix1, miy1, mix2, miy2, true);
'Dibber': if FindColor(x, y, 6608765, 669, 216, 710, 232)then FindTool(tool, mix1, miy1, mix2, miy2, true);
'Rake': if FindColor(x, y, 6608765, 578, 215, 611, 231)then FindTool(tool, mix1, miy1, mix2, miy2, true);
'Secatures': if FindColor(x, y, 6608765, 659, 265, 720, 279)then FindTool(tool, mix1, miy1, mix2, miy2, true);
'Trowel': if FindColor(x, y, 6608765, 668, 311, 709, 328)then FindTool(tool, mix1, miy1, mix2, miy2, true);
'Watering Can': if FindColor(x, y, 6608765, 556, 313, 632, 327)then FindTool(tool, mix1, miy1, mix2, miy2, true);
'Scarecrow': if FindColor(x, y, 6608765, 565, 361, 624, 376)then FindTool(tool, mix1, miy1, mix2, miy2, true);
end;
end;

{*******************************************************************************
procedure StoreCompost(Compost: string; Number: integer; All: Boolean);
By: akwardsaw
Description: It stores the Compost. Only if You are at the storing screen, and if it
is in your inventory
im also sure there is a way to shorten this :P
*******************************************************************************}
procedure StoreCompost(Compost: string; Number: integer; All: Boolean);
var x, y: integer;
begin
case Compost of
'Compost': begin
if FindColor(x, y, 6608765, 568, 407, 622, 425)then
begin
if All then
begin
FindTool(Compost, mix1, miy1, mix2, miy2, false);
Chooseoption('Store All');
wait(50 + random(50));
exit;
end;
if Number = 1 then FindTool(Compost, mix1, miy1, mix2, miy2, true);
if Number = 5 then
begin
FindTool(Compost, mix1, miy1, mix2, miy2, false);
Chooseoption('Store 5');
wait(50 + random(50));
exit;
end;
if all = false then
if Number > 1 then
if Number <> 5 then
begin
FindTool(Compost, mix1, miy1, mix2, miy2, false);
Chooseoption('Store X');
wait(50 + random(50));
typesend(inttostr(number));
exit;
end;
end;
end;
'Supercompost': begin
if FindColor(x, y, 6608765, 649, 409, 731, 422)then
begin
if All then
begin
mousebox(678, 431, 694, 451, 2);
Chooseoption('Store All');
wait(550 + random(500));
exit;
end;
if Number = 1 then mousebox(678, 431, 694, 451, 1);
if Number = 5 then
begin
mousebox(678, 431, 694, 451, 2);
Chooseoption('Store 5');
wait(550 + random(500));
exit;
end;
if not all then
if Number < 1 then
if Number <> 5 then
begin
mousebox(678, 431, 694, 451, 2);
Chooseoption('Store X');
wait(2500 + random(500));
typesend(inttostr(number));
exit;
end;
end;
end;

'Bucket': begin
if FindColor(x, y, 6608765, 664, 360, 713, 375)then
begin
if All then
begin
mousebox(678, 385, 694, 402, 2);
Chooseoption('Store All');
wait(250 + random(500));
exit;
end;
if Number = 1 then mousebox(678, 385, 694, 402, 1);
if Number = 5 then
begin
mousebox(678, 385, 694, 402, 2);
Chooseoption('Store 5');
wait(250 + random(500));
exit;
end;
if not all then
if Number < 1 then
if Number <> 5 then
begin
mousebox(678, 385, 694, 402, 2);
Chooseoption('Store X');
wait(250 + random(500));
typesend(inttostr(number));
exit;
end;
end;
end;
end;
end;

/me thinks its not half bad for 10 min or so of work :p

noidea

2009-06-30 07:35:33

{*******************************************************************************
Function FindTool(tool: string; cx1, cy1, cx2, cy2: integer; click: boolean ): boolean;
By: akwardsaw | noidea XD
Description: It returns true or false if the tool is found. If so it either clicks
left, or right, depending in what you put in for Click. True is Left
*******************************************************************************}
Function FindTool(tool: string; cx1, cy1, cx2, cy2: integer; click: boolean ): boolean;
var
x, y, D: integer;
TSA: TStringArray;
begin
TSA := ['asfd', Uptexts...];
d := GetToolDTM(Tool);
if FindDTM(d, x, y, cx1...) then
begin
mmouse(x, y, 4, 4);
wait(100+random(100));
if IsuptextMultilCustom([TSA]) then
begin
getmousepos(x, y);
result := True;
mouse(x, y, 0, 0, click);
end;
end
FreeDTM(D);
end;
Try :D

Oh, and you might want to LowerCase() Tools, in every function

Awkwardsaw

2009-06-30 07:38:44

thanks, ill work on it a bit i guess:P
i cant test atm but it looks good

noidea

2009-06-30 07:44:02

just put all the items uptxts in the []

Awkwardsaw

2009-06-30 07:45:55

yeah,
Function FindTool(tool: string; cx1, cy1, cx2, cy2: integer;  click: boolean ): boolean;
var
x, y, D: integer;
TSA: TStringArray;
begin
TSA := ['Dibber','Rake','Cure','Compost' +
'Sack','Secatures','Basket','Trowel']
d := GetToolDTM(Tool);
if FindDTM(d, x, y, cx1, cy1, cx2, cy2) then
begin
mmouse(x, y, 4, 4);
wait(100+random(100));
if IsuptextMultilCustom([TSA]) then
begin
getmousepos(x, y);
result := True;
mouse(x, y, 0, 0, click);
end;
end
FreeDTM(D);
end;

:)

i think the same thing can be done with storecompost, right?

noidea

2009-06-30 07:48:23

Hmm, I forgot if IsUpTextMultiCustom([]) checks to see if every uptext matches or if only one does.
If it checks for the second option(^) this shcould work :)

Awkwardsaw

2009-06-30 07:50:37

i think multicustom is all of them, i think i remember using it before :P

senrath

2009-06-30 07:58:41

IsUpTextMultiCustom checks each with an inclusive OR statement. Meaning if any of the uptexts in the array are found, it'll result as true.

Awkwardsaw

2009-06-30 08:00:13

mmkay =p

thanks for clearing it up i guess

Da 0wner

2009-07-03 15:18:19

{*******************************************************************************
Function LoadToolDTM(tool: string): integer;
By: akwardsaw
Description: It loads the tool dtms. Only use is for GetToolDTM
*******************************************************************************}
Function LoadToolDTM(tool: string): integer;
var
Spadedtm, Diberdtm, Rakedtm, Curedtm, Compostdtm: integer;
Sackdtm, Secaturesdtm, Basketdtm, Troweldtm: integer;
begin
case tool of
'Spade': Spadedtm := DTMFromString('78DA63B465626078C28006189148206D0954F' +
'398801A63A09AB704D45800D57C20A0C61EA8E61901355E403557' +
'F1AB0100476C06E8');
'Dibber': Diberdtm := DTMFromString('78DA634C62626078C68006189148209D03547' +
'387809A54A09A1704D4C403D5BC23A0A610A8E6117E3500AADB06' +
'97');
'Rake': Rakedtm := DTMFromString('78DA63EC67626078C5800618914820DD4D849' +
'A0EA09A9704D44CA28E1A000742076F');
'Cure': Curedtm := DTMFromString('78DA63DCCFC4C07099010D30229140FA3050C' +
'D43026A8E01D5BC25A0662F50CD07026AB600D5BC24A0662750CD' +
'2DFC6A00C07E09E5');
'Compost': Compostdtm := DTMFromString('78DA634C656260F8C58006189148209D49849' +
'A62A01A4E46FC6AB2806A8409A84902AAE125A02697B07B00EBAF' +
'05B3');
'Sack': Sackdtm := DTMFromString('78DA633466626060676440058C482490B606A' +
'A1126A0C60FA88685801A6FA09A7F0CF8D57800D57CC7AF060000' +
'D5037F');
'Secatures': Secaturesdtm := DTMFromString('78DA634C64626058CDC8800A189148201D035' +
'4B39608359B08A8C902AA394C404D1150CD01026ACA806AF6E257' +
'03002E0406DA');
'Basket': Basketdtm := DTMFromString('78DA639CC2C4C0F08B010D302291407A3A50C' +
'D3F026A2602D53033E257338109898743CD0C22CC990A5423C248' +
'D8CD3FF0BB190041A40742');
'Trowel': Troweldtm := DTMFromString('78DA6394656460086640038C4824905626428' +
'D2690E54D408D3E90E54E408D2A90154E408D1A90154A408D3490' +
'158B5F0D00D0A4035C');
end;
result:= 0;
end;

Does that even work?

You don't set the result to anything other than 0. It should be result := DTMFromString('blahblah');

Also make sure you get rid of the result := 0 so it does not reset it after it sets the DTM. You should use lowercase too.

Tickyy

2009-07-03 16:03:12

dude, DTM's lag alot and are slow

Bitmaps are better at the moment, so use them.

noidea

2009-07-03 21:11:22

From: Tickyy
dude, DTM's lag alot and are slow

Bitmaps are better at the moment, so use them.


Interesting. I didn't know that Bitmaps are faster :o

Awkwardsaw

2009-07-04 00:09:01

me too :P i'll convert these tonight, i have other things to do atm

also da owner, yes it does work, although you are right that it should be result:= finddtm

Shuttleu

2009-07-04 01:37:23

replce GetToolDTM with this as LoadToolDTM is only used for GetToolDTM which made no sense
function GetToolDTM(tool: string): integer;
begin
case tool of
'Spade': result := DTMFromString('78DA63B465626078C28006189148206D0954F' +
'398801A63A09AB704D45800D57C20A0C61EA8E61901355E403557' +
'F1AB0100476C06E8');
'Dibber': result := DTMFromString('78DA634C62626078C68006189148209D03547' +
'387809A54A09A1704D4C403D5BC23A0A610A8E6117E3500AADB06' +
'97');
'Rake': result := DTMFromString('78DA63EC67626078C5800618914820DD4D849' +
'A0EA09A9704D44CA28E1A000742076F');
'Cure': result := DTMFromString('78DA63DCCFC4C07099010D30229140FA3050C' +
'D43026A8E01D5BC25A0662F50CD07026AB600D5BC24A0662750CD' +
'2DFC6A00C07E09E5');
'Compost': result := DTMFromString('78DA634C656260F8C58006189148209D49849' +
'A62A01A4E46FC6AB2806A8409A84902AAE125A02697B07B00EBAF' +
'05B3');
'Sack': result := DTMFromString('78DA633466626060676440058C482490B606A' +
'A1126A0C60FA88685801A6FA09A7F0CF8D57800D57CC7AF060000' +
'D5037F');
'Secatures': result := DTMFromString('78DA634C64626058CDC8800A189148201D035' +
'4B39608359B08A8C902AA394C404D1150CD01026ACA806AF6E257' +
'03002E0406DA');
'Basket': result := DTMFromString('78DA639CC2C4C0F08B010D302291407A3A50C' +
'D3F026A2602D53033E257338109898743CD0C22CC990A5423C248' +
'D8CD3FF0BB190041A40742');
'Trowel': result := DTMFromString('78DA6394656460086640038C4824905626428' +
'D2690E54D408D3E90E54E408D2A90154E408D1A90154A408D3490' +
'158B5F0D00D0A4035C');
end;
end;
then delete LoadToolDTM
also DTM's are faster than bitmaps!

~shut

Da 0wner

2009-07-04 01:40:31

Nope, bitmaps are way faster in 3.20.

Shuttleu

2009-07-04 01:57:10

From: Da 0wner
Nope, bitmaps are way faster in 3.20.


maybe when they are small
but if they are big…

~shut

Awkwardsaw

2009-07-04 02:02:59

im staying out of the"which is faster" argument, but i personally like dtms because if theyre ease and effectivity.

and i honestly dont know why i made the dtms into 2 functions

noidea

2009-07-04 18:31:47

I tried to add a bit more standard to it, and did other things, cant rremember.

{*******************************************************************************
Function LoadToolDTM(tool: string): integer;
By: akwardsaw
Description: It loads the tool dtms. Only use is for GetToolDTM
*******************************************************************************}
Function LoadToolDTM(tool: string): integer;
begin
case LowerCase(tool) of
'spade': Result := DTMFromString('78DA63B465626078C28006189148206D0954F' +
'398801A63A09AB704D45800D57C20A0C61EA8E61901355E403557' +
'F1AB0100476C06E8');
'dibber': Result := DTMFromString('78DA634C62626078C68006189148209D03547' +
'387809A54A09A1704D4C403D5BC23A0A610A8E6117E3500AADB06' +
'97');
'rake': Result := DTMFromString('78DA63EC67626078C5800618914820DD4D849' +
'A0EA09A9704D44CA28E1A000742076F');
'cure': Result := DTMFromString('78DA63DCCFC4C07099010D30229140FA3050C' +
'D43026A8E01D5BC25A0662F50CD07026AB600D5BC24A0662750CD' +
'2DFC6A00C07E09E5');
'compost': Result := DTMFromString('78DA634C656260F8C58006189148209D49849' +
'A62A01A4E46FC6AB2806A8409A84902AAE125A02697B07B00EBAF' +
'05B3');
'sack': Result := DTMFromString('78DA633466626060676440058C482490B606A' +
'A1126A0C60FA88685801A6FA09A7F0CF8D57800D57CC7AF060000' +
'D5037F');
'secatures': Result := DTMFromString('78DA634C64626058CDC8800A189148201D035' +
'4B39608359B08A8C902AA394C404D1150CD01026ACA806AF6E257' +
'03002E0406DA');
'basket': Result := DTMFromString('78DA639CC2C4C0F08B010D302291407A3A50C' +
'D3F026A2602D53033E257338109898743CD0C22CC990A5423C248' +
'D8CD3FF0BB190041A40742');
'trowel': Result := DTMFromString('78DA6394656460086640038C4824905626428' +
'D2690E54D408D3E90E54E408D2A90154E408D1A90154A408D3490' +
'158B5F0D00D0A4035C');
end;
end;

{*******************************************************************************
Function GetToolDTM(tool: string): integer;
By: akwardsaw
Description: It's result is the Tool's dtm
*******************************************************************************}
Function GetToolDTM(tool: string): integer;
begin
case lowercase(tool) of
'spade': result:= LoadToolDTM('Spade');
'dibber': result:= LoadToolDTM('Dibber');
'rake': result:= LoadToolDTM('Rake');
'cure': result:= LoadToolDTM('Cure');
'compost': result:= LoadToolDTM('Compost');
'sack': result:= LoadToolDTM('Sack');
'secatures': result:= LoadToolDTM('Secatures');
'casket': result:= LoadToolDTM('Basket');
'trowel': result:= LoadToolDTM('Trowel');
end;
end;

{*******************************************************************************
Function FindTool(tool: string; cx1, cy1, cx2, cy2: integer; click: boolean ): boolean;
By: akwardsaw | noidea
Description: It returns true or false if the tool is found. If so it either clicks
left, or right, depending in what you put in for Click. True is Left
and im sure as hell theres a way to shorten this procedure :P
*******************************************************************************}
Function FindTool(tool: string; cx1, cy1, cx2, cy2: integer; click: boolean ): boolean;
var
x, y, D: integer;
TSA: TStringArray;
begin
TSA := ['ibbe','ake','ure','ompost',
'ack','ecatures','asket','rowel']
d := GetToolDTM(Lowercase(Tool));
if FindDTM(d, x, y, cx1, cy1, cx2, cy2) then
begin
mmouse(x, y, 4, 4);
wait(100+random(100));
if IsuptextMultiCustom([TSA]) then
begin
getmousepos(x, y);
result := True;
mouse(x, y, 0, 0, click);
end;
end;
FreeDTM(D);
end;

{*******************************************************************************
procedure StoreTool(tool: string);
By: akwardsaw
Description: It stores the tool. Only if You are at the storing screen, and if it
is in your inventory. it works with every thing other than Compost
*******************************************************************************}
procedure StoreTool(tool: string);
var x, y: integer;
begin
case tool of
'Spade': if FindColor(x, y, 6608765, 575, 264, 614, 281)then FindTool(tool, mix1, miy1, mix2, miy2, true);
'Dibber': if FindColor(x, y, 6608765, 669, 216, 710, 232)then FindTool(tool, mix1, miy1, mix2, miy2, true);
'Rake': if FindColor(x, y, 6608765, 578, 215, 611, 231)then FindTool(tool, mix1, miy1, mix2, miy2, true);
'Secatures': if FindColor(x, y, 6608765, 659, 265, 720, 279)then FindTool(tool, mix1, miy1, mix2, miy2, true);
'Trowel': if FindColor(x, y, 6608765, 668, 311, 709, 328)then FindTool(tool, mix1, miy1, mix2, miy2, true);
'Watering Can': if FindColor(x, y, 6608765, 556, 313, 632, 327)then FindTool(tool, mix1, miy1, mix2, miy2, true);
'Scarecrow': if FindColor(x, y, 6608765, 565, 361, 624, 376)then FindTool(tool, mix1, miy1, mix2, miy2, true);
end;
end;

{*******************************************************************************
procedure StoreCompost(Compost: string; Number: integer; All: Boolean);
By: akwardsaw
Description: It stores the Compost. Only if You are at the storing screen, and if it
is in your inventory
im also sure there is a way to shorten this :P
*******************************************************************************}
procedure StoreCompost(Compost: string; Number: integer; All: Boolean);
var x, y: integer;
begin
case Lowercase(Compost) of
'compost':
begin
if FindColor(x, y, 6608765, 568, 407, 622, 425)then
begin
if All then
begin
FindTool(Compost, mix1, miy1, mix2, miy2, false);
Chooseoption('Store All');
wait(50 + random(50));
exit;
end;
if Number = 1 then
FindTool(Compost, mix1, miy1, mix2, miy2, true);
if Number = 5 then
begin
FindTool(Compost, mix1, miy1, mix2, miy2, false);
Chooseoption('Store 5');
wait(50 + random(50));
exit;
end;
if not All then
if Number > 1 then
if Number <> 5 then
begin
FindTool(Compost, mix1, miy1, mix2, miy2, false);
Chooseoption('Store X');
wait(50 + random(50));
typesend(inttostr(number));
exit;
end;
end;
end;
'supercompost':
begin
if FindColor(x, y, 6608765, 649, 409, 731, 422)then
begin
if All then
begin
mousebox(678, 431, 694, 451, 2);
Chooseoption('Store All');
wait(550 + random(500));
exit;
end;
if Number = 1 then
mousebox(678, 431, 694, 451, 1);
if Number = 5 then
begin
mousebox(678, 431, 694, 451, 2);
Chooseoption('Store 5');
wait(550 + random(500));
exit;
end;
if not all then
if Number < 1 then
if Number <> 5 then
begin
mousebox(678, 431, 694, 451, 2);
Chooseoption('Store X');
wait(2500 + random(500));
typesend(inttostr(number));
exit;
end;
end;
end;

'bucket':
begin
if FindColor(x, y, 6608765, 664, 360, 713, 375)then
begin
if All then
begin
mousebox(678, 385, 694, 402, 2);
Chooseoption('Store All');
wait(250 + random(500));
exit;
end;
if Number = 1 then
mousebox(678, 385, 694, 402, 1);
if Number = 5 then
begin
mousebox(678, 385, 694, 402, 2);
Chooseoption('Store 5');
wait(250 + random(500));
exit;
end;
if not all then
if Number < 1 then
if Number <> 5 then
begin
mousebox(678, 385, 694, 402, 2);
Chooseoption('Store X');
wait(250 + random(500));
typesend(inttostr(number));
exit;
end;
end;
end;
end;
end;

Awkwardsaw

2009-07-04 18:37:27

alright, thanks :D i'ma update/ fix/ add stuff later today

Naum

2009-07-04 19:27:35

Function GetToolDTM(tool: string): integer;
Var Arr : TStringArray;
I : Byte;
begin
Arr := ['spade', 'dibber', 'rake', 'cure', 'compost', 'sack', 'secatures', 'basket', 'trowel'];
For I := 0 to High(Arr) Do
If LowerCase(Tool) = Arr[I] Then
Result := LoadToolDTM(Capitalize(Arr[I]);
end;

I think you should have a lowercase instead some else enters it wrong.
Good one!

Awkwardsaw

2009-07-04 19:32:18

yeah, i need to add lower case to all of my cases :P

and naum, the reason i did it my way, as in having a case load the dtms separate, was because i think it saves time and memory, although if you think it doesnt really make a difference, i'll put yours in. also i was gonna put loadtooldtm into gettooldtm, since its useless having them like they are now, other than neatness :P

Torrent of Flame

2009-07-04 20:20:20

Da 0wner, alot of people are still on Scar 3.15.

You have to remember to be crosscompatible.

Smarter Child

2009-07-04 21:11:52

Yes, that is true, I am currently using 3.15.

ShowerThoughts

2009-07-04 21:50:56

This is one of my ideas make a boolean for BMPorDTM = True;

Awkwardsaw

2009-07-04 22:27:20

Oo. :P thats a good one. go ahead and make it :P