SRL Archive - SRL Bugs

Home Teleport changed


Harry

2012-03-13 13:55:10

Today's update changed home teleport button. Now an interface opens, and you can click on a number of different locations to teleport there without using runes. http://runescape.wikia.com/wiki/Lodestone_Network

Perhaps SRL could be updated to use this? At the moment, the magic.simba cast for home teleport won't work. And IMO this teleport method should be added to MapWalk core, as it's very useful for scripts. (I put this in bugs section since casting home teleport won't work with magic.simba, might make some problems for MSI's autorelocation thing).

begginer

2012-03-13 14:05:38

Yeah, saw the new update. It can be click on home teleport and then a coordinate to Lumby

Harry

2012-03-13 14:24:57

From: begginer
Yeah, saw the new update. It can be click on home teleport and then a coordinate to Lumby

Ideally, have it return a boolean for if the location is unlocked or not if trying to click it. HomeTeleport('edgeville') -> if it's not unlocked it will result false and if it is unlocked then true.

Silent

2012-03-13 14:36:18

From: Harry
Ideally, have it return a boolean for if the location is unlocked or not if trying to click it. HomeTeleport('edgeville') -> if it's not unlocked it will result false and if it is unlocked then true.


I'm assuming this still has the 30 minute cool down timer? If that's the case it could return false if it had teleported too recently as well.

x[Warrior]x3500

2012-03-13 14:46:57

good bye teletab profits?

Edit: even law rune prices :/

'Toxin

2012-03-13 14:47:32

From: x[Warrior]x3500
good bye teletab profits?


Ermmm… I don't think so… There's a cool-down time is there not?

x[Warrior]x3500

2012-03-13 14:51:10

[QUOTE='Toxin;959476]Ermmm… I don't think so… There's a cool-down time is there not?

i just tested it out, no cool down time.

Nemesis3X

2012-03-13 14:59:28

From: x[Warrior]x3500
i just tested it out, no cool down time.


wow… Jagex is making this game easier each day…

Harry

2012-03-13 15:02:38

From: Silent SPY
I'm assuming this still has the 30 minute cool down timer? If that's the case it could return false if it had teleported too recently as well.

There has been no cooldown on home teleport for almost a year now.

Kyle Undefined

2012-03-13 15:10:20

This is all I can do at the moment, it works and doesn't throw any false positives (From the major areas that I tested).


function isTeleportScreen() : Boolean;
begin
Result := CountColor(12378347, MSX1, MSY1, MSX2, MSY2) > 400;
end;

I know it's not much, but at least it's a start :p

Coh3n

2012-03-13 15:12:22

Support should definitely be added to magic.simba (and the old Home teleport removed). Not really related, but what's the point of regular teleporting now? Lol.

Kyle Undefined

2012-03-13 15:15:56

I agree, since this way of teleporting is not related to the other ways :p I don't know really, I guess the regular was is just faster and gives you experience.

Harry

2012-03-13 15:26:21

A normal teleport is a bit closer to the destination, and is faster/combatbased.

It should be added to mapwalk or some other part of core too I think, maybe? It's really useful and not magic based.

Coh3n

2012-03-13 15:50:34

From: Harry
A normal teleport is a bit closer to the destination, and is faster/combatbased.

It should be added to mapwalk or some other part of core too I think, maybe? It's really useful and not magic based.
Depending on how much code it takes, I wouldn't be upset if it was it's own file.

Harry

2012-03-13 15:55:29

It shouldn't be too big, just one or two functions. Just should be somewhere in core so everyone can use it without including magic.simba

Coh3n

2012-03-13 15:55:51

Fine with me. Someone else has to do it though. I have too many other things to do right now.

x[Warrior]x3500

2012-03-13 16:15:57

try this:


program new;
{$DEFINE SMART}
{$I SRL/SRL.simba}
{$I SRL/SRL/Skill/magic.simba}

function homeTeleport(loc:String):boolean;
var
locBox: TBox;
x, y, DTM, failSafeTime: integer;
arP: TPointArray;
begin
result:=false;
DTM := DTMFromString('mggAAAHicY2NgYDBgZmAwAWJdINaB0iCx50C5R1D8DIjfAvEHIFZWVmC49+gJCjbT12GQAMqxY8EsQMyEBUMAAI1dEnE=');
case loc of
'Bandit Camp': locBox:=inttoBox(315, 287, 335, 301);
'Al Kharid': locBox:=inttoBox(353, 215, 371, 238);
'Varrock': locBox:=inttoBox(339, 170, 353, 189);
'Lumbridge': locBox:=inttoBox(319, 233, 335, 248);
'Draynor Village': locBox:=inttoBox(300, 201, 316, 217);
'Edgeville': locBox:=inttoBox(284, 146, 299, 170);
'Port Sarim': locBox:=inttoBox(266, 236, 284, 260);
'Falador': locBox:=inttoBox(269, 193, 285, 212);
'Taverley': locBox:=inttoBox(242, 167, 261, 188);
'Burthorpe': locBox:=inttoBox(244, 133, 259, 157);
'Catherby': locBox:=inttoBox(214, 170, 231, 189);
'Seers Village': locBox:=inttoBox(182, 149, 199, 168);
'Ardougne': locBox:=inttoBox(158, 200, 177, 220);
'Yanille': locBox:=inttoBox(150, 250, 169, 273);
'Lunar Isle': locBox:=inttoBox(35, 68, 55, 86);
end;
cast('lumbridge home teleport',false);
markTime(failSafeTime);
repeat
wait(50+random(100));
until(CountColor(12378347, MSX1, MSY1, MSX2, MSY2) > 400) or (timeFromMark(failSafeTime)>10000);
wait(600+random(400));
if(CountColor(12378347, MSX1, MSY1, MSX2, MSY2) > 400)then
begin
if(not(finddtm(dtm, x, y,locBox.x1, locBox.y1, locBox.x2, locBox.y2))) then
begin
mouse((locBox.x2+locBox.x1)/2,(locBox.y2+locBox.y1)/2,3,3,true);
result:=true;
end else
mousebox(495,31,501,37,mouse_Left);
freeDtm(dtm);
end;
end;

begin
Smart_Server := 87;
setupsrl;
homeTeleport('Yanille');

end.



Coh3n

2012-03-13 16:20:29

^ If the click boxes are setup like a grid, try using GridBox or Grid. Much cleaner.

Kyle Undefined

2012-03-13 16:20:44

That doesn't check if it's unlocked or not, does it? What's the DTM of?

x[Warrior]x3500

2012-03-13 16:23:15

dtm is of the upper part of the lock icon. if it finds it, which in my testing it does (please test), it will not let you continue on and close out of the teleport screen (result:=false). and the boxes are just boxes around the icons themselves, i didnt really use any grid.

edit: the icons are statically placed (x,y) so static boxes should be fine.
edit2: and honestly, i dont see how a grid could be of much help here. the icons are all over the place, and if i were to use a grid, i would have to use multiple boxes within the grid instead of just using the true x1,x2,y1,y2 chords of the icons.

Coh3n

2012-03-13 16:56:02

From: x[Warrior]x3500
dtm is of the upper part of the lock icon. if it finds it, which in my testing it does (please test), it will not let you continue on and close out of the teleport screen (result:=false). and the boxes are just boxes around the icons themselves, i didnt really use any grid.

edit: the icons are statically placed (x,y) so static boxes should be fine.
edit2: and honestly, i dont see how a grid could be of much help here. the icons are all over the place, and if i were to use a grid, i would have to use multiple boxes within the grid instead of just using the true x1,x2,y1,y2 chords of the icons.
Grid and GridBox just creates a grid X rows by Y columns of boxes width and height starting at a certain point. You don't have to use it, but it would be cleaner. It's just good for static boxes rather than having a case with a bunch of TBoxes.

x[Warrior]x3500

2012-03-13 17:05:05

From: Coh3n
Grid and GridBox just creates a grid X rows by Y columns of boxes width and height starting at a certain point. You don't have to use it, but it would be cleaner. It's just good for static boxes rather than having a case with a bunch of TBoxes.


ahh that makes more sense ;) as u can probably tell i have never used them :P.

Coh3n

2012-03-13 19:55:12

From: x[Warrior]x3500
ahh that makes more sense ;) as u can probably tell i have never used them :P.
I added them to SRL when I released the new random solvers, so they're fairly new.

Silentcore

2012-03-13 20:36:03

Are they doing something like on the private servers where you can teleport to any place of Glelinor without the need of having the magic or runes to cast the teleport? Which makes me think, They might have done this for people that forget teleport method or for those who are skillers and want to keep it that way.

VillaVuFTW

2012-03-13 23:25:25

Or just make a DTM ;3

weeps

2012-03-14 02:50:02

Good idea.

Coh3n

2012-03-25 03:37:02

LodestoneTeleport(Where: string); has been added to the latest version.

http://villavu.com/forum/showthread.php?t=78301