SRL Archive - Outdated / Broken

Lumbrdge Cowkiller/hidepicker INCOMPLETE


badman1

2006-04-27 02:15:05

Ya, as I work my way back into the scripting state of mind I will improve this. As of now it only walks from lumbridge to the cow pen and checks the gate, opens it if closed. This is kinda a motivational thing to me since I know that I posted this I will now actually try to finish it.
Since SRL is still very new to me some of the more SRL friendly scripters may glance at this and give me some tips. Starting a script durning the last 2 weeks of swim team and on STAR testing week is a big no no :(

Ok, I seem to have hit a wall.

1) Wield all wearable items (Complete)
2) Leaves Lumbridge castle and go to cowpen (Complete)
3) Check Gate, Open if closed, Enter the Pen (Complete)
4) Fight Cows, Skipping ones that are already in battle (Complete)
5) Pick up Cowhides and only hides (Complete)
6) Repeat 4-5 Until full (Complete)
7) Locate, open if neccesary, the gate (Stuck….)
8) Walk to Tolls (Incomplete)
9) Deal with tolls (Incomplete)
10 Walk to al kahirid bank (Incomplete)
11) Bank and progress report (Incomplete)
12) Walk to tolls (Incomplete)
13) Deal with tolls (Incomplete)
14) Walk to cowpen (Incomplete)


Misc
15) Suicidal box destroyer (Incomplete)
16) Make sure Prince Ali Quest is done (Incomplete)



But now I have to figure out a way to make it find and check the gate again. Theres my problem.

SubiN

2006-04-27 02:55:56

very nice , i have to sya You cna do much better than me ( the truth is i dont even know how people make then and ive read 10's of scar scripting guides )

phantombmx

2006-04-27 03:04:01

good but i may suggest using the mapwalking procedures, considering you have the road from the toll to the pen.. use like repeat whatevermapwalkproc until find blue flag near pen

you might finish it before i finish mine, but thats cuz i have been extremely busy with living situations :p

WT-Fakawi

2006-04-27 04:10:37

program LumbridgeCowhidePicker;
{.include srl/SRL.scar}
{By Badman1}
{////////////////////////////////
Prince Ali Quest must be completed
Start in Lumbridge where you would appear if you died
Have only a 3 pieces of armour in INVEN
Nothing in inventory but armour
Set ze colors on 11-13
/////////////////////////////////}
Const
[php] try to make the script autopick roadcolor. there is a huge grey roadcolor lumb at lumbridge castel :)[/php]
TheRoadColor=6447978; //The road color
GateColor=875399; //The color of the gate into cowpen on MAINSCREEN
FountainWater=10113868;//The color of the fountain water(Not symbol)
[php] You might consider using FindSymbol('water');[/php]
inlumbridge castle
Var
MiniGate,MiniBridge:integer; {Bitmaps}

Function IsLumbridge:boolean; {Check fountain water if we are in lumbridge}
Var
Gx2,Gy2:integer; {Useless Co-ords}
begin
Result:=False;
If(FindMMColorTol(Gx2,Gy2,FountainWater,0))then[php] use FindSymbol('water')[/php]
Result:=True
else
Result:=False; [php] not neccesary, results are by default always false[/php]
end;

Procedure Equip3Items;
begin
UseItem(1)
WWait(1000)
Useitem(2)
WWait(1000)
UseItem(3)
WWait(1000)
//will be revised to make sure they are wearable items later
[php] Look at my GoblinScheduler, WieldAll function, copy/paste it into your script[/php]
end;

Procedure WalkFromLumby;[php] look again at GoblinScheduler, I solved the walking problem Copy/paste credit :)[/php]
Var
Tx,Ty:integer;
begin
If(FindMMColorTol(Tx,Ty,FountainWater,20))then
Mouseflag(Tx+62,Ty+27,2,2)
If(FindColorRighttol(Tx,Ty,TheRoadColor,665,31,695,70,0))then
Mouseflag(tx,ty,2,2)
If(FindColor(Tx,Ty,TheRoadColor,665,53,700,70))then
Mouseflag(tx,ty,2,2)
If(FindColor(Tx,Ty,TheRoadColor,623,24,660,39))then
Mouseflag(tx,ty,2,2)
If(FindColor(Tx,Ty,TheRoadColor,605,30,645,40))then
Mouseflag(tx,ty,2,2)
WWait(1500)
if(FindBitmapToleranceIn(MiniGate, Tx,Ty,620,16,675,80,20))then
Mouseflag(Tx-5,Ty,2,2)
//Will be revised for a failsafe later
end;

Procedure CheckMSGate(ObjText:string; Color:integer); {From WT-Fakawi's Cow killer}
var GX, GY: Integer;
//was just so beautiful i knew i couldnt make anything better
begin
if FindObj(GX, GY, ObjText, Color, 50) then
begin
if IsUpText('lose') then
exit;
if IsUpText('pen') then
begin
WWait(100);
Mouse(GX, GY, 0, 0, True);
Flag;
WWait(1000);
end;
end
end;

Procedure EnterthePen;
begin
Makecompass('E')
CheckMSGate('Gate',GateColor)
Makecompass('N')
//to be continued…
end;

Procedure BmpstoMem;
begin
MiniGate := BitmapFromString(1, 5, 'E80000E80000E80000E8000' +
'0E80000');
MiniBridge := BitmapFromString(20, 3, 'z78DA3331303233B4301' +
'925694C02001161486D');
end;

Procedure SetUp;
begin
SetupSRL;
BmpstoMem;
LoadUs;
LoginPlayer;
WWait(1500+random(300))
if(IsLumbridge=true)and (InvCount=3) then
Equip3Items;
end;

begin
SetUp;
WalkfromLumby;
EnterthePen;
//to be continued…
[php] Look at my Cowkiller and copy/paste all the code you need [/php]
end.

badman1

2006-04-27 10:25:40

Swoot! Thanks WT-Fakawi! This should make things go considerably faster.

@phantombmx If you check out the first post I started this on the last 2 weeks of Swim Team (they are pushing us harder so we do better in our last meet) AND Star Testing week. I know how ya feel man. It's taken me 3 days to do this dinky part of a script.

@subin I was a scripter before I came here. However I quit RS and Scar for about 4 months and I feel like an idiot again. I used to make runecrafters. In fact I had a pretty freakin successful mind crafter for awhile. Good times, Good times.

Home

2006-04-27 12:19:51

Badman i know how you feel… i haven't scripted public scripts :)( for a long time)

Mostly i make scripts to my brother :)( He doesn't undertand when i try to teach him :P)


~Home


EDIT:Yes Fawki gives exellent ideas to you, use them, i will promise to your scripting goes lot of easier if you check some of SRL Procedures/functions because they are the awsomeness :)

puj

2006-04-27 12:34:37

I bet it will help you a lot, it has also given me a few ideas and hints for a script that i might make.

badman1

2006-05-03 00:27:27

Ok, I seem to have hit a wall.


7) Locate, open if neccesary, the gate (Stuck….)



But now I have to figure out a way to make it find and check the gate again. And remember this is a big pen. Theres my problem.