SRL Archive - Help

Tile Arrays, Checking if character is in certain tile array?


Vowel

2015-03-26 14:20:54

I'm trying to write a script in reflection, but there's not too much on it on these forums so I'm kind of lost..

For my script I need to do the following:

Check if my character is in a certain tile array
Check if my player is currently in combat
If not in combat, attack

Also, how would you go about finding other player ID's?

Verfy

2015-03-27 03:15:37

Use this https://villavu.com/forum/showthread.php?t=111664 and this https://villavu.com/forum/showthread.php?t=58935

The Mayor

2015-03-27 04:47:19

From: Vowel
I'm trying to write a script in reflection, but there's not too much on it on these forums so I'm kind of lost..

For my script I need to do the following:

Check if my character is in a certain tile array
Check if my player is currently in combat
If not in combat, attack

Also, how would you go about finding other player ID's?


Item debugging is coming soon. Just finished writing it

So you can go:


Reflect.Smart.Graphics.DebugNPCs;
Reflect.Smart.Graphics.DebugInvItems;
Reflect.Smart.Graphics.DebugPlayers;
// objects, ground items, etc



E: Realised you had other questions. I applied this method to reflection, so you can easily check your player is inside any shape with 100% accuracy:



procedure Example();
var
MyPolygon: TPointArray;
begin
MyPolygon := [[3203, 3253], [3212, 3254], [3218, 3246], [3217, 3240]];

if Reflect.Tiles.InPolygon(MyPolygon) then
WriteLn('We are inside the polygon');

// You can also draw a polygon with: (you would need to convert to MM points in below pic)
Reflect.Smart.Graphics.DrawPolygon(MyPolygon);
end;


Lipcot

2015-03-27 04:54:48

From: The Mayor
…


Awesome name!

The Mayor

2015-03-27 04:56:38

From: Lipcot
Awesome name!


I've got so many SRL/Simba/Botting accounts :D

bg5

2015-03-30 03:56:34

From: The Mayor
I've got so many SRL/Simba/Botting accounts :D


never got banned for name? :P