Log in

View Full Version : Movepc() - wrong coords?


Rhodan
10-29-2006, 02:46 AM
I'm setting up the translocator from Buther docks to east freeport and having troubles.

I went to freporte and stood on the dock in front of the translocator there to get a /loc. I put that into my movepc() call (aiming slightly higher on the Z). When I use the script, I end up in east freeport but out near the zoneline for the desert instead of on the dock.

I tried the coords for a couple other places and always ended up by the desert.

The command I'm using is quest::movepc(10,11,-860,-50); (this one should put you at the start of the dock, slightly in the air).

Any idea what I'm doing wrong?

paaco
10-29-2006, 03:49 AM
Heres a copy of a translocator quest file from my server. Format your quest exactly like mine, changing the Zoneid and locs of course and it should work. Also your post should have gone into the quests section of the forums :)

sub EVENT_SAY{
if ($text=~/Hail/i){
quest::say("Hello $name . I can send you back to [Vex Thal], if that is what you wish?");
}
if($text=~/Vex Thal/i)
{
quest::say("As You Wish");
quest::movepc(158, -1657.25, 149.48, -41.62);
}
}

Rhodan
10-29-2006, 03:56 AM
Heres a copy of a translocator quest file from my server. Format your quest exactly like mine, changing the Zoneid and locs of course and it should work. Also your post should have gone into the quests section of the forums :)

sub EVENT_SAY{
if ($text=~/Hail/i){
quest::say("Hello $name . I can send you back to [Vex Thal], if that is what you wish?");
}
if($text=~/Vex Thal/i)
{
quest::say("As You Wish");
quest::movepc(158, -1657.25, 149.48, -41.62);
}
}


Actually, thats pretty much the same as what I have. Actually, I don't have spaces after the commas in the coordinates... Shouldn't make a difference but I'll try that when I get home from work.

Quests section huh? Lol, when I think Quests, I think of questing itself - which a translocator script does not usually bring to mind. I guess if I just pretend I see "scripting" where it says "questing" I won't go off on an obsessive compulsive fit :D

paaco
10-29-2006, 03:58 AM
Good luck, if you get home and still can't get it to work, let me know and I'll try to help you work it out.

Rhodan
10-29-2006, 06:18 AM
Lunchtime!

I had a thought. I didn't use floating point numbers. I wonder if there is a casting issue and the integers get converted wrong - making the engine choose a default location instead of the specified one.

Lol, I hate having to work when I want to be home digging through databases and code :x

rojadruid
10-29-2006, 06:28 AM
try using a #loc and see what happens

John Adams
10-29-2006, 06:29 AM
You do know the /loc in game is not the same as #goto x y z, right? For some reason, the /loc x and y are reversed. So if you /loc and you are at 10, 20, 30, you would #goto 20 10 30.

Kind of annoying. But I think #loc targetting yourself gives better results?

And this may not be your problem at all, since the TL to Tim Deep is WAYYY off, and nothing I did ported me to the islands... I always ended up way out by the sunken ruins and had to swim for it.