map.appendpin(x,y)

Report core bugs regarding the Ultima Online Emulator Core release (version 097). You can attach your Core Dump. One bug per post.

Moderator: POL Developer

Locked
coltain
Grandmaster Poster
Posts: 159
Joined: Tue Mar 20, 2007 7:17 am
Location: Poland

map.appendpin(x,y)

Post by coltain » Sat Jan 17, 2009 9:20 am

This method when used in other realm then britannia can work wrong.

For example:
Treasure is located in x 4000 y2000

when the method is used on a map in britannia realm than its ok
if a map is in ilshenar then the pin is not added (out of range?)

Script fix:
create map in britannia realm, append a pin, move to player (my treasures are only in britannia, but if somebody has multimap.rle customed for ilshenar then... has to fix it for ilsh)

to fix it... add a realm parameter to this method to determine a range of x and y for a realm (i think now it`s who.realm given for the map)

Nando
POL Developer
Posts: 260
Joined: Wed Sep 17, 2008 6:53 pm
Contact:

Re: map.appendpin(x,y)

Post by Nando » Sat Jan 17, 2009 10:20 am

Hm.. checking the code right now, it compares the map.realm to see if the coordinates are in a valid location in THAT realm. Maps can only be used for one realm, as it's based on multimap.rle? Seems to me this is true.

Hm...

map.appendpin(x, y, maprealm := _DEFAULT_REALM) ?

Looks confusing for me, as people would think it allows them to use maps for other realms... any idea?

coltain
Grandmaster Poster
Posts: 159
Joined: Tue Mar 20, 2007 7:17 am
Location: Poland

Re: map.appendpin(x,y)

Post by coltain » Sat Jan 17, 2009 2:20 pm

or simply remove the boundaries...

if someone want a pin in 10000 10000 so let it do... (I hope it doesn`t crush client...)

User avatar
MuadDib
POL Expert
Posts: 1087
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

Re: map.appendpin(x,y)

Post by MuadDib » Sat Jan 17, 2009 4:16 pm

Client issue doing that.

There can be only one multimap file for the Cartography Maps like this. That is why everything gets coded for one realm.

Nando, you should add this to our internal To-Do for 098 and someone can get to it. We can always add a note to the Docs for it, to explain this so people don't try making scripts for all realms when only ONE is supported at a time, hehehe.
POL Developer - The Penguin Scripter

Nando
POL Developer
Posts: 260
Joined: Wed Sep 17, 2008 6:53 pm
Contact:

Re: map.appendpin(x,y)

Post by Nando » Sat Jan 17, 2009 7:23 pm

The idea of not checking boundaries seems nice... we just place a warning: "If you use it with wrong coords, you might crash the client"
Easy, painless, etc... :)

User avatar
MuadDib
POL Expert
Posts: 1087
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

Re: map.appendpin(x,y)

Post by MuadDib » Sat Jan 17, 2009 7:31 pm

True. Or we could allow them to define the limits in the itemdesc.cfg entry. hehehe
POL Developer - The Penguin Scripter

Nando
POL Developer
Posts: 260
Joined: Wed Sep 17, 2008 6:53 pm
Contact:

Re: map.appendpin(x,y)

Post by Nando » Sat Jan 17, 2009 8:10 pm

Well... every map has the xwest, xeast, etc... just need to check if it's inside that range. ;)

Locked