Page 3 of 3
Re: Rock5's version of teleport
Posted: Fri Dec 23, 2011 10:23 pm
by lisa
With the issue of not being able to use skills in the treasure event, I would just disable all skills in the onload for the WP and see how that goes.
I wouldn't add it to the skills check for bot when it is literally just that 1 zone you can't use normal skills.
Re: Rock5's version of teleport
Posted: Fri Dec 23, 2011 10:29 pm
by rock5
Some NPCs have trouble with "ChoiceOption" for some reason, such as the housekeeper inside your residence. In such cases you can use
Code: Select all
SpeakFrame_ListDialogOption(__, option)
So for instance to leave the house you would use
Code: Select all
RoMScript("SpeakFrame_ListDialogOption(__, 1)")
The first argument litterally isn't used at all. I don't know why they included it. I used "__" instead of a number or something because I think it makes it clearer, but you can make it any value, even nil.
I don't know if this is your problem but try it and see.
Re: Rock5's version of teleport
Posted: Fri Dec 23, 2011 11:59 pm
by kanta
@Lisa
I've never seen the code for disabling all skills. Could you post it?
@Rock
I'll give that a try tomorrow.
Here's the elemental candle check and teleport code. Let me know if you can see the problem. So far each thing that I've tried to stop it from the odd behavior hasn't worked. At first I thought it was "hopping" around. Last time I noticed it was actually trying to teleport to a previous waypoint/coordinates. Besides the unintentional movement, it does what I intended. Finds the candle, teleports closer to it, lights it and then returns to the previous coordinates.
Code: Select all
function getecandle()
local lastpllocx = 0
local lastpllocz = 0
local lastpllocy = 0
player:update()
local cecandle = player:findNearestNameOrId("Elemental Candlestick")
local lastpllocx = player.X
local lastpllocz = player.Z
local lastpllocy = player.Y
if cecandle then
-- goto ecandle
teleport_SetStepSize(40)
teleport(cecandle.X, cecandle.Z) -- teleport to above ecandle
teleport(cecandle.X + 1, cecandle.Z, cecandle.Y +15) -- teleport in range to click ecandle
-- click ecandle
player:target(cecandle)
yrest(100)
player:target_Object("Elemental Candlestick", nil, nil, true);
yrest(1000)
player:update()
teleport(lastpllocx,lastpllocz,lastpllocy)
end
end
Re: Rock5's version of teleport
Posted: Sat Dec 24, 2011 1:06 am
by rock5
You might want to teleport back up before teleporting to last know pos because it will go in a straight line and possibly the intermedient teleports might be too low.
Re: Rock5's version of teleport
Posted: Sat Dec 24, 2011 1:41 am
by kanta
The odd movements happen before it even teleports down to the candle coordinates. It does them even if it doesn't detect a candle, just whenever I call the function.
Re: Rock5's version of teleport
Posted: Tue Dec 27, 2011 6:07 am
by Rickster
kanta wrote:I've never seen the code for disabling all skills. Could you post it?
I think you can disable all skills as mentioned in
this post
rock5 wrote:1.
Code: Select all
for k,v in pairs(settings.profile.skills) do
v.AutoUse = true
end
2.
Code: Select all
changeProfileSkill(skillname, "AutoUse", true)
3.
Code: Select all
changeProfileSkill(skillname, "priority", 100)
Other thing ... maybe it is better to post ideas belonging to an Ancient Treasure waypointfile in e new thread in the corresponding waypoint section of the forum, because its more clear then and it might be a little off topic here, although it implements some parts of the teleport userfunction.
Re: Rock5's version of teleport
Posted: Wed Dec 28, 2011 12:10 pm
by kanta
Rickster wrote:Other thing ... maybe it is better to post ideas belonging to an Ancient Treasure waypointfile in e new thread in the corresponding waypoint section of the forum
Ya, I had already done this back on the 23rd of December.... I think you'll notice I actually started the new AT thread? Best to check post dates sometimes.
Re: Rock5's version of teleport
Posted: Thu Dec 29, 2011 11:32 am
by Rickster
cool, i will have a look at it. i did not do so yet

Re: Rock5's version of teleport
Posted: Tue Jan 24, 2012 6:18 am
by MustHave
rock5 is there still the
maximum distance you can teleport
of 120?
Or is there a possibility to port to a point exactly like I would use a port stone?
Re: Rock5's version of teleport
Posted: Tue Jan 24, 2012 8:10 am
by rock5
Teleport makes use of the fact that the server might not know exactly where you are because of lag in communication. So when your client says it's 120 away from where the server thinks you are (because of the hack) then it gives you the benefit of the doubt and allows it. If it's more than 120 it doesn't. The server wont allow teleport over large distances because it knows there is no way you could have traveled that distance normally.
So the answer is no.
Re: Rock5's version of teleport
Posted: Tue Jan 24, 2012 9:36 am
by MustHave
Thnx a lot rock not only for given a simple answer but also giving me a good explanation of the mechanic behind that!
I wish I could make a apprenticeship having you as a instructor.

I'm well interested (not only for selfish season) to learn HOW things work. You, lisa and all of the others doing great stuff with your knowledge.

Re: Rock5's version of teleport
Posted: Fri Sep 13, 2013 1:02 pm
by Lamkefyned
Error .....
waypoint
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="5157" z="-2549" y="115"> teleportToWP(2) </waypoint>
<!-- # 2 --><waypoint x="4501" z="-2422" y="103"> </waypoint>
Re: Rock5's version of teleport
Posted: Fri Sep 13, 2013 1:46 pm
by rock5
Is that your whole waypoint file? Because it should end with
Re: Rock5's version of teleport
Posted: Sun Sep 15, 2013 7:17 pm
by Lamkefyned
Thank you