PDA

View Full Version : [Reflection]Update 1/28/2015



Kyle
01-28-2015, 07:39 PM
Reflection Include Update 1/28/2015


Since we have been making a lot of changes and additions to the Lape Reflection include lately, I thought it was best if I try and make a weekly(ish) thread about the latest changes made to the include and upcoming plans! For this first one, I will just recap the changes made it the last week or so.

For the most up to date changes, you can always check out the commits on my github (https://github.com/Elfyyy/OSR-Reflection/commits/master), which shows every single change made.

Additions:



Bank Pin Support - LocalPlayer.Pin := '3232'; LocalPlayer.EnterPin;
TReflectTimer - .Start, .ElapsedTime, .Pause, .Reset
Rewrote WalkPath & Added WalkStraightPath - WalkStraightPath will BlindWalk to Points given
World Hopping full supported - LocalPlayer.ChangeWorld(World: Integer); //Changes world to "World" whether logged in or out
Full Prayer Support - See Prayer.simba for functions added.
ChangePitch for camera - Reflect.Map.ChangePitch(Pitch: Integer)// 0 - 10 with 0 being lowest
TReflectLogger (https://villavu.com/forum/showthread.php?t=111710)



Changes:



Starting to phase out of certain functions naming. Still have pointer to old naming, will display warning to update script. Will soon be removed.
Rewrote some of npc's memory handling, there are now two options you have. You can use the npc values stored in the record (Tile/Animation/Health/Ect..), looping the .Find function each time to update the record constantly. This is the way that we have always had to do it, and how it is used in the tutorial and all scripts. The other, new way that I added, is now the npc reference is stored with the npc itself, so there is no need to constantly loop, and you can use the Get functions (GetTile, GetAnimation, GetHealth/Ect..). Do be aware, this reference is only valid until the npc dies. For example:

var
OurGuard: TReflectNpc;

begin
OurGuard.Find('Guard');
//Click and attack Guard
while OurGuard.GetHealth > 0 do
WriteLn('Guard is Alive!');
WriteLn('Guard Died!!');
end.

Let me know if you need help better understanding that.



Upcoming:



Will be adding Graphics.simba
Will add .Interact to all interactables (Npcs/Items/Objects/Players)
More small name changes
Documenting the include


Please use the suggestions (https://villavu.com/forum/forumdisplay.php?f=663)and bugs (https://villavu.com/forum/forumdisplay.php?f=665)forum if need be, as it is quite empty atm :'(

The Mayor
01-28-2015, 08:05 PM
Nice work!