ok so i'm making a scar script that will turn expons igloo aber into a multi igloo aber that i can turn on when i leave for school for like 8 hours my biggest problem is efficiency xD i want to tell scar to check for a bitmap of the yes and tell it if it finds it to check 30 pixels lower, but i want to know if theres an efficient way to make this check for 10 buys without having to do 10 different procedures and hopefully make it smaller code also i need this to restart all the variables when i loop back through it 4 or 5 times... any help? one last thing is there a way to loop through the code and tell it if x=3 to use the third username? if so how cuz that would cut the code down by a ton thanks so much
If the fields with the value yes are always at the same place but space apart by 30 pixels, you can do a loop using while i and increment that "i" and use it to see where the fields are. ie: (that's not the real code, I'm just typing this to give you a general idea) while i < 10 do begin if findbitmapin(bitmap, mousx,mousy,100,i*30,150,(I*30)+30) so at the first shot "0" it will search 100,0,150,30 at "1" it will search 100,30,150,60 and so on... and for your last point, you can use an array. let's say you put "hi","bye","neopets" in the array, using array[1] will give you "bye". and you can code what's between the bracket with a variable... Hope everything is clear, I just woke up :lol:
yea i kinda get the idea of what you mean i'll go try to make it work and i'll post back if i need more help
If you want a variable x to correspond to each username, make the usernames an array. Then do like Username[x] to call it. So when x is 0 it uses username 0, etc. Good luck .
i'll post my one which i made for adam as a coding example if there's anything you don't understand, please pm me and i'll try and help you i have put several comments in, just to tell you why i am doing certain things to help you adam, post here or pm me if you don't want this up Spoiler Code (Text): {.Script Info: # ScriptName = Adam's Igloo Setup # Author = chelsea1 # Description = Sets up Adam's Igloo abers # Version = 1 # Date = 6th August 2008 # Comments = Open as many igloo's as you need, imput the usernames and passwords, # Comments = make sure the igloos are all open and maximised and run the script. # Comments = Also make sure your igloo list is on the desktop and that it's called igloolist.txt /Script Info} program Adam_Igloo_Setup; var igloosymbol, x, y : integer; authorized, x1, y1 : integer; info, x2, y2 : integer; loadlist, x3, y3 : integer; desktop, x4, y4 : integer; settings, x5, y5 : integer; minimize, x6, y6 : integer; i : integer; users:Array[1..8]of string; passes:Array[1..8]of string; { setup player } const nfuser = 'xxxx'; nfpass = 'xxxx'; NumberOfAccounts = 8; FileName = 'igloolist.txt'; minwait = '2'; maxwait = '4'; procedure Accounts; begin //set all user names and passwords correctly please users[1]:= 'x'; users[2]:= 'xx'; users[3]:= 'xxx'; users[4]:= 'xxxx'; users[5]:= 'xxxxx'; users[6]:= 'xxxxxx'; users[7]:= 'xxxxxxx'; users[8]:= 'xxxxxxxx'; passes[1]:= 'x'; passes[2]:= 'xx'; passes[3]:= 'xxx'; passes[4]:= 'xxxx'; passes[5]:= 'xxxxx'; passes[6]:= 'xxxxxx'; passes[7]:= 'xxxxxxx'; passes[8]:= 'xxxxxxxx'; end; { End Setup } procedure declaredtms; //just some bitmaps and dtms which i use to find things, like the start button and such begin igloosymbol := DTMFromString('78DA639461606048614001BF4FDB806946289' + 'F11A4260B554DECA43FA86AC4814406AA9A6231715435A240221E' + '55CD81030750D400008F4008CF'); authorized := BitmapFromString(58, 13, 'beNrlk9tygjAURfn/f3' + 'Naq+KNKlchF/AXenI2OcYIPui0L82syexkkKzZxGJxvXZgGByc2+v' + 'QzDH0dUAZkBPWFkRvz4I1pxidMQeh13vCeKzazfF/bJMk+W1bOuKJ' + 'bcLjiS0bvmjrjn7VFuEvbd/p9tHWefJNEOHQHDnxA7bBcrSVHdiiz' + '2iWAVtZiu3dM+/ZTnYLYfdO3y2ExxOnbgJs3WO+WwiHdzWy7W0HBu' + 'tsB3sh+KCGQLC2IpDZp+pNSbgdDsjW5JhDNxb4hiHnI4CqUfvkfli' + 'Vuse6FEhGgBU04h+yIasW+MQys1LsRlYwpDBmbxjY7qVV993Zlmbh' + 'uS16EzFqacLN78g9NCY3o+0pttWZtOdn0qAaDxAL9UI3ZL+zBmF26' + 'BK4fW5MenNK+hy2LaWJm1EZGL+yCv4y6ladancEZd1uwxeqdkNES3' + '1Zhc/QEjs0K5VpdSIouNwdQZQd7eGe3Rxdm07TbIi2WQesYurlE5o' + 'qbeqtZ+OoQlKhLtcPrISq/IqoyyVRFUzpqItP5oOo8hEsbzvFYpYf' + 'DsNp2g=='); info := DTMFromString('78DA6394656060306140050673C1142394CB2' + '88FA9A666D6095435CA986AAEBCF88FAA460253CDDDF7686AA481' + '840E9A7B183C50D580DCAC8DAEC616D3CD68E614746D4155A3012' + '4EC50D5886B06A0AAD1C45413955E87A2060087F90F34'); loadlist := BitmapFromString(64, 15, 'beNrVkssOwyAMBPn/D82h' + 'pC2PBKVpDrWKhCwMzl5dzQFvx0sUxS/X9TXNeX5McxzFNKVk4yQQ5' + 'xwuI+tIcnv1vkcQKsFlZB0vVMxtCyBUIpP6Q5LhumyTPUoDkfMbhN' + 'ZnY/dXSxBH35qZjBfIv2Q8tjN/VzMHSZS7OlJ6glDJbKxnJFEKFV+' + 'ajRhRqGQ21jOSKIXKFdJkrCD82+gSxOGaIg9rWyifKgRvnIdpVr8Y' + '5gcleo26'); desktop := BitmapFromString(58, 58, 'beNrtmHlQU3cewPf90dmy3' + 'Xa2h3Vm25kuu3WZadfFmRZcS1egrLhLK8pR2W1RDkEoyhFErrVGBM' + 'PEIkEURRxu5FABBWISyEEkCQmEmwSCgRiOyJkgIZiYkN/+Mtg0fay' + 'Mu+Wh08mbz2Tee/n+8j75nd/f06p1WitWrFh5bgzJJqkcCeEqL+4c' + '0zeB7BPf0C+WPJyfee5igl45pWVwRcwniXKAwPRMYYVdEWawZDl8R' + 'dNDcPsBcEoWJhPyxaKeJc38hok18u6R2eL4TFboaZp3ImVPUpMfkR' + 'dySXixVVHUN0tTgWKpLq11wb9K4XZZFt+oI/DACn87KfQNSmLQqfO' + 'qaYzcqqiihKxmv4QGrwTKzkiKL4EXmC3MZCvyOmYbVaBaAYhCzcmW' + 'hb3FCvfc0YOlClzVKIk+xZIsqDQGiPsFWSTNEMcCEFi3Hn7R5IZby' + 'rkpLFT/HkXG35ZdEsw2zoEyOSgcAaltupDbqj2Fil05o/vz5Sl1Yy' + 'T6BGtQqdIsAaNuNfC+XcpgKMVwhA4ck7C1/SKWViYDYUzgTzXhVaP' + 'bnydlDcwYl5eenS650p4og8Xt47G13RpYj28HnvVPeD/1nlI9b1xW'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uVnxX8AO7B3FA=='); settings := DTMFromString('78DA631467646038CC80027E7EFC0DA619A17' + 'C46909A03A86ADE5DFE8CAA4612C83A8AAAE6E9A1D7A86A4480AC' + '23A86ABE3DFF89AA4602C83A89AAE6D8D233A86A1430DD7362F93' + '94C353B50D5BC3DFF09550D2BA67B5E1C7F87AA860DC8DA85AAE6' + 'C3CDAF98E1B31D55CDAF4F7F50D52801595B50D57CBCFD0D53CD4' + '5543507171C4755A30C645D4655737BD743143500ADA22D04'); minimize := BitmapFromString(19, 18, 'beNptku1P21UUxxlxmrmI' + 'ThxC6OgKtOtYy4BVcWV1ApOWAZXnjUELlNH210f6AL9SSnno2ERhw' + '02zSJao8YWJiTExJrroYG/8B/SlJmyFFt+Ywa/3nHtrYvTW19yc3F' + 'fnk/P9fs8x//hH6p/QOhtZoX03sCOOpig0TcGlCLwdylVDIFfnPIR' + 'XjYuorxO55ZnO8eTX36WpB2zt2+zH32WXvmKTD5jvPnPepfY1artN' + 'h1eo9UM68D72L2HnIrbG4OIk1LmliqHtmqFfxtfo/e+z6z/8vfx1N' + 'vo5C64z7yecZeN3cuzoKrV8QAduYXcC2+PYLEK9T1IPbx9veXj1Jn' + 'Jk9Zvs3Jcs8Clz3WPXb1Mrb75Jexexax7bYnA5lhPPx+mDROeRqka' + '3i00/dS/i9Gcs9kWOcnzERri2JdqzgB0z2CJCYwj0fvKWj/eTOg+p' + 'dZMaYV9j2znR/jMPhPua+H+WbYUN8kHzlFNGEd8Jcgp0XlLjJlqBa' + 'ATQClAtSJqxFAdbpoE74tT4HWZdplcStDOOl6exeRIMAXjTR8664Y' + 'wAagecskOVEzSCVGXbkbU/4iDfhW01J3LwFvdFzTE0RrAxDPoA6Hx' + 'E6wa1AJUOKLeD0gGnndLpsZ3StkcXgoSHxqOzLOcC4e7McTRGoTEC' + '+jDogqDxwykPVLjwpIDlTlAKktKWLmnbqPeRrgW8spSj+N+9kDsD4' + 'ww2TmODCLowaIKo8mO5F8vcKHehwpVR2NJFrRt1btI2C70J7L9B+x' + 'KUh9wxj6ZZbIrhhSjqIqidQlWIKgJU5keZF2UuIhtNv2raPGMnfEf' + 'mOeRITwK7OLhATXPYPIeGOL4RQ22UqkSqCNPSAC320WIXKRrefdn4' + 'WGnLGELENAPmefz3oKeNUdU0OynSkhAt8tNCgbxi+fPFS5tllgzPn' + 'B926wwcDM5SZZSViez1EDvmpS/ZydGB3ecbHxcPZKqdRB8gTeLBYF' + 'WMVUbZCZEdD7ECDzsyRg737+Zf3HytP6O05W7pfIAYwmAIY8MknJ+' + 'CehHqIqiJUKVI5VO0JEiP+dhRJz08QvJ70ocMGwWdf8kGn6nH9s46' + '986593We/VqPVOuVqv1S1YSknMjI/ZkSLyl0ES7yhZFM/rW9vI5kn' + 'v6h2rpV+N5Wad+W4lpSOfRUZXlSOfS0wppUWJNl1mTpcKrImiq0pA' + 'sGU0eupp/rTR8yJ/Pe/U3+H/OySPc='); end; procedure mainloop; begin finddtm(igloosymbol,x,y,0,0,1278,768); clickmouse(x,y,true); wait(500); clickmouse(x+173,y+52,true); wait(500); sendkeys(nfuser); keydown(9); // tab wait(10); keyup(9); // tab wait(100); sendkeys(nfpass); wait(100); keydown(9); // tab wait(10); keyup(9); // tab wait(100); keydown(13); // enters auth details wait(10); keyup(13); repeat wait(1000); // waits to auth until(findbitmap(authorized,x1,y1)) keydown(9); // tab wait(10); keyup(9); // tab wait(100); sendkeys(users[i]); wait(100); keydown(9); // tab wait(10); keyup(9); // tab wait(100); sendkeys(passes[i]); wait(100); keydown(9); // tab wait(10); keyup(9); // tab wait(100); keydown(13); // enter wait(10); keyup(13); // enter login details repeat wait(100); until(finddtm(info,x2,y2,0,0,1000,1000)) clickmouse(x2+70,y2+110,true); // close window wait(500); finddtm(igloosymbol,x,y,0,0,1278,768); clickmouse(x+100,y+60,true); wait(500); findbitmap(loadlist,x3,y3); clickmouse(x3,y3,true); wait(500); findbitmap(desktop,x4,y4) clickmouse(x4,y4,true); wait(500); sendkeys(filename); wait(500); keydown(13); // enter wait(10); keyup(13); // loads list wait(5000); clickmouse(x3+200,y3-210,true); // closes window wait(500); finddtm(igloosymbol,x,y,0,0,1278,768); clickmouse(x+122,y+67,true); wait(500); sendkeys(minwait); keydown(9); // tab wait(10); keyup(9); // tab wait(100); sendkeys(maxwait); wait(100); finddtm(settings,x5,y5,0,0,1000,1000); clickmouse(x5+300,y5-33,true); wait(100); finddtm(igloosymbol,x,y,0,0,1278,768); clickmouse(x+15,y+60,true); // starts igloo wait(1000); findbitmap(minimize,x6,y6); clickmouse(x6,y6,true); wait(2000); end; begin wait(5000); i:=1; declaredtms; accounts; for i := 1 to NumberOfAccounts do mainloop; end.