Cazax
2009-02-04 12:05:46
Firemaking.scar:
WeHaveLogs is outdated. here is the fix:
Cooking.scar:
FindRange still works but it laggs a lot and sometimes it doesn't work. It uses DTM to find the range in the mainscreen, which makes it very slow. Here is the TPA version:
Fighting.scar:
IsFightAt searches in a 20*20 square for the bar so if it is a big moster(lesser demon for example) it won't find it. Fix:
Damage will always call getskillinfo making it to change the tab every time. It can be replaced with GetMMLevels:
WeHaveLogs is outdated. here is the fix:
Function FindLogs(Var X, Y : Integer): Boolean;
Var
Logs : Integer;
Begin
Logs := DTMFromString('78DA63DCC8C4C0F08A010D30229140FA2450C' +
'D4D026AB601D5DC25A0E61450CD23026ACE01D5BC26A0663750CD' +
'47FC6A00BF630A00');
GameTab(4);
Wait(250 + Random(250));
Result := FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2);
FreeDTM(Logs);
End;Also it should have a findtinderbox:Function FindTinderbox(Var X, Y : Integer): Boolean;
Var
TinderBox : Integer;
Begin
TinderBox := DTMFromString('78DA638C67626078C18006189148205D0A547' +
'39D809A04A09A7B04D49400D5DC27A0A61CA8E60D0135E940351F' +
'F1AB0100C4B607FE');
GameTab(4);
Wait(250 + Random(250));
Result := FindDTM(TinderBox, X, Y, MIX1, MIY1, MIX2, MIY2);
FreeDTM(TinderBox);
End;Cooking.scar:
FindRange still works but it laggs a lot and sometimes it doesn't work. It uses DTM to find the range in the mainscreen, which makes it very slow. Here is the TPA version:
Function FindRange(Var X, Y : Integer): Boolean;
Var
TPA : TPointArray;
ATPA : T2DPointArray;
I, H : Integer;
Begin
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 1385376, MSX1, MSY1, MSX2, MSY2, 15);
If Length(TPA) = 0 Then
Exit;
ATPA := TPAtoATPAEx(TPA, 50, 50);
H := High(ATPA);
For I := 0 To H Do
Begin
If Length(ATPA[I]) > 50 Then
Begin
Result := True;
MiddleTPAex(ATPA[I], X, Y);
Exit;
End;
End;
End;Fighting.scar:
IsFightAt searches in a 20*20 square for the bar so if it is a big moster(lesser demon for example) it won't find it. Fix:
Function IsFightAt(CX, CY : Integer): Boolean;
Var
ATPA : T2DPointArray;
X, Y : Integer;
Begin
ATPA := FindAllHPBars(CX,CY, MSCY, MSX1, MSY1, MSX2, MSY2);
If (Length(ATPA) = 0) Then
Exit;
MiddleTPAEx(ATPA[0], X, Y);
Result := (Distance(X, Y, CX, CY) <= 45);
End;Damage will always call getskillinfo making it to change the tab every time. It can be replaced with GetMMLevels:
Function Damage: Integer;
Var
S : String;
Begin
If Players[CurrentPlayer].Level[8] = 0 Then
Players[CurrentPlayer].Level[8] := GetSkillInfo('hp', False);
S := GetMMLevels('hp', S) - Players[CurrentPlayer].Level[8];
End;