Hello again sir,
I have 2 questions:
1.This one works ,but when i answer to Captcha, sound isn't stopping ,it plays again and again.
function SetForegroundWindow(hwnd: integer) : Boolean; stdcall;
external 'user32.dll';
function captcha:boolean; begin
if engine.dlgtext.contains('Refresh') or
engine.dlgtext.contains('Captcha') or
engine.dlgtext.contains('45 seconds') or
engine.dlgtext.contains('Bot') then begin
SetForegroundWindow(Engine.GameWindow);
PlaySound(exepath+'\sounds\'+'PlayerAlarm'+'.wav');
delay(14000);
StopSound;
end;
end;
begin
while true do begin
delay(3000);
captcha();
end;
end.
2.How can i merge the Captcha script with this one??
var buff:tl2buff;
buffID,seconds:cardinal;
begin
buffID:= 1323; //change buff id
seconds:= 70; //buff end time seconds
while true do begin
if not user.buffs.byid(buffID, buff) or (buff.endtime < seconds*1000) then begin
if (user.target.dead) or (user.target = nil) then begin
engine.facecontrol(0,false);
while user.incombat do delay(1000);
engine.bypasstoserver('_bbshome'); //use alt and b change for your server
delay(1000);
engine.bypasstoserver('02');
delay(1000);
engine.bypasstoserver('0b');
delay(1000);
engine.bypasstoserver('01a');
delay(1000);
engine.bypasstoserver('_bbsgetfav');
delay(1000);
engine.facecontrol(0,true);
end;
end;
end;
end.