SRL Archive - Test corner

HG Complex Runite Miner


Narcle

2007-11-05 00:09:59

Heres the low-down on why I call it "complex." For those that have never mined Runite at the Heros Guild its basically goes like this. You keep switching worlds looking for Runite to mine, then once you find a world with it you mine it then get the world number and time and mark it down. (at least i do) Then I find out the population of the world it was on and do a brief calculation in my head for the next respawn. example: 1500 people = ~18 mins, so then I put the time the next spawn should pop up. Then when that time rolls around I go back to the world and bam 2 more Runite.

Well I wanted to do this in a script so this is what I've come up with.
So far what I've done works well but I wanted to get some opinions and suggestions to help on some key areas.

Overall its the randoms that is getting me, and I have all of these antirandoms in, but not working well as far as I've seen.
Need help on:
1. Gas Finding
2. Pick finding
3. Infight runaway
4. better randoms check in general if possible
-Perhaps a better mining procedure.

Also I get a error on this line once in awhile:
" SpawnTime[CurrentWorldIs] := GetSystemTime+GetRuniteRespawnTime(CurrentWorldIs)*1000;"
in LogoutSeq and I'm not sure why yet. /sigh

Anything that would help would be really appreciated!


I left all the notes I had in it: -please keep this script in members only, as that is where I will have it later-
//|
//| Script Name: Hero Guild Runite Miner [complex]
//| Category: Mining
//| Author: Narcle
//| Version: Starting Phase
//| SRL Version: 4.0 rev 6
//| Info: Mines Runite in Hero Guild, with smart world switching
//| Extras: The smart world switcher first starts out going to random member worlds
//| then as it gradually confirms runite on worlds, it marks the time, gets a
//| population count then calculates the next spawn time. When the count down
//| for the world pops up next in line, it will go to that world and wait for
//| runite respawn for 45 seconds.
//|_______________________________________________________________________________________________________________||
//|-------------------------------Instructions, Credits & Help info-----------------------------------------------||
//| Instructions:
//|
//| Credits:
//|
//| Help / Tests Needed:
//|
//|_______________________________________________________________________________________________________________||
{.include srl/srl.scar}
{.include SRL/SRL/misc/WorldSwitcher.scar}
{.include srl/srl/skill/mining.scar}
//
//CurrentWorld -Returns current world (while logged in)
//
//100% Done: Need a Population grabber
//80% Done: [complex] After time has be establish, be able to recognize this and log into
// the next world due for ore(else randomworld if timedue < 1min to next),
// WHILE ignoring and flagging those that pop up during that time to be inactive.
//75% Done: Random worlds perhaps? OR system, random would be better, if so after enough are
// established to stop picking random worlds and just mine current ones
//0% Done: Advance findgas, Has to work really well *sigh*
//
Var
SpawnTime: array[1..144] of integer;
RuniteMined,TRuniteMined,Minedit,CharStartTime:integer;
Const
//SRL - Stats
MySRLID = '';
MySRLPassword = '';

//Script Options:


//version info:
Version = '0.10';
ScriptName = 'HG Complex Runite Miner';

procedure DueOrRandom; forward;
function GetRuniteRespawnTime(World:integer):integer; forward;

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
//----------------------------------------Player setup-------------------------------------------------------//

Players[0].Name :=''; //Character Name
Players[0].Pass :=''; //Character Pass
Players[0].Nick :=''; //Nickname 3 - 4 Letter's of char name
Players[0].Active:=True; //True if you want this player to be ran in the script, false if not

//----------------------------------------Player setup end---------------------------------------------------//
ScriptID := '438';//Don't change this!
SRLid:= MySRLId;
SRLpassword:= MySRLPassword;
Writeln(' _ _ _ ');
Writeln('| \ | | made by | | ');
Writeln('| \| | __ _ _ __ ___| | ___ ');
Writeln('| . ` |/ _` | __/ __| |/ _ \ v'+Version);
Writeln('| |\ | (_| | | | (__| | __/');
Writeln('|_| \_|\__,_|_| \___|_|\___|');
writeln('Start Time: '+TheTime)
if (MySRLID = '') then writeln('Please register at SRL-stats in the future. -Regards Narcle');
end;


Function RandomsCheck(Time: Integer): Boolean;
var
t: Integer;
begin
if time = 0 then
begin
if FindFight then
begin
Result := True;
RunTo('N', True);
Wait(15000 + random(5000));
Runback;
end;
FindPick;
FindNormalRandoms
exit;
end;
begin
for T := 1 to Time do
begin
Wait(200 + Random(50));
FindPick;
if FindTalk then
begin
Result := True;
FindNormalRandoms;
end;
end;
end;
end;


Procedure LookGas;
var x,y:integer;
begin
If FindGas(x, y) Then
begin;
RunTo('N', True);
Wait(10000 + Random(2000));
RunBack;
end;
end;

procedure PReport;
var
H,M,S:integer;
begin
TRuniteMined := TRuniteMined+RuniteMined
ConvertTime(gettimerunning, H, M, S);
Writeln('< Ran: ' + inttostr(H) + 'h:' + inttostr(M) + 'm:' + inttostr(S)+'s >--'+ScriptName+' v'+Version+'--< '+TheTime+' >');
writeln('Runite Mined: '+inttostr(TRuniteMined));
if (not(MySRLID = '')) then
begin//stat updates
ReportVars[0] := RuniteMined;
SendSRLReport;
end;
RuniteMined := 0;
CharStartTime := Getsystemtime;
end;


function MineRunite: Boolean;
var i,x,y, t:integer;
var RuniteColor: array [0..2] of integer;
begin
RuniteColor[0] := 10393450
RuniteColor[1] := 9012061
RuniteColor[2] := 10525292
for i := 0 to 1 do
for t := 0 to 2 do
begin
RandomsCheck(0);
If not(LoggedIn) then exit;
If (FindColorTolerance(x, y, RuniteColor[t], 5, 5, 500, 320, 15)) Then
begin
MMouse(x, y, 1, 1);
LookGas;
If IsUpText('Mine') then
begin
GetMousePos(x,y);
Mouse(x,y,1,1,True);
RandomsCheck(20);
FindColorTolerance(x, y, RuniteColor[t], 200, 118, 303, 218, 15);//So FindGas works.
MMouse(x,y,3,3);
result := true;
Repeat
LookGas;
RandomsCheck(1);
until (not(FindColorTolerance(x, y, RuniteColor[t], 150, 96, 350, 224, 15)))
Minedit := Minedit+1;
RuniteMined := RuniteMined+1;
end;
end;
end;
end;

function MineRuniteSeq: Boolean;
var StartRuniteTime:integer;
begin
StartRuniteTime := Getsystemtime;
HighestAngle;
MakeCompass('n');//change when i get best angle
repeat
MineRunite;
if Minedit >= 2 then
begin
result := true;
exit;
end;
RandomsCheck(2);
until (getsystemtime >= StartRuniteTime+45000)
if Minedit >=1 then result:= true else result:=false;
end;

//GetRuniteRespawnTime -Grabs population then calculates respawn time for next runite (in seconds)
//This will probably have to be updated alot depending how often Jagex changes their webpage.
function GetRuniteRespawnTime(World:integer):integer; //Works!
var
urlsource,text:string;
population:integer;
begin
urlsource := between('(m==0?"f>Free":"m>Members")+"</td>");','<div class="tandc">This',GetPage('http://www.runescape.com/slj.ws?order=WMLPA'));
if urlsource = '' then
begin
result := 1100;
writeln('Failed to get spawn time, result = 1100');
exit;
end;
population := strtoint(Between('",',',',Between('",',')', Between('e('+inttostr(world)+',', ';', urlsource))));
result := Ceil((population-4800)/-3.333);
end;

Procedure LogoutSeq(t:integer);//for t = 1 then world had runite else no.
var
CurrentWorldIs:integer;
begin
Minedit := 0;
if ((Getsystemtime-CharStartTime)/1000)>300 then PReport;
if t = 1 then
begin
CurrentWorldIs := CurrentWorld;
SpawnTime[CurrentWorldIs] := GetSystemTime+GetRuniteRespawnTime(CurrentWorldIs)*1000;
end;
Logout;
DueOrRandom;
loginplayer;
end;




function NextWorldIs: integer;//working far as i know
var
i:integer;
begin
for i := 1 to 144 do
begin
if (getsystemtime-55000 < SpawnTime[i]) and (SpawnTime[i] < getsystemtime+55000) then result := i else result := 0;
end;
end;


procedure DueOrRandom;//working
var
RN, WorldIs, TryTimes:integer;
begin
wait(500+random(300));
repeat
WorldIs := NextWorldIs;
if WorldIs > 0 then if SelectWorld(WorldIs) then exit;
begin
case random(64) of //2 and 120 re-added
1: RN:= 2; 2: RN:=6; 3: RN:=9; 4: RN:=12; 5: RN:=18; 6: RN:=22; 7: RN:=23; 8: RN:=24;
9: RN:=26; 10: RN:=27; 11: RN:=28; 12: RN:=31; 13: RN:=36; 14: RN:=39; 15: RN:=42; 16: RN:=44;
17: RN:=45; 18: RN:=46; 19: RN:=48; 20: RN:=53; 21: RN:=54; 22: RN:=56; 23: RN:=58; 24: RN:=59;
25: RN:=64; 26: RN:=65; 27: RN:=66; 28: RN:=69; 29: RN:=70; 30: RN:=71; 31: RN:=76; 32: RN:=77;
33: RN:=78; 34: RN:=79; 35: RN:=82; 36: RN:=83; 37: RN:=84; 38: RN:=88; 39: RN:=89; 40: RN:=91;
41: RN:=92; 42: RN:=97; 43: RN:=98; 44: RN:=99; 45: RN:=100; 46: RN:=103; 47: RN:=104; 48: RN:=110;
49: RN:=111; 50: RN:=112; 51: RN:=114; 52: RN:=115; 53: RN:=116; 54: RN:= 120; 55: RN:=121; 56: RN:=124;
57: RN:=129; 58: RN:=130; 59: RN:=131; 60: RN:=132; 61: RN:=137; 62: RN:=138; 63: RN:=143; 64: RN:=144;
end;
if SelectWorld(RN) then exit;
end;
TryTimes:= TryTimes+1;
wait(50);
until(TryTimes >= 10)
Writeln('Failed to get a world 10 times, script terminated.');
terminatescript;
end;


begin
setupsrl;
DeclarePlayers;
Repeat
if (not(loggedin)) then loginplayer;
if MineRuniteSeq then LogoutSeq(1) else LogoutSeq(0);
Until(false)
end.

JuKKa

2007-11-05 00:17:09

looks nice toobad i dont have any 85 members accounts :(

Narcle

2007-11-05 00:23:24

From: JuKKa
looks nice toobad i dont have any 85 members accounts :(

Yea I figured most people here wouldn't have, but just seeing if people can find any flaws in the script and pointing them out would help tons.

HyperSecret

2007-11-05 00:27:43

maybe add in a if invfull then teleport to lumby…dont want to be caught dead with a full inv ya know :D

Narcle

2007-11-05 00:46:36

ah good idea
I had another idea if invfull to make a sound (to alert you) and pause the script -in a way- (can you pause script?) so you can go bank and come back with it and it doesn't lose the timings of the worlds.
Personally, I would baby this and check every 30mins-1hour if I could, don't want to lose 280k+ of money because you were there and didn't check.

HyperSecret

2007-11-05 01:16:30

make a sound i dont know…but you could have it press keys ctrl + alt + A and it will pause scar/the script

Rikje

2007-11-05 01:18:00

i love you idee on counting how long it took to spawn a rock!


:)

i don't have rune miner tough :(

rogeruk

2007-11-05 01:38:04

Looks good.

 PlaySound('C:\Windows\Media\Windows XP Information Bar.wav');

Narcle

2007-11-05 01:38:39

From: HyperSecret
make a sound i dont know…but you could have it press keys ctrl + alt + A and it will pause scar/the script

Ah right :duh:

i love you idee on counting how long it took to spawn a rock!

Thanks rikjess and another thanks for the rock respawn times picture, if those are 100% correct I'll redo my calculation in the script. My current one was from personal experiences and educated guesses.

 PlaySound('C:\Windows\Media\Windows XP Information Bar.wav');

yep, or notify.wav (sounds cool) i've used play sounds in a simply fisher I made before, very simple but works perfect.

Santa_Clause

2007-11-05 03:22:47

Just wondering, how will you make it start again after it pauses? Unless ofcourse you make the script user click on play everytime it finishes a load…?

the scar noob

2007-11-05 05:35:03

From: Santa_Clause
Just wondering, how will you make it start again after it pauses? Unless ofcourse you make the script user click on play everytime it finishes a load…?


you can't, but thee's a way..
let it sleep (or FTWait :p) until a timer or interscarmessage has been "found":)

Great work though, keep it up;)

-Tsn.

Wizzup?

2007-11-05 11:48:23

Type
w_World = Record
Number: Integer;
Timer: Integer;
Mined: Boolean;

End;

Var
Worlds: Array Of w_World;
Procedure w_Swap(Var a, b: w_World);

Var
c: w_World;

Begin
c := a;
a := b;
b := c;
End;

Procedure SetEnd(Var a: Array Of w_World; From: Integer);

Var
I: Integer;
Begin
SetArrayLength(a, GetArrayLength(a) + 1);
w_Swap(a[From], a[GetArrayLength(a) - 1]);
For I := From To GetArrayLength(a) - 2 Do
w_Swap(a[I], a[I + 1]);
SetArrayLength(a, GetArrayLength(a) - 1);
End;

Procedure SwapInsertArray(Var a: Array Of w_World; From, Insert: Integer);

Var
I: Integer;

Begin
SetArrayLength(a, GetArrayLength(a) + 1);
If Insert < From Then
Begin
For I := GetArrayLength(a) - 1 DownTo Insert + 1 Do
w_Swap(a[I - 1], a[I]);
w_Swap(a[Insert], a[From + 1])
For I := From + 1 To GetArrayLength(a) - 2 Do
w_Swap(a[I], a[I + 1]);
End
Else
Begin
For I := GetArrayLength(a) - 1 DownTo Insert + 2 Do
w_Swap(a[I - 1], a[I]);
w_Swap(a[Insert + 1], a[From]);
For I := From + 1 To GetArrayLength(a) - 1 Do
w_Swap(a[I], a[I - 1]);
End;
SetArrayLength(a, GetArrayLength(a) - 1);
End;

That way you can put a timer on each world.

Function SwitchWorld: Boolean;

Var
I, t: Integer;
Begin
If Not WorldSwitchButton Then
If Not WorldScreen Then
Begin
Exit;
WriteLn('No World Screen');
End;
WriteLn('First World ' + IntToStr(Worlds[0].Number) + '.');
t := GetSystemTime;
For I := 0 To GetArrayLength(Worlds) - 1 Do
Begin
If Worlds[I].Mined = True Then
If t - Worlds[I].Timer > 15 * 60000 Then
SwapInsertArray(Worlds, I, 0);
End;
If LoadWorld(Worlds[0].Number) Then
Begin
Result := True;
WriteLn('World ' + IntToStr(Worlds[0].Number) + ' Succeeded.');
Repeat
Wait(10);
If WelcomeToRuneScape Then
Break;
Until GetSystemTime - t > 60000;
If GetSystemTime - t > 60000 Then
Begin
Result := False;
WriteLn('Time from mark higher than 60000');
End;
SetEnd(Worlds, 0);
End
Else
Begin
Result := False;
WriteLn('World ' + IntToStr(Worlds[0].Number) + ' Failed, trying new world.');
SetEnd(Worlds, 0);
WriteLn(IntToStr(Worlds[0].Number));
Exit;
End;
End;

And this:

      If FindRunite(rx, ry) Then
Begin
t := GetSystemTime;
Repeat
MineRune;
If GetSystemTime - t > 180000 Then
Break;
Until Not FindRunite(rx, ry);
Worlds[0].Timer := GetSystemTime;
Worlds[0].Mined := True;
For I := 1 To 10 Do
Begin
PlaySound('eh.wav');
Wait(200);
End;
End
Else
Worlds[0].Mined := False;
LogOut;

the scar noob

2007-11-05 13:19:38

From: Wizzup?
Type
w_World = Record
Number: Integer;
Timer: Integer;
Mined: Boolean;

End;

Var
Worlds: Array Of w_World;
Procedure w_Swap(Var a, b: w_World);

Var
c: w_World;

Begin
c := a;
a := b;
b := c;
End;

Procedure SetEnd(Var a: Array Of w_World; From: Integer);

Var
I: Integer;
Begin
SetArrayLength(a, GetArrayLength(a) + 1);
w_Swap(a[From], a[GetArrayLength(a) - 1]);
For I := From To GetArrayLength(a) - 2 Do
w_Swap(a[I], a[I + 1]);
SetArrayLength(a, GetArrayLength(a) - 1);
End;

Procedure SwapInsertArray(Var a: Array Of w_World; From, Insert: Integer);

Var
I: Integer;

Begin
SetArrayLength(a, GetArrayLength(a) + 1);
If Insert < From Then
Begin
For I := GetArrayLength(a) - 1 DownTo Insert + 1 Do
w_Swap(a[I - 1], a[I]);
w_Swap(a[Insert], a[From + 1])
For I := From + 1 To GetArrayLength(a) - 2 Do
w_Swap(a[I], a[I + 1]);
End
Else
Begin
For I := GetArrayLength(a) - 1 DownTo Insert + 2 Do
w_Swap(a[I - 1], a[I]);
w_Swap(a[Insert + 1], a[From]);
For I := From + 1 To GetArrayLength(a) - 1 Do
w_Swap(a[I], a[I - 1]);
End;
SetArrayLength(a, GetArrayLength(a) - 1);
End;

That way you can put a timer on each world.

Function SwitchWorld: Boolean;

Var
I, t: Integer;
Begin
If Not WorldSwitchButton Then
If Not WorldScreen Then
Begin
Exit;
WriteLn('No World Screen');
End;
WriteLn('First World ' + IntToStr(Worlds[0].Number) + '.');
t := GetSystemTime;
For I := 0 To GetArrayLength(Worlds) - 1 Do
Begin
If Worlds[I].Mined = True Then
If t - Worlds[I].Timer > 15 * 60000 Then
SwapInsertArray(Worlds, I, 0);
End;
If LoadWorld(Worlds[0].Number) Then
Begin
Result := True;
WriteLn('World ' + IntToStr(Worlds[0].Number) + ' Succeeded.');
Repeat
Wait(10);
If WelcomeToRuneScape Then
Break;
Until GetSystemTime - t > 60000;
If GetSystemTime - t > 60000 Then
Begin
Result := False;
WriteLn('Time from mark higher than 60000');
End;
SetEnd(Worlds, 0);
End
Else
Begin
Result := False;
WriteLn('World ' + IntToStr(Worlds[0].Number) + ' Failed, trying new world.');
SetEnd(Worlds, 0);
WriteLn(IntToStr(Worlds[0].Number));
Exit;
End;
End;

And this:

      If FindRunite(rx, ry) Then
Begin
t := GetSystemTime;
Repeat
MineRune;
If GetSystemTime - t > 180000 Then
Break;
Until Not FindRunite(rx, ry);
Worlds[0].Timer := GetSystemTime;
Worlds[0].Mined := True;
For I := 1 To 10 Do
Begin
PlaySound('eh.wav');
Wait(200);
End;
End
Else
Worlds[0].Mined := False;
LogOut;


hehe, there's wizzup? again:rolleyes:

Yea, it looks really good wizzup?, its' just a lil bit confised for me, those records:p

-Tsn.

mat_de_b

2007-11-05 14:06:09

Cant you just use an array of Ints and mark a time in each one and do
for i := 0 to GetArrayLength(Int) -1 do
begin
if(TimeFromMark(Int) > 404000000000000000000000000000000)then
Minet3hRunite;
end;

ShowerThoughts

2007-11-05 14:10:26

im 80 mining ill try to get 85 i think it will take a week.

Wizzup?

2007-11-05 14:17:01

From: the scar noob
hehe, there's wizzup? again:rolleyes:

Yea, it looks really good wizzup?, its' just a lil bit confised for me, those records:p

-Tsn.


It's no showoff, just trying to help increase effiency.
This way you won't load a random world, but keep track of all.. ;)

EDIT:

Procedure LoadWorldArray;

Var
Nums: TIntegerArray;
I: Integer;

Begin
Nums := [54, 53, 143, 138, 24, 26, 27, 28, 31, 36, 39, 42, 44,
45, 46, 48, 56, 58, 59, 64, 65, 66, 144, 69, 70, 71,
76, 77, 78, 79, 82, 83, 84, 88, 89, 91, 92, 97, 98, 99, 100,
103, 104, 110, 111, 112, 114, 115, 116, 120, 121, 124,
129, 130, 131, 132, 137, 18, 22, 23];
SetArrayLength(Worlds, GetArrayLength(Nums));
For I := 0 To GetArrayLength(Nums) - 1 Do
Begin
Worlds[I].Number := Nums[I];
Worlds[I].Mined := False;
Worlds[I].Timer := 0;
End;
End;

the scar noob

2007-11-05 15:50:38

From: Wizzup?
It's no showoff, just trying to help increase effiency.
This way you won't load a random world, but keep track of all.. ;)

EDIT:

Procedure LoadWorldArray;

Var
Nums: TIntegerArray;
I: Integer;

Begin
Nums := [54, 53, 143, 138, 24, 26, 27, 28, 31, 36, 39, 42, 44,
45, 46, 48, 56, 58, 59, 64, 65, 66, 144, 69, 70, 71,
76, 77, 78, 79, 82, 83, 84, 88, 89, 91, 92, 97, 98, 99, 100,
103, 104, 110, 111, 112, 114, 115, 116, 120, 121, 124,
129, 130, 131, 132, 137, 18, 22, 23];
SetArrayLength(Worlds, GetArrayLength(Nums));
For I := 0 To GetArrayLength(Nums) - 1 Do
Begin
Worlds[I].Number := Nums[I];
Worlds[I].Mined := False;
Worlds[I].Timer := 0;
End;
End;


I know Wizzy? my post wasn't ment that way:)
I ment that you've cleared (done) the job..again!:p

-Tsn.

Narcle

2007-11-05 16:58:30

I am so confused on SetEnd and SwapInsertArray. I get like half of it but not the full picture. After you posted LoadWorldArray it made it a little more clear but I'm still lacking in advance arrays, which is what I needed badly for this script.

Thanks for the Functions Wizzup?! I'm going to go read a advance array tut now lol. If you could explain to me SetEnd and SwapInsertArray in detail to me via this forum, pms or even MSN msger(i'm always on) I'd love you more!

This way you won't load a random world, but keep track of all..
Yeah full control over the worlds, thats what I wanted. Also how could I put the world timings in say a file to retrieve later so I don't lose timings on the worlds every time I stop it then restart. I think this would be amazing to incorporate. I just have to get the readfile/writefile correctly in somehow.

I was thinking of like:
line 58 (which would be world 58) time, runite T/F
58, 54863315, true
or something like that, then I just have to read line 58 for world 58's info and set the read function in a array.

Markus

2007-11-06 10:56:26

Well you could use read/writeini.
Syntax: procedure WriteIni(Section, KeyName, NewString, FileName : string);
function ReadIni(Se
ction, KeyName, FileName : string) : string;
Like this

begin
WriteInI('58', 'Timer', '1256456654', 'c:\runite.ini');
WriteInI('58', 'mined', 'false', 'c:\runite.ini');
writeln('Timer at world 58 is '+readini('58', 'Timer', 'c:\runite.ini'));
writeln('Did we mine? '+readini('58', 'mined', 'c:\runite.ini'));
end.

Narcle

2007-11-06 11:22:21

From: Markus
Well you could use read/writeini.
Syntax: procedure WriteIni(Section, KeyName, NewString, FileName : string);
function ReadIni(Se
ction, KeyName, FileName : string) : string;
Like this

begin
WriteInI('58', 'Timer', '1256456654', 'c:\runite.ini');
WriteInI('58', 'mined', 'false', 'c:\runite.ini');
writeln('Timer at world 58 is '+readini('58', 'Timer', 'c:\runite.ini'));
writeln('Did we mine? '+readini('58', 'mined', 'c:\runite.ini'));
end.


lol yea i was just experiment with this last night so far i've got

function GetRuniteRespawnTime(World:integer):integer; //Works!
var
urlsource:string;
population:integer;
begin
urlsource := between('(m==0?"f>Free":"m>Members")+"</td>");','<div class="tandc">This',GetPage('http://www.runescape.com/slj.ws?order=WMLPA'));
if urlsource = '' then
begin
result := getsystemtime+1100000;
writeln('Failed to get spawn time, result = 1100000');
exit;
end;
population := strtoint(Between('",',',',Between('",',')', Between('e('+inttostr(world)+',', ';', urlsource))));
result := getsystemtime+1000*Ceil((population-4800)/-3.333);
end;



procedure WriteTimes(WorldNum:integer);
var
spawntime:integer;
begin
if not FileExists(AppPath+'\NarclesINI.ini') then
begin
WriteINI('NarclesINImain', 'Please dont delete this file ', ' Thank you -Narcle', AppPath+'\NarclesINI.ini');
WriteINI('NarclesINImain', 'TScriptsRan', '1', AppPath+'\NarclesINI.ini');
WriteINI('NarclesINImain', 'FirstTime', 'yes', AppPath+'\NarclesINI.ini');
WriteINI('NarclesINImain', 'RuniteMiner', 'yes', AppPath+'\NarclesINI.ini');
end else
begin
if ReadINI('NarclesINImain', 'FirstTime', AppPath+'\NarclesINI.ini') = 'yes' then
WriteINI('NarclesINImain', 'FirstTime', 'no', AppPath+'\NarclesINI.ini');
WriteINI('NarclesINImain', 'TScriptsRan', inttostr(strtoint(ReadINI('NarclesINImain', 'TScriptsRan', AppPath+'\NarclesINI.ini'))+1), AppPath+'\NarclesINI.ini')
end;
spawntime:=GetRuniteRespawnTime(WorldNum);
WriteINI('RuniteWorldList', inttostr(WorldNum), inttostr(Spawntime), AppPath+'\NarclesINI.ini');
end;

Since if I'm going to write a INI file to someones computer, I think I'll make the best use out of it and have all my scripts read it for information. Maybe even upload how many times my scripts have been ran, idk yet. :D

But I'm still trying to figure out what Wizzup gave me. I think its so I don't go back to a world I've already been to using random world. I'll see if I can figure out a way using WriteINI to stop that from happening, still pondering on it.