{================================================= ===========|
| Timothegreat's Item Buyer 0.1 |
|================================================= ===========|
| Setup your players and hit Run! |
|================================================= ===========|
| Modified by Timothegreat, npc clicker made by: JAD |
| |
| READ THIS: START IN THE GENERAL STORE YOU WISH TO BUY FROM | |
|================================================= ===========}
program itembuyer;
{.Include SRL\SRL.SCAR}
{.include SRL\SRL\Skill\Fighting.scar}
//----------------------------------------------------------------------------//
// --> SCRIPT SETUP <-- //
//----------------------------------------------------------------------------//
const DoorFailSafes = True; // Use FailSafes for the Doors/Gates?
MouseSpd = 13; // MouseSpeed
//----------------------------------------------------------------------------//
// --> VARIABLES <-- //
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
// --> PLAYER SETUP <-- //
// //
// NO MORE THEN 4 PLAYERS!!!!!!!!! //
//----------------------------------------------------------------------------//
procedure DeclarePlayers;
var x:integer;
begin
HowManyPlayers:= 4;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='user'; // Name //
Players[0].Pass :='pass'; // Password //
Players[1].Name :='user'; // Name //
Players[1].Pass :='pass'; // Password //
Players[2].Name :='user'; // Name //
Players[2].Pass :='pass'; // Password //
Players[3].Name :='user'; // Name //
Players[3].Pass :='pass'; // Password //
for x:=0 to HowManyPlayers-1 do
begin
Players[x].Active := True;
Players[x].Loc := 'Ready to Run';
end
end;
Procedure Logitin;
begin
DeclarePlayers;
LoginPlayer;
end;
Procedure Findthekeeper(color : integer)
Begin
For i:=0 To 10 Do
Begin
Case Random(1) of //This Case Changes the start point of the spiral
0: Begin //so the mouse wont just spazz on a certain color
X:=X+Random(100)
Y:=Y+Random(100)
End;
1: Begin
X:=X-Random(100)
X:=X-Random(100)
End;
End;
If FindColorSpiral(x,y,COLOR,MSX1,MSY1,MSX2,MSY2) Then//Looks for the
Begin //shopkeeper
MMouse(x,y,4,4) //starting from
If IsUpTextMulti('Talk to','Talk','eeper') Then //a differnt
Begin //center point
Mouse(x,y,0,0,False) //each time.
ChooseOption(x,y'Trade') //Chooses Trade
Break; //Breaks out of loop if found.
End;
End;
End;
{-----------------------------MAIN LOOP-----------------------------}
begin
logitin;
FindTheKeeper(3952229) // change the color to the shop keeper color (now fixed)
end.