SRL Archive - OSR Help

How do i add an antiban?


aidandabest2012

2012-06-12 07:41:44

Hey all, first of all this sin't my script but this one doesn't have an antiban and needs it desperately, so if anyone could please add one? I would appreciate it VERY much, thanks!

program GlassBlower;
{$include srl/srl/misc/smart.simba}
{$I SRL/SRL.simba}
{$I srl/srl/misc/debug.simba}

const
SRLStats_User = ''; // Your SRL Stats ID (If you dont have one then just leave it as it is)
SRLStats_Password = ''; // Your SRL Stats Password (If you dont have one then just leave it as it is)

var
StartTime,XPS:Integer;
//progress variables
XP,XPH,Sec,Slot:Integer;
StatGain,XP1,XP2:Integer;
procedure DeclarePlayers;
begin

Slot := 22; //choose your bank slot where the glass is at.

HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Active := True;
Players[0].Pin := '';
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;// declare players
procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 87;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
end;
procedure Proggy;
begin
XP := GetXPBarTotal - Players[CurrentPlayer].Integers[0];
Sec:= (1+((Getsystemtime-StartTime)/1000));
XPH := (3600*XP) / (SeC);
statGain := XP;

writeLn('===================================');
writeLn('============S1NGlassblower==========');
writeLn('Time Running: ' + TimeRunning);
writeLn('XP Earned: ' + IntToStr(XP));
writeLn('XP/h: ' + IntToStr(XPH));
writelN('===================================');
writeLn('===================================');

Stats_Commit;

end;
procedure CraftOrbs;
var
x,y,DTM,t:Integer;
begin
DTM := DTMFromString('mlwAAAHicY2dgYLjAyMBwEYivA/E1ID4NxKeg7IVAvAKI5wPxTCBeBsQLgHgREHu4uwJ1M2HFRgy4ASMeDAUAQzsLUQ==');

MouseItem(Random(25),1);
if WaitColor(305,362,4543066,5,10000) then
begin
if FindDTM(DTm,x,y,MCX1,MCY1,MCX2,MCY2) then
begin
Mouse(x,y,1,1,True);
MarkTime(t);
repeat
XP1 := GetXPBarTotal;
wait(random(5000));
Proggy;
if Timefrommark(t) > 200000 then
exit;
until(FindDTM(DTM,x,y, 681,422,730,457));
end;
end;
end;
procedure Bank;
var
t:integer;
begin
OpenBankChestEdge(SRL_BANK_SW);
MarkTime(t);
repeat
wait(100);
if PinScreen then
begin
InPin(Players[CurrentPlayer].Pin);
end;
if TimeFromMark(t) > 5999 then
begin
Bank;
exit;
end;
until(BankScreen);
if BankScreen then
begin
DepositAll;
MouseBankSlot(22,0);
WaitOption('All',4000);
repeat
wait(10);
until(InvFull);
if InvFull then
CloseBank;
end;
end;
begin
ClearDebug;
SetupLogin;
DeclarePlayers;
LoginPlayer;
if (Players[CurrentPlayer].Integers[1] = 0) then
begin
if not IsXPBarOpen then ToggleXPBar(true);
Players[CurrentPlayer].Integers[0] := GetXPBarTotal;
XPS := GetXPBarTotal;
Players[CurrentPlayer].Integers[1] := (Players[CurrentPlayer].Integers[1] + 1);
end;
StartTime:=GetSystemTime;
SetupSRLStats(1068, SRLStats_User, SRLStats_Password);
repeat
Bank;
CraftOrbs;
until(not LoggedIn);
stats_IncVariable('Crafting EXP (Gained)', statGain);
stats_Commit;
end.

CephaXz

2012-06-12 07:44:12

Adding antiban in this script would make you looks even more like a bot? lol
IMO, I'd just blow the glass only for more efficient XP/Hr.

putonajonny

2012-06-12 08:19:38

GlassBlowing get's crafting XP right? The only thing I would occasionally get it to do is hover over the crafting skill, something like:
Case Random(500) of
0 : HoverSkill(SKILL_Crafting, False);
end;

aidandabest2012

2012-06-12 08:20:48

From: putonajonny
GlassBlowing get's crafting XP right? The only thing I would occasionally get it to do is hover over the crafting skill, something like:
Case Random(500) of
0 : HoverSkill(SKILL_Crafting, False);
end;


Thank you very much, where abouts would i add this?

I'm a noob to SIMBA scripting sorry

riwu

2012-06-12 08:46:39

U can insert them at almost anywhere in the script, for efficiency wise it may be better to insert at places where u will be waiting (like while blowing the pipe).
I'd make an antiban procedure with more actions though, explore the antiban includes for some pre-made ones. (eg. RandomRClick)
Read through the beginner scripting tutorial if u dont know how to do it.

J J

2012-06-12 08:57:22

repeat
XP1 := GetXPBarTotal;
wait(random(5000));
Proggy;
if Timefrommark(t) > 200000 then
exit;
until(FindDTM(DTM,x,y, 681,422,730,457));
Place it somewhere in there so yeah.. make an antiban procedure how you want to have it.

Example:
procedure Antiban;
begin
case Random(500) of
0: HoverSkill(SKILL_Crafting, False);
end;
end;

Place it in there.
repeat
XP1 := GetXPBarTotal;
wait(random(5000));
Antiban;
Proggy;
if Timefrommark(t) > 200000 then
exit;
until(FindDTM(DTM,x,y, 681,422,730,457));

Now to get the correct antiban timing you need to do some maths, an inventory takes like 20 seconds so antiban gets called 3-4 times each time. You want to check crafting xp roughly every 5-10 minutes so I would make it have around 7.5*3.5*(60/20)=78,75 -> case Random(79) to check crafting xp every 5-10 minutes or so.