SRL Archive - Discussions and Debates

Weird mouse movement


Baked0420

2009-12-01 12:27:24

I'm making a script to do level one enchants, but for some reason, after enchanting an item and before clicking the magic tab (done by cast in magic.scar) it'll move the mouse up to the minimap. I debugged it out with disguise('');'s… it was a little hard to look at the tool bar and see when the mouse did it at the same time, but I am almost positive I found the reason. I switched disguise(); to alert();, so it's easier to notice now. I have it pop-up Mouse and wait 2000's then let the program go, and the mouse will move then I alert with /Mouse. The two alerts are only around wait's obviously and then cast, so I'm 99% positive it's from cast. I can't find what is causing it in cast though.

If you want to see how I found it's in cast you can, cause I guess there could be a chance I'm wrong, so take a look for yourself, just have cosmic runes in slot 28 and a water staff and then run this script. I have it without smart, because that's how I was testing it, and I took out all the procedures/functions that didn't matter. And this is just the base of the script, I just want it working before I go further, making it more advanced and with more features.

but anyways, here's the script attached below.


EDIT: Removed script, since I don't want it released yet. Already found the bug in SpellAvailable.

Gu3st...

2009-12-01 12:31:59

  if (FindColor(X, Y, 2070783, MIX1, MIY1, MIX2, MIY2)) then
begin
MouseBox(MMX1, MMY1, MMX2, MMY2, 3);
Wait(100+Random(300));
end;
This is what causes it. In SpellAviable()

I have no idea why it does that.. N1ke?

Baked0420

2009-12-01 12:34:05

oh I was looking in SpellsAvailable, not SpellAvailable :facepalm:

why would they make them have such similiar names :p

well I almost found it haha. Nice searching though. We should get this fixed, it's very annoying and bot like to always just mouse the map before casting a spell.

Gu3st...

2009-12-01 12:37:33

From: Baked0420
oh I was looking in SpellsAvailable, not SpellAvailable :facepalm:

why would they make them have such similiar names :p

well I almost found it haha. Nice searching though. We should get this fixed, it's very annoying and bot like to always just mouse the map before casting a spell.
Yeah xD
Try debugging a FindColors() with the color 2070783 just so that we can see what color it is searching for. N1ke wont answer on the msn so I don't know if he visits this thread or not… :redface:

Baked0420

2009-12-01 12:42:24

alright, I'll see if I can find what that color is. I'll edit this post if I figure out what his intentions were of searching that color.

EDIT: I can't get a printscreen when I have the color picker up, but it found the color at (568, 214), and it opens the magic tab before looking for it. It is the brown color just slighty up and to the right of the home tele button. So it's the brown in the magic tab. If you want you can check for yourself, just open up the magic tab and use the color picker to find the coord. But when I used the color picker, it didn't give me the color of 2070783, but I did go to the same coord where it was found by the script. No clue why he's looking for brown in the magic tab. I was thinking maybe to see if the magic tab was open, but he could've just used GetCurrantTab. I'm clueless, but it seems pointess to me. I'm bout to take it out of my Includes, the two lines where it checks for the color and moves the mouse to the MM.