Turpinator
2013-04-08 01:55:15
How Long have You Played Runescape?
9 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
Not that I recall.
What is your general programming knowledge?
Matlab
Visual Basic
Cpp
Pascal Script (simba, duh)
TI BASIC (ti-83/84 calculator stuff)
68k TI Basic ([some] ti-89/92 calculator stuff)
Are you a member of any other communities?
No active memberships in other communities. May have accounts, but don't really ever visit them.
Tell us about yourself…
Please show us one (or multiple) of your scripts.
This is part of a Player Owned Port script I'm helping @xtrapsp (Brad) with. Hopefully some of this stuff may end up as part of a Port Include that might possibly be added to SRL. The calculate crew function was basically a conversion of http://www.tip.it/runescape/pages/view/pop_voyage.htm , but… its not completely finished.
And heres a Fire Orb Charger I had written over the summer then re-updated recently. Works for fireorbs now, but i still want to add water orbs, air and earth, as well as support for lvl 70 agility (fire and water).
And… Well this isnt a script, but a program/utility for Ports…
http://villavu.com/forum/showthread.php?t=94410
Its just a little timer that also allows for text/emails when timers have expired as well as 'remote' timer checking (through text/email also)
Written in VB, source is there. Some of the code is poor and inefficient, but at the time, thats not what i was going for. Iff (not a typo) I start using it again, Ill probably try and update/rewrite it as i have become more familiar with VB again (before this it was a few years since my last VB program).
Some Other stuff:
Helped @YoHoJo with a bot buster script thing, wasnt much, mainly just some string manipulations (he claims i did pretty much everything, but i didnt really)
http://villavu.com/forum/showthread.php?p=1200719#post1200719
http://villavu.com/forum/showthread.php?p=1200680#post1200680
And another time I showed @YoHoJo how to make a sps map. (wouldnt you think he would know how to do this?)
http://villavu.com/forum/showthread.php?p=1187233#post1187233
And Ive made some sps maps for people such as @nivek1989 (Kevin) and @Vinyl Scratch.
This isnt a complete list of everything ive done, its more of just a sample to show that I can be a helpful and contributing memeber of the community while not directly writing a script.
Final Note:
As of now, I wouldnt consider myself a super great scripter, but Im always up to learn and try new things. And this learning… Isnt that the whole point of Villavu?
9 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
Not that I recall.
What is your general programming knowledge?
Matlab
Visual Basic
Cpp
Pascal Script (simba, duh)
TI BASIC (ti-83/84 calculator stuff)
68k TI Basic ([some] ti-89/92 calculator stuff)
Are you a member of any other communities?
No active memberships in other communities. May have accounts, but don't really ever visit them.
Tell us about yourself…
From: Turpinator
I'm a 3rd year Mechanical Engineering student in the USA. Even though I am ME, I enjoy computers and coding very much.
Interests: Drinking. Coding. Challenging Math. PC games (FPS-es mainly). Building/fixing computers. Helping people. Camping. Hunting. Snowmobiling. Snowboarding. Outdoor activities in general.
Why do I code? I code things to make my life easier, whether it is a program/script to do an inverse error function to a full blown program that covers everything in a math/engineering class, I enjoy doing it for 2 reasons; (1) To make my life easier and (2) I always enjoy a challenge.
Please show us one (or multiple) of your scripts.
This is part of a Player Owned Port script I'm helping @xtrapsp (Brad) with. Hopefully some of this stuff may end up as part of a Port Include that might possibly be added to SRL. The calculate crew function was basically a conversion of http://www.tip.it/runescape/pages/view/pop_voyage.htm , but… its not completely finished.
Type
Captain = Record
M: Integer; //morale
C: Integer; //combat
S: Integer; //seafaring
Active: Boolean;
Ship: Integer; // (1-5)
End;
Crewmember = Record
M: Integer; //morale
C: Integer; //combat
S: Integer; //seafaring
Sol: Boolean; //for solidarity
SolBoost: Integer;
Active: Boolean;
CurLoc: TPoint; // location (1-5,1-5)
End;
ShipComponent = Record
M: Integer; //morale
C: Integer; //combat
S: Integer; //seafaring
Bought: Boolean;
End;
Var
Cap: Array of Captain;
Crew: Array of Crewmember;
Ram, Hull, Deck: Array of ShipComponent;
minRam, maxRam: Integer; //bounds for each ship component loop
minHull, maxHull: Integer;
minDeck, maxDeck: Integer;
fScore, rScore, percScore: ShipComponent;
fRam, fHull, fDeck1, fDeck2, fCap, fCrew1, fCrew2, fCrew3, fCrew4, fCrew5: Integer;
Procedure SetRam;
Var i:Integer;
Begin
SetLength(Ram, 13);
For i := 0 to High(Ram) do
Begin
Ram[i].Bought := False;
End;
Ram[0].M := 0;
Ram[0].C := 50;
Ram[0].S := 0;
Ram[1].M := 100;
Ram[1].C := 0;
Ram[1].S := 0;
Ram[2].M := 0;
Ram[2].C := 100;
Ram[2].S := 0;
Ram[3].M := 200;
Ram[3].C := 0;
Ram[3].S := 0;
Ram[4].M := 0;
Ram[4].C := 200;
Ram[4].S := 0;
Ram[5].M := 350;
Ram[5].C := 0;
Ram[5].S := 0;
Ram[6].M := 0;
Ram[6].C := 350;
Ram[6].S := 0;
Ram[7].M := 500;
Ram[7].C := 0;
Ram[7].S := 0;
Ram[8].M := 0;
Ram[8].C := 500;
Ram[8].S := 0;
Ram[9].M := 600;
Ram[9].C := 0;
Ram[9].S := 0;
Ram[10].M := 0;
Ram[10].C := 600;
Ram[10].S := 0;
Ram[11].M := 800;
Ram[11].C := 0;
Ram[11].S := 0;
Ram[12].M := 0;
Ram[12].C := 800;
Ram[12].S := 0;
End;
Procedure SetHull;
Var i:Integer;
Begin
SetLength(Hull, 13);
For i := 0 to High(Hull) do
Begin
Hull[i].Bought := False;
End;
Hull[0].M := 50;
Hull[0].C := 50;
Hull[0].S := 100;
Hull[1].M := 100;
Hull[1].C := 150;
Hull[1].S := 100;
Hull[2].M := 100;
Hull[2].C := 100;
Hull[2].S := 150;
Hull[3].M := 200;
Hull[3].C := 450;
Hull[3].S := 200;
Hull[4].M := 450;
Hull[4].C := 200;
Hull[4].S := 200;
Hull[5].M := 300;
Hull[5].C := 300;
Hull[5].S := 700;
Hull[6].M := 300;
Hull[6].C := 700;
Hull[6].S := 300;
Hull[7].M := 400;
Hull[7].C := 400;
Hull[7].S := 900;
Hull[8].M := 400;
Hull[8].C := 900;
Hull[8].S := 400;
Hull[9].M := 1200;
Hull[9].C := 500;
Hull[9].S := 500;
Hull[10].M := 500;
Hull[10].C := 500;
Hull[10].S := 1200;
Hull[11].M := 500;
Hull[11].C := 1400;
Hull[11].S := 500;
Hull[12].M := 1400;
Hull[12].C := 500;
Hull[12].S := 500;
End;
Procedure SetDeck;
Var i:Integer;
Begin
SetLength(Deck, 20);
For i := 0 to High(Deck) do
Begin
Deck[i].Bought := False;
End;
Deck[0].M := 0;
Deck[1].M := 100;
Deck[2].M := 0;
Deck[3].M := 200;
Deck[4].M := 0;
Deck[5].M := 0;
Deck[6].M := 450;
Deck[7].M := 0;
Deck[8].M := 0;
Deck[9].M := 700;
Deck[10].M := 0;
Deck[11].M := 0;
Deck[12].M := 1000;
Deck[13].M := 0;
Deck[14].M := 0;
Deck[15].M := 1200;
Deck[16].M := 0;
Deck[17].M := 0;
Deck[18].M := 1350;
Deck[19].M := 0;
Deck[0].C := 0;
Deck[1].C := 0;
Deck[2].C := 0;
Deck[3].C := 0;
Deck[4].C := 200;
Deck[5].C := 0;
Deck[6].C := 0;
Deck[7].C := 450;
Deck[8].C := 0;
Deck[9].C := 0;
Deck[10].C := 700;
Deck[11].C := 0;
Deck[12].C := 0;
Deck[13].C := 1000;
Deck[14].C := 0;
Deck[15].C := 0;
Deck[16].C := 1200;
Deck[17].C := 0;
Deck[18].C := 0;
Deck[19].C := 1350;
Deck[0].S := 100;
Deck[1].S := 0;
Deck[2].S := 200;
Deck[3].S := 0;
Deck[4].S := 0;
Deck[5].S := 450;
Deck[6].S := 0;
Deck[7].S := 0;
Deck[8].S := 700;
Deck[9].S := 0;
Deck[10].S := 0;
Deck[11].S := 1000;
Deck[12].S := 0;
Deck[13].S := 0;
Deck[14].S := 1200;
Deck[15].S := 0;
Deck[16].S := 0;
Deck[17].S := 1350;
Deck[18].S := 0;
Deck[19].S := 0;
End;
Procedure SetupCrew;
Var i:Integer;
Begin
SetLength(Cap, 5);
SetLength(Crew, 25);
For i := 0 to High(Cap) do
With Cap[i] do
Begin
M := 0;
C := 0;
S := 0;
Active := False;
Ship := i + 1;
End;
For i := 0 to High(Crew) do
With Crew[i] do
Begin
M := 0;
C := 0;
S := 0;
SolBoost := 0;
Sol := False;
Active := False;
CurLoc := Point(((i mod 5) + 1), (i div 5) + 1);
End;
end;
Procedure FilterRam;
Var
i:Integer;
maxM, maxC: Integer;
Begin
maxC := 0;
maxM := 0;
For i := 1 to 6 do //Finds best bought Combat and best bought Morale Ram
Begin
If Ram[2*i - 1].Bought Then maxM := 2*i - 1;
If Ram[2*i].Bought Then maxC := 2*i;
End;
For i := 0 to 12 do //Deactivates all rams
Begin
Ram[i].Bought := False;
End;
Ram[maxM].Bought := True; //Activates 2 best rams
Ram[maxC].Bought := True;
minRam := Min(maxM,MaxC); //Sets globals for max indexes
maxRam := Max(maxM,maxC);
End;
Procedure FilterHull;
Var i: Integer;
Begin
If Hull[12].Bought Then
Begin
Hull[9].Bought := False;
Hull[4].Bought := False;
Hull[3].Bought := False;
Hull[2].Bought := False;
Hull[1].Bought := False;
Hull[0].Bought := False;
End;
If Hull[11].Bought Then
Begin
Hull[8].Bought := False;
Hull[6].Bought := False;
Hull[4].Bought := False;
Hull[3].Bought := False;
Hull[2].Bought := False;
Hull[1].Bought := False;
End;
If Hull[10].Bought Then
Begin
Hull[7].Bought := False;
Hull[5].Bought := False;
Hull[4].Bought := False;
Hull[3].Bought := False;
Hull[2].Bought := False;
Hull[1].Bought := False;
Hull[0].Bought := False;
End;
If Hull[9].Bought Then
Begin
Hull[4].Bought := False;
Hull[3].Bought := False;
Hull[2].Bought := False;
Hull[1].Bought := False;
Hull[0].Bought := False;
End;
If Hull[8].Bought Then
Begin
Hull[6].Bought := False;
Hull[4].Bought := False;
Hull[3].Bought := False;
Hull[2].Bought := False;
Hull[1].Bought := False;
End;
If Hull[7].Bought Then
Begin
Hull[5].Bought := False;
Hull[4].Bought := False;
Hull[3].Bought := False;
Hull[2].Bought := False;
Hull[1].Bought := False;
Hull[0].Bought := False;
End;
If Hull[6].Bought Then
Begin
Hull[3].Bought := False;
Hull[2].Bought := False;
Hull[1].Bought := False;
Hull[0].Bought := False;
End;
If Hull[5].Bought Then
Begin
Hull[2].Bought := False;
Hull[1].Bought := False;
Hull[0].Bought := False;
End;
If Hull[4].Bought Then
Begin
Hull[2].Bought := False;
Hull[1].Bought := False;
Hull[0].Bought := False;
End;
If Hull[3].Bought Then
Begin
Hull[2].Bought := False;
Hull[1].Bought := False;
Hull[0].Bought := False;
End;
If Hull[2].Bought Then
Hull[1].Bought := False;
If Hull[1].Bought Then
Hull[0].Bought := False;
minHull := 0;
maxHull := 12;
For i := 0 to 12 do
If Hull[i].Bought Then
Begin
If ( i < minHull ) Then
minHull := i;
If ( i > maxHull ) Then
maxHull := i;
End;
End;
Procedure FilterDeck;
Var i: Integer;
Begin
For i := 0 to 2 do
Begin
If Deck[19 - i].Bought Then
Begin
Deck[16 - i].Bought := False;
Deck[13 - i].Bought := False;
Deck[10 - i].Bought := False;
Deck[7 - i].Bought := False;
Deck[4 - i].Bought := False;
End;
If Deck[16 - i].Bought Then
Begin
Deck[13 - i].Bought := False;
Deck[10 - i].Bought := False;
Deck[7 - i].Bought := False;
Deck[4 - i].Bought := False;
End;
If Deck[13 - i].Bought Then
Begin
Deck[10 - i].Bought := False;
Deck[7 - i].Bought := False;
Deck[4 - i].Bought := False;
End;
If Deck[10 - i].Bought Then
Begin
Deck[7 - i].Bought := False;
Deck[4 - i].Bought := False;
End;
If Deck[7 - i].Bought Then
Deck[4 - i].Bought := False;
End;
minDeck := 0;
maxDeck := 19;
For i := 0 to 19 do
If Deck[i].Bought Then
Begin
If ( i < minDeck ) Then
minDeck := i;
If ( i > maxDeck ) Then
maxDeck := i;
End;
End;
Procedure CalculateCrew;
Var
iRam, iHull, iDeck1, iDeck2, iCap, iCrew1, iCrew2, iCrew3, iCrew4, iCrew5: Integer;
cScore: ShipComponent;
oldPerc: Integer;
Begin
oldPerc := 0;
fScore.M := 0;
fScore.C := 0;
fScore.S := 0;
For iRam := minRam to maxRam do
If Ram[iRam].Bought Then
Begin
cScore.M := Ram[iRam].M;
cScore.C := Ram[iRam].C;
cScore.S := Ram[iRam].S;
For iHull := minHull to maxHull do
If Hull[iHull].Bought Then
Begin
cScore.M := cScore.M + Hull[iHull].M;
cScore.C := cScore.C + Hull[iHull].C;
cScore.S := cScore.S + Hull[iHull].S;
For iDeck1 := minDeck to maxDeck do
If Deck[iDeck1].Bought Then
Begin
cScore.M := cScore.M + Deck[iDeck1].M;
cScore.C := cScore.C + Deck[iDeck1].C;
cScore.S := cScore.S + Deck[iDeck1].S;
For iDeck2 := minDeck to maxDeck do
If Deck[iDeck2].Bought Then
Begin
cScore.M := cScore.M + Deck[iDeck2].M;
cScore.C := cScore.C + Deck[iDeck2].C;
cScore.S := cScore.S + Deck[iDeck2].S;
For iCap := 0 to 5 do
If Cap[iCap].Active Then
Begin
cScore.M := cScore.M + Cap[iCap].M;
cScore.C := cScore.C + Cap[iCap].C;
cScore.S := cScore.S + Cap[iCap].S;
For iCrew1 := 0 to 20 do
If Crew[iCrew1].Active Then
Begin
cScore.M := cScore.M + Crew[iCrew1].M;
cScore.C := cScore.C + Crew[iCrew1].C;
cScore.S := cScore.S + Crew[iCrew1].S;
For iCrew2 := iCrew1 to 21 do
If Crew[iCrew2].Active Then
Begin
cScore.M := cScore.M + Crew[iCrew2].M;
cScore.C := cScore.C + Crew[iCrew2].C;
cScore.S := cScore.S + Crew[iCrew2].S;
For iCrew3 := iCrew2 to 22 do
If Crew[iCrew3].Active Then
Begin
cScore.M := cScore.M + Crew[iCrew3].M;
cScore.C := cScore.C + Crew[iCrew3].C;
cScore.S := cScore.S + Crew[iCrew3].S;
For iCrew4 := iCrew3 to 23 do
If Crew[iCrew4].Active Then
Begin
cScore.M := cScore.M + Crew[iCrew4].M;
cScore.C := cScore.C + Crew[iCrew4].C;
cScore.S := cScore.S + Crew[iCrew4].S;
For iCrew5 := iCrew4 to 24 do
If Crew[iCrew5].Active Then
Begin
cScore.M := cScore.M + Crew[iCrew4].M;
cScore.C := cScore.C + Crew[iCrew4].C;
cScore.S := cScore.S + Crew[iCrew4].S;
If rScore.M < 1 Then percScore.M := 100
Else percScore.M := cScore.M * 100 / rScore.M;
If rScore.C < 1 Then percScore.C := 100
Else percScore.C := cScore.C * 100 / rScore.C;
If rScore.S < 1 Then percScore.S := 100
Else percScore.S := cScore.S * 100 / rScore.S;
If oldPerc < Min(Min(percScore.M, percScore.C), percScore.S) Then
Begin
fRam := iRam;
fHull := iHull;
fDeck1 := iDeck1;
fDeck2 := iDeck2;
fCap := iCap;
fCrew1 := iCrew1;
fCrew2 := iCrew2;
fCrew3 := iCrew3;
fCrew4 := iCrew4;
fCrew5 := iCrew5;
End;
End;
End;
End;
End;
End;
End;
End;
End;
End;
End;
End;
Function CrewLocToBox( Loc: TPoint ): TBox; //(this isnt correct)
Begin
Result := IntToBox(0,0,0,0);
If ( InRange(Loc.X, 1, 5) and InRange(Loc.Y, 1, 5) ) Then
Result := IntToBox(95+32*(Loc.X-1), 96+32*(Loc.Y-1), 95+32*Loc.X, 96+32*Loc.Y);
End;
Function CrewLocToPoint( Loc: TPoint ): TPoint;
Begin
Result := Point(0,0);
If ( InRange(Loc.X, 1, 5) and InRange(Loc.Y, 1, 5) ) Then
Result := Point(112+52*(Loc.X-1), 112+55*(Loc.Y-1)-50);
End;
Function CrewLocToIndex( Loc: TPoint ): Integer;
Var i: Integer;
Begin
Result := -1;
If Not( InRange(Loc.X, 1, 5) and InRange(Loc.Y, 1, 5) ) Then Exit;
For i := 0 to 24 do
If Crew[i].CurLoc = Loc Then Break;
Result := i;
End;
Function CapLocToBox( Ship: Integer ): TBox; //neither is this one
Begin
Result := IntToBox(0,0,0,0);
If InRange(Ship, 1, 5) Then
Result := IntToBox(40, 96+32*(Ship-1), 72, 96+32*Ship);
End;
Function CapLocToPoint( Ship: Integer ): TPoint; //havent tested coord correctness
Begin
Result := Point(0,0);
If InRange(Ship, 1, 5) Then
Result := Point(56, 112+55*(Ship-1)-50);
End;
Function GetCrewStats( Loc: TPoint ): Boolean;
Var
i: Integer;
cPoint: TPoint;
mStrGy, mStrGr, mStrR: String;
cStrGy, cStrGr, cStrR: String;
sStrGy, sStrGr, sStrR: String;
Begin
Result := False;
i := CrewLocToIndex( Loc );
cPoint := CrewLocToPoint(Crew[i].CurLoc);
Mouse(cPoint.X, cPoint.Y, 12, 12, mouse_Left);
WaitColor(178, 385, 16777215, 1, 500);
//this part here is crude as waitcolor and waitcolor gone werent working
//will hit 'infinite' loop once it reaches/clicks on a spot where theres no crew member
//Repeat
//Wait(5+Random(6));
// Until SimilarColors(GetColor(178, 385), 16777215, 1)
// Repeat
// Wait(5+Random(6));
// Until Not(SimilarColors(GetColor(178, 385), 16777215, 1))
WaitColorGone(178, 385, 16777215, 1, 3000);
//grey 6316385 green 494621 red 255
mStrGy := GetTextAtEx(142, 359, 0, StatChars, False, False, 0, 3, 6316385, 5, False, tr_AllChars);
mStrGr := GetTextAtEx(142, 359, 0, StatChars, False, False, 0, 3, 494621, 5, False, tr_AllChars);
mStrR := GetTextAtEx(142, 359, 0, StatChars, False, False, 0, 3, 255, 5, False, tr_AllChars);
cStrGy := GetTextAtEx(142, 375, 0, StatChars, False, False, 0, 3, 6316385, 5, False, tr_AllChars);
cStrGr := GetTextAtEx(142, 375, 0, StatChars, False, False, 0, 3, 494621, 5, False, tr_AllChars);
cStrR := GetTextAtEx(142, 375, 0, StatChars, False, False, 0, 3, 255, 5, False, tr_AllChars);
sStrGy := GetTextAtEx(245, 359, 0, StatChars, False, False, 0, 3, 6316385, 5, False, tr_AllChars);
sStrGr := GetTextAtEx(245, 359, 0, StatChars, False, False, 0, 3, 494621, 5, False, tr_AllChars);
sStrR := GetTextAtEx(245, 359, 0, StatChars, False, False, 0, 3, 255, 5, False, tr_AllChars);
With Crew[i] Do
Begin
If Not(mStrGy = '') Then M := StrToIntDef(GetNumbers(mStrGy), -1)
Else If Not(mStrGr = '') Then M := StrToIntDef(GetNumbers(mStrGr), -1)
Else M := StrToIntDef(GetNumbers(mStrGR), -1);
If Not(cStrGy = '') Then Crew[i].C := StrToIntDef(GetNumbers(cStrGy), -1)
Else If Not(cStrGr = '') Then Crew[i].C := StrToIntDef(GetNumbers(cStrGr), -1)
Else Crew[i].C := StrToIntDef(GetNumbers(cStrGR), -1);
If Not(sStrGy = '') Then Crew[i].S := StrToIntDef(GetNumbers(sStrGy), -1)
Else If Not(sStrGr = '') Then Crew[i].S := StrToIntDef(GetNumbers(sStrGr), -1)
Else Crew[i].S := StrToIntDef(GetNumbers(sStrGR), -1);
End;
If (Not(Crew[i].M = -1)) and (Not(Crew[i].C = -1)) and (Not(Crew[i].S = -1)) Then
Result := True;
Crew[i].Active := Result;
End;
Function GetReqScore( Voyage: Integer ): ShipComponent;
Var
mStr, cStr, sStr: String;
Begin
// Add Check to be at voyage Screen (prolly another func)
Result.M := -1;
Result.C := -1;
Result.S := -1;
If InRange(Voyage, 1, 3) Then
Begin
//before mousebox/click check which ship is selected to ensure a click is needed
MouseBox(20, 61+119*(Voyage-1), 240, 61+106*Voyage, mouse_Left);
Wait(RandomRange(30, 60));
mStr := GetTextAtEx(700, 302, 0, StatChars, False, False, 0, 3, 16777215, 5, False, tr_AllChars);
cStr := GetTextAtEx(700, 332, 0, StatChars, False, False, 0, 3, 16777215, 5, False, tr_AllChars);
sStr := GetTextAtEx(700, 362, 0, StatChars, False, False, 0, 3, 16777215, 5, False, tr_AllChars);
With Result do
Begin
M := StrToIntDef(GetNumbers(mStr), -1);
C := StrToIntDef(GetNumbers(cStr), -1);
S := StrToIntDef(GetNumbers(sStr), -1);
End;
End;
End;
Function GetCurScore( Voyage: Integer ): ShipComponent;
Var
mStr, cStr, sStr: String;
Begin
// Add Check to be at voyage Screen (prolly another func)
Result.M := -1;
Result.C := -1;
Result.S := -1;
If InRange(Voyage, 1, 3) Then
Begin
//before mousebox/click check which ship is selected to ensure a click is needed
MouseBox(20, 61+119*(Voyage-1), 240, 61+106*Voyage, mouse_Left);
Wait(RandomRange(30, 60));
mStr := GetTextAtEx(473, 302, 0, StatChars, False, False, 0, 3, 16777215, 6, False, tr_AllChars);
cStr := GetTextAtEx(473, 332, 0, StatChars, False, False, 0, 3, 16777215, 6, False, tr_AllChars);
sStr := GetTextAtEx(473, 362, 0, StatChars, False, False, 0, 3, 16777215, 6, False, tr_AllChars);
With Result do
Begin
M := StrToIntDef(GetNumbers(mStr), -1);
C := StrToIntDef(GetNumbers(cStr), -1);
S := StrToIntDef(GetNumbers(sStr), -1);
End;
End;
End;
Function GetPercScore( Voyage: Integer ): ShipComponent;
Var cScore, rScore: ShipComponent;
Begin
cScore := GetCurScore(Voyage); //Always has good values (unless not found)
rScore := GetReqScore(Voyage); //returns -1s for 'missing'/not req scores
If rScore.M < 1 Then Result.M := 100
Else Result.M := ((cScore.M * 100) / rScore.M);
If rScore.C < 1 Then Result.C := 100
Else Result.C := ((cScore.C * 100) / rScore.C);
If rScore.S < 1 Then Result.S := 100
Else Result.S := ((cScore.S * 100) / rScore.S);
End;
Function GetSuccessRate( Ship: Integer ): Integer;
Var percScore: ShipComponent;
Begin
Result := -1;
percScore := GetPercScore( Ship );
Result := Min( Min( percScore.M, percScore.C ), percScore.S);
End;
Procedure WriteCrewToFile;
Var
i, FID: Integer;
istr, str: String;
Begin
str := '';
For i := 0 to 24 do
Begin
istr := IntToStr(i);
str := str +
'Crew[' + iStr + '].M = ' + IntToStr(Crew[i].M) + ';' + #13#10 +
'Crew[' + iStr + '].C = ' + IntToStr(Crew[i].C) + ';' + #13#10 +
'Crew[' + iStr + '].S = ' + IntToStr(Crew[i].S) + ';' + #13#10 +
'Crew[' + iStr + '].Sol = ' + BoolToStr(Crew[i].Sol) + ';' + #13#10 +
'Crew[' + iStr + '].SolBoost = ' + IntToStr(Crew[i].SolBoost) + ';' + #13#10 +
'Crew[' + iStr + '].Active = ' + BoolToStr(Crew[i].Active) + ';' + #13#10 +
'Crew[' + iStr + '].CurLoc.X = ' + IntToStr(Crew[i].CurLoc.x) + ';' + #13#10 +
'Crew[' + iStr + '].CurLoc.Y = ' + IntToStr(Crew[i].CurLoc.y) + ';' + #13#10 + #13#10;
End;
FID := RewriteFile( ScriptPath + 'Crew.dat', True);
If WriteFileString( FID, str) and ( not (str = '') ) Then
CloseFile(FID);
End;
Function LoadCrewFromFile: Boolean;
Var
FID, i: Integer;
iStr, str: String;
Begin
Result := False;
FID := OpenFile(ScriptPath + 'Crew.dat',true);
If ReadFileString( FID, str, FileSize(FID)) Then
Begin
For i := 0 to 24 do
Begin
iStr := IntToStr(i);
With Crew[i] do
Begin
M := StrToInt( Between('Crew[' + iStr + '].M = ', ';', str));
C := StrToInt( Between('Crew[' + iStr + '].C = ', ';', str));
S := StrToInt( Between('Crew[' + iStr + '].S = ', ';', str));
Sol := StrToBool(Between('Crew[' + iStr + '].Sol = ', ';', str));
SolBoost := StrToInt( Between('Crew[' + iStr + '].SolBoost = ', ';', str));
Active := StrToBool(Between('Crew[' + iStr + '].Active = ', ';', str));
CurLoc := Point(StrToInt(Between('Crew[' + iStr + '].CurLoc.X = ', ';', str)),StrToInt(Between('Crew[' + iStr + '].CurLoc.Y = ', ';', str)));
End;
End;
Result := True;
End;
CloseFile(FID);
End;And heres a Fire Orb Charger I had written over the summer then re-updated recently. Works for fireorbs now, but i still want to add water orbs, air and earth, as well as support for lvl 70 agility (fire and water).
program TurpsOrbCharger;
{$DEFINE SMART8}
{$i SRL\SRL.simba}
{$i SPS\SPS.simba}
{$i SRL/SRL/misc/debug.simba}
Const
SendTextEmails = True; //Set to True if you want to get emails/text
//notifications of bot failures.
TextEmail = ''; //email address send messages
FireOrb = True; // True/False (True = Fire, False = Water)
// WATER ISNT FUNCTIONAL YET.
//AgilityPath = 'Trap'; // Trap or Pipe (walk/dustykey to be added) (no support yet)
AutoMaps = True; // Select if you want to automatically download the SPS map
// (just leave this true, it wont redownload if the map is there)
Debug = False; // set to true if you want to see the little clicking debug windows show up
procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
CurrentPlayer := 0;
NumberOfPlayers(HowManyPlayers);
With Players[0] Do
Begin
Name := '';
Pass := '';
Pin := '';
Active := True;
Member := True;
End;
End;
var
t, x, y, RunCount, HomeTele, ChargeDTM, XPGain : Integer;
ObeliskTIA : TIntegerArray;
FirstRun: Boolean;
HTtoBank, BanktoDungeon, LaddertoJumpTrap, JumpTraptoLadder: TPointArray;
JumpTraptoObelisk, TubetoObelisk, TubetoLadder: TPointArray;
ObeliskTSA : TStringArray;
Procedure SendEmail( address, message : String );
var
x : Integer;
sBuff, SafeMask : String;
Begin
//-----Message/URL Encoding---Written by BenJones on lazarus.freepascal.org-----
SafeMask := '0123456789abcdefghijklmnopqrstuvwxyz*@._-';
sBuff := '';
For x := 1 to Length(message) Do //Iterate over the entire string
Begin //Check if we have a safe char
If (pos(message[x], SafeMask) > 0) Then sBuff := sBuff + message[x]
Else If (message[x] = ' ') Then sBuff := sBuff + '+' //Append space
Else sBuff := sBuff + '%' + IntToHex(Ord(message[x])); //Convert to hex
End;
//----End URL Encode------------------------------------------------------------
If GetPage('http://webhost1.hp.af.cm/path?a=' + address +
'&m=' + sBuff) = '' Then
WriteLn('Attempted to send "' + message + '" to ' + address +
', but we were unable to reach the webhost to send it')
Else
WriteLn('"' + message + '" sent to ' + address)
End;
Procedure DownloadImage(ImageName: String; Location: String); //ggzz/Brandon
var
Image, Path: string;
FP: Integer;
begin
Image:= GetPage(Location);
Path:= IncludePath + 'SPS\img\runescape_other\' + ImageName + '.png';
Path:= Trim(Path);
FP:= CreateFile(Path);
WriteFileString(FP, Image);
CloseFile(FP);
end;
Function GrabMaps: Boolean; //ggzz/Brandon
var
TOrb: String; //Map Locations
Name : String; //Map Names
begin
Name := 'TurpOrbsV2';
TOrb:= 'http://i.imgur.com/a8xW5Rq.png';
If AutoMaps then
Begin
if (Not FileExists(IncludePath + 'SPS\img\runescape_other\TurpOrbsV2.png')) then
DownloadImage(Name, TOrb);
End;
Result:= (FileExists(IncludePath + 'SPS\img\runescape_other\TurpOrbsV2.png'));
End;
Procedure RequirementsCheck; //ggzz/Brandon
begin
If (Not GrabMaps) then
RaiseException(erCustomError, 'SPS Maps Do Not Exist OR They Are Named Incorrectly!');
end;
Procedure DefineVars;
Begin
RunCount := 0;
HomeTele := DTMFromString('mwQAAAHic42RgYNjKy8CwEYh3QPEmIF4LxLuBeAs'
+ 'U/2FkYPgJxL+AmJEJgn8D2f+A+BsQswD5tx6+Y/j2/ScYr93zEox'
+ '9DMMZbJQcGCKs0hgU+XUZiAGMRGA4AABhThyw');
HTtoBank :=[Point(609,168),Point(612,174),Point(616,181),Point(617,187),Point(618,193),Point(619,201),Point(615,209),Point(612,216),Point(610,225),Point(608,233),Point(608,240),Point(607,245),Point(607,255),Point(604,260),Point(601,267),Point(596,266),Point(592,267),Point(587,267),Point(584,265)];
BanktoDungeon :=[Point(584,267),Point(591,268),Point(600,266),Point(607,265),Point(611,265),Point(618,266),Point(623,269),Point(629,271),Point(638,271),Point(648,272),Point(653,274),Point(658,278),Point(668,278),Point(684,278),Point(689,278),Point(697,279),Point(702,283),Point(704,293),Point(703,295),Point(699,298),Point(691,302),Point(684,307),Point(678,311),Point(672,314),Point(665,316),Point(659,317),Point(649,317),Point(643,319),Point(637,325),Point(632,329),Point(632,339),Point(632,349),Point(630,353),Point(623,353)];
LaddertoJumpTrap :=[Point(342,296),Point(341,290),Point(341,286),Point(338,275),Point(337,267),Point(333,261),Point(334,256),Point(332,246),Point(329,241),Point(327,236),Point(329,235)];
JumpTraptoObelisk :=[Point(311,228),Point(305,230),Point(296,231),Point(289,230),Point(282,226),Point(278,222),Point(272,217),Point(265,210),Point(259,205),Point(252,205),Point(243,204),Point(236,204),Point(230,200),Point(222,195),Point(213,199),Point(205,203),Point(197,209),Point(184,214),Point(175,214),Point(164,214),Point(153,212),Point(144,206),Point(143,200),Point(137,192),Point(133,186),Point(124,180),Point(115,177),Point(106,174),Point(97,171),Point(91,170),Point(84,167)];
//JumpTraptoLadder :=[Point(312,229),Point(303,231),Point(293,230),Point(286,229),Point(282,224),Point(278,220),Point(274,216),Point(267,211),Point(261,206),Point(254,202),Point(246,203),Point(240,204),Point(233,204),Point(228,198),Point(217,194),Point(212,198),Point(205,202),Point(197,209),Point(182,214),Point(171,215),Point(160,214),Point(150,214),Point(144,210),Point(142,201),Point(144,191),Point(149,186),Point(157,186),Point(164,185),Point(171,183)];
//TubetoObelisk :=[Point(373,291),Point(381,293),Point(380,301),Point(379,307),Point(372,313),Point(369,319),Point(365,331),Point(366,336),Point(370,345),Point(371,354),Point(373,361),Point(376,372),Point(373,381),Point(370,385),Point(362,389),Point(353,396),Point(348,400),Point(341,405),Point(328,404),Point(323,401),Point(312,393),Point(310,382),Point(306,352),Point(299,322),Point(289,309),Point(285,298),Point(281,290),Point(273,283),Point(263,283),Point(253,279),Point(238,272),Point(230,267),Point(220,261),Point(211,252),Point(205,245),Point(198,236),Point(191,228),Point(180,221),Point(169,218),Point(158,213),Point(150,211),Point(143,204),Point(138,192),Point(125,181),Point(115,178),Point(107,176),Point(95,170),Point(90,168),Point(83,165)];
//TubetoLadder :=[Point(373,293),Point(381,293),Point(381,304),Point(374,311),Point(369,317),Point(367,325),Point(368,335),Point(371,341),Point(373,347),Point(373,353),Point(375,362),Point(375,369),Point(374,379),Point(369,388),Point(363,389),Point(356,395),Point(347,400),Point(343,402),Point(330,407),Point(323,399),Point(314,395),Point(310,386),Point(309,381),Point(305,348),Point(298,321),Point(291,309),Point(285,296),Point(281,288),Point(270,284),Point(261,284),Point(251,281),Point(245,275),Point(237,270),Point(236,269),Point(229,266),Point(215,260),Point(212,253),Point(205,246),Point(201,235),Point(193,230),Point(186,225),Point(178,219),Point(170,218),Point(157,214),Point(150,212),Point(146,205),Point(145,198),Point(147,191),Point(152,188),Point(159,186),Point(166,185),Point(173,183)];
// This stuff is here for when i get around to adding lvl 70 agility support.
Case FireOrb of
True:
Begin
ChargeDTM := DTMFromString('mwQAAAHic42RgYLABYlcgdgBiUyC2BWInIHYGYgsoz'
+ 'mSE4EIgzgDiRCBOAuJcIM4H4mQg/vaenSGRnZnBl5OZYacAI8NRfQ6'
+ 'GPk4msBgI343mYCAGMBKB4QAAVb8NFg==');
XPGain := 73;
End;
False:
Begin
ChargeDTM := DTMFromString('mwQAAAHic42RgYLAFYjsgdgFiGyA2AWJLIHYGYgcgt'
+ 'gDiLEYGhhQgzgbiQiBOB+JkIE4D4nwgzgFii3tvGFhO/WBgUg9jYJZ'
+ '3YhAK6mDgmPSUgcmsEyzGFnOOgRjASASGAwBEaw96');
XPGain := 66;
ObeliskTIA := [6382956, 6711913, 10263973];
ObeliskTSA := ['belisk'];
End;
End;
End;
procedure AntiBan;
var
w, h, rx, ry: Integer;
begin
FindNormalRandoms;
if (TimeFromMark(t) >= (30 * 60000)) and (TimeFromMark(t) < (90 * 60000)) then
case Random(3500) of
1..10: RandomRclick;
11..15: BoredHuman;
16..20: SleepAndMoveMouse(10000);
21..25: PickUpMouse;
25..27:
begin
writeln('Antiban mini break...');
GetClientDimensions(w, h);
rx := RandomRange(0, w);
ry := RandomRange(0, h);
case (Random(4)) Of
0..1: MMouse(w, -10, rx, 0);
2: MMouse(w, h+10, rx, 0);
3: MMouse(-10, h, 0, ry);
4: MMouse(w+10, h, 0, ry);
end;
Wait(RandomRange(15000, 35000));
end;
end;
if (TimeFromMark(t) >= (90 * 60000)) then
case Random(3000) of
1..20: RandomRclick;
21..30: BoredHuman;
31..40: SleepAndMoveMouse(15000);
41..50: PickUpMouse;
51..55:
begin
writeln('Antiban mini break...');
GetClientDimensions(w, h);
rx := RandomRange(0, w);
ry := RandomRange(0, h);
case (Random(4)) Of
0..1: MMouse(w, -10, rx, 0);
2: MMouse(w, h+10, rx, 0);
3: MMouse(-10, h, 0, ry);
4: MMouse(w+10, h, 0, ry);
end;
Wait(RandomRange(25000, 40000));
end;
end else
Exit;
FindNormalRandoms;
end;
function CloseBankZZ: Boolean; //rip of closebank from srl, mousebox though
var // because existing func wasnt working.
i, Timer: Integer;
begin
Result := False;
if BankScreen then
begin
Timer := GetTimeRunning + 8000;
repeat
MouseBox(484,29,495,39,mouse_Left);
for i := 0 to 30 do
begin
if not BankScreen then
begin
Result:= True;
Break;
end;
Wait(100);
end;
Wait(Random(100));
until (GetTimeRunning > Timer) or Result;
end;
end;
Function FindDungeon(var fx, fy: Integer): Boolean;
Var
TPA: TPointArray;
split: T2DPointArray;
tempCTS, i, lensplit: Integer;
Pnt: TPoint;
Begin
tempCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(50.00, 4.00);
If Not(FindColorsTolerance(TPA, 855309, MSX1+10, MSY1+25, MSX2-10, MSY2-75, 5)) Then
Begin
Writeln('Hmm... Couldnt find the color.');
ColorToleranceSpeed(tempCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
End;
SortTPAFrom(TPA, Point(MSCX, MSCY));
split := SplitTPAEx(TPA, 15, 15);
lensplit := High(split);
If Debug Then
DebugTPA(TPA,'');
For i := 0 to lensplit do
Begin
If (Length(split[i]) < 10) then Continue;
Pnt := MiddleTPA(split[i]);
MMouse(Pnt.x, Pnt.y, 5, 5);
Wait(100 + Random(100));
If (IsUpText('teps')) Then
Begin;
Result := True;
Break;
End;
End;
ColorToleranceSpeed(tempCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
GetMousePos(fx, fy);
End;
Function FindGrate(var fx, fy: Integer): Boolean;
Var
TPA: TPointArray;
split: T2DPointArray;
tempCTS, i, lensplit: Integer;
Pnt: TPoint;
Begin
tempCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(1.39, 0.21);
If Not(FindColorsTolerance(TPA, 8355449, MSX1+10, MSY1+10, MSX2-10, MSY2-75, 3)) Then
Begin
Writeln('Hmm... Couldnt find the color.');
ColorToleranceSpeed(tempCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
End;
SortTPAFrom(TPA, Point(MSCX, MSCY));
split := SplitTPAEx(TPA, 10, 10);
lensplit := High(split);
If Debug Then
DebugTPA(TPA,'');
For i := 0 to lensplit do
Begin
If (Length(split[i]) < 10) then Continue;
Pnt := MiddleTPA(split[i]);
MMouse(Pnt.x, Pnt.y, 5, 5);
Wait(100 + Random(100));
If (IsUpText('trange')) Then
Begin;
Result := True;
Break;
End;
End;
ColorToleranceSpeed(tempCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
GetMousePos(fx, fy);
End;
Function FindFireObelisk(var fx, fy, tol: Integer): Boolean;
Var
TPA: TPointArray;
split: T2DPointArray;
tempCTS, i, lensplit: Integer;
Pnt: TPoint;
Begin
tempCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.26, 1.45);
If Not(FindColorsTolerance(TPA, 6191502, MSX1+10, MSY1+10, MSX2-10, MSY2-75, 5+tol)) Then
Begin
Writeln('Hmm... Couldnt find the color.');
ColorToleranceSpeed(tempCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
End;
SortTPAFrom(TPA, Point(MSCX, MSCY));
split := SplitTPAEx(TPA, 15, 15);
lensplit := High(split);
If Debug Then
DebugTPA(TPA,'');
For i := 0 to lensplit do
Begin
If (Length(split[i]) < 10) then Continue;
Pnt := MiddleTPA(split[i]);
MMouse(Pnt.x, Pnt.y, 5, 5);
Wait(100 + Random(100));
If (IsUpText('belisk')) Then
Begin;
Result := True;
Break;
End;
End;
ColorToleranceSpeed(tempCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
GetMousePos(fx, fy);
End;
{
function FindWaterObelisk(var fx, fy: Integer): Boolean;
var
arP, arAP: TPointArray;
arC, arUC: TIntegerArray;
ararP: T2DPointArray;
tmpCTS, i, j, arL, arL2: Integer;
P: TPoint;
Xa, Ya, Za: Extended;
begin
tmpCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.26, 1.45);
if not(FindColorsTolerance(arP, 6191502, MSX1+10, MSY1+10, MSX2-10, MSY2-75, 5)) then
begin
Writeln('Hmm... Couldnt find the color.');
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
Exit;
end;
arC := GetColors(arP);
arUC := arC;
ClearSameIntegers(arUC);
arL := High(arUC);
arL2 := High(arC);
for i := 0 to arL do
begin
ColorToXYZ(arC[i], Xa, Ya, Za);
if (Xa >= 15.61) and (Xa <= 24.65) and (Ya >= 15.94) and (Ya <= 25.30) and (Za >= 11.22) and (Za <= 17.14) then
begin
for j := 0 to arL2 do
begin
if (arUC[i] = arC[j]) then
begin
SetLength(arAP, Length(arAP) + 1);
arAP[High(arAP)] := arP[j];
end;
end;
end;
end;
SortTPAFrom(arAP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arAP, 10, 10);
arL := High(ararP);
for i := 0 to arL do
begin
if (Length(ararP[i]) < 10) then Continue;
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(100 + Random(100));
if (IsUpText('belisk')) then
begin;
Result := True;
Break;
end;
end;
ColorToleranceSpeed(tmpCTS);
SetColorSpeed2Modifiers(0.2, 0.2);
GetMousePos(fx, fy);
end; }
Procedure ReleaseDTMs;
Begin
WriteLn('gotta freeh those dtms!');
FreeDTM(HomeTele);
FreeDTM(ChargeDTM);
End;
Procedure BankTaverley;
var
FailCount:Integer;
Found: Boolean;
Begin
FailCount := 0;
Repeat
GameTab(Tab_Inv);
Repeat
SetAngle(SRL_ANGLE_HIGH);
MakeCompass('N');
OpenBankNPC
Until BankScreen or PinScreen;
If PinScreen then
Begin
Repeat
InPin(Players[0].Pin);
Until BankScreen or not (LoggedIn);
End;
If BankScreen then
Begin
DepositAll;
Wait(RandomRange(200, 300));
Withdraw(1, 0, 81);
Wait(RandomRange(300, 400));
Withdraw(0, 0, 0);
Wait(RandomRange(300, 350));
CloseBankZZ;
Wait(RandomRange(900,1100));
End;
Inc(FailCount);
If FailCount > 3 then
Begin
WriteLn('Failed to find orbs, Thanks for using Turp''s Orb Charger!')
LogOut;
TerminateScript;
End;
Until (FindColorTolerance(x, y, 6185314, 698, 444, 704, 450, 6))
If FindDTM(ChargeDTM, x, y, MSX1, MSY1, MSX2, MSY2) and PointInBox(Point(x,y), ActionBarSlotToBox(1)) Then
Begin
End Else
Begin
Case FireOrb of
True: WriteLn('Setting Slot 1 to Fire'); //Set ChargeFire to Slot1
False: WriteLn('Setting Slot 1 to Water'); //Set ChargeWater to Slot1
End;
End;
End;
Procedure ReturnToBank;
// Xtrapsp and ReadySteadyGo (HT code)
Begin
GameTab(tab_Magic);
If FindDTM(HomeTele, x, y, MIX1, MIY1, MIX2, MIY2) then
Begin
MMouse(x, y, 3, 3);
If FirstRun and WaitUptext('ome', 1000) then
Begin
Repeat
ClickMouse2(True);
If WaitFunc(@LodestoneScreen, 250, 4000) then
LodestoneTeleport('Taverley');
Wait(RandomRange(12000, 15000));
FirstRun := False;
Until Not LodestoneScreen
End Else
Begin
MMouse(x, y, 3, 3);
ClickMouse2(mouse_Right);
ChooseOption('revious');
Wait(RandomRange(12000, 15000));
End;
End;
FirstRun := False;
Wait(RandomRange(1000,4000));
FindNormalRandoms;
SPS_WalkPath(HTtoBank);
While IsMoving do
Wait(RandomRange(30,60));
FindNormalRandoms;
End;
Procedure WalkToObelisk;
var
Found:Boolean;
FailCount: Integer;
Begin
SPS_WalkPath(BanktoDungeon);
//While IsMoving do
Wait(RandomRange(30,60));
Found := False;
Repeat
FindDungeon(x,y)
Case Random(7) of
0..6: Begin
ClickMouse2(false);
Found := ChooseOption('teps');
End;
7 : Begin
ClickMouse2(True);
Found := DidRedClick;
End;
End;
Until Found
SPS_WalkPath(LaddertoJumpTrap);
While IsMoving do
Wait(RandomRange(30,60));
Found := False;
FailCount := 0;
Repeat
Begin
FindGrate(x,y)
Case Random(4) of
0..2: Begin
ClickMouse2(False);
Found := ChooseOption('trange');
FailCount := 0;
End;
3..4: Begin
ClickMouse2(True);
Found := DidRedClick;
FailCount := 0;
End;
End;
If (FailCount mod 2 = 0) and (FailCount <> 0) Then
Begin
SPS_WalkPath(LaddertoJumpTrap);
If FailCount > 6 then
Begin
SendEmail(TextEmail,'Couldnt find trap, aborting script');
TerminateScript;
End;
End;
Inc(FailCount);
End;
Until Found
Wait(550);
While IsMoving do
Wait(RandomRange(35,77));
Wait(RandomRange(75,150));
Case FireOrb of
True: SPS_WalkPath(JumpTrapToObelisk);
False:
Begin
SPS_WalkPath(JumpTraptoLadder);
Found := False;
Repeat
Case Random(2) of
2: RandomMovement;
End;
If FindObjTPAMulti(x, y, [4739155, 4936791], 3, -1, 3, 3, 6, ['adder']) then
Begin
MMouse(x, y, 3, 3);
ClickMouse2(false);
If ChooseOption('adder') then
Found := True;
End;
Until Found
End;
End;
While IsMoving do
Wait(RandomRange(30,60));
//Wait(RandomRange(1300,1900));
End;
Procedure ChargeOrbs;
var
Found : Boolean;
looptol: Integer;
Begin
If ToggleActionBar(True) then
Begin
TypeSendex('1',False);
looptol := 0;
Case FireOrb of
True: Begin
Found := False;
Repeat
FindFireObelisk(x,y,looptol)
Case Random(4) of
0..1: Begin
ClickMouse2(false);
Found := ChooseOption('belisk');
End;
2..4: Begin
ClickMouse2(True);
Found := DidRedClick;
End;
End;
Inc(looptol);
Until Found
End;
False:
Repeat
If FindObjTPAMulti(x, y, ObeliskTIA, 5, -1, 5, 5, 3, ObeliskTSA) then
Begin
MMouse(x, y, 5, 5);
ClickMouse2(False);
If ChooseOption('belisk') then
Found := True;
End;
Until Found
End;
End;
Wait(RandomRange(1800,2500));
If Not FireOrb then
Wait(RandomRange(2500, 3500)); // extra wait for running around the water
Repeat
Wait(RandomRange(15,30));
Until FindColorTolerance(x,y, 9661192, 250, 300, 500, 330, 10);
MouseBox(260, 303, 480, 325, mouse_left);
Found := False;
Repeat
Wait(4000+Random(100));
AntiBan;
GameTab(tab_Inv);
Until Not FindColorTolerance(x, y, 6185314, 698, 444, 704, 450, 10) or Found //waits until slot 28 is NOT white/grey
End;
Procedure Report;
Var
OrbType: String;
Begin
If FireOrb then OrbType := 'Fire'
else OrbType :='Water';
WriteLn('+-----------Turp''s Orb Charger------------');
WriteLn('| Charging ' + OrbType +' Orbs.');
WriteLn('| We have made ' + IntToStr(RunCount) + ' Runs.');
WriteLn('| We have charged ' + IntToStr(RunCount*27) + ' Orbs.');
WriteLn('| We have gained ' + IntToStr(RunCount*27*XPGain) + ' Magic XP.');
WriteLn('| Script has been running ' + TimeRunning + '.');
WriteLn('+---------------End Report----------------');
End;
Begin
RequirementsCheck;
{$IFDEF SMART}
SRL_SixHourFix := True;
Smart_FixSpeed := True;
{$ENDIF}
ClearDebug;
SetupSRL;
SmartSetRefresh(100);
DeclarePlayers;
AddOnTerminate('ReleaseDTMs');
DefineVars;
If (Not LoggedIn) then
LoginPlayer;
If Not FireOrb then
TerminateScript;
FirstRun := True;
SPS_Setup(RUNESCAPE_OTHER,['TurpOrbsV2']);
FindNormalRandoms;
ToggleActionBar(True);
Repeat
AntiBan;
BankTaverley;
WalkToObelisk;
ChargeOrbs;
ReturnToBank;
Inc(RunCount);
Report;
Until Not LoggedIn
End.And… Well this isnt a script, but a program/utility for Ports…
http://villavu.com/forum/showthread.php?t=94410
Its just a little timer that also allows for text/emails when timers have expired as well as 'remote' timer checking (through text/email also)
Written in VB, source is there. Some of the code is poor and inefficient, but at the time, thats not what i was going for. Iff (not a typo) I start using it again, Ill probably try and update/rewrite it as i have become more familiar with VB again (before this it was a few years since my last VB program).
Some Other stuff:
Helped @YoHoJo with a bot buster script thing, wasnt much, mainly just some string manipulations (he claims i did pretty much everything, but i didnt really)
http://villavu.com/forum/showthread.php?p=1200719#post1200719
http://villavu.com/forum/showthread.php?p=1200680#post1200680
And another time I showed @YoHoJo how to make a sps map. (wouldnt you think he would know how to do this?)
http://villavu.com/forum/showthread.php?p=1187233#post1187233
And Ive made some sps maps for people such as @nivek1989 (Kevin) and @Vinyl Scratch.
This isnt a complete list of everything ive done, its more of just a sample to show that I can be a helpful and contributing memeber of the community while not directly writing a script.
Final Note:
As of now, I wouldnt consider myself a super great scripter, but Im always up to learn and try new things. And this learning… Isnt that the whole point of Villavu?