Page 1 of 2 12 LastLast
Results 1 to 25 of 46

Thread: Tutorial - How to find Moving NPC/Monster

  1. #1
    Join Date
    Feb 2012
    Posts
    386
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default Tutorial - How to find Moving NPC/Monster

    Hello Everyone! I don't know if any of you ever had problems with moving NPC's or Monster, but I've had Problems with them and I am willing to simplify Your life with a Tutorial on How to Find a Moving NPC or Monster without any more Headache. If you are Tired to see Your bot Trying to find Your NPC, but can't because someone is near you and He has the Same color as your Script, so Your bot keeps Hovering the mouse on this guy because he is the closest to you until he get's further away and Finally allow to script to find the Real NPC you Wanted to find! than you are in the Right place.

    Why Would you Want to Use This Method?
    Well, I am not here to Force you to use My method, but It is very effective. You can continue to use Simple Method like
    Simba Code:
    if (findobjcustom(x,y,['Wilderness'],[2172972],5)) then
    But like I said, If I come Near You with the Same Color as your Script, You will have a lot of Fun Watching your Bot hovering the Mouse on me Trying to find the Target as You can see on this Picture! That I don't have :O

    How to do it:
    Basically, At the end of this Tutorial, Your Function for Finding the NPC will look like the Function Below. In this case, I was searching a NPC and I had to Click and Choose an Option on him.
    Simba Code:
    Function TalkingToMages: Boolean;

    Var
       TPAA: T2DPointArray; // The Variables of the Functions
       TPA: TPointArray;
       CTS, I, Retry: Integer;
    Begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, YourColorHere, MSX1, MSY1, MSX2, MSY2, Tolerance); // Enter the Color and Tolerance Here at the Right place.
      ColorToleranceSpeed(CTS);
      TPAA := TPAToATPAEx(TPA, Width, Heigh); //Put the Width and Heigh here
      SortATPASize(TPAA, True);
      For I := 0 To High(TPAA) Do
        If GetArraylength(TPAA[i]) > 5 Then // Set How Much Points you need for your function to take Action
        Begin
        repeat
          inc(Retry);
          MiddleTPAEx(TPAA[i], X, Y);
          MMouse(X, Y, 3, 3);
           if (IsUpTextMultiCustom(['age', 'amorak'])) then // Enter The name of Your NPC or Monster
          Begin
            Result := True;
            GetMousePos(X, Y);
            mouse(x,y,3,3,false);
            wait(100 + random(200));
          ChooseOption('elep');
          wait(5000 + random(1000));
            Break;
          End;
          until (Retry = 2);
          Break;
          end;
          end;
    This May look Scary for Now, but It will become A lot Easier After I explain to You Step by Step of What to do!

    Lets Get started!
    Step 1 : Get Your Color!
    Since NPC's or Monsters Move, You want to get Pick your color on His head, It will be a lot Easier for Your Script to Find out the NPC like that, because If you Pick a color that is only visible on the Chest (Chest of the Monster or NPC you want to find)This can Lead to Your Function Returning False because You cannot find the NPC since the color You Picked is not in the Angle of Your screen.

    For this Reason, I decided to Pick goblins as an Exemple for This Script.

    As You see, The Color of The Head of This goblin is 5940087. For tolerance, It is pretty much testing what works best, I would always recommend Starting with a Tolerance of 7 and If you don't like the Result, You can adjust it to your liking/which ever works for you. If you are Wondering What happens when You reduce your tolerance, It will search for Colors that are near to the one your Picked. If you rise it, It will search for Colors that are more likely the Same as Your color.

    With Your color and Tolerance, You have to to put them into the function. Here is a Picture on Where to Put them :


    Step 2 : Get the Width and Heigh
    This is by far, The most important Part of This function. The End Result will Depend on how good you do it. So, let me explain how we get this. Did you always wonder How People Were getting their Distance in the Game, since there is no option that Tells us the Exact distance between points? Well, there is a way to know how Far Each points is from Each Other and It is with Picking the Color. Before I explain How do it, Take a look at this Picture I posted Below This Text!


    Why are we doing this? We want to Make a Box, so When our Script Does the Function, our function will find Dots of our Color and If there is Enough Dots To make the Same box as Us, the function will return True and Check if it is the Right NPC, if it is, it will click in the middle of the Box and if it is now, it will move to another to see if it is our NPC. Now, lets get into the Topic, how to get theses values. As you can see, We don't see my Mouse on the Screen, So I made a Red Dot to Indicate Where My mouse was!

    What you want to do: First, Get beside your NPC (like I did) then Click on Pick Color on Simba. The screen will freeze and that's exactly what we want. What We want to do is Get the Dimension of the Head. As your see, I moved my Mouse to What Would be my bottom Right corner and I took note of the Coordinates that were in the Red Box(638,624). After, I did the Same, but on the opposite side, So I moved my Mouse to What would be my Top Left Corner and Took note of the coordinates (635,771). So, Now do you see the Box I was Talking About?

    The Next Step is to get Width and Height. First, Put the value of the same Type Together, so 638 with 635 and 624 with 771 = (638,635) and (624,771). If you are wondering why My second Value is so High, it is Because I took a Picture and get the coordinates from the picture, but I didn't place paint in the same arena as I took the Coordinates with the first picture and it wasn't on the same place on my Main screen, so I got coordinates that are wrong, but it won't happen if you do it on your Playing Screen. For this Reason, We will change our 771 for 625. Now, it should be (638,635) and (624,625).

    Why do we need These Values. If you do 638 - 635 = 3 and this is our Width. 624 - 625 = -1, but we can't have a negative Value, so we turn it into apositive value by which I mean 1 and this is our Height. Wow! We are almost done! Enter The Width and Height to their Respective Place shown on the Picture below and When you Script use this function, It will seach for array that will allow him to make a Box like this on this Picture.



    Step3 - Get the Up Text

    As you see on the picture, When you move your Mouse Over the Goblin, There is an Up Text. My indication. Never Use the First letter, because it will make it longer for your Bot to Detect if it is the Right Npc. So, Here is what our Uptext would be : oblin that we would add on here on this picture below.


    So, Our Script Should look like this now
    Simba Code:
    Function TalkingToMages: Boolean;

    Var
       TPAA: T2DPointArray; // The Variables of the Functions
       TPA: TPointArray;
       CTS, I, Retry: Integer;
    Begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 5940048, MSX1, MSY1, MSX2, MSY2, 7); // Enter the Color and Tolerance Here at the Right place.
      ColorToleranceSpeed(CTS);
      TPAA := TPAToATPAEx(TPA, 3, 1); //Put the Width and Heigh here
      SortATPASize(TPAA, True);
      For I := 0 To High(TPAA) Do
        If GetArraylength(TPAA[i]) > 5 Then // Set How Much Points you need for your function to take Action
        Begin
        repeat
          inc(Retry);
          MiddleTPAEx(TPAA[i], x, y);
          MMouse(X, Y, 3, 3);
           if (IsUpTextMultiCustom(['oblin'])) then // Enter The name of Your NPC or Monster
          Begin
            Result := True;
            GetMousePos(X, Y);
            mouse(x,y,3,3,false);
            wait(100 + random(200));
          ChooseOption('elep');
          wait(5000 + random(1000));
            Break;
          End;
          until (Retry = 15);
          Break;
          end;
          end;

    In this Case, My function was Click on A NPC that I had to Talk and Choose an option to Teleport. Here, We want to Attack a goblin, so We are going to change the End of this Function to attack instead of Trying to Find the Option Teleport on Goblin.

    Simba Code:
    Function TalkingToMages: Boolean;

    Var
       TPAA: T2DPointArray; // The Variables of the Functions
       TPA: TPointArray;
       CTS, I, Retry: Integer;
    Begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 5940048, MSX1, MSY1, MSX2, MSY2, 7); // Enter the Color and Tolerance Here at the Right place.
      ColorToleranceSpeed(CTS);
      TPAA := TPAToATPAEx(TPA, 3, 1); //Put the Width and Heigh here
      SortATPASize(TPAA, True);
      For I := 0 To High(TPAA) Do
        If GetArraylength(TPAA[i]) > 5 Then // Set How Much Points you need for your function to take Action
        Begin
        repeat
          inc(Retry);
          MiddleTPAEx(TPAA[i], x, y);
          MMouse(X, Y, 3, 3);
           if (IsUpTextMultiCustom(['oblin'])) then // Enter The name of Your NPC or Monster
          Begin
            Result := True;
            GetMousePos(X, Y);
            mouse(x,y,3,3,true);
          wait(5000 + random(1000));
        Writeln('We have found our Goblin, Yeh!');
            Break;
          End;
          until (Retry = 2);
          Break;
          end;
          end;

    Now, We are Good. Also, I added what we Call a FailSafe, so If the Script Doesn't find the goblin after 2 attempts, it will end. That's where You can enter in Your script a procedure to Walk To a New place to Try to find Another NPC or change the Angle of the compass.This method Can also be used to find Object in Runescape like Door or stairs. So, I hope I helped you out to Make a better Script with the Ability to find NPC's Way easier without any more Trouble.
    Last edited by Nemesis3X; 03-07-2012 at 12:35 AM.

  2. #2
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    I was actually toying around with this for a script I want to make; will look over this guide after class, but it looks like it will definitely help me!

    Looks like an excellent guide, thanks! ! !

  3. #3
    Join Date
    Oct 2011
    Location
    Chicago
    Posts
    3,352
    Mentioned
    21 Post(s)
    Quoted
    437 Post(s)

    Default

    Nice job, repped




    Anti-Leech Movement Prevent Leeching Spread the word
    Insanity 60 Days (Killer workout)
    XoL Blog (Workouts/RS/Misc)

  4. #4
    Join Date
    May 2007
    Location
    Some where fun.
    Posts
    2,891
    Mentioned
    1 Post(s)
    Quoted
    5 Post(s)

    Default

    Excellent tutorial, repped!

  5. #5
    Join Date
    Dec 2006
    Location
    Program TEXAS home of AUTOERS
    Posts
    7,934
    Mentioned
    26 Post(s)
    Quoted
    237 Post(s)

    Default

    Love it, good job Mate.

  6. #6
    Join Date
    Feb 2012
    Location
    Wonderland
    Posts
    1,988
    Mentioned
    41 Post(s)
    Quoted
    272 Post(s)

    Default

    Here's (perhaps) a more fluent revision of your guide, I'm not as great with programming as most, so that may counter my ability to help in the revision. (In before my ability to revise sucks too -.-) :P

    "_" underlines = remove the capitalization/capital letter
    bold + italics = suggested spelling/phrasing
    There is no CRTL+S for striking words out, so I simply deleted some characters/words/phrases.

    Quote Originally Posted by Nemesis3X View Post
    Hello Everyone! I don't know if any of you ever had problems with moving NPC's or Monster's, but I've had Problems with them and I am willing to simplify your life with a tutorial on How to Find a Moving NPC or Monster without any more headache. If you are tired to see your bot trying to find your NPC, but can't because someone is near you and he has the same color as your Script, so your bot keeps moving the mouse on this guy's monsters because he is the closest to them until he get's further away, until finally you gain priority to kill the monsters since your in the better spot. (unsure if this is the idea you are trying to convey/talk about)

    Why Would you want to use This Method?
    Well, I am not here to force you to use my method, but It is very effective. You can continue to use Simple Method like this:
    Simba Code:
    if (findobjcustom(x,y,['Wilderness'],[2172972],5)) then
    But like I said, if I come near you with the same color as your script, you will have a lot of fun watching your bot hovering the mouse on me trying to find the target as you can see on this Picture! --That I don't have :O-- (lol :P)

    How to do it:
    Basically, At the end of this tutorial, your function for finding the NPC will look like the function below. In this case, I was searching a NPC and I had to click and choose an option on him.
    Simba Code:
    Function TalkingToMages: Boolean;

    Var
       TPAA: T2DPointArray; // The Variables of the Functions
       TPA: TPointArray;
       CTS, I, Retry: Integer;
    Begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, YourColorHere, MSX1, MSY1, MSX2, MSY2, Tolerance); // Enter the Color and Tolerance Here at the Right place.
      ColorToleranceSpeed(CTS);
      TPAA := TPAToATPAEx(TPA, Width, Heigh); //Put the Width and Heigh here
      SortATPASize(TPAA, True);
      For I := 0 To High(TPAA) Do
        If GetArraylength(TPAA[i]) > 5 Then // Set How Much Points you need for your function to take Action
        Begin
        repeat
          inc(Retry);
          MiddleTPAEx(TPAA[i], X, Y);
          MMouse(X, Y, 3, 3);
           if (IsUpTextMultiCustom(['age', 'amorak'])) then // Enter The name of Your NPC or Monster
          Begin
            Result := True;
            GetMousePos(X, Y);
            mouse(x,y,3,3,false);
            wait(100 + random(200));
          ChooseOption('elep');
          wait(5000 + random(1000));
            Break;
          End;
          until (Retry = 15);
          Break;
          end;
          end;
    This may look scary for now, but it will become a lot easier after I explain to you step by step, (of) hat to do!

    Lets get started!
    Step 1 : Get Your Color!
    Since NPC's or Monsters move, you want to pick the color on his head; it will be a lot easier for your script to find out the NPC like that, because if you pick a color that is only visible on (the) chest (chest of the monster?) and your NPC cannot be found from the angle on the screen, then your function will return false as if there was no NPC.

    For this reason, I decided to pick goblins as an example for this script.

    As you see, the color of the head of this goblin is 5940087. For tolerance, it is pretty much testing what works best, I would always recommend starting with a tolerance of 7 and if you don't like the result, you can adjust it to your liking/which ever works for you. If you are wondering what happens when you reduce your tolerance, it will search for colors that are near to the one you picked. If you rise it, it will search for colors that are more likely the same as your color.

    With your color and tolerance, you have to to put them into the function. Here is a picture on where to put them :


    Step 2 : Get the Width and Height
    This is by far the most important part of this function. The end result will depend on how good you do it. So, let me explain how we get this. Did you always wonder how people were getting their distance in-game, since there is no option that tells us the exact distance between points? Well, there is a way to know how far each point is from each other and it is with picking the color. Before I explain how to do it, take a look at this picture I posted below:


    Why are we doing this? We want to make a box, so when our script does the function, our character will find dots of our color and if there is enough dot to make the same box as us, the function will return true and he will click in the middle of the box. Now, lets get into the topic; how to get these values. As you can see, we don't see my mouse on the screen, so I made a red dot to indicate where my mouse was!

    __________________________________________________ _____________

    What you want to do: First, get beside your NPC (like I did) then click on Pick Color on Simba. The screen will freeze and that's exactly what we want. What we want to do is get the dimension of the head. As your see, I moved my mouse to what would be my bottom right corner and I took note of the coordinates that were in the red box(638,624). After, I did the same, but on the opposite side, so I moved my mouse to what would be my top left corner and took note of the coordinates (635,771). So, now do you see the box I was talking about?

    The next step is to get the width and height. First, put the value of the same type together, so 638 with 635 and 624 with 771 = (638,635) and (624,771). If you are wondering why my second value is so high, it's because I took a picture and the coordinates from it (the picture), but I didn't place paint in the same arena as I took the coordinates with the first picture and it wasn't on the same place on my main screen, so I got coordinates that are wrong, but it won't happen if you do it on your playing screen. For this reason, we will change our 771 for 625. Now, it should be (638,635) and (624,625).

    Why do we need these values? If you do 638 - 635 = 3 and this is our width. 624 - 625 = -1, but we can't have a negative value, so we turn it into a positive (value) by which I mean 1 and this is our height. Wow! We are almost done! Enter the width and height to their respective place shown on the picture below and when you script, use this function; (It will search for array that will allow him to make a box like this on this picture.)



    Step 3 - Get the Up Text

    As you see on the picture, when you move your mouse over the Goblin, there is an Up Text. Never use the first letter, because it will make it longer for your bot to detect, if it is the right NPC. So here is what our Up Text would be : "oblin" that we would add on here on this picture below.


    So, Our Script Should look like this now
    Simba Code:
    Function TalkingToMages: Boolean;

    Var
       TPAA: T2DPointArray; // The Variables of the Functions
       TPA: TPointArray;
       CTS, I, Retry: Integer;
    Begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 5940048, MSX1, MSY1, MSX2, MSY2, 7); // Enter the Color and Tolerance Here at the Right place.
      ColorToleranceSpeed(CTS);
      TPAA := TPAToATPAEx(TPA, 3, 1); //Put the Width and Height here
      SortATPASize(TPAA, True);
      For I := 0 To High(TPAA) Do
        If GetArraylength(TPAA[i]) > 5 Then // Set how many points you need for your function to take Action
        Begin
        repeat
          inc(Retry);
          MiddleTPAEx(TPAA[i], x, y);
          MMouse(X, Y, 3, 3);
           if (IsUpTextMultiCustom(['oblin'])) then // Enter the name of your NPC or Monster
          Begin
            Result := True;
            GetMousePos(X, Y);
            mouse(x,y,3,3,false);
            wait(100 + random(200));
          ChooseOption('elep');
          wait(5000 + random(1000));
            Break;
          End;
          until (Retry = 15);
          Break;
          end;
          end;

    In this case, my function was click on a NPC that I had to talk and choose an option to teleport. Here, we want to attack a goblin so we are going to change the end of this function to attack instead of trying to find the option teleport on Goblin.

    Simba Code:
    Function TalkingToMages: Boolean;

    Var
       TPAA: T2DPointArray; // The Variables of the Functions
       TPA: TPointArray;
       CTS, I, Retry: Integer;
    Begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 5940048, MSX1, MSY1, MSX2, MSY2, 7); // Enter the Color and Tolerance here at the right place.
      ColorToleranceSpeed(CTS);
      TPAA := TPAToATPAEx(TPA, 3, 1); //Put the Width and Height here
      SortATPASize(TPAA, True);
      For I := 0 To High(TPAA) Do
        If GetArraylength(TPAA[i]) > 5 Then // Set how many Points you need for your function to take Action
        Begin
        repeat
          inc(Retry);
          MiddleTPAEx(TPAA[i], x, y);
          MMouse(X, Y, 3, 3);
           if (IsUpTextMultiCustom(['oblin'])) then // Enter the name of your NPC or Monster
          Begin
            Result := True;
            GetMousePos(X, Y);
            mouse(x,y,3,3,true);
          wait(5000 + random(1000));
        Writeln('We have found our Goblin, Yeh!');
            Break;
          End;
          until (Retry = 15);
          Break;
          end;
          end;

    Now, we are good. Also, I added what we call a FailSafe, so if the Script doesn't find the goblin after 15 attempts, it will end. That's where you can enter in your script a procedure to walk to a new place to try to find another NPC or change the angle of the compass. This method can also be used to find Object in the(use "a" instead?) World; so I hope I helped you out to make a better Script with the ability to find NPC's way easier without any more trouble.
    *I suppose some of the subjects/noun's could be left capitalized to illustrate your meaning in simba... However I edited to normal reading standards
    *This is only meant to help, I think your work is excellent, and this revision is only if you think it will help flow more effectively to the readers :>
    *Knowing me, I probably missed a couple things in here myself >.<

  7. #7
    Join Date
    Feb 2012
    Posts
    386
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Thanks Le Jingle, I did the modifications and it was appreciate :-).

    I hope it helped you out for your Script. There is also Another one that I know, but I dislike it, since it works like FindObj, but You can play with The speed of Your Mouse and it failed sometime to Detect the NPC when Your mouse is actually on him! It always turn to the point where I come back to This method :-)

  8. #8
    Join Date
    Aug 2006
    Location
    USA
    Posts
    354
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Good job man nice tutorial

  9. #9
    Join Date
    Feb 2012
    Posts
    46
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    say we have a ranging script, and your looking for an npc, how would go about detecting the npc, while staying in your safe spot?

  10. #10
    Join Date
    Oct 2010
    Posts
    1,255
    Mentioned
    0 Post(s)
    Quoted
    15 Post(s)

    Default

    Reading over the tut, it's a nice try, but there are some problems with the resulting procedure that are very wrong.

    In no way does it find moving NPCs because it only fills the TPA once. Then it will step through the ATPA over and over even after an NPC has moved.
    I'm back

  11. #11
    Join Date
    Feb 2012
    Posts
    386
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by smurg View Post
    Reading over the tut, it's a nice try, but there are some problems with the resulting procedure that are very wrong.

    In no way does it find moving NPCs because it only fills the TPA once. Then it will step through the ATPA over and over even after an NPC has moved.
    Yes, It will find the NPC on the First place, but if you are unlucky and He was moving when this function took place, It might Miss it! but after using the function, that why we always add a FailSafe to See if We did Click on the NPC on the first place.

    That's why I wrote a little text at the end to Notify people when it miss, You need to add Something to be sure it has clicked on the NPC.

    Now, we are good. Also, I added what we call a FailSafe, so if the Script doesn't find the goblin after 15 attempts, it will end. That's where you can enter in your script a procedure to walk to a new place to try to find another NPC or change the angle of the compass and try again.
    My Ectoworship use this Same method and it works amazingly Good compare to the other I have tried if You want to Take a loop at how I did to make the Function Try again if it does ever Fail! The hard part is to get the Right Color and The Right Dimension of the box

    Quote Originally Posted by cool13bro View Post
    say we have a ranging script, and your looking for an npc, how would go about detecting the npc, while staying in your safe spot?
    That's a good question. As I see this, I would do a Procedure To check if We are still in the same zone using DTM that can only by visible on the Safepot after using the function.

    Example :
    Simba Code:
    Procedure AttackGoblin;
    repeat
    AttackGoblins; // That is my function
    until (Animation = true); // This is my FailSafe, so the Function will be repeated until we are in combat!

    if FindDTMrotated(...SafePot) then // Look if we are in the Right spot
    begin
    Writeln('We Are Good');
    end else
    begin
    Writeln('We are in the wrong Place');
    If FindDTMRotated(...GetToSagePot)  then // Get to the Appropriate Spot
    begin
    Getmouse(x,y);
    Mouse(x,y,3,3,true);
    Flag(4);
    AttackGoblin;
    end;
    Last edited by Nemesis3X; 02-27-2012 at 11:10 PM.

  12. #12
    Join Date
    Oct 2010
    Posts
    1,255
    Mentioned
    0 Post(s)
    Quoted
    15 Post(s)

    Default

    Quote Originally Posted by Nemesis3X View Post
    Yes, It will find the NPC on the First place, but if you are unlucky and He was moving when this function took place, It might Miss it! but after using the function, that why we always add a FailSafe to See if We did Click on the NPC on the first place.
    Ya, but i'm saying that you are moving your mouse up to 15 times on a spot where a monster is not there anymore. That could take up multiple seconds after the monster has moved.
    I'm back

  13. #13
    Join Date
    Feb 2012
    Posts
    386
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by smurg View Post
    Ya, but i'm saying that you are moving your mouse up to 15 times on a spot where a monster is not there anymore. That could take up multiple seconds after the monster has moved.
    You're right. Didn't realize it, but this value is set to 2 in one case and 3 in the other one in my scripts. Thanks for the info, I will change it here too...

  14. #14
    Join Date
    Jan 2012
    Posts
    125
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thank you you this helped me figure out how to use the tzhaar bankers

  15. #15
    Join Date
    Feb 2012
    Posts
    386
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Mr Stoj View Post
    thank you you this helped me figure out how to use the tzhaar bankers
    Np, happy to know it helped you out :-). But I will update this guide in 1 or 2 weeks. I changed a few things in this function and it is working way better and it does it faster!

  16. #16
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Hi, this is a very hand tutorial but....

    It doesn't seem to be Retrying the procedure.

    After Inc(Retry) I added a Writeln so I would know if it was actually repeating the procedure, but its wan't :s


    P.S- I didn't change around the position of Inc(Retry)

  17. #17
    Join Date
    Feb 2012
    Posts
    386
    Mentioned
    2 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by abu_jwka View Post
    Hi, this is a very hand tutorial but....

    It doesn't seem to be Retrying the procedure.

    After Inc(Retry) I added a Writeln so I would know if it was actually repeating the procedure, but its wan't :s


    P.S- I didn't change around the position of Inc(Retry)
    mmm, Send me your function via pm and I will take a look and answer you back in 2-3 days as I am busy right now.

    If you want my guess, There is only one box on the Screen, so the function can't loop since there isn't any other box present on the screen to try a new one.
    Last edited by Nemesis3X; 03-27-2012 at 07:13 PM.

  18. #18
    Join Date
    Dec 2011
    Location
    Behind you...
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Nice tutorial, but is there a way where you can detect a moving npc AND then follow the npc with the mouse then click it Instead of detecting a NPC then clicking it straight away (missing alot because it doesnt know its moving).

  19. #19
    Join Date
    Feb 2011
    Location
    Vancouver Island
    Posts
    85
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you! finally, that much closer to finishing my animated armor script.
    great tut!

  20. #20
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    I get this problem?


    Simba Code:
    //---------------------Talking to npc---------------------------------------------\\
    Function TalkingToNpc: Boolean;

    Var
       TPAA: T2DPointArray; // The Variables of the Functions
       TPA: TPointArray;
       CTS, I, Retry: Integer;

    Begin



      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 5074312, MSX1, MSY1, MSX2, MSY2, 7); // Enter the Color and Tolerance Here at the Right place.
      ColorToleranceSpeed(CTS);
      TPAA := TPAToATPAEx(TPA, 3, 1); //Put the Width and Heigh here
      SortATPASize(TPAA, True);
      For I := 0 To High(TPAA) Do
        If GetArraylength(TPAA[i]) > 5 Then // Set How Much Points you need for your function to take Action
        Begin
        repeat
          inc(Retry);
          MiddleTPAEx(TPAA[i], x, y);// here is the problem :(
          MMouse(X, Y, 3, 3);
           if (IsUpTextMultiCustom(['ring'])) then // Enter The name of Your NPC or Monster
          Begin
            Result := True;
            GetMousePos(X, Y);
            mouse(x,y,3,3,false);
            wait(100 + random(200));
          ChooseOption('rade');   //choose option 'trade'
          wait(5000 + random(1000));
            Break;
          End;
          until (Retry = 15);
          Break;
          end;
          end;





    [Error] (50:28): Unknown identifier 'x' at line 49
    Compiling failed.



    Line 49 is
    Simba Code:
    MiddleTPAEx(TPAA[i], x, y);
    Last edited by randy marsh; 04-28-2013 at 05:58 PM.
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  21. #21
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Do you have x and y defined anywhere in your script?
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  22. #22
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    cheeky bump this is holding me up
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  23. #23
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by randy marsh View Post
    cheeky bump this is holding me up
    Do what Element17 said U didn't define your x and y

    Creds to DannyRS for this wonderful sig!

  24. #24
    Join Date
    Jun 2007
    Location
    south park
    Posts
    1,160
    Mentioned
    0 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by Sjoe View Post
    Do what Element17 said U didn't define your x and y

    Simba Code:
    As in put x, y, in variables?



    //---------------------Talking to npc---------------------------------------------\\
    Function TalkingToNpc: Boolean;

    Var
       TPAA: T2DPointArray; // The Variables of the Functions
       TPA: TPointArray;
       CTS, I, Retry: Integer;
        x, y,// here?

    Begin
    http://www.youtube.com/user/YoHoJoSRL
    Good scripting guides on youtube
    Formerly known as (djcheater)

  25. #25
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by randy marsh View Post
    As in put x, y, in variables?


    Simba Code:
    //---------------------Talking to npc---------------------------------------------\\
    Function TalkingToNpc: Boolean;

    Var
    TPAA: T2DPointArray; // The Variables of the Functions
    TPA: TPointArray;
    CTS, I, Retry: Integer;
    x, y,// here?
    Begin
    yeah as integer;

    Creds to DannyRS for this wonderful sig!

Page 1 of 2 12 LastLast

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
  •