Teleport to others Maps/Realm

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 096.
Note: Core 096 is no longer officially supported.

Moderator: POL Developer

Post Reply
westrupp
Adept Poster
Posts: 89
Joined: Wed Aug 01, 2007 3:07 am
Location: Brazil
Contact:

Teleport to others Maps/Realm

Post by westrupp »

Ok, I converted all five maps and can start my pol without errors, maked a little gate script to throw player to other realm but dont work....

Code: Select all

use os;
use uo;
program tokunogate (who)

MoveObjectToLocation( who, 5757, 3409, 0, REALM_TOKUNO, MOVEOBJECT_FORCELOCATION );
SendSysMessage( who, "Welcome to Tokuno Island!");

endprogram
I try edit data files to player start in Tokuno Island but still dont work....players always start in britannia realm.

Thanks for any help and hint...
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Post by CWO »

Because Tokuno is only 1440x1440 and you're moving them to a location that is way out of that range.

The best way to evaluate a problem like this is to do this with your script...

Code: Select all

use os;
use uo;

program tokunogate (who)
var move := MoveObjectToLocation( who, 5757, 3409, 0, REALM_TOKUNO, MOVEOBJECT_FORCELOCATION );
if (!move)
     SendSysMessage(who, move.errortext);
     return;
endif
SendSysMessage( who, "Welcome to Tokuno Island!");
endprogram
Last edited by CWO on Wed Jul 30, 2008 4:43 pm, edited 1 time in total.
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

Those locations are out of range for map4.

Try
MoveObjectToLocation(who, 730, 1160, 0, REALM_TOKUNO, MOVEOBJECT_FORCELOCATION);
westrupp
Adept Poster
Posts: 89
Joined: Wed Aug 01, 2007 3:07 am
Location: Brazil
Contact:

Post by westrupp »

Thanks, now gate work but throw player to near Yew Cemitery in britannia realm... :(

When player teleport with gate he drop, like walking up and down montains...but see Yew Cemitery, argh

I using UO Mondain Legacy with all updates and converted maps with uoconvert.exe how say in uoconvert.txt
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Post by CWO »

check the who.realm prop. If it says Tokuno, its a client side problem. If its still Britannia, try reconverting the maps again with uoconvert. It happens rarely but sometimes it does some weird stuff and doesn't convert correctly.
westrupp
Adept Poster
Posts: 89
Joined: Wed Aug 01, 2007 3:07 am
Location: Brazil
Contact:

Post by westrupp »

Thanks CWO, its client problems I solved... :grin:
Now i have a little problem, i created gate scripts to malas, ilshenar and tokuno, i created gate in britannia realm to tokuno and it work fine but i cant create gate in tokuno island, say gate created but he dont appear... :sad:

the gate script are same of tokuno...

Thanks for all help, :)
westrupp
Adept Poster
Posts: 89
Joined: Wed Aug 01, 2007 3:07 am
Location: Brazil
Contact:

Post by westrupp »

more or less solved...

i cant create items in old map becouse scripts create items in ground like this:
item := CreateItemAtLocation( who.x, who.y, who.z, objtype, 1 );

I changed to create new itens in my backpack like this:
item := CreateIteminContainer (who.backpack, objtype, 1);

now I create in my backback the gates to new maps and manually put in ground and set unmovable...

now working...

Thanks again...
BELL
Journeyman Poster
Posts: 68
Joined: Tue Apr 22, 2008 6:09 am

Re: Teleport to others Maps/Realm

Post by BELL »

im use

Code: Select all

   if (GetObjProperty(who, "realm") <> "britannia")
     MoveObjectToRealm(me, GetObjProperty(who, "realm"), who.x, who.y, who.z, MOVECHAR_FORCELOCATION);
   else
     MoveCharacterToLocation(me, who.x, who.y, who.z, MOVECHAR_FORCELOCATION);
   endif
and Logon.src -->

Code: Select all

  if (!GetObjProperty(who, "realm"))
	SetObjProperty(who, "realm", _DEFAULT_REALM);
  endif
and all realm teleport im SetObjProperty(who,"realm", realm_name)
User avatar
*Edwards
Forum Regular
Posts: 303
Joined: Fri Dec 28, 2007 11:19 pm
Location: Montreal, Canada

Re: Teleport to others Maps/Realm

Post by *Edwards »

You gotta define where you would like to create the items with your CreateItemAtLocation function. Look in scripts/modules/uo.em. There is a parameter missing when you call the create function. Default is Britannia this is why it's created in your Britannia realm.
BELL
Journeyman Poster
Posts: 68
Joined: Tue Apr 22, 2008 6:09 am

Re:

Post by BELL »

westrupp wrote:more or less solved...

i cant create items in old map becouse scripts create items in ground like this:
item := CreateItemAtLocation( who.x, who.y, who.z, objtype, 1 );
http://docs.polserver.com/pol096/single ... e=uoem.xml
CreateItemAtLocation( x, y, z, objtype, amount := 1, realm := _DEFAULT_REALM )

Code: Select all

item := CreateItemAtLocation( who.x, who.y, who.z, objtype, 1, who.realm* );
*maybe
or GetObjProperty(who, "realm"), but SetObjProperty on any teleport
Justae
Expert Poster
Posts: 79
Joined: Thu May 24, 2007 2:12 pm
Location: South Africa

Re: Teleport to others Maps/Realm

Post by Justae »

Why would you want to SetObjProperty(mobile, "Realm") or even GetObjProperty(mobile, "Realm") ?

Realm is already inherited by any mobile or object and it's a simple matter to check mobile.realm or object.realm, without the code overhead of having to set realm or get realm as a variable on a character profile (or an object).
BELL
Journeyman Poster
Posts: 68
Joined: Tue Apr 22, 2008 6:09 am

Re: Teleport to others Maps/Realm

Post by BELL »

yes, now im has understood this )))
uobject.realm
--
older i set mannualy prop "realm" on all teleport scripts ))))
Post Reply