How can i make it click something and check to make sure it clicked the option!
How can i make it click something and check to make sure it clicked the option!
DoConversation('', True);
FindNPCChatText(.....);
DidRedClick.
should suffice..
Last edited by Brandon; 05-31-2012 at 07:24 PM.
I am Ggzz..
Hackintosher
Use a findobj() function to click whatever you are trying to click then look for the npc chathead in the chatbox by checking for the dtm. Then use an if statement with a findtext() function to find the option you are looking for.
Simba Code:(*
FindText
~~~~~~~~
.. code-block:: pascal
function FindText(var cx, cy: Integer; txt,font: string; xs, ys, xe, ye: Integer): Boolean;
Searches for text in specified box with specified font.
.. note::
by Coh3n
Example:
.. code-block:: pascal
*)
function FindText(var cx, cy: integer; txt, font: string; xs, ys, xe, ye: integer): boolean;
begin
result := findTextEx(cx, cy, [txt], [font], xs, ys, xe, ye);
end;
Can't explain how to get the dtm, but if you are interested in this method, pm me
Here is a function by Mat that finds an obj whereever...
Simba Code:function FindObj_pX(Mouse:Boolean;pX, pY,Null,Null2: Integer; Mod1,Mod2:Extended;Lol1:String): Boolean;
var
CTS, I: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
CTS := GetColorToleranceSpeed;
FindNormalRandoms;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Mod1, Mod2);
If Not Mouse then
FindColorsSpiralTolerance(MSCX, MSCY, TPA,Null, 190, 140, 320, 230, Null2) else
FindColorsSpiralTolerance(MSCX, MSCY, TPA,Null, MSX1, MSY1, MSX2, MSY2, Null2);
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 15, 15);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], pX, pY);
If Mouse then
begin
MMouse(pX, pY, 2, 2);
Wait(300+Random(75));
If(IsUpTextMultiCustom([Lol1])) then
begin
Result := True;
GetMousePos(pX, pY);
Break;
end;
end else
Result := True;
end;
end;
Or Pm the user known as Flight, he is beastly at making obj finding functions (referring to his ZMI crafter ofc )
Last edited by Recursive; 05-31-2012 at 07:18 PM.
Tutorial island section is for tutorials, NOT scripting help.
This belongs in the scripting help section.
There are currently 1 users browsing this thread. (0 members and 1 guests)