Results 1 to 7 of 7

Thread: SPS moving too far

  1. #1
    Join Date
    May 2012
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default SPS moving too far

    Hello,

    Is there a way I can use Surge spell with SPS walking ? I tried something but didn't work =/


    var
    surgeSlot := VK_1;
    begin
    sps.walkPath(path);
    wait(gaussRangeInt(1500,2500));
    PressKey(surgeSlot);
    wait(gaussRangeInt(300,700));
    sps.walkPath(path);
    end;
    Attached Images Attached Images
    Last edited by kritis; 08-26-2016 at 07:53 PM.

  2. #2
    Join Date
    Jan 2012
    Posts
    85
    Mentioned
    0 Post(s)
    Quoted
    40 Post(s)

    Default

    you can pull the walkPath out from the include, add a repeat or while loop to check for cooldown on skill the skill, and then paste that into your script.

  3. #3
    Join Date
    May 2012
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Doing an override of the existing method of walkPath() ?

  4. #4
    Join Date
    Jan 2012
    Posts
    85
    Mentioned
    0 Post(s)
    Quoted
    40 Post(s)

    Default

    no, you just wouldn't call the existing walkPath in your script in favor of your own.

    i made a thread asking the exact same question you're asking now a few years ago: https://villavu.com/forum/showthread...38#post1340138

  5. #5
    Join Date
    Dec 2013
    Location
    Pitcairn Island
    Posts
    288
    Mentioned
    20 Post(s)
    Quoted
    166 Post(s)

    Default

    Quote Originally Posted by hackingislol133 View Post
    no, you just wouldn't call the existing walkPath in your script in favor of your own.

    i made a thread asking the exact same question you're asking now a few years ago: https://villavu.com/forum/showthread...38#post1340138
    Overriding it would actually be the 'correct' way to do it. That way you don't have to modify any of the existing calls to SPS.walkPath().

    Simba Code:
    function TSPSArea.walkPath(path: TPointArray; waitMoving: Boolean = True; shiftInterval: Integer = 500): boolean; override;
    begin
     // code with mods
    end;

  6. #6
    Join Date
    Feb 2012
    Location
    Norway
    Posts
    995
    Mentioned
    145 Post(s)
    Quoted
    596 Post(s)

    Default

    overriding GetPlayerPos seems way simpler, and way shorter.

    Simba Code:
    var lastSurge:Int64;

    function TSPSArea.GetPlayerPos(): TPoint; override;
    begin
      Result := Inherited();
     
      // do stuff bellow here, for example..:
      if (GetTickCount64() - lastSurge > 3000) and        //as this method is called many times, try to make sure we don't do it again while in this area.
         PointInBox(Result, TBox([210,180,270,230])) then //only use surge if we are in this area
      begin
        //do your spellcast(s) here:
        PressKey(surgeSlot); //or whatever..

        //log it
        lastSurge := GetTickCount64();
      end;
    end;
    Also, this is untested, but the concept should work.. might have to fix it up tho..

    Tho I am not sure why you wanna cast it while walking anyway, or if that is what you are actually trying to do.. But whatever..
    /out
    Last edited by slacky; 08-28-2016 at 02:00 AM.
    !No priv. messages please

  7. #7
    Join Date
    May 2012
    Posts
    37
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    ^ thanks.
    I want to use surge to gain time and, restricting the script to cast surge only within a position prevent the char to surge in the wrong way because the path isn't linear.

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
  •