ColdDeath Posted November 24, 2008 Share Posted November 24, 2008 Okay in previous posts I tried to use small pieces of my script. That didn't work, because it was to confusing for everyone.So! I'll try to explain it as simple as possible about what the script does, and maybe you can try it. So you can give me tips about how to improve it.The script is used on a TBMMORPG (aka Turn Based Massive Multiplayer Online Role Playing Game ) gc.gamestotal.com (Realtime Server).Note: It's Turn based, so almost every action you do requires turns. Every 8 seconds you get a turn.The goal of my script is to gain 850 land planetsBuild Viator Ships => Explore => Found PlanetWhen planet has been found script will find out how much land the Planet has:If it has 849 or less:Manage Planets => Clicks on planet => Plunders it (plundering it = deleting it) After it the script will loop.If it has 850 or more:Script will loop and will find another planetAnd what type of planet it is.You can't plunder a X-planet, so I build aggresive ships so other players will attack me.When aggresive ships have been build, he will research commercial. (the higher the level the more you will earn).Here are the 3 scripts build for resolution: 1280 x 1024 Webbrowser FirefoxExplorer.au3expandcollapse popup; C:\Users\Willie\Desktop\Scripts\Planet Script\Explorer.au3 Sleep ( 500 ) WinActivate ( '(SFGC) Galactic Conquest - Mozilla Firefox' ) WinWaitActive ( '(SFGC) Galactic Conquest - Mozilla Firefox' ) Sleep ( 2500 ) MouseClick ( "left", 269, 415 ) Sleep ( 8000 ) ; Every sleep(8000), wil wait until the page has been loaded. MouseClick ( "left", 778, 395 ) MouseClick ( "left", 778, 400 ) MouseClick ( "left", 778, 405 ) MouseClick ( "left", 778, 410 ) MouseClick ( "left", 778, 415 ) MouseClick ( "left", 778, 420 ) MouseClick ( "left", 778, 425 ) ; The button can shift verticly, so the mouse has been set to click in a verticle line. Sleep ( 8000 ) MouseClickDrag ( "left", 441, 321, 768, 321 ) ; Select text Sleep ( 500 ) Send ( " ^c " ) ; Copy the text Sleep ( 500 ) WinActivate ( 'Planet Checker' ); Activate the other script WinWaitActive ( 'Planet Checker' ) send ( " ^v " ) ; Paste the text in the message box. The text is the amount of land. Sleep ( 500 ) Send ( "{BACKSPACE}" ) Sleep ( 50 ) Send ( "{BACKSPACE}" ) Sleep ( 50 ) Send ( "{LEFT 3}" ) Sleep ( 50 ) Send ( "{BACKSPACE 21}" ) Sleep ( 500 ) Send ( "{ENTER}" ) ; Edit the text so only numbers remain WinActivate ( '(SFGC) Galactic Conquest - Mozilla Firefox' ) WinWaitActive ( '(SFGC) Galactic Conquest - Mozilla Firefox' ) MouseClickDrag ( "left", 436, 304, 768, 304 ) Sleep ( 500 ) Send ( " ^c " ) Sleep ( 50 ) WinActivate ( 'Planet Checker' ) WinWaitActive ( 'Planet Checker' ) Send ( " ^v " ) Sleep ( 500 ) Send ( "{BACKSPACE 6}" ) Sleep ( 50 ) Send ( "{BACKSPACE}" ) Sleep ( 50 ) Send ( "{LEFT}" ) Sleep ( 50 ) Send ( "{BACKSPACE 21}" ) Sleep ( 500 ) Send ( "{ENTER}" ) ; Same deal, only then with the type of planet Exit ; Exits, Explorer will take overoÝ÷ ØùZëBç$z¶®Ý«¢+ØìèÀäÈíUÍÉÌÀäÈí]¥±±¥ÀäÈíÍѽÀÀäÈíMÉ¥ÁÑÌÀäÈíA±¹ÐMÉ¥ÁÐÀäÈíáÁ±½ÉȹÔÌ(ÀÌØí1½½ÀôÄ()]¡¥±ÀÌØí1½½ÀôÄ($(ÀÌØíÑáÐô%¹ÁÕÑ ½à ÅÕ½ÐíA±¹Ð ¡ÈÅÕ½Ðì°ÅÕ½Ðí%¹ÁÕб¹Ù±ÕÅÕ½Ðì¤($(%ÀÌØíÑáбÐìÅÕ½ÐìàÔÀÅÕ½ÐìQ¡¸ìMÉ¥ÁÐÝ¥±°Ý¥Ðչѥ°áÁ±½ÉÈ¥±±Ì¥¸Ñ¡Ñáи($$$$($$$ÀÌØíÑáÐô%¹ÁÕÑ ½à ÅÕ½ÐíA±¹Ð ¡ÈÅÕ½Ðì°ÅÕ½Ðí%¹ÁÕÐA±¹Ð9µÅÕ½Ðì¤ìA±¹Ð½Í¸ÌäíСٹ½Õ ±¹°Í¼¥ÐÝ¥±°¥¹½ÕÐÝ¡Ð¥¹½Á±¹Ð¥Ð¥Ì¸($$$$($$$%%ÀÌØíÑáбÐìÐìÅÕ½Ðí`ÅÕ½ÐìQ¡¸ì]¥±°Á±Õ¹ÈÑ¡Á±¹Ð¸($$$$%5½ÕÍ ±¥¬$ ÅÕ½Ðí±ÐÅÕ½Ðì°ÈàÜ°ÌÌÀ¤($$$$%M±À$$ àÀÀÀ¤($$$$%5½ÕÍ ±¥¬$ ÅÕ½Ðí±ÐÅÕ½Ðì°ÐÈÌ°ÌÈÔ¤($$$$%M±À$$ àÀÀÀ¤($$$$%5½ÕÍ ±¥¬$ ÅÕ½Ðí±ÐÅÕ½Ðì°ÜàаÐÈÀ¤($$$$%M±À$$ àÀÀÀ¤($$$$%5½ÕÍ ±¥¬$ ÅÕ½Ðí±ÐÅÕ½Ðì°ØÈаÔÀ̤($$$$%M¡±±áÕÑ ÅÕ½ÐíèÀäÈíUÍÉÌÀäÈí]¥±±¥ÀäÈíÍѽÀÀäÈíMÉ¥ÁÑÌÀäÈíA±¹ÐMÉ¥ÁÐÀäÈíáÁ±½ÉȹÔÌÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíIÕ¸ÅÕ½Ðì¤ì1½½ÁÌÑ¡ÍÉ¥ÁÐ¥¸($$$%±Í($$$$%M¡±±áÕÑ ÅÕ½ÐíèÀäÈíUÍÉÌÀäÈí]¥±±¥ÀäÈíÍѽÀÀäÈíMÉ¥ÁÑÌÀäÈíA±¹ÐMÉ¥ÁÐÀäÈí`µÁ±¹Ð¹ÔÌÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíIÕ¸ÅÕ½Ðì¤ìáÕÑÌ`µÁ±¹Ð¹Ô̸($$$%¹%($%±Í($$%M¡±±áÕÑ ÅÕ½ÐíèÀäÈíUÍÉÌÀäÈí]¥±±¥ÀäÈíÍѽÀÀäÈíMÉ¥ÁÑÌÀäÈíA±¹ÐMÉ¥ÁÐÀäÈíáÁ±½ÉȹÔÌÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì°ÅÕ½ÐíIÕ¸ÅÕ½Ðì¤($%¹%)]¹oÝ÷ ÙzejwjíÚºÚ"µÍÈÎÌLÕÙÉÌLÕÚ[YIÌLÑÚÝÜ ÌLÔØÜÉÌLÔ[]ØÜ ÌLÖ[]]LÂÚ[XÝ]]HJ ÌÎNÊÑÐÊHØ[XÝXÈÛÛ]YÝH[Þ[HYÞ ÌÎNÈ BÚ[ØZ]XÝ]HJ ÌÎNÊÑÐÊHØ[XÝXÈÛÛ]YÝH[Þ[HYÞ ÌÎNÈ B[ÝÙPÛXÚÈBJ ][ÝÓY ][ÝËK M HÈ^ÜBÛYBBJ B[ÝÙPÛXÚÈBJ ][ÝÓY ][ÝË ÍÍË MÈ HÈ[È[]ÛYBBJ B[ÝÙPÛXÚÈBJ ][ÝÓY ][ÝËK M HÈ^ÜÈYØZ[ÛYBBJ B[ÝÙPÛXÚÈBJ ][ÝÓY ][ÝË ÍÍË MÈ HÈ[È[Ý[]ÛYBBJ B[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝËÍ HÈÛÙÈÈZ[ÚÂÛYBBJ B[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË H HÈÙ[XÝÈHÚÂÛYBBJ BÙ[BBJ ][ÝÌI][ÝÈ HÛYBBJ L BÙ[BBJ ][ÝÞÑ[I][ÝÈ HÈZ[ÈHÚ[ÛHÚÛYBBJ B[ÝÙPÛXÚÂBJ ][ÝÛY ][ÝËÍ Ì HÈÛÙÈÈÙXÚÛYBBJ B[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË KÌLH HÈÙ[XÝÈÛÛ[YÚX[ÛYBBJ B[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË ÎK N HÈÝÈHÙXÚ[ÛÙÈ[HÛÜÛYBBJ BÚ[H ÌÍØÛÜHBÚ[XÝ]]HJ ÌÎNÊÑÐÊHØ[XÝXÈÛÛ]YÝH[Þ[HYÞ ÌÎNÈ BUÚ[ØZ]XÝ]HJ ÌÎNÊÑÐÊHØ[XÝXÈÛÛ]YÝH[Þ[HYÞ ÌÎNÈ BS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N BBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N H BBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N Ì BBBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N ÍH BBBBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N BBBBBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N H BBBBBBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N L BBBBBBBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N MH BBBBBBBBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N L H BBBBBBBBBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N LMH BBBBBBBBBBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N LH BBBBBBBBBBBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N LÍH BBBBBBBBBBBBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N M H BBBBBBBBBBBBBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË N MMH HÈ]ÛØ[ÚYXÛKÛÈH[ÝÙHÚ[[ÝHXÛBBTÛY HÈØZ]È[[[ÝYÚÈØ[HÙYBRYÚ[XÝ]]H ][ÝÓ[Þ[HYÞ ][ÝÈ HLH[ÈÚ[]XÚÙY[ÝIÌÎNÛÙ]HØ[ÈÚ[ÝËÛÈYÛÌÎNÝKHÙXÚÚ[ÛÛ[YKY]ËÙXÚÜ[]ÈYØZ[ÌÌÎÂBBUÚ[XÝ]]HJ ÌÎNÊÑÐÊHØ[XÝXÈÛÛ]YÝH[Þ[HYÞ ÌÎNÈ BBBUÚ[ØZ]XÝ]HJ ÌÎNÊÑÐÊHØ[XÝXÈÛÛ]YÝH[Þ[HYÞ ÌÎNÈ BBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝËÍ HÈÛÙÈÈZ[ÚÂBBTÛYBBJ BBBS[ÝÙPÛXÚÈBJ ][ÝÛY ][ÝË Ì L HÈÙ[XÝÈX]ÜÚÂBBTÛYBBJ BBBTÙ[BBJ ][ÝÍ ][ÝÈ BBBTÙ[BBJ ][ÝÞÑ[I][ÝÈ HÈÚ[Z[ ÚËBBTÚ[^XÝ]BJ ][ÝÐÎÌLÑØÝ[Y[È[Ù][ÜÉÌLÔÙ[ÙÉÌLÐX]XY ÌLÔØÜÉÌLÑ^Ü]LÉ][ÝË ][ÝÉ][ÝË ][ÝÉ][ÝË ][ÝÔ[][ÝÊHÈ[È^ÜYØZ[BBQ^]ÛÜBQ[YUÑ[^]The problems - Sometimes waiting for 8 seconds for a page to load, isn't enough. Result: I miss a whole loop.- I have to run 3 scripts (I just want to run one)- Mouseclick coordinates takes a lot of time.- I know it's really primitive...- It only works on one screensize- AutoIt doesn't support Mozilla Firefox- etc, etc, etcSo my question is: Because I'm a real newbie, and this is as advance as I can get. If you have time, could you improve my script, please?Thanks in advance,ColdDeath Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 24, 2008 Share Posted November 24, 2008 I didn't look closely but why not use functions? There is also an FF.au3 script that allows some FF automation. You could also use ControlClick() instead of MouseClick() and a few other functions in the FF.au3 to make it work with all screensizes. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
ColdDeath Posted November 24, 2008 Author Share Posted November 24, 2008 I didn't look closely but why not use functions? There is also an FF.au3 script that allows some FF automation. You could also use ControlClick() instead of MouseClick() and a few other functions in the FF.au3 to make it work with all screensizes.As I said, I'm just a newbie, I don't know how the FF.au3 works, so some explaining would be thankfull.ControlClick? Like same as MouseClick, but no visable mouse? (hmmm... should look cool though!) Link to comment Share on other sites More sharing options...
dbzfanatic Posted November 24, 2008 Share Posted November 24, 2008 Well if you DL the FF.au3 and read through the code you might start to understand. Also ControlClick() doesn't use your mouse,it simulates moving the mouse and clicking. It's easier than you think once you understand how it works. Do you understand what I mean about consolidating your scripts into functions? Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
ColdDeath Posted November 24, 2008 Author Share Posted November 24, 2008 (edited) Well if you DL the FF.au3 and read through the code you might start to understand. Reading through FF.au3... that's a REALLY big chunck to read through...Also ControlClick() doesn't use your mouse,it simulates moving the mouse and clicking.Mouseclick also simulates the mouse movements...Do you understand what I mean about consolidating your scripts into functions?Sorry, my english vocabulary isn't that extended jet. Edited November 24, 2008 by ColdDeath Link to comment Share on other sites More sharing options...
FireFox Posted November 24, 2008 Share Posted November 24, 2008 your game is in webbrowser like firefox ? if it's right it's better to use IE because you have lot of functions for ctrl read etc... Link to comment Share on other sites More sharing options...
ColdDeath Posted November 28, 2008 Author Share Posted November 28, 2008 your game is in webbrowser like firefox ?if it's right it's better to use IE because you have lot of functions for ctrl read etc...Good idea, I'll go to IE! Link to comment Share on other sites More sharing options...
Stilgar Posted November 28, 2008 Share Posted November 28, 2008 @ColdDeath:Why reading through the FF.au3, why don't you use the documentation?FF.au3 documentation jEdit4AutoIt PlanMaker_UDF Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now