I have always wanted to read values directly from rs client . So I started to build a plugin for Simba to do that. After month of trying to understand concepts of programming and stealing code snippets from internets. ITS ready! Thanks everyone on forums who helped.
Join our discord: https://discord.gg/ywSDHbXmF5
To use it:
1)You need rs3 nxt client.
2)Simba 64 bit build. Old:https://github.com/MerlijnWajer/Simb.../autobuild-421.
3)Plugin in plugins folder. https://github.com/pp9999/MemReading/releases/tag/0.1
4)Install mouse interception. Run as admin file bat. It should report success at console window : command.7z
It should take couple of minutes to display debug window if script is ran.
Check Simbas console for progress.
Move manually mouse to start mouse interception and keyboard
RS client and Simba must be at same scaling level.
How to do it:
Try system or application, which works for you.
There also small tutorial here:https://villavu.com/forum/showthread.php?t=177695
SRL Resource Library discord, ask stupid questions there.
Uploaded code onto GitHub as private.
Wanto fixit? Ask invite from
How to use script:
Simba Code:
program Test;
{$loadlib MemoryError}
begin
wait(199);
SetupRSReading(True," ",-1, 0);
repeat
wait(100+random(1099));
Writeln('Coordinates: ',GetPCoords());
Writeln('Floor: ',GetPFloorLv());
until(false)
end.
Some description for functions
Code:
SetupRSReading(True," ",-1,0);
Start plugin. Parameters: First is for starting graphical debug. Second is player name, it uses AOB to find it after all. Third is PID:
if it is 0 goes by first found.
If it is a number it tries to find client with this PID.
If it is -1, it opens up a list.
4th option is Mouse control method to be used:
0 is Inception driver.
1 is standard windows mouse commands they should be fine to use on remote desktop:https://villavu.com/forum/showthread.php?t=118173
2 don't bother with mouse emulation at all. Sends commands directly to client. For throwaway accounts should be fine.
Returns rs local player coordinates as Tpoint.
Returns rs local player groundplane level, ground 0, first floor 1 and so on.
in source
Code:
BOOLEAN FindNPCs1(int* id, int size , int dist, int accuracy, int lifepoint, WPOINT tilespot,int dist2, int action, SimbaString sidetext)
Code:
FindNPCs1([41],1,10,0,0,[0,0],0,0,'Attack');
For attacking/clicking npcs.
[41] = npc ids go there.
1 = amount of npc ids in box of [].
10 = how far to look for npcs in tiles. Range sort of.
0 = generate random non accuracy in pixels. For maximum leave at 0
0 = npc lifepoints. Can be left at 0
[0,0] = anchor of short. can be 0
0 = distance in tiles how far should function look from anchor. This part is to stop player clicking too far from anchor and getting lured away.
0 = clicking method. 0 left click, 1 right click, 2 move to npc, 3 do nothing.
'Attack' = Rs3 sidetext thing, works surprisingly well. Don't leave empty!.
More functions:Use
Code:
if (not CheckPAnim(120)) then begin /code/ end;
to check if players is animating. Number there is how many times to check vs 25 milliseconds. Some animations have huge caps between them.
Use
Code:
if (InveFull()) then begin /code/ end;
to check if inventory is full or not.
Use
Code:
if (InveItemcount(item1)<3) then begin /code/ end;
to count items in inventory, item1 is ID.
Use
Code:
if (InveFreecount()<9) then begin /code/ end;
to check how many spots are free.
Use to click item in inventory. Warning there is no check if inventory is actually open. So yea some fail safes should be added.
To click decor object, same stuff as npc goes in:
Code:
FindDobj([99],1,16,[0,0],[0,0],False,0,'Deposit');
There also special cases where object does not disappear but changes, made some functions to check certain booleans.
Code:
FindDobjA1([99],1,16,[0,0],[0,0],False,0,'Excavate');
Code:
FindDobjA2([99],1,16,[0,0],[0,0],False,0,'Excavate');
Mainly using them for archaeology resource caches.
To click active objects(portables and such):
Code:
FindAobj([99],1,16,[0,0],[0,0],False,0,'Excavate');
Check if inventory is open, returns bool,
Check if loot window is open
Tries to open inventory
Picks text from right click menu
Code:
SelectChooseOption('Trade');
'player' is a name of the player we wanto know about.
Return true if player is interacting with other player or npc. Works for local or other players.
Code:
PlayersInterActing('player');
Gets animation id, either local or other.
Code:
GetPlayersAnimation('player');
Loops 100 times animation check. If it hits anykind of animation before 100 returns true. Either local or other players.
Code:
IsPlayersAnimating('player',100);
There is more, check simbas list on the side to see them all.