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 »

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: 282
Joined: Wed Sep 17, 2008 6:53 pm
Contact:

Re: map.appendpin(x,y)

Post by Nando »

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 »

or simply remove the boundaries...

if someone want a pin in 10000 10000 so let it do... (I hope it doesn`t crush client...)
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

Re: map.appendpin(x,y)

Post by MuadDib »

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.
Nando
POL Developer
Posts: 282
Joined: Wed Sep 17, 2008 6:53 pm
Contact:

Re: map.appendpin(x,y)

Post by Nando »

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... :)
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm
Location: Cross Lanes, WV

Re: map.appendpin(x,y)

Post by MuadDib »

True. Or we could allow them to define the limits in the itemdesc.cfg entry. hehehe
Nando
POL Developer
Posts: 282
Joined: Wed Sep 17, 2008 6:53 pm
Contact:

Re: map.appendpin(x,y)

Post by Nando »

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