mage of begu
2007-02-23 12:18:25
<!– BEGIN TEMPLATE: formanswers –>
mage of begu - SRL Member Application Form
mage of begu
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
A little java
Other Communitys
sythe.org
How Long have You Played Runescape
4 Years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I started making scripts about a month ago and know i made my first usefull scripts which is "East Varrock Autominer/Banker" and it works. I havent been active because of exams but now i will be online more and more, im friendly. I will help if im asked to. What else could i tell about me and my experience :)
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
——————————————————
<!– END TEMPLATE: formanswers –>
mage of begu - SRL Member Application Form
mage of begu
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
A little java
Other Communitys
sythe.org
How Long have You Played Runescape
4 Years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I started making scripts about a month ago and know i made my first usefull scripts which is "East Varrock Autominer/Banker" and it works. I havent been active because of exams but now i will be online more and more, im friendly. I will help if im asked to. What else could i tell about me and my experience :)
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
{ Autominer/banker for East Varrock }
{ ((Made by "Mage Of Begu")) }
{-------------------------------------------}
{-->Start script at bank... }
{ }
{-->REMEMBER TO SET PLAYERS AT LINES 61-102 }
{ }
{-->Play nice and dont get banned :) }
{-------------------------------------------}
{CREDITS GO TO: }
{Pentti---for being such a great teacher and}
{for his great banking procedure... }
{ }
{the nerd---for his great FindObjInBox func.}
{-------------------------------------------}
program EVAMB;
{.include srl/srl.scar}
{.include srl/srl/skill/mining.scar}
const StoreAll=2;//DONT TOUCH
CopperColor=4549523;//CHANGE ONLY IF NEEDED
TinColor=9474460; //CHANGE ONLY IF NEEDED
IronColor=000000; //CHANGE ONLY IF NEEDED
OreMaskCol1=4349813;//DONT TOUCH
OreMaskCol2=3558752;//DONT TOUCH
OreMaskCol3=4811396;//DONT TOUCH
var OreColorMOB, OreColorMOB1, OreColorMOB2, OreColorMOB3:Integer;
DTM, Trips, MineMark, Walked:Integer;
PickEquipped, PickFound:Boolean;
Procedure SetOreColor;
Begin
Case LowerCase(Players[CurrentPlayer].String1) Of
'copper' : OreColorMOB1:=CopperColor;
'tin' : OreColorMOB1:=TinColor;
'iron' : OreColorMOB1:=IronColor;
End;
Case Lowercase(Players[CurrentPlayer].String2) Of
'copper' : OreColorMOB2:=CopperColor;
'tin' : OreColorMOB2:=TinColor;
'iron' : OreColorMOB2:=IronColor;
End;
Case LowerCase(Players[CurrentPlayer].String3) Of
'copper' : OreColorMOB3:=CopperColor;
'tin' : OreColorMOB3:=TinColor;
'iron' : OreColorMOB3:=IronColor;
End;
End;
Procedure ChangeOreColor;
var C:Integer;
Begin
if(random(2)=1)then
begin
OreColorMOB:=OreColorMOB1
exit;
end;
C:=Random(3)
Case C of
0: OreColorMOB:=OreColorMOB1
1: OreColorMOB:=OreColorMOB2
2: OreColorMOB:=OreColorMOB3
end;
end;
{---------------------------------------------------------}
procedure DeclarePlayers;
begin
NumberOfPlayers(3);
CurrentPlayer:=0;
Players[0].Name:='NameHere'; //Name Here
Players[0].Pass:='PassHere'; //Pass Here
Players[0].Nick:='ame'; //3 chars of your name
Players[0].Active:=True; //true or false
Players[0].Integer1:=5; //trips to be made
Players[0].Boolean1:=true; //Dont touch...
Players[0].Boolean2:=true; //Dont touch...
Players[0].String1:='copper';//Primary ore to mine
Players[0].String2:='copper';//Secondary ore to mine
Players[0].String3:='tin'; //Mines this ore only few times
Players[1].Name:='NameHere'; //Name Here
Players[1].Pass:='PassHere'; //Pass Here
Players[1].Nick:='ame'; //3 chars of your name
Players[1].Active:=True; //true or false
Players[1].Integer1:=2; //trips to be made
Players[1].Boolean1:=true; //Dont touch...
Players[1].Boolean2:=true; //Dont touch...
Players[1].String1:='copper';//Primary ore to mine
Players[1].String2:='copper';//Secondary ore to mine
Players[1].String3:='tin'; //Mines this ore only few times
Players[2].Name:='NameHere'; //Name Here
Players[2].Pass:='PassHere'; //Pass Here
Players[2].Nick:='ame'; //3 chars of your name
Players[2].Active:=True; //true or false
Players[2].Integer1:=2; //trips to be made
Players[2].Boolean1:=true; //Dont touch...
Players[2].Boolean2:=true; //Dont touch...
Players[2].String1:='copper';//Primary ore to mine
Players[2].String2:='copper';//Secondary ore to mine
Players[2].String3:='tin'; //Mines this ore only few times
NickNameBmp:=CreateBitMapMaskFromText(Players[CurrentPlayer].Nick,Upchars)
end;
{---------------------------------------------------------}
Function YouManage: Boolean;
Begin
if(Pos('anage',GetTextAtEx(20, 415, 0, SmallChars, False,False, 0, 1, 0, 80, False, tr_AllChars))<>0)then
Result:=True;
End;
procedure WalkToMine;
begin
Walked:=0
MakeCompass('N');
RadialRoadWalk(FindRoadColor,0,60,70,0,0)
Wait(1500)
RadialRoadWalk(FindRoadColor,70,110,70,0,0)
Wait(500)
Repeat
RadialRoadWalk(FindRoadColor,140,220,71,0,0)
Walked:=Walked+1;
Wait(400)
until(FindSymbol(x,y,'Mining Spot'))
Mouse(x,y,2,2,true)
Wait(400)
Flag;
end;
procedure MineSomeRocks;
begin
if(FindObj(x,y,'Mine',OreColorMOB,7))then
Mouse(x,y,2,2,true)
Wait(1000+random(200))
Flag;
FindTalk
FindNormalRandoms;
FindPick;
MarkTime(MineMark)
Repeat
if(YouManage)or(TimeFromMark(MineMark)>=8000)then
Break;
wait(50+random(50))
until(InvFull)
end;
procedure WalkToVarrock;
begin
FindSymbol(x,y,'Mining Spot')
Mouse(x+random(1),y+random(5),1,1,true)
Wait(100)
RadialRoadWalk(FindRoadColor,0,90,70,0,2)
Wait(400)
RadialRoadWalk(FindRoadColor,-30,60,70,0,2)
Wait(400)
RadialRoadWalk(FindRoadColor,-30,60,70,0,2)
Wait(400)
RadialRoadWalk(FindRoadColor,-100,0,70,2,2)
Wait(400)
RadialRoadWalk(FindRoadColor,-100,0,70,2,2)
Wait(400)
FindSymbol(x,y,'Bank')
Mouse(x,y,2,2,true)
Flag;
end;
Function GetBankSymbolColor:LongInt;
var BankBitMap,Color,C:Integer;
acc:Extended;
begin
BankBitMap := BitmapFromString(7, 5, 'z78DA3330000143030363' +
'43635CA401921A08DBD9D8D1D8D40899C4AFC6CDD2C5C4D415531' +
'7A61A4CD2C2D4CCD4D014590D4404998D4C0200CC4A2C81');
Color:=6417151
FindDeformedBitmapToleranceIn(BankBitmap,x,y,570,5,725,160,70,0,True,acc);
if(acc>SymbolAccuracy)then
begin
repeat
c:=c+5;
if (FindColorTolerance(x,y,6417151,x,y,x+15,y+5,c)) then
begin
Result:=GetColor(x,y);
end;
until(Result>0)or(c>70);
end;
FreeBitmap(BankBitMap);
end;
procedure CheckBankColor;
var c : integer;
begin
BankColor:=0
c:=0
repeat
BankColor:=GetBankSymbolColor
c:= c+1;
wait(150+random(100))
writeln('Taken '+inttostr(c)+'/20 tries to find bank')
if(BankColor=0)
then begin
KeyDown(VK_Left)
wait(180)
KEyUp(VK_Left)
wait(50)
end;
until(BankColor>0)or(c>19)
if(c>19)then
begin
c:=0
Writeln('Cant find bank symbol');
Writeln('Logging out and coming back')
LogOut;
wait(5000+random(2000))
LogInPlayer;
wait(500+random(300))
checkbankcolor;
SetRun(True)
Mouse(x+3,y+6,2,2,true)
getmousepos(x,y)
writeln('Bank color: '+inttostr(BankColor))
exit;
end;
C:=0
Mouse(x+3,y+6,2,2,true)
getmousepos(x,y)
writeln('Bank color: '+inttostr(BankColor))
wait(50+random(50))
Flag;
wait(50+random(50))
end;
procedure OpenBankP;
var
x, y, fs, fs2,Find: Integer;
begin
if not BankScreen then
begin
checkBankColor;
repeat
if(Find>5)
then
begin
Find:=0
CheckBankColor;
Mouse(x+3+random(2)-random(2),y+4+random(2)-random(2),2,2,true)
wait(200)
flag;
OpenBankP;
exit;
end;
Find:=Find+1
if (FindObj(x, y,'Use Bank',5270395,10)) then
Mouse(x+random(2)-random(2), y+random(2)-
random(2),4,4, False)
else
if (FindObj(x,y,'Use Bank', 1588818,10)) then
Mouse(x+random(2)-random(2), y+random(2)-random(2),4,4, False)
else
if (FindObj(x,y,'Use Bank', 6783890,10)) then
Mouse(x+random(2)-random(2), y+random(2)-random(2),4,4,False);
Wait(250+random(100));
if (ClickOption('quickly', 1)) then
begin
Flag;
repeat
Wait(100+random(100));
fs := fs + 1;
until(BankScreen)or(fs >= 50);
end;
fs2 := fs2 + 1;
if(fs2>2)
then begin
fs2:=0
checkbankcolor;
wait(150+random(100))
getmousepos(x,y)
Mouse(x+3,y+6,2,2,true)
OpenBankP;
exit;
end;
until (BankScreen)or(fs2 > 2);
MakeCompass('N')
HighestAngle;
exit;
end;
end;
function FindObjInInv(var cx, cy: Integer; Text: string; color, tolerance: Integer):
Boolean;
var
x, y, a, c, i, x1, y1, x2, y2: Integer;
begin
if (FindColor(x, y, color,MIX1,MIY1,MIX2,MIY2)) then
begin
x1 := 245;
y1 := 165;
x2 := 277;
y2 := 185;
repeat
if (not (LoggedIn)) then
break;
a := a + 1;
if (a = 1) then
c := c + 1;
if (a = 3) then
c := c + 1;
for i := 1 to c do
begin
if (a = 1) then
begin
x1 := x1 + 30;
x2 := x2 + 30;
end;
if (a = 2) then
begin
y1 := y1 - 20;
y2 := y2 - 20;
end;
if (a = 3) then
begin
x1 := x1 - 30;
x2 := x2 - 30;
end;
if (a = 4) then
begin
y1 := y1 + 20;
y2 := y2 + 20;
end;
if (x1 = 485) and (x2 = 517) then
x2 := x2 - 2;
if (y1 = 325) and (y2 = 345) then
y2 := y2 - 7;
if (x2 > 515) then
Break;
if (FindColorTolerance(x, y, color, x1, y1, x2, y2, tolerance)) then
begin
MMouse(x, y, 0, 0)
cx := x;
cy := y;
if (IsUpText(Text)) then
begin
Result := True;
Break;
end;
end;
end;
if (a = 4) then
a := 0;
until (x2 > 515) or (Result = True);
end;
end;
Function FindObjColInBoxInInv(rx,ry:Integer;Text:String;Color1,Color2,Color3,Tol,BoxSize:Integer):Boolean;
var
I, A ,D ,E:Integer;
ColorPosx : Array [1..3] Of Integer;
ColorPosy : Array [1..3] Of Integer;
begin
Result := False;
If (FindColorTolerance(x,y,Color1,MIX1, MIY1, MIX2, MIY2, Tol)) Or
(FindColorTolerance(x,y,Color2,MIX1, MIY1, MIX2, MIY2, Tol)) Or
(FindColorTolerance(x,y,Color3,MIX1, MIY1, MIX2, MIY2, Tol)) Then
begin
D := 10;
E := D;
Repeat
For I := 1 To 3 Do
begin
ColorPosx[i] := MICX;
ColorPosy[i] := MICY;
end;
If (A = 1) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := MICX;
ColorPosy[i] := ColorPosy[i] + D;
end;
end;
If (A = 2) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + (D div 2);
ColorPosy[i] := ColorPosy[i] + D;
end;
end;
If (A = 3) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := ColorPosy[i] + D;
end;
end;
If (A = 4) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := ColorPosy[i] + (D div 2);
end;
end;
If (A = 5) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := ColorPosy[i] + (D div 4);
end;
end;
If (A = 6) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := MICY;
end;
end;
If (A = 7) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := ColorPosy[i] - (D div 4);
end;
end;
If (A = 8) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := ColorPosy[i] - (D div 2);
end;
end;
If (A = 9) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + D;
ColorPosy[i] := ColorPosy[i] - D;
end;
end;
If (A = 10) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] + (D div 2);
ColorPosy[i] := ColorPosy[i] - D;
end;
end;
If (A = 11) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := MICX;
ColorPosy[i] := ColorPosy[i] - D;
end;
end;
If (A = 12) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - (D div 2);
ColorPosy[i] := ColorPosy[i] - D;
end;
end;
If (A = 13) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := ColorPosy[i] - D;
end;
end;
If (A = 14) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := ColorPosy[i] - (D div 2);
end;
end;
If (A = 15) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := ColorPosy[i] - (D div 4);
end;
end;
If (A = 16) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := MICY;
end;
end;
If (A = 17) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := ColorPosy[i] + (D div 4);
end;
end;
If (A = 18) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := ColorPosy[i] + (D div 2);
end;
end;
If (A = 19) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - D;
ColorPosy[i] := ColorPosy[i] + D;
end;
end;
If (A = 20) Then
begin
For I := 1 To 3 Do
begin
ColorPosx[i] := ColorPosx[i] - (D div 2);
ColorPosy[i] := ColorPosy[i] + D;
end;
A := 0;
D := D + E;
end;
FindColorSpiralTolerance(ColorPosx[1],ColorPosy[1],Color1,MIX1, MSY1, MIX2, MIY2, Tol)
FindColorSpiralTolerance(ColorPosx[2],ColorPosy[2],Color2,MIX1, MSY1, MIX2, MIY2, Tol)
FindColorSpiralTolerance(ColorPosx[3],ColorPosy[3],Color3,MIX1, MSY1, MiX2, MIY2, Tol)
If ((ColorPosx[1] - ColorPosx[2] < BoxSize) Or (ColorPosx[1] - ColorPosx[2] > -BoxSize)) And ((ColorPosy[1] - ColorPosy[2] < BoxSize) Or (ColorPosy[1] - ColorPosy[2] > -BoxSize)) Then
begin
If ((ColorPosx[2] - ColorPosx[3] < BoxSize) Or (ColorPosx[2] - ColorPosx[3] > -BoxSize)) And ((ColorPosy[2] - ColorPosy[3] < BoxSize) Or (ColorPosy[2] - ColorPosy[3] > -BoxSize)) Then
begin
If ((ColorPosx[3] - ColorPosx[1] < BoxSize) Or (ColorPosx[3] - ColorPosx[1] > -BoxSize)) And ((ColorPosy[3] - ColorPosy[1] < BoxSize) Or (ColorPosy[3] - ColorPosy[1] > -BoxSize)) Then
begin
MMouse(ColorPosx[1],ColorPosy[1],3,3);
Wait(250);
If (IsUpText(Text)) Then
begin
Result := True;
GetMousePos(rx,ry);
end;
end;
end;
end;
A := A + 1;
B := B + 1;
Until (Result = True) Or (B > ((MICX * 20) / E) )
end;
end;
procedure StoreAllToBank2;
begin
if(Players[CurrentPlayer].Boolean1)then
Deposit(1, 28, 2)
else
Deposit(2, 28, 2);
Trips:=Trips+1
end;
procedure StoreAllToBank;
begin
Repeat
if(FindObjColInBoxInInv(x,y,'Store',OreMaskCol1,OreMaskCol2,OreMaskCol3,7,10))then
begin
Mouse(x,y,2-random(1),2+random(2),false)
ClickOption('Store All',2)
Wait(200)
end;
Until(InvCount<=1)
CloseBank;
end;
procedure TakePickFromBank;
begin
DTM := DTMFromString('78DA632C61646028664001FA0A109A11CA672' +
'C07B2F208A82900B2AAF1AB0100ED1F03AE');
Repeat
if(FindDtm(DTM,x,y,MSX1,MSY1,MSX2,MSY2))then
Mouse(x,y,2,2,true)
PickFound:=true;
until(PickFound)
Wait(500)
CloseBank;
Wait(500)
Repeat
GameTab(4)
if(Players[CurrentPlayer].Boolean2=true)then
FindDtm(DTM,x,y,MIX1,MIY1,MIX2,MIY2)
Mouse(x,y,2,2,true)
PickEquipped:=true;
until(PickEquipped)
FreeDTM(DTM);
end;
procedure ProgressReportMOB;
begin
Writeln('-------------------------------')
Writeln('-East Varrock Autominer/Banker-')
Writeln('-------------------------------')
Writeln('Time running '+ ScriptTime2(2))
Writeln('-------------------------------')
Writeln('Trips made'+inttostr(Trips)+'')
Writeln('-------------------------------')
Writeln('--------By Mage Of Begu--------')
Writeln('-------------------------------')
end;
begin
SetupSRL;
DisguiseScar('Vegas 7.0')
SetupSRLMining;
DeclarePlayers;
If(not(LoggedIn))then
LogInPlayer;
ProgressReportMOB;
Repeat
Repeat
ProgressReportMOB;
SetOreColor;
HighestAngle;
SetChat('Friends',1)
Wait(100)
SetChat('Friends',2)
Wait(100)
SetChat('Friends',3)
Wait(100)
MakeCompass('N');
if(not(FindPickHeadColor))then
OpenBankP;
TakePickFromBank;
WalkToMine;
Repeat
ChangeOreColor;
MineSomeRocks;
AntiBan;
if(FindNewBox)then
SolveBox;
if(findQuiz)then
SolveQuiz;
Until(InvFull)
WalkToVarrock;
OpenBankP;
if(StoreAll=1)then
StoreAllToBank;
if(StoreAll=2)then
StoreAllToBank2;
if(BankScreen)then
CloseBank;
SRLRandomsReport;
Until(Players[CurrentPlayer].Integer1<=Trips)
NextPlayer(true)
ProgressReportMOB;
until(false)
end.——————————————————
<!– END TEMPLATE: formanswers –>