Page 1 of 1

Teleport to others Maps/Realm

Posted: Wed Jul 30, 2008 8:09 am
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...

Posted: Wed Jul 30, 2008 4:40 pm
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

Posted: Wed Jul 30, 2008 4:41 pm
by OldnGrey
Those locations are out of range for map4.

Try
MoveObjectToLocation(who, 730, 1160, 0, REALM_TOKUNO, MOVEOBJECT_FORCELOCATION);

Posted: Thu Jul 31, 2008 5:36 am
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

Posted: Thu Jul 31, 2008 6:25 am
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.

Posted: Thu Jul 31, 2008 7:41 am
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, :)

Posted: Thu Jul 31, 2008 10:32 am
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...

Re: Teleport to others Maps/Realm

Posted: Fri Oct 03, 2008 2:53 pm
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)

Re: Teleport to others Maps/Realm

Posted: Fri Oct 03, 2008 4:56 pm
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.

Re:

Posted: Fri Oct 03, 2008 11:07 pm
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

Re: Teleport to others Maps/Realm

Posted: Mon Oct 06, 2008 10:51 am
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).

Re: Teleport to others Maps/Realm

Posted: Mon Oct 06, 2008 11:59 pm
by BELL
yes, now im has understood this )))
uobject.realm
--
older i set mannualy prop "realm" on all teleport scripts ))))