View Full Version : help with coding
devilgnome
06-02-2012, 08:23 PM
this is my first simba script, but idk whats wrong, it starts and says its playing, but nothing happens, and is there a way to use smart client for another internet browser game?
program autofighterpro;
procedure initiate;
Begin;
MoveMouse(939, 540);
ClickMouse(939, 540, 1);
Wait(10000)
end;
procedure attack;
Begin;
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(10000)
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(10000)
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(10000)
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(10000)
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(3000);
ClickMouse(657, 496, 1);
end;
begin;
ClickMouse(680, 500, 1);
Wait(5000);
ClickMouse(969, 625, 1);
repeat
autofighterpro;
end.
YoHoJo
06-02-2012, 08:26 PM
Umm....
Did you write this?
All it does is do a bunch of coordinate clicks, with absolutely no randomness at all, and it will definitely get you banned.
It won't even work right, it just clicks same spots over and over, it doesn't even properly find a monster or anything....
You're better of writing your own, or using Narcles.
devilgnome
06-02-2012, 08:27 PM
its just a click based browser game im playin, with no ban rate lol
YoHoJo
06-02-2012, 08:33 PM
I just saw name autofighterpro and assumed it was for rs.
Well.
Did you drag your crosshairs onto the game before getting all of those coordinates?
Also again drag your corsshairs onto the game before clicking play.
devilgnome
06-02-2012, 08:40 PM
hmm i dragged the crosshair and now im getting this error:
[Error] (46:3): Unknown identifier 'autofighterpro' at line 45
Compiling failed.
kevin33
06-02-2012, 08:41 PM
Thats the name of the program, you dont need to state it in the main loop.
devilgnome
06-02-2012, 08:43 PM
alright i fixed that, now i got one last error :p
[Error] (46:1): Identifier expected at line 45
Compiling failed.
YoHoJo
06-02-2012, 08:44 PM
In mainloop changed AutoFighterPro to attack (it was name of program, you wanted name of procedure)
Removed ; after the very last begin.
Put until(false) after the Attack (you need to tell repeat how long to repeat for).
Put a . after the last end.
program autofighterpro;
procedure initiate;
Begin;
MoveMouse(939, 540);
ClickMouse(939, 540, 1);
Wait(10000)
end;
procedure attack;
Begin;
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(10000)
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(10000)
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(10000)
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(10000)
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(3000);
ClickMouse(657, 496, 1);
end;
begin
ClickMouse(680, 500, 1);
Wait(5000);
ClickMouse(969, 625, 1);
repeat
attack;
Until(False)
end.
devilgnome
06-02-2012, 08:49 PM
well i think its working, except i guess i got a few mouse positions wrong ;p , wat a good way to get mouse positions? im using a script in ecplise for it , but apparently its not good :p
YoHoJo
06-02-2012, 08:50 PM
Whaaa?
There is a color picker/dropper tool in simba. (Near play button etc)
Click that once, then click where you want coordinates of, then it will return the X, Y, and color at that point.
devilgnome
06-02-2012, 09:05 PM
alright i cleaned up the script a bit, edited the coords, but when i click start, it doesnt do anything :x and how can i make it repeat the script until i turn it off?
program autofighterpro;
procedure initiate;
Begin;
MoveMouse(645, 455);
ClickMouse(645, 455, 1);
Wait(10000)
end;
procedure attack;
Begin;
MoveMouse(379, 236);
ClickMouse(379, 236, 1);
Wait(3000);
ClickMouse(514, 241, 1);
Wait(10000)
ClickMouse(116, 292, 1);
Wait(1000);
repeat
attack;
Until(False)
Wait(3000);
ClickMouse(405, 420, 1);
Wait(3000);
ClickMouse(405, 420, 1);
end;
begin
ClickMouse(409, 423, 1);
Wait(5000);
ClickMouse(691, 548, 1);
end.
YoHoJo
06-02-2012, 09:07 PM
You dont have the attack procedure in your main loop (at bottom).
Also you need to put repeat Until(false) to repeat forever.
YoHoJo
06-02-2012, 09:08 PM
You dont have the attack procedure in your main loop (at bottom).
Also you need to put repeat Until(false) to repeat forever.
kevin33
06-02-2012, 09:10 PM
It wont do anything unless you choose the client picker (green crosshair beside colour picker) and drag it to the window with the game. You also need to call the attack procedure in your main loop if you want it to do the procedure. As for repeat, call it in your main loop as Repeat until false; then it should repeat until turned off or an error occurs or whatever.
^Yoho the :ninja: accidental double poster :)
devilgnome
06-02-2012, 09:14 PM
hmm not gonna lie, im confused :p can you help me write it out? haha
devilgnome
06-02-2012, 09:26 PM
+ is there anyway i can make it click a certain part if that part pops up?
kevin33
06-02-2012, 09:42 PM
program autofighterpro;
procedure initiate;
Begin;
MoveMouse(939, 540);
ClickMouse(939, 540, 1);
Wait(10000)
end;
procedure attack;
Begin;
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(10000)
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(10000)
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(10000)
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(10000)
MoveMouse(658, 316);
ClickMouse(658, 316, 1);
Wait(3000);
ClickMouse(782, 319, 1);
Wait(3000);
ClickMouse(657, 496, 1);
end;
begin
ClickMouse(680, 500, 1);
Wait(5000);
ClickMouse(969, 625, 1);
repeat
attack;
Until(False)
end.
This is what you asked, Yoho already made it for you, as for the clicking the pop up thing, I have no idea. Not familiar with scripts for games other than rs.
YoHoJo
06-02-2012, 09:43 PM
Yeah read some beginner tutorials to use bitmap/color/dtm etc to find things besides just coordinate clicks!
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.