In my script, my dtm's work for a while, then they stop working, idk whats going on here... So i always have to remake the damn dtms, someone plz tell me what the heck is going on!?
In my script, my dtm's work for a while, then they stop working, idk whats going on here... So i always have to remake the damn dtms, someone plz tell me what the heck is going on!?
Woot woot.
255 main point tolerance?
Originally Posted by irc
he has main point(center point) 255 and all other points are on the black outline of the item
~shut
All my scripts are held on Googlecode git, so if you ever see a problem, fork it and send me a pull request
If a script is grey, it doesn't work, if it's colour then it does!
My Tutorials:-
Everything you need to know about setting up Simba, SRL and Reflection!, How to sort out the MSVCR71.dll error
How to set up players for autoing with Simba, SRL/Simba Standards (with examples), Defines
Auto Updater and Git, Using a testing branch for git, Adding SRL Stats to your script
Creating your own font set for Simba, Guide to Cups, How to make 1.45M (RSGP) a day (not really my tut)
Download a image and set it as your Desktop Wallpaper in C#, How to make your first PHP file uploader
<Coh3n> Shuttleu, fuck I love you right now
Are you looking for inventory items?
SCAR Code:program New;
{.include Srl\SRL.scar}
var
UIDB_Net: TPointArray;
procedure UIDB_LoadNet;
var tmpcount,hx,hy:integer;
begin
SetArrayLength(UIDB_Net,506);
repeat
hy:=9;
hx:=hx+1;
repeat
hy:=hy+1;
if (((hx mod 2)=0) or ((hy mod 2)=0)) then
begin
UIDB_Net[tmpcount]:=Point(hx,hy);
Inc(tmpcount);
end;
until hy=31;
until hx=31;
end;
Function InvBox2(i :Integer): TBox;
begin
if (i < 1) or (i > 28) then
begin
srl_Warn('InvBox', 'Incorrect index: ' + IntToStr(i), warn_AllVersions);
exit;
end;
{1 x1 563 y1 213 x2 594 y2 244}
{5 x1 605 y1 249}
Result.x1 :=563+((((i+3)mod 4))*(605-563));
Result.y1 :=213+((((i-1)/4))*(249-213));
Result.x2 := Result.x1+31;
Result.y2 := Result.y1+31;
end;
{*******************************************************************************
function strToIntArrayEx(intArray, Separater : String) : Array of Integer;
By: moparisthebest and modified by Ron
Description: Loads a String into an array of integer. (Example String: '567 389 3234 98342 7998767')
*******************************************************************************}
function strToIntArrayEx(intArray, Separater : String) : Array of Integer;
var
i, spacePos: Integer;
begin
repeat
SetArrayLength(Result, i + 1);
spacePos := Pos(Separater, intArray);
if (not (spacePos = 0)) then
Result[i] := StrToInt(Copy(intArray, 1, spacePos - 1))
else
begin
Result[i] := StrToInt(Copy(intArray, 1, Length(intArray)));
break;
end;
Delete(intArray, 1, spacePos);
i := i + 1;
until (False)
end;
{*******************************************************************************
function strToIntArray(intArray : String) : Array of Integer;
By: moparisthebest and modified by Ron
Description: Refer to strToIntArrayEx.
*******************************************************************************}
function strToIntArray(intArray : String) : Array of Integer;
begin
Result := strToIntArrayEx(intArray, ' ');
end;
{*******************************************************************************
function intArrayToStrEx(intArray : Array of Integer; Separater : String) : String;
By: moparisthebest and modified by Ron
Description: Loads an array of integer into a String. (Example String: '567 389 3234 98342 7998767')
*******************************************************************************}
function intArrayToStrEx(intArray : Array of Integer; Separater : String) : String;
var
i, arrayLength: Integer;
begin
arrayLength := GetArrayLength(intArray);
repeat
Result := Result + IntToStr(intArray[i]);
if (not(i = (arrayLength - 1))) then
Result := Result + Separater;
i := i + 1;
until (i = arrayLength)
end;
{*******************************************************************************
function intArrayToStr(intArray : Array of Integer) : String;
By: moparisthebest and modified by Ron
Description: Refer to intArrayToStrEx.
*******************************************************************************}
function intArrayToStr(intArray : Array of Integer) : String;
begin
Result := intArrayToStrEx(intArray, ' ');
end;
function CreateBL(Area:string; Slot:integer): TIntegerArray;
var SlotBox:TBox;
i,tmpAL:integer;
begin
case lowercase(Area) of
'inv': SlotBox:= InvBox2(Slot);
'bank': SlotBox:= BankIndexToMSBox(Slot);
end;
tmpAL:=1;
SetArrayLength(result,tmpAL+1);
for i:=0 to 505 do
begin
if getcolor(UIDB_Net[i].x+SlotBox.x1,UIDB_Net[i].y+SlotBox.y1)=65536 then
begin
result[tmpAL]:=i;
Inc(tmpAL);
SetArrayLength(result,tmpAL+1);
end;
end;
SetArrayLength(result,tmpAL);
result[0]:=tmpAL-1;
end;
function CompareBL(First,Second:TIntegerArray):boolean;
var i:integer;
begin
if First[0]<> Second[0] then exit;
for i:=1 to First[0] do
begin
if First[i] <> Second[i] then exit;
end;
result:=true;
end;
function CountBL(BlackList:TIntegerArray):integer;
var i:integer;
begin
for i:=1 to 28 do
begin
if CompareBL(BlackList,CreateBL('inv',i)) then
inc(result);
end;
end;
var c,t,MyBMP:integer;
MyBL:TIntegerArray;
begin
UIDB_LoadNet;
for c:=1 to 28 do
begin
MyBL:=CreateBL('inv',c);
WriteINI('Item'+inttostr(c),'Black', intArrayToStr(MyBL),AppPath+'\UIDB\UIDBdemo.ini');
end;
FreeBitmap(mybmp);
t:=getsystemtime;
if CompareBL( strToIntArray(ReadIni('Item3','Black',AppPath+'\UIDB\UIDBdemo.ini')),
CreateBL('inv',8)) then
writeln('yes, item 8 is the same as item 3');
writeln(inttostr(getsystemtime-t));
end.
I'm trying to find the items on the screen and in inv. Heeeeeeelpz
Woot woot.
Post a screenie of it
SCAR Code:program New;
var MyBmp,w,h:integer;
begin
GetClientDimensions(w,h);
MyBmp:=BitmapFromString(w,h,'');
CopyClientToBitmap(MyBmp, 0,0,w,h);
SaveBitmap(MyBmp,AppPath+'\itemscreenie.bmp');
end.
Are you using the right coords? MSX, MSY, MIX, MIY, etc
There are currently 1 users browsing this thread. (0 members and 1 guests)