Cstrike
2010-12-03 13:42:30
Heres an old procedure that is nice:
Am I allowed to take:
And change that part into something like
GetInterfacePoint (IntI, ChildI, x, y, w, h);
Is there an objection to this or are we not allowed to (would only be done if it works just as perfectly as before, no less)? What about reshuffling the core as well? Interfaces should be on top since they're uber developed now and are pretty much independent of everything else. Or should we follow the Not broken don't fix it rule?
Just a suggestion, tell me what you think.
{*******************************************************************************
function R_ClickToContinue: boolean;
By: Drags111
Description: Does as the name suggests. Clicks the 'click here to continue' crap
*******************************************************************************}
function R_ClickToContinue: boolean;
var
inter, i, z, L, x, y, w, h: integer;
str: String;
begin
Result := False;
for i := 0 to High(INTERFACE_TALKS) do
begin
inter := SmartGetFieldArrayObject(0, hook_static_GetInterfaces, INTERFACE_TALKS[i]);
L := SmartGetFieldArraySize(inter, '', 1);
SmartFreeObject(inter);
for z := 0 to L-1 do
begin
str := GetInterfaceText(INTERFACE_TALKS[i], z);
if(pos(lowercase(trim('click here to conti')), lowercase(trim(str))) > 0)then
begin
//Writeln('Found CTC at interface '+ToStr(INTERFACE_TALKS[i])+', '+ToStr(z));
inter := GetInterface(INTERFACE_TALKS[i], z);
x := SmartGetFieldInt(inter, hook_interface_GetX) + 7;
y := SmartGetFieldInt(inter, hook_interface_GetY) + 347;
w := SmartGetFieldInt(inter, hook_interface_GetWidth);
h := SmartGetFieldInt(inter, hook_interface_GetHeight);
MouseBox(x, y, x+w, y+h, 1);
SmartFreeObject(inter);
Result := true;
Exit;
end;
end;
end;
end; Am I allowed to take:
x := SmartGetFieldInt(inter, hook_interface_GetX) + 7;
y := SmartGetFieldInt(inter, hook_interface_GetY) + 347;
w := SmartGetFieldInt(inter, hook_interface_GetWidth);
h := SmartGetFieldInt(inter, hook_interface_GetHeight);And change that part into something like
GetInterfacePoint (IntI, ChildI, x, y, w, h);
Is there an objection to this or are we not allowed to (would only be done if it works just as perfectly as before, no less)? What about reshuffling the core as well? Interfaces should be on top since they're uber developed now and are pretty much independent of everything else. Or should we follow the Not broken don't fix it rule?
Just a suggestion, tell me what you think.