Flight
2011-09-20 22:42:11
Heya,
I made these to fuel my X-Fighter script and they all seem to do the job successfully. The 2 Summoning functions I had already made in the past for Naturez but I don't think I posted them separately anywhere, so here they are.
Function R_GetNPCTarget(Null: Boolean): TNPC;
This is handy if you need to exit your main fighting procedures (for whatever reason) and you need to grab that same NPC.
Function R_GetSpecialPercent(Who: String): Integer;
This will grab how much special attack you or your familiar has remaining.
Function R_UsingFamiliar: Boolean;
^ Self-explanatory
Function R_InteractFamiliar(Option: String): Boolean;
This will interact with your summoned familiar based on the 'Option' string you use as the parameter. It's also, obviously, not 100% Reflection. The valid options are: 'Attack','Cast','Interact,'Renew','Take','Dismiss','Call','Details','Select'
Hope others find these useful as well. :)
I made these to fuel my X-Fighter script and they all seem to do the job successfully. The 2 Summoning functions I had already made in the past for Naturez but I don't think I posted them separately anywhere, so here they are.
Function R_GetNPCTarget(Null: Boolean): TNPC;
Function R_GetNPCTarget(Null: Boolean): TNPC;
Var
i: Integer;
NPCs: TNPCArray;
begin
NPCs := R_SortNPCs(R_GetInteractingNPCs(Null));
if(GetArrayLength(npcs) = 0) then
Exit;
for i := 0 to high(NPCs) do
begin
if (NPCs[i].InCombat) then
Result := NPCs[i];
end;
end;
This is handy if you need to exit your main fighting procedures (for whatever reason) and you need to grab that same NPC.
Function R_GetSpecialPercent(Who: String): Integer;
Function R_GetSpecialPercent(Who: String): Integer;
begin
Result := 0;
Case Lowercase(Who) of
'me': Result := ((R_GetSetting(300))/10);
'familiar': Result := (R_GetSetting(1177));
end;
end;
This will grab how much special attack you or your familiar has remaining.
Function R_UsingFamiliar: Boolean;
Function R_UsingFamiliar: Boolean;
Var
S: TInterfaceChild;
begin
Result := False;
S := R_GetInterfaceChild(747, 3);
Result := (S.TextureID = 1802);
end;
^ Self-explanatory
Function R_InteractFamiliar(Option: String): Boolean;
Function R_InteractFamiliar(Option: String): Boolean;
Var
O: TInterfaceChild;
begin
if R_UsingFamiliar then
begin
if (Option = '') then
begin
O := R_GetInterfaceChild(747, 8);
R_ClickInterface(O, 1);
Result := True;
end else
begin
MouseBox(695,140,740,155,2);
if ChooseOption(Option) then
Result := True
else
Writeln('Incorrect option');
end;
end else
Writeln('No familiar present!');
Wait(100 + Random(50));
end;
This will interact with your summoned familiar based on the 'Option' string you use as the parameter. It's also, obviously, not 100% Reflection. The valid options are: 'Attack','Cast','Interact,'Renew','Take','Dismiss','Call','Details','Select'
Hope others find these useful as well. :)