akarigar
2014-12-15 05:28:31
3 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
No
What is your general programming knowledge?
C, C++, C#, Java, PHP, Python and more.
Are you a member of any other communities?
No
Tell us about yourself…
From: akarigar
I used to play RSC a long time ago and haven't played much recently. I like to code, so my work and hobby revolves around programming. That about sums me up: I am a software engineer and am here for some fun.
Here is my script: http://puu.sh/dvt8f/96ca63e0cd.png
memb pl0x!
Just kidding.
As some of you know, I have been working on what started out as an engine to make me not have to code a main loop ever again. It has since then evolved into something much bigger. The engine is still there, but this is more of an AIO Runescape on top of the engine. It is kind of similar to HLT. This script is a little complicated. It's made in a way that someone only needs to code how to do a task once. For example, I only have one fishing task, and I can fish almost anywhere in Runescape! All that changes are details relevant to the task at hand. Details such as what colors make up the object, where the object is, how to get to the object and so on. The engine figures out the rest and does it. On top of that, all of the details for the tasks and activities are stored online. I have a very trivial AI back-end that knows about certain activities in the world. This AI is currently smart enough to determine what task to do based on your characters levels and previously acquired items (only items the items itself).
So just to give an example of the potential power of the script. Today the script only knows about how fish & cook in Lumbridge, and cut & burn logs in Edgeville. If it doesn't fail, it will go through and alternate between those three activities. But it would require no client changes to make the script be able to fish lobsters in Catherby, trout in Lumbridge, cut trees near Draynor, burn logs at any bank and so on. I would only need to let my engine back-end know how to get to the task, what the requirements are for the activity, what the object in question looks like (dtms, color details about the trees at Draynow, for example). The script would then be able to do all those tasks! I will be making changes so that this scenario will be possible. Let's say you run your bot and tell it certain things to do that will keep it busy for 5 hours. Then you leave to go out. Later you decide you want your bot to do some other activities than you originally told it. Well, you could then get on your phone and essentially tell the bot exactly what to do next and for how long!
The script I present here is just the beginning, but I hope the potential is obvious.
Make sure the account you intend to run this on has all lodestones unlocked and has access to the Cook-O-Matic (Lumbridge castle range).
Run the following updater. It will add 'AllInOne.simba' in your scripts directory (usually C:\Simba\Scripts\). Run that, & fill out the form.
Thanks to @Incurable, @Justin and @The Mayor for helping me test it to make sure it doesn't immediately break.
Please show us one (or multiple) of your scripts.
{$f-}
const __INSTALL_PATH = [
'Includes\akarigar',
'Includes\SPS\img\akarigar',
'Scripts\AllInOne.simba'
];
procedure __deletePreviousFiles();
var i: integer;
begin
for i := 0 to high(__INSTALL_PATH) do
if fileExists(appPath + __INSTALL_PATH[i]) then
deleteFile(appPath + __INSTALL_PATH[i])
else if directoryExists(appPath + __INSTALL_PATH[i]) then
deleteDirectory(appPath + __INSTALL_PATH[i], true);
end;
procedure updateEngine();
var
data: string;
f: integer;
currentVersion, latestVersion: extended;
begin
currentVersion := strToFloatDef(settings.getKeyValue('AKE_version'), -1);
// strToFloatDef doesn't work all the time here..
try
latestVersion := strToFloat(getPage('http://srl-akarigar.rhcloud.com/static/media/version.txt'));
except
latestVersion := -1;
end;
if latestVersion = -1 then
begin
writeLn('Failed to retrieve update info from server.');
end;
if currentVersion >= latestVersion then
begin
writeLn('No update available.');
exit;
end;
writeLn('Starting update from version ', currentVersion, ' to version ', latestVersion);
__deletePreviousFiles();
writeLn('Downloading update archive.');
data := getPage('http://srl-akarigar.rhcloud.com/static/media/engine.zip');
if data = '' then
begin
writeLn('Failed to retrieve archive from server.');
terminateScript();
end;
if (f := rewriteFile(appPath + '.engine.zip', false)) = -1 then
begin
writeLn('Failed to create update archive.');
terminateScript();
end;
if not writeFileString(f, data) then
begin
writeLn('Failed to create update archive.');
closeFile(f);
terminateScript();
end;
closeFile(f);
writeLn('Extracting archive.');
try
unzipFile(appPath + '.engine.zip', appPath);
except
writeLn('Failed to extract archive.');
terminateScript();
finally
deleteFile(appPath + '.engine.zip');
end;
if fileExists(scriptFile) then deleteFile(scriptFile);
settings.setKeyValue('AKE_version', floatToStr(latestVersion));
writeLn('Updated successfully. Please restart Simba.');
terminateScript();
end;
begin
updateEngine();
end.
