SRL Archive - Reflection Development

R_Fighting


Flight

2011-09-15 03:55:55

So… "R_GetInteractingNPC" doesn't seem to be working very well, so I put together a temporary alternative, and I just thought maybe it's worth throwing in the library. I tested it and it checks out just fine.


Function R_Fighting: Boolean;
var
MyPlayer,I: Integer;
begin
MyPlayer := SmartGetFieldObject(0, hook_static_MyPlayer);
I := SmartGetFieldInt(MyPlayer, hook_character_Interacting);
if (I > -1) And R_InCombat then
Result := True;
SmartFreeObject(MyPlayer);
end;

If you don't like referring to 'R_InCombat' then I'm sure you could directly hook the LoopCycles here if you wanted, which I would imagine to be a few milliseconds faster.

bevardis

2011-09-15 09:19:38

From: Flight

If you don't like referring to 'R_InCombat' then I'm sure you could directly hook the LoopCycles here if you wanted, which I would imagine to be a few milliseconds faster.

Talk about the advantage.

Thank you, this is useful, all combat scripts were not working >.>

Drakan

2011-09-15 09:26:07

We won't throw this in the library as the function will be fixed soon and we encourage people to make their own functions like this, but feel free for everyone to use this till we fix :) Nice job flight.

ry0240

2011-09-15 23:52:48

From: Flight
So… "R_GetInteractingNPC" doesn't seem to be working very well, so I put together a temporary alternative, and I just thought maybe it's worth throwing in the library. I tested it and it checks out just fine.


Function R_Fighting: Boolean;
var
MyPlayer,I: Integer;
begin
MyPlayer := SmartGetFieldObject(0, hook_static_MyPlayer);
I := SmartGetFieldInt(MyPlayer, hook_character_Interacting);
if (I > -1) And R_InCombat then
Result := True;
SmartFreeObject(MyPlayer);
end;

If you don't like referring to 'R_InCombat' then I'm sure you could directly hook the LoopCycles here if you wanted, which I would imagine to be a few milliseconds faster.


Either way great fix to this problem that's been going on for quite a few days. Why aren't you apart of the Reflection team eh?

YoHoJo

2011-09-16 00:22:13

Draken please make a nice big post about it when it is fixed please? I've had the problem for a while and I REALLY want to use some scripts that are screwing up because of this again! THANKS Flight! <3

NCDS

2011-09-16 00:24:11

From: Drakan
We won't throw this in the library as the function will be fixed soon and we encourage people to make their own functions like this, but feel free for everyone to use this till we fix :) Nice job flight.


Is the reflection include not open to community contributions or is there another reason for this?

Drakan

2011-09-16 00:29:58

From: NCDS
Is the reflection include not open to community contributions or is there another reason for this?


its perfectly open to the community, hence the reason we bring in so many of other people's functions. The function is just a temporary fix until interacting is fixed which won't be very long (I still have yet to see pryoryan as we have both been busy).

Flight

2011-09-16 01:07:50

I agree with Drakan on that, to be honest. I know they Reflection team is quick to patch up small mistakes like this so I won't be expecting this to be included in the library. I just noticed pretty much all the reflection fighters aren't working due to this so I provided a temporary solution.

It's ok because anybody can view this forum therefore anybody can use this function, it shouldn't have to be limited to the library only. Just because they're not added, doesn't mean you can't still use them for yourself. ;)

Drakan

2011-09-16 09:18:22

From: Flight
I agree with Drakan on that, to be honest. I know they Reflection team is quick to patch up small mistakes like this so I won't be expecting this to be included in the library. I just noticed pretty much all the reflection fighters aren't working due to this so I provided a temporary solution.

It's ok because anybody can view this forum therefore anybody can use this function, it shouldn't have to be limited to the library only. Just because they're not added, doesn't mean you can't still use them for yourself. ;)


Well put flight :)

mormonman

2011-09-16 16:36:37

Fixed.

YoHoJo

2011-09-16 17:58:39

Hell Yeah! Thanks!

Flight

2011-09-17 07:34:48

Mormonman, when will that fix be available for everyone else? I'm at a point, in a script, to where I need it for testing.

I looked in Drakan's github and I don't see any modifications after the 10th.

Harry

2011-09-17 08:04:14

From: Flight
Mormonman, when will that fix be available for everyone else? I'm at a point, in a script, to where I need it for testing.

I looked in Drakan's github and I don't see any modifications after the 10th.

Drakan's isn't the correct location. He should wipe everything from there and add a link to https://github.com/SRL/SRL-Reflection-2 (the proper repo).

Flight

2011-09-17 08:40:01

Ok ok, yeah I didn't know that. Thank you Harry. :)

Drakan

2011-09-17 11:03:27

From: Harry
Drakan's isn't the correct location. He should wipe everything from there and add a link to https://github.com/SRL/SRL-Reflection-2 (the proper repo).


It's our development base, but yes I need people to stop pulling from there.
EDIT: He also should have committed to the development repo as well..

Harry

2011-09-17 11:10:57

Why are you using two repos? You're just confusing people. If you want to add beta stuff, make a new branch on https://github.com/SRL/SRL-Reflection-2 , and commit stuff for Wizzup's autoupdater into "master" branch. All two repos is doing is confusing people.

Drakan

2011-09-17 11:16:06

It shouldn't be confusing when the repo is named _Dev….