Al Kharid Mining Unstrung Symbol Crafter
Hello everyone, I just came back from a very long break of runescape. I decided to come back because a friend told me they brought back Old School Runescape. It is my first public script since my return a few weeks ago. I wanted to help new comers who want to learn programming, so I added a lot of comments in my script. This way, you can learn from it and try to reuse some of my personal methods. If you have any question about how to use some of my method or how I get those values I am using, you can send me a PM and I will help you.
Requirements
- You must have a crafting level of 16 or higher
- You must have a mining level of 20 or higher
- You must have a smithing level of 20 or higher
- You must have a Holy Mould in your Inventory
- You must have a mining pick equipped or in your inventory
- You must have AeroLib Revision 11
- You must download the custom map I made for walking (I will explain)
- You must do the quick fix to WorldSwitcher if you want to use multiple Worlds (I will explain)
- You must make your own DTM for mining pick to use this script(I will explain)
Cycle of the Script
- Start the script next to the 3 Silver ore's in Al Kharid
- It will mine Silver Ore until inventory is full and it will switch world(If you specified it)
- It will Walk to the Furnace in Al Kharid
- It will smelt the ore into bar and the bar into unstrung symbol
- It will walk to to the General Store in Al Kharid and it will sell the symbols
- It will walk back to the mining site and start over again
Features
- Random Detection
- Antiban
- Perfect for Ultimate Ironman
- Fail Safe
- My Custom Mining Detection
- WorldSwitcher for people with a high mining level
- Will Logout if something bad happen :-)
Before running the ScriptCustom Map
At the end of this post, you will find two attached files. The first one will be the script while the other one is my custom map. Once you have downloaded both, you will need to transfer the file named "CrafterMap" in your Simba folder under Aerolib\maps\surface. On my computer, the final path to this folder is this -> C:\Simba\Includes\AeroLib\maps\surface
Inventory
Make sure you have a Mining Pick Equipped or in Your Inventory and a Holy Mould.
Complete Script
Section to complete
Simba Code://Fails attempt for detecting mining pick. This number should be based on the performance of your computer.
//On my personnal computer, I set this value to 8. At work, I use 18.
failsLimit := 18;
// Player info
P_NICKNAME = '';
P_LAMPSKILL = SKILL_SMITHING;
Mining Pick DTM
If you want to use my script, you will need to make 2 DTM. I will show you how to do these DTM that will be used for detecting if you are mining
If you don't know how to make DTM -> https://villavu.com/forum/showthread.php?t=77691
First, you need to make a DTM when the rock is located North. The Position of the mining pick when you make the DTM should be over your head.
Mining Position
DTM
Result of the DTM
Second, you need to make a DTM when the rock is located on the East. The position of the mining pick when you make the DTM should be over your head again
Mining Position
DTM
Result of the DTM
When you are done, add your two DTM at this location in the script
They are located on line 545 and 546
Simba Code://Detect if user is done mining
Procedure CheckIfUserMining();
Var
DTM_MiningPickHori, DTM_MiningPickVerti : Integer;
FailsCounter : Integer = 0;
Begin
DTM_MiningPickHori := //Dtm 1
DTM_MiningPickVerti := //Dtm2
//Detect If user is Mining
While FailsCounter < failsLimit Do
Begin
GeneralAntiban(3000);
Wait(Randomrange(10,20));
//Try to find Mining pick on screen
If (FindDtmOnScreen([DTM_MiningPickHori,DTM_MiningPickVerti],TopLeftScreen,BotRightScreen)) Then
Begin
FailsCounter := 0;
End Else
FailsCounter := FailsCounter + 1;
End;
FreeDTM(DTM_MiningPickHori);
FreeDTM(DTM_MiningPickVerti);
End;
If you want to use Multiple World
Information you must know
- It can support up to 3 worlds
- You need to be in the world you set at world1 when you start the script
- You can use a special function I made for clicking at the position where the worlds should be located
- You need to apply my fix to WS_switchWorlds
- Highly recommend to use worlds that are visible on the list where you decided to click it.
Step 1 - Fixing WS_switchWorlds
1. Under Functionlist, You need open the include list and you need to find WorldSwitcher. Once you find it, open the list and double-click on WS_switchWorlds;
2. Replace function WS_switchWorlds(World: Integer): Boolean; with this
Simba Code:function WS_switchWorlds(World: Integer): Boolean;
var
T : Timer;
ms,x,y : Integer;
rS : Extended;
begin
if not isLoggedIn() then Exit;
WS_toggle();
WS_World := World;
if not WS_findWorld() then
begin
ms := MouseSpeed;
mouseBox(toBox(725,250,733,260), MOUSE_MOVE);
getMousePos(x, y);
holdMouse(x, y, MOUSE_LEFT);
mouseSpeed := 35;
rS := (random(30) / 30) / 10.0;
if rS = 0.0 then
rS := 0.1;
windMouseFunc(X, Y, 725+random(8), 414+random(5), 9.0,3.0,10.0/rS,15.0/rS,10.0*rS, @WS_findWorld);
wait(randomRange(200,400));
getMousePos(X, Y);
releaseMouse(X, Y, MOUSE_LEFT);
wait(randomRange(700,1200));
end;
if not findText(X, Y, toStr(World), 'SmallChars07', WS_WorldBox) then
begin
warn('Failed to find world '+toStr(World)+' in the world list', WT_CORE);
exit;
end;
warn('Found world '+toStr(World)+', switching worlds.', WT_CORE);
T.start();
while (Me.inCombat() and (T.timeElapsed() < 5000)) do
wait(30);
mouseBox(toBox(X,Y,X+15,Y+4), MOUSE_LEFT);
fastClick(MOUSE_LEFT);
T.start();
while (T.timeElapsed() < 4000) do
begin
if findText(X, Y, 'lease', 'SmallChars07', toBox(0,0,230,35)) then
break;
if findText(X, Y, 'Yes', 'CharsNPC07', AREA_CB) then
break;
if isSplashScreen() then
break;
end;
if isSplashScreen() then
begin
mouseBox(toBox(WDx1,WDy1,WDx2,WDy2), MOUSE_LEFT);
while not isLoggedIn() do
wait(60);
end;
if findText(X, Y, 'Yes', 'CharsNPC07', AREA_CB) then
mouseBox(toBox(X,Y,X+10,Y+6), MOUSE_LEFT);
T.start();
while (T.timeElapsed() < 4000) do
if findText(X, Y, 'lease', 'SmallChars07', toBox(0,0,230,35)) then
break;
while findText(X, Y, 'lease', 'SmallChars07', toBox(0,0,230,35)) do
wait(30);
if isSplashScreen() then
begin
mouseBox(toBox(WDx1,WDy1,WDx2,WDy2), MOUSE_LEFT);
while not isLoggedIn() do
wait(60);
Exit(False);
end;
result := true;
end;
Step 2 - Update Script for Switching World
Simba Code://Variables if we want to switch worlds
HowManyWorlds := 3;
World1 := 20;
World2 := 21;
World3 := 22;
Step 3 - Update Script to put the world list at the required position
Since these worlds don't appear when we open the world switcher, I will use my custom method to set the world list at the right place for switching world at a faster pace
Simba Code://Set these values if you want to use my custom method instead of Aerolib
useCustomScrolling := True;
//Value between 240 and 410
scrollYPosition := 300;
Things To Do
- Update comments on some functions because I made some change
- Accurate Progress Report
- Paint Progress Report on Smart
- Find a Workaround for my Mining Detection so you won't need to make the 2 DTM required to run this script
- Improve Walking Fixing, since the script will stop if it didn't made it to the destination(0.5%)