Strange things with desc and changing desc.

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

Moderator: POL Developer

Post Reply
phao
Grandmaster Poster
Posts: 129
Joined: Fri Aug 31, 2007 2:25 pm

Strange things with desc and changing desc.

Post by phao »

when pressed ctrl+alt, UO show a lot of name (i think suposed to be the item desc or player names) and i've made a custom item (0x5806) that has this desc "Trap Making Recipe Book", and when i press ctrl-alt, i got the 'original' name, which is Book of Truth?

see:
http://i4.photobucket.com/albums/y111/A ... tranho.jpg

is there any way to fix that?


Also..

is there any way to change the desc of a item?
like this recipe book stores scrolls refering to recipes, so i want to make the script of adding recipes, increase a 'recipe-count' so when the player clicks in the book, appear:

'Crafting Recipe Book (#)' where # is the number of recipes in the book, to do that i need to change the desc, and the .desc is r/o so, how can i change the desc?
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm

Post by CWO »

There is no way to fix Ctrl+Alt. When you press the key combo, the client asks POL for the name of all mobiles in the area which POL returns. The client never asks nor listens to anything about the items in the area, it automatically just lists the default name of the item.
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

To set the single click name a player will see:
item.name := "xxxxx";

To read that name in a script use:
item.desc


Of course, you can always use tooltips to display item properties: eg
Recipe Count: 10
Xadhoom
Neophyte Poster
Posts: 30
Joined: Fri May 26, 2006 12:53 am

Post by Xadhoom »

OldnGrey wrote:item.name := "xxxxx";
Use the function SetName to change the name/desc
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

You can do it as you like. I was merely making a point about desc.
Post Reply