SRL Archive - SRL Suggestions

Book of Expierence?


nickrules

2010-07-06 14:03:53

book of xp is the same as a lamp, just a different DTM.
Below shows the modified code (didn't take much to add)

function FindLamp(skill: string): Boolean;
var
LampTime, X, Y, I, book: Integer;
begin
GameTab(tab_Inv);
book := DTMFromString('78DA639CCAC4C0E0CBC8800C4AF2F319B8803' +
'448F43F1030B603D584A0AA61606082AB0101C6694035B104D42C' +
'01AAF124A06632508D23013533806AC250D518E9A8A1A80100A03' +
'C0B94');
if not SRLBitmapsLoaded then
LoadSRLBitMaps;
if (FindDTM(Lamp, x, y, MIX1, MIY1, MIX2, MIY2) or FindDTM(book, x, y, MIX1, MIY1, MIX2, MIY2)) then
begin
Result := True;
Inc(RandSolved[rand_Lamp]);
TakeScreen('Lamp Random Solved');
AddToSRLLog('******** SOLVED XP LAMP/BOOK RANDOM ********');
WriteLn('******** SOLVED XP LAMP/BOOK RANDOM ********');
Mouse(X, Y, 4, 4, True);
Wait(1500 + Random(500));
MarkTime(LampTime);
for I := 1 to 4 do
begin
case (LowerCase(Skill)) of
'attack': Mouse(81, 109, 12, 12, True);
'strength': Mouse(139, 110, 12, 12, True);
'ranged': Mouse(196, 113, 12, 12, True);
'magic': Mouse(257, 117, 12, 12, True);
'defence': Mouse(319, 109, 12, 12, True);
'crafting', 'craft': Mouse(376, 111, 12, 12, True);
'hitpoints', 'hp': Mouse(436, 112, 12, 12, True);
'prayer', 'pray': Mouse(79, 166, 12, 12, True);
'agility': Mouse(141, 166, 12, 12, True);
'herblore': Mouse(199, 171, 12, 12, True);
'thieving', 'thief': Mouse(258, 167, 12, 12, True);
'fishing', 'fish': Mouse(325, 164, 12, 12, True);
'runecraft', 'runecrafting': Mouse(375, 167, 12, 12, True);
'slayer', 'slay': Mouse(436, 173, 12, 12, True);
'farming', 'farm': Mouse(83, 224, 12, 12, True);
'mining', 'mine': Mouse(137, 222, 12, 12, True);
'smithing', 'smith': Mouse(197, 220, 12, 12, True);
'hunting', 'hunt', 'hunter': Mouse(257, 222, 12, 12, True);
'cooking', 'cook': Mouse(318, 227, 12, 12, True);
'firemaking', 'fire': Mouse(378, 226, 12, 12, True);
'woodcutting', 'wc': Mouse(439, 222, 12, 12, True);
'fletching', 'fletch': Mouse(199, 275, 12, 12, True);
'construction': Mouse(255, 277, 12, 12, True);
'summoning': Mouse(323, 276, 12, 12, True);
else
Mouse(438, 113, 12, 12, True);
end;
Wait(750 + Random(200) + Random(100));
if FindColorTolerance(X, Y, 5602449, 41, 75, 470, 302, 30) then Break;
if (TimeFromMark(LampTime) > 10000) then
begin
Result := False;
Logout;
Players[CurrentPlayer].Rand := 'Lamp';
FreeDTM(book);
Exit;
end;
ClickToContinue;
end;
Mouse(416, 281, 7, 1, True);
Wait(1111 + Random(150) + Random(150));
while ClickContinue(true,true) do
wait(500+random(100));
end;
FreeDTM(book);
end;

Frement

2010-07-07 00:20:21

I thought there is something already for this?

i luffs yeww

2010-07-07 01:15:13

Mordaut is still unsolvable, isn't it? :p So there would be no point to this.

BraK

2010-07-07 01:28:18

From: i luffs yeww
Mordaut is still unsolvable, isn't it? :p So there would be no point to this.


Even though the random for it was unsolved it's still good to see him try and make something to helpful/useful to the community. The thought is what counts. Good job. NickRules.

nickrules

2010-07-07 08:18:09

From: i luffs yeww
Mordaut is still unsolvable, isn't it? :p So there would be no point to this.


meh. I made it because there wasn't one, and i felt there should be :p
now nobody has to make one when it does work :P

Coh3n

2010-07-07 10:28:46

Nice, you may as well just add the book DTM to LoadSRLBitmaps so they're all in one spot. ;)