PDA

View Full Version : mikev's dumpster digger



mikev
09-21-2006, 11:33 PM
Hello,
I made this script for pure amusement. I was just experimenting with all the includes and stuff like that. I came up with a box clicker. It will search a box untill it has a full inventory, then sells boots,gloves and pots to the general store. It has all the antirandoms stuff from SRL. You need to position yourself and the south western corner of the lumby generalstore, and have the boxes/crate on your rs characters left.

EDIT:Fixed DTM's by deleting them....Now uses BMPmasks...perfect everytime.

thanks starblaster 100 for the DTM video tutorial, it inspired me lol

Please ask me questions or give me comments....I need lots of info and feed back, thankyou,
mikev

program dumpsterdigger;
{.include SRL/SRL.scar}
{.include SRL/SRL/Extended/xantiban.scar}
//<><><><><><><><><><><><><><><> INSTRUCTIONS <><><><><><><><><><><><><>//
//1)Start in lumby general store with all your noobs. Have map facing north.
//2)Set box color.
//3)set shopkeeper's shoulder color.
//4)Select RS window
//5)start

//:::::::::::::::::::::::::::::: INFO :::::::::::::::::::::::::::::::://
//This was just an Idea I had for making some chum change for a noob. //
//report bugs on villu-reborn forums please. //
//Has antirandoms and SRL included! //
//SRL template <--credit to SRL. //
//************************ Set These Constants **************************//

const StartPlayer = 0; // Determines who will play first
const color1 = 3754080; //box color
const color2 = 3162200; // another box color
const color3 = 2239544; //yet, another box color
const storekeeper = 3367827; //storekeeper apron color
//************************************************** **********************//
const VersionNumber = '2'; // Compliant with Rev 568+
//************************************************** **********************//

var
boots : integer;
gloves : integer;
pot : integer;

Procedure DeclarePlayers;
begin
HowManyPlayers :=6; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer:=StartPlayer; // CurrentPlayer = Array Index

Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Loc :='Loc1';
Players[0].Skill:='1';
Players[0].Active:=True;

Players[1].Name :='';
Players[1].Pass :='';
Players[1].Nick :='';
Players[1].Loc :='Loc1';
Players[1].Skill:='1';
Players[1].Active:=true;

Players[2].Name :='';
Players[2].Pass :='';
Players[2].Nick :='';
Players[2].Loc :='Loc1';
Players[2].Skill:='1';
Players[2].Active:=true;

Players[3].Name :='';
Players[3].Pass :='';
Players[3].Nick :='';
Players[3].Loc :='Loc1';
Players[3].Skill:='1';
Players[3].Active:=true;

Players[4].Name :='';
Players[4].Pass :='';
Players[4].Nick :='';
Players[4].Loc :='Loc1';
Players[4].Skill:='';
Players[4].Active:=false;

Players[5].Name :='';
Players[5].Pass :='';
Players[5].Nick :='';
Players[5].Loc :='Loc1';
Players[5].Skill:='';
Players[5].Active:=false;

writeln(inttostr(HowManyPlayers)+' Players');

end;

//<><><><><><><> end of SRL template, beginning of my script <><><><><><><><><//

procedure boxclick;
begin
findnormalrandoms;
if( findobjmulti('Sea',color1,color2,color3,10)) then
mouse(x,y,3,3,true)
wait(200+random(100))
end;

procedure loadBMPmasks;
begin boots := BitmapFromString(10, 10, 'z78DA33302016B881810' +
'189C00D09D04717A9AEA55C17317AF1FB88BCB0A55C2FA6DB A865' +
'1A0028037A4D');
gloves := BitmapFromString(7, 7, 'z78DA3330400037303020' +
'02E057892C8B8B8D5F3DF1E6936A027EBDB8D40300CEAD3ED D');
pot := BitmapFromString(15, 15, 'z78DA3330201FB8818101C' +
'D00EDCC1F8A268FBA7CD4E451930783C9986602008EB904EC ');
end;



procedure shopkeepertrade;
begin
if(invfull)then
begin
if(FindObject(x,y,'Talk',storekeeper,8,true)) then
mouse(x,y,2,2,false)
ChooseOption(x,y,'Trade')
wait(2000)
end;
end;

procedure selljunk;
begin
if(invfull) then
begin
FindBitmapMaskTolerance(gloves,x,y,558,208,735,453 ,7,7)
mouse(x,y,1,1,false)
chooseoption(x,y,'10')
begin
FindBitmapMaskTolerance(pot,x,y,558,208,735,453,7, 7)
mouse(x,y,1,1,false)
chooseoption(x,y,'10')
begin
FindBitmapMaskTolerance(boots,x,y,558,208,735,453, 7,7)
mouse(x,y,1,1,false)
chooseoption(x,y,'10')
end;
end;
end;
end;

begin
setupsrl;
declareplayers;
CurrentPlayer := StartPlayer;
LoginPlayer;
repeat
boxclick;
shopkeepertrade;
loadBMPmasks;
selljunk;
until(false)
end.

p.s. I know I used somewhat endless loops, but I don't really know how to not make them...some 1 plz hit me on MSN and teach me and I didn't standardize it cause its far from being done. lol

Sumilion
09-22-2006, 02:48 PM
Cmon, get on msn you :p

mikev
09-24-2006, 08:55 PM
UPDATED--now uses bmpmasks for drop procedure....thanks Sumilion. ;)

I Pick Axes
09-27-2006, 09:34 PM
:(

From today's RS update, in the little random bits at the bottom:


In other news...

Along with the area sounds, interface updates and new tutors, we've been busily improving existing features of the game. This week:

* Adventurers who have defeated the terrible Iban and obtained his staff may use its new right-click option to check how many charges it has.
Don't forget - it takes one charge to cast Iban Blast on a monster but two to cast it on another player.
* Baby dragons have now shrunk slightly to solve the problem where their heads rendered incorrectly when they leant forwards. This doesn't affect their stats.
* Rune and Adamant boots now have a +2 and +1 strength bonus respectively.
* The random junk you occasionally found in chests and crates around the world has now been removed. Members can still get all those items from sources such as the Trawler, the HAM cave and the Digsite.

bobert5696
09-27-2006, 09:40 PM
lol, your script was scaring them, they needed for it not to work anymore, LOL

mikev
09-27-2006, 10:26 PM
whahahaha thats halarious!! The box in the lumby general store was "The box heard 'round the world". Thats pretty fun...but darn...my script won't work anymore...and I got an autominer banned today...sigh..