i want to evolve this script one stage further so that it will become safer (that part i know how to do) but also more interactive(which i am not sure of a detail)
so the detail is that i want the script to open a messagebox using
getapplication.messagebox('do you want to login?','option:',3);
you can have a yes or no answer returned.
if the answer is yes for example then the program should login but i don't know how to get the program to recognize the yes answer.
how does that happen?
thanks to anyone who answers coolydudey60!
Posted on: August 08, 2009, 10:40:32 AM
don't get too excited it doesn't run
the problem is i keep getting this error code
Line 35: [Error] (35:1): Syntax error in script C:\Users\Ikos\Desktop\powerminer.scar
can someone help?
[scar]
program powerminer;
var
x,y,i,r,z,n,t,b,v,w,c,damn,color,color2,p,l,f,d:integer;
a:boolean;
s:string;
procedure findandminerock;
begin
if(findcolortolerance(x,y,color,3,130,1255,700,3))then
begin
clickwindmouse(x,y,50,40,true);
end;
wait(1000+random(500));//adjust according to how long your character takes to mine the rock
end;
procedure dropit(r,z:integer);
begin
findcolortolerance(r,z,color2,1070,445,1255,700,2);
clickwindmouse(r,z,15,10,false);
wait(100+random(300));
clickwindmouse(r,z+40,10,5,true);
wait(100+random(250));
end;
procedure check(n,t:integer);
begin
if(findcolortolerance(n,t,color2,1080,450,1110,475,3))and(findcolortolerance(n,t,color2,1205,670,1235,695,3))then
a:=true;
end;
procedure login;
var
x,y:integer;
begin
damn:=0;
wait(500);
case getapplication.MessageBox('is your browser icon in the top left hand corner of your screen?','ANSWER THIS',4)of
mryes:damn:=1;
if(damn:=1)then
begin
clickmouse( 40,30,true);
wait(100);
clickmouse(40,30,true);
end;
if(damn=0)then
begin
getapplication.messagebox('you have 5 seconds to open ur browser','time is money',0);
wait(3000);
clickmouse(1080,540,true);
wait(16000+random(2000));
clickwindmousemouse(835,530,15,30,true);
wait(300+random(300));
clickwindmouse(830,615,10,7,true);
wait(100+random(500));
typekeys('******');//replace with ur username
wait(200+random(200));
clickwindmouse(830,675,14,3,true);
wait(200+random(150));
typekeys('*******');//replace with ur password
wait(50+random(150));
clickwindmouse(830,715,15,20,true);
wait(4500+random(700));
findcolortolerance(x,y,9822460,640,725,1025,780,3);
clickmouse(x,y,true);
end;
begin
getapplication.MessageBox('after this write login if you want the program to log you in','login:',0);
wait(2000);
readln(s);//write login if you want the program to log you in
wait(75);
movetotray;
activateclient;
if(s='login')then
begin
login;
end;
w:=0;
repeat
wait(2500);
case getapplication.MessageBox('are you in a mining site so that u can pick the color of the streaky bit of the rock to be mined?','ready?',4)of
mryes:w:=1;
wait(2500);
until(w=1);
c:=0;
getapplication.MessageBox('now pick the color of the streaky bit of the rock to be mined!','go for it',0);
pickcolor(color,b,v);//pick the color of the streaky bit of the rock to be mined
repeat
wait(2500);
case getapplication.MessageBox('have you got a sample of the rock to be mined in your inventory?','i''d like to know',4)of
mryes:c:=1;
wait(2500);
until(c:=1);
getapplication.MessageBox('now pick the color of the rock in your inventory','go for it',0);
pickcolor(color2,b,v);//pick the color of the mined rock in your inventory(you'll have to mine a bit before u start)
repeat
p:=random(4);
l:=random(4);
f:=random(6);
d:=random(6);
repeat
for i:=1 to random(20) do
if(f>2)then
begin
sendarrow(p);
end;
for i:=1 to 5 do
begin
if(iskeydown('t'))then
begin
terminatescript;
end;
wait(25);
end;
findandminerock;
check(n,t);
until(a=true);
for i:=1 to 5 do
begin
if(iskeydown('t'))then
begin
terminatescript;
end;
wait(25);
end;
for i:=1 to random(20) do
if(d>4)then
begin
sendarrow(l);
end;
for i:=1 to 28 do
begin
dropit(r,z);
end;
for i:=1 to 5 do
begin
if(iskeydown('t'))then
begin
terminatescript;
end;
wait(25);
end;
until(false);
end.
[/scar]