Hello, I've been writing this combat script for RSC, one part of the script is to check for prayer.
But I ran into some trouble using SCAR 1.13 and I've decided to switch over to Simba, since the SCAR scene has been dead for over a decade and its hard to get help.
Code:
var
intPray, MinPray: integer;
CurrentPray: string;
Procedure CheckPrayer;
begin
MinPray := 30
MoveMouse(425, 20);
wait(300);
CurrentPray := GetTextAt(318, 138);
intPray := StrToInt(Copy(CurrentPray, 1, 2))
if(intPray < 30) then
begin
writeln('Hello!');
end;
end;
begin
repeat
CheckPrayer;
until(1=0)
end.
If you google "Runescape Classic font" you will see the RSC fonts and the stats tab that I'm speaking of, sadly I can't post pictures..
MoveMouse(425, 20); - Clicks on the stats tab.
CurrentPray := GetTextAt(318, 138); - Scans (318, 138) within the stats tab and returns "Prayer: 24/24" with writeln()
This next bit is where Im having issues.
When I convert String to Integer(StrToInt) and assign it to intPray, i still can't use it for making conditionals, such as if(intPray < 30).
Can someone guide me in the right direction of porting this to Simba? How do I make Simba read the RSC font, etc.
I would be very thankful!