n3ss3s
2008-05-01 14:37:30
It has always contained only furnace opening functions, and Smithing is a lot larger area than just opening a furnace, so to begin, I suggest the three OpenFurnaces of Smithing.scar will be replaced with a finder function, so the scripter can use that one straight if he doesn't necassarily want to yet open the furnace or then do it with his own way. There is no need for a ready furnace opener because anyone can easily make an opener using the finder.
Second thing, Bitmaps.scar in the misc folder gives us great possibilities for Smithing.scar improvement on the smelting behalf, since it has got all the bitmaps for the bars.
Third, about this one I am not sure does it go too far thinking from the point of view that there needs to be something done by the scripter too, but what about an "universal handler" for the smithing interface, where you could do like Smith('Iron platebody')? :)
{*******************************************************************************
Function FindFurnace(Var X, Y: Integer): Boolean;
By: n3ss3s
Description: Finds a furnace and stores the coordinates into X and Y.
*******************************************************************************}
Function FindFurnace(Var X, Y: Integer): Boolean;
Var
TPAA: T2DPointArray;
TPA: TPointArray;
CTS, I, X, Y: Integer;
Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3815998, MSX1, MSY1, MSX2, MSY2, 10);
ColorToleranceSpeed(CTS);
TPAA := TPAToATPAEx(TPA, 50, 50);
SortATPASize(TPAA, True);
For I := 0 To High(TPAA) Do
If GetArraylength(TPAA[i]) > 150 Then
Begin
MiddleTPAEx(TPAA[i], X, Y);
MMouse(X, Y, 3, 3);
If IsUpText('urnac') Then
Begin
Result := True;
GetMousePos(X, Y);
Break;
End;
End;
End;
Second thing, Bitmaps.scar in the misc folder gives us great possibilities for Smithing.scar improvement on the smelting behalf, since it has got all the bitmaps for the bars.
Third, about this one I am not sure does it go too far thinking from the point of view that there needs to be something done by the scripter too, but what about an "universal handler" for the smithing interface, where you could do like Smith('Iron platebody')? :)