Results 1 to 3 of 3

Thread: MapWalk in osrs reflection

  1. #1
    Join Date
    Sep 2015
    Posts
    32
    Mentioned
    1 Post(s)
    Quoted
    4 Post(s)

    Default MapWalk in osrs reflection

    The Mapwalk isn't working in the srl-osrs/SRL/Reflection/core folder

    i get
    Error: Don't know which overloaded method to call with params (Extended) at line 145
    Compiling failed.



    function R_WindPath(xs, ys, xe, ye, gravity, wind, minWait, maxWait, maxStep, targetArea: extended): TPointArray;
    var
    veloX, veloY, windX, windY, veloMag, dist, randomDist, lastDist, step: extended;
    lastX, lastY: integer;
    sqrt2, sqrt3, sqrt5: extended;
    begin
    sqrt2:= sqrt(2);
    sqrt3:= sqrt(3);
    sqrt5:= sqrt(5);
    while hypot(xs - xe, ys - ye) > 1 do
    begin
    dist:= hypot(xs - xe, ys - ye);
    wind:= minE(wind, dist);
    if dist >= targetArea then
    begin
    windX:= windX / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
    windY:= windY / sqrt3 + (random(round(wind) * 2 + 1) - wind) / sqrt5;
    end else
    begin
    windX:= windX / sqrt2;
    windY:= windY / sqrt2;
    if (maxStep < 3) then
    begin
    maxStep:= random(3) + 3.0;
    end else
    begin
    maxStep:= maxStep / sqrt5;
    end;
    end;
    veloX:= veloX + windX;
    veloY:= veloY + windY;
    veloX:= veloX + gravity * (xe - xs) / dist;
    veloY:= veloY + gravity * (ye - ys) / dist;
    if hypot(veloX, veloY) > maxStep then
    begin
    randomDist:= maxStep / 2.0 + random(round(maxStep) / 2); I get Error here
    veloMag:= sqrt(veloX * veloX + veloY * veloY);
    veloX:= (veloX / veloMag) * randomDist;
    veloY:= (veloY / veloMag) * randomDist;
    end;
    lastX:= Round(xs);
    lastY:= Round(ys);
    xs:= xs + veloX;
    ys:= ys + veloY;
    SetArrayLength(Result, GetArrayLength(Result) + 1);
    Result[ High(Result) ] := Point(Round(xs), Round(ys));
    step:= hypot(xs - lastX, ys - lastY);
    lastdist:= dist;
    end;
    end;
    Last edited by lizon; 09-22-2015 at 11:02 PM.

  2. #2
    Join Date
    Sep 2014
    Location
    C:\Simba\
    Posts
    565
    Mentioned
    9 Post(s)
    Quoted
    71 Post(s)

    Default

    https://villavu.com/forum/showthread.php?t=114552

    tl;dr srl-osr is pretty much outdated was never properly done, hence no work on the reflection for it. You'd be better off going with aerolib and the Lape version of Reflection.

    If your problem is relevant to this, or you might just be using it wrong.

  3. #3
    Join Date
    Sep 2015
    Posts
    32
    Mentioned
    1 Post(s)
    Quoted
    4 Post(s)

    Default

    OK i am just trying to use regular reflect now cant find a simple script i can learn. TReflectObject to click on it

    Can someone give me basic script to click in TReflectObject
    Last edited by lizon; 09-23-2015 at 05:52 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •