m34tcode
2011-12-19 17:23:30
My first problem is when i add multiplayer, Simba does not auto-complete when i type Players[0].
Simba doesn't recognize I'm using the variable Players, but it auto-completes the Players variable as 'Array of TUser'
What I mean by auto-complete is that it appears in the auto-complete popup list.
My other problem is when i use a template, or anyones script, that uses smart, I get this error:
Searching found that the error is caused by not using smart… other peoples scripts should work then though. I'm doing the same thing AFAIK.
my code so far:
Simba doesn't recognize I'm using the variable Players, but it auto-completes the Players variable as 'Array of TUser'
What I mean by auto-complete is that it appears in the auto-complete popup list.
My other problem is when i use a template, or anyones script, that uses smart, I get this error:
[Error] C:\Simba\Includes\SRL/SRL/misc/smart.scar(9:10): Duplicate identifier 'ISKEYDOWN' at line 8
Compiling failed.Searching found that the error is caused by not using smart… other peoples scripts should work then though. I'm doing the same thing AFAIK.
my code so far:
{$i srl/srl.scar}
{$i srl/srl/misc/smart.scar}
{*
are logs in inv?
begin burning
else
do we know if we have logs?
if yes, do we have logs?
bank for logs
else
exit
else
bank for logs
find suitable burn spot
begin burning
***
Burnin strategy loop
***
find next log to burn
if none
break
else
mouseover next log
wait till started moving BUT:
if stopped lighting
light next log
continue from start of loop;
light next log
if last position has excessive stack of logs
pickup those logs
go back to next burn spot
***
*}
{*
What logs to burn?
list logs
What to do with logs that player can burn but decided not to.
Drop, burn, or bank
Bank or woodcut for logs
choice
if bank then woodcut when supply is gone?
True or false
burn method
bow, inventory tinderbox, belt tinderbox
If woodcutting
what axe
bank for backup axes?
*}
const
{-----Breaking Settings-----}
TakeBreaks = True; // Take breaks?
HowOften = 90; // How often to break in minutes
HowOftenRandom = 90; // Added randomness to how often you break
minBreak = 10; // Minimum break length
maxBreak = 60; // maximum break length
{---------------------------}
{---SMART Setup Constants---}
WORLD = 121;// Set a world, if you'd like.
MEMBERS = False;// Is your first character a member?
SIGNED = True; // Set to faLse to allow two accounts on at one time
{---------------------------}
{--------Script Info--------}
Author = 'm34tcode';
Name = 'M34tFM';
Version = '0.1';
Var
BreakOften, BreakLength, BreakTimes: Integer;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Nick := ''; // 3-4 lowercase letters from username
Players[0].Active := True; // Keep this true if you want to use this player
Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
//Add each log type you would like to burn.
// Valid choices are: plain
Players[0].Strings := ['plain','oak','willow'];
end;
procedure AntiBan;
begin
case Random(20) of
0: HoverSkill('Random', False);
1: begin
RandomMovement;
HoverSkill('Random', False);
end;
2,3: BoredHuman;
4: begin
RandomAngle(1);
HoverSkill('Random', False);
ExamineInv;
end;
end;
end;
procedure AntiRandoms;
begin
FindNormalRandoms;
end;
procedure BreakCheck;
begin
if not LoggedIn then
begin
Players[CurrentPlayer].Active := False;
Exit;
end;
BreakOften := ((HowOften*60000)-(HowOftenRandom*60000)+Random(HowOftenRandom*120000));
if GetTimeRunning >= BreakOften*BreakTimes then
begin
BreakLength := minBreak*60000+Random((maxBreak-minBreak)*60000);
Logout;
Wait(BreakLength);
LoginPlayer;
end;
end;
procedure ProgressReport;
begin
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
WriteLn(Name + 'by' + Author + 'V' + Version);
WriteLn('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~');
end;
begin
Smart_Server := WORLD;
Smart_Members := MEMBERS;
Smart_Signed := SIGNED;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
repeat
BreakCheck;
until AllPlayersInactive;
end.