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
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
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'];
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
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.
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.
I'm lost.
I'll look at it tomorrow.
Head doesn't work.
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.
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);
Check out this thread : http://villavu.com/forum/showthread.php?t=80329
Scripting powerlevel = [||||||||]
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.
Thanks Everyone for your help.
I got it working flawlessly.
Thread can be closed.
There are currently 1 users browsing this thread. (0 members and 1 guests)