Alien Technology
2010-11-26 17:55:28
Here is my simple Pickup.simba script ala Reflection and S.M.A.R.T.
The results are:
Does anyone have any suggestions?
program Pickup;
{$define SMART} // This is how we include SMART; it HAS to be included BEFORE SRL!
{$i srl/srl.scar}
{$i reflection\reflection.simba}
procedure Pickup;
var
GIA: TGroundItemArray;
I: Integer;
C: TPoint;
OptionResult: Boolean;
begin
GIA := GetItemsNear(5);
// For I:=0 to High(GIA)do
// Writeln(' Index[' + ToStr(I) + '] I.D.:' + ToStr(GIA[I].ID) + ' Stack:' + ToStr(GIA[I].Stack) + '(' + ToStr(GIA[I].Tile.X) + ', ' + ToStr(GIA[I].Tile.Y) + ')' );
For I:=0 to High(GIA)do
begin
Writeln( 'Found ground item ' + ToStr(GIA[I].ID) + ' at ' + ToStr(GIA[I].Tile) );
C := TileToMS(GIA[I].Tile, 0);
Mouse(C.X, C.Y, 3, 3, False); // Right click.
OptionResult := WaitOption('ake', 200+Random(100));
If OptionResult then
begin
Writeln('Picking up ground item ' + ToStr(GIA[I].ID) + '.');
Wait(1000+Random(500));
end;
end;
end;
procedure DeclarePlayers;
begin
HowManyPlayers := 1; // This is set to the total amount of players (more on multiplayer later ;)), for now, just keep it set as 1
NumberOfPlayers(HowManyPlayers); // This is a procedure in SRL which sets up player arrays (also, more on that later), this will always be the same
CurrentPlayer := 0; // This is the player to start with; the first player will always be 0 (you'll find out when you learn all about arrays)
Players[0].Name := 'Happy'; // Username
Players[0].Pass := 'Thanksgiving'; // Password
Players[0].Nick := 'happ'; // 3-4 lowercase letters from username; used for random event detection
Players[0].Active := True; // Set to true if you want to use Player 0
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
end;
begin
// These 4 lines HAVE to be set BEFORE you call SetupSRL;
// From http://villavu.com/wiki/How_to_make_any_Script_a_S.M.A.R.T_Script
// Quote: "This extra work is completely optional. If you are fine with the default settings you do not have to set these (i.e., the four variables prefixed with "Smart_")."
// commented out Smart_Server := 152;
// commented out Smart_Members := False;
// commented out Smart_Signed := True;
// commented out Smart_SuperDetail := False;
ClearDebug;
SetupSRL;
SetUpReflectionEx(true); // Make your script reflection. Yeah baby!
DeclarePlayers; // Calls the procedure, you can't forget this!
LoginPlayer; // You want your player to login, right?
Wait(1000);
Pickup;
end.
The results are:
Transfer Thread Exited
Shutdown start - clean:true
Current Threads
Other Thread: Thread[Reference Handler,10,system]
Other Thread: Thread[Finalizer,8,system]
Other Thread: Thread[Signal Dispatcher,9,system]
Other Thread: Thread[Attach Listener,5,system]
Other Thread: Thread[Java2D Disposer,10,system]
Other Thread: Thread[main,5,main]
Other Thread: Thread[AWT-Windows,1,main]
Other Thread: Thread[AWT-Shutdown,1,main]
Other Thread: Thread[AWT-EventQueue-1,1,main]
Other Thread: Thread[Java Sound Event Dispatcher,1,main]
Other Thread: Thread[Thread-14,5,main]
Other Thread: Thread[Thread-16,10,main]
Other Thread: Thread[Thread-17,1,main]
Other Thread: Thread[Thread-18,5,main]
Other Thread: Thread[Thread-20,1,main]
Other Thread: Thread[Thread-21,2,main]
Other Thread: Thread[Thread-24,1,]
Other Thread: Thread[Thread-25,1,]
This Thread: Thread[Thread-26,5,main]
Runtime Garbage Collection Invoked
System Garbage Collection Invoked
Allocating image HDC(s)
Image: 0x3c60000 Debug: 0x3de0000
Shutdown complete - clean:true
Registration Response: 4
JVM Garbage Collection Invoked
Java Initilized - SMART Starting
Applet Loader Parsed
Applet Parameters Forwarded
Setting up Frame
Client INIT
Client START
Client WAITING
Client Fully Initialized
Replacing Canvas Drawing Surface
Disabeling Events
Starting Image Transfer
SMART Enabled
Transfer Thread Entered
SMART Disabled
Replacing Canvas Drawing Surface
Disabeling Events
Starting Image Transfer
SMART Enabled
Transfer Thread Entered
formWriteln: 1
formWriteln: 2
formWriteln: 4
formWriteln: Welcome to Runescape.
formWriteln: Nameofcharacter
formWriteln: 5
formWriteln: 1
formWriteln: 2
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
Field not found: e
Field not found: h
formWriteln: Successfully executed.
Does anyone have any suggestions?