Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function EvilTreeAt(treeName: string; x, y: Integer): Boolean; // Make sure treeName is exactly the same as in uptext! CASE-SENSITIVE
- var
- p: TPoint;
- t: Integer;
- b: Boolean;
- begin
- treeName := Trim(treeName);
- Result := False;
- p := Point(x, y); // We create 'p' point of x,y coordinates
- if ((treeName <> '') and PointInBox(p, RS07_GameActionBx) and RS07_LoggedIn) then // We check that point is inside main screen AND that we are logged in, before we continue.
- begin
- t := GetSystemTime; // Timer reset
- repeat
- case MSSL_MouseNearPt(p, 2) of // With this step we case the next action of.. If mouse is not near our point, we will move it to it.
- True: // ..and else we will check for result.
- if ((GetSystemTime - t) > 35) then // If time since mouse movement has been over 35 ms. then we can check for result...
- begin
- Result := RS07_IsUpTextCustom(('Chop down ' + treeName), [16777215, 65535], RS07_UpTextTol); // Is uptext with white and yellow as "Chop down *"? Result will be set as true, if it is...
- if not Result then // OK, so result wasn't true, lets check for other texts...
- b := (RS07_IsUpTextCustom(('Chop down ' + treeName), [16777215, 16776960], RS07_UpTextTol) or RS07_IsUpText('Walk here')); // If uptext is normal tree-text OR "Walk here", then variable 'b' will be set as true
- end;
- False:
- begin
- case RS07_QuickObjectCheck of // If this MSSL variable is set as true, then...
- True: SetMousePos(p.X, p.Y); // SetMousePos() will be used and else...
- False: RS07_MoveMouse(p.X, p.Y); // Normal RS07_MoveMouse() movement!
- end;
- t := GetSystemTime; // We mark the timer as current time (after movement)
- end;
- end;
- MSSL_Wait(0); // MSSL_Wait with hotkey check!
- until (Result or b or ((GetSystemTime - t) > 250)); // If this or this or this, then we are ready to break out!
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment