Congrats on your first script
Looking at the video, the script will benefit greatly from a quick uptext check before clicking to cut the tree. I'm not familiar with the reflection include but an uptext function is undoubtedly in there, I've used the AeroLib one below which is color but works flawlessly.
Simba Code:
Procedure CutTree;
begin
CoolNumber += 1;
Writeln(CoolNumber);
if SomeObject.Find(objGame, 29668, 7) then
begin
Reflect.Mouse.Move(SomeObject.GetMSPoint, 2, 2);
if waitUpTextMulti(['Cut','Red','wood'], 800); then
Reflect.Mouse.Click(Mouse_Left);
end else
begin
SomeObject.Find(objGame, 29670, 7);
Reflect.Mouse.Move(SomeObject.GetMSPoint, 2, 2);
if waitUpTextMulti(['Cut','Red','wood'], 800); then
Reflect.Mouse.Click(Mouse_Left);
end;
While not ThePlayer.IsAnimating do
if CheckInv=True then GoBank;
Wait(3500);
if CoolNumber > 2 then RotateScreen;
CutTree;
end;
If you have any plans to continue this script, two easy additions that can reduce the bot-like behaviour a lot would be:
- Change some procedures to functions that return a boolean of whether it was successful (such as WalkToTrees) then only execute the next bit if the previous was true. ex: if WalkToTrees then CutTree;
- Change the static wait timers to instead wait for a condition to be true (with a time out) and avoid using waits without randomness.
It's always nice when someones first post is a script, it's someone who can find their own answers haha