caused
2009-09-03 04:23:45
I really took a night shift for this, haha :D.
Introdcution:
This is an easy to use implementation for scar, that enables you to detect which cursor is active. It's good for creating failsaves, and for checking if the mouse is on a certain object.
Installation:
Unpack the archive in your Scar Folder.
Usage:
1. {.include cursor.scar} in your script.
2. Use GetCursor to get the actual cursor, it will return a string with the cursor name, currently supported are "default", "axe", "sword" and many more… check out the "Plugin/Icons" folder.
Adding own Cursors:
You can easiely add your own cursors :), I added "Cursor Receiver.scar" for that purpose.
Run Cursor receiver, move the mouse so that it becomes the cursor you want, wait a second.
Now you should have a debug window showing the cursor you wanted to grab. Paste that debug window into mspaint, make sure that the dimensions are 32x32. Save it as "mycursor".bmp(or whatever name you want).
Now move your cursor file into the "Scar/Plugins/Icons/" Folder.
GetCursor will now detect your newly added cursor File. It will result the name of the file without ".bmp" when that cursor is active.
Example Script:
If you feel like supporting me with this you may create 32x32 bitmaps for all the other new ingame cursors ;).
Have fun :).
If you want to use them Cursors in your OS, you can get em here ;). http://www.villavu.com/forum/showthread.php?p=626192#post626192
~caused
Introdcution:
This is an easy to use implementation for scar, that enables you to detect which cursor is active. It's good for creating failsaves, and for checking if the mouse is on a certain object.
Installation:
Unpack the archive in your Scar Folder.
Usage:
1. {.include cursor.scar} in your script.
2. Use GetCursor to get the actual cursor, it will return a string with the cursor name, currently supported are "default", "axe", "sword" and many more… check out the "Plugin/Icons" folder.
Adding own Cursors:
You can easiely add your own cursors :), I added "Cursor Receiver.scar" for that purpose.
Run Cursor receiver, move the mouse so that it becomes the cursor you want, wait a second.
Now you should have a debug window showing the cursor you wanted to grab. Paste that debug window into mspaint, make sure that the dimensions are 32x32. Save it as "mycursor".bmp(or whatever name you want).
Now move your cursor file into the "Scar/Plugins/Icons/" Folder.
GetCursor will now detect your newly added cursor File. It will result the name of the file without ".bmp" when that cursor is active.
Example Script:
program WoodcuttingExample;
{.include Cursor.scar}
var
x,y : Integer;
begin
x:= 251;
y:= 157;
//Find a close tree
If FindColorSpiralTolerance(x,y,3304031,55,5,514,330,22) then
begin
ClickMouse(x,y,True); // Click it
wait(50);
repeat
wait(1000);
untiL not(GetCursor = 'axe'); //and wait until it is cut(the icon changed)
end;
end.
If you feel like supporting me with this you may create 32x32 bitmaps for all the other new ingame cursors ;).
Have fun :).
If you want to use them Cursors in your OS, you can get em here ;). http://www.villavu.com/forum/showthread.php?p=626192#post626192
~caused