Jump to content

Digest Jan-Feb

We talk about what was done and updated in the past month. We help keep abreast of events.

January February

Servers monitoring and the Addons Editor

We present you two legends. All dreams come true.

Servers monitoring The Addons Editor

Game tooltips

Tooltips provide a way for 3rd party fansites and extensions to display detailed information on mouseover.

Read more

The Addons Updater

Let us to introduce the addons updating software and to share the details

Read more Download

FittingRoom


Barut

Recommended Posts

How can I manually add item ID so it displays inside fitting room?

Example "/ FR 13 553" and it displays item with ID 13553

Link to comment
Share on other sites

Watch what happens when you click a text object.

Code:
onEvent  [ "EVENT_TEXT_OBJECT_CLICKED" ]  = function( params )

local IId = params.object:GetId()

if params.object:GetType() == 1 then

mission.DressCharacterScene( 1, IId )

end

end

So basically to display an item in a fitting room you need to use

Code:
mission.DressCharacterScene( 1, IId )

Where IId is an item ID.

So if you really know that a number is an item ID, you may use

Code:
mission.DressCharacterScene( 1, aNumber )

If you want to enter a number through the chat, you may want to track EVENT_UNKNOWN_SLASH_COMMAND event.

This event is already tracked by FittingRoom, so all you need is add next code to that function that tracks that event:

Code:

local a, b, aNumber = string.find( userMods.FromWString(params.text ), "/FR (%d+)" )

if aNumber ~= nil then 

mission.DressCharacterScene( 1, aNumber )

end

That's all. but BE SURE that you enter an ItemID, or it may result in an error!

Link to comment
Share on other sites

You may also want to use a check GetType( self ) to ensure that you try to dress an equipment part, but i don't know what happens if you try to get type of some random number.

Code:
if params.object:GetType() == VAL_OBJ_TYPE_ITEM then

I don't think that you are able to check if a "ValuedObject" "IsExist". So, basically, be sure that you enter an actual ItemID.

Link to comment
Share on other sites

Thank you Setras :)

Yes I have correct item ID, I added a line to log them.

local IId = params.object:GetId()

LogInfo( "Item ID=", IId )

This allows me to better guess the Item ID's in same category.

Link to comment
Share on other sites

I'm not so sure that it is usefull at all.

Item IDs may be randomly generated when you encounter items.

I don't really think that they are pre-generated. Do you?

Link to comment
Share on other sites

They're not pre-generated. All IDs in this game are dynamic to a single client generation at an instance of time. So an ID at one point could be a completely different ID if you walk away and come back again.

So knowing the ID at one instance of time for an item doesn't mean you'll know it at another, and definitely does not mean that someone else that sees that exact item at that exact time will see the same ID.

Picture the ID system as if you've given birth to identical twins at a single instance. (Sounds painful.) They look similar, but as time goes on they become more and more unique from each other and are never truly the same.

Link to comment
Share on other sites

Well, concerning the "Random ID idea", two people watchng at the same object with random ID will see different IDs for sure.

I don't know any of the "unique inter-clients" IDs. Maybe the "Guild member ID" stays same during some time, but everything else is totally random and differs between people or their "encounters".

If you encounter an object, then loose sight of it, and then encounter it again - you see a totally different ID.

By some reason i have some big tables in my user.cfg:

Quote:
t_b ScriptLocal_BulletinBoard

t_b GuildMessages

t_b isnew

i_k_b isnew

6530=1

6589=0

..........................

......................... Tons of them!

So, maybe message IDs stay same. But that's not a gift at all.

Link to comment
Share on other sites

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using our site you agree to the Terms of Use