View Full Version : Mouse Moves slow......
superbatman
01-08-2009, 01:12 AM
I used the search button, but my case is different than the others. My Mouse is only slow on MMouse and Mouse functions in scar. I have written a Firemaking script and snape grass picker without srl, but im trying to upgrade to srl(mainly for antiban/random). Anyways, I can move the mouse fine regularly, but when i use MMouse and Mouse functions, it mouse about 10 pixels per second. I tried changing useing setupsrl, ive changed it to bot 1 and 1500, and neither made it any different. I tried SmartMoveMosue, and that doesnt move the mouse at all. Any Suggestions? BTW, im not trying to be a leecher here, just need help to be able to write my first scar with srl.
noidea
01-08-2009, 01:24 AM
At the beggining of the main looop, put
SetupSRL;
TViYH
01-08-2009, 01:43 AM
After you put SetupSRL;, put MouseSpeed := 17;
Tniffoc
01-08-2009, 01:44 AM
Just as an explanation of why that works:
SetupSRL sets the mouse speed for SRL functions but not the Scar ones.
MouseSpeed := 25;
EDIT: Voice! You beat me!
TViYH
01-08-2009, 01:46 AM
17, not 25. 25 is too fast.
superbatman
01-08-2009, 01:50 AM
ok, ive tried that on both compilesrl.scar, srl.scar, and my own code with just include srl.scar. everytime it ASkes me for files to be allowed, and when i allow them, it just outputs
SRL Compiled in 6719 msec
Successfully executed
No other window comes up execpt the one to allow the program to acces the files
EDIT: I let the code run long enough for the cursor to get to the 2nd inv slot(this is where my maple log was, which is wat i was trying to get to) and it doesnt even go to the 2nd inv slot, it goes to the right side of the screen and continues til it is at the end. I tried it with movemousesmooth and it went straight to the 2nd inv slot.
TViYH
01-08-2009, 01:52 AM
Pastebin the script.
superbatman
01-08-2009, 02:03 AM
Whats pastebin? sorry, im a newb. googling. ok that means post the code here?
Heres SRL.scar
//----------------------------------------------------------------------------//
//-- Scar Standard Resource Library --//
//----------------------------------------------------------------------------//
//-- by: Azeroth, Bebe, BenLand100, benleegt, Boreas, c0de, --//
//-- Cheesehunk, dakota, Dankness, driger1592, Flyboy, Freddy1990, --//
//-- Hobbit, inferno, Kernel Klink, Knightstreak, Krazy_Meerkat, --//
//-- Krichevskoy, Liquid, Lorax, Mad Cow, Markus, masquerader, --//
//-- mastaraymond, moparisthebest, Mutant Squirrle, n3ss3s nielsie95, --//
//-- phantombmx, pups, Pyro, RAM, realrune, Renax, Ron, RsN, --//
//-- SKy Scripter, solemn wishes, Spky, SRL, Starblaster100, S --//
//-- tupid3ooo, Sumilion, tarajunky, The Claw, The_Rs_Monkey, Zephyrsfury --//
//-- Wizzup?, WT-Fakawi, XxKanexX, Yakman, YoHoJo, _ChArMz, --//
//-- --//
//-- ....... and the SRL Community. --//
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// -- SRL Level 1 Includes --//
// -- --//
// -- Low Level SCAR Math, Mouse Movement and Color Clicking routines. --//
//----------------------------------------------------------------------------//
{.include SRL/SRL/Core/Globals.scar}
{.include SRL/SRL/Core/Math.scar}
{.include SRL/SRL/Core/Mouse.scar}
{.include SRL/SRL/Core/Color.scar}
{.include SRL/SRL/Core/Players.scar}
{.include SRL/SRL/Core/Overwrite.scar}
//----------------------------------------------------------------------------//
// -- SRL Level 2 Includes --//
// -- --//
// -- Interface, Object and OCR routines. --//
//----------------------------------------------------------------------------//
{.include SRL/SRL/Core/Timing.scar}
{.include SRL/SRL/Core/GameTab.scar}
{.include SRL/SRL/Core/SRLLog.scar}
{.include SRL/SRL/Core/Text.scar}
{.include SRL/SRL/Core/Inventory.scar}
{.include SRL/SRL/Core/Object.scar}
//----------------------------------------------------------------------------//
// -- SRL Level 3 Includes --//
// -- --//
// -- MapWalking, AntiRandoms, Bank, Symbol and many more... --//
//----------------------------------------------------------------------------//
{.include SRL/SRL/Misc/Bitmaps.scar}
{.include SRL/SRL/Core/FlagChat.scar}
{.include SRL/SRL/Core/Login.scar}
{.include SRL/SRL/Core/Mapwalk.scar}
{.include SRL/SRL/Core/Bank.scar}
{.include SRL/SRL/Core/Symbol.scar}
{.include SRL/SRL/Core/RC.scar}
{.include SRL/SRL/Core/AutoColor.scar}
{.include SRL/SRL/Core/AntiRandoms/Common.scar}
{.include SRL/SRL/Core/Globalstats.scar}
{.include SRL/SRL/Core/CAutoRespond.scar}
{.include SRL/SRL/Core/AntiRandoms/Box.scar}
{.include SRL/SRL/Core/AntiRandoms/Certer.scar}
{.include SRL/SRL/Core/AntiRandoms/Demon.scar}
{.include SRL/SRL/Core/AntiRandoms/Forester.scar}
{.include SRL/SRL/Core/AntiRandoms/Quiz.scar}
{.include SRL/SRL/Core/AntiRandoms/Sandwich.scar}
{.include SRL/SRL/Core/AntiRandoms/EvilBob.scar}
{.include SRL/SRL/Core/AntiRandoms/Leo.scar}
{.include SRL/SRL/Core/AntiRandoms/Frog.scar}
{.include SRL/SRL/Core/AntiRandoms/ChatRandoms.scar}
{.include SRL/SRL/Core/AntiRandoms/Molly.scar}
{.include SRL/SRL/Core/AntiRandoms/Pillory.scar}
{.include SRL/SRL/Core/Antirandoms/Pinball.scar}
{.include SRL/SRL/Core/Antirandoms/Maze.scar}
{.include SRL/SRL/Core/AntiRandoms/AntiRandoms.scar}
{.include SRL/SRL/Core/AntiBan.scar}
{.include SRL/SRL/Core/Amount.scar}
{************************************************* ******************************
procedure SetupSRL;
by: SRL Dev Team
Description: Sets up all variables needed to run SRL.
************************************************** *****************************}
procedure SetupSRL;
begin
MouseSpeed := 17;
CheckHPFirst := True;
Reincarnate := False;
TalkAfterRandoms := False;
RoadColor := 0;
WaterColor := 0;
BankColor := 0;
LampSkill := 'summoning';
SetUpSRLReport;
LoadCosineArrays;
SymbolAccuracy:= 0.8;
LoadNPCArray;
LoadSRLBitMaps;
SolveChatRandoms := True;
SetupSRLAutoResponder;
UseFindMod := True;
LogoutOnMod := True;
UseFindTrade := True;
Screenshots := False;
InitializeSRLLogFile;
Writeln ('SRL Compiled in '+ IntToStr(GetTimeRunning) + ' msec');
end;
begin
SetupSRL;
end.
compileSRL.scar
program CompileSRL;
//Checks that SRL compiles properly when devs make changes
{.Include SRL\SRL.scar}
{.Include SRL\skill\Agility.scar}
{.Include SRL\skill\BuySell.scar}
{.Include SRL\skill\Construction.scar}
{.Include SRL\skill\Cooking.scar}
{.Include SRL\skill\Crafting.scar}
{.Include SRL\skill\Farming.scar}
{.Include SRL\skill\Fighting.scar}
{.Include SRL\skill\Firemaking.scar}
{.Include SRL\skill\Fishing.scar}
{.Include SRL\skill\Fletching.scar}
{.Include SRL\skill\Herblore.scar}
{.Include SRL\skill\Hunting.scar}
{.Include SRL\skill\Magic.scar}
{.Include SRL\skill\Mining.scar}
{.Include SRL\skill\Prayer.scar}
{.Include SRL\skill\Ranging.scar}
{.Include SRL\skill\RuneCrafting.scar}
{.Include SRL\skill\Slayer.scar}
{.Include SRL\skill\Smithing.scar}
{.Include SRL\skill\Thieving.scar}
{.Include SRL\skill\WoodCutting.scar}
{.Include SRL\Misc\arrayLoader.scar}
{.Include SRL\Misc\DoorProfiles.scar}
{.Include SRL\Misc\DraynorColorFinder.scar}
{.Include SRL\Misc\DungeonWalk.scar}
{.Include SRL\Misc\FaladorColorFinder.scar}
{.Include SRL\Misc\FindXP.scar}
{.Include SRL\Misc\Friends.scar}
{.Include SRL\Misc\NewAutoColor.scar}
{.Include SRL\Misc\Path.scar}
{.Include SRL\Misc\QuickChat.scar}
{.Include SRL\Misc\Trade.scar}
{.Include SRL\Misc\Users.scar}
{.Include SRL\Misc\WizzyPlugin.scar}
{.Include SRL\Misc\WorldSwitcher.scar}
begin
SetupSRL;
end.
My tester
program Test;
{.include SRL/SRL.scar}
begin
SetupSRL;
end.
They all have the same outcome, ask me for the program to allow access to files, then closes and says successfully compiled and executed.
TViYH
01-08-2009, 02:05 AM
That's because that's what it's supposed to do.
superbatman
01-08-2009, 02:08 AM
It never askes me to input the MouseSpeed, but thats what it is supposed to do?
Have any idea why MMouse and Mouse dont work? Want Me to post my code?
TViYH
01-08-2009, 02:10 AM
If you include SRL and place SetupSRL; in the script, it WILL work.
You are never asked to input the MouseSpeed.
You type it in after SetupSRL; like this:
program New;
{.include SRL/SRL.scar}
begin
SetupSRL;
MouseSpeed := 17;
MMouse(125, 250, 8, 8);
end.
superbatman
01-08-2009, 02:25 AM
When i ran the code you gave me, it moved fast to 125,250. There must be something wrong with my code, cause all it does is slowly move to the right side of my screen. Please help me find out what is wrong with my code. Keep in mind it isnt complete, all it should do is light the logs in my inventory. It did this successfully with MoveMouseSMooth and ClickMouse, but now it doesnt work at all.
program RealFireMaker;
{.include SRL/SRL.scar}
Const
regular=3759996;
oak=4287885;
willow=2051671;
maple=870764;
yew=738138;
userlog=maple; ///**!@#@$USER INPUT LOG HERE$@#@!**///
var
x,y,TinderBox: integer;
acc: extended;
procedure LightFire;
begin
TinderBox := BitmapFromString(13, 1, '604109604109604109604' +
'109604109604109938989988E8D91878789807F7B7272635C 5B45' +
'4141');
FindColorTolerance(x,y,userlog,767,347,1018,668,5) ;
Mouse(x,y,x,y,true);
wait(500+random(500));
FindDeformedBitmapTolerancein(TinderBox,x,y,767,34 7,1018,668,70,1,True,acc);
Mouse(x,y,x,y,true);
LightWait;
end;
begin
if(FindColorTolerance(x,y,userlog,767,347,1018,668 ,5)) then
begin
repeat
LightFire;
until(FindColorTolerance(x,y,userlog,767,347,1018, 668,5)=false)
end;
end.
TViYH
01-08-2009, 02:31 AM
I just told you that you have to add SetupSRL; to the mainloop.
superbatman
01-08-2009, 04:05 AM
oh, of my main code? I thought you ran in it srl.scar, ill go try it out.
Lolz, sorry for being so nooby.
EDIT: Got it all running. FOr some reason, it returns error:
Access violation at address 006D8466 in module 'scar.exe'. Read of address 00000008 in line 503 in script text.scar.
Now the code doesnt compile at all. I Tried to include some banking, and it says:
Unknown identifier 'ClickToContinue' in script bank.scar.
i even erased everything that had to do with scar banking, and it still wouldnt compile.
Note that before i tried to add banking features, it never brought up compilation issues in bank.scar.
ANY SUGGESTIONS?
marpis
01-08-2009, 05:43 AM
Are you sure you have the SetupSRL; in the right place? It has to be in the beginning of the main execution like
begin
SetupSRL;
if(FindColorTolerance(x,y,userlog,767,347,1018,668 ,5)) then
begin
repeat
LightFire;
until(FindColorTolerance(x,y,userlog,767,347,1018, 668,5)=false)
end;
end;
Try downloading the latest rev again.
Floor66
01-08-2009, 02:13 PM
begin
SetupSRL;
if(FindColorTolerance(x,y,userlog,767,347,1018,668 ,5)) then
begin
repeat
LightFire;
until(FindColorTolerance(x,y,userlog,767,347,1018, 668,5)=false)
end;
end;
Correct indenting!
marpis
01-08-2009, 07:09 PM
floor too late ;)
noidea
01-08-2009, 07:10 PM
begin
SetupSRL;
if(FindColorTolerance(x,y,userlog,767,347,1018,668 ,5)) then
begin
repeat
LightFire;
until(FindColorTolerance(x,y,userlog,767,347,1018, 668,5)=false)
end;
end;
Correct indenting!
Correct MainLoop!
begin
SetupSRL;
if(FindColorTolerance(x,y,userlog,767,347,1018,668 ,5)) then
begin
repeat
LightFire;
until(FindColorTolerance(x,y,userlog,767,347,1018, 668,5)=false)
end;
end.
Needed a period since it was mainloop.
superbatman
01-08-2009, 10:52 PM
oo thanks for the info, ill go try to go re download the lastest rev..
Oo woot, i got a good mainloop.
TViYH
01-08-2009, 11:42 PM
Yeah...Now that you followed directions ^.^
Lol. Just read some basic tutorials ;)
bullzeye95
01-09-2009, 12:01 AM
Just as an explanation of why that works:
SetupSRL sets the mouse speed for SRL functions but not the Scar ones.
SCAR doesn't have a mouse speed.
Tniffoc
01-09-2009, 12:33 AM
SCAR doesn't have a mouse speed.
I know. I was just explaining why it just worked on the SRL functions.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.