killers10333 Posted December 29, 2011 Posted December 29, 2011 Hey guys im new to AutoIt and so i still am not used to the language. i know Java so if that helps cool lol. basically i need to make a script that detects one or more certain colors, moves the mouse to those colors and clicks. since im new i dont know the i guess command for color detection on screen (only in a certain window) or for clicking the mouse. if you guys could help or maybe point me toward a nooby tutorial i would be thankful =D... if any of you guys are familiar with SCAR, here is the SCAR script i tried to use but it didnt work so i need an autoit script that does the same function Program attack; var x,y: integer; const /////----colors of stuffs----\\\\ rock1= 2241942; //color of rocks rock2= 16775402; rock3= 2901428; Procedure W; begin if findcolor(x,y,rock1,0,0,1420,795) or findcolor(x,y,rock2,0,0,1420,795) or findcolor(x,y,rock3,0,0,1420,795) then wait(random(50)+500); MoveMouseSmooth(x,y); wait(random(50)+100); if findcolor(x,y,rock1,0,0,1420,795) or findcolor(x,y,rock2,0,0,1420,795) or findcolor(x,y,rock3,0,0,1420,795) then clickmouse(x,y,true); wait(100); clickmouse(x,y,true); wait(random(1000)+5000); end; begin repeat w; w; w; w; w; w; w; until(false) end. Thanks =D
Zedna Posted December 29, 2011 Posted December 29, 2011 Look at these functions in helpfile: "C:Program FilesAutoIt3AutoIt.chm" PixelGetColor,Sleep,MouseMove,MouseClick But also read forum rules about games on these forums Resources UDF ResourcesEx UDF AutoIt Forum Search
czardas Posted December 29, 2011 Posted December 29, 2011 This thread looks very much like game automation. I was not familiar with SCAR until now. operator64 ArrayWorkshop
killers10333 Posted December 29, 2011 Author Posted December 29, 2011 i read the rules before i posted so im not asking how to use this for a game im asking about certain coding that performs a task..what i use the task for isnt controllable =D. but yea its to learn about autoit
czardas Posted December 29, 2011 Posted December 29, 2011 Glad to see that you read Valik's announcement. Zedna has pointed you in the right direction. Please respect forum policy. operator64 ArrayWorkshop
Zedna Posted December 29, 2011 Posted December 29, 2011 (edited) When I wrote my answer I reported this topic as possible violating forum rules,so don't expect any help until moderators confirm it's OK edit: or close this topic. Edited December 29, 2011 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search
killers10333 Posted December 29, 2011 Author Posted December 29, 2011 i didnt read any announcements sorry = i just joined like 5 minutes ago so... but if im just wanting to learn a code then how is it breaking forums policy?
Zedna Posted December 29, 2011 Posted December 29, 2011 i didnt read any announcements sorry = i just joined like 5 minutes ago so... but if im just wanting to learn a code then how is it breaking forums policy? Read thishttp://www.autoitscript.com/forum/forum-2/announcement-13-forum-rules/and you will see HOW Resources UDF ResourcesEx UDF AutoIt Forum Search
czardas Posted December 29, 2011 Posted December 29, 2011 If a moderator considers the thread to be related to game automation then it will be locked. If that happens just accept it and move on. I suggest that you start with the AutoIt tutorials if it is just for learning the language. operator64 ArrayWorkshop
killers10333 Posted December 29, 2011 Author Posted December 29, 2011 im telling you i read that but if what i want is to learn a couple certain code snippets then...not really related?
czardas Posted December 29, 2011 Posted December 29, 2011 Exactly to what is it related then? operator64 ArrayWorkshop
killers10333 Posted December 29, 2011 Author Posted December 29, 2011 learning certain things on autoit, specifically color recognition code and mouse click code
czardas Posted December 29, 2011 Posted December 29, 2011 It sounds to me that you have a specific purpose - one which are unwilling to discuss. Well that's all from me. operator64 ArrayWorkshop
killers10333 Posted December 29, 2011 Author Posted December 29, 2011 purpose of this thread- learn AutoIt code purpose of learning the code- Gaming but the purpose of me learning the code has no affect on this thread, otherwise 90% of kids on here (the forums) would also be banished.
GerrOrneq Posted December 29, 2011 Posted December 29, 2011 AutoIt is a very powerful and useful language, it has myriads of uses, there are thousands of users of it worldwide. It is STRICTLY enforced on this forum that AutoIt is NOT to be used for gaming automation, (Reread the rules.) You yourself have said "purpose of learning the code- Gaming", therefore you are declaring yourself in breach of the rules. You may think that by you learning to use AutoIt and applying that knowledge to other uses like gaming automation (which is an illegal activity on most of the sites where games are played, see their site rules.) is not harming AutoIt, but it does have an effect! for instance, some person used AutoIt to create malware, now a lot of Anti Malware companies automatically flag anything written in AutoIt as Malware just because they couldn't be bothered to actually analyse the app for malware instead of simply seeing that it is a compiled AutoIt script and flaging it as malware, this affects the respect that the language deserves and the reputations of those who write apps using AutoIt. Gaming sites that detect automation using AutoIt will also be 'Not Amused' to say the least, so please think of others when you say you are not harming us other programmers. I do not know what the percentage is regards others being banished (Valik will have that knowledge, but you don't really want to hear from him regarding this matter!) but I would feel safe in saying that if the rules are being broken then 90% could well be what the figure is. My opinion on games and gaming, if you are stuck at a certain point in a game then certainly ask someone for help in working past it, but if you feel the need to automate/cheat then perhaps you should not be playing that game, definitely not at that level, try novice level, or find another game that you are capable of playing without having to cheat, where will the automation end, (it would simply be easier to toss a coin and say Heads=You won Tails=You Lost) save you waiting around for an app to play your game for you. Of course you are always free to get together with others and if enough of you think that the game needs simplifying to avoid having to cheat then perhaps if enough numbers felt the same then the authors would make the game easier. Regards, DeMo. Quote of the week:"BASIC programmers never die, they GOSUB and don't RETURN." -- UnknownWisdom of the ages: I'd be unstoppable... if not for law enforcement and physics. Marriage, the number 1 cause of divorce. Don't steal... the government hates competition. Irish Government Motto: We’ve got what it takes to take what you’ve got. Birthdays are good for you. Statistics show that the people who have the most live the longest. Failure is not an option. It comes bundled with your Microsoft product.-- Ferenc Mantfeld If you learn from your mistakes, then why ain't I a genius?! -- Anonymous Remember, live every day as if it was your last day! one day you will be right. How is it one careless match can start a forest fire, but it takes a whole box to start a campfire? Sure my system is secure, it just locked up again. I haven't lost my mind; I have a tape back-up somewhere. ~Author Unknown
Valik Posted December 29, 2011 Posted December 29, 2011 i read the rules before i postedi didnt read any announcements sorryThese two posts are in direct contradiction. You either read the rules or you didn't. You are claiming both. That's not actually possible...so im not asking how to use this for a game im asking about certain coding that performs a task..what i use the task for isnt controllable =D. but yea its to learn about autoitAnd yet you post code that is very clearly used for game automation.Thread locked. Do not PM me attempting to argue or you will go away.
Recommended Posts