Results 1 to 15 of 15

Thread: Teleporting Help.

  1. #1
    Join Date
    Jan 2012
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default Teleporting Help.

    Is there a simple way to make the script teleport using the "Home Teleport" option and then selecting a location?
    If not how would I make it select the magic tab and click the home teleport spell?
    Thanks in advance!
    -Ilya

  2. #2
    Join Date
    May 2008
    Location
    ;)
    Posts
    573
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    (*
    LodestoneTeleport
    ~~~~~~~~~~~~~~~~~

    .. code-block:: pascal

        function LodestoneTeleport(Where: String): Boolean;

    Teleports you to chosen location via Lodestone teleport.

    .. note::

        Author: Home

    Example:

    .. code-block:: pascal

        If CastHomeTeleport then
          Lodestoneteleport('Lumbridge');
    *)

    function LodestoneTeleport(Where: String): Boolean;

    it's in mapwalk.simba

    and here's a list of possible locations:

    Simba Code:
    ['Lunar Isle', 'Yanille', 'Ardougne', 'Seers Village', 'Catherby', 'Taverley',
              'Burthorpe', 'Edgeville', 'Falador', 'Port Sarim', 'Draynor Village', 'Lumbridge',
              'Varrock', 'Al Kharid', 'Bandit Camp'];

  3. #3
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,329
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Look at the Magic.Simba file, include it in your script, you'll need to "Cast" the spell then wait for the "LodestoneScreen" then cast the "LodestoneTeleport", I can't be clearer than that without just making the function for you


    Quote Originally Posted by nickrules View Post
    Simba Code:
    (*
    LodestoneTeleport
    ~~~~~~~~~~~~~~~~~

    .. code-block:: pascal

        function LodestoneTeleport(Where: String): Boolean;

    Teleports you to chosen location via Lodestone teleport.

    .. note::

        Author: Home

    Example:

    .. code-block:: pascal

        If CastHomeTeleport then
          Lodestoneteleport('Lumbridge');
    *)

    function LodestoneTeleport(Where: String): Boolean;

    it's in mapwalk.simba

    and here's a list of possible locations:

    Simba Code:
    ['Lunar Isle', 'Yanille', 'Ardougne', 'Seers Village', 'Catherby', 'Taverley',
              'Burthorpe', 'Edgeville', 'Falador', 'Port Sarim', 'Draynor Village', 'Lumbridge',
              'Varrock', 'Al Kharid', 'Bandit Camp'];
    Just be aware this function doesn't cast the spell, it just clicks on the symbol on the lodestone screen
    Last edited by putonajonny; 04-30-2012 at 09:18 PM.

  4. #4
    Join Date
    Jan 2012
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    I got this far:


    function TeleEdge(Where: String): Boolean;
    var
    TPA: TPointArray;
    TSA: TStringArray;
    Box: TBox;
    CTS, I: Integer;
    begin
    If not LoggedIn then Exit;
    If not LodestoneScreen then Exit;

    CTS := GetColorToleranceSpeed;
    ColorToleranceSpeed(1);

    TSA := ['Lunar Isle', 'Yanille', 'Ardougne', 'Seers Village', 'Catherby', 'Taverley',
    'Burthorpe', 'Edgeville', 'Falador', 'Port Sarim', 'Draynor Village', 'Lumbridge',
    'Varrock', 'Al Kharid', 'Bandit Camp'];

    TPA := [Point(45, 78), Point(160, 262), Point(167, 211), Point(192, 158), Point(223, 181),
    Point(253, 180), Point(251, 145), Point(293, 160), Point(278, 206), Point(276, 249), Point(308, 211),
    Point(327, 243), Point(345, 182), Point(362, 229), Point(326, 297)];

    for I := 0 to 14 do
    if Capitalize(Where) = TSA[I] then
    begin
    MMouse(TPA[I].X, TPA[I].Y, 2, 2);

    if (WaitUptextMulti(['Teleport', 'ele', 'ort'], 400)) then
    begin
    ClickMouse2(Mouse_Left);
    Result := true;
    end;
    end;

    ColorToleranceSpeed(CTS);
    end;


    How do I make it tele to edge?
    if i am having it tele to edge and back to varrock do i need to put the function in there twice, or just once and make it tele differently in the mainloop?
    Thanks again, I know i'm a n00b.

  5. #5
    Join Date
    May 2008
    Location
    ;)
    Posts
    573
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Ilya View Post
    I got this far:


    function TeleEdge(Where: String): Boolean;
    var
    TPA: TPointArray;
    TSA: TStringArray;
    Box: TBox;
    CTS, I: Integer;
    begin
    If not LoggedIn then Exit;
    If not LodestoneScreen then Exit;

    CTS := GetColorToleranceSpeed;
    ColorToleranceSpeed(1);

    TSA := ['Lunar Isle', 'Yanille', 'Ardougne', 'Seers Village', 'Catherby', 'Taverley',
    'Burthorpe', 'Edgeville', 'Falador', 'Port Sarim', 'Draynor Village', 'Lumbridge',
    'Varrock', 'Al Kharid', 'Bandit Camp'];

    TPA := [Point(45, 78), Point(160, 262), Point(167, 211), Point(192, 158), Point(223, 181),
    Point(253, 180), Point(251, 145), Point(293, 160), Point(278, 206), Point(276, 249), Point(308, 211),
    Point(327, 243), Point(345, 182), Point(362, 229), Point(326, 297)];

    for I := 0 to 14 do
    if Capitalize(Where) = TSA[I] then
    begin
    MMouse(TPA[I].X, TPA[I].Y, 2, 2);

    if (WaitUptextMulti(['Teleport', 'ele', 'ort'], 400)) then
    begin
    ClickMouse2(Mouse_Left);
    Result := true;
    end;
    end;

    ColorToleranceSpeed(CTS);
    end;


    How do I make it tele to edge?
    if i am having it tele to edge and back to varrock do i need to put the function in there twice, or just once and make it tele differently in the mainloop?
    Thanks again, I know i'm a n00b.
    Oh dear, i think I've mislead you

    To teleport to edgeville:

    Simba Code:
    If CastHomeTeleport then
          Lodestoneteleport('Edgeville');


    That's it. That's all you have to do. The function is in SRL, so you don't need to copy/paste it in to your script or anything. All you have to do is call the function in the script, like I did right there.

  6. #6
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,329
    Mentioned
    1 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by nickrules View Post
    Oh dear, i think I've mislead you

    To teleport to edgeville:

    Simba Code:
    If CastHomeTeleport then
          Lodestoneteleport('Edgeville');


    That's it. That's all you have to do. The function is in SRL, so you don't need to copy/paste it in to your script or anything. All you have to do is call the function in the script, like I did right there.
    I don't think CastHomeTeleport is a real procedure... he has to make that one

  7. #7
    Join Date
    Jan 2012
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    I'm lost.
    I'll look at it tomorrow.
    Head doesn't work.

  8. #8
    Join Date
    May 2008
    Location
    ;)
    Posts
    573
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by putonajonny View Post
    I don't think CastHomeTeleport is a real procedure... he has to make that one
    Oh. I just copy and pasted the example, lol.

    @OP when you revisit this tomorrow, remember that the Lodestoneteleport function is in SRL already. Just like Mouse() is already in SRL.

    Notice how you don't need to copy and paste all the code for the Mouse procedure. This is because it's included in the code. Same thing for Lodestoneteleport.

  9. #9
    Join Date
    Jan 2012
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    so how would i include it in my script?
    can i simply have
    Lodestoneteleport('Edgeville');
    in my main loop to make it tele edge?

  10. #10
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,523
    Mentioned
    38 Post(s)
    Quoted
    207 Post(s)

    Default

    Quote Originally Posted by Ilya View Post
    so how would i include it in my script?
    can i simply have
    Lodestoneteleport('Edgeville');
    in my main loop to make it tele edge?
    It does only select the desired lodestone, it doesn't click home teleport.

    This is a simple example of an own made procedure that casts home teleports, and click on the edgeville lodestone.

    Simba Code:
    procedure NavigateToShop;
    var
      X, Y: integer;

    begin;
      if GetCurrentTab = (tab_Magic) then
        begin
          WriteLn('Current tab is the magic tab, correct!')
        end else
          begin
            FTab(tab_Magic);
            WriteLn('Changed tab to the magic tab')
          end;
      MouseBox(562, 217, 585, 240, 1); //HOME TELEPORT
      Wait(500 + Random(500));
      MouseBox(272, 136, 311, 175, 1); //EDGEVILLE LODESTONE
      Wait(16500 + Random(500));
    end;

    The teleporting time is around 16.5 seconds = 16500 ms
    You just need to edit the Mousebox of the edgeville lodestone to your own lodestone. Unless you want to teleport to edgeville, ofcourse.

    Use the color picker to get the top left co-ordinate of the box, and then use it again to get the bottom right co-ordinate of the box.

    Example: Top/left = 50, 10
    Bottom/right = 75, 25

    Mousebox would be (50, 10, 75, 25) and the last part is what the mouse should do, in this case its a left click which is 1

    So it would look like this:
    Simba Code:
    Mousebox(50, 10, 75, 25, 1);

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

    Default

    Scripting powerlevel = [||||||||]

  12. #12
    Join Date
    May 2008
    Location
    ;)
    Posts
    573
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Ilya View Post
    can i simply have
    Lodestoneteleport('Edgeville');
    in my main loop to make it tele edge?
    Yes, because it is a part of SRL, just like Mouse(). You don't need anything else.

  13. #13
    Join Date
    Jan 2012
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by nickrules View Post
    Yes, because it is a part of SRL, just like Mouse(). You don't need anything else.
    Tried it, didn't work.
    Trying what was stated by JJ.
    Will get back.



    Alright check this out.

    begin
    FTab(tab_Magic);
    WriteLn('Changed tab to the magic tab')
    end;
    MouseBox(562, 217, 585, 240, 1); //HOME TELEPORT
    Wait(5000 + Random(500)); <-----------this works but i feel it's unreliable
    MouseBox(272, 136, 311, 175, 1); //EDGEVILLE LODESTONE
    Wait(16500 + Random(500));
    end;





    begin
    FTab(tab_Magic);
    WriteLn('Changed tab to the magic tab')
    end;
    MouseBox(562, 217, 585, 240, 1); //HOME TELEPORT
    Wait(5000 + Random(500));
    Lodestoneteleport('Edgeville');<------------------------this selects edgeville, but doesn't click it??
    //MouseBox(272, 136, 311, 175, 1); //EDGEVILLE LODESTONE
    //Wait(16500 + Random(500));
    end;

    so now my question is how do i make the mouse click in it's current position?
    Last edited by Ilya; 05-01-2012 at 05:12 PM.

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

    Default

    Quote Originally Posted by J J View Post
    It does only select the desired lodestone, it doesn't click home teleport.

    This is a simple example of an own made procedure that casts home teleports, and click on the edgeville lodestone.

    Simba Code:
    procedure NavigateToShop;
    var
      X, Y: integer;

    begin;
      if GetCurrentTab = (tab_Magic) then
        begin
          WriteLn('Current tab is the magic tab, correct!')
        end else
          begin
            FTab(tab_Magic);
            WriteLn('Changed tab to the magic tab')
          end;
      MouseBox(562, 217, 585, 240, 1); //HOME TELEPORT
      Wait(500 + Random(500));
      MouseBox(272, 136, 311, 175, 1); //EDGEVILLE LODESTONE
      Wait(16500 + Random(500));
    end;

    The teleporting time is around 16.5 seconds = 16500 ms
    You just need to edit the Mousebox of the edgeville lodestone to your own lodestone. Unless you want to teleport to edgeville, ofcourse.

    Use the color picker to get the top left co-ordinate of the box, and then use it again to get the bottom right co-ordinate of the box.

    Example: Top/left = 50, 10
    Bottom/right = 75, 25

    Mousebox would be (50, 10, 75, 25) and the last part is what the mouse should do, in this case its a left click which is 1

    So it would look like this:
    Simba Code:
    Mousebox(50, 10, 75, 25, 1);


    Working great!! Thanks for your help.
    Next question I have: how would I use minimap icons to walk?

  15. #15
    Join Date
    Jan 2012
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    Thanks Everyone for your help.
    I got it working flawlessly.
    Thread can be closed.

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
  •