mmh, are you calling random finding?
Printable View
what does op stand for? I think I need that ext file to run the monkfisher. Im getting this error:
Error: Duplicate declaration "DrawText" at line 241
Compiling failed.
Wishlist time! These are pretty straight forward. Tab is just for the variety, and it looks super sexy. waitTab is crazy handy when dealing with spells which have a delay(Plank Making spell, Superheat, Alch etc..)
Simba Code:function Tab(i: integer): boolean;
begin
Case Random(8)of
0: Result := FTab(I);
1..7: Result := gameTab(I);
end;
end;
function waitTab(Tab, waitPerLoop, MaxWait: integer): boolean;
var
T: Timer;
begin
T.start;
repeat
Result := (getCurrentTab = Tab);
If Not Result then
Wait(waitPerLoop);
until(T.timeElapsed > MaxWait)or(Result);
end;
made a cooking script with aerolib:
http://puu.sh/cT3BL/97ae9dfe6a.png
still running :D
Could you add something like WorldInfo := [];? So you can choose what world to log into?
Simba Code:function IntInArrEx(var index: integer; iarr: TIntegerArray; int: Integer): boolean;
var
I: Integer;
begin
For I:=0 to High(iarr)do
if iarr[I] = int then
begin
Result := True;
Index := I;
Exit;
end;
end;
function IntInArr(iarr: TIntegerArray; int: Integer): boolean;
var
t: Integer;
begin
Result := IntInArrEx(t, iarr, int);
end;
Is there something similar to this in your include? Can't seem to find these anywhere..
am I the only one to have problems with the login? It seems to click in random places and not type the username or password at all.
me.name and me.password are defined..
also getSkillXP and getSkillMaxLevel don't hover over the correct skill and they dont return anything.
Just pushed rev. 0.4 through GitHub. Quite a few bug fixes (I can't recall them all over time), many small additions made, SEWalker now has (optional) SPS-style methods, and a GroundItems entity branch was added. A couple example items are added to the database.
If you have any issues with the newest version please be sure to make a post here.
The whole include is slowing moving to the SRL-6 style; completely object-oriented. Here's an example of how to create (and use) a TMSObject:
Simba Code:procedure TMSObject.create(_Name: string; _UpText: TStringArray; _InnerCols, _OuterCols: Array of TColEx);
Simba Code:procedure openTheBank();
var
foundPoint : TPoint;
obj_BankBooth : TMSObject;
begin // Obj name Uptext array Array of TColEx (primary) Array of TColEx (secondary)
obj_BankBooth.create('BankBooth', ['ank B','nk bo','booth'], [createCol(540243, 3, 0.10, 1.07)], [createCol(3545, 10)]);
if obj_BankBooth.find(foundPoint) then
if openBankPoint(foundPoint, True) then
writeln('We opened the bank!')
else
writeln('Failed to open the bank')
else
writeln('Failed to find the bank booth');
end;
I apologize as I realize this will cause some minor compile issues but clearly it's simple to fix.
Edit:
I need to write a bunch of tutorials, unfortunately the PrintScreen button doesn't work on my laptop so I'll have to come up with something else to take snapshots for graphic tutorials.
Are you using SMART? I can't imagine the coordinates being off. I haven't ran SMART in well over a month, I'll have to use a throw away account and test the login procedures for SMART. Have you tried using "logInPlayer(True);"?
Yes the include doesn't handle anything from that client. You'll have to play with the colors in "didClick" function in InputHandler.
Ok, this should fix the login problem: Go to Login.simba (entities > player > Login) and line 373 I believe is the part that hits enter after typing in the username. Let's replace that with a simple mouseBox:
Simba Code:mouseBox(pBox, MOUSE_LEFT);
I thought there might be input problems between the browser and SMART but I just tested and they work fine, just in the login procedure is VK_ENTER not handled correctly by SMART. I'll send in the fixed file to GitHub now.
Edit:
Hoodz, I believe you'll find the GroundItems file very handy seeing as you have fighting scripts. I actually wrote this to aid combat-related scripts, I hope it helps.
Edit2:
You misinterpreted the parameters of that function. The second parameter is the color tolerance (CTS0-CTS2), CTS3 isn't supported for TColEx right now.
a few bugs,
isInvFull (or getInvCount) returns 0 if in a deposit boxscreen
depositAllFrom (or depositItem) tries to look for 'Deposit-All', when in deposit boxes, its 'Deposit All'.
Hello again,
Just wanted to see if there's a possibility to add this code into aeroLib?
Reason:
Hovering the skill to get the "start" experience/level is really stupid everytime we run scripts.
Explained:
It'll use getPage once, and then work out all the numbers for each variable(rank, level and experience). I didn't want to create a separate record for such a small function.
Code:
Simba Code:program Hiscore;
{$i AeroLib/AeroLib.Simba}
const
HISCORE_RANK = 0;
HISCORE_LEVEL = 1;
HISCORE_XP = 2;
function getHiscoreInfo(Username: String): T2DIntegerArray;
var
I, II: Integer;
S, tS: String;
sArr, skillArr: TStringArray;
begin
S := GetPage('http://services.runescape.com/m=hiscore_oldschool/hiscorepersonal.ws?user1=' + Username);
skillArr := ['Attack', 'Defence', 'Strength', 'Hitpoints', 'Ranged', 'Prayer', 'Magic', 'Cooking', 'Woodcutting', 'Fletching', 'Fishing', 'Firemaking', 'Crafting', 'Smithing', 'Mining', 'Herblore', 'Agility', 'Thieving', 'Slayer', 'Farming', 'Runecraft', 'Hunter', 'Construction'];
SetLength(Result, 3);
For I:=0 to 2 do
SetLength(Result[I], 23);
For I:=SKILL_ATTACK to SKILL_CONSTRUCTION do
begin
If I = SKILL_CONSTRUCTION then
tS := Between(skillArr[I], '</table>', S)
else
tS := Between(skillArr[I], '<img class', S);
sArr := MultiBetween(tS, '="right">', '</td>');
For II:=0 to 2 do
Result[II][I] := StrToIntDef(GetNumbers(sArr[II]), -1);
end;
end;
var
CharInfo: T2DIntegerArray;
begin
initAL;
CharInfo := getHiscoreInfo('vestfold');
Writeln(CharInfo[HISCORE_LEVEL][SKILL_FIREMAKING]);
end.
Made a pull request for a couple commits. Mousebox needs a wait or it fails to click sometimes and now smart will be automatically enable upon start of script. @Flight;
Ok Elfyyy, I pushed your fixes you told me about and I also revived the moderator detection via the chat screen. It should detected both P-Mods and J-Mods and, by default, log out if either are seen in the chat screen. This is optional, however, and can be changed at the beginning of the script.
https://dl.dropboxusercontent.com/s/...47-35.png?dl=0
You forgot to search for bank chests :p in openBankPoint()
That's a wonderful issue to bring up. You're right, I absolutely forgot about bank chests. I'll add that in immediately and push it to GitHub. Also, thanks for the picture.
Edit:
I'm also going to fix a small issue with the bank symbol on the minimap. Apparently if the player has running enabled the include could detect this as a bank symbol.
What are the odds of this? haha..
Flight, could you please make a global variable for updating the include by default directly from github when initAL is called?
Simba Code:program new;
{$i AeroLib/AeroLib.Simba}
begin
AL_ForceUpdate := True;
initAL;
end.
Would be extremely helpful.