ScriptUO

Scripting Resources & Utilities => Orion UO Client => Topic started by: lbfsiteweb on December 07, 2025, 10:53:30 PM

Title: how to get the name of item ?
Post by: lbfsiteweb on December 07, 2025, 10:53:30 PM
How to obtain the name of a item
Title: Re: how to get the name of item ?
Post by: Crisis on December 09, 2025, 02:18:32 PM
The name should be visible in game but to get other info you can do _info which will bring a cursor up to click an item and get info such as serial number and color etc
Title: Re: how to get the name of item ?
Post by: lbfsiteweb on December 09, 2025, 10:50:06 PM
and     how to use Script to get name?
Title: Re: how to get the name of item ?
Post by: JoO on December 16, 2025, 04:31:03 AM
Here is an example.
function PrintNameBySerial() {
    var obj = Orion.FindObject('0x072AC317'); // Replace with actual serial
    if (obj) {
        Orion.Print("Object name: " + obj.Name());
    } else {
        Orion.Print("Object not found.");
    }
}
Title: Re: how to get the name of item ?
Post by: lbfsiteweb on December 24, 2025, 01:35:28 AM
thank you for answer

Before using this function, i must click on the target item once; otherwise, the output result will still be empty

Here is an example.
function PrintNameBySerial() {
    var obj = Orion.FindObject('0x072AC317'); // Replace with actual serial
    if (obj) {
        Orion.Print("Object name: " + obj.Name());
    } else {
        Orion.Print("Object not found.");
    }
}