SRL Archive - SRL Archives

Prayer.Scar Two errors.


Lee Lok Hin

2008-08-17 03:48:51

{*******************************************************************************
function GetPrayerCoords(Name: string; var Box: TBox; var Color: Integer): Boolean;
By: Nielsie95, Fixed by Lee Lok Hin
Description: Returns a box and color from a certain prayerbutton.
Returns true if the name exists.
Name is the number or name of the prayer.
Numbers:
1 2 3 4 5
6 7 8 9 10
etc.
*******************************************************************************}
function GetPrayerCoords(Name: string; var Box: TBox; var Color: Integer): Boolean;
var
RowCol: TIntegerArray;
begin
Result := True;
case Capitalize(LowerCase(Name)) of
'Thick Skin', '1': RowCol := [0, 0, 7443688];
'Burst Of Strength', '2': RowCol := [0, 1, 9743322];
'Clarity Of Thought', '3': RowCol := [0, 2, 8690894];
'Sharp Eye', '4': RowCol := [0, 3, 212659];
'Mystic Will', '5': RowCol := [0, 4, 2621201];
'Rock Skin', '6': RowCol := [1, 0, 251];
'Superhuman Strength', '7': RowCol := [1, 1, 251];
'Improved Reflexes', '8': RowCol := [1, 2, 251];
'Rapid Restore', '9': RowCol := [1, 3, 85724];
'Rapid Heal', '10': RowCol := [1, 4, 15533737];
'Protect Items', '11': RowCol := [2, 0, 15533737];
'Hawk Eye', '12': RowCol := [2, 1, 251];
'Mystic Lore', '13': RowCol := [2, 2, 251];
'Steel Skin', '14': RowCol := [2, 3, 15533737];
'Ultimate Strength', '15': RowCol := [2, 4, 15533737];
'Incredible Reflexes', '16': RowCol := [3, 0, 15533737];
'Protect From Summoning', '17':RowCol := [3, 1, 14732165];
'Protect From Magic', '18': RowCol := [3, 2, 15533737];
'Protect From Missiles', '19': RowCol := [3, 3, 15533737];
'Protect From Melee', '20': RowCol := [3, 4, 15533737];
'Eagle Eye', '21': RowCol := [4, 0, 15533737];
'Mystic Might', '22': RowCol := [4, 1, 15533737];
'Retribution', '23': RowCol := [4, 2, 251];
'Redemption', '24': RowCol := [4, 3, 15039768];
'Smite', '25': RowCol := [4, 4, 15039768];
'Chivalry', '26': RowCol := [5, 0, 15533737];
'Piety', '27': RowCol := [5, 1, 14915455];
else
begin
srl_Warn('GetPrayerCoords', 'Invalid Prayer Name', warn_Warning);
Result := False;
Exit;
end;
end;

Box.x1 := 565 + (RowCol[1] * 37);
Box.x2 := Box.x1 + 14;
Box.y1 := 222 + (RowCol[0] * 37);
Box.y2 := Box.y1 + 10;
Color := RowCol[2];
end;

Protect from Magic and Protect from summoning were switched, making the whole row with protect from ? useless.

{*****************************************************************************
procedure AllPrayersOff;
By: phantombmx - Fixed by Freddy1990 and Lee Lok Hin
Description: Will turn off any prayers that may be on
*****************************************************************************}

procedure AllPrayersOff;
var
i: Integer;
begin
for i := 1 to 27 do
ClickPrayer(IntToStr(i), False);
end;

There are 27 prayers now, not 24.

EvilChicken!

2008-08-17 08:55:22

Very nice, someone should take a look at this.


Good job! :)

ZephyrsFury

2008-08-18 05:14:11

Thanks. I've added this to the dev svn.