J J
2012-12-04 09:27:22
Hi,
I have now been registered for a year, even though I leeched for the few weeks :bart: I have learned a lot and made a lot new friends. Scripting here did also make me confident that Computer Science/IT was the right college study to choose.
On 8 February I realised my first script for the "Bloody Penguin Game" with the following code
Since then I have been progressing rather fast I'd say.
Three weeks after my first script seen above I made my first RuneScape related script;
Around 6 weeks later my scripting abilities got better and I realised my first script with an on-screen progress report and TPA usage.
Since then I've been learning more and more mainly logical stuff and doing more in less lines. At first I was going for as many lines as possible as it felt like an achievement, but not too long after I realised that less lines would be more of an achievement.
Around one month after I managed to finish the first version of my Great Orb Project which I used to apply as a SRL Member, http://villavu.com/forum/showthread.php?t=82439
I posted the appliance at 11 PM and went too bed shortly after. Before I went to bed someone already voted though and there I was with 0 yes vs 1 no. I paniced for a bit as I thought I overestimated the quality of the script and undervalued the status of SRL Members. However, when I woke up the next time and looked at the voting for the second time I had around 15 yes votes already. Worried for nothing? :redface:
Three weeks after I got accepted as a SRL Member. Since then I've mainly been looking around the forums and trying to post helpful stuff. At this point my final exams where getting closer and closer.. all those years of work could finally be rewarded with graduating. A few weeks later I finished all my exams and had a good feeling and I basicly already knew I would graduate. Well I was right and graduated with mainly 7s and a 8 for Maths.
I guess this is a nice moment for a picture, the day of picking up my graduation paper;

You can also see that I'm pretty tall, not uncommon for Dutch people :stirthepot: Anyways, after I graduated I started to look into Java as I registered myself for IT. The whole first year of programming would mainly consist with Java so I guess it would be nice to learn.
This was around the bot nuke, so I wasn't sure what was going to happen. I started to follow TheNewBoston's java tutorials to get the basic knowledge. After following 30 tutorials I thought I was ready - and I succesfully made my first java RuneScape script for TRiBot. Since then I've made a few scripts there and got the Script Writer status. Also been working on a dungeoneering script but for now I've put it on hold - I might finish it but with the HTML5 transition coming I'm not too sure.. Source is here: https://github.com/J--J/TRiDungeons
Inbetween this college started and I met the other students etc. and I was satisfied with my choice. I've had classes for around 3 months now and passed all exams of the first semester. Finished programming with an average grade of 10. Right now I'm in the second semester and I'm learning the proper Java syntax now and we are learning how to make Android apps(Java aswell).
Anyways, thanks to Villavu I made the choice. Thanks everyone for the great community and I'm looking forward to what the next year brings me. Oh yeah, 1000 posts made me get one more rep power and so did a one year joindate :spot: Feel free to ask me some questions :P
I have now been registered for a year, even though I leeched for the few weeks :bart: I have learned a lot and made a lot new friends. Scripting here did also make me confident that Computer Science/IT was the right college study to choose.
On 8 February I realised my first script for the "Bloody Penguin Game" with the following code
program BloodyPenguin;
procedure HitPenguin;
begin
MoveMouse(633, 374);
ClickMouse(633, 374, 1);
Wait(RandomRange(1240, 1280));
ClickMouse(633, 374, 1);
end;
procedure ClickOnOK;
var
okbox, x, y:Integer;
begin
okbox := BitmapFromString(16, 8, 'meJyNUMERwCAIy0QO4BgO4QJdRCf' +
'x5xRs0GFsTrhK73q2HA8MIQQhA8xQoJEARRrBCDntibxaJB/R6tQN' +
'93ySa37X0a70hXsys4616F7XivEREfBQ2/BJZuHd/vGjg97S5730w' +
'KCIH9n/J3XmIRfMTqGJ');
if (FindBitmapToleranceIn(okbox, X, Y, 0, 300, 720, 460, 15)) then
MoveMouse(x, y);
ClickMouse(x, y, 1);
FreeBitMap(okbox);
wait(2000);
end;
begin
ActivateClient;
HitPenguin;
Repeat
ClickOnOK;
HitPenguin;
until(false);
end.As seen here: http://villavu.com/forum/showthread.php?t=74543&highlight=flashSince then I have been progressing rather fast I'd say.
Three weeks after my first script seen above I made my first RuneScape related script;
program ThievingGuildChests;
{$DEFINE SMART}
{$i srl/srl.simba}
Function OpenChest:Boolean;
Var
X, Y, t: Integer;
begin
MarkTime(t);
repeat
X:=MSCX;
Y:=MSCY;
if FindObjTPA(X, Y, 7376552, 15, 1, 4, 9, 20, ['ract']) then
begin;
Writeln('We found the chest');
GetMousePos(X, Y);
Case Random(4) of
0..2: begin;
Mouse(X, Y, 5, 5, True);
Writeln('We clicked the chest');
end;
3: begin;
Mouse(X, Y, 5, 5, False);
WaitOption('Open', 300);
Writeln('We clicked the chest');
end;
end;
Wait(1500+random(1000));
Writeln('We are waiting to complete the thieving');
end;
begin;
repeat
Wait(200+random(200));
until FindChatBoxText('fail', 8, clBlack) or FindChatBoxText('open', 8, clBlack) or FindChatBoxText('reach', 8, clBlack) or (TimeFromMark(t) >= 10000);
end;
begin;
if FindChatBoxText('fail', 8, clBlack) then
Wait(300+random(200));
end;
begin;
if FindChatBoxText('open', 8, clBlack) then
Wait(2000+random(500));
end;
begin
if FindChatBoxText('reach', 8, clBlack) then
WriteLn('Time to open the doors');
Wait(300+random(200));
end;
until FindChatBoxText('reach', 8, clBlack) or (TimeFromMark(t) >= 15000);
end;
function OpenGate:Boolean;
var
X, Y, a, t, z: Integer;
begin
z:=0
t:=0
a:=0
MarkTime(t);
repeat
X:=MSCX;
Y:=MSCY;
z:=0
if FindObjTPA(X, Y, 1252637, 5, 1, 3, 3, 6, ['pen']) then
begin;
Writeln('We found the chest');
GetMousePos(X, Y);
Case Random(4) of
0..2: begin;
Mouse(X, Y, 2, 2, True);
Writeln('We clicked the gate');
end;
3: begin;
Mouse(X, Y, 2, 2, False);
WaitOption('Open', 300);
Writeln('We clicked the gate');
end;
end;
Writeln('We are waiting to open the gate');
Wait(2000+random(1000));
end;
begin;
repeat
Wait(200+random(200));
until FindChatBoxText('swings', 8, clBlack) or FindChatBoxText('bornly', 8, clBlack) or (TimeFromMark(t) >= 10000);
end;
begin;
if FindChatBoxText('bornly', 8, clBlack) then
WriteLn('We failed to open the gate');
Wait(200+random(200));
end;
begin;
if FindChatBoxText('swings', 8, clBlack) then
a:=a+1
end;
begin;
if (TimeFromMark(z) >= 10000) then
WriteLn('Time exceeded');
end;
until FindChatBoxText('swings', 8, clBlack) or (TimeFromMark(t) >= 20000);
end;
begin
SetUpSRL;
ActivateClient;
repeat
repeat OpenChest;
until(FindChatBoxText('reach', 8, clBlack));
OpenGate;
until(False);
end.Around 6 weeks later my scripting abilities got better and I realised my first script with an on-screen progress report and TPA usage.
program JJsCooker;
{$DEFINE SMART}
{$i srl/srl/misc/smart.simba}
{$i srl/srl.simba}
{$i ObjectDTM/ObjDTMInclude.simba}
var
StartTime, BurnedLogs, CookedFish, FishXp, LogXp: integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
with Players[0] do
begin
{ Fill this in with your details }
Name := '';
Pass := '';
Pin := '';
Active := True;
end;
{
Be sure to fill in the correct values for your logs/fishes!
Common firemaking xp rates
Normal logs: 40
Oak logs: 60
Willow logs: 90
Maple logs: 135
Yew logs: 202,5
Magic logs: 303,5
Common cooking xp rates
Trout: 70
Salmon: 90
Lobster: 120
Swordfish: 140
Monkfish: 160
Shark: 200
Rocktail: 225
}
LogXp := 60; {Replace 60 with your Firemaking xp value}
FishXp := 90; {Replace 90 with your Cooking xp value}
end;
procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 10;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
StartTime:=GetSystemTime;
Wait(1000 + Random(1000));
ClickNorth(0);
end;
procedure OnScreenProggy;
var
TotalFish, FmXp, CookXp, FmXpRate, CookXpRate, Sec, MS: Integer;
RunTime, FmXp2, CookXp2, JJ: String;
begin
{ OnScreenProggy handles the progress report painted on SMART }
Sec := (1+((GetSystemTime-StartTime)/1000));
MS := ((Sec)*1000);
TotalFish := (27*(CookedFish));
FmXp := ((LogXp)*(BurnedLogs));
CookXp := ((FishXp)*(CookedFish)*(27));
FmXpRate := ((3600*(FmXp))/(Sec));
CookXpRate := ((3600*(CookXp))/(Sec));
RunTime := MsToTime(MS, Time_Formal);
CookXp2 := 'Cooked '+IntToStr(TotalFish)+' fishes for '+IntToStr(CookXp)+' cooking xp at '+IntToStr(CookXpRate)+' cooking xp per hour';
FmXp2 := 'Burned '+IntToStr(BurnedLogs)+' logs for '+IntToStr(FmXp)+' firemaking xp at '+IntToStr(FmXpRate)+' firemaking xp per hour';
JJ := 'Running for '+(RunTime)+'';
SMART_ClearCanvas;
SMART_DrawText(5, 286, UpCharsEx, JJ, clYellow);
SMART_DrawText(5, 303, UpCharsEx, CookXp2, clYellow);
SMART_DrawText(5, 320, UpCharsEx, FmXp2, clYellow);
end;
procedure Antiban;
begin
case Random(2300) of
0..1: begin; HoverSkill('cooking', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); end;
2..3: begin; HoverSkill('firemaking', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); end;
4: begin; HoverSkill('random', False); Wait(300 + Random(500)); MMouse(256, 161, 250, 160); end;
5..7: RandomRClick;
8..10: PickUpMouse;
11..13: RandomMovement;
14..16: BoredHuman;
17: ExamineInv;
18..22: SleepAndMoveMouse(Random(5000));
end;
end;
procedure Bankbooth;
var
arP: TPointArray;
ararP: T2DPointArray;
i, arL, X, Y: Integer;
P: TPoint;
begin
FindNormalRandoms;
{ Detects the bank booth }
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.06, 0.22);
FindColorsSpiralTolerance(X, Y, arP, 2905702, 156, 88, 239, 192, 5);
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 80, 80);
arL := High(ararP);
for i := 0 to arL do
begin
{ Banks via the bank booth }
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(50 + Random(50));
if WaitUpTextMulti(['Bank', 'ank'], 250) then
GetMousePos(X, Y);
case Random(4) of
0..2: begin; Mouse(X, Y, 0, 0, 0); WaitOptionMulti(['Bank', 'ank'], 250); end;
3: Mouse(X, Y, 0, 0, 1);
end;
Wait(1250 + Random(750));
if(PinScreen) then
InPin(Players[0].Pin);
if BankScreen then
begin
{ Deposits everything in the inventory }
Mousebox(352, 297, 385, 320, 1);
Wait(200 + Random(200));
{ Withdraws logs and raw food }
Mousebox(38, 92, 73, 123, 1);
WriteLn('Withdrawed logs');
Wait(200 + Random(200));
Mousebox(82, 92, 117, 123, 0);
if WaitOptionMulti(['All', 'Withdraw-All'], 250) then
WriteLn('Withdrawed raw food');
Wait(200 + Random(200));
Exit;
end else
end;
end;
procedure Banker;
var
arP: TPointArray;
ararP: T2DPointArray;
i, arL, X, Y: Integer;
P: TPoint;
begin
FindNormalRandoms;
{ Detects the banker }
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.07, 0.14);
FindColorsSpiralTolerance(X, Y, arP, 4862264, 129, 111, 188, 176, 15);
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 10, 20);
arL := High(ararP);
for i := 0 to arL do
begin
{ Banks via the banker }
P := MiddleTPA(ararP[i]);
MMouse(P.x, P.y, 5, 5);
Wait(50 + Random(50));
if WaitUpTextMulti(['alk', 'alk-to', 'Talk'], 250) then
GetMousePos(X, Y);
Mouse(X, Y, 0, 0, 0);
if WaitOptionMulti(['ank Ba', 'Bank Banker'], 250) then
Wait(1250 + Random(750));
if(PinScreen) then
InPin(Players[0].Pin);
if BankScreen then
begin
{ Deposits everything in the inventory }
Mousebox(352, 297, 385, 320, 1);
Wait(200 + Random(200));
{ Withdraws logs and raw food }
Mousebox(38, 92, 73, 123, 1);
WriteLn('Withdrawed logs');
Wait(200 + Random(200));
Mousebox(82, 92, 117, 123, 0);
if WaitOptionMulti(['All', 'Withdraw-All'], 250) then
WriteLn('Withdrawed raw food');
Wait(200 + Random(200));
Exit;
end else
begin;
Bankbooth;
end;
end;
end;
procedure Banking;
begin;
Case Random(7) of
0..4: Bankbooth;
5..6: Banker;
end;
end;
procedure MakeFire;
var
X, Y, Logs, q, xCoord, yCoord, xCoord2, yCoord2: Integer;
PBox: TBox;
begin;
{ Walking to a firemaking spot }
WriteLn('Walking to a firemaking spot');
xCoord := RandomRange(66, 90);
yCoord := RandomRange(55, 65);
ObjDTM_Walk(''+(IntToStr(xCoord))+':'+(IntToStr(yCoord))+':5:1:7:61:38:1:7:33:84:3:7:121:54:10:7:115:76:10:7:70:79', 3, 5, 5, True);
Wait(800 + Random(800));
FindNormalRandoms;
if GetCurrentTab = (tab_Inv) then
begin
WriteLn('Current tab is the inventory tab, correct')
end else
begin
FTab(tab_Inv);
WriteLn('Changed tabs to the inventory tab')
end;
if not(InvFull) then
begin
xCoord2 := RandomRange(82, 90);
yCoord2 := RandomRange(100, 106);
ObjDTM_Walk(''+(IntToStr(xCoord2))+':'+(IntToStr(yCoord2))+':5:1:7:31:104:3:7:123:75:1:7:61:58:10:7:117:121:10:7:69:117', 3, 5, 5, True);
Wait(1000 + Random(2000));
Banking;
ObjDTM_Walk(''+(IntToStr(xCoord))+':'+(IntToStr(yCoord))+':5:1:7:61:38:1:7:33:84:3:7:121:54:10:7:115:76:10:7:70:79', 3, 5, 5, True);
Wait(1000 + Random(2000));
end else
{ Failsafe when standing on a fire }
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.09, 0.62);
if FindColorSpiralTolerance(X, Y, 536379, 244, 159, 276, 193, 3) then
{ Standing in a fire, moving }
begin;
MouseBox(211, 99, 318, 161, 1);
Wait(1200 + Random(800));
end;
{ Light a log }
Logs := DTMFromString('mAAEAAHiclcvBCkBAFIXhY9aewjNIyUISK5Pm8SeUhbJB3oC/WFiaW9+pU+fGkmojVciRIX2V6OBg0aLBws+AEbOevuPEhhUTPA70RUJGv11Ba8kE7r93A1hgD7U=');
if FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(X, Y, 2, 2);
Mouse(X, Y, 0, 0, 0);
WaitOptionMulti(['ight', 'Light'], 150);
Wait(600 + Random(300));
if not(FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2)) then
begin
Inc(BurnedLogs);
end else
begin
FindDTM(Logs, X, Y, MIX1, MIY1, MIX2, MIY2)
MMouse(X, Y, 2, 2);
Mouse(X, Y, 0, 0, 0);
WaitOptionMulti(['ight', 'Light'], 150);
end;
end;
FreeDTM(Logs);
{ Check for fire animation }
PBox := IntToBox(282, 145, 320, 195);
FindNormalRandoms;
Marktime(q);
repeat
Wait(100 + Random(100));
Antiban;
Wait(100 + Random(100));
until (Animating(PBox, 100, 200)) or (TimeFromMark(q)>10000);
WriteLn('We have ignited a log')
Wait(150 + Random(250));
end;
procedure StartCooking;
var
X, Y, i, arL: Integer;
arP: TPointArray;
ararP: T2DPointArray;
P: TPoint;
begin;
{ Find fire coordinates }
if GetCurrentTab = (tab_Inv) then
begin
WriteLn('Current tab is the inventory tab, correct')
end else
begin
FTab(tab_Inv);
WriteLn('Changed tabs to the inventory tab')
end;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.09, 0.62);
FindColorsSpiralTolerance(X, Y, arP, 536379, 279, 158, 318, 195, 3);
SortTPAFrom(arP, Point(MSCX, MSCY));
ararP := SplitTPAEx(arP, 20, 20);
arL := High(ararP);
for i := 0 to arL do
begin
P := MiddleTPA(ararP[i]);
case Random(9) of
0..1: MouseBox(605, 213, 640, 244, 1);
2: MouseBox(605, 249, 640, 280, 1);
3..8: MouseBox(563, 249, 598, 280, 1);
end;
MMouse(P.x, P.y, 5, 5);
Exit;
end;
end;
procedure Cooking;
var
X, Y, t, xCoord2, yCoord2: Integer;
begin;
{ Start cooking all the food }
GetMousePos(X, Y);
if WaitUpTextMulti(['ire', 'Fire'], 250) then
begin
Mouse(X, Y, 0, 0, 1);
Wait(600 + Random(600));
MouseBox(222, 397, 302, 466, 1);
WriteLn('We are cooking... doing antiban procedures occasionally')
{ Mark the time to know when the inventory has been cooked }
MarkTime(t);
repeat
Wait(500 + Random(500));
Antiban;
FindNormalRandoms;
Wait(500 + Random(500));
until TimeFromMark(t) >= RandomRange(63500, 67000);
{ If the inventory has been cooked, walk back to the banker }
Inc(CookedFish);
xCoord2 := RandomRange(83, 89);
yCoord2 := RandomRange(102, 106);
ObjDTM_Walk(''+(IntToStr(xCoord2))+':'+(IntToStr(yCoord2))+':5:1:7:31:104:3:7:123:75:1:7:61:58:10:7:117:121:10:7:69:117', 3, 5, 5, True);
Wait(1500 + Random(1000));
end else
{ Fail safe when someone is standing on the fire }
begin;
Mouse(X, Y, 0, 0, 0);
if WaitOptionMulti(['Use', 'se'], 250) then
Wait(500 + Random(300));
MouseBox(222, 397, 302, 466, 1);
{ Mark the time to know when the inventory has been cooked }
MarkTime(t);
repeat
Wait(500 + Random(500));
Antiban;
FindNormalRandoms;
Wait(500 + Random(500));
until TimeFromMark(t) >= RandomRange(63500, 67000);
{ If the inventory has been cooked, walk back to the banker }
Inc(CookedFish);
xCoord2 := RandomRange(83, 89);
yCoord2 := RandomRange(102, 106);
ObjDTM_Walk(''+(IntToStr(xCoord2))+':'+(IntToStr(yCoord2))+':5:1:7:31:104:3:7:123:75:1:7:61:58:10:7:117:121:10:7:69:117', 2, 5, 5, True);
Wait(1500 + Random(1000));
end;
end;
begin
SetUpLogin;
Wait(1000 + Random(1000));
ObjDTM_Setup;
repeat
OnScreenProggy;
Banking;
MakeFire;
StartCooking;
Cooking;
until not(LoggedIn);
end.As seen here: http://villavu.com/forum/showthread.php?t=76506&highlight=scriptSince then I've been learning more and more mainly logical stuff and doing more in less lines. At first I was going for as many lines as possible as it felt like an achievement, but not too long after I realised that less lines would be more of an achievement.
Around one month after I managed to finish the first version of my Great Orb Project which I used to apply as a SRL Member, http://villavu.com/forum/showthread.php?t=82439
I posted the appliance at 11 PM and went too bed shortly after. Before I went to bed someone already voted though and there I was with 0 yes vs 1 no. I paniced for a bit as I thought I overestimated the quality of the script and undervalued the status of SRL Members. However, when I woke up the next time and looked at the voting for the second time I had around 15 yes votes already. Worried for nothing? :redface:
Three weeks after I got accepted as a SRL Member. Since then I've mainly been looking around the forums and trying to post helpful stuff. At this point my final exams where getting closer and closer.. all those years of work could finally be rewarded with graduating. A few weeks later I finished all my exams and had a good feeling and I basicly already knew I would graduate. Well I was right and graduated with mainly 7s and a 8 for Maths.
I guess this is a nice moment for a picture, the day of picking up my graduation paper;

You can also see that I'm pretty tall, not uncommon for Dutch people :stirthepot: Anyways, after I graduated I started to look into Java as I registered myself for IT. The whole first year of programming would mainly consist with Java so I guess it would be nice to learn.
This was around the bot nuke, so I wasn't sure what was going to happen. I started to follow TheNewBoston's java tutorials to get the basic knowledge. After following 30 tutorials I thought I was ready - and I succesfully made my first java RuneScape script for TRiBot. Since then I've made a few scripts there and got the Script Writer status. Also been working on a dungeoneering script but for now I've put it on hold - I might finish it but with the HTML5 transition coming I'm not too sure.. Source is here: https://github.com/J--J/TRiDungeons
Inbetween this college started and I met the other students etc. and I was satisfied with my choice. I've had classes for around 3 months now and passed all exams of the first semester. Finished programming with an average grade of 10. Right now I'm in the second semester and I'm learning the proper Java syntax now and we are learning how to make Android apps(Java aswell).
Anyways, thanks to Villavu I made the choice. Thanks everyone for the great community and I'm looking forward to what the next year brings me. Oh yeah, 1000 posts made me get one more rep power and so did a one year joindate :spot: Feel free to ask me some questions :P